[STATEMENT]
lemma Expr_lemma2[rule_format]:
  "noLowDPs (s, h) \<longrightarrow>
       EVars e \<subseteq> X \<longrightarrow>  Expr_noLoc e \<longrightarrow>
       (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow>
       s \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow>
       noLowDPs (\<lambda>y. if x = y then evalE e s else s y, h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. noLowDPs (s, h) \<longrightarrow> EVars e \<subseteq> X \<longrightarrow> Expr_noLoc e \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e s else s y, h)
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. noLowDPs (s, h) \<longrightarrow> EVars e \<subseteq> X \<longrightarrow> Expr_noLoc e \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e s else s y, h)
[PROOF STEP]
apply (induct e)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (varE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (varE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (varE xa) s else s y, h)
 2. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 3. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
(*VarE*)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (varE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (varE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (varE xa) s else s y, h)
 2. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 3. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply (simp add: noLowDPs_def)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xa. (\<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h)) \<and> (\<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h))) \<longrightarrow> xa \<in> X \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> CONTEXT x = low \<longrightarrow> (\<forall>l. s xa = RVal (Loc l) \<longrightarrow> l \<in> Dom h)
 2. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 3. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xa l. \<lbrakk>\<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); xa \<in> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; CONTEXT x = low; s xa = RVal (Loc l)\<rbrakk> \<Longrightarrow> l \<in> Dom h
 2. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 3. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply (rename_tac Var l)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>Var l. \<lbrakk>\<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); Var \<in> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; CONTEXT x = low; s Var = RVal (Loc l)\<rbrakk> \<Longrightarrow> l \<in> Dom h
 2. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 3. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply (erule_tac x=Var in allE, erule impE, assumption)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>Var l. \<lbrakk>\<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); Var \<in> X; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; CONTEXT x = low; s Var = RVal (Loc l); CONTEXT Var = low\<rbrakk> \<Longrightarrow> l \<in> Dom h
 2. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 3. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply (erule_tac x=Var in allE, erule impE, assumption)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>Var l. \<lbrakk>\<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); Var \<in> X; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; CONTEXT x = low; s Var = RVal (Loc l); CONTEXT Var = low; \<forall>l. s Var = RVal (Loc l) \<longrightarrow> l \<in> Dom h\<rbrakk> \<Longrightarrow> l \<in> Dom h
 2. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 3. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply (erule_tac x=l in allE, erule mp, assumption)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 2. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
(*ValE*)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>xa. noLowDPs (s, h) \<longrightarrow> EVars (valE xa) \<subseteq> X \<longrightarrow> Expr_noLoc (valE xa) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (valE xa) s else s y, h)
 2. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply (simp add: ValIsNoLoc_def noLowDPs_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>xa. (\<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h)) \<and> (\<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h))) \<longrightarrow> (\<exists>i. xa = IVal i) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> CONTEXT x = low \<longrightarrow> (\<forall>l. xa = RVal (Loc l) \<longrightarrow> l \<in> Dom h)
 2. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
