# HG changeset patch # User nipkow # Date 1026371821 -7200 # Node ID 3b2b18c58d808ae489795dd066895a0e171a6abf # Parent 915d4d004643906a10e1a94c2e22eb2ed6f02297 *** empty log message *** diff -r 915d4d004643 -r 3b2b18c58d80 src/HOL/Lambda/Commutation.thy --- a/src/HOL/Lambda/Commutation.thy Wed Jul 10 18:39:15 2002 +0200 +++ b/src/HOL/Lambda/Commutation.thy Thu Jul 11 09:17:01 2002 +0200 @@ -138,46 +138,48 @@ subsection {* Newman's lemma *} -theorem Newman: +theorem newman: assumes wf: "wf (R\)" and lc: "\a b c. (a, b) \ R \ (a, c) \ R \ \d. (b, d) \ R\<^sup>* \ (c, d) \ R\<^sup>*" - shows "\b c. (a, b) \ R\<^sup>* \ (a, c) \ R\<^sup>* \ - \d. (b, d) \ R\<^sup>* \ (c, d) \ R\<^sup>*" - using wf -proof induct - case (less x b c) - have xc: "(x, c) \ R\<^sup>*" . - have xb: "(x, b) \ R\<^sup>*" . thus ?case - proof (rule converse_rtranclE) - assume "x = b" - with xc have "(b, c) \ R\<^sup>*" by simp - thus ?thesis by rules - next - fix y - assume xy: "(x, y) \ R" - assume yb: "(y, b) \ R\<^sup>*" - from xc show ?thesis + shows "(a, b) \ R\<^sup>* \ (a, c) \ R\<^sup>* \ + \d. (b, d) \ R\<^sup>* \ (c, d) \ R\<^sup>*" (is "PROP ?conf b c") +proof - + from wf show "\b c. PROP ?conf b c" + proof induct + case (less x b c) + have xc: "(x, c) \ R\<^sup>*" . + have xb: "(x, b) \ R\<^sup>*" . thus ?case proof (rule converse_rtranclE) - assume "x = c" - with xb have "(c, b) \ R\<^sup>*" by simp + assume "x = b" + with xc have "(b, c) \ R\<^sup>*" by simp thus ?thesis by rules next - fix y' - assume y'c: "(y', c) \ R\<^sup>*" - assume xy': "(x, y') \ R" - with xy have "\u. (y, u) \ R\<^sup>* \ (y', u) \ R\<^sup>*" by (rule lc) - then obtain u where yu: "(y, u) \ R\<^sup>*" and y'u: "(y', u) \ R\<^sup>*" by rules - from xy have "(y, x) \ R\" .. - from this and yb yu have "\d. (b, d) \ R\<^sup>* \ (u, d) \ R\<^sup>*" by (rule less) - then obtain v where bv: "(b, v) \ R\<^sup>*" and uv: "(u, v) \ R\<^sup>*" by rules - from xy' have "(y', x) \ R\" .. - moreover from y'u and uv have "(y', v) \ R\<^sup>*" by (rule rtrancl_trans) - moreover note y'c - ultimately have "\d. (v, d) \ R\<^sup>* \ (c, d) \ R\<^sup>*" by (rule less) - then obtain w where vw: "(v, w) \ R\<^sup>*" and cw: "(c, w) \ R\<^sup>*" by rules - from bv vw have "(b, w) \ R\<^sup>*" by (rule rtrancl_trans) - with cw show ?thesis by rules + fix y + assume xy: "(x, y) \ R" + assume yb: "(y, b) \ R\<^sup>*" + from xc show ?thesis + proof (rule converse_rtranclE) + assume "x = c" + with xb have "(c, b) \ R\<^sup>*" by simp + thus ?thesis by rules + next + fix y' + assume y'c: "(y', c) \ R\<^sup>*" + assume xy': "(x, y') \ R" + with xy have "\u. (y, u) \ R\<^sup>* \ (y', u) \ R\<^sup>*" by (rule lc) + then obtain u where yu: "(y, u) \ R\<^sup>*" and y'u: "(y', u) \ R\<^sup>*" by rules + from xy[symmetric] yb yu have "\d. (b, d) \ R\<^sup>* \ (u, d) \ R\<^sup>*" + by (rule less) + then obtain v where bv: "(b, v) \ R\<^sup>*" and uv: "(u, v) \ R\<^sup>*" by rules + note xy'[symmetric] + moreover from y'u and uv have "(y', v) \ R\<^sup>*" by (rule rtrancl_trans) + moreover note y'c + ultimately have "\d. (v, d) \ R\<^sup>* \ (c, d) \ R\<^sup>*" by (rule less) + then obtain w where vw: "(v, w) \ R\<^sup>*" and cw: "(c, w) \ R\<^sup>*" by rules + from bv vw have "(b, w) \ R\<^sup>*" by (rule rtrancl_trans) + with cw show ?thesis by rules + qed qed qed qed diff -r 915d4d004643 -r 3b2b18c58d80 src/HOL/Relation.thy --- a/src/HOL/Relation.thy Wed Jul 10 18:39:15 2002 +0200 +++ b/src/HOL/Relation.thy Thu Jul 11 09:17:01 2002 +0200 @@ -189,10 +189,10 @@ lemma converse_iff [iff]: "((a,b): r^-1) = ((b,a) : r)" by (simp add: converse_def) -lemma converseI: "(a, b) : r ==> (b, a) : r^-1" +lemma converseI[sym]: "(a, b) : r ==> (b, a) : r^-1" by (simp add: converse_def) -lemma converseD: "(a,b) : r^-1 ==> (b, a) : r" +lemma converseD[sym]: "(a,b) : r^-1 ==> (b, a) : r" by (simp add: converse_def) lemma converseE [elim!]: