diff -r a3357a631b96 -r 2478dd225b68 src/HOL/Metis_Examples/TransClosure.thy --- a/src/HOL/Metis_Examples/TransClosure.thy Wed Apr 28 16:03:49 2010 +0200 +++ b/src/HOL/Metis_Examples/TransClosure.thy Wed Apr 28 16:05:38 2010 +0200 @@ -5,7 +5,7 @@ *) theory TransClosure -imports Sledgehammer2d (* ### *) +imports Main begin types addr = nat @@ -23,7 +23,19 @@ lemma "\f c = Intg x; \y. f b = Intg y \ y \ x; (a, b) \ R\<^sup>*; (b, c) \ R\<^sup>*\ \ \c. (b, c) \ R \ (a, c) \ R\<^sup>*" -by (metis converse_rtranclE transitive_closure_trans(6)) +sledgehammer +proof - + assume A1: "f c = Intg x" + assume A2: "\y. f b = Intg y \ y \ x" + assume A3: "(a, b) \ R\<^sup>*" + assume A4: "(b, c) \ R\<^sup>*" + have F1: "f c \ f b" using A2 A1 by metis + have F2: "\u. (b, u) \ R \ (a, u) \ R\<^sup>*" using A3 by (metis transitive_closure_trans(6)) + have F3: "\x. (b, x R b c) \ R \ c = b" using A4 by (metis converse_rtranclE) + have "c \ b" using F1 by metis + hence "\u. (b, u) \ R" using F3 by metis + thus "\c. (b, c) \ R \ (a, c) \ R\<^sup>*" using F2 by metis +qed lemma "\f c = Intg x; \y. f b = Intg y \ y \ x; (a, b) \ R\<^sup>*; (b,c) \ R\<^sup>*\ \ \c. (b, c) \ R \ (a, c) \ R\<^sup>*" @@ -36,7 +48,7 @@ have "(R\<^sup>*) (a, b)" using A3 by (metis mem_def) hence F1: "(a, b) \ R\<^sup>*" by (metis mem_def) have "b \ c" using A1 A2 by metis - hence "\x\<^isub>1. (b, x\<^isub>1) \ R" using A4 by (metis mem_def converse_rtranclE) + hence "\x\<^isub>1. (b, x\<^isub>1) \ R" using A4 by (metis converse_rtranclE) thus "\c. (b, c) \ R \ (a, c) \ R\<^sup>*" using F1 by (metis transitive_closure_trans(6)) qed