[STATEMENT]
lemma well_ord_Sadjunction:"\<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D;
      \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X)\<rbrakk> \<Longrightarrow> Worder (SIod D (X \<union> {a}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X)\<rbrakk> \<Longrightarrow> Worder (SIod D (X \<union> {a}))
[PROOF STEP]
apply (frule insert_sub[of "X" "carrier D" "a"], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); insert a X \<subseteq> carrier D\<rbrakk> \<Longrightarrow> Worder (SIod D (X \<union> {a}))
[PROOF STEP]
apply (subst Worder_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); insert a X \<subseteq> carrier D\<rbrakk> \<Longrightarrow> Torder (SIod D (X \<union> {a})) \<and> Worder_axioms (SIod D (X \<union> {a}))
[PROOF STEP]
apply (simp add:SIod_Order)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X)\<rbrakk> \<Longrightarrow> Torder (SIod D (insert a X)) \<and> Worder_axioms (SIod D (insert a X))
[PROOF STEP]
apply (frule Torder_Sadjunction[of D X a], assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X)\<rbrakk> \<Longrightarrow> Torder (SIod D X)
 2. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Torder (SIod D (X \<union> {a}))\<rbrakk> \<Longrightarrow> Torder (SIod D (insert a X)) \<and> Worder_axioms (SIod D (insert a X))
