[STATEMENT]
theorem sound: \<open>\<tturnstile> z \<Longrightarrow> \<exists>p \<in> set z. semantics e f g p\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<tturnstile> z \<Longrightarrow> \<exists>p\<in>set z. semantics e f g p
[PROOF STEP]
proof (induct arbitrary: f rule: sequent_calculus.induct)
[PROOF STATE]
proof (state)
goal (13 subgoals):
 1. \<And>p z f. member (Neg p) z \<Longrightarrow> Bex (set (p # z)) (semantics e f g)
 2. \<And>p q z f. \<lbrakk>\<tturnstile> p # q # z; \<And>f. Bex (set (p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Dis p q # z)) (semantics e f g)
 3. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # q # z; \<And>f. Bex (set (Neg p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Imp p q # z)) (semantics e f g)
 4. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # Neg q # z; \<And>f. Bex (set (Neg p # Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Con p q) # z)) (semantics e f g)
 5. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> q # z; \<And>f. Bex (set (q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Con p q # z)) (semantics e f g)
 6. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Imp p q) # z)) (semantics e f g)
 7. \<And>p z q f. \<lbrakk>\<tturnstile> Neg p # z; \<And>f. Bex (set (Neg p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Dis p q) # z)) (semantics e f g)
 8. \<And>t p z f. \<lbrakk>\<tturnstile> sub 0 t p # z; \<And>f. Bex (set (sub 0 t p # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Exi p # z)) (semantics e f g)
 9. \<And>t p z f. \<lbrakk>\<tturnstile> Neg (sub 0 t p) # z; \<And>f. Bex (set (Neg (sub 0 t p) # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Uni p) # z)) (semantics e f g)
 10. \<And>i p z f. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. Bex (set (sub 0 (Fun i []) p # z)) (semantics e f g); news i (p # z)\<rbrakk> \<Longrightarrow> Bex (set (Uni p # z)) (semantics e f g)
A total of 13 subgoals...
[PROOF STEP]
case (10 i p z)
[PROOF STATE]
proof (state)
this:
\<tturnstile> sub 0 (Fun i []) p # z
\<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e ?f g a
news i (p # z)

goal (13 subgoals):
 1. \<And>p z f. member (Neg p) z \<Longrightarrow> Bex (set (p # z)) (semantics e f g)
 2. \<And>p q z f. \<lbrakk>\<tturnstile> p # q # z; \<And>f. Bex (set (p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Dis p q # z)) (semantics e f g)
 3. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # q # z; \<And>f. Bex (set (Neg p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Imp p q # z)) (semantics e f g)
 4. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # Neg q # z; \<And>f. Bex (set (Neg p # Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Con p q) # z)) (semantics e f g)
 5. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> q # z; \<And>f. Bex (set (q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Con p q # z)) (semantics e f g)
 6. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Imp p q) # z)) (semantics e f g)
 7. \<And>p z q f. \<lbrakk>\<tturnstile> Neg p # z; \<And>f. Bex (set (Neg p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Dis p q) # z)) (semantics e f g)
 8. \<And>t p z f. \<lbrakk>\<tturnstile> sub 0 t p # z; \<And>f. Bex (set (sub 0 t p # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Exi p # z)) (semantics e f g)
 9. \<And>t p z f. \<lbrakk>\<tturnstile> Neg (sub 0 t p) # z; \<And>f. Bex (set (Neg (sub 0 t p) # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Uni p) # z)) (semantics e f g)
 10. \<And>i p z f. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. Bex (set (sub 0 (Fun i []) p # z)) (semantics e f g); news i (p # z)\<rbrakk> \<Longrightarrow> Bex (set (Uni p # z)) (semantics e f g)
A total of 13 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<tturnstile> sub 0 (Fun i []) p # z
\<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e ?f g a
news i (p # z)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<tturnstile> sub 0 (Fun i []) p # z
\<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e ?f g a
news i (p # z)

goal (1 subgoal):
 1. \<exists>a\<in>set (Uni p # z). semantics e f g a
[PROOF STEP]
proof (cases \<open>\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p)\<close>)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p)\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
 2. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))

goal (2 subgoals):
 1. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p)\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
 2. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))

goal (2 subgoals):
 1. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p)\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
 2. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
[PROOF STEP]
have \<open>list_all (\<lambda>p. i \<notin> params p) z\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all (\<lambda>p. i \<notin> params p) z
[PROOF STEP]
using 10
[PROOF STATE]
proof (prove)
using this:
\<tturnstile> sub 0 (Fun i []) p # z
\<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e ?f g a
news i (p # z)

goal (1 subgoal):
 1. list_all (\<lambda>p. i \<notin> params p) z
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
list_all (\<lambda>p. i \<notin> params p) z

goal (2 subgoals):
 1. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p)\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
 2. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))
list_all (\<lambda>p. i \<notin> params p) z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))
list_all (\<lambda>p. i \<notin> params p) z

