src/HOL/Bali/AxExample.thy
changeset 51717 9e7d1c139569
parent 48262 a0d8abca8d7a
child 55143 04448228381d
equal deleted inserted replaced
51709:19b47bfac6ef 51717:9e7d1c139569
   124 apply      (tactic "ax_tac 1") (* Ass *)
   124 apply      (tactic "ax_tac 1") (* Ass *)
   125 prefer 2
   125 prefer 2
   126 apply       (rule ax_subst_Var_allI)
   126 apply       (rule ax_subst_Var_allI)
   127 apply       (tactic {* inst1_tac @{context} "P'" "\<lambda>a vs l vf. ?PP a vs l vf\<leftarrow>?x \<and>. ?p" *})
   127 apply       (tactic {* inst1_tac @{context} "P'" "\<lambda>a vs l vf. ?PP a vs l vf\<leftarrow>?x \<and>. ?p" *})
   128 apply       (rule allI)
   128 apply       (rule allI)
   129 apply       (tactic {* simp_tac (@{simpset} delloop "split_all_tac" delsimps [@{thm peek_and_def2}, @{thm heap_def2}, @{thm subst_res_def2}, @{thm normal_def2}]) 1 *})
   129 apply       (tactic {* simp_tac (@{context} delloop "split_all_tac" delsimps [@{thm peek_and_def2}, @{thm heap_def2}, @{thm subst_res_def2}, @{thm normal_def2}]) 1 *})
   130 apply       (rule ax_derivs.Abrupt)
   130 apply       (rule ax_derivs.Abrupt)
   131 apply      (simp (no_asm))
   131 apply      (simp (no_asm))
   132 apply      (tactic "ax_tac 1" (* FVar *))
   132 apply      (tactic "ax_tac 1" (* FVar *))
   133 apply       (tactic "ax_tac 2", tactic "ax_tac 2", tactic "ax_tac 2")
   133 apply       (tactic "ax_tac 2", tactic "ax_tac 2", tactic "ax_tac 2")
   134 apply      (tactic "ax_tac 1")
   134 apply      (tactic "ax_tac 1")
   174 apply   (force elim!: arr_inv_new_obj atleast_free_SucD atleast_free_weaken)
   174 apply   (force elim!: arr_inv_new_obj atleast_free_SucD atleast_free_weaken)
   175      (* begin init *)
   175      (* begin init *)
   176 apply  (rule ax_InitS)
   176 apply  (rule ax_InitS)
   177 apply     force
   177 apply     force
   178 apply    (simp (no_asm))
   178 apply    (simp (no_asm))
   179 apply   (tactic {* simp_tac (@{simpset} delloop "split_all_tac") 1 *})
   179 apply   (tactic {* simp_tac (@{context} delloop "split_all_tac") 1 *})
   180 apply   (rule ax_Init_Skip_lemma)
   180 apply   (rule ax_Init_Skip_lemma)
   181 apply  (tactic {* simp_tac (@{simpset} delloop "split_all_tac") 1 *})
   181 apply  (tactic {* simp_tac (@{context} delloop "split_all_tac") 1 *})
   182 apply  (rule ax_InitS [THEN conseq1] (* init Base *))
   182 apply  (rule ax_InitS [THEN conseq1] (* init Base *))
   183 apply      force
   183 apply      force
   184 apply     (simp (no_asm))
   184 apply     (simp (no_asm))
   185 apply    (unfold arr_viewed_from_def)
   185 apply    (unfold arr_viewed_from_def)
   186 apply    (rule allI)
   186 apply    (rule allI)
   187 apply    (rule_tac P' = "Normal ?P" in conseq1)
   187 apply    (rule_tac P' = "Normal ?P" in conseq1)
   188 apply     (tactic {* simp_tac (@{simpset} delloop "split_all_tac") 1 *})
   188 apply     (tactic {* simp_tac (@{context} delloop "split_all_tac") 1 *})
   189 apply     (tactic "ax_tac 1")
   189 apply     (tactic "ax_tac 1")
   190 apply     (tactic "ax_tac 1")
   190 apply     (tactic "ax_tac 1")
   191 apply     (rule_tac [2] ax_subst_Var_allI)
   191 apply     (rule_tac [2] ax_subst_Var_allI)
   192 apply      (tactic {* inst1_tac @{context} "P'" "\<lambda>vf l vfa. Normal (?P vf l vfa)" *})
   192 apply      (tactic {* inst1_tac @{context} "P'" "\<lambda>vf l vfa. Normal (?P vf l vfa)" *})
   193 apply     (tactic {* simp_tac (@{simpset} delloop "split_all_tac" delsimps [@{thm split_paired_All}, @{thm peek_and_def2}, @{thm heap_free_def2}, @{thm initd_def2}, @{thm normal_def2}, @{thm supd_lupd}]) 2 *})
   193 apply     (tactic {* simp_tac (@{context} delloop "split_all_tac" delsimps [@{thm split_paired_All}, @{thm peek_and_def2}, @{thm heap_free_def2}, @{thm initd_def2}, @{thm normal_def2}, @{thm supd_lupd}]) 2 *})
   194 apply      (tactic "ax_tac 2" (* NewA *))
   194 apply      (tactic "ax_tac 2" (* NewA *))
   195 apply       (tactic "ax_tac 3" (* ax_Alloc_Arr *))
   195 apply       (tactic "ax_tac 3" (* ax_Alloc_Arr *))
   196 apply       (tactic "ax_tac 3")
   196 apply       (tactic "ax_tac 3")
   197 apply      (tactic {* inst1_tac @{context} "P" "\<lambda>vf l vfa. Normal (?P vf l vfa\<leftarrow>\<diamondsuit>)" *})
   197 apply      (tactic {* inst1_tac @{context} "P" "\<lambda>vf l vfa. Normal (?P vf l vfa\<leftarrow>\<diamondsuit>)" *})
   198 apply      (tactic {* simp_tac (@{simpset} delloop "split_all_tac") 2 *})
   198 apply      (tactic {* simp_tac (@{context} delloop "split_all_tac") 2 *})
   199 apply      (tactic "ax_tac 2")
   199 apply      (tactic "ax_tac 2")
   200 apply     (tactic "ax_tac 1" (* FVar *))
   200 apply     (tactic "ax_tac 1" (* FVar *))
   201 apply      (tactic "ax_tac 2" (* StatRef *))
   201 apply      (tactic "ax_tac 2" (* StatRef *))
   202 apply     (rule ax_derivs.Done [THEN conseq1])
   202 apply     (rule ax_derivs.Done [THEN conseq1])
   203 apply     (tactic {* inst1_tac @{context} "Q" "\<lambda>vf. Normal ((\<lambda>Y s Z. vf=lvar (VName e) (snd s)) \<and>. heap_free four \<and>. initd Base \<and>. initd Ext)" *})
   203 apply     (tactic {* inst1_tac @{context} "Q" "\<lambda>vf. Normal ((\<lambda>Y s Z. vf=lvar (VName e) (snd s)) \<and>. heap_free four \<and>. initd Base \<and>. initd Ext)" *})
   204 apply     (clarsimp split del: split_if)
   204 apply     (clarsimp split del: split_if)
   205 apply     (frule atleast_free_weaken [THEN atleast_free_weaken])
   205 apply     (frule atleast_free_weaken [THEN atleast_free_weaken])
   206 apply     (drule initedD)
   206 apply     (drule initedD)
   207 apply     (clarsimp elim!: atleast_free_SucD simp add: arr_inv_def)
   207 apply     (clarsimp elim!: atleast_free_SucD simp add: arr_inv_def)
   208 apply    force
   208 apply    force
   209 apply   (tactic {* simp_tac (@{simpset} delloop "split_all_tac") 1 *})
   209 apply   (tactic {* simp_tac (@{context} delloop "split_all_tac") 1 *})
   210 apply   (rule ax_triv_Init_Object [THEN peek_and_forget2, THEN conseq1])
   210 apply   (rule ax_triv_Init_Object [THEN peek_and_forget2, THEN conseq1])
   211 apply     (rule wf_tprg)
   211 apply     (rule wf_tprg)
   212 apply    clarsimp
   212 apply    clarsimp
   213 apply   (tactic {* inst1_tac @{context} "P" "\<lambda>vf. Normal ((\<lambda>Y s Z. vf = lvar (VName e) (snd s)) \<and>. heap_free four \<and>. initd Ext)" *})
   213 apply   (tactic {* inst1_tac @{context} "P" "\<lambda>vf. Normal ((\<lambda>Y s Z. vf = lvar (VName e) (snd s)) \<and>. heap_free four \<and>. initd Ext)" *})
   214 apply   clarsimp
   214 apply   clarsimp