[PROOF STEP]
apply (simp add:Worder.Torder)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Torder (SIod D (X \<union> {a}))\<rbrakk> \<Longrightarrow> Torder (SIod D (insert a X)) \<and> Worder_axioms (SIod D (insert a X))
[PROOF STEP]
apply (simp add:Torder_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)) \<and> Torder_axioms (SIod D (insert a X))\<rbrakk> \<Longrightarrow> Worder_axioms (SIod D (insert a X))
[PROOF STEP]
apply (subst Worder_axioms_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)) \<and> Torder_axioms (SIod D (insert a X))\<rbrakk> \<Longrightarrow> \<forall>Xa. Xa \<subseteq> carrier (SIod D (insert a X)) \<and> Xa \<noteq> {} \<longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (rule allI, rule impI, erule conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> carrier (SIod D (insert a X)) \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X))\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (simp add:SIod_carrier)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X))\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (cut_tac insert_inc1[of "X" "a"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (case_tac "Xa \<subseteq> X")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (simp only:Worder_def, (erule conjE)+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X; Torder (SIod D X); Worder_axioms (SIod D X); Xa \<subseteq> insert a X; Xa \<noteq> {}\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (
        simp only:Worder_axioms_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X; Torder (SIod D X); \<forall>Xa. Xa \<subseteq> carrier (SIod D X) \<and> Xa \<noteq> {} \<longrightarrow> (\<exists>x. minimum_elem (SIod D X) Xa x); Xa \<subseteq> insert a X; Xa \<noteq> {}\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (frule_tac a = Xa in forall_spec,
        thin_tac "\<forall>Xa. Xa \<subseteq> carrier (SIod D X) \<and> Xa \<noteq> {} \<longrightarrow>
               (\<exists>x. minimum_elem (SIod D X) Xa x)",
        simp add:SIod_carrier)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X; Torder (SIod D X); \<forall>Xa. Xa \<subseteq> carrier (SIod D X) \<and> Xa \<noteq> {} \<longrightarrow> (\<exists>x. minimum_elem (SIod D X) Xa x); Xa \<subseteq> insert a X; Xa \<noteq> {}; \<exists>x. minimum_elem (SIod D X) Xa x\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (thin_tac "\<forall>Xa. Xa \<subseteq> carrier (SIod D X) \<and> Xa \<noteq> {} \<longrightarrow>
               (\<exists>x. minimum_elem (SIod D X) Xa x)",
        erule exE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X; Torder (SIod D X); Xa \<subseteq> insert a X; Xa \<noteq> {}; minimum_elem (SIod D X) Xa x\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (frule_tac X = Xa and a = x in minimum_elem_Ssub[of
         "SIod D (insert a X)" "X"])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X; Torder (SIod D X); Xa \<subseteq> insert a X; Xa \<noteq> {}; minimum_elem (SIod D X) Xa x\<rbrakk> \<Longrightarrow> X \<subseteq> carrier (SIod D (insert a X))
 2. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X; Torder (SIod D X); Xa \<subseteq> insert a X; Xa \<noteq> {}; minimum_elem (SIod D X) Xa x\<rbrakk> \<Longrightarrow> Xa \<subseteq> X
 3. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X; Torder (SIod D X); Xa \<subseteq> insert a X; Xa \<noteq> {}; minimum_elem (SIod D X) Xa x; minimum_elem (SIod D (insert a X)) Xa x = minimum_elem (SIod (SIod D (insert a X)) X) Xa x\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 4. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (cut_tac insert_inc1[of "X" "a"], simp add:SIod_carrier, assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; Xa \<subseteq> X; Torder (SIod D X); Xa \<subseteq> insert a X; Xa \<noteq> {}; minimum_elem (SIod D X) Xa x; minimum_elem (SIod D (insert a X)) Xa x = minimum_elem (SIod (SIod D (insert a X)) X) Xa x\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (cut_tac insert_inc1[of "X" "a"],
        simp add:SIod_sub_sub)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); Xa \<subseteq> X; Torder (SIod D X); Xa \<subseteq> insert a X; Xa \<noteq> {}; minimum_elem (SIod D X) Xa x; minimum_elem (SIod D (insert a X)) Xa x; X \<subseteq> insert a X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Xa \<subseteq> insert a X \<and> Xa \<noteq> {}; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (erule conjE, frule_tac A = Xa in insert_diff[of _ "a" "X"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (case_tac "Xa - {a} = {}")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X; Xa - {a} = {}\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X; Xa - {a} \<noteq> {}\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (frule_tac A = Xa in nonempty_ex, erule exE, simp,
        frule_tac c = x and A = Xa and B = "{a}" in subsetD, assumption+,
        simp,
        frule_tac A = Xa in singleton_sub[of "a"],
        frule_tac A = Xa and B = "{a}" in equalityI, assumption+, simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; a \<notin> X; x = a; Xa = {a}\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) {a})
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X; Xa - {a} \<noteq> {}\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (simp add:minimum_elem_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; a \<notin> X; x = a; Xa = {a}\<rbrakk> \<Longrightarrow> a \<preceq>\<^bsub>SIod D (insert a X)\<^esub> a
 2. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X; Xa - {a} \<noteq> {}\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (cut_tac insert_inc2[of "a" "X"],
        simp add:SIod_le Order.le_refl)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Worder (SIod D X); Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X; Xa - {a} \<noteq> {}\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (simp only:Worder_def, (erule conjE)+,
        simp only:Worder_axioms_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X; Xa - {a} \<noteq> {}; Torder (SIod D X); \<forall>Xa. Xa \<subseteq> carrier (SIod D X) \<and> Xa \<noteq> {} \<longrightarrow> (\<exists>x. minimum_elem (SIod D X) Xa x)\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (frule_tac a = "Xa - {a}" in forall_spec,
        thin_tac "\<forall>Xa. Xa \<subseteq> carrier (SIod D X) \<and> Xa \<noteq> {} \<longrightarrow>
               (\<exists>x. minimum_elem (SIod D X) Xa x)", simp add:SIod_carrier)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X; Xa - {a} \<noteq> {}; Torder (SIod D X); \<forall>Xa. Xa \<subseteq> carrier (SIod D X) \<and> Xa \<noteq> {} \<longrightarrow> (\<exists>x. minimum_elem (SIod D X) Xa x); \<exists>x. minimum_elem (SIod D X) (Xa - {a}) x\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (thin_tac "\<forall>Xa. Xa \<subseteq> carrier (SIod D X) \<and> Xa \<noteq> {} \<longrightarrow>
               (\<exists>x. minimum_elem (SIod D X) Xa x)", erule exE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Xa x. \<lbrakk>Order D; X \<subseteq> carrier D; a \<in> carrier D; \<forall>x\<in>X. x \<preceq>\<^bsub>D\<^esub> a; Order (SIod D (insert a X)); Torder_axioms (SIod D (insert a X)); X \<subseteq> insert a X; \<not> Xa \<subseteq> X; Xa \<subseteq> insert a X; Xa \<noteq> {}; Xa - {a} \<subseteq> X; Xa - {a} \<noteq> {}; Torder (SIod D X); minimum_elem (SIod D X) (Xa - {a}) x\<rbrakk> \<Longrightarrow> Ex (minimum_elem (SIod D (insert a X)) Xa)
[PROOF STEP]
apply (frule_tac Y = Xa and x = x in augmented_Sset_minimum[of "D" "X" "a"],
        assumption+, blast)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma gen_boolean_algebra_subset:
  shows "A \<in> gen_boolean_algebra S B \<Longrightarrow> A \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<in> gen_boolean_algebra S B \<Longrightarrow> A \<subseteq> S
[PROOF STEP]
apply(induction A rule: gen_boolean_algebra.induct)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. S \<subseteq> S
 2. \<And>A. A \<in> B \<Longrightarrow> A \<inter> S \<subseteq> S
 3. \<And>A C. \<lbrakk>A \<in> gen_boolean_algebra S B; A \<subseteq> S; C \<in> gen_boolean_algebra S B; C \<subseteq> S\<rbrakk> \<Longrightarrow> A \<union> C \<subseteq> S
 4. \<And>A. \<lbrakk>A \<in> gen_boolean_algebra S B; A \<subseteq> S\<rbrakk> \<Longrightarrow> S - A \<subseteq> S
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>A. A \<in> B \<Longrightarrow> A \<inter> S \<subseteq> S
 2. \<And>A C. \<lbrakk>A \<in> gen_boolean_algebra S B; A \<subseteq> S; C \<in> gen_boolean_algebra S B; C \<subseteq> S\<rbrakk> \<Longrightarrow> A \<union> C \<subseteq> S
 3. \<And>A. \<lbrakk>A \<in> gen_boolean_algebra S B; A \<subseteq> S\<rbrakk> \<Longrightarrow> S - A \<subseteq> S
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>A C. \<lbrakk>A \<in> gen_boolean_algebra S B; A \<subseteq> S; C \<in> gen_boolean_algebra S B; C \<subseteq> S\<rbrakk> \<Longrightarrow> A \<union> C \<subseteq> S
 2. \<And>A. \<lbrakk>A \<in> gen_boolean_algebra S B; A \<subseteq> S\<rbrakk> \<Longrightarrow> S - A \<subseteq> S
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>A. \<lbrakk>A \<in> gen_boolean_algebra S B; A \<subseteq> S\<rbrakk> \<Longrightarrow> S - A \<subseteq> S
[PROOF STEP]
by blast


[STATEMENT]
lemma bij_betw_prod_divisors_coprime:
  assumes "coprime a (b :: nat)"
  shows   "bij_betw (\<lambda>x. fst x * snd x) ({d. d dvd a} \<times> {d. d dvd b}) {k. k dvd a * b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw (\<lambda>x. fst x * snd x) ({d. d dvd a} \<times> {d. d dvd b}) {k. k dvd a * b}
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>x. fst x * snd x) ({d. d dvd a} \<times> {d. d dvd b}) \<and> (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b}) = {k. k dvd a * b}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inj_on (\<lambda>x. fst x * snd x) ({d. d dvd a} \<times> {d. d dvd b})
 2. (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b}) = {k. k dvd a * b}
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
coprime a b
[PROOF STEP]
show "inj_on (\<lambda>x. fst x * snd x) ({d. d dvd a} \<times> {d. d dvd b})"
[PROOF STATE]
proof (prove)
using this:
coprime a b

goal (1 subgoal):
 1. inj_on (\<lambda>x. fst x * snd x) ({d. d dvd a} \<times> {d. d dvd b})
[PROOF STEP]
by (auto simp: inj_on_def coprime_crossproduct_nat coprime_divisors)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x. fst x * snd x) ({d. d dvd a} \<times> {d. d dvd b})

goal (1 subgoal):
 1. (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b}) = {k. k dvd a * b}
[PROOF STEP]
show "(\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b}) = {k. k dvd a * b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b}) = {k. k dvd a * b}
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x aa ba. \<lbrakk>aa dvd a; ba dvd b\<rbrakk> \<Longrightarrow> fst (aa, ba) * snd (aa, ba) dvd a * b
 2. \<And>x. x dvd a * b \<Longrightarrow> x \<in> (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b})
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x aa ba. \<lbrakk>aa dvd a; ba dvd b\<rbrakk> \<Longrightarrow> fst (aa, ba) * snd (aa, ba) dvd a * b
 2. \<And>x. x dvd a * b \<Longrightarrow> x \<in> (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b})
[PROOF STEP]
assume "x dvd a * b"
[PROOF STATE]
proof (state)
this:
x dvd a * b

goal (2 subgoals):
 1. \<And>x aa ba. \<lbrakk>aa dvd a; ba dvd b\<rbrakk> \<Longrightarrow> fst (aa, ba) * snd (aa, ba) dvd a * b
 2. \<And>x. x dvd a * b \<Longrightarrow> x \<in> (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x dvd a * b
[PROOF STEP]
obtain b' c' where "x = b' * c'" "b' dvd a" "c' dvd b"
[PROOF STATE]
proof (prove)
using this:
x dvd a * b

goal (1 subgoal):
 1. (\<And>b' c'. \<lbrakk>x = b' * c'; b' dvd a; c' dvd b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using division_decomp
[PROOF STATE]
proof (prove)
using this:
x dvd a * b
?a dvd ?b * ?c \<Longrightarrow> \<exists>b' c'. ?a = b' * c' \<and> b' dvd ?b \<and> c' dvd ?c

goal (1 subgoal):
 1. (\<And>b' c'. \<lbrakk>x = b' * c'; b' dvd a; c' dvd b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x = b' * c'
b' dvd a
c' dvd b

goal (2 subgoals):
 1. \<And>x aa ba. \<lbrakk>aa dvd a; ba dvd b\<rbrakk> \<Longrightarrow> fst (aa, ba) * snd (aa, ba) dvd a * b
 2. \<And>x. x dvd a * b \<Longrightarrow> x \<in> (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b})
[PROOF STEP]
thus "x \<in> (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b})"
[PROOF STATE]
proof (prove)
using this:
x = b' * c'
b' dvd a
c' dvd b

goal (1 subgoal):
 1. x \<in> (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b})
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
x \<in> (\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b})

goal (1 subgoal):
 1. \<And>x aa ba. \<lbrakk>aa dvd a; ba dvd b\<rbrakk> \<Longrightarrow> fst (aa, ba) * snd (aa, ba) dvd a * b
[PROOF STEP]
qed (insert assms, auto intro: mult_dvd_mono)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. fst x * snd x) ` ({d. d dvd a} \<times> {d. d dvd b}) = {k. k dvd a * b}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma infinite_insert_lepoll:
  assumes "infinite A" shows "insert a A \<lesssim> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert a A \<lesssim> A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. insert a A \<lesssim> A
[PROOF STEP]
obtain f :: "nat \<Rightarrow> 'a" where "inj f" and f: "range f \<subseteq> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>f. \<lbrakk>inj f; range f \<subseteq> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms infinite_countable_subset
[PROOF STATE]
proof (prove)
using this:
infinite A
infinite ?S \<Longrightarrow> \<exists>f. inj f \<and> range f \<subseteq> ?S

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>inj f; range f \<subseteq> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inj f
range f \<subseteq> A

goal (1 subgoal):
 1. insert a A \<lesssim> A
[PROOF STEP]
let ?g = "(\<lambda>z. if z=a then f 0 else if z \<in> range f then f (Suc (inv f z)) else z)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. insert a A \<lesssim> A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert a A \<lesssim> A
[PROOF STEP]
unfolding lepoll_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>f. inj_on f (insert a A) \<and> f ` insert a A \<subseteq> A
[PROOF STEP]
proof (intro exI conjI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inj_on ?f (insert a A)
 2. ?f ` insert a A \<subseteq> A
[PROOF STEP]
show "inj_on ?g (insert a A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>z. if z = a then f 0 else if z \<in> range f then f (Suc (inv f z)) else z) (insert a A)
[PROOF STEP]
using inj_on_eq_iff [OF \<open>inj f\<close>]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> UNIV; ?y \<in> UNIV\<rbrakk> \<Longrightarrow> (f ?x = f ?y) = (?x = ?y)

goal (1 subgoal):
 1. inj_on (\<lambda>z. if z = a then f 0 else if z \<in> range f then f (Suc (inv f z)) else z) (insert a A)
[PROOF STEP]
by (auto simp: inj_on_def)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>z. if z = a then f 0 else if z \<in> range f then f (Suc (inv f z)) else z) (insert a A)

goal (1 subgoal):
 1. (\<lambda>z. if z = a then f 0 else if z \<in> range f then f (Suc (inv f z)) else z) ` insert a A \<subseteq> A
[PROOF STEP]
show "?g ` insert a A \<subseteq> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. if z = a then f 0 else if z \<in> range f then f (Suc (inv f z)) else z) ` insert a A \<subseteq> A
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
range f \<subseteq> A

goal (1 subgoal):
 1. (\<lambda>z. if z = a then f 0 else if z \<in> range f then f (Suc (inv f z)) else z) ` insert a A \<subseteq> A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>z. if z = a then f 0 else if z \<in> range f then f (Suc (inv f z)) else z) ` insert a A \<subseteq> A

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
insert a A \<lesssim> A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closedin_compact_space:
   "\<lbrakk>compact_space X; closedin X S\<rbrakk> \<Longrightarrow> compactin X S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>compact_space X; closedin X S\<rbrakk> \<Longrightarrow> compactin X S
[PROOF STEP]
by (simp add: closed_compactin closedin_subset compact_space_def)


[STATEMENT]
lemma domA_map_ran[simp]: "domA (map_ran f m) = domA m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. domA (map_ran f m) = domA m
[PROOF STEP]
unfolding domA_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst ` set (map_ran f m) = fst ` set m
[PROOF STEP]
by (rule dom_map_ran)


[STATEMENT]
lemma is_unit_monom_0:
  fixes a :: "'a::field"
  assumes "a \<noteq> 0"
  shows "is_unit (monom a 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_unit (monom a 0)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 = monom a 0 * ?k
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
a \<noteq> (0::'a)
[PROOF STEP]
show "1 = monom a 0 * monom (inverse a) 0"
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a)

goal (1 subgoal):
 1. 1 = monom a 0 * monom (inverse a) 0
[PROOF STEP]
by (simp add: mult_monom)
[PROOF STATE]
proof (state)
this:
1 = monom a 0 * monom (inverse a) 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma infinite_eqpoll_lists:
    assumes "infinite A" shows "lists A \<approx> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
have "lists A \<lesssim> Sigma UNIV (\<lambda>n. {l \<in> lists A. length l = n})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lists A \<lesssim> (SIGMA n:UNIV. {l \<in> lists A. length l = n})
[PROOF STEP]
unfolding lepoll_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>g. lists A \<subseteq> g ` (SIGMA n:UNIV. {l \<in> lists A. length l = n})
[PROOF STEP]
by (rule_tac x=snd in exI) (auto simp: in_listsI snd_image_Sigma)
[PROOF STATE]
proof (state)
this:
lists A \<lesssim> (SIGMA n:UNIV. {l \<in> lists A. length l = n})

goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
lists A \<lesssim> (SIGMA n:UNIV. {l \<in> lists A. length l = n})

goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
have "\<dots> \<lesssim> (UNIV::nat set) \<times> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SIGMA n:UNIV. {l \<in> lists A. length l = n}) \<lesssim> UNIV \<times> A
[PROOF STEP]
by (rule Sigma_lepoll_mono) (auto simp: lists_n_lepoll_self assms)
[PROOF STATE]
proof (state)
this:
(SIGMA n:UNIV. {l \<in> lists A. length l = n}) \<lesssim> UNIV \<times> A

goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(SIGMA n:UNIV. {l \<in> lists A. length l = n}) \<lesssim> UNIV \<times> A

goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
have "\<dots> \<lesssim> A \<times> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV \<times> A \<lesssim> A \<times> A
[PROOF STEP]
by (metis assms infinite_le_lepoll order_refl subset_imp_lepoll times_lepoll_mono)
[PROOF STATE]
proof (state)
this:
UNIV \<times> A \<lesssim> A \<times> A

goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
UNIV \<times> A \<lesssim> A \<times> A

goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
have "\<dots> \<approx> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<times> A \<approx> A
[PROOF STEP]
by (simp add: assms infinite_times_eqpoll_self)
[PROOF STATE]
proof (state)
this:
A \<times> A \<approx> A

goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
lists A \<lesssim> A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
lists A \<lesssim> A

goal (1 subgoal):
 1. lists A \<approx> A
[PROOF STEP]
by (simp add: lepoll_antisym lepoll_lists)
[PROOF STATE]
proof (state)
this:
lists A \<approx> A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma iT_Mult_iSince_conv: "0 < k \<Longrightarrow> (P t1. t1 \<S> t2 (I \<otimes> k). Q t2) = (P (t1 * k). t1 \<S> t2 I. Q (t2 * k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < k \<Longrightarrow> (P t1. t1 \<S> t2 I \<otimes> k. Q t2) = (P (t1 * k). t1 \<S> t2 I. Q (t2 * k))
[PROOF STEP]
by (simp add: iSince_def iT_Mult_iAll_conv iT_Mult_iEx_conv iT_Mult_cut_greater2)


[STATEMENT]
lemma sin_periodic_int [simp]:
  fixes i :: int
  shows "sin (x + i * (2 * pi)) = sin x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sin (x + real_of_int i * (2 * pi)) = sin x
[PROOF STEP]
by (metis add.right_neutral cos_int_2pin mult.commute mult.right_neutral mult_zero_right sin_add sin_int_2pin)


[STATEMENT]
lemma circline_set_y_axis_I:
  assumes "is_imag z"
  shows "of_complex z \<in> circline_set y_axis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_complex z \<in> circline_set y_axis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_imag z

goal (1 subgoal):
 1. of_complex z \<in> circline_set y_axis
[PROOF STEP]
unfolding circline_set_y_axis
[PROOF STATE]
proof (prove)
using this:
is_imag z

goal (1 subgoal):
 1. of_complex z \<in> of_complex ` {x. is_imag x} \<union> {\<infinity>\<^sub>h}
[PROOF STEP]
by auto


[STATEMENT]
lemma neg_equal_zero:
  assumes x: "x \<in> carrier R"
  shows "(\<ominus> x = x) = (x = \<zero>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<ominus> x = x) = (x = \<zero>)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<ominus> x = x \<Longrightarrow> x = \<zero>
 2. x = \<zero> \<Longrightarrow> \<ominus> x = x
[PROOF STEP]
assume "\<ominus> x = x"
[PROOF STATE]
proof (state)
this:
\<ominus> x = x

goal (2 subgoals):
 1. \<ominus> x = x \<Longrightarrow> x = \<zero>
 2. x = \<zero> \<Longrightarrow> \<ominus> x = x
[PROOF STEP]
with x
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier R
\<ominus> x = x
[PROOF STEP]
have "\<guillemotleft>2\<guillemotright> \<otimes> x = x \<oplus> \<ominus> x"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier R
\<ominus> x = x

goal (1 subgoal):
 1. \<guillemotleft>2\<guillemotright> \<otimes> x = x \<oplus> \<ominus> x
[PROOF STEP]
by (simp add: of_int_2 l_distr)
[PROOF STATE]
proof (state)
this:
\<guillemotleft>2\<guillemotright> \<otimes> x = x \<oplus> \<ominus> x

goal (2 subgoals):
 1. \<ominus> x = x \<Longrightarrow> x = \<zero>
 2. x = \<zero> \<Longrightarrow> \<ominus> x = x
[PROOF STEP]
with x
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier R
\<guillemotleft>2\<guillemotright> \<otimes> x = x \<oplus> \<ominus> x
[PROOF STEP]
show "x = \<zero>"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier R
\<guillemotleft>2\<guillemotright> \<otimes> x = x \<oplus> \<ominus> x

goal (1 subgoal):
 1. x = \<zero>
[PROOF STEP]
by (simp add: r_neg integral_iff)
[PROOF STATE]
proof (state)
this:
x = \<zero>

goal (1 subgoal):
 1. x = \<zero> \<Longrightarrow> \<ominus> x = x
[PROOF STEP]
qed simp


[STATEMENT]
lemma vproduct_vpair: "[a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>2\<^sub>\<nat>. f i) \<longleftrightarrow> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f) = (\<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f \<Longrightarrow> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)
 2. \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>) \<Longrightarrow> [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f
[PROOF STEP]
interpret vfsequence \<open>[a, b]\<^sub>\<circ>\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vfsequence [a, b]\<^sub>\<circ>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f \<Longrightarrow> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)
 2. \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>) \<Longrightarrow> [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f
[PROOF STEP]
show "[a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>2\<^sub>\<nat>. f i) \<Longrightarrow> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f \<Longrightarrow> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)
[PROOF STEP]
unfolding vcons_vdoubleton two
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set {\<langle>0\<^sub>\<nat>, a\<rangle>, \<langle>1\<^sub>\<nat>, b\<rangle>} \<in>\<^sub>\<circ> vproduct (set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}) f \<Longrightarrow> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)
[PROOF STEP]
by (elim vproduct_vdoubletonE) auto
[PROOF STATE]
proof (state)
this:
[a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f \<Longrightarrow> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)

