[STATEMENT]
lemma card_Int_copy:
  assumes "finite X" and "A \<union> B \<subseteq> X" and "\<exists>f. inj_on f (A \<inter> B) \<and> (A \<union> B) \<inter> (f ` (A \<inter> B)) = {} \<and> f ` (A \<inter> B) \<subseteq> X"
  shows "card A + card B \<le> card X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
from rev_finite_subset[OF assms(1), of A] rev_finite_subset[OF assms(1), of B] assms(2)
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> X \<Longrightarrow> finite A
B \<subseteq> X \<Longrightarrow> finite B
A \<union> B \<subseteq> X
[PROOF STEP]
have finite_A: "finite A" and finite_B: "finite B"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> X \<Longrightarrow> finite A
B \<subseteq> X \<Longrightarrow> finite B
A \<union> B \<subseteq> X

goal (1 subgoal):
 1. finite A &&& finite B
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
finite A
finite B

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite A
finite B
[PROOF STEP]
have finite_A_Un_B: "finite (A \<union> B)" and finite_A_Int_B: "finite (A \<inter> B)"
[PROOF STATE]
proof (prove)
using this:
finite A
finite B

goal (1 subgoal):
 1. finite (A \<union> B) &&& finite (A \<inter> B)
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
finite (A \<union> B)
finite (A \<inter> B)

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
from assms(3)
[PROOF STATE]
proof (chain)
picking this:
\<exists>f. inj_on f (A \<inter> B) \<and> (A \<union> B) \<inter> f ` (A \<inter> B) = {} \<and> f ` (A \<inter> B) \<subseteq> X
[PROOF STEP]
obtain f where f_inj_on: "inj_on f (A \<inter> B)"
                           and f_disjnt: "(A \<union> B) \<inter> (f ` (A \<inter> B)) = {}"
                           and f_imj_in: "f ` (A \<inter> B) \<subseteq> X"
[PROOF STATE]
proof (prove)
using this:
\<exists>f. inj_on f (A \<inter> B) \<and> (A \<union> B) \<inter> f ` (A \<inter> B) = {} \<and> f ` (A \<inter> B) \<subseteq> X

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>inj_on f (A \<inter> B); (A \<union> B) \<inter> f ` (A \<inter> B) = {}; f ` (A \<inter> B) \<subseteq> X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inj_on f (A \<inter> B)
(A \<union> B) \<inter> f ` (A \<inter> B) = {}
f ` (A \<inter> B) \<subseteq> X

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
from finite_A_Int_B
[PROOF STATE]
proof (chain)
picking this:
finite (A \<inter> B)
[PROOF STEP]
have finite_f_img: "finite (f ` (A \<inter> B))"
[PROOF STATE]
proof (prove)
using this:
finite (A \<inter> B)

goal (1 subgoal):
 1. finite (f ` (A \<inter> B))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite (f ` (A \<inter> B))

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
from assms(2) f_imj_in
[PROOF STATE]
proof (chain)
picking this:
A \<union> B \<subseteq> X
f ` (A \<inter> B) \<subseteq> X
[PROOF STEP]
have union_in: "(A \<union> B) \<union> f ` (A \<inter> B) \<subseteq> X"
[PROOF STATE]
proof (prove)
using this:
A \<union> B \<subseteq> X
f ` (A \<inter> B) \<subseteq> X

goal (1 subgoal):
 1. A \<union> B \<union> f ` (A \<inter> B) \<subseteq> X
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A \<union> B \<union> f ` (A \<inter> B) \<subseteq> X

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
from card_Un_Int[OF finite_A finite_B]
[PROOF STATE]
proof (chain)
picking this:
card A + card B = card (A \<union> B) + card (A \<inter> B)
[PROOF STEP]
have "card A + card B = card (A \<union> B) + card (A \<inter> B)"
[PROOF STATE]
proof (prove)
using this:
card A + card B = card (A \<union> B) + card (A \<inter> B)

goal (1 subgoal):
 1. card A + card B = card (A \<union> B) + card (A \<inter> B)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
card A + card B = card (A \<union> B) + card (A \<inter> B)

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card A + card B = card (A \<union> B) + card (A \<inter> B)

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
from card_image[OF f_inj_on]
[PROOF STATE]
proof (chain)
picking this:
card (f ` (A \<inter> B)) = card (A \<inter> B)
[PROOF STEP]
have "... = card (A \<union> B) + card (f ` (A \<inter> B))"
[PROOF STATE]
proof (prove)
using this:
card (f ` (A \<inter> B)) = card (A \<inter> B)

goal (1 subgoal):
 1. card (A \<union> B) + card (A \<inter> B) = card (A \<union> B) + card (f ` (A \<inter> B))
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
card (A \<union> B) + card (A \<inter> B) = card (A \<union> B) + card (f ` (A \<inter> B))

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (A \<union> B) + card (A \<inter> B) = card (A \<union> B) + card (f ` (A \<inter> B))

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
from card_Un_disjoint[OF finite_A_Un_B finite_f_img f_disjnt]
[PROOF STATE]
proof (chain)
picking this:
card (A \<union> B \<union> f ` (A \<inter> B)) = card (A \<union> B) + card (f ` (A \<inter> B))
[PROOF STEP]
have "... = card ((A \<union> B) \<union> f ` (A \<inter> B))"
[PROOF STATE]
proof (prove)
using this:
card (A \<union> B \<union> f ` (A \<inter> B)) = card (A \<union> B) + card (f ` (A \<inter> B))

goal (1 subgoal):
 1. card (A \<union> B) + card (f ` (A \<inter> B)) = card (A \<union> B \<union> f ` (A \<inter> B))
[PROOF STEP]
by argo
[PROOF STATE]
proof (state)
this:
card (A \<union> B) + card (f ` (A \<inter> B)) = card (A \<union> B \<union> f ` (A \<inter> B))

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (A \<union> B) + card (f ` (A \<inter> B)) = card (A \<union> B \<union> f ` (A \<inter> B))

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
from card_mono[OF assms(1) union_in]
[PROOF STATE]
proof (chain)
picking this:
card (A \<union> B \<union> f ` (A \<inter> B)) \<le> card X
[PROOF STEP]
have "... \<le> card X"
[PROOF STATE]
proof (prove)
using this:
card (A \<union> B \<union> f ` (A \<inter> B)) \<le> card X

goal (1 subgoal):
 1. card (A \<union> B \<union> f ` (A \<inter> B)) \<le> card X
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
card (A \<union> B \<union> f ` (A \<inter> B)) \<le> card X

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card A + card B \<le> card X
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card A + card B \<le> card X

goal (1 subgoal):
 1. card A + card B \<le> card X
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
card A + card B \<le> card X

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Corps) nonequiv_ex_Ostrowski_elem:"\<lbrakk>valuation K v; valuation K v';
 \<not> v_equiv K v v'\<rbrakk> \<Longrightarrow> \<exists>x\<in>carrier K. 0 \<le> (v x) \<and> (v' x) < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; valuation K v'; \<not> v_equiv K v v'\<rbrakk> \<Longrightarrow> \<exists>x\<in>carrier K. 0 \<le> v x \<and> v' x < 0
[PROOF STEP]
apply (subgoal_tac "\<not> (\<forall>x\<in>carrier K. 0 \<le> (v x) \<longrightarrow> 0 \<le> (v' x))")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>valuation K v; valuation K v'; \<not> v_equiv K v v'; \<not> (\<forall>x\<in>carrier K. 0 \<le> v x \<longrightarrow> 0 \<le> v' x)\<rbrakk> \<Longrightarrow> \<exists>x\<in>carrier K. 0 \<le> v x \<and> v' x < 0
 2. \<lbrakk>valuation K v; valuation K v'; \<not> v_equiv K v v'\<rbrakk> \<Longrightarrow> \<not> (\<forall>x\<in>carrier K. 0 \<le> v x \<longrightarrow> 0 \<le> v' x)
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>valuation K v; valuation K v'; \<not> v_equiv K v v'\<rbrakk> \<Longrightarrow> \<not> (\<forall>x\<in>carrier K. 0 \<le> v x \<longrightarrow> 0 \<le> v' x)
 2. \<lbrakk>valuation K v; valuation K v'; \<not> v_equiv K v v'; \<not> (\<forall>x\<in>carrier K. 0 \<le> v x \<longrightarrow> 0 \<le> v' x)\<rbrakk> \<Longrightarrow> \<exists>x\<in>carrier K. 0 \<le> v x \<and> v' x < 0
[PROOF STEP]
apply (rule contrapos_pp, simp+,
        frule valuations_equiv[of "v" "v'"], assumption+,
        simp add:val_equiv_axiom2[of v v'])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; valuation K v'; \<not> v_equiv K v v'; \<not> (\<forall>x\<in>carrier K. 0 \<le> v x \<longrightarrow> 0 \<le> v' x)\<rbrakk> \<Longrightarrow> \<exists>x\<in>carrier K. 0 \<le> v x \<and> v' x < 0
[PROOF STEP]
apply (simp, erule bexE, erule conjE, simp add:aneg_le)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>valuation K v; valuation K v'; \<not> v_equiv K v v'; x \<in> carrier K; 0 \<le> v x; v' x < 0\<rbrakk> \<Longrightarrow> \<exists>x\<in>carrier K. 0 \<le> v x \<and> v' x < 0
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma det_bound_hadamard: "is_det_bound det_bound_hadamard"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_det_bound det_bound_hadamard
[PROOF STEP]
unfolding is_det_bound_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>A n x. A \<in> carrier_mat n n \<longrightarrow> A \<in> Bounded_mat x \<longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
proof (intro allI impI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
fix A :: "int mat" and n c
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
assume A: "A \<in> carrier_mat n n" and BndA: "A \<in> Bounded_mat c"
[PROOF STATE]
proof (state)
this:
A \<in> carrier_mat n n
A \<in> Bounded_mat c

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
let ?h = rat_of_int
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
let ?hA = "map_mat ?h A"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
let ?hc = "?h c"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
from A
[PROOF STATE]
proof (chain)
picking this:
A \<in> carrier_mat n n
[PROOF STEP]
have hA: "?hA \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n

goal (1 subgoal):
 1. of_int_hom.mat_hom A \<in> carrier_mat n n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
of_int_hom.mat_hom A \<in> carrier_mat n n

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
from BndA
[PROOF STATE]
proof (chain)
picking this:
A \<in> Bounded_mat c
[PROOF STEP]
have Bnd: "?hA \<in> Bounded_mat ?hc"
[PROOF STATE]
proof (prove)
using this:
A \<in> Bounded_mat c

goal (1 subgoal):
 1. of_int_hom.mat_hom A \<in> Bounded_mat (rat_of_int c)
[PROOF STEP]
unfolding Bounded_mat_def
[PROOF STATE]
proof (prove)
using this:
A \<in> {A. \<forall>i<dim_row A. \<forall>j<dim_col A. \<bar>A $$ (i, j)\<bar> \<le> c}

goal (1 subgoal):
 1. of_int_hom.mat_hom A \<in> {A. \<forall>i<dim_row A. \<forall>j<dim_col A. \<bar>A $$ (i, j)\<bar> \<le> rat_of_int c}
[PROOF STEP]
by (auto, unfold of_int_abs[symmetric] of_int_le_iff, auto)
[PROOF STATE]
proof (state)
this:
of_int_hom.mat_hom A \<in> Bounded_mat (rat_of_int c)

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
have sqrt: "sqrt ((real n * (real_of_int c)\<^sup>2) ^ n) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> sqrt ((real n * (real_of_int c)\<^sup>2) ^ n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> sqrt ((real n * (real_of_int c)\<^sup>2) ^ n)

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
from det_bound_hadamard_squared[OF hA Bnd, unfolded of_int_hom.hom_det of_int_abs[symmetric]]
[PROOF STATE]
proof (chain)
picking this:
(rat_of_int \<bar>det A\<bar>)\<^sup>2 \<le> rat_of_nat n ^ n * rat_of_int c ^ (2 * n)
[PROOF STEP]
have "?h ( \<bar>det A\<bar>^2) \<le> ?h (int n ^ n * c ^ (2 * n))"
[PROOF STATE]
proof (prove)
using this:
(rat_of_int \<bar>det A\<bar>)\<^sup>2 \<le> rat_of_nat n ^ n * rat_of_int c ^ (2 * n)

goal (1 subgoal):
 1. rat_of_int (\<bar>det A\<bar>\<^sup>2) \<le> rat_of_int (int n ^ n * c ^ (2 * n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rat_of_int (\<bar>det A\<bar>\<^sup>2) \<le> rat_of_int (int n ^ n * c ^ (2 * n))

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
from this[unfolded of_int_le_iff]
[PROOF STATE]
proof (chain)
picking this:
\<bar>det A\<bar>\<^sup>2 \<le> int n ^ n * c ^ (2 * n)
[PROOF STEP]
have "\<bar>det A\<bar>^2 \<le> int n ^ n * c ^ (2 * n)"
[PROOF STATE]
proof (prove)
using this:
\<bar>det A\<bar>\<^sup>2 \<le> int n ^ n * c ^ (2 * n)

goal (1 subgoal):
 1. \<bar>det A\<bar>\<^sup>2 \<le> int n ^ n * c ^ (2 * n)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<bar>det A\<bar>\<^sup>2 \<le> int n ^ n * c ^ (2 * n)

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>det A\<bar>\<^sup>2 \<le> int n ^ n * c ^ (2 * n)

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
have "\<dots> = (int n * c^2)^n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int n ^ n * c ^ (2 * n) = (int n * c\<^sup>2) ^ n
[PROOF STEP]
unfolding power_mult power_mult_distrib
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int n ^ n * c\<^sup>2 ^ n = int n ^ n * c\<^sup>2 ^ n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int n ^ n * c ^ (2 * n) = (int n * c\<^sup>2) ^ n

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>det A\<bar>\<^sup>2 \<le> (int n * c\<^sup>2) ^ n
[PROOF STEP]
have "\<bar>det A\<bar>\<^sup>2 \<le> (int n * c\<^sup>2) ^ n"
[PROOF STATE]
proof (prove)
using this:
\<bar>det A\<bar>\<^sup>2 \<le> (int n * c\<^sup>2) ^ n

goal (1 subgoal):
 1. \<bar>det A\<bar>\<^sup>2 \<le> (int n * c\<^sup>2) ^ n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>det A\<bar>\<^sup>2 \<le> (int n * c\<^sup>2) ^ n

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
hence "sqrt_int_floor (\<bar>det A\<bar>\<^sup>2) \<le> sqrt_int_floor ((int n * c\<^sup>2) ^ n)"
[PROOF STATE]
proof (prove)
using this:
\<bar>det A\<bar>\<^sup>2 \<le> (int n * c\<^sup>2) ^ n

goal (1 subgoal):
 1. sqrt_int_floor (\<bar>det A\<bar>\<^sup>2) \<le> sqrt_int_floor ((int n * c\<^sup>2) ^ n)
[PROOF STEP]
unfolding sqrt_int_floor
[PROOF STATE]
proof (prove)
using this:
\<bar>det A\<bar>\<^sup>2 \<le> (int n * c\<^sup>2) ^ n

goal (1 subgoal):
 1. \<lfloor>sqrt (real_of_int (\<bar>det A\<bar>\<^sup>2))\<rfloor> \<le> \<lfloor>sqrt (real_of_int ((int n * c\<^sup>2) ^ n))\<rfloor>
[PROOF STEP]
by (intro floor_mono real_sqrt_le_mono, linarith)
[PROOF STATE]
proof (state)
this:
sqrt_int_floor (\<bar>det A\<bar>\<^sup>2) \<le> sqrt_int_floor ((int n * c\<^sup>2) ^ n)

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sqrt_int_floor (\<bar>det A\<bar>\<^sup>2) \<le> sqrt_int_floor ((int n * c\<^sup>2) ^ n)

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
have "sqrt_int_floor (\<bar>det A\<bar>\<^sup>2) = \<bar>det A\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt_int_floor (\<bar>det A\<bar>\<^sup>2) = \<bar>det A\<bar>
[PROOF STEP]
by (simp del: of_int_abs add: of_int_abs[symmetric])
[PROOF STATE]
proof (state)
this:
sqrt_int_floor (\<bar>det A\<bar>\<^sup>2) = \<bar>det A\<bar>

goal (1 subgoal):
 1. \<And>A n x. \<lbrakk>A \<in> carrier_mat n n; A \<in> Bounded_mat x\<rbrakk> \<Longrightarrow> \<bar>det A\<bar> \<le> det_bound_hadamard n x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>det A\<bar> \<le> sqrt_int_floor ((int n * c\<^sup>2) ^ n)
[PROOF STEP]
show "\<bar>det A\<bar> \<le> det_bound_hadamard n c"
[PROOF STATE]
proof (prove)
using this:
\<bar>det A\<bar> \<le> sqrt_int_floor ((int n * c\<^sup>2) ^ n)

goal (1 subgoal):
 1. \<bar>det A\<bar> \<le> det_bound_hadamard n c
[PROOF STEP]
unfolding det_bound_hadamard_def
[PROOF STATE]
proof (prove)
using this:
\<bar>det A\<bar> \<le> sqrt_int_floor ((int n * c\<^sup>2) ^ n)

goal (1 subgoal):
 1. \<bar>det A\<bar> \<le> sqrt_int_floor ((int n * c\<^sup>2) ^ n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>det A\<bar> \<le> det_bound_hadamard n c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sums_minus: "f sums a \<Longrightarrow> (\<lambda>n. - f n) sums (- a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f sums a \<Longrightarrow> (\<lambda>n. - f n) sums - a
[PROOF STEP]
unfolding sums_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. sum f {..<n}) \<longlonglongrightarrow> a \<Longrightarrow> (\<lambda>n. \<Sum>n<n. - f n) \<longlonglongrightarrow> - a
[PROOF STEP]
by (simp add: sum_negf tendsto_minus)


[STATEMENT]
lemma divide_by_norm_row_code[code abstract]:
  "vec_nth (divide_by_norm_row A a) = (% b. ((1 / norm (column b A)) *\<^sub>R column b A) $ a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (divide_by_norm_row A a) = (\<lambda>b. ((1 / norm (column b A)) *\<^sub>R column b A) $ a)
[PROOF STEP]
unfolding divide_by_norm_row_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (\<chi>b. ((1 / norm (column b A)) *\<^sub>R column b A) $ a) = (\<lambda>b. ((1 / norm (column b A)) *\<^sub>R column b A) $ a)
[PROOF STEP]
by (metis (lifting) vec_lambda_beta)


[STATEMENT]
lemma homeomorphic_frontiers_same_dimension:
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
  assumes "S homeomorphic T" "closed S" "closed T" and dimeq: "DIM('a) = DIM('b)"
  shows "(frontier S) homeomorphic (frontier T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frontier S homeomorphic frontier T
[PROOF STEP]
using assms [unfolded homeomorphic_minimal]
[PROOF STATE]
proof (prove)
using this:
\<exists>f g. (\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x) \<and> (\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y) \<and> continuous_on S f \<and> continuous_on T g
closed S
closed T
DIM('a) = DIM('b)

goal (1 subgoal):
 1. frontier S homeomorphic frontier T
[PROOF STEP]
unfolding homeomorphic_def
[PROOF STATE]
proof (prove)
using this:
\<exists>f g. (\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x) \<and> (\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y) \<and> continuous_on S f \<and> continuous_on T g
closed S
closed T
DIM('a) = DIM('b)

goal (1 subgoal):
 1. \<exists>f g. homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
proof (clarify elim!: ex_forward)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f g. \<lbrakk>closed S; closed T; DIM('a) = DIM('b); \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
fix f g
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f g. \<lbrakk>closed S; closed T; DIM('a) = DIM('b); \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
assume S: "\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x" and T: "\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y"
     and contf: "continuous_on S f" and contg: "continuous_on T g"
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x
\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y
continuous_on S f
continuous_on T g

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>closed S; closed T; DIM('a) = DIM('b); \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x
\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y
continuous_on S f
continuous_on T g
[PROOF STEP]
have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x
\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y
continuous_on S f
continuous_on T g

goal (1 subgoal):
 1. f ` S = T &&& g ` T = S &&& inj_on f S &&& inj_on g T
[PROOF STEP]
by (auto simp: inj_on_def intro: rev_image_eqI) metis+
[PROOF STATE]
proof (state)
this:
f ` S = T
g ` T = S
inj_on f S
inj_on g T

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>closed S; closed T; DIM('a) = DIM('b); \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
have "g ` interior T \<subseteq> interior S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` interior T \<subseteq> interior S
[PROOF STEP]
using continuous_image_subset_interior [OF contg \<open>inj_on g T\<close>] dimeq gTS
[PROOF STATE]
proof (prove)
using this:
DIM('a) \<le> DIM('b) \<Longrightarrow> g ` interior T \<subseteq> interior (g ` T)
DIM('a) = DIM('b)
g ` T = S

goal (1 subgoal):
 1. g ` interior T \<subseteq> interior S
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
g ` interior T \<subseteq> interior S

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>closed S; closed T; DIM('a) = DIM('b); \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g ` interior T \<subseteq> interior S
[PROOF STEP]
have fim: "f ` frontier S \<subseteq> frontier T"
[PROOF STATE]
proof (prove)
using this:
g ` interior T \<subseteq> interior S

goal (1 subgoal):
 1. f ` frontier S \<subseteq> frontier T
[PROOF STEP]
unfolding frontier_def
[PROOF STATE]
proof (prove)
using this:
g ` interior T \<subseteq> interior S

goal (1 subgoal):
 1. f ` (closure S - interior S) \<subseteq> closure T - interior T
[PROOF STEP]
using continuous_image_subset_interior assms(2) assms(3) S
[PROOF STATE]
proof (prove)
using this:
g ` interior T \<subseteq> interior S
\<lbrakk>continuous_on ?S ?f; inj_on ?f ?S; DIM(?'b) \<le> DIM(?'a)\<rbrakk> \<Longrightarrow> ?f ` interior ?S \<subseteq> interior (?f ` ?S)
closed S
closed T
\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x

goal (1 subgoal):
 1. f ` (closure S - interior S) \<subseteq> closure T - interior T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` frontier S \<subseteq> frontier T

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>closed S; closed T; DIM('a) = DIM('b); \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
have "f ` interior S \<subseteq> interior T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` interior S \<subseteq> interior T
[PROOF STEP]
using continuous_image_subset_interior [OF contf \<open>inj_on f S\<close>] dimeq fST
[PROOF STATE]
proof (prove)
using this:
DIM('b) \<le> DIM('a) \<Longrightarrow> f ` interior S \<subseteq> interior (f ` S)
DIM('a) = DIM('b)
f ` S = T

goal (1 subgoal):
 1. f ` interior S \<subseteq> interior T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f ` interior S \<subseteq> interior T

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>closed S; closed T; DIM('a) = DIM('b); \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f ` interior S \<subseteq> interior T
[PROOF STEP]
have gim: "g ` frontier T \<subseteq> frontier S"
[PROOF STATE]
proof (prove)
using this:
f ` interior S \<subseteq> interior T

goal (1 subgoal):
 1. g ` frontier T \<subseteq> frontier S
[PROOF STEP]
unfolding frontier_def
[PROOF STATE]
proof (prove)
using this:
f ` interior S \<subseteq> interior T

goal (1 subgoal):
 1. g ` (closure T - interior T) \<subseteq> closure S - interior S
[PROOF STEP]
using continuous_image_subset_interior T assms(2) assms(3)
[PROOF STATE]
proof (prove)
using this:
f ` interior S \<subseteq> interior T
\<lbrakk>continuous_on ?S ?f; inj_on ?f ?S; DIM(?'b) \<le> DIM(?'a)\<rbrakk> \<Longrightarrow> ?f ` interior ?S \<subseteq> interior (?f ` ?S)
\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y
closed S
closed T

goal (1 subgoal):
 1. g ` (closure T - interior T) \<subseteq> closure S - interior S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g ` frontier T \<subseteq> frontier S

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>closed S; closed T; DIM('a) = DIM('b); \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
show "homeomorphism (frontier S) (frontier T) f g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homeomorphism (frontier S) (frontier T) f g
[PROOF STEP]
unfolding homeomorphism_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>frontier S. g (f x) = x) \<and> f ` frontier S = frontier T \<and> continuous_on (frontier S) f \<and> (\<forall>y\<in>frontier T. f (g y) = y) \<and> g ` frontier T = frontier S \<and> continuous_on (frontier T) g
[PROOF STEP]
proof (intro conjI ballI)
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x. x \<in> frontier S \<Longrightarrow> g (f x) = x
 2. f ` frontier S = frontier T
 3. continuous_on (frontier S) f
 4. \<And>y. y \<in> frontier T \<Longrightarrow> f (g y) = y
 5. g ` frontier T = frontier S
 6. continuous_on (frontier T) g
[PROOF STEP]
show gf: "\<And>x. x \<in> frontier S \<Longrightarrow> g (f x) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> frontier S \<Longrightarrow> g (f x) = x
[PROOF STEP]
by (simp add: S assms(2) frontier_def)
[PROOF STATE]
proof (state)
this:
?x \<in> frontier S \<Longrightarrow> g (f ?x) = ?x

goal (5 subgoals):
 1. f ` frontier S = frontier T
 2. continuous_on (frontier S) f
 3. \<And>y. y \<in> frontier T \<Longrightarrow> f (g y) = y
 4. g ` frontier T = frontier S
 5. continuous_on (frontier T) g
[PROOF STEP]
show fg: "\<And>y. y \<in> frontier T \<Longrightarrow> f (g y) = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. y \<in> frontier T \<Longrightarrow> f (g y) = y
[PROOF STEP]
by (simp add: T assms(3) frontier_def)
[PROOF STATE]
proof (state)
this:
?y \<in> frontier T \<Longrightarrow> f (g ?y) = ?y

goal (4 subgoals):
 1. f ` frontier S = frontier T
 2. continuous_on (frontier S) f
 3. g ` frontier T = frontier S
 4. continuous_on (frontier T) g
[PROOF STEP]
have "frontier T \<subseteq> f ` frontier S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frontier T \<subseteq> f ` frontier S
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> frontier T \<Longrightarrow> x \<in> f ` frontier S
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> frontier T \<Longrightarrow> x \<in> f ` frontier S
[PROOF STEP]
assume "x \<in> frontier T"
[PROOF STATE]
proof (state)
this:
x \<in> frontier T

goal (1 subgoal):
 1. \<And>x. x \<in> frontier T \<Longrightarrow> x \<in> f ` frontier S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> frontier T
[PROOF STEP]
have "g x \<in> frontier S"
[PROOF STATE]
proof (prove)
using this:
x \<in> frontier T

goal (1 subgoal):
 1. g x \<in> frontier S
[PROOF STEP]
using gim
[PROOF STATE]
proof (prove)
using this:
x \<in> frontier T
g ` frontier T \<subseteq> frontier S

goal (1 subgoal):
 1. g x \<in> frontier S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
g x \<in> frontier S

goal (1 subgoal):
 1. \<And>x. x \<in> frontier T \<Longrightarrow> x \<in> f ` frontier S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g x \<in> frontier S
[PROOF STEP]
show "x \<in> f ` frontier S"
[PROOF STATE]
proof (prove)
using this:
g x \<in> frontier S

goal (1 subgoal):
 1. x \<in> f ` frontier S
[PROOF STEP]
by (metis fg \<open>x \<in> frontier T\<close> imageI)
[PROOF STATE]
proof (state)
this:
x \<in> f ` frontier S

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
frontier T \<subseteq> f ` frontier S

goal (4 subgoals):
 1. f ` frontier S = frontier T
 2. continuous_on (frontier S) f
 3. g ` frontier T = frontier S
 4. continuous_on (frontier T) g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
frontier T \<subseteq> f ` frontier S
[PROOF STEP]
show "f ` frontier S = frontier T"
[PROOF STATE]
proof (prove)
using this:
frontier T \<subseteq> f ` frontier S

goal (1 subgoal):
 1. f ` frontier S = frontier T
[PROOF STEP]
using fim
[PROOF STATE]
proof (prove)
using this:
frontier T \<subseteq> f ` frontier S
f ` frontier S \<subseteq> frontier T

goal (1 subgoal):
 1. f ` frontier S = frontier T
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f ` frontier S = frontier T

goal (3 subgoals):
 1. continuous_on (frontier S) f
 2. g ` frontier T = frontier S
 3. continuous_on (frontier T) g
[PROOF STEP]
show "continuous_on (frontier S) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (frontier S) f
[PROOF STEP]
by (metis Diff_subset assms(2) closure_eq contf continuous_on_subset frontier_def)
[PROOF STATE]
proof (state)
this:
continuous_on (frontier S) f

goal (2 subgoals):
 1. g ` frontier T = frontier S
 2. continuous_on (frontier T) g
[PROOF STEP]
have "frontier S \<subseteq> g ` frontier T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frontier S \<subseteq> g ` frontier T
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> frontier S \<Longrightarrow> x \<in> g ` frontier T
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> frontier S \<Longrightarrow> x \<in> g ` frontier T
[PROOF STEP]
assume "x \<in> frontier S"
[PROOF STATE]
proof (state)
this:
x \<in> frontier S

goal (1 subgoal):
 1. \<And>x. x \<in> frontier S \<Longrightarrow> x \<in> g ` frontier T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> frontier S
[PROOF STEP]
have "f x \<in> frontier T"
[PROOF STATE]
proof (prove)
using this:
x \<in> frontier S

goal (1 subgoal):
 1. f x \<in> frontier T
[PROOF STEP]
using fim
[PROOF STATE]
proof (prove)
using this:
x \<in> frontier S
f ` frontier S \<subseteq> frontier T

goal (1 subgoal):
 1. f x \<in> frontier T
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f x \<in> frontier T

goal (1 subgoal):
 1. \<And>x. x \<in> frontier S \<Longrightarrow> x \<in> g ` frontier T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f x \<in> frontier T
[PROOF STEP]
show "x \<in> g ` frontier T"
[PROOF STATE]
proof (prove)
using this:
f x \<in> frontier T

goal (1 subgoal):
 1. x \<in> g ` frontier T
[PROOF STEP]
by (metis gf \<open>x \<in> frontier S\<close> imageI)
[PROOF STATE]
proof (state)
this:
x \<in> g ` frontier T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
frontier S \<subseteq> g ` frontier T

goal (2 subgoals):
 1. g ` frontier T = frontier S
 2. continuous_on (frontier T) g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
frontier S \<subseteq> g ` frontier T
[PROOF STEP]
show "g ` frontier T = frontier S"
[PROOF STATE]
proof (prove)
using this:
frontier S \<subseteq> g ` frontier T

goal (1 subgoal):
 1. g ` frontier T = frontier S
[PROOF STEP]
using gim
[PROOF STATE]
proof (prove)
using this:
frontier S \<subseteq> g ` frontier T
g ` frontier T \<subseteq> frontier S

goal (1 subgoal):
 1. g ` frontier T = frontier S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
g ` frontier T = frontier S

goal (1 subgoal):
 1. continuous_on (frontier T) g
[PROOF STEP]
show "continuous_on (frontier T) g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (frontier T) g
[PROOF STEP]
by (metis Diff_subset assms(3) closure_closed contg continuous_on_subset frontier_def)
[PROOF STATE]
proof (state)
this:
continuous_on (frontier T) g

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
homeomorphism (frontier S) (frontier T) f g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cong_add_rcancel_0_nat: "[x + a = a] (mod n) \<longleftrightarrow> [x = 0] (mod n)"
  for a x :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [x + a = a] (mod n) = [x = 0] (mod n)
[PROOF STEP]
using cong_add_rcancel_nat [of x a 0 n]
[PROOF STATE]
proof (prove)
using this:
[x + a = 0 + a] (mod n) = [x = 0] (mod n)

goal (1 subgoal):
 1. [x + a = a] (mod n) = [x = 0] (mod n)
[PROOF STEP]
by simp


[STATEMENT]
lemma sorted_wrt_insort_key_rel2:
   \<open>total_on R (insert x (set xs)) \<Longrightarrow> transp R \<Longrightarrow> x \<notin> set xs \<Longrightarrow>
    sorted_wrt R xs \<Longrightarrow> sorted_wrt R (insort_key_rel R x xs)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Restricted_Predicates.total_on R (insert x (set xs)); transp R; x \<notin> set xs; sorted_wrt R xs\<rbrakk> \<Longrightarrow> sorted_wrt R (insort_key_rel R x xs)
[PROOF STEP]
by (induction xs)
   (auto dest: transpD simp: Restricted_Predicates.total_on_def in_mono)


[STATEMENT]
lemma numeral_le_ereal_of_enat_iff[simp]: "numeral m \<le> ereal_of_enat n \<longleftrightarrow> numeral m \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (numeral m \<le> ereal_of_enat n) = (numeral m \<le> n)
[PROOF STEP]
by (cases n) (auto)


[STATEMENT]
lemma matrix_to_iarray_fst_QR_decomposition[code_unfold]:
  shows "matrix_to_iarray (fst (QR_decomposition A)) = fst (QR_decomposition_iarrays (matrix_to_iarray A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_to_iarray (fst (QR_decomposition A)) = fst (QR_decomposition_iarrays (matrix_to_iarray A))
[PROOF STEP]
proof (unfold iarray_exhaust2 list_eq_iff_nth_eq, rule conjI, auto, unfold IArray.sub_def[symmetric] IArray.length_def[symmetric])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. IArray.length (matrix_to_iarray (fst (QR_decomposition A))) = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)))
 2. \<And>i. i < IArray.length (matrix_to_iarray (fst (QR_decomposition A))) \<Longrightarrow> IArray.length (matrix_to_iarray (fst (QR_decomposition A)) !! i) = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i)
 3. \<And>i ia. \<lbrakk>i < IArray.length (matrix_to_iarray (fst (QR_decomposition A))); ia < IArray.length (matrix_to_iarray (fst (QR_decomposition A)) !! i)\<rbrakk> \<Longrightarrow> matrix_to_iarray (fst (QR_decomposition A)) !! i !! ia = fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i !! ia
[PROOF STEP]
fix i ia
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. IArray.length (matrix_to_iarray (fst (QR_decomposition A))) = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)))
 2. \<And>i. i < IArray.length (matrix_to_iarray (fst (QR_decomposition A))) \<Longrightarrow> IArray.length (matrix_to_iarray (fst (QR_decomposition A)) !! i) = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i)
 3. \<And>i ia. \<lbrakk>i < IArray.length (matrix_to_iarray (fst (QR_decomposition A))); ia < IArray.length (matrix_to_iarray (fst (QR_decomposition A)) !! i)\<rbrakk> \<Longrightarrow> matrix_to_iarray (fst (QR_decomposition A)) !! i !! ia = fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i !! ia
[PROOF STEP]
show "IArray.length (matrix_to_iarray (fst (QR_decomposition A)))
    = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)))"
    and "IArray.length (matrix_to_iarray (fst (QR_decomposition A)) !! i)
    = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i)"
    and "matrix_to_iarray (fst (QR_decomposition A)) !! i !! ia
    = fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i !! ia"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray.length (matrix_to_iarray (fst (QR_decomposition A))) = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A))) &&& IArray.length (matrix_to_iarray (fst (QR_decomposition A)) !! i) = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i) &&& matrix_to_iarray (fst (QR_decomposition A)) !! i !! ia = fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i !! ia
