diff -r 9953ff53cc64 -r bc2563c37b1a src/HOL/MicroJava/BV/LBVSpec.thy --- a/src/HOL/MicroJava/BV/LBVSpec.thy Thu Jun 21 17:28:53 2007 +0200 +++ b/src/HOL/MicroJava/BV/LBVSpec.thy Thu Jun 21 20:07:26 2007 +0200 @@ -108,7 +108,7 @@ shows "x +_f \ = \" proof - from top have "x +_f \ <=_r \" .. - moreover from x have "\ <=_r x +_f \" .. + moreover from x T_A have "\ <=_r x +_f \" .. ultimately show ?thesis .. qed @@ -163,15 +163,15 @@ assume "?set (l#ls)" then obtain set: "snd`set ls \ A" by simp assume merge: "?merge (l#ls) x" moreover - obtain pc' s' where [simp]: "l = (pc',s')" by (cases l) + obtain pc' s' where l: "l = (pc',s')" by (cases l) ultimately - obtain x' where "?merge ls x'" by simp - assume "\x. ?set ls \ ?merge ls x \ ?P ls" hence "?P ls" . + obtain x' where merge': "?merge ls x'" by simp + assume "\x. ?set ls \ ?merge ls x \ ?P ls" hence "?P ls" using set merge' . moreover from merge set - have "pc' \ pc+1 \ s' <=_r (c!pc')" by (simp split: split_if_asm) + have "pc' \ pc+1 \ s' <=_r (c!pc')" by (simp add: l split: split_if_asm) ultimately - show "?P (l#ls)" by simp + show "?P (l#ls)" by (simp add: l) qed @@ -191,7 +191,7 @@ assume "snd`set (l#ls) \ A" then obtain l: "snd l \ A" and ls: "snd`set ls \ A" by auto assume "\x. x \ A \ snd`set ls \ A \ ?P ls x" - hence IH: "\x. x \ A \ ?P ls x" . + hence IH: "\x. x \ A \ ?P ls x" using ls by iprover obtain pc' s' where [simp]: "l = (pc',s')" by (cases l) hence "?merge (l#ls) x = ?merge ls (if pc'=pc+1 then s' +_f x else if s' <=_r c!pc' then x else \)" @@ -201,7 +201,7 @@ proof - from l have "s' \ A" by simp with x have "s' +_f x \ A" by simp - with x have "?if' \ A" by auto + with x T_A have "?if' \ A" by auto hence "?P ls ?if'" by (rule IH) thus ?thesis by simp qed also have "\ = ?if (l#ls) x" @@ -317,7 +317,7 @@ proof - from s0 have "set (map snd [(p', t')\ss . p'=pc+1]) \ A" by auto with x have "(map snd [(p', t')\ss . p'=pc+1] ++_f x) \ A" - by (auto intro!: plusplus_closed) + by (auto intro!: plusplus_closed semilat) with s0 x show ?thesis by (simp add: merge_def T_A) qed @@ -339,13 +339,13 @@ lemma (in lbv) wtc_pres: - assumes "pres_type step n A" - assumes "c!pc \ A" and "c!(pc+1) \ A" - assumes "s \ A" and "pc < n" + assumes pres: "pres_type step n A" + assumes cert: "c!pc \ A" and cert': "c!(pc+1) \ A" + assumes s: "s \ A" and pc: "pc < n" shows "wtc c pc s \ A" proof - - have "wti c pc s \ A" .. - moreover have "wti c pc (c!pc) \ A" .. + have "wti c pc s \ A" using pres cert' s pc .. + moreover have "wti c pc (c!pc) \ A" using pres cert' cert pc .. ultimately show ?thesis using T_A by (simp add: wtc) qed @@ -360,22 +360,21 @@ proof (induct pc) from s show "?wtl 0 \ A" by simp next - fix n assume "Suc n < length is" - then obtain n: "n < length is" by simp - assume "n < length is \ ?wtl n \ A" - hence "?wtl n \ A" . - moreover - from cert have "c!n \ A" by (rule cert_okD1) - moreover - have n1: "n+1 < length is" by simp - with cert have "c!(n+1) \ A" by (rule cert_okD1) - ultimately - have "wtc c n (?wtl n) \ A" by - (rule wtc_pres) + fix n assume IH: "Suc n < length is" + then have n: "n < length is" by simp + from IH have n1: "n+1 < length is" by simp + assume prem: "n < length is \ ?wtl n \ A" + have "wtc c n (?wtl n) \ A" + using pres _ _ _ n + proof (rule wtc_pres) + from prem n show "?wtl n \ A" . + from cert n show "c!n \ A" by (rule cert_okD1) + from cert n1 show "c!(n+1) \ A" by (rule cert_okD1) + qed also from all n have "?wtl n \ \" by - (rule wtl_take) with n1 have "wtc c n (?wtl n) = ?wtl (n+1)" by (rule wtl_Suc [symmetric]) finally show "?wtl (Suc n) \ A" by simp qed - end