goal (1 subgoal):
 1. \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>) \<Longrightarrow> [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f
[PROOF STEP]
assume hyp: "\<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)"
[PROOF STATE]
proof (state)
this:
\<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)

goal (1 subgoal):
 1. \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>) \<Longrightarrow> [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)
[PROOF STEP]
have af: "a \<in>\<^sub>\<circ> f (0\<^sub>\<nat>)" and bf: "b \<in>\<^sub>\<circ> f (1\<^sub>\<nat>)"
[PROOF STATE]
proof (prove)
using this:
\<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)

goal (1 subgoal):
 1. a \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) &&& b \<in>\<^sub>\<circ> f (1\<^sub>\<nat>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<in>\<^sub>\<circ> f (0\<^sub>\<nat>)
b \<in>\<^sub>\<circ> f (1\<^sub>\<nat>)

goal (1 subgoal):
 1. \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>) \<Longrightarrow> [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f
[PROOF STEP]
have dom: "\<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = set {0\<^sub>\<nat>, 1\<^sub>\<nat>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = set {0\<^sub>\<nat>, 1\<^sub>\<nat>}
[PROOF STEP]
by (auto intro!: vsubset_antisym)
[PROOF STATE]
proof (state)
this:
\<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = set {0\<^sub>\<nat>, 1\<^sub>\<nat>}

goal (1 subgoal):
 1. \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>) \<Longrightarrow> [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f
[PROOF STEP]
have ran: "\<R>\<^sub>\<circ> [a, b]\<^sub>\<circ> \<subseteq>\<^sub>\<circ> (\<Union>\<^sub>\<circ>i\<in>\<^sub>\<circ>2\<^sub>\<nat>. f i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> [a, b]\<^sub>\<circ> \<subseteq>\<^sub>\<circ> \<Union>\<^sub>\<circ> (VLambda (2\<^sub>\<nat>) f `\<^sub>\<circ> 2\<^sub>\<nat>)
[PROOF STEP]
unfolding two
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> [a, b]\<^sub>\<circ> \<subseteq>\<^sub>\<circ> \<Union>\<^sub>\<circ> (VLambda (set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}) f `\<^sub>\<circ> set {[]\<^sub>\<circ>, 1\<^sub>\<nat>})
[PROOF STEP]
using af bf vifunion_vdoubleton
[PROOF STATE]
proof (prove)
using this:
a \<in>\<^sub>\<circ> f (0\<^sub>\<nat>)
b \<in>\<^sub>\<circ> f (1\<^sub>\<nat>)
\<Union>\<^sub>\<circ> (VLambda (set {?i, ?j}) ?f `\<^sub>\<circ> set {?i, ?j}) = ?f ?i \<union>\<^sub>\<circ> ?f ?j