[PROOF STEP]
unfolding QR_decomposition_def QR_decomposition_iarrays_def Let_def fst_conv
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray.length (matrix_to_iarray (divide_by_norm (Gram_Schmidt_matrix A))) = IArray.length (divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A))) &&& IArray.length (matrix_to_iarray (divide_by_norm (Gram_Schmidt_matrix A)) !! i) = IArray.length (divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A)) !! i) &&& matrix_to_iarray (divide_by_norm (Gram_Schmidt_matrix A)) !! i !! ia = divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A)) !! i !! ia
[PROOF STEP]
unfolding matrix_to_iarray_divide_by_norm
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray.length (divide_by_norm_iarray (matrix_to_iarray (Gram_Schmidt_matrix A))) = IArray.length (divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A))) &&& IArray.length (divide_by_norm_iarray (matrix_to_iarray (Gram_Schmidt_matrix A)) !! i) = IArray.length (divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A)) !! i) &&& divide_by_norm_iarray (matrix_to_iarray (Gram_Schmidt_matrix A)) !! i !! ia = divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A)) !! i !! ia
[PROOF STEP]
unfolding matrix_to_iarray_Gram_Schmidt_matrix
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray.length (divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A))) = IArray.length (divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A))) &&& IArray.length (divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A)) !! i) = IArray.length (divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A)) !! i) &&& divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A)) !! i !! ia = divide_by_norm_iarray (Gram_Schmidt_matrix_iarrays (matrix_to_iarray A)) !! i !! ia
[PROOF STEP]
by rule+
[PROOF STATE]
proof (state)
this:
IArray.length (matrix_to_iarray (fst (QR_decomposition A))) = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)))
IArray.length (matrix_to_iarray (fst (QR_decomposition A)) !! i) = IArray.length (fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i)
matrix_to_iarray (fst (QR_decomposition A)) !! i !! ia = fst (QR_decomposition_iarrays (matrix_to_iarray A)) !! i !! ia

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma t1_space_openin_delete_alt:
   "t1_space X \<longleftrightarrow> (\<forall>U x. openin X U \<longrightarrow> openin X (U - {x}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t1_space X = (\<forall>U x. openin X U \<longrightarrow> openin X (U - {x}))