(*opE*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h) \<longrightarrow> EVars e1 \<subseteq> X \<longrightarrow> Expr_noLoc e1 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (s, h) \<longrightarrow> EVars e2 \<subseteq> X \<longrightarrow> Expr_noLoc e2 \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (s, h) \<longrightarrow> EVars (opE x1a e1 e2) \<subseteq> X \<longrightarrow> Expr_noLoc (opE x1a e1 e2) \<longrightarrow> (\<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low) \<longrightarrow> s  \<approx>\<^sub>\<beta> t \<longrightarrow> twiddleHeap \<beta> h k \<longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2. \<lbrakk>noLowDPs (s, h); EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e1; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; noLowDPs (\<lambda>y. if x = y then evalE e1 s else s y, h); noLowDPs (\<lambda>y. if x = y then evalE e2 s else s y, h)\<rbrakk> \<Longrightarrow> noLowDPs (\<lambda>y. if x = y then evalE (opE x1a e1 e2) s else s y, h)
[PROOF STEP]
apply (simp add: noLowDPs_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2. \<lbrakk>(\<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h)) \<and> (\<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h))); EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e1; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h)\<rbrakk> \<Longrightarrow> CONTEXT x = low \<longrightarrow> (\<forall>l. x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l) \<longrightarrow> l \<in> Dom h)
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e1; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l)\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (drule Expr_lemma1)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l)\<rbrakk> \<Longrightarrow> EVars e1 \<subseteq> ?X142 x1a e1 e2 l
 2. \<And>x1a e1 e2 l xa. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); xa \<in> ?X142 x1a e1 e2 l\<rbrakk> \<Longrightarrow> CONTEXT xa = low
 3. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1a e1 e2 l xa. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); xa \<in> X\<rbrakk> \<Longrightarrow> CONTEXT xa = low
 2. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply fast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; Expr_noLoc e2; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (drule Expr_lemma1)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1\<rbrakk> \<Longrightarrow> EVars e2 \<subseteq> ?X151 x1a e1 e2 l
 2. \<And>x1a e1 e2 l xa. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; xa \<in> ?X151 x1a e1 e2 l\<rbrakk> \<Longrightarrow> CONTEXT xa = low
 3. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1a e1 e2 l xa. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; xa \<in> X\<rbrakk> \<Longrightarrow> CONTEXT xa = low
 2. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply fast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (subgoal_tac "(\<beta>,evalE e1 s,evalE e1 t): twiddleVal")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
 2. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2\<rbrakk> \<Longrightarrow> (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2\<rbrakk> \<Longrightarrow> (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal
 2. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (simp add: Expr_low_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (subgoal_tac "(\<beta>,evalE e2 s,evalE e2 t): twiddleVal")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
 2. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal
 2. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (simp add: Expr_low_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; opEGood x1a; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (simp add: opEGood_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; \<forall>\<beta> v v'. (\<beta>, v, v') \<in> twiddleVal \<longrightarrow> (\<forall>w w'. (\<beta>, w, w') \<in> twiddleVal \<longrightarrow> (\<beta>, x1a v w, x1a v' w') \<in> twiddleVal); \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (erule_tac x=\<beta> in allE, erule_tac x="evalE e1 s" in allE, erule_tac x="evalE e1 t" in allE, erule impE, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal; \<forall>w w'. (\<beta>, w, w') \<in> twiddleVal \<longrightarrow> (\<beta>, x1a (evalE e1 s) w, x1a (evalE e1 t) w') \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (erule_tac x="evalE e2 s" in allE, erule_tac x="evalE e2 t" in allE, erule impE, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal; (\<beta>, x1a (evalE e1 s) (evalE e2 s), x1a (evalE e1 t) (evalE e2 t)) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal; (\<beta>, RVal (Loc l), x1a (evalE e1 t) (evalE e2 t)) \<in> twiddleVal\<rbrakk> \<Longrightarrow> l \<in> Dom h
[PROOF STEP]
apply (rotate_tac -1, erule twiddleVal.cases, simp_all)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l l1 l2 \<beta>'. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta>' t; twiddleHeap \<beta>' h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l1); Expr_low e1; Expr_low e2; (\<beta>', evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>', evalE e2 s, evalE e2 t) \<in> twiddleVal; \<beta> = \<beta>'; l = l1; x1a (evalE e1 t) (evalE e2 t) = RVal (Loc l2); (l1, l2) \<in> \<beta>'\<rbrakk> \<Longrightarrow> l1 \<in> Dom h
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l1 l2. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; twiddleHeap \<beta> h k; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l1); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal; x1a (evalE e1 t) (evalE e2 t) = RVal (Loc l2); (l1, l2) \<in> \<beta>\<rbrakk> \<Longrightarrow> l1 \<in> Dom h
[PROOF STEP]
apply (simp add: twiddleHeap_def Pbij_Dom_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l1 l2. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; \<beta> \<in> Pbij \<and> {l. \<exists>ll. (l, ll) \<in> \<beta>} \<subseteq> Dom h \<and> Pbij_Rng \<beta> \<subseteq> Dom k \<and> (\<forall>l ll. (l, ll) \<in> \<beta> \<longrightarrow> (\<forall>a b. lookup h l = Some (a, b) \<longrightarrow> (\<forall>aa ba. lookup k ll = Some (aa, ba) \<longrightarrow> twiddleObj \<beta> (a, b) (aa, ba)))); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l1); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal; x1a (evalE e1 t) (evalE e2 t) = RVal (Loc l2); (l1, l2) \<in> \<beta>\<rbrakk> \<Longrightarrow> l1 \<in> Dom h
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a e1 e2 l1 l2. \<lbrakk>EVars e1 \<subseteq> X; EVars e2 \<subseteq> X; \<forall>x. x \<in> X \<longrightarrow> CONTEXT x = low; s  \<approx>\<^sub>\<beta> t; \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e1 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>xa. CONTEXT xa = low \<longrightarrow> (\<forall>l. (if x = xa then evalE e2 s else s xa) = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>x. CONTEXT x = low \<longrightarrow> (\<forall>l. s x = RVal (Loc l) \<longrightarrow> l \<in> Dom h); \<forall>ll c F. lookup h ll = Some (c, F) \<longrightarrow> (\<forall>f. GAMMA f = low \<longrightarrow> (\<forall>l. lookup F f = Some (RVal (Loc l)) \<longrightarrow> l \<in> Dom h)); CONTEXT x = low; x1a (evalE e1 s) (evalE e2 s) = RVal (Loc l1); Expr_low e1; Expr_low e2; (\<beta>, evalE e1 s, evalE e1 t) \<in> twiddleVal; (\<beta>, evalE e2 s, evalE e2 t) \<in> twiddleVal; x1a (evalE e1 t) (evalE e2 t) = RVal (Loc l2); (l1, l2) \<in> \<beta>; \<beta> \<in> Pbij; {l. \<exists>ll. (l, ll) \<in> \<beta>} \<subseteq> Dom h; Pbij_Rng \<beta> \<subseteq> Dom k; \<forall>l ll. (l, ll) \<in> \<beta> \<longrightarrow> (\<forall>a b. lookup h l = Some (a, b) \<longrightarrow> (\<forall>aa ba. lookup k ll = Some (aa, ba) \<longrightarrow> twiddleObj \<beta> (a, b) (aa, ba)))\<rbrakk> \<Longrightarrow> l1 \<in> Dom h
[PROOF STEP]
apply fast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done