[STATEMENT]
lemma opposite_gob_subsumption: "\<forall>g \<in> set (Guards t1). \<exists>i v s. g = Eq (V (I i)) (L v) \<or> (g = In (I i) s \<and> s \<noteq> []) \<Longrightarrow>
       \<forall>g \<in> set (Guards t2). \<exists>i v s. g = Eq (V (I i)) (L v) \<or> (g = In (I i) s \<and> s \<noteq> []) \<Longrightarrow>
       \<exists> i. \<exists>v. Eq (V (I i)) (L v) \<in> set (Guards t1) \<and>
         (\<forall>g \<in> set (Guards t2). \<not> gexp_constrains g (V (I i))) \<Longrightarrow>
       Arity t1 = Arity t2 \<Longrightarrow>
       \<forall>i \<in> enumerate_inputs t2. i < Arity t2 \<Longrightarrow>
       \<forall>i \<in> enumerate_inputs t2. length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1 \<Longrightarrow>
       \<not> subsumes t1 c t2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i v s. g = Eq (V (I i)) (L v) \<or> g = In (I i) s \<and> s \<noteq> []; \<forall>g\<in>set (Guards t2). \<exists>i v s. g = Eq (V (I i)) (L v) \<or> g = In (I i) s \<and> s \<noteq> []; \<exists>i v. Eq (V (I i)) (L v) \<in> set (Guards t1) \<and> (\<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i))); Arity t1 = Arity t2; \<forall>i\<in>enumerate_inputs t2. i < Arity t2; \<forall>i\<in>enumerate_inputs t2. length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1\<rbrakk> \<Longrightarrow> \<not> subsumes t1 c t2
[PROOF STEP]
apply (rule bad_guards)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i v s. g = Eq (V (I i)) (L v) \<or> g = In (I i) s \<and> s \<noteq> []; \<forall>g\<in>set (Guards t2). \<exists>i v s. g = Eq (V (I i)) (L v) \<or> g = In (I i) s \<and> s \<noteq> []; \<exists>i v. Eq (V (I i)) (L v) \<in> set (Guards t1) \<and> (\<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i))); Arity t1 = Arity t2; \<forall>i\<in>enumerate_inputs t2. i < Arity t2; \<forall>i\<in>enumerate_inputs t2. length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1\<rbrakk> \<Longrightarrow> \<exists>i. can_take_transition t2 i c \<and> \<not> can_take_transition t1 i c
[PROOF STEP]
apply (simp add: enumerate_inputs_def can_take_transition_def can_take_def Bex_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<exists>i. (\<exists>v. Eq (V (I i)) (L v) \<in> set (Guards t1)) \<and> (\<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i))); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1\<rbrakk> \<Longrightarrow> \<exists>i. length i = Arity t2 \<and> apply_guards (Guards t2) (join_ir i c) \<and> (length i = Arity t2 \<longrightarrow> \<not> apply_guards (Guards t1) (join_ir i c))
[PROOF STEP]
using literal_args_can_take[of "Guards t2" "Arity t2" c]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>g\<in>set (Guards t2). \<exists>i v s. g = Eq (V (I i)) (L v) \<or> g = In (I i) s \<and> s \<noteq> []; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1\<rbrakk> \<Longrightarrow> \<exists>i. length i = Arity t2 \<and> apply_guards (Guards t2) (join_ir i c)

goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<exists>i. (\<exists>v. Eq (V (I i)) (L v) \<in> set (Guards t1)) \<and> (\<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i))); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1\<rbrakk> \<Longrightarrow> \<exists>i. length i = Arity t2 \<and> apply_guards (Guards t2) (join_ir i c) \<and> (length i = Arity t2 \<longrightarrow> \<not> apply_guards (Guards t1) (join_ir i c))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<exists>i. (\<exists>v. Eq (V (I i)) (L v) \<in> set (Guards t1)) \<and> (\<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i))); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<exists>i. length i = Arity t2 \<and> apply_guards (Guards t2) (join_ir i c)\<rbrakk> \<Longrightarrow> \<exists>i. length i = Arity t2 \<and> apply_guards (Guards t2) (join_ir i c) \<and> (length i = Arity t2 \<longrightarrow> \<not> apply_guards (Guards t1) (join_ir i c))
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i ia v. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> \<exists>i. length i = Arity t2 \<and> apply_guards (Guards t2) (join_ir i c) \<and> (length i = Arity t2 \<longrightarrow> \<not> apply_guards (Guards t1) (join_ir i c))
[PROOF STEP]
subgoal for i ia v
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> \<exists>i. length i = Arity t2 \<and> apply_guards (Guards t2) (join_ir i c) \<and> (length i = Arity t2 \<longrightarrow> \<not> apply_guards (Guards t1) (join_ir i c))
[PROOF STEP]
apply (rule_tac x="list_update ia i (Eps (\<lambda>x'. x' \<noteq> v))" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> length (ia[i := SOME x'. x' \<noteq> v]) = Arity t2 \<and> apply_guards (Guards t2) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c) \<and> (length (ia[i := SOME x'. x' \<noteq> v]) = Arity t2 \<longrightarrow> \<not> apply_guards (Guards t1) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> apply_guards (Guards t2) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c) \<and> \<not> apply_guards (Guards t1) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c)
[PROOF STEP]
apply standard
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> apply_guards (Guards t2) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c)
 2. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> \<not> apply_guards (Guards t1) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c)