[PROOF STEP]
by (metis Diff_empty Diff_insert0 t1_space_openin_delete)


[STATEMENT]
lemma mahler_measure_ge_0: "0 \<le> mahler_measure h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> mahler_measure h
[PROOF STEP]
unfolding mahler_measure_def mahler_measure_poly_via_monic
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> cmod (lead_coeff (of_int_poly h)) * mahler_measure_monic (of_int_poly h)
[PROOF STEP]
by (simp add: mahler_measure_monic_ge_0)


[STATEMENT]
lemma lexord_eq_fusion_code:
  "lexord_eq_fusion g1 g2 s1 s2 \<longleftrightarrow>
  (list.has_next g1 s1 \<longrightarrow>
   list.has_next g2 s2 \<and>
   (let (x, s1') = list.next g1 s1;
        (y, s2') = list.next g2 s2
    in x < y \<or> \<not> y < x \<and> lexord_eq_fusion g1 g2 s1' s2'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lexord_eq_fusion g1 g2 s1 s2 = (list.has_next g1 s1 \<longrightarrow> list.has_next g2 s2 \<and> (let (x, s1') = list.next g1 s1; (y, s2') = list.next g2 s2 in x < y \<or> \<not> y < x \<and> lexord_eq_fusion g1 g2 s1' s2'))
[PROOF STEP]
unfolding lexord_eq_fusion_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lexordp_eq (list.unfoldr g1 s1) (list.unfoldr g2 s2) = (list.has_next g1 s1 \<longrightarrow> list.has_next g2 s2 \<and> (let (x, s1') = list.next g1 s1; (y, s2') = list.next g2 s2 in x < y \<or> \<not> y < x \<and> lexordp_eq (list.unfoldr g1 s1') (list.unfoldr g2 s2')))
[PROOF STEP]
by(subst (1 2) list.unfoldr.simps)(auto split: prod.split_asm)


[STATEMENT]
lemma gHom_mem:"\<lbrakk>Group F; Group G; f \<in> gHom F G ; x \<in> carrier F\<rbrakk> \<Longrightarrow>
                             (f x) \<in> carrier G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; x \<in> carrier F\<rbrakk> \<Longrightarrow> f x \<in> carrier G
[PROOF STEP]
apply (simp add:gHom_def, (erule conjE)+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; x \<in> carrier F; f \<in> extensional (carrier F); f \<in> carrier F \<rightarrow> carrier G; \<forall>x\<in>carrier F. \<forall>y\<in>carrier F. f (x \<cdot>\<^bsub>F\<^esub> y) = f x \<cdot>\<^bsub>G\<^esub> f y\<rbrakk> \<Longrightarrow> f x \<in> carrier G
[PROOF STEP]
apply (simp add:Pi_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem soundness:
  "\<turnstile> p \<Longrightarrow> semantics e f g p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> p \<Longrightarrow> semantics e f g p
[PROOF STEP]
proof (induct arbitrary: e rule: OK.induct)
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>s s' e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s); \<turnstile> concl s'; \<And>e. semantics e f g (concl s')\<rbrakk> \<Longrightarrow> semantics e f g (concl (modusponens s s'))
 2. \<And>s uu_ e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s)\<rbrakk> \<Longrightarrow> semantics e f g (concl (gen uu_ s))
 3. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 4. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 5. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 6. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 7. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 8. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 9. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 10. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
A total of 19 subgoals...
[PROOF STEP]
fix e s s'
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>s s' e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s); \<turnstile> concl s'; \<And>e. semantics e f g (concl s')\<rbrakk> \<Longrightarrow> semantics e f g (concl (modusponens s s'))
 2. \<And>s uu_ e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s)\<rbrakk> \<Longrightarrow> semantics e f g (concl (gen uu_ s))
 3. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 4. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 5. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 6. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 7. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 8. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 9. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 10. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
A total of 19 subgoals...
[PROOF STEP]
assume "semantics e f g (concl s)" "semantics e f g (concl s')" for e
[PROOF STATE]
proof (state)
this:
semantics ?e f g (concl s)
semantics ?e f g (concl s')

goal (19 subgoals):
 1. \<And>s s' e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s); \<turnstile> concl s'; \<And>e. semantics e f g (concl s')\<rbrakk> \<Longrightarrow> semantics e f g (concl (modusponens s s'))
 2. \<And>s uu_ e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s)\<rbrakk> \<Longrightarrow> semantics e f g (concl (gen uu_ s))
 3. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 4. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 5. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 6. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 7. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 8. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 9. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 10. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
A total of 19 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
semantics ?e f g (concl s)
semantics ?e f g (concl s')
[PROOF STEP]
show "semantics e f g (concl (modusponens s s'))"
[PROOF STATE]
proof (prove)
using this:
semantics ?e f g (concl s)
semantics ?e f g (concl s')

goal (1 subgoal):
 1. semantics e f g (concl (modusponens s s'))
[PROOF STEP]
unfolding modusponens_def
[PROOF STATE]
proof (prove)
using this:
semantics ?e f g (concl s)
semantics ?e f g (concl s')

goal (1 subgoal):
 1. semantics e f g (concl (case concl s of Imp p q \<Rightarrow> let p' = concl s' in if fol_equal p p' then Thm q else Thm Truth | _ \<Rightarrow> Thm Truth))
[PROOF STEP]
proof (cases s)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<And>e. semantics e f g (concl s); \<And>e. semantics e f g (concl s'); s = Thm x\<rbrakk> \<Longrightarrow> semantics e f g (concl (case concl s of Imp p q \<Rightarrow> let p' = concl s' in if fol_equal p p' then Thm q else Thm Truth | _ \<Rightarrow> Thm Truth))
[PROOF STEP]
fix r
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<And>e. semantics e f g (concl s); \<And>e. semantics e f g (concl s'); s = Thm x\<rbrakk> \<Longrightarrow> semantics e f g (concl (case concl s of Imp p q \<Rightarrow> let p' = concl s' in if fol_equal p p' then Thm q else Thm Truth | _ \<Rightarrow> Thm Truth))
[PROOF STEP]
assume "semantics e f g (concl s)" "semantics e f g (concl s')" "s = Thm r" for e
[PROOF STATE]
proof (state)
this:
semantics ?e f g (concl s)
semantics ?e f g (concl s')
s = Thm r

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<And>e. semantics e f g (concl s); \<And>e. semantics e f g (concl s'); s = Thm x\<rbrakk> \<Longrightarrow> semantics e f g (concl (case concl s of Imp p q \<Rightarrow> let p' = concl s' in if fol_equal p p' then Thm q else Thm Truth | _ \<Rightarrow> Thm Truth))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
semantics ?e f g (concl s)
semantics ?e f g (concl s')
s = Thm r
[PROOF STEP]
show "semantics e f g (concl (case (concl s) of Imp p q \<Rightarrow>
        let p' = concl s' in if fol_equal p p' then Thm q else fail_thm | _ \<Rightarrow> fail_thm))"
[PROOF STATE]
proof (prove)
using this:
semantics ?e f g (concl s)
semantics ?e f g (concl s')
s = Thm r

goal (1 subgoal):
 1. semantics e f g (concl (case concl s of Imp p q \<Rightarrow> let p' = concl s' in if fol_equal p p' then Thm q else Thm Truth | _ \<Rightarrow> Thm Truth))
[PROOF STEP]
unfolding fol_equal_def
[PROOF STATE]
proof (prove)
using this:
semantics ?e f g (concl s)
semantics ?e f g (concl s')
s = Thm r

goal (1 subgoal):
 1. semantics e f g (concl (case concl s of Imp p q \<Rightarrow> let p' = concl s' in if p = p' then Thm q else Thm Truth | _ \<Rightarrow> Thm Truth))
[PROOF STEP]
by (cases r) simp_all
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (case concl s of Imp p q \<Rightarrow> let p' = concl s' in if fol_equal p p' then Thm q else Thm Truth | _ \<Rightarrow> Thm Truth))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (modusponens s s'))

goal (18 subgoals):
 1. \<And>s uu_ e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s)\<rbrakk> \<Longrightarrow> semantics e f g (concl (gen uu_ s))
 2. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 3. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 4. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 5. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 6. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 7. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 8. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 9. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 10. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
A total of 18 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>s uu_ e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s)\<rbrakk> \<Longrightarrow> semantics e f g (concl (gen uu_ s))
 2. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 3. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 4. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 5. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 6. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 7. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 8. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 9. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 10. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
A total of 18 subgoals...
[PROOF STEP]
fix e x s
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>s uu_ e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s)\<rbrakk> \<Longrightarrow> semantics e f g (concl (gen uu_ s))
 2. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 3. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 4. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 5. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 6. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 7. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 8. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 9. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 10. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
A total of 18 subgoals...
[PROOF STEP]
assume "semantics e f g (concl s)" for e
[PROOF STATE]
proof (state)
this:
semantics ?e f g (concl s)

goal (18 subgoals):
 1. \<And>s uu_ e. \<lbrakk>\<turnstile> concl s; \<And>e. semantics e f g (concl s)\<rbrakk> \<Longrightarrow> semantics e f g (concl (gen uu_ s))
 2. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 3. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 4. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 5. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 6. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 7. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 8. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 9. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 10. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
A total of 18 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
semantics ?e f g (concl s)
[PROOF STEP]
show "semantics e f g (concl (gen x s))"
[PROOF STATE]
proof (prove)
using this:
semantics ?e f g (concl s)

goal (1 subgoal):
 1. semantics e f g (concl (gen x s))
[PROOF STEP]
unfolding gen_def
[PROOF STATE]
proof (prove)
using this:
semantics ?e f g (concl s)

goal (1 subgoal):
 1. semantics e f g (concl (Thm (Forall x (concl s))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (gen x s))

goal (17 subgoals):
 1. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 2. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 3. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 4. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 5. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 6. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 7. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 8. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 9. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 10. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
A total of 17 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 2. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 3. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 4. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 5. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 6. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 7. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 8. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 9. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 10. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
A total of 17 subgoals...
[PROOF STEP]
fix e p q
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>uv_ uw_ e. semantics e f g (concl (axiom_addimp uv_ uw_))
 2. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 3. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 4. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 5. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 6. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 7. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 8. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 9. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 10. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
A total of 17 subgoals...
[PROOF STEP]
show "semantics e f g (concl (axiom_addimp p q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_addimp p q))
[PROOF STEP]
unfolding axiom_addimp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Imp p (Imp q p))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_addimp p q))

goal (16 subgoals):
 1. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 2. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 3. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 4. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 5. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 6. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 7. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 8. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 9. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 10. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
A total of 16 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (16 subgoals):
 1. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 2. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 3. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 4. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 5. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 6. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 7. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 8. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 9. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 10. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
A total of 16 subgoals...
[PROOF STEP]
fix e p q r
[PROOF STATE]
proof (state)
goal (16 subgoals):
 1. \<And>ux_ uy_ uz_ e. semantics e f g (concl (axiom_distribimp ux_ uy_ uz_))
 2. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 3. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 4. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 5. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 6. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 7. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 8. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 9. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 10. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
A total of 16 subgoals...
[PROOF STEP]
show "semantics e f g (concl (axiom_distribimp p q r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_distribimp p q r))
[PROOF STEP]
unfolding axiom_distribimp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Imp (Imp p (Imp q r)) (Imp (Imp p q) (Imp p r)))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_distribimp p q r))

goal (15 subgoals):
 1. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 2. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 3. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 4. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 5. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 6. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 7. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 8. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 9. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 10. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
A total of 15 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (15 subgoals):
 1. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 2. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 3. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 4. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 5. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 6. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 7. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 8. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 9. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 10. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
A total of 15 subgoals...
[PROOF STEP]
fix e g p
[PROOF STATE]
proof (state)
goal (15 subgoals):
 1. \<And>va_ e. semantics e f g (concl (axiom_doubleneg va_))
 2. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 3. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 4. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 5. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 6. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 7. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 8. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 9. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 10. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
A total of 15 subgoals...
[PROOF STEP]
show "semantics e f g (concl (axiom_doubleneg p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_doubleneg p))
[PROOF STEP]
unfolding axiom_doubleneg_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Imp (Imp (Imp p Falsity) Falsity) p)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_doubleneg p))

goal (14 subgoals):
 1. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 2. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 3. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 4. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 5. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 6. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 7. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 8. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 9. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 10. \<And>e. semantics e f g (concl axiom_true)
A total of 14 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (14 subgoals):
 1. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 2. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 3. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 4. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 5. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 6. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 7. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 8. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 9. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 10. \<And>e. semantics e f g (concl axiom_true)
A total of 14 subgoals...
[PROOF STEP]
fix e x p q
[PROOF STATE]
proof (state)
goal (14 subgoals):
 1. \<And>vb_ vc_ vd_ e. semantics e f g (concl (axiom_allimp vb_ vc_ vd_))
 2. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 3. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 4. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 5. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 6. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 7. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 8. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 9. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 10. \<And>e. semantics e f g (concl axiom_true)
A total of 14 subgoals...
[PROOF STEP]
show "semantics e f g (concl (axiom_allimp x p q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_allimp x p q))
[PROOF STEP]
unfolding axiom_allimp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Imp (Forall x (Imp p q)) (Imp (Forall x p) (Forall x q)))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_allimp x p q))

