[STATEMENT]
theorem Domain: "Elem x (Domain f) = (\<exists>y. Elem (Opair x y) f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Elem x (HOLZF.Domain f) = (\<exists>y. Elem (Opair x y) f)
[PROOF STEP]
apply (auto simp add: Domain_def Replacement)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>xa. \<lbrakk>isOpair xa; Elem xa f; x = Fst xa\<rbrakk> \<Longrightarrow> \<exists>y. Elem (Opair (Fst xa) y) f
 2. \<And>y. Elem (Opair x y) f \<Longrightarrow> \<exists>xa. (isOpair xa \<longrightarrow> Elem xa f \<and> Fst xa = x) \<and> isOpair xa
[PROOF STEP]
apply (rule_tac x="Snd xa" in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>xa. \<lbrakk>isOpair xa; Elem xa f; x = Fst xa\<rbrakk> \<Longrightarrow> Elem (Opair (Fst xa) (Snd xa)) f
 2. \<And>y. Elem (Opair x y) f \<Longrightarrow> \<exists>xa. (isOpair xa \<longrightarrow> Elem xa f \<and> Fst xa = x) \<and> isOpair xa
[PROOF STEP]
apply (simp add: FstSnd)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. Elem (Opair x y) f \<Longrightarrow> \<exists>xa. (isOpair xa \<longrightarrow> Elem xa f \<and> Fst xa = x) \<and> isOpair xa
[PROOF STEP]
apply (rule_tac x="Opair x y" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. Elem (Opair x y) f \<Longrightarrow> (isOpair (Opair x y) \<longrightarrow> Elem (Opair x y) f \<and> Fst (Opair x y) = x) \<and> isOpair (Opair x y)
[PROOF STEP]
apply (simp add: isOpair Fst)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (*equal_union: *)
   "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
have F1: "\<forall>(x\<^sub>2::'b set) x\<^sub>1::'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<^sub>2 x\<^sub>1. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2
[PROOF STEP]
by (metis Un_commute subset_Un_eq)
[PROOF STATE]
proof (state)
this:
\<forall>x\<^sub>2 x\<^sub>1. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<forall>x\<^sub>2 x\<^sub>1. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume AA1: "\<exists>x\<^sub>1::'a set. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1"
[PROOF STATE]
proof (state)
this:
\<exists>x\<^sub>1. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<exists>x\<^sub>1. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume AAA1: "Y \<subseteq> X \<and> Y \<union> Z \<noteq> X"
[PROOF STATE]
proof (state)
this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume "\<not> Z \<subseteq> X"
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<not> Z \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis Un_upper2)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume "Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z"
[PROOF STATE]
proof (state)
this:
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "\<exists>x\<^sub>1::'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z"
[PROOF STATE]
proof (prove)
using this:
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z

goal (1 subgoal):
 1. \<exists>x\<^sub>1. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z
[PROOF STEP]
by (metis F1 Un_commute Un_upper2)
[PROOF STATE]
proof (state)
this:
\<exists>x\<^sub>1. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<^sub>1. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis Un_upper2)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis AAA1 Un_subset_iff)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume "\<not> Y \<subseteq> X"
[PROOF STATE]
proof (state)
this:
\<not> Y \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<not> Y \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis Un_commute Un_upper2)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Y \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
\<not> Y \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
\<not> Y \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis AA1 Un_subset_iff)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<exists>x\<^sub>1. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1 \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<exists>x\<^sub>1. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1 \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<exists>x\<^sub>1. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1 \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume "\<not> Z \<subseteq> X"
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<not> Z \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis Un_upper2)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume "\<not> Y \<subseteq> X"
[PROOF STATE]
proof (state)
this:
\<not> Y \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<not> Y \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis Un_commute Un_upper2)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Y \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Y \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<not> Y \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume AA1: "Y \<subseteq> X \<and> Y \<union> Z \<noteq> X"
[PROOF STATE]
proof (state)
this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume "\<not> Z \<subseteq> X"
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<not> Z \<subseteq> X

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis Un_upper2)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
assume "Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z"
[PROOF STATE]
proof (state)
this:
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "\<exists>x\<^sub>1::'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z"
[PROOF STATE]
proof (prove)
using this:
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z

goal (1 subgoal):
 1. \<exists>x\<^sub>1. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z