[PROOF STEP]
apply (simp add: apply_guards_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (join_ir ia c) = true\<rbrakk> \<Longrightarrow> \<forall>g\<in>set (Guards t2). gval g (join_ir (ia[i := SOME x'. x' \<noteq> v]) c) = true
 2. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> \<not> apply_guards (Guards t1) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c)
[PROOF STEP]
using input_not_constrained_gval_swap_inputs
[PROOF STATE]
proof (prove)
using this:
\<not> gexp_constrains ?a (V (I ?v)) \<Longrightarrow> gval ?a (join_ir ?i ?c) = gval ?a (join_ir (?i[?v := ?x]) ?c)

goal (2 subgoals):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (join_ir ia c) = true\<rbrakk> \<Longrightarrow> \<forall>g\<in>set (Guards t2). gval g (join_ir (ia[i := SOME x'. x' \<noteq> v]) c) = true
 2. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> \<not> apply_guards (Guards t1) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; apply_guards (Guards t2) (join_ir ia c)\<rbrakk> \<Longrightarrow> \<not> apply_guards (Guards t1) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c)
[PROOF STEP]
apply (simp add: apply_guards_def Bex_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (join_ir ia c) = true\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> set (Guards t1) \<and> gval x (join_ir (ia[i := SOME x'. x' \<noteq> v]) c) \<noteq> true
[PROOF STEP]
apply (rule_tac x="Eq (V (I i)) (L v)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (join_ir ia c) = true\<rbrakk> \<Longrightarrow> Eq (V (I i)) (L v) \<in> set (Guards t1) \<and> gval (Eq (V (I i)) (L v)) (join_ir (ia[i := SOME x'. x' \<noteq> v]) c) \<noteq> true
[PROOF STEP]
apply (simp add: join_ir_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true\<rbrakk> \<Longrightarrow> value_eq (input2state (ia[i := SOME x'. x' \<noteq> v]) $ i) (Some v) \<noteq> true
[PROOF STEP]
apply (case_tac "input2state (ia[i := SOME x'. x' \<noteq> v]) $ i")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = None\<rbrakk> \<Longrightarrow> value_eq (input2state (ia[i := SOME x'. x' \<noteq> v]) $ i) (Some v) \<noteq> true
 2. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a\<rbrakk> \<Longrightarrow> value_eq (input2state (ia[i := SOME x'. x' \<noteq> v]) $ i) (Some v) \<noteq> true
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a\<rbrakk> \<Longrightarrow> value_eq (input2state (ia[i := SOME x'. x' \<noteq> v]) $ i) (Some v) \<noteq> true
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a\<rbrakk> \<Longrightarrow> a \<noteq> v
[PROOF STEP]
apply (case_tac "i < length ia")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a; i < length ia\<rbrakk> \<Longrightarrow> a \<noteq> v
 2. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a; \<not> i < length ia\<rbrakk> \<Longrightarrow> a \<noteq> v
[PROOF STEP]
apply (simp add: input2state_nth)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; (SOME x'. x' \<noteq> v) = a; i < Arity t2\<rbrakk> \<Longrightarrow> a \<noteq> v
 2. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a; \<not> i < length ia\<rbrakk> \<Longrightarrow> a \<noteq> v
[PROOF STEP]
apply (case_tac v)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a x1. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; (SOME x'. x' \<noteq> v) = a; i < Arity t2; v = Num x1\<rbrakk> \<Longrightarrow> a \<noteq> v
 2. \<And>a x2. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; (SOME x'. x' \<noteq> v) = a; i < Arity t2; v = value.Str x2\<rbrakk> \<Longrightarrow> a \<noteq> v
 3. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a; \<not> i < length ia\<rbrakk> \<Longrightarrow> a \<noteq> v
[PROOF STEP]
apply (metis (mono_tags) someI_ex value.simps(4))
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a x2. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; (SOME x'. x' \<noteq> v) = a; i < Arity t2; v = value.Str x2\<rbrakk> \<Longrightarrow> a \<noteq> v
 2. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a; \<not> i < length ia\<rbrakk> \<Longrightarrow> a \<noteq> v
[PROOF STEP]
apply (metis (mono_tags) someI_ex value.simps(4))
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>\<forall>g\<in>set (Guards t1). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); \<forall>g\<in>set (Guards t2). \<exists>i. (\<exists>v. g = Eq (V (I i)) (L v)) \<or> (\<exists>s. g = In (I i) s \<and> s \<noteq> []); Arity t1 = Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). i < Arity t2; \<forall>i\<in>\<Union> (enumerate_gexp_inputs ` set (Guards t2)) \<union> \<Union> (enumerate_aexp_inputs ` set (Outputs t2)) \<union> (\<Union>x\<in>set (Updates t2). case x of (uu_, x) \<Rightarrow> enumerate_aexp_inputs x). length (filter (\<lambda>g. gexp_constrains g (V (I i))) (Guards t2)) \<le> 1; \<forall>g\<in>set (Guards t2). \<not> gexp_constrains g (V (I i)); Eq (V (I i)) (L v) \<in> set (Guards t1); length ia = Arity t2; \<forall>g\<in>set (Guards t2). gval g (\<lambda>x. case x of I n \<Rightarrow> input2state ia $ n | R n \<Rightarrow> c $ n) = true; input2state (ia[i := SOME x'. x' \<noteq> v]) $ i = Some a; \<not> i < length ia\<rbrakk> \<Longrightarrow> a \<noteq> v
[PROOF STEP]
by (metis input2state_within_bounds length_list_update)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done