goal (13 subgoals):
 1. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 2. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 3. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 4. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 5. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 6. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 7. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 8. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 9. \<And>e. semantics e f g (concl axiom_true)
 10. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
A total of 13 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (13 subgoals):
 1. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 2. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 3. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 4. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 5. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 6. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 7. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 8. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 9. \<And>e. semantics e f g (concl axiom_true)
 10. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
A total of 13 subgoals...
[PROOF STEP]
fix e x p
[PROOF STATE]
proof (state)
goal (13 subgoals):
 1. \<And>ve_ vf_ e. semantics e f g (concl (axiom_impall ve_ vf_))
 2. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 3. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 4. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 5. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 6. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 7. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 8. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 9. \<And>e. semantics e f g (concl axiom_true)
 10. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
A total of 13 subgoals...
[PROOF STEP]
show "semantics e f g (concl (axiom_impall x p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_impall x p))
[PROOF STEP]
unfolding axiom_impall_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (if \<not> free_in x p then Thm (Imp p (Forall x p)) else Thm Truth))
[PROOF STEP]
using map
[PROOF STATE]
proof (prove)
using this:
\<not> free_in ?x ?p \<Longrightarrow> semantics ?e ?f ?g ?p = semantics (?e(?x := ?v)) ?f ?g ?p