goal (1 subgoal):
 1. \<R>\<^sub>\<circ> [a, b]\<^sub>\<circ> \<subseteq>\<^sub>\<circ> \<Union>\<^sub>\<circ> (VLambda (set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}) f `\<^sub>\<circ> set {[]\<^sub>\<circ>, 1\<^sub>\<nat>})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<R>\<^sub>\<circ> [a, b]\<^sub>\<circ> \<subseteq>\<^sub>\<circ> \<Union>\<^sub>\<circ> (VLambda (2\<^sub>\<nat>) f `\<^sub>\<circ> 2\<^sub>\<nat>)

goal (1 subgoal):
 1. \<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>) \<Longrightarrow> [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f
[PROOF STEP]
show "[a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>2\<^sub>\<nat>. f i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f
[PROOF STEP]
apply(intro vproductI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. vsv [a, b]\<^sub>\<circ>
 2. \<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = 2\<^sub>\<nat>
 3. \<forall>i\<in>elts (2\<^sub>\<nat>). [a, b]\<^sub>\<circ>\<lparr>i\<rparr> \<in>\<^sub>\<circ> f i
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vsv [a, b]\<^sub>\<circ>
[PROOF STEP]
using dom ran vsv_axioms
[PROOF STATE]
proof (prove)
using this:
\<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = set {0\<^sub>\<nat>, 1\<^sub>\<nat>}
\<R>\<^sub>\<circ> [a, b]\<^sub>\<circ> \<subseteq>\<^sub>\<circ> \<Union>\<^sub>\<circ> (VLambda (2\<^sub>\<nat>) f `\<^sub>\<circ> 2\<^sub>\<nat>)
vsv [a, b]\<^sub>\<circ>

goal (1 subgoal):
 1. vsv [a, b]\<^sub>\<circ>
[PROOF STEP]
unfolding two
[PROOF STATE]
proof (prove)
using this:
\<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = set {0\<^sub>\<nat>, 1\<^sub>\<nat>}
\<R>\<^sub>\<circ> [a, b]\<^sub>\<circ> \<subseteq>\<^sub>\<circ> \<Union>\<^sub>\<circ> (VLambda (set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}) f `\<^sub>\<circ> set {[]\<^sub>\<circ>, 1\<^sub>\<nat>})
vsv [a, b]\<^sub>\<circ>

goal (1 subgoal):
 1. vsv [a, b]\<^sub>\<circ>
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = 2\<^sub>\<nat>
 2. \<forall>i\<in>elts (2\<^sub>\<nat>). [a, b]\<^sub>\<circ>\<lparr>i\<rparr> \<in>\<^sub>\<circ> f i
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = 2\<^sub>\<nat>
[PROOF STEP]
using af bf
[PROOF STATE]
proof (prove)
using this:
a \<in>\<^sub>\<circ> f (0\<^sub>\<nat>)
b \<in>\<^sub>\<circ> f (1\<^sub>\<nat>)

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = 2\<^sub>\<nat>
[PROOF STEP]
unfolding two
[PROOF STATE]
proof (prove)
using this:
a \<in>\<^sub>\<circ> f (0\<^sub>\<nat>)
b \<in>\<^sub>\<circ> f (1\<^sub>\<nat>)

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> [a, b]\<^sub>\<circ> = set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}
[PROOF STEP]
by (auto intro!: vsubset_antisym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>elts (2\<^sub>\<nat>). [a, b]\<^sub>\<circ>\<lparr>i\<rparr> \<in>\<^sub>\<circ> f i
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>elts (2\<^sub>\<nat>). [a, b]\<^sub>\<circ>\<lparr>i\<rparr> \<in>\<^sub>\<circ> f i
[PROOF STEP]
unfolding two
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>elts (set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}). [a, b]\<^sub>\<circ>\<lparr>i\<rparr> \<in>\<^sub>\<circ> f i
[PROOF STEP]
using hyp VSigmaE2 small_empty vcons_vdoubleton
[PROOF STATE]
proof (prove)
using this:
\<langle>a, b\<rangle> \<in>\<^sub>\<circ> f (0\<^sub>\<nat>) \<times>\<^sub>\<circ> f (1\<^sub>\<nat>)
\<lbrakk>\<langle>?a, ?b\<rangle> \<in>\<^sub>\<circ> VSigma ?A ?B; \<lbrakk>?a \<in>\<^sub>\<circ> ?A; ?b \<in>\<^sub>\<circ> ?B ?a\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
small {}
[?a, ?b]\<^sub>\<circ> = set {\<langle>0\<^sub>\<nat>, ?a\<rangle>, \<langle>1\<^sub>\<nat>, ?b\<rangle>}

goal (1 subgoal):
 1. \<forall>i\<in>elts (set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}). [a, b]\<^sub>\<circ>\<lparr>i\<rparr> \<in>\<^sub>\<circ> f i