[PROOF STEP]
by (metis F1 Un_commute Un_upper2)
[PROOF STATE]
proof (state)
this:
\<exists>x\<^sub>1. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<^sub>1. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis Un_upper2)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by (metis AA1 Un_subset_iff)
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<exists>x\<^sub>1. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1 \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
\<not> Y \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<^sub>1. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1 \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
\<not> Z \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
\<not> Y \<subseteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
Y \<subseteq> X \<and> Y \<union> Z \<noteq> X \<Longrightarrow> (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal (1 subgoal):
 1. (X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Lang_term :
"w \<in> Lang G S \<Longrightarrow>
 \<forall>x \<in> set w. \<exists>N. (N, Leaf x) \<in> set G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w \<in> Lang G S \<Longrightarrow> \<forall>x\<in>set w. \<exists>N. (N, Leaf x) \<in> set G
[PROOF STEP]
by(clarsimp simp add: Lang_def, drule DSTEP_trancl_term,
   simp, erule imageI, assumption)


[STATEMENT]
lemma set_prefix :
  assumes "xs@ys \<in> set T"
  shows "xs \<in> set T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs \<in> Prefix_Tree.set T
[PROOF STEP]
using assms isin_prefix
[PROOF STATE]
proof (prove)
using this:
xs @ ys \<in> Prefix_Tree.set T
isin ?t (?xs @ ?xs') \<Longrightarrow> isin ?t ?xs

goal (1 subgoal):
 1. xs \<in> Prefix_Tree.set T
[PROOF STEP]
by auto


[STATEMENT]
lemma \<Delta>_ffact:
  "\<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k :: 'a :: comm_ring_1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k)
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<Delta> (ffact (Suc 0)) k = of_nat (Suc 0) * ffact 0 (of_int k)
 2. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<Delta> (ffact (Suc 0)) k = of_nat (Suc 0) * ffact 0 (of_int k)
 2. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Delta> (ffact (Suc 0)) k = of_nat (Suc 0) * ffact 0 (of_int k)
[PROOF STEP]
by (simp add: \<Delta>_def ffact_Suc)
[PROOF STATE]
proof (state)
this:
\<Delta> (ffact (Suc 0)) k = of_nat (Suc 0) * ffact 0 (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
\<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
obtain m where "m = Suc n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>m. m = Suc n \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
m = Suc n

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
have "\<Delta> (ffact (Suc m)) k =
    ffact (Suc m) (of_int (k + 1)) - ffact (Suc m) (of_int k :: 'a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Delta> (ffact (Suc m)) k = ffact (Suc m) (of_int (k + 1)) - ffact (Suc m) (of_int k)
[PROOF STEP]
by (simp add: \<Delta>_def)
[PROOF STATE]
proof (state)
this:
\<Delta> (ffact (Suc m)) k = ffact (Suc m) (of_int (k + 1)) - ffact (Suc m) (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Delta> (ffact (Suc m)) k = ffact (Suc m) (of_int (k + 1)) - ffact (Suc m) (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
have "\<dots> = of_int (k + 1) * ffact m (of_int k)
    - (ffact m (of_int k) * (of_int k - of_nat m))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ffact (Suc m) (of_int (k + 1)) - ffact (Suc m) (of_int k) = of_int (k + 1) * ffact m (of_int k) - ffact m (of_int k) * (of_int k - of_nat m)
[PROOF STEP]
using ffact_Suc_rev [of m "(of_int k :: 'a :: comm_ring_1)"]
[PROOF STATE]
proof (prove)
using this:
ffact (Suc m) (of_int k) = (of_int k - of_nat m) * ffact m (of_int k)

goal (1 subgoal):
 1. ffact (Suc m) (of_int (k + 1)) - ffact (Suc m) (of_int k) = of_int (k + 1) * ffact m (of_int k) - ffact m (of_int k) * (of_int k - of_nat m)
[PROOF STEP]
by (simp add: ac_simps ffact_Suc)
[PROOF STATE]
proof (state)
this:
ffact (Suc m) (of_int (k + 1)) - ffact (Suc m) (of_int k) = of_int (k + 1) * ffact m (of_int k) - ffact m (of_int k) * (of_int k - of_nat m)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ffact (Suc m) (of_int (k + 1)) - ffact (Suc m) (of_int k) = of_int (k + 1) * ffact m (of_int k) - ffact m (of_int k) * (of_int k - of_nat m)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
have "\<dots> = (of_int k + 1 - of_int k + of_nat m) * ffact m (of_int k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int (k + 1) * ffact m (of_int k) - ffact m (of_int k) * (of_int k - of_nat m) = (of_int k + (1::'a) - of_int k + of_nat m) * ffact m (of_int k)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
of_int (k + 1) * ffact m (of_int k) - ffact m (of_int k) * (of_int k - of_nat m) = (of_int k + (1::'a) - of_int k + of_nat m) * ffact m (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
of_int (k + 1) * ffact m (of_int k) - ffact m (of_int k) * (of_int k - of_nat m) = (of_int k + (1::'a) - of_int k + of_nat m) * ffact m (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
have "\<dots> = of_nat (Suc m) * ffact m (of_int k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (of_int k + (1::'a) - of_int k + of_nat m) * ffact m (of_int k) = of_nat (Suc m) * ffact m (of_int k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(of_int k + (1::'a) - of_int k + of_nat m) * ffact m (of_int k) = of_nat (Suc m) * ffact m (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(of_int k + (1::'a) - of_int k + of_nat m) * ffact m (of_int k) = of_nat (Suc m) * ffact m (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
have "\<dots> = of_nat (Suc m) * ffact (Suc m - 1) (of_int k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat (Suc m) * ffact m (of_int k) = of_nat (Suc m) * ffact (Suc m - 1) (of_int k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
of_nat (Suc m) * ffact m (of_int k) = of_nat (Suc m) * ffact (Suc m - 1) (of_int k)

goal (1 subgoal):
 1. \<And>n. \<Delta> (ffact (Suc n)) k = of_nat (Suc n) * ffact n (of_int k) \<Longrightarrow> \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Delta> (ffact (Suc m)) k = of_nat (Suc m) * ffact (Suc m - 1) (of_int k)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<Delta> (ffact (Suc m)) k = of_nat (Suc m) * ffact (Suc m - 1) (of_int k)

goal (1 subgoal):
 1. \<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)
[PROOF STEP]
by (simp only: \<open>m = Suc n\<close> diff_Suc_1)
[PROOF STATE]
proof (state)
this:
\<Delta> (ffact (Suc (Suc n))) k = of_nat (Suc (Suc n)) * ffact (Suc n) (of_int k)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ordertype_VWF_\<omega>:
  assumes "finite A"
  shows "ordertype A VWF \<in> elts \<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordertype A VWF \<in> elts \<omega>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ordertype A VWF \<in> elts \<omega>
[PROOF STEP]
have "finite (ordermap A VWF ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (ordermap A VWF ` A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. finite (ordermap A VWF ` A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite (ordermap A VWF ` A)

goal (1 subgoal):
 1. ordertype A VWF \<in> elts \<omega>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite (ordermap A VWF ` A)
[PROOF STEP]
have "ordertype A VWF < \<omega>"
[PROOF STATE]
proof (prove)
using this:
finite (ordermap A VWF ` A)

goal (1 subgoal):
 1. ordertype A VWF < \<omega>
[PROOF STEP]
by (meson Ord_\<omega> OrdmemD trans_VWF wf_VWF assms finite_ordertype_le_card le_less_trans ord_of_nat_\<omega>)
[PROOF STATE]
proof (state)
this:
ordertype A VWF < \<omega>

goal (1 subgoal):
 1. ordertype A VWF \<in> elts \<omega>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ordertype A VWF < \<omega>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ordertype A VWF < \<omega>

goal (1 subgoal):
 1. ordertype A VWF \<in> elts \<omega>
[PROOF STEP]
by (simp add: Ord_mem_iff_lt)
[PROOF STATE]
proof (state)
this:
ordertype A VWF \<in> elts \<omega>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma L_mono: "u \<le> v \<Longrightarrow> L d u \<le> L d v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u \<le> v \<Longrightarrow> L d u \<le> L d v
[PROOF STEP]
unfolding L_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u \<le> v \<Longrightarrow> r_dec\<^sub>b d + l *\<^sub>R blinfun_apply (\<P>\<^sub>1 d) u \<le> r_dec\<^sub>b d + l *\<^sub>R blinfun_apply (\<P>\<^sub>1 d) v
[PROOF STEP]
by (auto intro: scaleR_left_mono)


[STATEMENT]
lemma asymp_equiv_imp_eventually_ge:
  assumes "f \<sim>[F] g" "c < 1"
  shows   "eventually (\<lambda>x. norm (f x) \<ge> c * norm (g x)) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. c * norm (g x) \<le> norm (f x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. c * norm (g x) \<le> norm (f x)
[PROOF STEP]
from order_tendstoD(1)[OF asymp_equivD[OF asymp_equiv_norm[OF assms(1)]] assms(2)]
       asymp_equiv_eventually_zeros[OF assms(1)]
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in F. c < (if norm (f x) = 0 \<and> norm (g x) = 0 then 1 else norm (f x) / norm (g x))
\<forall>\<^sub>F x in F. (f x = (0::'b)) = (g x = (0::'b))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in F. c < (if norm (f x) = 0 \<and> norm (g x) = 0 then 1 else norm (f x) / norm (g x))
\<forall>\<^sub>F x in F. (f x = (0::'b)) = (g x = (0::'b))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. c * norm (g x) \<le> norm (f x)
[PROOF STEP]
by eventually_elim (auto split: if_splits simp: field_simps)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in F. c * norm (g x) \<le> norm (f x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma wf_design_iff: "bl \<in># \<B> \<Longrightarrow> design \<V> \<B> \<longleftrightarrow> (bl \<subseteq> \<V> \<and> finite \<V> \<and> bl \<noteq> {})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bl \<in># \<B> \<Longrightarrow> design \<V> \<B> = (bl \<subseteq> \<V> \<and> finite \<V> \<and> bl \<noteq> {})
[PROOF STEP]
using blocks_nempty wellformed finite_sets
[PROOF STATE]
proof (prove)
using this:
?bl \<in># \<B> \<Longrightarrow> ?bl \<noteq> {}
?b \<in># \<B> \<Longrightarrow> ?b \<subseteq> \<V>
finite \<V>

goal (1 subgoal):
 1. bl \<in># \<B> \<Longrightarrow> design \<V> \<B> = (bl \<subseteq> \<V> \<and> finite \<V> \<and> bl \<noteq> {})
[PROOF STEP]
by (simp add: wf_design)


[STATEMENT]
lemma distinct_fst_inj:
  assumes "distinct (map fst ps)"
  and "inj f"
  shows "distinct (map fst (map (\<lambda>(k, v). (f k, v)) ps))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (map fst (map (\<lambda>(k, v). (f k, v)) ps))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. distinct (map fst (map (\<lambda>(k, v). (f k, v)) ps))
[PROOF STEP]
have "map fst (map (\<lambda>(k, v). (f k, v)) ps) = map f (map fst ps)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map fst (map (\<lambda>(k, v). (f k, v)) ps) = map f (map fst ps)
[PROOF STEP]
by (induction ps) auto
[PROOF STATE]
proof (state)
this:
map fst (map (\<lambda>(k, v). (f k, v)) ps) = map f (map fst ps)

goal (1 subgoal):
 1. distinct (map fst (map (\<lambda>(k, v). (f k, v)) ps))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
map fst (map (\<lambda>(k, v). (f k, v)) ps) = map f (map fst ps)

goal (1 subgoal):
 1. distinct (map fst (map (\<lambda>(k, v). (f k, v)) ps))
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
distinct (map fst ps)
inj f
[PROOF STEP]
have "distinct (map f (map fst ps))"
[PROOF STATE]
proof (prove)
using this:
distinct (map fst ps)
inj f

goal (1 subgoal):
 1. distinct (map f (map fst ps))
[PROOF STEP]
by (simp add: distinct_map inj_on_def)
[PROOF STATE]
proof (state)
this:
distinct (map f (map fst ps))

goal (1 subgoal):
 1. distinct (map fst (map (\<lambda>(k, v). (f k, v)) ps))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
map fst (map (\<lambda>(k, v). (f k, v)) ps) = map f (map fst ps)
distinct (map f (map fst ps))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
map fst (map (\<lambda>(k, v). (f k, v)) ps) = map f (map fst ps)
distinct (map f (map fst ps))

goal (1 subgoal):
 1. distinct (map fst (map (\<lambda>(k, v). (f k, v)) ps))
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
distinct (map fst (map (\<lambda>(k, v). (f k, v)) ps))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lcm_mult_right: "lcm (a * c) (b * c) = normalize (lcm b a * c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lcm (a * c) (b * c) = normalize (lcm b a * c)
[PROOF STEP]
using lcm_mult_left [of c a b]
[PROOF STATE]
proof (prove)
using this:
lcm (c * a) (c * b) = normalize (c * lcm a b)

goal (1 subgoal):
 1. lcm (a * c) (b * c) = normalize (lcm b a * c)
[PROOF STEP]
by (simp add: ac_simps)


[STATEMENT]
lemma partition_split:
  shows "set (fst (partition_split r x xs)) = set xs - (rel_ext r `` {x})"
    and "set (snd (partition_split r x xs)) = set xs \<inter> (rel_ext r `` {x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x} &&& set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}
[PROOF STEP]
proof(induct xs)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. set (fst (partition_split r x [])) = set [] - rel_ext r `` {x}
 2. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
 3. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 4. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:

goal (4 subgoals):
 1. set (fst (partition_split r x [])) = set [] - rel_ext r `` {x}
 2. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
 3. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 4. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:

goal (4 subgoals):
 1. set (fst (partition_split r x [])) = set [] - rel_ext r `` {x}
 2. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
 3. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 4. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:

goal (4 subgoals):
 1. set (fst (partition_split r x [])) = set [] - rel_ext r `` {x}
 2. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
 3. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 4. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
with Nil
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (fst (partition_split r x [])) = set [] - rel_ext r `` {x}
[PROOF STEP]
unfolding partition_split_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (fst (foldr (partition_split_body r x) [] ([], []))) = set [] - rel_ext r `` {x}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set (fst (partition_split r x [])) = set [] - rel_ext r `` {x}

goal (3 subgoals):
 1. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 3. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
set (fst (partition_split r x [])) = set [] - rel_ext r `` {x}

goal (3 subgoals):
 1. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 3. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
set (fst (partition_split r x [])) = set [] - rel_ext r `` {x}

goal (3 subgoals):
 1. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 3. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:

goal (3 subgoals):
 1. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 3. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
with Nil
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}
[PROOF STEP]
unfolding partition_split_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (snd (foldr (partition_split_body r x) [] ([], []))) = set [] \<inter> rel_ext r `` {x}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}

goal (2 subgoals):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
set (snd (partition_split r x [])) = set [] \<inter> rel_ext r `` {x}

goal (2 subgoals):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
case (Cons x xs)
[PROOF STATE]
proof (state)
this:
set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}
set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}

goal (2 subgoals):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}
set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}

goal (2 subgoals):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split r x (a # xs))) = set (a # xs) - rel_ext r `` {x}
 2. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
with Cons
[PROOF STATE]
proof (chain)
picking this:
set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}
set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}
set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}

goal (1 subgoal):
 1. set (fst (partition_split r x (x # xs))) = set (x # xs) - rel_ext r `` {x}
[PROOF STEP]
unfolding partition_split_def
[PROOF STATE]
proof (prove)
using this:
set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}
set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}

goal (1 subgoal):
 1. set (fst (foldr (partition_split_body r x) (x # xs) ([], []))) = set (x # xs) - rel_ext r `` {x}
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (partition_split_body r x x (foldr (partition_split_body r x) xs ([], [])))) = insert x (set xs) - rel_ext r `` {x}
[PROOF STEP]
apply (subst partition_split_body_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (fst (case foldr (partition_split_body r x) xs ([], []) of (X', xc) \<Rightarrow> if r (x, x) then (X', List.insert x xc) else (List.insert x X', xc))) = insert x (set xs) - rel_ext r `` {x}
[PROOF STEP]
apply (split prod.split)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> \<forall>x1 x2. foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> set (fst (if r (x, x) then (x1, List.insert x x2) else (List.insert x x1, x2))) = insert x (set xs) - rel_ext r `` {x}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> (r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> set x1 = set xs - rel_ext r `` {x}) \<and> (\<not> r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> insert x (set x1) = insert x (set xs) - rel_ext r `` {x})
[PROOF STEP]
apply rule
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1 x2. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> set x1 = set xs - rel_ext r `` {x}
 2. \<And>x1 x2. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> \<not> r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> insert x (set x1) = insert x (set xs) - rel_ext r `` {x}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> \<not> r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> insert x (set x1) = insert x (set xs) - rel_ext r `` {x}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2. \<lbrakk>set x1 = set xs - rel_ext r `` {x}; set x2 = set xs \<inter> rel_ext r `` {x}; \<not> r (x, x); foldr (partition_split_body r x) xs ([], []) = (x1, x2)\<rbrakk> \<Longrightarrow> insert x (set xs - rel_ext r `` {x}) = insert x (set xs) - rel_ext r `` {x}
[PROOF STEP]
unfolding Image_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2. \<lbrakk>set x1 = set xs - rel_ext (\<lambda>y. \<exists>x\<in>{x}. (x, y) \<in> rel_ext r); set x2 = set xs \<inter> rel_ext (\<lambda>y. \<exists>x\<in>{x}. (x, y) \<in> rel_ext r); \<not> r (x, x); foldr (partition_split_body r x) xs ([], []) = (x1, x2)\<rbrakk> \<Longrightarrow> insert x (set xs - rel_ext (\<lambda>y. \<exists>x\<in>{x}. (x, y) \<in> rel_ext r)) = insert x (set xs) - rel_ext (\<lambda>y. \<exists>x\<in>{x}. (x, y) \<in> rel_ext r)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
set (fst (partition_split r x (x # xs))) = set (x # xs) - rel_ext r `` {x}

goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
set (fst (partition_split r x (x # xs))) = set (x # xs) - rel_ext r `` {x}

goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
set (fst (partition_split r x (x # xs))) = set (x # xs) - rel_ext r `` {x}

goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:

goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}; set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split r x (a # xs))) = set (a # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
with Cons
[PROOF STATE]
proof (chain)
picking this:
set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}
set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
set (fst (partition_split r x xs)) = set xs - rel_ext r `` {x}
set (snd (partition_split r x xs)) = set xs \<inter> rel_ext r `` {x}

goal (1 subgoal):
 1. set (snd (partition_split r x (x # xs))) = set (x # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
unfolding partition_split_def
[PROOF STATE]
proof (prove)
using this:
set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}
set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}

goal (1 subgoal):
 1. set (snd (foldr (partition_split_body r x) (x # xs) ([], []))) = set (x # xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (partition_split_body r x x (foldr (partition_split_body r x) xs ([], [])))) = insert x (set xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
apply (subst partition_split_body_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> set (snd (case foldr (partition_split_body r x) xs ([], []) of (X', xc) \<Rightarrow> if r (x, x) then (X', List.insert x xc) else (List.insert x X', xc))) = insert x (set xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
apply (split prod.split)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> \<forall>x1 x2. foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> set (snd (if r (x, x) then (x1, List.insert x x2) else (List.insert x x1, x2))) = insert x (set xs) \<inter> rel_ext r `` {x}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> (r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> insert x (set x2) = insert x (set xs \<inter> rel_ext r `` {x})) \<and> (\<not> r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> set x2 = set xs \<inter> rel_ext r `` {x})
[PROOF STEP]
apply rule
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1 x2. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> insert x (set x2) = insert x (set xs \<inter> rel_ext r `` {x})
 2. \<And>x1 x2. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> \<not> r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> set x2 = set xs \<inter> rel_ext r `` {x}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2. \<lbrakk>set (fst (foldr (partition_split_body r x) xs ([], []))) = set xs - rel_ext r `` {x}; set (snd (foldr (partition_split_body r x) xs ([], []))) = set xs \<inter> rel_ext r `` {x}\<rbrakk> \<Longrightarrow> \<not> r (x, x) \<longrightarrow> foldr (partition_split_body r x) xs ([], []) = (x1, x2) \<longrightarrow> set x2 = set xs \<inter> rel_ext r `` {x}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
set (snd (partition_split r x (x # xs))) = set (x # xs) \<inter> rel_ext r `` {x}

goal:
No subgoals!
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
set (snd (partition_split r x (x # xs))) = set (x # xs) \<inter> rel_ext r `` {x}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eqvtRelI:
  fixes Rel  :: "('a::pt_name \<times> 'a) set"
  and   P    :: 'a
  and   Q    :: 'a
  and   perm :: "name prm"

  assumes "eqvt Rel"
  and     "(P, Q) \<in> Rel"

  shows "(perm \<bullet> P, perm \<bullet> Q) \<in> Rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (perm \<bullet> P, perm \<bullet> Q) \<in> Rel
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
eqvt Rel
(P, Q) \<in> Rel

goal (1 subgoal):
 1. (perm \<bullet> P, perm \<bullet> Q) \<in> Rel
[PROOF STEP]
by(auto simp add: eqvt_def)


[STATEMENT]
lemma unitary_special:
  assumes "unitary M" and "mat_det M = 1"
  shows "\<exists> a b. M = (a, b, -cnj b, cnj a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a b. M = (a, b, - cnj b, cnj a)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a b. M = (a, b, - cnj b, cnj a)
[PROOF STEP]
have "mat_adj M = mat_inv M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_adj M = mat_inv M
[PROOF STEP]
using assms mult_mm_inv_r[of M "mat_adj M" "eye"] mat_eye_r mat_eye_l
[PROOF STATE]
proof (prove)
using this:
unitary M
mat_det M = 1
\<lbrakk>mat_det M \<noteq> 0; mat_adj M *\<^sub>m\<^sub>m M = eye\<rbrakk> \<Longrightarrow> mat_adj M = eye *\<^sub>m\<^sub>m mat_inv M
?A *\<^sub>m\<^sub>m eye = ?A
eye *\<^sub>m\<^sub>m ?A = ?A

goal (1 subgoal):
 1. mat_adj M = mat_inv M
[PROOF STEP]
by (simp add: unitary_def)
[PROOF STATE]
proof (state)
this:
mat_adj M = mat_inv M

goal (1 subgoal):
 1. \<exists>a b. M = (a, b, - cnj b, cnj a)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
mat_adj M = mat_inv M

goal (1 subgoal):
 1. \<exists>a b. M = (a, b, - cnj b, cnj a)
[PROOF STEP]
using \<open>mat_det M = 1\<close>
[PROOF STATE]
proof (prove)
using this:
mat_adj M = mat_inv M
mat_det M = 1

goal (1 subgoal):
 1. \<exists>a b. M = (a, b, - cnj b, cnj a)
[PROOF STEP]
by (cases M) (auto simp add: mat_adj_def mat_cnj_def)
[PROOF STATE]
proof (state)
this:
\<exists>a b. M = (a, b, - cnj b, cnj a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Append_mono: "U \<subseteq> V \<Longrightarrow> P \<subseteq> Q \<Longrightarrow> Append U k P \<subseteq> Append V k Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>U \<subseteq> V; P \<subseteq> Q\<rbrakk> \<Longrightarrow> Append U k P \<subseteq> Append V k Q
[PROOF STEP]
by (auto simp add: Append_def)


[STATEMENT]
lemma diagonal_to_Smith_aux_append:
  "diagonal_to_Smith_aux A (xs @ ys) bezout
    = diagonal_to_Smith_aux (diagonal_to_Smith_aux A xs bezout) ys bezout"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. diagonal_to_Smith_aux A (xs @ ys) bezout = diagonal_to_Smith_aux (diagonal_to_Smith_aux A xs bezout) ys bezout
[PROOF STEP]
by (induct A xs bezout rule: diagonal_to_Smith_aux.induct, auto)


[STATEMENT]
lemma typeII_edges_are_valid_paths:
  assumes "typeII_twoCube twoC" "(k,\<gamma>) \<in> boundary twoC"
  shows "valid_path \<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid_path \<gamma>
[PROOF STEP]
using typeII_twoCube_smooth_edges[OF assms] C1_differentiable_imp_piecewise
[PROOF STATE]
proof (prove)
using this:
\<gamma> piecewise_C1_differentiable_on {0..1}
?f C1_differentiable_on ?S \<Longrightarrow> ?f piecewise_C1_differentiable_on ?S

goal (1 subgoal):
 1. valid_path \<gamma>
[PROOF STEP]
by (auto simp: valid_path_def)


[STATEMENT]
theorem tm_step0_rel_iff_step0: "(c1 \<Turnstile>\<langle>tp\<rangle>\<Midarrow> c2) \<longleftrightarrow> step0 c1 tp = c2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c1 \<Turnstile>\<langle>tp\<rangle>\<Midarrow> c2) = (step0 c1 tp = c2)
[PROOF STEP]
unfolding tm_step0_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((c1, c2) \<in> {(c1, y). step0 c1 tp = y}) = (step0 c1 tp = c2)
[PROOF STEP]
by auto


[STATEMENT]
lemma iT_Plus_Plus_neg_assoc: "b \<le> a \<Longrightarrow> I \<oplus> a \<oplus>- b = I \<oplus> (a - b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b \<le> a \<Longrightarrow> I \<oplus> a \<oplus>- b = I \<oplus> a - b
[PROOF STEP]
apply (simp add: iT_Plus_neg_image_conv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b \<le> a \<Longrightarrow> (\<lambda>n. n - b) ` (I \<oplus> a) \<down>\<ge> b = I \<oplus> a - b
[PROOF STEP]
apply (clarsimp simp add: set_eq_iff image_iff Bex_def cut_ge_mem_iff iT_Plus_mem_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. b \<le> a \<Longrightarrow> (\<exists>xa\<ge>a. xa - a \<in> I \<and> b \<le> xa \<and> x = xa - b) = (a - b \<le> x \<and> x + b - a \<in> I)
[PROOF STEP]
apply (rule iffI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>b \<le> a; \<exists>xa\<ge>a. xa - a \<in> I \<and> b \<le> xa \<and> x = xa - b\<rbrakk> \<Longrightarrow> a - b \<le> x \<and> x + b - a \<in> I
 2. \<And>x. \<lbrakk>b \<le> a; a - b \<le> x \<and> x + b - a \<in> I\<rbrakk> \<Longrightarrow> \<exists>xa\<ge>a. xa - a \<in> I \<and> b \<le> xa \<and> x = xa - b
[PROOF STEP]
apply fastforce
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>b \<le> a; a - b \<le> x \<and> x + b - a \<in> I\<rbrakk> \<Longrightarrow> \<exists>xa\<ge>a. xa - a \<in> I \<and> b \<le> xa \<and> x = xa - b
[PROOF STEP]
apply (rule_tac x="x + b" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>b \<le> a; a - b \<le> x \<and> x + b - a \<in> I\<rbrakk> \<Longrightarrow> a \<le> x + b \<and> x + b - a \<in> I \<and> b \<le> x + b \<and> x = x + b - b
[PROOF STEP]
apply (simp add: le_diff_conv)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma is_reachable_sim: "a \<in> a.E\<^sup>* `` a.V0 \<Longrightarrow> \<exists> b. (a, b) \<in> R \<and> b \<in> b.E\<^sup>* `` b.V0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> a.reachable \<Longrightarrow> \<exists>b. (a, b) \<in> R \<and> b \<in> b.reachable
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>(x, a) \<in> a.E\<^sup>*; x \<in> a.V0\<rbrakk> \<Longrightarrow> \<exists>b. (a, b) \<in> R \<and> b \<in> b.reachable
[PROOF STEP]
apply (erule rtrancl_induct)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> a.V0 \<Longrightarrow> \<exists>b. (x, b) \<in> R \<and> b \<in> b.reachable
 2. \<And>x y z. \<lbrakk>x \<in> a.V0; (x, y) \<in> a.E\<^sup>*; (y, z) \<in> a.E; \<exists>b. (y, b) \<in> R \<and> b \<in> b.reachable\<rbrakk> \<Longrightarrow> \<exists>b. (z, b) \<in> R \<and> b \<in> b.reachable
[PROOF STEP]
apply (metis ImageI init_sim rtrancl.rtrancl_refl)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y z. \<lbrakk>x \<in> a.V0; (x, y) \<in> a.E\<^sup>*; (y, z) \<in> a.E; \<exists>b. (y, b) \<in> R \<and> b \<in> b.reachable\<rbrakk> \<Longrightarrow> \<exists>b. (z, b) \<in> R \<and> b \<in> b.reachable
[PROOF STEP]
apply (metis rtrancl_image_advance step_sim)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma nat_to_string___is_nat_string [simp]:
  "is_nat_string (nat_to_string n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_nat_string (nat_to_string n)
[PROOF STEP]
unfolding is_nat_string_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>c\<in>set (nat_to_string n). is_digit_char c
[PROOF STEP]
proof (induct n rule: nat_to_string_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>d. is_digit d \<Longrightarrow> \<forall>c\<in>set (nat_to_string d). is_digit_char c
 2. \<And>n. \<lbrakk>\<not> is_digit n; \<forall>c\<in>set (nat_to_string (n div 10)). is_digit_char c; \<forall>c\<in>set (nat_to_string (n mod 10)). is_digit_char c\<rbrakk> \<Longrightarrow> \<forall>c\<in>set (nat_to_string n). is_digit_char c
[PROOF STEP]
case (digit d)
[PROOF STATE]
proof (state)
this:
is_digit d

goal (2 subgoals):
 1. \<And>d. is_digit d \<Longrightarrow> \<forall>c\<in>set (nat_to_string d). is_digit_char c
 2. \<And>n. \<lbrakk>\<not> is_digit n; \<forall>c\<in>set (nat_to_string (n div 10)). is_digit_char c; \<forall>c\<in>set (nat_to_string (n mod 10)). is_digit_char c\<rbrakk> \<Longrightarrow> \<forall>c\<in>set (nat_to_string n). is_digit_char c
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
is_digit d

goal (1 subgoal):
 1. \<forall>c\<in>set (nat_to_string d). is_digit_char c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>c\<in>set (nat_to_string d). is_digit_char c

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<not> is_digit n; \<forall>c\<in>set (nat_to_string (n div 10)). is_digit_char c; \<forall>c\<in>set (nat_to_string (n mod 10)). is_digit_char c\<rbrakk> \<Longrightarrow> \<forall>c\<in>set (nat_to_string n). is_digit_char c
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<not> is_digit n; \<forall>c\<in>set (nat_to_string (n div 10)). is_digit_char c; \<forall>c\<in>set (nat_to_string (n mod 10)). is_digit_char c\<rbrakk> \<Longrightarrow> \<forall>c\<in>set (nat_to_string n). is_digit_char c
[PROOF STEP]
case (non_digit n)
[PROOF STATE]
proof (state)
this:
\<not> is_digit n
\<forall>c\<in>set (nat_to_string (n div 10)). is_digit_char c
\<forall>c\<in>set (nat_to_string (n mod 10)). is_digit_char c

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<not> is_digit n; \<forall>c\<in>set (nat_to_string (n div 10)). is_digit_char c; \<forall>c\<in>set (nat_to_string (n mod 10)). is_digit_char c\<rbrakk> \<Longrightarrow> \<forall>c\<in>set (nat_to_string n). is_digit_char c
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<not> is_digit n
\<forall>c\<in>set (nat_to_string (n div 10)). is_digit_char c
\<forall>c\<in>set (nat_to_string (n mod 10)). is_digit_char c

goal (1 subgoal):
 1. \<forall>c\<in>set (nat_to_string n). is_digit_char c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>c\<in>set (nat_to_string n). is_digit_char c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma USUP_all_cong:
  assumes "\<And> P. F(P) = G(P)"
  shows "(\<Squnion> P \<bullet> F(P)) = (\<Squnion> P \<bullet> G(P))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion> P \<bullet> F P) = (\<Squnion> P \<bullet> G P)
[PROOF STEP]
by (simp add: assms)


[STATEMENT]
lemma enum_ind_spec:
  "enum_ind (x :: 'a::enum) = (THE i. i < CARD('a) \<and> Enum.enum ! i = x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enum_ind x = (THE i. i < CARD('a) \<and> enum_class.enum ! i = x)
[PROOF STEP]
proof (rule sym, rule the_equality, safe)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. enum_ind x < CARD('a)
 2. enum_class.enum ! enum_ind x = x
 3. \<And>i. \<lbrakk>i < CARD('a); x = enum_class.enum ! i\<rbrakk> \<Longrightarrow> i = enum_ind (enum_class.enum ! i)
[PROOF STEP]
show "enum_ind x < CARD('a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enum_ind x < CARD('a)
[PROOF STEP]
by (simp add: enum_ind_less_CARD[of x])
[PROOF STATE]
proof (state)
this:
enum_ind x < CARD('a)

goal (2 subgoals):
 1. enum_class.enum ! enum_ind x = x
 2. \<And>i. \<lbrakk>i < CARD('a); x = enum_class.enum ! i\<rbrakk> \<Longrightarrow> i = enum_ind (enum_class.enum ! i)
[PROOF STEP]
show "enum_class.enum ! enum_ind x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enum_class.enum ! enum_ind x = x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
enum_class.enum ! enum_ind x = x

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i < CARD('a); x = enum_class.enum ! i\<rbrakk> \<Longrightarrow> i = enum_ind (enum_class.enum ! i)
[PROOF STEP]
show "\<And>i. i < CARD('a) \<Longrightarrow> x = ENUM('a) ! i \<Longrightarrow> i = enum_ind (ENUM('a) ! i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>i < CARD('a); x = enum_class.enum ! i\<rbrakk> \<Longrightarrow> i = enum_ind (enum_class.enum ! i)
[PROOF STEP]
by (simp add: enum_ind_nth)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i < CARD('a); x = enum_class.enum ! ?i\<rbrakk> \<Longrightarrow> ?i = enum_ind (enum_class.enum ! ?i)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma funas_mctxt_fill_holes [simp]:
  assumes "num_holes C = length ts"
  shows "funas_term (fill_holes C ts) = funas_mctxt C \<union> \<Union>(set (map funas_term ts))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. funas_term (fill_holes C ts) = funas_mctxt C \<union> \<Union> (set (map funas_term ts))
[PROOF STEP]
using funas_term_fill_holes_iff[OF assms]
[PROOF STATE]
proof (prove)
using this:
(?g \<in> funas_term (fill_holes C ts)) = (?g \<in> funas_mctxt C \<or> (\<exists>t\<in>set ts. ?g \<in> funas_term t))

goal (1 subgoal):
 1. funas_term (fill_holes C ts) = funas_mctxt C \<union> \<Union> (set (map funas_term ts))
[PROOF STEP]
by auto


[STATEMENT]
lemma (in is_semifunctor) smcf_smcf_comp_smcf_id_right[smc_cs_simps]:
  \<comment>\<open>See Chapter I-3 in \cite{mac_lane_categories_2010}).\<close>
  "\<FF> \<circ>\<^sub>S\<^sub>M\<^sub>C\<^sub>F smcf_id \<AA> = \<FF>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<FF> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M dghm_id \<AA> = \<FF>
[PROOF STEP]
by (rule smcf_eqI, unfold dghm_id_components dghm_comp_components)
    (
      auto
        simp: smcf_ObjMap_vrange smcf_ArrMap_vrange smc_cs_simps
        intro: smc_cs_intros
    )


[STATEMENT]
lemma concat_leaf_nodes_lrange_lrange: "concat_leaf_nodes_lrange t x = lrange t x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. concat_leaf_nodes_lrange t x = lrange t x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. concat_leaf_nodes_lrange t x = lrange t x
[PROOF STEP]
obtain ks list where *: "leaf_nodes_lrange t x = (Leaf ks)#list"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>ks list. leaf_nodes_lrange t x = Leaf ks # list \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using leaf_nodes_lrange_not_empty
[PROOF STATE]
proof (prove)
using this:
\<exists>ks list. leaf_nodes_lrange ?t ?x = Leaf ks # list \<and> Leaf ks \<in> set (leaf_nodes ?t)

goal (1 subgoal):
 1. (\<And>ks list. leaf_nodes_lrange t x = Leaf ks # list \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
leaf_nodes_lrange t x = Leaf ks # list

goal (1 subgoal):
 1. concat_leaf_nodes_lrange t x = lrange t x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
leaf_nodes_lrange t x = Leaf ks # list
[PROOF STEP]
have "concat_leaf_nodes_lrange t x = lrange_list x ks @ (concat (map leaves list))"
[PROOF STATE]
proof (prove)
using this:
leaf_nodes_lrange t x = Leaf ks # list

goal (1 subgoal):
 1. concat_leaf_nodes_lrange t x = lrange_list x ks @ concat (map leaves list)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
concat_leaf_nodes_lrange t x = lrange_list x ks @ concat (map leaves list)

goal (1 subgoal):
 1. concat_leaf_nodes_lrange t x = lrange t x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
concat_leaf_nodes_lrange t x = lrange_list x ks @ concat (map leaves list)

goal (1 subgoal):
 1. concat_leaf_nodes_lrange t x = lrange t x
[PROOF STEP]
have "\<dots> = lrange t x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lrange_list x ks @ concat (map leaves list) = lrange t x
[PROOF STEP]
using leaf_nodes_lrange_pre_lrange[OF *]
[PROOF STATE]
proof (prove)
using this:
lrange_list x ks @ concat (map leaves list) = lrange t x

goal (1 subgoal):
 1. lrange_list x ks @ concat (map leaves list) = lrange t x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lrange_list x ks @ concat (map leaves list) = lrange t x

goal (1 subgoal):
 1. concat_leaf_nodes_lrange t x = lrange t x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
concat_leaf_nodes_lrange t x = lrange t x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
concat_leaf_nodes_lrange t x = lrange t x

goal (1 subgoal):
 1. concat_leaf_nodes_lrange t x = lrange t x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
concat_leaf_nodes_lrange t x = lrange t x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finsum_index:
  assumes i: "i < n"
    and f: "f \<in> X \<rightarrow> carrier_vec n"
    and X: "X \<subseteq> carrier_vec n"
  shows "finsum V f X $ i = sum (\<lambda>x. f x $ i) X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finsum V f X $ i = (\<Sum>x\<in>X. f x $ i)
[PROOF STEP]
using X f
[PROOF STATE]
proof (prove)
using this:
X \<subseteq> carrier_vec n
f \<in> X \<rightarrow> carrier_vec n

goal (1 subgoal):
 1. finsum V f X $ i = (\<Sum>x\<in>X. f x $ i)
[PROOF STEP]
proof (induct X rule: infinite_finite_induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
 2. \<lbrakk>{} \<subseteq> carrier_vec n; f \<in> {} \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f {} $ i = (\<Sum>x\<in>{}. f x $ i)
 3. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>F \<subseteq> carrier_vec n; f \<in> F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f F $ i = (\<Sum>x\<in>F. f x $ i); insert x F \<subseteq> carrier_vec n; f \<in> insert x F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f (insert x F) $ i = (\<Sum>x\<in>insert x F. f x $ i)
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:
{} \<subseteq> carrier_vec n
f \<in> {} \<rightarrow> carrier_vec n

goal (3 subgoals):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
 2. \<lbrakk>{} \<subseteq> carrier_vec n; f \<in> {} \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f {} $ i = (\<Sum>x\<in>{}. f x $ i)
 3. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>F \<subseteq> carrier_vec n; f \<in> F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f F $ i = (\<Sum>x\<in>F. f x $ i); insert x F \<subseteq> carrier_vec n; f \<in> insert x F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f (insert x F) $ i = (\<Sum>x\<in>insert x F. f x $ i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{} \<subseteq> carrier_vec n
f \<in> {} \<rightarrow> carrier_vec n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
{} \<subseteq> carrier_vec n
f \<in> {} \<rightarrow> carrier_vec n

goal (1 subgoal):
 1. finsum V f {} $ i = (\<Sum>x\<in>{}. f x $ i)
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
{} \<subseteq> carrier_vec n
f \<in> {} \<rightarrow> carrier_vec n
i < n

goal (1 subgoal):
 1. finsum V f {} $ i = (\<Sum>x\<in>{}. f x $ i)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finsum V f {} $ i = (\<Sum>x\<in>{}. f x $ i)

goal (2 subgoals):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>F \<subseteq> carrier_vec n; f \<in> F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f F $ i = (\<Sum>x\<in>F. f x $ i); insert x F \<subseteq> carrier_vec n; f \<in> insert x F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f (insert x F) $ i = (\<Sum>x\<in>insert x F. f x $ i)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>F \<subseteq> carrier_vec n; f \<in> F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f F $ i = (\<Sum>x\<in>F. f x $ i); insert x F \<subseteq> carrier_vec n; f \<in> insert x F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f (insert x F) $ i = (\<Sum>x\<in>insert x F. f x $ i)
[PROOF STEP]
case (insert x X)
[PROOF STATE]
proof (state)
this:
finite X
x \<notin> X
\<lbrakk>X \<subseteq> carrier_vec n; f \<in> X \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f X $ i = (\<Sum>x\<in>X. f x $ i)
insert x X \<subseteq> carrier_vec n
f \<in> insert x X \<rightarrow> carrier_vec n

goal (2 subgoals):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>F \<subseteq> carrier_vec n; f \<in> F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f F $ i = (\<Sum>x\<in>F. f x $ i); insert x F \<subseteq> carrier_vec n; f \<in> insert x F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f (insert x F) $ i = (\<Sum>x\<in>insert x F. f x $ i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite X
x \<notin> X
\<lbrakk>X \<subseteq> carrier_vec n; f \<in> X \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f X $ i = (\<Sum>x\<in>X. f x $ i)
insert x X \<subseteq> carrier_vec n
f \<in> insert x X \<rightarrow> carrier_vec n
[PROOF STEP]
have Xf: "finite X"
      and xX: "x \<notin> X"
      and x: "x \<in> carrier_vec n"
      and X: "X \<subseteq> carrier_vec n"
      and fx: "f x \<in> carrier_vec n"
      and f: "f \<in> X \<rightarrow> carrier_vec n"
[PROOF STATE]
proof (prove)
using this:
finite X
x \<notin> X
\<lbrakk>X \<subseteq> carrier_vec n; f \<in> X \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f X $ i = (\<Sum>x\<in>X. f x $ i)
insert x X \<subseteq> carrier_vec n
f \<in> insert x X \<rightarrow> carrier_vec n

goal (1 subgoal):
 1. (finite X &&& x \<notin> X &&& x \<in> carrier_vec n) &&& X \<subseteq> carrier_vec n &&& f x \<in> carrier_vec n &&& f \<in> X \<rightarrow> carrier_vec n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite X
x \<notin> X
x \<in> carrier_vec n
X \<subseteq> carrier_vec n
f x \<in> carrier_vec n
f \<in> X \<rightarrow> carrier_vec n

goal (2 subgoals):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>F \<subseteq> carrier_vec n; f \<in> F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f F $ i = (\<Sum>x\<in>F. f x $ i); insert x F \<subseteq> carrier_vec n; f \<in> insert x F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f (insert x F) $ i = (\<Sum>x\<in>insert x F. f x $ i)
[PROOF STEP]
have i2: "i < dim_vec (finsum V f X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < dim_vec (finsum V f X)
[PROOF STEP]
using i finsum_closed[OF f]
[PROOF STATE]
proof (prove)
using this:
i < n
finsum V f X \<in> carrier_vec n

goal (1 subgoal):
 1. i < dim_vec (finsum V f X)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < dim_vec (finsum V f X)

goal (2 subgoals):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>F \<subseteq> carrier_vec n; f \<in> F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f F $ i = (\<Sum>x\<in>F. f x $ i); insert x F \<subseteq> carrier_vec n; f \<in> insert x F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f (insert x F) $ i = (\<Sum>x\<in>insert x F. f x $ i)
[PROOF STEP]
have ix: "i < dim_vec x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < dim_vec x
[PROOF STEP]
using x i
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier_vec n
i < n

goal (1 subgoal):
 1. i < dim_vec x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < dim_vec x

goal (2 subgoals):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>F \<subseteq> carrier_vec n; f \<in> F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f F $ i = (\<Sum>x\<in>F. f x $ i); insert x F \<subseteq> carrier_vec n; f \<in> insert x F \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f (insert x F) $ i = (\<Sum>x\<in>insert x F. f x $ i)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finsum V f (insert x X) $ i = (\<Sum>x\<in>insert x X. f x $ i)
[PROOF STEP]
unfolding finsum_insert[OF Xf xX f fx]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f x + finsum V f X) $ i = (\<Sum>x\<in>insert x X. f x $ i)
[PROOF STEP]
unfolding sum.insert[OF Xf xX]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f x + finsum V f X) $ i = f x $ i + (\<Sum>x\<in>X. f x $ i)
[PROOF STEP]
unfolding index_add_vec(1)[OF i2]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x $ i + finsum V f X $ i = f x $ i + (\<Sum>x\<in>X. f x $ i)
[PROOF STEP]
using insert lincomb_def
[PROOF STATE]
proof (prove)
using this:
finite X
x \<notin> X
\<lbrakk>X \<subseteq> carrier_vec n; f \<in> X \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f X $ i = (\<Sum>x\<in>X. f x $ i)
insert x X \<subseteq> carrier_vec n
f \<in> insert x X \<rightarrow> carrier_vec n
lincomb ?a ?A = (\<Oplus>\<^bsub>V\<^esub>v\<in>?A. ?a v \<cdot>\<^sub>v v)

goal (1 subgoal):
 1. f x $ i + finsum V f X $ i = f x $ i + (\<Sum>x\<in>X. f x $ i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finsum V f (insert x X) $ i = (\<Sum>x\<in>insert x X. f x $ i)

goal (1 subgoal):
 1. \<And>A. \<lbrakk>infinite A; A \<subseteq> carrier_vec n; f \<in> A \<rightarrow> carrier_vec n\<rbrakk> \<Longrightarrow> finsum V f A $ i = (\<Sum>x\<in>A. f x $ i)
[PROOF STEP]
qed (insert i, auto)


[STATEMENT]
lemma facetrelI_card: "y \<subseteq> x \<Longrightarrow> card (x-y) = 1 \<Longrightarrow> y \<lhd> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>y \<subseteq> x; card (x - y) = 1\<rbrakk> \<Longrightarrow> y \<lhd> x
[PROOF STEP]
using card1[of "x-y"]
[PROOF STATE]
proof (prove)
using this:
card (x - y) = 1 \<Longrightarrow> \<exists>a. x - y = {a}

goal (1 subgoal):
 1. \<lbrakk>y \<subseteq> x; card (x - y) = 1\<rbrakk> \<Longrightarrow> y \<lhd> x
[PROOF STEP]
by (blast intro: facetrelI)


[STATEMENT]
lemma Nle0_iff[simp]:
  assumes nx: "isnormNum x"
  shows "((INum x :: 'a::{field_char_0,linordered_field}) \<le> 0) = 0\<ge>\<^sub>N x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
obtain a b where x: "x = (a, b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a b. x = (a, b) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases x)
[PROOF STATE]
proof (state)
this:
x = (a, b)

goal (1 subgoal):
 1. (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
proof (cases "a = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a = 0 \<Longrightarrow> (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
 2. a \<noteq> 0 \<Longrightarrow> (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
a = 0

goal (2 subgoals):
 1. a = 0 \<Longrightarrow> (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
 2. a \<noteq> 0 \<Longrightarrow> (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a = 0

goal (1 subgoal):
 1. (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
by (simp add: x Nle0_def INum_def)
[PROOF STATE]
proof (state)
this:
(INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x

goal (1 subgoal):
 1. a \<noteq> 0 \<Longrightarrow> (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<noteq> 0 \<Longrightarrow> (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
a \<noteq> 0

goal (1 subgoal):
 1. a \<noteq> 0 \<Longrightarrow> (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<noteq> 0
[PROOF STEP]
have b: "(of_int b :: 'a) > 0"
[PROOF STATE]
proof (prove)
using this:
a \<noteq> 0

goal (1 subgoal):
 1. (0::'a) < of_int b
[PROOF STEP]
using nx
[PROOF STATE]
proof (prove)
using this:
a \<noteq> 0
isnormNum x

goal (1 subgoal):
 1. (0::'a) < of_int b
[PROOF STEP]
by (simp add: x isnormNum_def)
[PROOF STATE]
proof (state)
this:
(0::'a) < of_int b

goal (1 subgoal):
 1. a \<noteq> 0 \<Longrightarrow> (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
from pos_divide_le_eq[OF b, where b="of_int a" and a="0::'a"]
[PROOF STATE]
proof (chain)
picking this:
(of_int a / of_int b \<le> (0::'a)) = (of_int a \<le> (0::'a) * of_int b)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(of_int a / of_int b \<le> (0::'a)) = (of_int a \<le> (0::'a) * of_int b)

goal (1 subgoal):
 1. (INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x
[PROOF STEP]
by (simp add: x Nle0_def INum_def)
[PROOF STATE]
proof (state)
this:
(INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(INum x \<le> (0::'a)) = 0\<ge>\<^sub>N x

goal:
No subgoals!
[PROOF STEP]
qed