goal (1 subgoal):
 1. semantics e f g (concl (if \<not> free_in x p then Thm (Imp p (Forall x p)) else Thm Truth))
[PROOF STEP]
by simp iprover
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_impall x p))

goal (12 subgoals):
 1. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 2. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 3. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 4. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 5. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 6. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 7. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 8. \<And>e. semantics e f g (concl axiom_true)
 9. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 10. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
A total of 12 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (12 subgoals):
 1. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 2. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 3. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 4. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 5. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 6. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 7. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 8. \<And>e. semantics e f g (concl axiom_true)
 9. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 10. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
A total of 12 subgoals...
[PROOF STEP]
fix e x t
[PROOF STATE]
proof (state)
goal (12 subgoals):
 1. \<And>vg_ vh_ e. semantics e f g (concl (axiom_existseq vg_ vh_))
 2. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 3. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 4. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 5. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 6. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 7. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 8. \<And>e. semantics e f g (concl axiom_true)
 9. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 10. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
A total of 12 subgoals...
[PROOF STEP]
show "semantics e f g (concl (axiom_existseq x t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_existseq x t))
[PROOF STEP]
unfolding axiom_existseq_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (if \<not> occurs_in x t then Thm (Exists x (Atom (Rl STR ''='' [Var x, t]))) else Thm Truth))
[PROOF STEP]
using map'(1) length2_def
[PROOF STATE]
proof (prove)
using this:
\<not> occurs_in ?x ?t \<Longrightarrow> semantics_term ?e ?f ?t = semantics_term (?e(?x := ?v)) ?f ?t
length2 ?l \<equiv> case ?l of [] \<Rightarrow> False | [x] \<Rightarrow> False | [x, xa] \<Rightarrow> True | x # xa # ab # list \<Rightarrow> False

goal (1 subgoal):
 1. semantics e f g (concl (if \<not> occurs_in x t then Thm (Exists x (Atom (Rl STR ''='' [Var x, t]))) else Thm Truth))