goal (1 subgoal):
 1. \<exists>a\<in>set (Uni p # z). semantics e f g a
[PROOF STEP]
using 10 Ball_set insert_iff list.set(2) upd_lemma
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p))
list_all (\<lambda>p. i \<notin> params p) z
\<tturnstile> sub 0 (Fun i []) p # z
\<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e ?f g a
news i (p # z)
Ball (set ?xs) ?P = list_all ?P ?xs
(?a \<in> insert ?b ?A) = (?a = ?b \<or> ?a \<in> ?A)
set (?x21.0 # ?x22.0) = insert ?x21.0 (set ?x22.0)
?n \<notin> params ?p \<Longrightarrow> semantics ?e (?f(?n := ?z)) ?g ?p = semantics ?e ?f ?g ?p

goal (1 subgoal):
 1. \<exists>a\<in>set (Uni p # z). semantics e f g a
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<exists>a\<in>set (Uni p # z). semantics e f g a

goal (1 subgoal):
 1. \<lbrakk>\<tturnstile> sub 0 (Fun i []) p # z; \<And>f. \<exists>a\<in>set (sub 0 (Fun i []) p # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (sub 0 (Fun i []) p)\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Uni p # z). semantics e f g a
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
\<exists>a\<in>set (Uni p # z). semantics e f g a

goal (12 subgoals):
 1. \<And>p z f. member (Neg p) z \<Longrightarrow> Bex (set (p # z)) (semantics e f g)
 2. \<And>p q z f. \<lbrakk>\<tturnstile> p # q # z; \<And>f. Bex (set (p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Dis p q # z)) (semantics e f g)
 3. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # q # z; \<And>f. Bex (set (Neg p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Imp p q # z)) (semantics e f g)
 4. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # Neg q # z; \<And>f. Bex (set (Neg p # Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Con p q) # z)) (semantics e f g)
 5. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> q # z; \<And>f. Bex (set (q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Con p q # z)) (semantics e f g)
 6. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Imp p q) # z)) (semantics e f g)
 7. \<And>p z q f. \<lbrakk>\<tturnstile> Neg p # z; \<And>f. Bex (set (Neg p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Dis p q) # z)) (semantics e f g)
 8. \<And>t p z f. \<lbrakk>\<tturnstile> sub 0 t p # z; \<And>f. Bex (set (sub 0 t p # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Exi p # z)) (semantics e f g)
 9. \<And>t p z f. \<lbrakk>\<tturnstile> Neg (sub 0 t p) # z; \<And>f. Bex (set (Neg (sub 0 t p) # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Uni p) # z)) (semantics e f g)
 10. \<And>i p z f. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. Bex (set (Neg (sub 0 (Fun i []) p) # z)) (semantics e f g); news i (p # z)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Exi p) # z)) (semantics e f g)
A total of 12 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (12 subgoals):
 1. \<And>p z f. member (Neg p) z \<Longrightarrow> Bex (set (p # z)) (semantics e f g)
 2. \<And>p q z f. \<lbrakk>\<tturnstile> p # q # z; \<And>f. Bex (set (p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Dis p q # z)) (semantics e f g)
 3. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # q # z; \<And>f. Bex (set (Neg p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Imp p q # z)) (semantics e f g)
 4. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # Neg q # z; \<And>f. Bex (set (Neg p # Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Con p q) # z)) (semantics e f g)
 5. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> q # z; \<And>f. Bex (set (q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Con p q # z)) (semantics e f g)
 6. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Imp p q) # z)) (semantics e f g)
 7. \<And>p z q f. \<lbrakk>\<tturnstile> Neg p # z; \<And>f. Bex (set (Neg p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Dis p q) # z)) (semantics e f g)
 8. \<And>t p z f. \<lbrakk>\<tturnstile> sub 0 t p # z; \<And>f. Bex (set (sub 0 t p # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Exi p # z)) (semantics e f g)
 9. \<And>t p z f. \<lbrakk>\<tturnstile> Neg (sub 0 t p) # z; \<And>f. Bex (set (Neg (sub 0 t p) # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Uni p) # z)) (semantics e f g)
 10. \<And>i p z f. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. Bex (set (Neg (sub 0 (Fun i []) p) # z)) (semantics e f g); news i (p # z)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Exi p) # z)) (semantics e f g)
A total of 12 subgoals...
[PROOF STEP]
case (11 i p z)
[PROOF STATE]
proof (state)
this:
\<tturnstile> Neg (sub 0 (Fun i []) p) # z
\<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e ?f g a
news i (p # z)

goal (12 subgoals):
 1. \<And>p z f. member (Neg p) z \<Longrightarrow> Bex (set (p # z)) (semantics e f g)
 2. \<And>p q z f. \<lbrakk>\<tturnstile> p # q # z; \<And>f. Bex (set (p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Dis p q # z)) (semantics e f g)
 3. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # q # z; \<And>f. Bex (set (Neg p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Imp p q # z)) (semantics e f g)
 4. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # Neg q # z; \<And>f. Bex (set (Neg p # Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Con p q) # z)) (semantics e f g)
 5. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> q # z; \<And>f. Bex (set (q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Con p q # z)) (semantics e f g)
 6. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Imp p q) # z)) (semantics e f g)
 7. \<And>p z q f. \<lbrakk>\<tturnstile> Neg p # z; \<And>f. Bex (set (Neg p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Dis p q) # z)) (semantics e f g)
 8. \<And>t p z f. \<lbrakk>\<tturnstile> sub 0 t p # z; \<And>f. Bex (set (sub 0 t p # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Exi p # z)) (semantics e f g)
 9. \<And>t p z f. \<lbrakk>\<tturnstile> Neg (sub 0 t p) # z; \<And>f. Bex (set (Neg (sub 0 t p) # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Uni p) # z)) (semantics e f g)
 10. \<And>i p z f. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. Bex (set (Neg (sub 0 (Fun i []) p) # z)) (semantics e f g); news i (p # z)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Exi p) # z)) (semantics e f g)
A total of 12 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<tturnstile> Neg (sub 0 (Fun i []) p) # z
\<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e ?f g a
news i (p # z)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<tturnstile> Neg (sub 0 (Fun i []) p) # z
\<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e ?f g a
news i (p # z)

goal (1 subgoal):
 1. \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
[PROOF STEP]
proof (cases \<open>\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p))\<close>)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
 2. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))

goal (2 subgoals):
 1. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
 2. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))

goal (2 subgoals):
 1. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
 2. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
[PROOF STEP]
have \<open>list_all (\<lambda>p. i \<notin> params p) z\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all (\<lambda>p. i \<notin> params p) z
[PROOF STEP]
using 11
[PROOF STATE]
proof (prove)
using this:
\<tturnstile> Neg (sub 0 (Fun i []) p) # z
\<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e ?f g a
news i (p # z)

goal (1 subgoal):
 1. list_all (\<lambda>p. i \<notin> params p) z
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
list_all (\<lambda>p. i \<notin> params p) z

goal (2 subgoals):
 1. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
 2. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))
list_all (\<lambda>p. i \<notin> params p) z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))
list_all (\<lambda>p. i \<notin> params p) z

goal (1 subgoal):
 1. \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
[PROOF STEP]
using 11 Ball_set insert_iff list.set(2) upd_lemma
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p)))
list_all (\<lambda>p. i \<notin> params p) z
\<tturnstile> Neg (sub 0 (Fun i []) p) # z
\<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e ?f g a
news i (p # z)
Ball (set ?xs) ?P = list_all ?P ?xs
(?a \<in> insert ?b ?A) = (?a = ?b \<or> ?a \<in> ?A)
set (?x21.0 # ?x22.0) = insert ?x21.0 (set ?x22.0)
?n \<notin> params ?p \<Longrightarrow> semantics ?e (?f(?n := ?z)) ?g ?p = semantics ?e ?f ?g ?p

goal (1 subgoal):
 1. \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a

goal (1 subgoal):
 1. \<lbrakk>\<tturnstile> Neg (sub 0 (Fun i []) p) # z; \<And>f. \<exists>a\<in>set (Neg (sub 0 (Fun i []) p) # z). semantics e f g a; news i (p # z); \<forall>x. semantics e (f(i := \<lambda>_. x)) g (Neg (sub 0 (Fun i []) p))\<rbrakk> \<Longrightarrow> \<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
\<exists>a\<in>set (Neg (Exi p) # z). semantics e f g a

goal (11 subgoals):
 1. \<And>p z f. member (Neg p) z \<Longrightarrow> Bex (set (p # z)) (semantics e f g)
 2. \<And>p q z f. \<lbrakk>\<tturnstile> p # q # z; \<And>f. Bex (set (p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Dis p q # z)) (semantics e f g)
 3. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # q # z; \<And>f. Bex (set (Neg p # q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Imp p q # z)) (semantics e f g)
 4. \<And>p q z f. \<lbrakk>\<tturnstile> Neg p # Neg q # z; \<And>f. Bex (set (Neg p # Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Con p q) # z)) (semantics e f g)
 5. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> q # z; \<And>f. Bex (set (q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Con p q # z)) (semantics e f g)
 6. \<And>p z q f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Imp p q) # z)) (semantics e f g)
 7. \<And>p z q f. \<lbrakk>\<tturnstile> Neg p # z; \<And>f. Bex (set (Neg p # z)) (semantics e f g); \<tturnstile> Neg q # z; \<And>f. Bex (set (Neg q # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Dis p q) # z)) (semantics e f g)
 8. \<And>t p z f. \<lbrakk>\<tturnstile> sub 0 t p # z; \<And>f. Bex (set (sub 0 t p # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Exi p # z)) (semantics e f g)
 9. \<And>t p z f. \<lbrakk>\<tturnstile> Neg (sub 0 t p) # z; \<And>f. Bex (set (Neg (sub 0 t p) # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Uni p) # z)) (semantics e f g)
 10. \<And>p z f. \<lbrakk>\<tturnstile> p # z; \<And>f. Bex (set (p # z)) (semantics e f g)\<rbrakk> \<Longrightarrow> Bex (set (Neg (Neg p) # z)) (semantics e f g)
A total of 11 subgoals...
[PROOF STEP]
qed force+


[STATEMENT]
lemma vrat_transitive_law:
  assumes "x \<in>\<^sub>\<circ> \<rat>\<^sub>\<circ>"
    and "y \<in>\<^sub>\<circ> \<rat>\<^sub>\<circ>"
    and "z \<in>\<^sub>\<circ> \<rat>\<^sub>\<circ>"
    and "x <\<^sub>\<rat> y"
    and "y <\<^sub>\<rat> z"
  shows "x <\<^sub>\<rat> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x <\<^sub>\<rat> z
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x <\<^sub>\<rat> z
[PROOF STEP]
have "x' < y' \<Longrightarrow> y' < z' \<Longrightarrow> x' < z'" for x' y' z' :: rat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x' < y'; y' < z'\<rbrakk> \<Longrightarrow> x' < z'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x' < ?y'; ?y' < ?z'\<rbrakk> \<Longrightarrow> ?x' < ?z'

goal (1 subgoal):
 1. x <\<^sub>\<rat> z
[PROOF STEP]
from this[untransferred, OF assms]
[PROOF STATE]
proof (chain)
picking this:
x <\<^sub>\<rat> z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x <\<^sub>\<rat> z

goal (1 subgoal):
 1. x <\<^sub>\<rat> z
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
x <\<^sub>\<rat> z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cltn2_abs_mult_rep:
  assumes "k \<noteq> 0"
  shows "cltn2_abs (k *\<^sub>R cltn2_rep A) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cltn2_abs (k *\<^sub>R cltn2_rep A) = A
[PROOF STEP]
using cltn2_rep_invertible and cltn2_abs_mult and cltn2_abs_rep and assms
[PROOF STATE]
proof (prove)
using this:
invertible (cltn2_rep ?A)
\<lbrakk>?k \<noteq> 0; invertible ?A\<rbrakk> \<Longrightarrow> cltn2_abs (?k *\<^sub>R ?A) = cltn2_abs ?A
cltn2_abs (cltn2_rep ?A) = ?A
k \<noteq> 0

goal (1 subgoal):
 1. cltn2_abs (k *\<^sub>R cltn2_rep A) = A
[PROOF STEP]
by simp


[STATEMENT]
lemma choiceSetI[intro]:
  "\<lbrakk> x \<in> A; \<And>y. y \<in> A \<Longrightarrow> x \<^bsub>r\<^esub>\<preceq> y \<rbrakk> \<Longrightarrow> x \<in> choiceSet A r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> A; \<And>y. y \<in> A \<Longrightarrow> x \<^bsub>r\<^esub>\<preceq> y\<rbrakk> \<Longrightarrow> x \<in> choiceSet A r
[PROOF STEP]
unfolding choiceSet_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> A; \<And>y. y \<in> A \<Longrightarrow> x \<^bsub>r\<^esub>\<preceq> y\<rbrakk> \<Longrightarrow> x \<in> {x \<in> A. \<forall>y\<in>A. x \<^bsub>r\<^esub>\<preceq> y}
[PROOF STEP]
by simp


[STATEMENT]
lemma has_integral_affinity:
  fixes a :: "'a::euclidean_space"
  assumes "(f has_integral i) (cbox a b)"
      and "m \<noteq> 0"
  shows "((\<lambda>x. f(m *\<^sub>R x + c)) has_integral (1 / (\<bar>m\<bar> ^ DIM('a))) *\<^sub>R i) ((\<lambda>x. (1 / m) *\<^sub>R x + -((1 / m) *\<^sub>R c)) ` cbox a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f (m *\<^sub>R x + c)) has_integral (1 / \<bar>m\<bar> ^ DIM('a)) *\<^sub>R i) ((\<lambda>x. (1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) ` cbox a b)
[PROOF STEP]
proof (rule has_integral_twiddle)
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. 0 < \<bar>m\<bar> ^ DIM('a)
 2. \<And>x. (1 / m) *\<^sub>R (m *\<^sub>R x + c) + - ((1 / m) *\<^sub>R c) = x
 3. \<And>x. m *\<^sub>R ((1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) + c = x
 4. \<And>x. isCont (\<lambda>x. m *\<^sub>R x + c) x
 5. \<And>u v. \<exists>w z. (\<lambda>x. m *\<^sub>R x + c) ` cbox u v = cbox w z
 6. \<And>u v. \<exists>w z. (\<lambda>x. (1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) ` cbox u v = cbox w z
 7. \<And>u v. content ((\<lambda>x. m *\<^sub>R x + c) ` cbox u v) = \<bar>m\<bar> ^ DIM('a) * content (cbox u v)
 8. (f has_integral i) (cbox a b)
[PROOF STEP]
show "\<exists>w z. (\<lambda>x. (1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) ` cbox u v = cbox w z"
       "\<exists>w z. (\<lambda>x. m *\<^sub>R x + c) ` cbox u v = cbox w z" for u v
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>w z. (\<lambda>x. (1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) ` cbox u v = cbox w z &&& \<exists>w z. (\<lambda>x. m *\<^sub>R x + c) ` cbox u v = cbox w z
[PROOF STEP]
using interval_image_affinity_interval
[PROOF STATE]
proof (prove)
using this:
\<exists>u v. (\<lambda>x. ?m *\<^sub>R x + ?c) ` cbox ?a ?b = cbox u v

goal (1 subgoal):
 1. \<exists>w z. (\<lambda>x. (1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) ` cbox u v = cbox w z &&& \<exists>w z. (\<lambda>x. m *\<^sub>R x + c) ` cbox u v = cbox w z
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
\<exists>w z. (\<lambda>x. (1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) ` cbox ?u ?v = cbox w z
\<exists>w z. (\<lambda>x. m *\<^sub>R x + c) ` cbox ?u ?v = cbox w z

goal (6 subgoals):
 1. 0 < \<bar>m\<bar> ^ DIM('a)
 2. \<And>x. (1 / m) *\<^sub>R (m *\<^sub>R x + c) + - ((1 / m) *\<^sub>R c) = x
 3. \<And>x. m *\<^sub>R ((1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) + c = x
 4. \<And>x. isCont (\<lambda>x. m *\<^sub>R x + c) x
 5. \<And>u v. content ((\<lambda>x. m *\<^sub>R x + c) ` cbox u v) = \<bar>m\<bar> ^ DIM('a) * content (cbox u v)
 6. (f has_integral i) (cbox a b)
[PROOF STEP]
show "content ((\<lambda>x. m *\<^sub>R x + c) ` cbox u v) = \<bar>m\<bar> ^ DIM('a) * content (cbox u v)" for u v
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content ((\<lambda>x. m *\<^sub>R x + c) ` cbox u v) = \<bar>m\<bar> ^ DIM('a) * content (cbox u v)
[PROOF STEP]
using content_image_affinity_cbox
[PROOF STATE]
proof (prove)
using this:
content ((\<lambda>x. ?m *\<^sub>R x + ?c) ` cbox ?a ?b) = \<bar>?m\<bar> ^ DIM(?'a) * content (cbox ?a ?b)

goal (1 subgoal):
 1. content ((\<lambda>x. m *\<^sub>R x + c) ` cbox u v) = \<bar>m\<bar> ^ DIM('a) * content (cbox u v)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
content ((\<lambda>x. m *\<^sub>R x + c) ` cbox ?u ?v) = \<bar>m\<bar> ^ DIM('a) * content (cbox ?u ?v)

goal (5 subgoals):
 1. 0 < \<bar>m\<bar> ^ DIM('a)
 2. \<And>x. (1 / m) *\<^sub>R (m *\<^sub>R x + c) + - ((1 / m) *\<^sub>R c) = x
 3. \<And>x. m *\<^sub>R ((1 / m) *\<^sub>R x + - ((1 / m) *\<^sub>R c)) + c = x
 4. \<And>x. isCont (\<lambda>x. m *\<^sub>R x + c) x
 5. (f has_integral i) (cbox a b)
[PROOF STEP]
qed (use assms zero_less_power in \<open>auto simp: field_simps\<close>)


[STATEMENT]
lemma eqd_suf: assumes "x \<cdot> y = u \<cdot> v" and "\<^bold>|x\<^bold>| \<le> \<^bold>|u\<^bold>|"
  shows "(y\<^sup><\<inverse>v)\<cdot>v = y \<and> x \<cdot> (y\<^sup><\<inverse>v) = u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y\<^sup><\<inverse>v  \<cdot> v = y \<and> x \<cdot> y\<^sup><\<inverse>v  = u
[PROOF STEP]
using eqd_suf1[OF assms] eqd_suf2[OF assms]
[PROOF STATE]
proof (prove)
using this:
y\<^sup><\<inverse>v  \<cdot> v = y
x \<cdot> y\<^sup><\<inverse>v  = u

goal (1 subgoal):
 1. y\<^sup><\<inverse>v  \<cdot> v = y \<and> x \<cdot> y\<^sup><\<inverse>v  = u
[PROOF STEP]
by blast


[STATEMENT]
lemma first_less_eq:
  "rank_skew_invar (t # bq) \<Longrightarrow> \<forall>t' \<in> set bq. rank t \<le> rank t'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank_skew_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t \<le> rank t'
[PROOF STEP]
apply(induct bq arbitrary: t)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>t. rank_skew_invar [t] \<Longrightarrow> \<forall>t'\<in>set []. rank t \<le> rank t'
 2. \<And>a bq t. \<lbrakk>\<And>t. rank_skew_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t \<le> rank t'; rank_skew_invar (t # a # bq)\<rbrakk> \<Longrightarrow> \<forall>t'\<in>set (a # bq). rank t \<le> rank t'
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a bq t. \<lbrakk>\<And>t. rank_skew_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t \<le> rank t'; rank_skew_invar (t # a # bq)\<rbrakk> \<Longrightarrow> \<forall>t'\<in>set (a # bq). rank t \<le> rank t'
[PROOF STEP]
apply (metis List.set_simps(2) insert_iff le_trans
    rank_invar_rank_skew rank_skew_invar.simps(3) rank_skew_rank_invar)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma indicator_eq_1_iff: "indicator A x = (1::'a::zero_neq_one) \<longleftrightarrow> x \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (indicator A x = (1::'a)) = (x \<in> A)
[PROOF STEP]
by (auto simp: indicator_def)


[STATEMENT]
lemma keys_eq_empty [simp]: "Poly_Mapping.keys c = {} \<longleftrightarrow> c = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (keys c = {}) = (c = 0)
[PROOF STEP]
by (metis in_keys_iff keys_zero lookup_zero poly_mapping_eqI)


[STATEMENT]
lemma NTCompDefinedI: "\<lbrakk>NatTrans \<eta>1 ; NatTrans \<eta>2 ; NTCatDom \<eta>2 = NTCatDom \<eta>1 ;
                         NTCatCod \<eta>2 = NTCatCod \<eta>1 ; NTCod \<eta>1 = NTDom \<eta>2\<rbrakk> \<Longrightarrow> \<eta>1 \<approx>>\<bullet> \<eta>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>NatTrans \<eta>1; NatTrans \<eta>2; NTCatDom \<eta>2 = NTCatDom \<eta>1; NTCatCod \<eta>2 = NTCatCod \<eta>1; NTCod \<eta>1 = NTDom \<eta>2\<rbrakk> \<Longrightarrow> \<eta>1 \<approx>>\<bullet> \<eta>2
[PROOF STEP]
by (simp add: NTCompDefined_def)


[STATEMENT]
lemma wf_subst_single:
  assumes "v \<notin> fv t" "\<sigma> v = t" "\<And>w. v \<noteq> w \<Longrightarrow> \<sigma> w = Var w"
  shows "wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>
[PROOF STEP]
have *: "subst_domain \<sigma> = {v}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subst_domain \<sigma> = {v}
[PROOF STEP]
by (metis subst_fv_dom_img_single(1)[OF assms])
[PROOF STATE]
proof (state)
this:
subst_domain \<sigma> = {v}

goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>
[PROOF STEP]
have "subst_domain \<sigma> \<inter> range_vars \<sigma> = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subst_domain \<sigma> \<inter> range_vars \<sigma> = {}
[PROOF STEP]
using * assms subst_fv_dom_img_single(2)
[PROOF STATE]
proof (prove)
using this:
subst_domain \<sigma> = {v}
v \<notin> fv t
\<sigma> v = t
v \<noteq> ?w \<Longrightarrow> \<sigma> ?w = Var ?w
\<lbrakk>?v \<notin> fv ?t; ?\<sigma> ?v = ?t; \<And>w. ?v \<noteq> w \<Longrightarrow> ?\<sigma> w = Var w\<rbrakk> \<Longrightarrow> range_vars ?\<sigma> = fv ?t

goal (1 subgoal):
 1. subst_domain \<sigma> \<inter> range_vars \<sigma> = {}
[PROOF STEP]
by (metis inf_bot_left insert_disjoint(1))
[PROOF STATE]
proof (state)
this:
subst_domain \<sigma> \<inter> range_vars \<sigma> = {}

goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
subst_domain \<sigma> \<inter> range_vars \<sigma> = {}

goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>
[PROOF STEP]
have "finite (subst_domain \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (subst_domain \<sigma>)
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
subst_domain \<sigma> = {v}

goal (1 subgoal):
 1. finite (subst_domain \<sigma>)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite (subst_domain \<sigma>)

goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
subst_domain \<sigma> \<inter> range_vars \<sigma> = {}
finite (subst_domain \<sigma>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
subst_domain \<sigma> \<inter> range_vars \<sigma> = {}
finite (subst_domain \<sigma>)

goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>
[PROOF STEP]
by (metis wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t_def)
[PROOF STATE]
proof (state)
this:
wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<sigma>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma equal_real_alg: "HOL.equal (real_of x) (real_of y) = (x = y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equal_class.equal (real_of x) (real_of y) = (x = y)
[PROOF STEP]
unfolding equal_real_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (real_of x - real_of y = 0) = (x = y)
[PROOF STEP]
by (transfer, auto)


[STATEMENT]
lemma cmod_mult_minus_left_distrib [simp]:
  shows "cmod (z*z1 - z*z2) = cmod z * cmod(z1 - z2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (z * z1 - z * z2) = cmod z * cmod (z1 - z2)
[PROOF STEP]
by (metis norm_mult right_diff_distrib)


[STATEMENT]
lemma qconv_minus [simp]: "qconv c (x - y) = qconv c x - qconv c y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. qconv c (x - y) = qconv c x - qconv c y
[PROOF STEP]
by (transfer, auto simp add: plus_Quantity_ext_def mult.commute ring_class.ring_distribs)


[STATEMENT]
lemma of_nat_le_hmset_of_enat_iff: "of_nat m \<le> hmset_of_enat n \<longleftrightarrow> enat m \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (of_nat m \<le> hmset_of_enat n) = (enat m \<le> n)
[PROOF STEP]
by (metis hmset_of_enat.simps(1) hmset_of_enat_le)


[STATEMENT]
lemma L_transform_Conj [simp]:
  assumes "finite (supp xset)"
  shows "L_transform (Conj xset) = Formula.Conj (map_bset L_transform xset)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L_transform (FL_Formula.Conj xset) = Formula.Conj (map_bset L_transform xset)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite (supp xset)

goal (1 subgoal):
 1. L_transform (FL_Formula.Conj xset) = Formula.Conj (map_bset L_transform xset)
[PROOF STEP]
unfolding L_transform_def
[PROOF STATE]
proof (prove)
using this:
finite (supp xset)

goal (1 subgoal):
 1. Formula.formula.Abs_formula (L_transform_formula (FL_Formula.Conj xset)) = Formula.Conj (map_bset (\<lambda>x. Formula.formula.Abs_formula (L_transform_formula x)) xset)
[PROOF STEP]
by (simp add: Formula.Conj_def bset.map_comp o_def)


[STATEMENT]
lemma lns_alt_def1 [iff] :
  shows "local_nonsatiation B P \<longleftrightarrow> (\<forall>x \<in> B. \<forall>e>0. (\<exists>y \<in> B. dist y x \<le> e \<and> y \<succ>[P] x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local_nonsatiation B P = (\<forall>x\<in>B. \<forall>e>0. \<exists>y\<in>B. dist y x \<le> e \<and> y \<succeq>[P] x \<and> (x, y) \<notin> P)
[PROOF STEP]
by(simp add : dist_norm local_nonsatiation_def)


[STATEMENT]
lemma l7_25_R1:
  assumes "Cong C A C B" and
    "Col A B C"
  shows "\<exists> X. X Midpoint A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>X. X Midpoint A B
[PROOF STEP]
using assms(1) assms(2) l7_20 l7_3_2 not_col_permutation_5
[PROOF STATE]
proof (prove)
using this:
Cong C A C B
Col A B C
\<lbrakk>Col ?A ?M ?B; Cong ?M ?A ?M ?B\<rbrakk> \<Longrightarrow> ?A = ?B \<or> ?M Midpoint ?A ?B
?A Midpoint ?A ?A
\<not> Col ?A ?B ?C \<Longrightarrow> \<not> Col ?A ?C ?B

goal (1 subgoal):
 1. \<exists>X. X Midpoint A B
[PROOF STEP]
by blast


[STATEMENT]
lemma to_fun_function_ring_hom:
"to_fun \<in> ring_hom P (Fun R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_fun \<in> ring_hom P (function_ring (carrier R) R)
[PROOF STEP]
apply(rule ring_hom_memI)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x. x \<in> carrier P \<Longrightarrow> to_fun x \<in> carrier (function_ring (carrier R) R)
 2. \<And>x y. \<lbrakk>x \<in> carrier P; y \<in> carrier P\<rbrakk> \<Longrightarrow> to_fun (x \<otimes>\<^bsub>P\<^esub> y) = to_fun x \<otimes>\<^bsub>function_ring (carrier R) R\<^esub> to_fun y
 3. \<And>x y. \<lbrakk>x \<in> carrier P; y \<in> carrier P\<rbrakk> \<Longrightarrow> to_fun (x \<oplus>\<^bsub>P\<^esub> y) = to_fun x \<oplus>\<^bsub>function_ring (carrier R) R\<^esub> to_fun y
 4. to_fun \<one>\<^bsub>P\<^esub> = \<one>\<^bsub>function_ring (carrier R) R\<^esub>
[PROOF STEP]
using to_fun_is_Fun
[PROOF STATE]
proof (prove)
using this:
?x \<in> carrier P \<Longrightarrow> to_fun ?x \<in> carrier (function_ring (carrier R) R)

goal (4 subgoals):
 1. \<And>x. x \<in> carrier P \<Longrightarrow> to_fun x \<in> carrier (function_ring (carrier R) R)
 2. \<And>x y. \<lbrakk>x \<in> carrier P; y \<in> carrier P\<rbrakk> \<Longrightarrow> to_fun (x \<otimes>\<^bsub>P\<^esub> y) = to_fun x \<otimes>\<^bsub>function_ring (carrier R) R\<^esub> to_fun y
 3. \<And>x y. \<lbrakk>x \<in> carrier P; y \<in> carrier P\<rbrakk> \<Longrightarrow> to_fun (x \<oplus>\<^bsub>P\<^esub> y) = to_fun x \<oplus>\<^bsub>function_ring (carrier R) R\<^esub> to_fun y
 4. to_fun \<one>\<^bsub>P\<^esub> = \<one>\<^bsub>function_ring (carrier R) R\<^esub>
[PROOF STEP]
apply auto[1]
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier P; y \<in> carrier P\<rbrakk> \<Longrightarrow> to_fun (x \<otimes>\<^bsub>P\<^esub> y) = to_fun x \<otimes>\<^bsub>function_ring (carrier R) R\<^esub> to_fun y
 2. \<And>x y. \<lbrakk>x \<in> carrier P; y \<in> carrier P\<rbrakk> \<Longrightarrow> to_fun (x \<oplus>\<^bsub>P\<^esub> y) = to_fun x \<oplus>\<^bsub>function_ring (carrier R) R\<^esub> to_fun y
 3. to_fun \<one>\<^bsub>P\<^esub> = \<one>\<^bsub>function_ring (carrier R) R\<^esub>
[PROOF STEP]
apply (simp add: to_fun_Fun_mult)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier P; y \<in> carrier P\<rbrakk> \<Longrightarrow> to_fun (x \<oplus>\<^bsub>P\<^esub> y) = to_fun x \<oplus>\<^bsub>function_ring (carrier R) R\<^esub> to_fun y
 2. to_fun \<one>\<^bsub>P\<^esub> = \<one>\<^bsub>function_ring (carrier R) R\<^esub>
[PROOF STEP]
apply (simp add: to_fun_Fun_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_fun \<one>\<^bsub>P\<^esub> = \<one>\<^bsub>function_ring (carrier R) R\<^esub>
[PROOF STEP]
by (simp add: to_fun_Fun_one)


[STATEMENT]
lemma ll: "local_lipschitz UNIV UNIV f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local_lipschitz UNIV UNIV f
[PROOF STEP]
by (rule c1_implies_local_lipschitz[where f'="\<lambda>(t, x). blinfun_scaleR_left (blinfun_scaleR_left id_blinfun 2) x"])
    (auto intro!: continuous_intros derivative_eq_intros ext simp: f_def split_beta' blinfun.bilinear_simps)


[STATEMENT]
lemma mod_ring_rel_unsafe: assumes "x < CARD('a)"
  shows "mod_ring_rel (int x) (of_nat x)" "0 < x \<Longrightarrow> of_nat x \<noteq> (0 :: 'a mod_ring)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_ring_rel (int x) (of_nat x) &&& (0 < x \<Longrightarrow> of_nat x \<noteq> 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. mod_ring_rel (int x) (of_nat x)
 2. 0 < x \<Longrightarrow> of_nat x \<noteq> 0
[PROOF STEP]
have id: "of_nat x = (of_int (int x) :: 'a mod_ring)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat x = of_int (int x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
of_nat x = of_int (int x)

goal (2 subgoals):
 1. mod_ring_rel (int x) (of_nat x)
 2. 0 < x \<Longrightarrow> of_nat x \<noteq> 0
[PROOF STEP]
show "mod_ring_rel (int x) (of_nat x)" "0 < x \<Longrightarrow> of_nat x \<noteq> (0 :: 'a mod_ring)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_ring_rel (int x) (of_nat x) &&& (0 < x \<Longrightarrow> of_nat x \<noteq> 0)
[PROOF STEP]
unfolding id
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_ring_rel (int x) (of_int (int x)) &&& (0 < x \<Longrightarrow> of_int (int x) \<noteq> 0)
[PROOF STEP]
unfolding mod_ring_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int x = to_int_mod_ring (of_int (int x)) &&& (0 < x \<Longrightarrow> of_int (int x) \<noteq> 0)
[PROOF STEP]
proof (auto simp add: assms of_int_of_int_mod_ring)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>0 < x; of_int_mod_ring (int x) = 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
assume "0 < x"
[PROOF STATE]
proof (state)
this:
0 < x

goal (1 subgoal):
 1. \<lbrakk>0 < x; of_int_mod_ring (int x) = 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
x < CARD('a)
0 < x
[PROOF STEP]
have "of_int_mod_ring (int x) \<noteq> (0 :: 'a mod_ring)"
[PROOF STATE]
proof (prove)
using this:
x < CARD('a)
0 < x

goal (1 subgoal):
 1. of_int_mod_ring (int x) \<noteq> 0
[PROOF STEP]
by (metis (no_types) less_imp_of_nat_less less_irrefl of_nat_0_le_iff of_nat_0_less_iff to_int_mod_ring_hom.hom_zero to_int_mod_ring_of_int_mod_ring)
[PROOF STATE]
proof (state)
this:
of_int_mod_ring (int x) \<noteq> 0

goal (1 subgoal):
 1. \<lbrakk>0 < x; of_int_mod_ring (int x) = 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
thus "of_int_mod_ring (int x) = (0 :: 'a mod_ring) \<Longrightarrow> False"
[PROOF STATE]
proof (prove)
using this:
of_int_mod_ring (int x) \<noteq> 0

goal (1 subgoal):
 1. of_int_mod_ring (int x) = 0 \<Longrightarrow> False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
of_int_mod_ring (int x) = 0 \<Longrightarrow> False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
mod_ring_rel (int x) (of_nat x)
0 < x \<Longrightarrow> of_nat x \<noteq> 0

goal:
No subgoals!
[PROOF STEP]
qed