[PROOF STEP]
by (auto simp: vinsert_set_insert_eq)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
[a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> vproduct (2\<^sub>\<nat>) f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Bs_append [simp]: "\<B>s (es @ es') n \<longleftrightarrow> \<B>s es n \<and> \<B>s es' n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<B>s (es @ es') n = (\<B>s es n \<and> \<B>s es' n)
[PROOF STEP]
by(induct es) auto


[STATEMENT]
lemma lift_constrains:
     "(lift i F \<in> (lift_set i A) co (lift_set i B)) = (F \<in> A co B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (lift i F \<in> lift_set i A co lift_set i B) = (F \<in> A co B)
[PROOF STEP]
by (simp add: lift_def lift_set_def rename_constrains)


[STATEMENT]
lemma coeff_monom_mult':
  "MPoly_Type.coeff ((MPoly_Type.monom m' a) * q) (m'm)  = a * MPoly_Type.coeff q (m'm - m')"
  if *: "m'm = m' + (m'm - m')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.coeff (MPoly_Type.monom m' a * q) m'm = a * MPoly_Type.coeff q (m'm - m')
[PROOF STEP]
by (subst *) (rule More_MPoly_Type.coeff_monom_mult)


[STATEMENT]
lemma Max_le_iMin_imp_le: "
  \<lbrakk> finite A; Max A \<le> iMin B; a \<in> A; b \<in> B \<rbrakk> \<Longrightarrow> a \<le> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; Max A \<le> iMin B; a \<in> A; b \<in> B\<rbrakk> \<Longrightarrow> a \<le> b
[PROOF STEP]
by (blast dest: Max_ge intro: order_trans)


[STATEMENT]
lemma value_flow:
  assumes f: "flow \<Delta> f"
  and source_out: "\<And>y. edge \<Delta> (source \<Delta>) y \<longleftrightarrow> y = x"
  shows "value_flow \<Delta> f = f (source \<Delta>, x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
have "value_flow \<Delta> f = (\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T (source \<Delta>). f (source \<Delta>, y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. value_flow \<Delta> f = (\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T (source \<Delta>). f (source \<Delta>, y))
[PROOF STEP]
by(rule d_OUT_alt_def)(simp add: flowD_outside[OF f])
[PROOF STATE]
proof (state)
this:
value_flow \<Delta> f = (\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T (source \<Delta>). f (source \<Delta>, y))

goal (1 subgoal):
 1. value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
value_flow \<Delta> f = (\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T (source \<Delta>). f (source \<Delta>, y))

goal (1 subgoal):
 1. value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
have "\<dots> = (\<Sum>\<^sup>+ y. f (source \<Delta>, y) * indicator {x} y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T (source \<Delta>). f (source \<Delta>, y)) = \<integral>\<^sup>+y\<in>{x}. f (source \<Delta>, y)\<partial>count_space UNIV
[PROOF STEP]
by(subst nn_integral_count_space_indicator)(auto intro!: nn_integral_cong split: split_indicator simp add: outgoing_def source_out)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T (source \<Delta>). f (source \<Delta>, y)) = \<integral>\<^sup>+y\<in>{x}. f (source \<Delta>, y)\<partial>count_space UNIV

goal (1 subgoal):
 1. value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T (source \<Delta>). f (source \<Delta>, y)) = \<integral>\<^sup>+y\<in>{x}. f (source \<Delta>, y)\<partial>count_space UNIV

goal (1 subgoal):
 1. value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
have "\<dots> = f (source \<Delta>, x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+y\<in>{x}. f (source \<Delta>, y)\<partial>count_space UNIV = f (source \<Delta>, x)
[PROOF STEP]
by(simp add: one_ennreal_def[symmetric] max_def)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+y\<in>{x}. f (source \<Delta>, y)\<partial>count_space UNIV = f (source \<Delta>, x)

goal (1 subgoal):
 1. value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
value_flow \<Delta> f = f (source \<Delta>, x)

goal (1 subgoal):
 1. value_flow \<Delta> f = f (source \<Delta>, x)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