[PROOF STEP]
by simp iprover
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_existseq x t))

goal (11 subgoals):
 1. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 2. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 3. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 4. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 5. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 6. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 7. \<And>e. semantics e f g (concl axiom_true)
 8. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 9. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 10. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
A total of 11 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (11 subgoals):
 1. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 2. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 3. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 4. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 5. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 6. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 7. \<And>e. semantics e f g (concl axiom_true)
 8. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 9. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 10. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
A total of 11 subgoals...
[PROOF STEP]
fix e t
[PROOF STATE]
proof (state)
goal (11 subgoals):
 1. \<And>vi_ e. semantics e f g (concl (axiom_eqrefl vi_))
 2. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 3. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 4. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 5. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 6. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 7. \<And>e. semantics e f g (concl axiom_true)
 8. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 9. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 10. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
A total of 11 subgoals...
[PROOF STEP]
show "semantics e f g (concl (axiom_eqrefl t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_eqrefl t))
[PROOF STEP]
unfolding axiom_eqrefl_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Atom (Rl STR ''='' [t, t]))))
[PROOF STEP]
using length2_def
[PROOF STATE]
proof (prove)
using this:
length2 ?l \<equiv> case ?l of [] \<Rightarrow> False | [x] \<Rightarrow> False | [x, xa] \<Rightarrow> True | x # xa # ab # list \<Rightarrow> False

goal (1 subgoal):
 1. semantics e f g (concl (Thm (Atom (Rl STR ''='' [t, t]))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_eqrefl t))

goal (10 subgoals):
 1. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 2. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 3. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 4. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 5. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 6. \<And>e. semantics e f g (concl axiom_true)
 7. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 8. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 9. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 10. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (10 subgoals):
 1. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 2. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 3. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 4. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 5. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 6. \<And>e. semantics e f g (concl axiom_true)
 7. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 8. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 9. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 10. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e i l l'
[PROOF STATE]
proof (state)
goal (10 subgoals):
 1. \<And>vj_ vk_ vl_ e. semantics e f g (concl (axiom_funcong vj_ vk_ vl_))
 2. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 3. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 4. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 5. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 6. \<And>e. semantics e f g (concl axiom_true)
 7. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 8. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 9. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 10. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_funcong i l l'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_funcong i l l'))
[PROOF STEP]
unfolding axiom_funcong_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (if equal_length l l' then Thm (foldr Imp (zip_eq l l') (Atom (Rl STR ''='' [Fn i l, Fn i l']))) else Thm Truth))
[PROOF STEP]
using funcong
[PROOF STATE]
proof (prove)
using this:
equal_length ?l ?l' \<Longrightarrow> semantics ?e ?f ?g (foldr Imp (zip_eq ?l ?l') (Atom (Rl STR ''='' [Fn ?i ?l, Fn ?i ?l'])))

goal (1 subgoal):
 1. semantics e f g (concl (if equal_length l l' then Thm (foldr Imp (zip_eq l l') (Atom (Rl STR ''='' [Fn i l, Fn i l']))) else Thm Truth))
[PROOF STEP]
by simp standard
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_funcong i l l'))

goal (9 subgoals):
 1. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 2. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 3. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 4. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 5. \<And>e. semantics e f g (concl axiom_true)
 6. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 7. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 8. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 9. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (9 subgoals):
 1. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 2. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 3. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 4. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 5. \<And>e. semantics e f g (concl axiom_true)
 6. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 7. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 8. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 9. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e i l l'
[PROOF STATE]
proof (state)
goal (9 subgoals):
 1. \<And>vm_ vn_ vo_ e. semantics e f g (concl (axiom_predcong vm_ vn_ vo_))
 2. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 3. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 4. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 5. \<And>e. semantics e f g (concl axiom_true)
 6. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 7. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 8. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 9. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_predcong i l l'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_predcong i l l'))
[PROOF STEP]
unfolding axiom_predcong_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (if equal_length l l' then Thm (foldr Imp (zip_eq l l') (Imp (Atom (Rl i l)) (Atom (Rl i l')))) else Thm Truth))
[PROOF STEP]
using predcong
[PROOF STATE]
proof (prove)
using this:
equal_length ?l ?l' \<Longrightarrow> semantics ?e ?f ?g (foldr Imp (zip_eq ?l ?l') (Imp (Atom (Rl ?i ?l)) (Atom (Rl ?i ?l'))))

goal (1 subgoal):
 1. semantics e f g (concl (if equal_length l l' then Thm (foldr Imp (zip_eq l l') (Imp (Atom (Rl i l)) (Atom (Rl i l')))) else Thm Truth))
[PROOF STEP]
by simp standard
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_predcong i l l'))

goal (8 subgoals):
 1. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 2. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 3. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 4. \<And>e. semantics e f g (concl axiom_true)
 5. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 6. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 7. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 8. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 2. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 3. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 4. \<And>e. semantics e f g (concl axiom_true)
 5. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 6. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 7. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 8. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e p q
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>vp_ vq_ e. semantics e f g (concl (axiom_iffimp1 vp_ vq_))
 2. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 3. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 4. \<And>e. semantics e f g (concl axiom_true)
 5. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 6. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 7. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 8. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_iffimp1 p q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_iffimp1 p q))
[PROOF STEP]
unfolding axiom_iffimp1_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Imp (Iff p q) (Imp p q))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_iffimp1 p q))

goal (7 subgoals):
 1. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 2. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 3. \<And>e. semantics e f g (concl axiom_true)
 4. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 5. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 6. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 7. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 2. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 3. \<And>e. semantics e f g (concl axiom_true)
 4. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 5. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 6. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 7. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e p q
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>vr_ vs_ e. semantics e f g (concl (axiom_iffimp2 vr_ vs_))
 2. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 3. \<And>e. semantics e f g (concl axiom_true)
 4. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 5. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 6. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 7. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_iffimp2 p q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_iffimp2 p q))
[PROOF STEP]
unfolding axiom_iffimp2_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Imp (Iff p q) (Imp q p))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_iffimp2 p q))

goal (6 subgoals):
 1. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 2. \<And>e. semantics e f g (concl axiom_true)
 3. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 4. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 5. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 6. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 2. \<And>e. semantics e f g (concl axiom_true)
 3. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 4. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 5. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 6. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e p q
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>vt_ vu_ e. semantics e f g (concl (axiom_impiff vt_ vu_))
 2. \<And>e. semantics e f g (concl axiom_true)
 3. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 4. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 5. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 6. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_impiff p q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_impiff p q))
[PROOF STEP]
unfolding axiom_impiff_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Imp (Imp p q) (Imp (Imp q p) (Iff p q)))))
[PROOF STEP]
by (simp add: iffI)
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_impiff p q))

goal (5 subgoals):
 1. \<And>e. semantics e f g (concl axiom_true)
 2. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 3. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 4. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 5. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>e. semantics e f g (concl axiom_true)
 2. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 3. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 4. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 5. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>e. semantics e f g (concl axiom_true)
 2. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 3. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 4. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 5. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_true))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl axiom_true)
[PROOF STEP]
unfolding axiom_true_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Iff Truth (Imp Falsity Falsity))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl axiom_true)

goal (4 subgoals):
 1. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 2. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 3. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 4. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 2. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 3. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 4. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e p
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>vv_ e. semantics e f g (concl (axiom_not vv_))
 2. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 3. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 4. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_not p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_not p))
[PROOF STEP]
unfolding axiom_not_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Iff (fm.Not p) (Imp p Falsity))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_not p))

goal (3 subgoals):
 1. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 2. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 3. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 2. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 3. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e p q
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>vw_ vx_ e. semantics e f g (concl (axiom_and vw_ vx_))
 2. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 3. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_and p q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_and p q))
[PROOF STEP]
unfolding axiom_and_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Iff (And p q) (Imp (Imp p (Imp q Falsity)) Falsity))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_and p q))

goal (2 subgoals):
 1. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 2. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 2. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e p q
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>vy_ vz_ e. semantics e f g (concl (axiom_or vy_ vz_))
 2. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_or p q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_or p q))
[PROOF STEP]
unfolding axiom_or_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Iff (Or p q) (fm.Not (And (fm.Not p) (fm.Not q))))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_or p q))

goal (1 subgoal):
 1. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
