src/HOL/IMP/Live.thy
changeset 47818 151d137f1095
parent 45784 ddac6eb800c6
child 50009 e48de0410307
equal deleted inserted replaced
47817:5d2d63f4363e 47818:151d137f1095
    52   case Skip then show ?case by auto
    52   case Skip then show ?case by auto
    53 next
    53 next
    54   case Assign then show ?case
    54   case Assign then show ?case
    55     by (auto simp: ball_Un)
    55     by (auto simp: ball_Un)
    56 next
    56 next
    57   case (Semi c1 s1 s2 c2 s3 X t1)
    57   case (Seq c1 s1 s2 c2 s3 X t1)
    58   from Semi.IH(1) Semi.prems obtain t2 where
    58   from Seq.IH(1) Seq.prems obtain t2 where
    59     t12: "(c1, t1) \<Rightarrow> t2" and s2t2: "s2 = t2 on L c2 X"
    59     t12: "(c1, t1) \<Rightarrow> t2" and s2t2: "s2 = t2 on L c2 X"
    60     by simp blast
    60     by simp blast
    61   from Semi.IH(2)[OF s2t2] obtain t3 where
    61   from Seq.IH(2)[OF s2t2] obtain t3 where
    62     t23: "(c2, t2) \<Rightarrow> t3" and s3t3: "s3 = t3 on X"
    62     t23: "(c2, t2) \<Rightarrow> t3" and s3t3: "s3 = t3 on X"
    63     by auto
    63     by auto
    64   show ?case using t12 t23 s3t3 by auto
    64   show ?case using t12 t23 s3t3 by auto
    65 next
    65 next
    66   case (IfTrue b s c1 s' c2)
    66   case (IfTrue b s c1 s' c2)
   116   case Skip then show ?case by auto
   116   case Skip then show ?case by auto
   117 next
   117 next
   118   case Assign then show ?case
   118   case Assign then show ?case
   119     by (auto simp: ball_Un)
   119     by (auto simp: ball_Un)
   120 next
   120 next
   121   case (Semi c1 s1 s2 c2 s3 X t1)
   121   case (Seq c1 s1 s2 c2 s3 X t1)
   122   from Semi.IH(1) Semi.prems obtain t2 where
   122   from Seq.IH(1) Seq.prems obtain t2 where
   123     t12: "(bury c1 (L c2 X), t1) \<Rightarrow> t2" and s2t2: "s2 = t2 on L c2 X"
   123     t12: "(bury c1 (L c2 X), t1) \<Rightarrow> t2" and s2t2: "s2 = t2 on L c2 X"
   124     by simp blast
   124     by simp blast
   125   from Semi.IH(2)[OF s2t2] obtain t3 where
   125   from Seq.IH(2)[OF s2t2] obtain t3 where
   126     t23: "(bury c2 X, t2) \<Rightarrow> t3" and s3t3: "s3 = t3 on X"
   126     t23: "(bury c2 X, t2) \<Rightarrow> t3" and s3t3: "s3 = t3 on X"
   127     by auto
   127     by auto
   128   show ?case using t12 t23 s3t3 by auto
   128   show ?case using t12 t23 s3t3 by auto
   129 next
   129 next
   130   case (IfTrue b s c1 s' c2)
   130   case (IfTrue b s c1 s' c2)
   170 by (cases c) auto
   170 by (cases c) auto
   171 
   171 
   172 lemma Assign_bury[simp]: "x::=a = bury c X \<longleftrightarrow> c = x::=a & x : X"
   172 lemma Assign_bury[simp]: "x::=a = bury c X \<longleftrightarrow> c = x::=a & x : X"
   173 by (cases c) auto
   173 by (cases c) auto
   174 
   174 
   175 lemma Semi_bury[simp]: "bc\<^isub>1;bc\<^isub>2 = bury c X \<longleftrightarrow>
   175 lemma Seq_bury[simp]: "bc\<^isub>1;bc\<^isub>2 = bury c X \<longleftrightarrow>
   176   (EX c\<^isub>1 c\<^isub>2. c = c\<^isub>1;c\<^isub>2 & bc\<^isub>2 = bury c\<^isub>2 X & bc\<^isub>1 = bury c\<^isub>1 (L c\<^isub>2 X))"
   176   (EX c\<^isub>1 c\<^isub>2. c = c\<^isub>1;c\<^isub>2 & bc\<^isub>2 = bury c\<^isub>2 X & bc\<^isub>1 = bury c\<^isub>1 (L c\<^isub>2 X))"
   177 by (cases c) auto
   177 by (cases c) auto
   178 
   178 
   179 lemma If_bury[simp]: "IF b THEN bc1 ELSE bc2 = bury c X \<longleftrightarrow>
   179 lemma If_bury[simp]: "IF b THEN bc1 ELSE bc2 = bury c X \<longleftrightarrow>
   180   (EX c1 c2. c = IF b THEN c1 ELSE c2 &
   180   (EX c1 c2. c = IF b THEN c1 ELSE c2 &
   192   case Skip then show ?case by auto
   192   case Skip then show ?case by auto
   193 next
   193 next
   194   case Assign then show ?case
   194   case Assign then show ?case
   195     by (auto simp: ball_Un)
   195     by (auto simp: ball_Un)
   196 next
   196 next
   197   case (Semi bc1 s1 s2 bc2 s3 c X t1)
   197   case (Seq bc1 s1 s2 bc2 s3 c X t1)
   198   then obtain c1 c2 where c: "c = c1;c2"
   198   then obtain c1 c2 where c: "c = c1;c2"
   199     and bc2: "bc2 = bury c2 X" and bc1: "bc1 = bury c1 (L c2 X)" by auto
   199     and bc2: "bc2 = bury c2 X" and bc1: "bc1 = bury c1 (L c2 X)" by auto
   200   note IH = Semi.hyps(2,4)
   200   note IH = Seq.hyps(2,4)
   201   from IH(1)[OF bc1, of t1] Semi.prems c obtain t2 where
   201   from IH(1)[OF bc1, of t1] Seq.prems c obtain t2 where
   202     t12: "(c1, t1) \<Rightarrow> t2" and s2t2: "s2 = t2 on L c2 X" by auto
   202     t12: "(c1, t1) \<Rightarrow> t2" and s2t2: "s2 = t2 on L c2 X" by auto
   203   from IH(2)[OF bc2 s2t2] obtain t3 where
   203   from IH(2)[OF bc2 s2t2] obtain t3 where
   204     t23: "(c2, t2) \<Rightarrow> t3" and s3t3: "s3 = t3 on X"
   204     t23: "(c2, t2) \<Rightarrow> t3" and s3t3: "s3 = t3 on X"
   205     by auto
   205     by auto
   206   show ?case using c t12 t23 s3t3 by auto
   206   show ?case using c t12 t23 s3t3 by auto