value_flow \<Delta> f = f (source \<Delta>, x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma acc_limit_alt':
    "finite (range r) \<Longrightarrow> is_acc r \<longleftrightarrow> (\<Union>(acc ` limit r) = {0..<num_acc})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range r) \<Longrightarrow> is_acc r = (\<Union> (acc ` limit r) = {0..<num_acc})
[PROOF STEP]
unfolding acc_limit_alt
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range r) \<Longrightarrow> (\<forall>n<num_acc. limit r \<inter> accn n \<noteq> {}) = (\<Union> (acc ` limit r) = {0..<num_acc})
[PROOF STEP]
by (auto simp: accn_def)


[STATEMENT]
lemma nonneg_Ax: "x \<in> X \<Longrightarrow> le_vec 0 (A *v x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> X \<Longrightarrow> le_vec 0 (A *v x)
[PROOF STEP]
unfolding X_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> {x. le_vec 0 x \<and> x \<noteq> 0} \<Longrightarrow> le_vec 0 (A *v x)
[PROOF STEP]
using nonneg
[PROOF STATE]
proof (prove)
using this:
0 \<le> A $h ?i $h ?j

goal (1 subgoal):
 1. x \<in> {x. le_vec 0 x \<and> x \<noteq> 0} \<Longrightarrow> le_vec 0 (A *v x)
[PROOF STEP]
by (auto simp: matrix_vector_mult_def intro!: sum_nonneg)


[STATEMENT]
lemma ins_list_sorted: "sorted (xs @ [a]) \<Longrightarrow>
  ins_list x (xs @ a # ys) =
  (if x < a then ins_list x xs @ (a#ys) else xs @ ins_list x (a#ys))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted (xs @ [a]) \<Longrightarrow> ins_list x (xs @ a # ys) = (if x < a then ins_list x xs @ a # ys else xs @ ins_list x (a # ys))
[PROOF STEP]
by(induction xs) (auto simp: sorted_lems)


[STATEMENT]
lemma takeWhile_neq_rev: "\<lbrakk>distinct xs; x \<in> set xs\<rbrakk> \<Longrightarrow>
  takeWhile (\<lambda>y. y \<noteq> x) (rev xs) = rev (tl (dropWhile (\<lambda>y. y \<noteq> x) xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distinct xs; x \<in> set xs\<rbrakk> \<Longrightarrow> takeWhile (\<lambda>y. y \<noteq> x) (rev xs) = rev (tl (dropWhile (\<lambda>y. y \<noteq> x) xs))
[PROOF STEP]
by(induct xs) (auto simp: takeWhile_tail[where l="[]"])


[STATEMENT]
lemma set_toN[simp]: "set (toN n) = {0..n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (toN n) = {0..n}
[PROOF STEP]
unfolding toN_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set [0..<Suc n] = {0..n}
[PROOF STEP]
by auto


[STATEMENT]
lemma (in semiring_0) lemma_degree_zero: "(\<forall>c \<in> set p. c = 0) \<longleftrightarrow> pnormalize p = []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>c\<in>set p. c = (0::'a)) = (pnormalize p = [])
[PROOF STEP]
by (induct p) auto


[STATEMENT]
lemma dtree_children_fin:
  "finite {(x,e). (if e \<in> out_arcs T r then x = to_dtree_aux (head T e) else False)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {(x, e). if e \<in> out_arcs T r then x = to_dtree_aux (head T e) else False}
[PROOF STEP]
using finite_imageI[of "out_arcs T r" "(\<lambda>e. (to_dtree_aux (head T e),e))"]
      dtree_children_img_alt finite_out_arcs
[PROOF STATE]
proof (prove)
using this:
finite (out_arcs T r) \<Longrightarrow> finite ((\<lambda>e. (to_dtree_aux (head T e), e)) ` out_arcs T r)
(\<lambda>e. (to_dtree_aux (head T e), e)) ` out_arcs T ?r = {(x, e). if e \<in> out_arcs T ?r then x = to_dtree_aux (head T e) else False}
finite (out_arcs T ?v)

goal (1 subgoal):
 1. finite {(x, e). if e \<in> out_arcs T r then x = to_dtree_aux (head T e) else False}
[PROOF STEP]
by fastforce


[STATEMENT]
lemma indexlt_trans: "indexlt k'' u'' k' u' \<Longrightarrow> indexlt k' u' k u \<Longrightarrow> indexlt k'' u'' k u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>indexlt k'' u'' k' u'; indexlt k' u' k u\<rbrakk> \<Longrightarrow> indexlt k'' u'' k u
[PROOF STEP]
using dual_order.strict_trans indexlt_simp
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?b < ?a; ?c < ?b\<rbrakk> \<Longrightarrow> ?c < ?a
indexlt ?k' ?u' ?k ?u = (?k' < ?k \<or> ?k' = ?k \<and> ?u' < ?u)

goal (1 subgoal):
 1. \<lbrakk>indexlt k'' u'' k' u'; indexlt k' u' k u\<rbrakk> \<Longrightarrow> indexlt k'' u'' k u
[PROOF STEP]
by auto


[STATEMENT]
theorem Radon:
  assumes "affine_dependent c"
  obtains m p where "m \<subseteq> c" "p \<subseteq> c" "m \<inter> p = {}" "(convex hull m) \<inter> (convex hull p) \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>m p. \<lbrakk>m \<subseteq> c; p \<subseteq> c; m \<inter> p = {}; convex hull m \<inter> convex hull p \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>m p. \<lbrakk>m \<subseteq> c; p \<subseteq> c; m \<inter> p = {}; convex hull m \<inter> convex hull p \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from assms[unfolded affine_dependent_explicit]
[PROOF STATE]
proof (chain)
picking this:
\<exists>S u. finite S \<and> S \<subseteq> c \<and> sum u S = 0 \<and> (\<exists>v\<in>S. u v \<noteq> 0) \<and> (\<Sum>v\<in>S. u v *\<^sub>R v) = (0::'a)
[PROOF STEP]
obtain S u where
      "finite S" "S \<subseteq> c" "sum u S = 0" "\<exists>v\<in>S. u v \<noteq> 0" "(\<Sum>v\<in>S. u v *\<^sub>R v) = 0"
[PROOF STATE]
proof (prove)
using this:
\<exists>S u. finite S \<and> S \<subseteq> c \<and> sum u S = 0 \<and> (\<exists>v\<in>S. u v \<noteq> 0) \<and> (\<Sum>v\<in>S. u v *\<^sub>R v) = (0::'a)

goal (1 subgoal):
 1. (\<And>S u. \<lbrakk>finite S; S \<subseteq> c; sum u S = 0; \<exists>v\<in>S. u v \<noteq> 0; (\<Sum>v\<in>S. u v *\<^sub>R v) = (0::'a)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite S
S \<subseteq> c
sum u S = 0
\<exists>v\<in>S. u v \<noteq> 0
(\<Sum>v\<in>S. u v *\<^sub>R v) = (0::'a)

goal (1 subgoal):
 1. (\<And>m p. \<lbrakk>m \<subseteq> c; p \<subseteq> c; m \<inter> p = {}; convex hull m \<inter> convex hull p \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite S
S \<subseteq> c
sum u S = 0
\<exists>v\<in>S. u v \<noteq> 0
(\<Sum>v\<in>S. u v *\<^sub>R v) = (0::'a)
[PROOF STEP]
have *: "finite S" "affine_dependent S" and S: "S \<subseteq> c"
[PROOF STATE]
proof (prove)
using this:
finite S
S \<subseteq> c
sum u S = 0
\<exists>v\<in>S. u v \<noteq> 0
(\<Sum>v\<in>S. u v *\<^sub>R v) = (0::'a)

goal (1 subgoal):
 1. (finite S &&& affine_dependent S) &&& S \<subseteq> c
[PROOF STEP]
unfolding affine_dependent_explicit
[PROOF STATE]
proof (prove)
using this:
finite S
S \<subseteq> c
sum u S = 0
\<exists>v\<in>S. u v \<noteq> 0
(\<Sum>v\<in>S. u v *\<^sub>R v) = (0::'a)

goal (1 subgoal):
 1. (finite S &&& \<exists>Sa u. finite Sa \<and> Sa \<subseteq> S \<and> sum u Sa = 0 \<and> (\<exists>v\<in>Sa. u v \<noteq> 0) \<and> (\<Sum>v\<in>Sa. u v *\<^sub>R v) = (0::'a)) &&& S \<subseteq> c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite S
affine_dependent S
S \<subseteq> c

goal (1 subgoal):
 1. (\<And>m p. \<lbrakk>m \<subseteq> c; p \<subseteq> c; m \<inter> p = {}; convex hull m \<inter> convex hull p \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from Radon_partition[OF *]
[PROOF STATE]
proof (chain)
picking this:
\<exists>m p. m \<inter> p = {} \<and> m \<union> p = S \<and> convex hull m \<inter> convex hull p \<noteq> {}
[PROOF STEP]
obtain m p where "m \<inter> p = {}" "m \<union> p = S" "convex hull m \<inter> convex hull p \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
\<exists>m p. m \<inter> p = {} \<and> m \<union> p = S \<and> convex hull m \<inter> convex hull p \<noteq> {}

goal (1 subgoal):
 1. (\<And>m p. \<lbrakk>m \<inter> p = {}; m \<union> p = S; convex hull m \<inter> convex hull p \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
m \<inter> p = {}
m \<union> p = S
convex hull m \<inter> convex hull p \<noteq> {}

goal (1 subgoal):
 1. (\<And>m p. \<lbrakk>m \<subseteq> c; p \<subseteq> c; m \<inter> p = {}; convex hull m \<inter> convex hull p \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
with S
[PROOF STATE]
proof (chain)
picking this:
S \<subseteq> c
m \<inter> p = {}
m \<union> p = S
convex hull m \<inter> convex hull p \<noteq> {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> c
m \<inter> p = {}
m \<union> p = S
convex hull m \<inter> convex hull p \<noteq> {}

goal (1 subgoal):
 1. thesis
[PROOF STEP]
by (force intro: that[of p m])
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma length_remdups_eq[iff]:
  "(length (remdups xs) = length xs) = (remdups xs = xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (length (remdups xs) = length xs) = (remdups xs = xs)
[PROOF STEP]
proof (induct xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (length (remdups []) = length []) = (remdups [] = [])
 2. \<And>a xs. (length (remdups xs) = length xs) = (remdups xs = xs) \<Longrightarrow> (length (remdups (a # xs)) = length (a # xs)) = (remdups (a # xs) = a # xs)
[PROOF STEP]
case (Cons a xs)
[PROOF STATE]
proof (state)
this:
(length (remdups xs) = length xs) = (remdups xs = xs)

goal (2 subgoals):
 1. (length (remdups []) = length []) = (remdups [] = [])
 2. \<And>a xs. (length (remdups xs) = length xs) = (remdups xs = xs) \<Longrightarrow> (length (remdups (a # xs)) = length (a # xs)) = (remdups (a # xs) = a # xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(length (remdups xs) = length xs) = (remdups xs = xs)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(length (remdups xs) = length xs) = (remdups xs = xs)

goal (1 subgoal):
 1. (length (remdups (a # xs)) = length (a # xs)) = (remdups (a # xs) = a # xs)
[PROOF STEP]
by simp (metis Suc_n_not_le_n impossible_Cons length_remdups_leq)
[PROOF STATE]
proof (state)
this:
(length (remdups (a # xs)) = length (a # xs)) = (remdups (a # xs) = a # xs)

goal (1 subgoal):
 1. (length (remdups []) = length []) = (remdups [] = [])
[PROOF STEP]
qed auto


[STATEMENT]
lemma  sets_pair_eq_sets_fst_snd:
  "sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})"
    (is "?P = sets (Sup {?fst, ?snd})")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
fix a b
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
assume ab: "a \<in> sets A" "b \<in> sets B"
[PROOF STATE]
proof (state)
this:
a \<in> sets A
b \<in> sets B

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> sets A
b \<in> sets B
[PROOF STEP]
have "a \<times> b = (fst -` a \<inter> (space A \<times> space B)) \<inter> (snd -` b \<inter> (space A \<times> space B))"
[PROOF STATE]
proof (prove)
using this:
a \<in> sets A
b \<in> sets B

goal (1 subgoal):
 1. a \<times> b = fst -` a \<inter> space A \<times> space B \<inter> (snd -` b \<inter> space A \<times> space B)
[PROOF STEP]
by (auto dest: sets.sets_into_space)
[PROOF STATE]
proof (state)
this:
a \<times> b = fst -` a \<inter> space A \<times> space B \<inter> (snd -` b \<inter> space A \<times> space B)

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
a \<times> b = fst -` a \<inter> space A \<times> space B \<inter> (snd -` b \<inter> space A \<times> space B)

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
have "\<dots> \<in> sets (Sup {?fst, ?snd})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst -` a \<inter> space A \<times> space B \<inter> (snd -` b \<inter> space A \<times> space B) \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
apply (rule sets.Int)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. fst -` a \<inter> space A \<times> space B \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
 2. snd -` b \<inter> space A \<times> space B \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
apply (rule in_sets_Sup)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>m. m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B} \<Longrightarrow> space m = ?X3
 2. ?m3 \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}
 3. fst -` a \<inter> space A \<times> space B \<in> sets ?m3
 4. snd -` b \<inter> space A \<times> space B \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
apply auto []
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?m3 \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}
 2. fst -` a \<inter> space A \<times> space B \<in> sets ?m3
 3. snd -` b \<inter> space A \<times> space B \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
apply (rule insertI1)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. fst -` a \<inter> space A \<times> space B \<in> sets (vimage_algebra (space A \<times> space B) fst A)
 2. snd -` b \<inter> space A \<times> space B \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
apply (auto intro: ab in_vimage_algebra) []
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd -` b \<inter> space A \<times> space B \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
apply (rule in_sets_Sup)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>m. m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B} \<Longrightarrow> space m = ?X33
 2. ?m33 \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}
 3. snd -` b \<inter> space A \<times> space B \<in> sets ?m33
[PROOF STEP]
apply auto []
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ?m33 \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}
 2. snd -` b \<inter> space A \<times> space B \<in> sets ?m33
[PROOF STEP]
apply (rule insertI2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ?m33 \<in> {vimage_algebra (space A \<times> space B) snd B}
 2. snd -` b \<inter> space A \<times> space B \<in> sets ?m33
[PROOF STEP]
apply (auto intro: ab in_vimage_algebra)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
fst -` a \<inter> space A \<times> space B \<inter> (snd -` b \<inter> space A \<times> space B) \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
have "a \<times> b \<in> sets (Sup {?fst, ?snd})"
[PROOF STATE]
proof (prove)
using this:
a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})

goal (1 subgoal):
 1. a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a2 \<in> sets A; ?b2 \<in> sets B\<rbrakk> \<Longrightarrow> ?a2 \<times> ?b2 \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a2 \<in> sets A; ?b2 \<in> sets B\<rbrakk> \<Longrightarrow> ?a2 \<times> ?b2 \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
have "sets ?fst \<subseteq> sets (A \<Otimes>\<^sub>M B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
by (rule sets_image_in_sets) (auto simp: space_pair_measure[symmetric])
[PROOF STATE]
proof (state)
this:
sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B)

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B)

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
have "sets ?snd \<subseteq> sets (A \<Otimes>\<^sub>M B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
by (rule sets_image_in_sets) (auto simp: space_pair_measure)
[PROOF STATE]
proof (state)
this:
sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B)

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?a2 \<in> sets A; ?b2 \<in> sets B\<rbrakk> \<Longrightarrow> ?a2 \<times> ?b2 \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B)
sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a2 \<in> sets A; ?b2 \<in> sets B\<rbrakk> \<Longrightarrow> ?a2 \<times> ?b2 \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B)
sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B)

goal (1 subgoal):
 1. sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
[PROOF STEP]
apply (intro antisym[of "sets A" for A] sets_Sup_in_sets sets_pair_in_sets)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a b. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})
 2. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B)\<rbrakk> \<Longrightarrow> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B} \<noteq> {}
 3. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> space m = space (A \<Otimes>\<^sub>M B)
 4. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> sets m \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B)\<rbrakk> \<Longrightarrow> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B} \<noteq> {}
 2. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> space m = space (A \<Otimes>\<^sub>M B)
 3. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> sets m \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> space m = space (A \<Otimes>\<^sub>M B)
 2. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> sets m \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (sup (vimage_algebra (space A \<times> space B) fst A) (vimage_algebra (space A \<times> space B) snd B)); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m = vimage_algebra (space A \<times> space B) fst A \<or> m = vimage_algebra (space A \<times> space B) snd B\<rbrakk> \<Longrightarrow> space m = space (A \<Otimes>\<^sub>M B)
 2. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> sets m \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
apply (elim disjE)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (sup (vimage_algebra (space A \<times> space B) fst A) (vimage_algebra (space A \<times> space B) snd B)); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m = vimage_algebra (space A \<times> space B) fst A\<rbrakk> \<Longrightarrow> space m = space (A \<Otimes>\<^sub>M B)
 2. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (sup (vimage_algebra (space A \<times> space B) fst A) (vimage_algebra (space A \<times> space B) snd B)); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m = vimage_algebra (space A \<times> space B) snd B\<rbrakk> \<Longrightarrow> space m = space (A \<Otimes>\<^sub>M B)
 3. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> sets m \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
apply (simp add: space_pair_measure)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (sup (vimage_algebra (space A \<times> space B) fst A) (vimage_algebra (space A \<times> space B) snd B)); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m = vimage_algebra (space A \<times> space B) snd B\<rbrakk> \<Longrightarrow> space m = space (A \<Otimes>\<^sub>M B)
 2. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> sets m \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
apply (simp add: space_pair_measure)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>m. \<lbrakk>\<And>a b. \<lbrakk>a \<in> sets A; b \<in> sets B\<rbrakk> \<Longrightarrow> a \<times> b \<in> sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}); sets (vimage_algebra (space A \<times> space B) fst A) \<subseteq> sets (A \<Otimes>\<^sub>M B); sets (vimage_algebra (space A \<times> space B) snd B) \<subseteq> sets (A \<Otimes>\<^sub>M B); m \<in> {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B}\<rbrakk> \<Longrightarrow> sets m \<subseteq> sets (A \<Otimes>\<^sub>M B)
[PROOF STEP]
apply (auto simp add: space_pair_measure)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fds_abs_converges_power:
  fixes s :: "'a :: {nat_power, real_normed_field, banach, second_countable_topology}"
  shows "fds_abs_converges f s \<Longrightarrow> fds_abs_converges (f ^ n) s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_abs_converges f s \<Longrightarrow> fds_abs_converges (f ^ n) s
[PROOF STEP]
by (induction n) (auto intro!: fds_abs_converges_mult)


[STATEMENT]
lemma abs_int_poly_0[simp]: "abs_int_poly 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_int_poly 0 = 0
[PROOF STEP]
by (auto simp: abs_int_poly_def)


[STATEMENT]
lemma dlist_induct_stronger:
  assumes a1: "P empty"
  and     a2: "\<And>x dl. \<lbrakk>\<not>member dl x; P dl\<rbrakk> \<Longrightarrow> P (insert x dl)"
  shows "P dl"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P dl
[PROOF STEP]
proof(induct dl rule: dlist_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P DList.empty
 2. \<And>a dl. P dl \<Longrightarrow> P (DList.insert a dl)
[PROOF STEP]
show "P empty"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P DList.empty
[PROOF STEP]
using a1
[PROOF STATE]
proof (prove)
using this:
P DList.empty

goal (1 subgoal):
 1. P DList.empty
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P DList.empty

goal (1 subgoal):
 1. \<And>a dl. P dl \<Longrightarrow> P (DList.insert a dl)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a dl. P dl \<Longrightarrow> P (DList.insert a dl)
[PROOF STEP]
fix x dl
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a dl. P dl \<Longrightarrow> P (DList.insert a dl)
[PROOF STEP]
assume "P dl"
[PROOF STATE]
proof (state)
this:
P dl

goal (1 subgoal):
 1. \<And>a dl. P dl \<Longrightarrow> P (DList.insert a dl)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P dl
[PROOF STEP]
show "P (insert x dl)"
[PROOF STATE]
proof (prove)
using this:
P dl

goal (1 subgoal):
 1. P (DList.insert x dl)
[PROOF STEP]
using a2
[PROOF STATE]
proof (prove)
using this:
P dl
\<lbrakk>\<not> member ?dl ?x; P ?dl\<rbrakk> \<Longrightarrow> P (DList.insert ?x ?dl)

goal (1 subgoal):
 1. P (DList.insert x dl)
[PROOF STEP]
by (cases "member dl x") (simp_all add: dlist_member_insert)
[PROOF STATE]
proof (state)
this:
P (DList.insert x dl)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pred_sets2: "A \<in> sets N \<Longrightarrow> f \<in> measurable M N \<Longrightarrow> pred M (\<lambda>x. f x \<in> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<in> sets N; f \<in> M \<rightarrow>\<^sub>M N\<rbrakk> \<Longrightarrow> pred M (\<lambda>x. f x \<in> A)
[PROOF STEP]
by (rule measurable_compose[where f=f and N=N]) (auto simp: pred_def Int_def[symmetric])


[STATEMENT]
lemma le_sum_list_mono:
  assumes "xs \<le>\<^sub>v ys"
  shows "sum_list xs \<le> sum_list ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list xs \<le> sum_list ys
[PROOF STEP]
using assms and sum_list_mono [of "[0..<length ys]" "(!) xs" "(!) ys"]
[PROOF STATE]
proof (prove)
using this:
xs \<le>\<^sub>v ys
(\<And>x. x \<in> set [0..<length ys] \<Longrightarrow> xs ! x \<le> ys ! x) \<Longrightarrow> sum_list (map ((!) xs) [0..<length ys]) \<le> sum_list (map ((!) ys) [0..<length ys])

goal (1 subgoal):
 1. sum_list xs \<le> sum_list ys
[PROOF STEP]
by (auto simp: less_eq_def) (metis map_nth)


[STATEMENT]
lemma non_increasing_and:
  assumes "non_increasing (applies_eq A)"
      and "non_increasing (applies_eq B)"
    shows "non_increasing (applies_eq (And A B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. non_increasing (applies_eq (And A B))
[PROOF STEP]
proof (rule non_increasingI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>\<Delta> \<Delta>'. smaller_interp \<Delta> \<Delta>' \<Longrightarrow> smaller_interp (applies_eq (And A B) \<Delta>') (applies_eq (And A B) \<Delta>)
[PROOF STEP]
fix \<Delta> \<Delta>' :: "('c, 'd, 'a) interp"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>\<Delta> \<Delta>'. smaller_interp \<Delta> \<Delta>' \<Longrightarrow> smaller_interp (applies_eq (And A B) \<Delta>') (applies_eq (And A B) \<Delta>)
[PROOF STEP]
assume asm0: "smaller_interp \<Delta>' \<Delta>"
[PROOF STATE]
proof (state)
this:
smaller_interp \<Delta>' \<Delta>

goal (1 subgoal):
 1. \<And>\<Delta> \<Delta>'. smaller_interp \<Delta> \<Delta>' \<Longrightarrow> smaller_interp (applies_eq (And A B) \<Delta>') (applies_eq (And A B) \<Delta>)
[PROOF STEP]
show "smaller_interp (applies_eq (And A B) \<Delta>) (applies_eq (And A B) \<Delta>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smaller_interp (applies_eq (And A B) \<Delta>) (applies_eq (And A B) \<Delta>')
[PROOF STEP]
proof (rule smaller_interpI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>s x. x \<in> applies_eq (And A B) \<Delta> s \<Longrightarrow> x \<in> applies_eq (And A B) \<Delta>' s
[PROOF STEP]
fix s x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>s x. x \<in> applies_eq (And A B) \<Delta> s \<Longrightarrow> x \<in> applies_eq (And A B) \<Delta>' s
[PROOF STEP]
assume asm1: "x \<in> applies_eq (And A B) \<Delta> s"
[PROOF STATE]
proof (state)
this:
x \<in> applies_eq (And A B) \<Delta> s

goal (1 subgoal):
 1. \<And>s x. x \<in> applies_eq (And A B) \<Delta> s \<Longrightarrow> x \<in> applies_eq (And A B) \<Delta>' s
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> applies_eq (And A B) \<Delta> s
[PROOF STEP]
show "x \<in> applies_eq (And A B) \<Delta>' s"
[PROOF STATE]
proof (prove)
using this:
x \<in> applies_eq (And A B) \<Delta> s

goal (1 subgoal):
 1. x \<in> applies_eq (And A B) \<Delta>' s
[PROOF STEP]
using asm0 assms(1) assms(2) non_increasing_def logic_axioms mem_Collect_eq sat.simps(8) smaller_interp_applies_cons
[PROOF STATE]
proof (prove)
using this:
x \<in> applies_eq (And A B) \<Delta> s
smaller_interp \<Delta>' \<Delta>
non_increasing (applies_eq A)
non_increasing (applies_eq B)
non_increasing ?f = (\<forall>\<Delta> \<Delta>'. smaller_interp \<Delta> \<Delta>' \<longrightarrow> smaller_interp (?f \<Delta>') (?f \<Delta>))
logic (\<oplus>) (\<odot>) smult sadd sinv one valid
(?a \<in> Collect ?P) = ?P ?a
(?\<sigma>, ?s, ?\<Delta> \<Turnstile> Exists ?x ?A) = (\<exists>v. ?\<sigma>, ?s(?x := v), ?\<Delta> \<Turnstile> ?A)
\<lbrakk>smaller_interp (applies_eq ?A ?\<Delta>) (applies_eq ?A ?\<Delta>'); ?a, ?s, ?\<Delta> \<Turnstile> ?A\<rbrakk> \<Longrightarrow> ?a, ?s, ?\<Delta>' \<Turnstile> ?A

goal (1 subgoal):
 1. x \<in> applies_eq (And A B) \<Delta>' s
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
x \<in> applies_eq (And A B) \<Delta>' s

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
smaller_interp (applies_eq (And A B) \<Delta>) (applies_eq (And A B) \<Delta>')

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma con_transitive_on_ide:
    assumes "ide a" and "ide b" and "ide c"
    shows "\<lbrakk>a \<frown> b; b \<frown> c\<rbrakk> \<Longrightarrow> a \<frown> c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<frown> b; b \<frown> c\<rbrakk> \<Longrightarrow> a \<frown> c
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
ide a
ide b
ide c

goal (1 subgoal):
 1. \<lbrakk>a \<frown> b; b \<frown> c\<rbrakk> \<Longrightarrow> a \<frown> c
[PROOF STEP]
by (metis resid_arr_ide con_target con_sym)


[STATEMENT]
lemma integrable_scaleR_right[simp, intro]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. c *\<^sub>R f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. c *\<^sub>R f x)
[PROOF STEP]
unfolding integrable.simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c \<noteq> 0 \<Longrightarrow> Ex (has_bochner_integral M f)) \<Longrightarrow> Ex (has_bochner_integral M (\<lambda>x. c *\<^sub>R f x))
[PROOF STEP]
by fastforce


[STATEMENT]
lemma filter_rremdups_filter: "filter P (rremdups (filter Q xs)) =
  rremdups (filter (\<lambda>x. P x \<and> Q x) xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filter P (rremdups (filter Q xs)) = rremdups (filter (\<lambda>x. P x \<and> Q x) xs)
[PROOF STEP]
apply (induction xs arbitrary: Q)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>Q. filter P (rremdups (filter Q [])) = rremdups (filter (\<lambda>x. P x \<and> Q x) [])
 2. \<And>a xs Q. (\<And>Q. filter P (rremdups (filter Q xs)) = rremdups (filter (\<lambda>x. P x \<and> Q x) xs)) \<Longrightarrow> filter P (rremdups (filter Q (a # xs))) = rremdups (filter (\<lambda>x. P x \<and> Q x) (a # xs))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs Q. \<lbrakk>\<And>Q. filter P (rremdups (filter Q xs)) = rremdups (filter (\<lambda>x. P x \<and> Q x) xs); Q a; \<not> P a\<rbrakk> \<Longrightarrow> rremdups (filter (\<lambda>x. P x \<and> Q x \<and> a \<noteq> x) xs) = rremdups (filter (\<lambda>x. P x \<and> Q x) xs)
[PROOF STEP]
by metis


[STATEMENT]
lemma seq_plus_simp:
  assumes "s \<in> closed_seqs R"
  assumes "t \<in> closed_seqs R"
  shows "(s \<oplus>\<^bsub>R\<^bsup>\<omega>\<^esup>\<^esub> t) k = s k \<oplus> t k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (s \<oplus>\<^bsub>R\<^bsup>\<omega>\<^esup>\<^esub> t) k = s k \<oplus> t k
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
s \<in> carrier R\<^bsup>\<omega>\<^esup>
t \<in> carrier R\<^bsup>\<omega>\<^esup>

goal (1 subgoal):
 1. (s \<oplus>\<^bsub>R\<^bsup>\<omega>\<^esup>\<^esub> t) k = s k \<oplus> t k
[PROOF STEP]
unfolding nat_seqs_def
[PROOF STATE]
proof (prove)
using this:
s \<in> carrier (function_ring UNIV R)
t \<in> carrier (function_ring UNIV R)

goal (1 subgoal):
 1. (s \<oplus>\<^bsub>function_ring UNIV R\<^esub> t) k = s k \<oplus> t k
[PROOF STEP]
by (simp add: ring_functions.fun_add_eval_car ring_functions_axioms)


[STATEMENT]
lemma has_field_derivative_rGamma_nonpos_int:
  "(rGamma has_field_derivative (-1)^n * fact n) (at (- of_nat n) within A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rGamma has_field_derivative (- (1::'a)) ^ n * fact n) (at (- of_nat n) within A)
[PROOF STEP]
apply (rule has_field_derivative_at_within)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rGamma has_field_derivative (- (1::'a)) ^ n * fact n) (at (- of_nat n))
[PROOF STEP]
using differentiable_rGamma_aux2[of n]
[PROOF STATE]
proof (prove)
using this:
let z = - of_nat n in (\<lambda>y. (rGamma y - rGamma z - (- (1::?'a)) ^ n * prod of_nat {1..n} * (y - z)) /\<^sub>R norm (y - z)) \<midarrow>z\<rightarrow> (0::?'a)

goal (1 subgoal):
 1. (rGamma has_field_derivative (- (1::'a)) ^ n * fact n) (at (- of_nat n))
[PROOF STEP]
unfolding Let_def has_field_derivative_def has_derivative_def netlimit_at
[PROOF STATE]
proof (prove)
using this:
(\<lambda>y. (rGamma y - rGamma (- of_nat n) - (- (1::?'a)) ^ n * prod of_nat {1..n} * (y - - of_nat n)) /\<^sub>R norm (y - - of_nat n)) \<midarrow>- of_nat n\<rightarrow> (0::?'a)

goal (1 subgoal):
 1. bounded_linear ((*) ((- (1::'a)) ^ n * fact n)) \<and> (\<lambda>y. (rGamma y - rGamma (- of_nat n) - (- (1::'a)) ^ n * fact n * (y - - of_nat n)) /\<^sub>R norm (y - - of_nat n)) \<midarrow>- of_nat n\<rightarrow> (0::'a)
[PROOF STEP]
by (simp only: bounded_linear_mult_right mult_ac of_real_def [symmetric] fact_prod) simp