src/HOL/IMP/Compiler.thy
changeset 12566 fe20540bcf93
parent 12546 0c90e581379f
child 13095 8ed413a57bdc
equal deleted inserted replaced
12565:9df4b3934487 12566:fe20540bcf93
   133   by(erule app_left[of _ _ _ _ _ "[instr]",simplified])
   133   by(erule app_left[of _ _ _ _ _ "[instr]",simplified])
   134 
   134 
   135 subsection "Compiler correctness"
   135 subsection "Compiler correctness"
   136 
   136 
   137 declare rtrancl_into_rtrancl[trans]
   137 declare rtrancl_into_rtrancl[trans]
   138         rtrancl_into_rtrancl2[trans]
   138         converse_rtrancl_into_rtrancl[trans]
   139         rtrancl_trans[trans]
   139         rtrancl_trans[trans]
   140 
   140 
   141 text {*
   141 text {*
   142   The first proof; The statement is very intuitive,
   142   The first proof; The statement is very intuitive,
   143   but application of induction hypothesis requires the above lifting lemmas
   143   but application of induction hypothesis requires the above lifting lemmas
   230    apply(intro strip)
   230    apply(intro strip)
   231    (* instantiate assumption sufficiently for later: *)
   231    (* instantiate assumption sufficiently for later: *)
   232    apply(erule_tac x = "a@[?I]" in allE)
   232    apply(erule_tac x = "a@[?I]" in allE)
   233    apply(simp)
   233    apply(simp)
   234    (* execute JMPF: *)
   234    (* execute JMPF: *)
   235    apply(rule rtrancl_into_rtrancl2)
   235    apply(rule converse_rtrancl_into_rtrancl)
   236     apply(force intro!: JMPFT)
   236     apply(force intro!: JMPFT)
   237    (* execute compile c0: *)
   237    (* execute compile c0: *)
   238    apply(rule rtrancl_trans)
   238    apply(rule rtrancl_trans)
   239     apply(erule allE)
   239     apply(erule allE)
   240     apply assumption
   240     apply assumption
   243    apply(force intro!: JMPFF)
   243    apply(force intro!: JMPFF)
   244 (* end of case b is true *)
   244 (* end of case b is true *)
   245   apply(intro strip)
   245   apply(intro strip)
   246   apply(erule_tac x = "a@[?I]@compile c0@[?J]" in allE)
   246   apply(erule_tac x = "a@[?I]@compile c0@[?J]" in allE)
   247   apply(simp add:add_assoc)
   247   apply(simp add:add_assoc)
   248   apply(rule rtrancl_into_rtrancl2)
   248   apply(rule converse_rtrancl_into_rtrancl)
   249    apply(force intro!: JMPFF)
   249    apply(force intro!: JMPFF)
   250   apply(blast)
   250   apply(blast)
   251  apply(force intro: JMPFF)
   251  apply(force intro: JMPFF)
   252 apply(intro strip)
   252 apply(intro strip)
   253 apply(erule_tac x = "a@[?I]" in allE)
   253 apply(erule_tac x = "a@[?I]" in allE)
   254 apply(erule_tac x = a in allE)
   254 apply(erule_tac x = a in allE)
   255 apply(simp)
   255 apply(simp)
   256 apply(rule rtrancl_into_rtrancl2)
   256 apply(rule converse_rtrancl_into_rtrancl)
   257  apply(force intro!: JMPFT)
   257  apply(force intro!: JMPFT)
   258 apply(rule rtrancl_trans)
   258 apply(rule rtrancl_trans)
   259  apply(erule allE)
   259  apply(erule allE)
   260  apply assumption
   260  apply assumption
   261 apply(rule rtrancl_into_rtrancl2)
   261 apply(rule converse_rtrancl_into_rtrancl)
   262  apply(force intro!: JMPB)
   262  apply(force intro!: JMPB)
   263 apply(simp)
   263 apply(simp)
   264 done
   264 done
   265 
   265 
   266 text {* Missing: the other direction! *}
   266 text {* Missing: the other direction! *}