fix e x p
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>wa_ wb_ e. semantics e f g (concl (axiom_exists wa_ wb_))
[PROOF STEP]
show "semantics e f g (concl (axiom_exists x p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (axiom_exists x p))
[PROOF STEP]
unfolding axiom_exists_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semantics e f g (concl (Thm (Iff (Exists x p) (fm.Not (Forall x (fm.Not p))))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
semantics e f g (concl (axiom_exists x p))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eSuc_Sup: "A \<noteq> {} \<Longrightarrow> eSuc (Sup A) = Sup (eSuc ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<noteq> {} \<Longrightarrow> eSuc (Sup A) = Sup (eSuc ` A)
[PROOF STEP]
by(auto simp add: Sup_enat_def eSuc_Max inj_on_def dest: finite_imageD)


[STATEMENT]
lemma trace_proj_pos_real:
  assumes "projector (P::complex Matrix.mat)"
  and "Complex_Matrix.positive R"
  and "P \<in> carrier_mat n n"
  and "R\<in> carrier_mat n n"
shows "Re (Complex_Matrix.trace (R * P)) = Complex_Matrix.trace (R * P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (Re (Complex_Matrix.trace (R * P))) = Complex_Matrix.trace (R * P)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. complex_of_real (Re (Complex_Matrix.trace (R * P))) = Complex_Matrix.trace (R * P)
[PROOF STEP]
have "Complex_Matrix.trace (R * P) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> Complex_Matrix.trace (R * P)
[PROOF STEP]
using assms  positive_proj_trace
[PROOF STATE]
proof (prove)
using this:
projector P
Complex_Matrix.positive R
P \<in> carrier_mat n n
R \<in> carrier_mat n n
\<lbrakk>projector ?P; Complex_Matrix.positive ?R; ?P \<in> carrier_mat ?n ?n; ?R \<in> carrier_mat ?n ?n\<rbrakk> \<Longrightarrow> 0 \<le> Complex_Matrix.trace (?R * ?P)

goal (1 subgoal):
 1. 0 \<le> Complex_Matrix.trace (R * P)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> Complex_Matrix.trace (R * P)

goal (1 subgoal):
 1. complex_of_real (Re (Complex_Matrix.trace (R * P))) = Complex_Matrix.trace (R * P)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
0 \<le> Complex_Matrix.trace (R * P)

goal (1 subgoal):
 1. complex_of_real (Re (Complex_Matrix.trace (R * P))) = Complex_Matrix.trace (R * P)
[PROOF STEP]
by (simp add: complex_eqI less_eq_complex_def)
[PROOF STATE]
proof (state)
this:
complex_of_real (Re (Complex_Matrix.trace (R * P))) = Complex_Matrix.trace (R * P)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vars_fund_sym_step_coeff: "vars (fund_sym_step_coeff p) \<subseteq> vars p - A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vars (local.fund_sym_step_coeff p) \<subseteq> vars p - A
[PROOF STEP]
unfolding fund_sym_step_coeff_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vars (MPoly_Type.monom (restrictpm (- A) (lead_monom p)) (Symmetric_Polynomials.lead_coeff p)) \<subseteq> vars p - A
[PROOF STEP]
using keys_lead_monom_subset[of p]
[PROOF STATE]
proof (prove)
using this:
keys (lead_monom p) \<subseteq> vars p

goal (1 subgoal):
 1. vars (MPoly_Type.monom (restrictpm (- A) (lead_monom p)) (Symmetric_Polynomials.lead_coeff p)) \<subseteq> vars p - A
[PROOF STEP]
by (intro order.trans[OF vars_monom_subset]) auto


[STATEMENT]
lemma prod_gcd_lcm_int: "\<bar>m\<bar> * \<bar>n\<bar> = gcd m n * lcm m n"
  for m n :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>m\<bar> * \<bar>n\<bar> = gcd m n * lcm m n
[PROOF STEP]
by (simp add: lcm_gcd abs_div abs_mult)


[STATEMENT]
lemma mat_adj_mult_sm [simp]:
  shows "mat_adj (k *\<^sub>s\<^sub>m A) = cnj k *\<^sub>s\<^sub>m mat_adj A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_adj (k *\<^sub>s\<^sub>m A) = cnj k *\<^sub>s\<^sub>m mat_adj A
[PROOF STEP]
by (cases A) (auto simp add: mat_adj_def mat_cnj_def)


[STATEMENT]
lemma eventually_at_right_real: "a < (b :: real) \<Longrightarrow> eventually (\<lambda>x. x \<in> {a<..<b}) (at_right a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a < b \<Longrightarrow> \<forall>\<^sub>F x in at_right a. x \<in> {a<..<b}
[PROOF STEP]
by (subst eventually_at, rule exI[of _ "b - a"]) (force simp: dist_real_def)


[STATEMENT]
lemma fds_nth_norm_mult_le:
  shows "norm (fds_nth (f * g) n) \<le> fds_nth (fds_norm f * fds_norm g) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (fds_nth (f * g) n) \<le> fds_nth (fds_norm f * fds_norm g) n
[PROOF STEP]
by (auto simp add: fds_nth_mult dirichlet_prod_def norm_mult intro!: sum_norm_le)


[STATEMENT]
lemma map_compose: "map(f o g)(xs) = map f (map g xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SList.map (f \<circ> g) xs = SList.map f (SList.map g xs)
[PROOF STEP]
apply (simp add: o_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SList.map (\<lambda>x. f (g x)) xs = SList.map f (SList.map g xs)
[PROOF STEP]
apply (induct xs rule: list_induct)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. SList.map (\<lambda>x. f (g x)) [] = SList.map f (SList.map g [])
 2. \<And>x xs. SList.map (\<lambda>x. f (g x)) xs = SList.map f (SList.map g xs) \<Longrightarrow> SList.map (\<lambda>x. f (g x)) (x # xs) = SList.map f (SList.map g (x # xs))
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma mult_vec_distrib_left: "r ** (p + q) = r ** p + r ** q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r ** (p + q) = r ** p + r ** q
[PROOF STEP]
by (rule poly_mapping_eqI_proj, simp add: algebra_simps proj_plus term_simps)


[STATEMENT]
lemma oprod_Total: "\<lbrakk>Total r; Total r'\<rbrakk> \<Longrightarrow> Total (r *o r')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Total r; Total r'\<rbrakk> \<Longrightarrow> Total (r *o r')
[PROOF STEP]
unfolding total_on_def Field_oprod
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>Field r. \<forall>y\<in>Field r. x \<noteq> y \<longrightarrow> (x, y) \<in> r \<or> (y, x) \<in> r; \<forall>x\<in>Field r'. \<forall>y\<in>Field r'. x \<noteq> y \<longrightarrow> (x, y) \<in> r' \<or> (y, x) \<in> r'\<rbrakk> \<Longrightarrow> \<forall>x\<in>Field r \<times> Field r'. \<forall>y\<in>Field r \<times> Field r'. x \<noteq> y \<longrightarrow> (x, y) \<in> r *o r' \<or> (y, x) \<in> r *o r'
[PROOF STEP]
unfolding oprod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>Field r. \<forall>y\<in>Field r. x \<noteq> y \<longrightarrow> (x, y) \<in> r \<or> (y, x) \<in> r; \<forall>x\<in>Field r'. \<forall>y\<in>Field r'. x \<noteq> y \<longrightarrow> (x, y) \<in> r' \<or> (y, x) \<in> r'\<rbrakk> \<Longrightarrow> \<forall>x\<in>Field r \<times> Field r'. \<forall>y\<in>Field r \<times> Field r'. x \<noteq> y \<longrightarrow> (x, y) \<in> {((x1, y1), x2, y2). (y1, y2) \<in> r' - Id \<and> x1 \<in> Field r \<and> x2 \<in> Field r \<or> (y1, y2) \<in> Restr Id (Field r') \<and> (x1, x2) \<in> r} \<or> (y, x) \<in> {((x1, y1), x2, y2). (y1, y2) \<in> r' - Id \<and> x1 \<in> Field r \<and> x2 \<in> Field r \<or> (y1, y2) \<in> Restr Id (Field r') \<and> (x1, x2) \<in> r}
[PROOF STEP]
by auto


[STATEMENT]
lemma Join_least [intro?]: "(\<And>a. a \<in> A \<Longrightarrow> a \<sqsubseteq> x) \<Longrightarrow> \<Squnion>A \<sqsubseteq> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a. a \<in> A \<Longrightarrow> a \<sqsubseteq> x) \<Longrightarrow> \<Squnion>A \<sqsubseteq> x
[PROOF STEP]
by (rule is_Sup_least, rule is_Sup_Join) blast


[STATEMENT]
lemma semialg_graph:
  assumes "is_semialg_function n f"
  shows "is_semialgebraic (n + 1) (graph n f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_semialgebraic (n + 1) (graph n f)
[PROOF STEP]
using assms graph_as_partial_pullback[of f n]
[PROOF STATE]
proof (prove)
using this:
is_semialg_function n f
f \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>) \<rightarrow> carrier Q\<^sub>p \<Longrightarrow> partial_pullback n f 1 (\<Delta>  1) = graph n f

goal (1 subgoal):
 1. is_semialgebraic (n + 1) (graph n f)
[PROOF STEP]
unfolding is_semialg_function_def
[PROOF STATE]
proof (prove)
using this:
f \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>) \<rightarrow> carrier Q\<^sub>p \<and> (\<forall>l\<ge>0. \<forall>S\<in>semialg_sets (1 + l). is_semialgebraic (n + l) (partial_pullback n f l S))
f \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>) \<rightarrow> carrier Q\<^sub>p \<Longrightarrow> partial_pullback n f 1 (\<Delta>  1) = graph n f

goal (1 subgoal):
 1. is_semialgebraic (n + 1) (graph n f)
[PROOF STEP]
by (metis diag_is_semialgebraic is_semialgebraicE less_imp_le_nat less_numeral_extra(1))