[STATEMENT]
lemma set_less_eq_aux_rec:
  assumes "finite A" "finite B" "A \<noteq> {}" "B \<noteq> {}"
  shows "A \<sqsubseteq>' B \<longleftrightarrow> Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
proof(cases "A = B")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A = B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
 2. A \<noteq> B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
A = B

goal (2 subgoals):
 1. A = B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
 2. A \<noteq> B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
A = B

goal (1 subgoal):
 1. (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A = B
finite A
finite B
A \<noteq> {}
B \<noteq> {}

goal (1 subgoal):
 1. (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
by(simp add: finite_complement_partition)
[PROOF STATE]
proof (state)
this:
(A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})

goal (1 subgoal):
 1. A \<noteq> B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A \<noteq> B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
A \<noteq> B

goal (1 subgoal):
 1. A \<noteq> B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
A \<noteq> B

goal (1 subgoal):
 1. A \<noteq> B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
hence "Min A = Min B \<Longrightarrow> A - {Min A} \<noteq> B - {Min B}"
[PROOF STATE]
proof (prove)
using this:
A \<noteq> B

goal (1 subgoal):
 1. Min A = Min B \<Longrightarrow> A - {Min A} \<noteq> B - {Min B}
[PROOF STEP]
by (metis (lifting) assms Min_in insert_Diff)
[PROOF STATE]
proof (state)
this:
Min A = Min B \<Longrightarrow> A - {Min A} \<noteq> B - {Min B}

goal (1 subgoal):
 1. A \<noteq> B \<Longrightarrow> (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
A \<noteq> B
Min A = Min B \<Longrightarrow> A - {Min A} \<noteq> B - {Min B}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A \<noteq> B
Min A = Min B \<Longrightarrow> A - {Min A} \<noteq> B - {Min B}

goal (1 subgoal):
 1. (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
using set_less_aux_rec[OF assms]
[PROOF STATE]
proof (prove)
using this:
A \<noteq> B
Min A = Min B \<Longrightarrow> A - {Min A} \<noteq> B - {Min B}
(A \<sqsubset>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubset>' B - {Min A})

goal (1 subgoal):
 1. (A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})
[PROOF STEP]
by(simp add: set_less_eq_aux_def cong: conj_cong)
[PROOF STATE]
proof (state)
this:
(A \<sqsubseteq>' B) = (Min B < Min A \<or> Min A = Min B \<and> A - {Min A} \<sqsubseteq>' B - {Min A})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma span_neg: "x \<in> span S \<Longrightarrow> - x \<in> span S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> span S \<Longrightarrow> - x \<in> span S
[PROOF STEP]
by (metis subspace_neg subspace_span)


[STATEMENT]
lemma fset_eq_empty_iff: "(fset X = {}) = (X = {||})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fset X = {}) = (X = {||})
[PROOF STEP]
by (metis bot_fset.rep_eq fset_inverse)


[STATEMENT]
lemma coprime_poly_x_minus_y_poly_lift:
  fixes p q :: "'a :: ufd poly"
  assumes degp: "degree p > 0" and degq: "degree q > 0"
    and pr: "primitive p"
  shows "coprime (poly_x_minus_y p) (poly_lift q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q)
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from degp
[PROOF STATE]
proof (chain)
picking this:
0 < degree p
[PROOF STEP]
have p: "\<not> p dvd 1"
[PROOF STATE]
proof (prove)
using this:
0 < degree p

goal (1 subgoal):
 1. \<not> p dvd 1
[PROOF STEP]
by (auto simp: dvd_const)
[PROOF STATE]
proof (state)
this:
\<not> p dvd 1

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from degp
[PROOF STATE]
proof (chain)
picking this:
0 < degree p
[PROOF STEP]
have p0: "p \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
0 < degree p

goal (1 subgoal):
 1. p \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p \<noteq> 0

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from mset_factors_exist[of p, OF p0 p]
[PROOF STATE]
proof (chain)
picking this:
\<exists>F. mset_factors F p
[PROOF STEP]
obtain F where F: "mset_factors F p"
[PROOF STATE]
proof (prove)
using this:
\<exists>F. mset_factors F p

goal (1 subgoal):
 1. (\<And>F. mset_factors F p \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset_factors F p

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
with poly_x_minus_y_hom.hom_mset_factors
[PROOF STATE]
proof (chain)
picking this:
mset_factors ?F ?p \<Longrightarrow> mset_factors (image_mset poly_x_minus_y ?F) (poly_x_minus_y ?p)
mset_factors F p
[PROOF STEP]
have pF: "mset_factors (image_mset poly_x_minus_y F) (poly_x_minus_y p)"
[PROOF STATE]
proof (prove)
using this:
mset_factors ?F ?p \<Longrightarrow> mset_factors (image_mset poly_x_minus_y ?F) (poly_x_minus_y ?p)
mset_factors F p

goal (1 subgoal):
 1. mset_factors (image_mset poly_x_minus_y F) (poly_x_minus_y p)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset_factors (image_mset poly_x_minus_y F) (poly_x_minus_y p)

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from degq
[PROOF STATE]
proof (chain)
picking this:
0 < degree q
[PROOF STEP]
have q: "\<not> q dvd 1"
[PROOF STATE]
proof (prove)
using this:
0 < degree q

goal (1 subgoal):
 1. \<not> q dvd 1
[PROOF STEP]
by (auto simp: dvd_const)
[PROOF STATE]
proof (state)
this:
\<not> q dvd 1

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from degq
[PROOF STATE]
proof (chain)
picking this:
0 < degree q
[PROOF STEP]
have q0: "q \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
0 < degree q

goal (1 subgoal):
 1. q \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
q \<noteq> 0

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from mset_factors_exist[OF q0 q]
[PROOF STATE]
proof (chain)
picking this:
\<exists>F. mset_factors F q
[PROOF STEP]
obtain G where G: "mset_factors G q"
[PROOF STATE]
proof (prove)
using this:
\<exists>F. mset_factors F q

goal (1 subgoal):
 1. (\<And>G. mset_factors G q \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset_factors G q

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
with poly_lift_hom.hom_mset_factors
[PROOF STATE]
proof (chain)
picking this:
mset_factors ?F ?p \<Longrightarrow> mset_factors (image_mset poly_lift ?F) (poly_lift ?p)
mset_factors G q
[PROOF STEP]
have pG: "mset_factors (image_mset poly_lift G) (poly_lift q)"
[PROOF STATE]
proof (prove)
using this:
mset_factors ?F ?p \<Longrightarrow> mset_factors (image_mset poly_lift ?F) (poly_lift ?p)
mset_factors G q

goal (1 subgoal):
 1. mset_factors (image_mset poly_lift G) (poly_lift q)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset_factors (image_mset poly_lift G) (poly_lift q)

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> coprime (poly_x_minus_y p) (poly_lift q)"
[PROOF STATE]
proof (state)
this:
\<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q)

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from this[unfolded not_coprime_iff_common_factor]
[PROOF STATE]
proof (chain)
picking this:
\<exists>r. r dvd poly_x_minus_y p \<and> r dvd poly_lift q \<and> \<not> r dvd 1
[PROOF STEP]
obtain r
  where rp: "r dvd (poly_x_minus_y p)"
    and rq: "r dvd (poly_lift q)"
    and rU: "\<not> r dvd 1"
[PROOF STATE]
proof (prove)
using this:
\<exists>r. r dvd poly_x_minus_y p \<and> r dvd poly_lift q \<and> \<not> r dvd 1

goal (1 subgoal):
 1. (\<And>r. \<lbrakk>r dvd poly_x_minus_y p; r dvd poly_lift q; \<not> r dvd 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r dvd poly_x_minus_y p
r dvd poly_lift q
\<not> r dvd 1

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
note poly_lift_hom.hom_dvd
[PROOF STATE]
proof (state)
this:
?p dvd ?q \<Longrightarrow> poly_lift ?p dvd poly_lift ?q

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from rp p0
[PROOF STATE]
proof (chain)
picking this:
r dvd poly_x_minus_y p
p \<noteq> 0
[PROOF STEP]
have r0: "r \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
r dvd poly_x_minus_y p
p \<noteq> 0

goal (1 subgoal):
 1. r \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r \<noteq> 0

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from mset_factors_exist[OF r0 rU]
[PROOF STATE]
proof (chain)
picking this:
\<exists>F. mset_factors F r
[PROOF STEP]
obtain H where H: "mset_factors H r"
[PROOF STATE]
proof (prove)
using this:
\<exists>F. mset_factors F r

goal (1 subgoal):
 1. (\<And>H. mset_factors H r \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset_factors H r

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
mset_factors H r
[PROOF STEP]
have "H \<noteq> {#}"
[PROOF STATE]
proof (prove)
using this:
mset_factors H r

goal (1 subgoal):
 1. H \<noteq> {#}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
H \<noteq> {#}

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
H \<noteq> {#}
[PROOF STEP]
obtain h where hH: "h \<in># H"
[PROOF STATE]
proof (prove)
using this:
H \<noteq> {#}

goal (1 subgoal):
 1. (\<And>h. h \<in># H \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
h \<in># H

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
with H mset_factors_imp_dvd
[PROOF STATE]
proof (chain)
picking this:
mset_factors H r
\<lbrakk>mset_factors ?F ?x; ?f \<in># ?F\<rbrakk> \<Longrightarrow> ?f dvd ?x
h \<in># H
[PROOF STEP]
have hr: "h dvd r" and h: "irreducible h"
[PROOF STATE]
proof (prove)
using this:
mset_factors H r
\<lbrakk>mset_factors ?F ?x; ?f \<in># ?F\<rbrakk> \<Longrightarrow> ?f dvd ?x
h \<in># H

goal (1 subgoal):
 1. h dvd r &&& irreducible h
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
h dvd r
irreducible h

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from irreducible_not_unit[OF h]
[PROOF STATE]
proof (chain)
picking this:
\<not> h dvd 1
[PROOF STEP]
have hU: "\<not> h dvd 1"
[PROOF STATE]
proof (prove)
using this:
\<not> h dvd 1

goal (1 subgoal):
 1. \<not> h dvd 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> h dvd 1

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from hr rp
[PROOF STATE]
proof (chain)
picking this:
h dvd r
r dvd poly_x_minus_y p
[PROOF STEP]
have "h dvd (poly_x_minus_y p)"
[PROOF STATE]
proof (prove)
using this:
h dvd r
r dvd poly_x_minus_y p

goal (1 subgoal):
 1. h dvd poly_x_minus_y p
[PROOF STEP]
by (rule dvd_trans)
[PROOF STATE]
proof (state)
this:
h dvd poly_x_minus_y p

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from irreducible_dvd_imp_factor[OF this h pF] p0
[PROOF STATE]
proof (chain)
picking this:
\<exists>g\<in>#image_mset poly_x_minus_y F. h ddvd g
p \<noteq> 0
[PROOF STEP]
obtain f where f: "f \<in># F" and fh: "poly_x_minus_y f ddvd h"
[PROOF STATE]
proof (prove)
using this:
\<exists>g\<in>#image_mset poly_x_minus_y F. h ddvd g
p \<noteq> 0

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>f \<in># F; poly_x_minus_y f ddvd h\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<in># F
poly_x_minus_y f ddvd h

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from hr rq
[PROOF STATE]
proof (chain)
picking this:
h dvd r
r dvd poly_lift q
[PROOF STEP]
have "h dvd (poly_lift q)"
[PROOF STATE]
proof (prove)
using this:
h dvd r
r dvd poly_lift q

goal (1 subgoal):
 1. h dvd poly_lift q
[PROOF STEP]
by (rule dvd_trans)
[PROOF STATE]
proof (state)
this:
h dvd poly_lift q

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from irreducible_dvd_imp_factor[OF this h pG] q0
[PROOF STATE]
proof (chain)
picking this:
\<exists>g\<in>#image_mset poly_lift G. h ddvd g
q \<noteq> 0
[PROOF STEP]
obtain g where g: "g \<in># G" and gh: "poly_lift g ddvd h"
[PROOF STATE]
proof (prove)
using this:
\<exists>g\<in>#image_mset poly_lift G. h ddvd g
q \<noteq> 0

goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g \<in># G; poly_lift g ddvd h\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g \<in># G
poly_lift g ddvd h

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
from fh gh
[PROOF STATE]
proof (chain)
picking this:
poly_x_minus_y f ddvd h
poly_lift g ddvd h
[PROOF STEP]
have "poly_x_minus_y f ddvd poly_lift g"
[PROOF STATE]
proof (prove)
using this:
poly_x_minus_y f ddvd h
poly_lift g ddvd h

goal (1 subgoal):
 1. poly_x_minus_y f ddvd poly_lift g
[PROOF STEP]
using ddvd_trans
[PROOF STATE]
proof (prove)
using this:
poly_x_minus_y f ddvd h
poly_lift g ddvd h
\<lbrakk>?x ddvd ?y; ?y ddvd ?z\<rbrakk> \<Longrightarrow> ?x ddvd ?z

goal (1 subgoal):
 1. poly_x_minus_y f ddvd poly_lift g
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
poly_x_minus_y f ddvd poly_lift g

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
poly_x_minus_y f ddvd poly_lift g
[PROOF STEP]
have "poly_y_x (poly_x_minus_y f) ddvd poly_y_x (poly_lift g)"
[PROOF STATE]
proof (prove)
using this:
poly_x_minus_y f ddvd poly_lift g

goal (1 subgoal):
 1. poly_y_x (poly_x_minus_y f) ddvd poly_y_x (poly_lift g)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
poly_y_x (poly_x_minus_y f) ddvd poly_y_x (poly_lift g)

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
poly_y_x (poly_x_minus_y f) ddvd poly_y_x (poly_lift g)

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
have "poly_y_x (poly_lift g) = [:g:]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_y_x (poly_lift g) = [:g:]
[PROOF STEP]
unfolding poly_y_x_poly_lift monom_0
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [:g:] = [:g:]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
poly_y_x (poly_lift g) = [:g:]

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
poly_y_x (poly_x_minus_y f) ddvd [:g:]
[PROOF STEP]
have ddvd: "poly_y_x (poly_x_minus_y f) ddvd [:g:]"
[PROOF STATE]
proof (prove)
using this:
poly_y_x (poly_x_minus_y f) ddvd [:g:]

goal (1 subgoal):
 1. poly_y_x (poly_x_minus_y f) ddvd [:g:]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
poly_y_x (poly_x_minus_y f) ddvd [:g:]

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
poly_y_x (poly_x_minus_y f) ddvd [:g:]
[PROOF STEP]
have "degree (poly_y_x (poly_x_minus_y f)) = 0"
[PROOF STATE]
proof (prove)
using this:
poly_y_x (poly_x_minus_y f) ddvd [:g:]

goal (1 subgoal):
 1. degree (poly_y_x (poly_x_minus_y f)) = 0
[PROOF STEP]
by (metis degree_pCons_0 dvd_0_left_iff dvd_const)
[PROOF STATE]
proof (state)
this:
degree (poly_y_x (poly_x_minus_y f)) = 0

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
degree (poly_y_x (poly_x_minus_y f)) = 0
[PROOF STEP]
have "degree f = 0"
[PROOF STATE]
proof (prove)
using this:
degree (poly_y_x (poly_x_minus_y f)) = 0

goal (1 subgoal):
 1. degree f = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
degree f = 0

goal (1 subgoal):
 1. \<not> comm_monoid_mult_class.coprime (poly_x_minus_y p) (poly_lift q) \<Longrightarrow> False
[PROOF STEP]
with primitive_imp_no_constant_factor[OF pr F f]
[PROOF STATE]
proof (chain)
picking this:
degree f \<noteq> 0
degree f = 0
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
degree f \<noteq> 0
degree f = 0

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_circle_sgn_r:
  assumes "is_circle H" and "(a, r) = euclidean_circle H"
  shows "sgn r = - circline_type H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn r = - circline_type H
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_circle H
(a, r) = euclidean_circle H

goal (1 subgoal):
 1. sgn r = - circline_type H
[PROOF STEP]
proof (transfer, transfer)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>H a r Ha aa ra. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; \<not> circline_A0_cmat H; (a, r) = euclidean_circle_cmat H; \<not> circline_A0_clmat Ha; (aa, ra) = euclidean_circle_clmat Ha\<rbrakk> \<Longrightarrow> sgn r = - circline_type_cmat H
[PROOF STEP]
fix H :: complex_mat and a r
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>H a r Ha aa ra. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; \<not> circline_A0_cmat H; (a, r) = euclidean_circle_cmat H; \<not> circline_A0_clmat Ha; (aa, ra) = euclidean_circle_clmat Ha\<rbrakk> \<Longrightarrow> sgn r = - circline_type_cmat H
[PROOF STEP]
assume hh: "hermitean H \<and> H \<noteq> mat_zero"
[PROOF STATE]
proof (state)
this:
hermitean H \<and> H \<noteq> mat_zero

goal (1 subgoal):
 1. \<And>H a r Ha aa ra. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; \<not> circline_A0_cmat H; (a, r) = euclidean_circle_cmat H; \<not> circline_A0_clmat Ha; (aa, ra) = euclidean_circle_clmat Ha\<rbrakk> \<Longrightarrow> sgn r = - circline_type_cmat H
[PROOF STEP]
obtain A B C D where HH: "H = (A, B, C, D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A B C D. H = (A, B, C, D) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases H) auto
[PROOF STATE]
proof (state)
this:
H = (A, B, C, D)

goal (1 subgoal):
 1. \<And>H a r Ha aa ra. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; \<not> circline_A0_cmat H; (a, r) = euclidean_circle_cmat H; \<not> circline_A0_clmat Ha; (aa, ra) = euclidean_circle_clmat Ha\<rbrakk> \<Longrightarrow> sgn r = - circline_type_cmat H
[PROOF STEP]
hence "is_real A" "is_real D"
[PROOF STATE]
proof (prove)
using this:
H = (A, B, C, D)

goal (1 subgoal):
 1. is_real A &&& is_real D
[PROOF STEP]
using hermitean_elems hh
[PROOF STATE]
proof (prove)
using this:
H = (A, B, C, D)
hermitean (?A, ?B, ?C, ?D) \<Longrightarrow> is_real ?A
hermitean (?A, ?B, ?C, ?D) \<Longrightarrow> is_real ?D
hermitean (?A, ?B, ?C, ?D) \<Longrightarrow> ?B = cnj ?C
hermitean (?A, ?B, ?C, ?D) \<Longrightarrow> cnj ?B = ?C
hermitean H \<and> H \<noteq> mat_zero

goal (1 subgoal):
 1. is_real A &&& is_real D
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_real A
is_real D

goal (1 subgoal):
 1. \<And>H a r Ha aa ra. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; \<not> circline_A0_cmat H; (a, r) = euclidean_circle_cmat H; \<not> circline_A0_clmat Ha; (aa, ra) = euclidean_circle_clmat Ha\<rbrakk> \<Longrightarrow> sgn r = - circline_type_cmat H
[PROOF STEP]
assume "\<not> circline_A0_cmat H" "(a, r) = euclidean_circle_cmat H"
[PROOF STATE]
proof (state)
this:
\<not> circline_A0_cmat H
(a, r) = euclidean_circle_cmat H

goal (1 subgoal):
 1. \<And>H a r Ha aa ra. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; \<not> circline_A0_cmat H; (a, r) = euclidean_circle_cmat H; \<not> circline_A0_clmat Ha; (aa, ra) = euclidean_circle_clmat Ha\<rbrakk> \<Longrightarrow> sgn r = - circline_type_cmat H
[PROOF STEP]
hence "A \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<not> circline_A0_cmat H
(a, r) = euclidean_circle_cmat H

goal (1 subgoal):
 1. A \<noteq> 0
[PROOF STEP]
using \<open>\<not> circline_A0_cmat H\<close> HH
[PROOF STATE]
proof (prove)
using this:
\<not> circline_A0_cmat H
(a, r) = euclidean_circle_cmat H
\<not> circline_A0_cmat H
H = (A, B, C, D)

goal (1 subgoal):
 1. A \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
A \<noteq> 0

goal (1 subgoal):
 1. \<And>H a r Ha aa ra. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; \<not> circline_A0_cmat H; (a, r) = euclidean_circle_cmat H; \<not> circline_A0_clmat Ha; (aa, ra) = euclidean_circle_clmat Ha\<rbrakk> \<Longrightarrow> sgn r = - circline_type_cmat H
[PROOF STEP]
hence "Re A * Re A > 0"
[PROOF STATE]
proof (prove)
using this:
A \<noteq> 0

goal (1 subgoal):
 1. 0 < Re A * Re A
[PROOF STEP]
using \<open>is_real A\<close>
[PROOF STATE]
proof (prove)
using this:
A \<noteq> 0
is_real A

goal (1 subgoal):
 1. 0 < Re A * Re A
[PROOF STEP]
using complex_eq_if_Re_eq not_real_square_gt_zero
[PROOF STATE]
proof (prove)
using this:
A \<noteq> 0
is_real A
\<lbrakk>is_real ?z1.0; is_real ?z2.0\<rbrakk> \<Longrightarrow> (?z1.0 = ?z2.0) = (Re ?z1.0 = Re ?z2.0)
(\<not> 0 < ?x * ?x) = (?x = 0)

goal (1 subgoal):
 1. 0 < Re A * Re A
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
0 < Re A * Re A

goal (1 subgoal):
 1. \<And>H a r Ha aa ra. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; \<not> circline_A0_cmat H; (a, r) = euclidean_circle_cmat H; \<not> circline_A0_clmat Ha; (aa, ra) = euclidean_circle_clmat Ha\<rbrakk> \<Longrightarrow> sgn r = - circline_type_cmat H
[PROOF STEP]
thus "sgn r = - circline_type_cmat H"
[PROOF STATE]
proof (prove)
using this:
0 < Re A * Re A

goal (1 subgoal):
 1. sgn r = - circline_type_cmat H
[PROOF STEP]
using HH \<open>(a, r) = euclidean_circle_cmat H\<close> \<open>is_real A\<close> \<open>is_real D\<close> \<open>A \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < Re A * Re A
H = (A, B, C, D)
(a, r) = euclidean_circle_cmat H
is_real A
is_real D
A \<noteq> 0

goal (1 subgoal):
 1. sgn r = - circline_type_cmat H
[PROOF STEP]
by (simp add: Re_divide_real sgn_minus[symmetric])
[PROOF STATE]
proof (state)
this:
sgn r = - circline_type_cmat H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Ln_of_nat [simp]: "0 < n \<Longrightarrow> Ln (of_nat n) = of_real (ln (of_nat n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> Ln (of_nat n) = complex_of_real (ln (real n))
[PROOF STEP]
by (subst of_real_of_nat_eq[symmetric], subst Ln_of_real[symmetric]) simp_all


[STATEMENT]
lemma sup_continuous_apply_SUP[order_continuous_intros]:
  fixes M :: "_ \<Rightarrow> _ \<Rightarrow> 'a::complete_lattice"
  shows "(\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)) \<Longrightarrow> sup_continuous (\<lambda>x. SUP i\<in>I. M i x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)) \<Longrightarrow> sup_continuous (\<lambda>x. SUP i\<in>I. M i x)
[PROOF STEP]
unfolding SUP_apply[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)) \<Longrightarrow> sup_continuous (Sup (M ` I))
[PROOF STEP]
by (rule sup_continuous_SUP)


[STATEMENT]
lemma DSource_Sources:
  assumes  "S \<in> (DSources i C)"
  shows     "(Sources i S)  \<subseteq> (Sources i C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sources i S \<subseteq> Sources i C
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Sources i S \<subseteq> Sources i C
[PROOF STEP]
have  "(Sources i C) = (DSources i C) \<union> (\<Union> S \<in> (DSources i C). (Sources i S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sources i C = DSources i C \<union> \<Union> (Sources i ` DSources i C)
[PROOF STEP]
by (rule SourcesDef)
[PROOF STATE]
proof (state)
this:
Sources i C = DSources i C \<union> \<Union> (Sources i ` DSources i C)

goal (1 subgoal):
 1. Sources i S \<subseteq> Sources i C
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
S \<in> DSources i C
Sources i C = DSources i C \<union> \<Union> (Sources i ` DSources i C)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
S \<in> DSources i C
Sources i C = DSources i C \<union> \<Union> (Sources i ` DSources i C)

goal (1 subgoal):
 1. Sources i S \<subseteq> Sources i C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Sources i S \<subseteq> Sources i C

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in topological_space) eventually_at_topological:
  "eventually P (at a within s) \<longleftrightarrow> (\<exists>S. open S \<and> a \<in> S \<and> (\<forall>x\<in>S. x \<noteq> a \<longrightarrow> x \<in> s \<longrightarrow> P x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (at a within s) = (\<exists>S. open S \<and> a \<in> S \<and> (\<forall>x\<in>S. x \<noteq> a \<longrightarrow> x \<in> s \<longrightarrow> P x))
[PROOF STEP]
by (simp add: eventually_nhds eventually_at_filter)


[STATEMENT]
lemma currentD_IN':
  assumes f: "current \<Gamma> f"
  and x: "x \<notin> B \<Gamma>"
  shows "d_IN f x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN f x = 0
[PROOF STEP]
using currentD_outside_IN[OF f, of x] x currentD_IN[OF f, of x] bipartite_V
[PROOF STATE]
proof (prove)
using this:
x \<notin> \<^bold>V \<Longrightarrow> d_IN f x = 0
x \<notin> B \<Gamma>
x \<in> A \<Gamma> \<Longrightarrow> d_IN f x = 0
\<^bold>V \<subseteq> A \<Gamma> \<union> B \<Gamma>

goal (1 subgoal):
 1. d_IN f x = 0
[PROOF STEP]
by auto


[STATEMENT]
lemma cong_symmetry:
  assumes "Cong A B C D"
  shows "Cong C D A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cong C D A B
[PROOF STEP]
using assms cong_inner_transitivity cong_reflexivity
[PROOF STATE]
proof (prove)
using this:
Cong A B C D
\<forall>a b p q r s. Cong a b p q \<and> Cong a b r s \<longrightarrow> Cong p q r s
Cong ?A ?B ?A ?B

goal (1 subgoal):
 1. Cong C D A B
[PROOF STEP]
by blast


[STATEMENT]
lemma ovalidNF_euler_genus: "
  ovalidNF (\<lambda>s. distinct (ig_verts iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG)))
    (euler_genus iG iM c)
  (\<lambda>r s. r = pre_digraph_map.euler_genus (mk_graph iG) iM)
"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ovalidNF (\<lambda>s. distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG))) (euler_genus iG iM c) (\<lambda>r s. r = pre_digraph_map.euler_genus (mk_graph iG) iM)
[PROOF STEP]
unfolding euler_genus_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ovalidNF (\<lambda>s. distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG))) (DO n \<leftarrow> oreturn (length (snd iG));
m \<leftarrow> oreturn (length (fst iG));
nz \<leftarrow> isolated_nodes iG;
fc \<leftarrow> face_cycles iG iM;
   oreturn ((int n div 2 + 2 * int c - int m - int nz - int fc) div 2)
OD) (\<lambda>r s. r = pre_digraph_map.euler_genus (mk_graph iG) iM)
[PROOF STEP]
proof vcg_casify
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>s. distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG)) \<Longrightarrow> ((int (length (snd iG)) div 2 + 2 * int c - int (length (fst iG)) - int (card (pre_digraph.isolated_verts (mk_graph iG))) - int (card (pre_digraph_map.face_cycle_sets (mk_graph iG) iM))) div 2 = pre_digraph_map.euler_genus (mk_graph iG) iM \<and> digraph_map (mk_graph iG) iM) \<and> distinct (fst iG) \<and> sym_digraph (mk_graph iG)
[PROOF STEP]
case weaken
[PROOF STATE]
proof (state)
this:
distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG))

goal (1 subgoal):
 1. \<And>s. distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG)) \<Longrightarrow> ((int (length (snd iG)) div 2 + 2 * int c - int (length (fst iG)) - int (card (pre_digraph.isolated_verts (mk_graph iG))) - int (card (pre_digraph_map.face_cycle_sets (mk_graph iG) iM))) div 2 = pre_digraph_map.euler_genus (mk_graph iG) iM \<and> digraph_map (mk_graph iG) iM) \<and> distinct (fst iG) \<and> sym_digraph (mk_graph iG)
[PROOF STEP]
have "distinct (ig_verts iG)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (fst iG)
[PROOF STEP]
using weaken
[PROOF STATE]
proof (prove)
using this:
distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG))

goal (1 subgoal):
 1. distinct (fst iG)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
distinct (fst iG)

goal (1 subgoal):
 1. \<And>s. distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG)) \<Longrightarrow> ((int (length (snd iG)) div 2 + 2 * int c - int (length (fst iG)) - int (card (pre_digraph.isolated_verts (mk_graph iG))) - int (card (pre_digraph_map.face_cycle_sets (mk_graph iG) iM))) div 2 = pre_digraph_map.euler_genus (mk_graph iG) iM \<and> digraph_map (mk_graph iG) iM) \<and> distinct (fst iG) \<and> sym_digraph (mk_graph iG)
[PROOF STEP]
interpret G: digraph_map "mk_graph iG" iM
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. digraph_map (mk_graph iG) iM
[PROOF STEP]
using weaken
[PROOF STATE]
proof (prove)
using this:
distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card (pre_digraph.sccs (mk_graph iG))

goal (1 subgoal):
 1. digraph_map (mk_graph iG) iM
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>s. distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card G.sccs \<Longrightarrow> ((int (length (snd iG)) div 2 + 2 * int c - int (length (fst iG)) - int (card G.isolated_verts) - int (card G.face_cycle_sets)) div 2 = G.euler_genus \<and> digraph_map (mk_graph iG) iM) \<and> distinct (fst iG) \<and> sym_digraph (mk_graph iG)
[PROOF STEP]
have len_card:
      "length (ig_verts iG) = card (verts (mk_graph iG))"
      "length (ig_edges iG) = card (arcs (mk_graph iG))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (fst iG) = card (verts (mk_graph iG)) &&& length (snd iG) = card (arcs (mk_graph iG))
[PROOF STEP]
using \<open>distinct _\<close>
[PROOF STATE]
proof (prove)
using this:
distinct (fst iG)

goal (1 subgoal):
 1. length (fst iG) = card (verts (mk_graph iG)) &&& length (snd iG) = card (arcs (mk_graph iG))
[PROOF STEP]
by (auto simp: mkg_simps arcs_mkg distinct_card)
[PROOF STATE]
proof (state)
this:
length (fst iG) = card (verts (mk_graph iG))
length (snd iG) = card (arcs (mk_graph iG))

goal (1 subgoal):
 1. \<And>s. distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card G.sccs \<Longrightarrow> ((int (length (snd iG)) div 2 + 2 * int c - int (length (fst iG)) - int (card G.isolated_verts) - int (card G.face_cycle_sets)) div 2 = G.euler_genus \<and> digraph_map (mk_graph iG) iM) \<and> distinct (fst iG) \<and> sym_digraph (mk_graph iG)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((int (length (snd iG)) div 2 + 2 * int c - int (length (fst iG)) - int (card G.isolated_verts) - int (card G.face_cycle_sets)) div 2 = G.euler_genus \<and> digraph_map (mk_graph iG) iM) \<and> distinct (fst iG) \<and> sym_digraph (mk_graph iG)
[PROOF STEP]
using weaken
[PROOF STATE]
proof (prove)
using this:
distinct (fst iG) \<and> digraph_map (mk_graph iG) iM \<and> c = card G.sccs

goal (1 subgoal):
 1. ((int (length (snd iG)) div 2 + 2 * int c - int (length (fst iG)) - int (card G.isolated_verts) - int (card G.face_cycle_sets)) div 2 = G.euler_genus \<and> digraph_map (mk_graph iG) iM) \<and> distinct (fst iG) \<and> sym_digraph (mk_graph iG)
[PROOF STEP]
by (auto simp: G.euler_genus_def G.euler_char_def len_card)
[PROOF STATE]
proof (state)
this:
((int (length (snd iG)) div 2 + 2 * int c - int (length (fst iG)) - int (card G.isolated_verts) - int (card G.face_cycle_sets)) div 2 = G.euler_genus \<and> digraph_map (mk_graph iG) iM) \<and> distinct (fst iG) \<and> sym_digraph (mk_graph iG)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ChiRel_OneAncestor:
  "\<lbrakk> (S1,U) \<in> ChiRel A; (S2,U) \<in> ChiRel A \<rbrakk> \<Longrightarrow> S1 = S2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(S1, U) \<in> ChiRel A; (S2, U) \<in> ChiRel A\<rbrakk> \<Longrightarrow> S1 = S2
[PROOF STEP]
apply (rule notnotD, rule notI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(S1, U) \<in> ChiRel A; (S2, U) \<in> ChiRel A; S1 \<noteq> S2\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (simp add: ChiRel_OneAncestor_notmem)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma HPow_mono_iff [simp]: "HPow x \<le> HPow y \<longleftrightarrow> x \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (HPow x \<le> HPow y) = (x \<le> y)
[PROOF STEP]
by (metis HPow_iff HPow_mono hsubsetCE order_refl)


[STATEMENT]
lemma connected_eq_connected_components_eq: "connected s \<longleftrightarrow> (\<forall>c \<in> components s. \<forall>c' \<in> components s. c = c')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connected s = (\<forall>c\<in>components s. \<forall>c'\<in>components s. c = c')
[PROOF STEP]
by (metis (no_types, opaque_lifting) components_iff connected_component_eq_eq connected_iff_connected_component)


[STATEMENT]
lemma Qp_eval_pvar_pow:
  assumes "a \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>)"
  assumes "k < n"
  assumes "(m::nat) \<noteq> 0"
  shows "Qp_ev ((pvar Q\<^sub>p k)[^]\<^bsub>Q\<^sub>p[\<X>\<^bsub>n\<^esub>]\<^esub> m) a = ((a!k)[^]m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_at_point Q\<^sub>p a (pvar Q\<^sub>p k [^]\<^bsub>Q\<^sub>p [\<X>\<^bsub>n\<^esub>]\<^esub> m) = a ! k [^] m
[PROOF STEP]
by (metis eval_at_point_nat_pow eval_pvar assms(1) assms(2) pvar_closed)


[STATEMENT]
lemma continuous_closed_imp_Cauchy_continuous:
  fixes S :: "('a::complete_space) set"
  shows "\<lbrakk>continuous_on S f; closed S; Cauchy \<sigma>; \<And>n. (\<sigma> n) \<in> S\<rbrakk> \<Longrightarrow> Cauchy(f \<circ> \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_on S f; closed S; Cauchy \<sigma>; \<And>n. \<sigma> n \<in> S\<rbrakk> \<Longrightarrow> Cauchy (f \<circ> \<sigma>)
[PROOF STEP]
apply (simp add: complete_eq_closed [symmetric] continuous_on_sequentially)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x. \<forall>a\<in>S. (\<forall>n. x n \<in> S) \<and> x \<longlonglongrightarrow> a \<longrightarrow> (f \<circ> x) \<longlonglongrightarrow> f a; complete S; Cauchy \<sigma>; \<And>n. \<sigma> n \<in> S\<rbrakk> \<Longrightarrow> Cauchy (f \<circ> \<sigma>)
[PROOF STEP]
by (meson LIMSEQ_imp_Cauchy complete_def)


[STATEMENT]
theorem Theorem_15:
  shows "gfp_F ds = (- RH (fp_cop_F ds), fp_cop_F ds)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gfp_F ds = (- Rf CH (fp_cop_F ds), fp_cop_F ds)
[PROOF STEP]
using lfp_F2_o_F1_fp_cop_F
[PROOF STATE]
proof (prove)
using this:
lfp (F2 ?ds \<circ> F1) = fp_cop_F ?ds

goal (1 subgoal):
 1. gfp_F ds = (- Rf CH (fp_cop_F ds), fp_cop_F ds)
[PROOF STEP]
unfolding gfp_F_lfp_F F1_def
[PROOF STATE]
proof (prove)
using this:
lfp (F2 ?ds \<circ> (\<lambda>X'. - Rf CH X')) = fp_cop_F ?ds

goal (1 subgoal):
 1. (- Rf CH (lfp (F2 ds \<circ> (\<lambda>X'. - Rf CH X'))), lfp (F2 ds \<circ> (\<lambda>X'. - Rf CH X'))) = (- Rf CH (fp_cop_F ds), fp_cop_F ds)
[PROOF STEP]
by simp


[STATEMENT]
lemma monotone_lmerge: "monotone (rel_prod lprefix lprefix) lprefix (case_prod lmerge)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monotone (rel_prod lprefix lprefix) lprefix (\<lambda>(x, y). lmerge x y)
[PROOF STEP]
apply(rule llist.fixp_preserves_mono2[OF lmerge_mono lmerge_conv_fixp])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f. monotone (rel_prod lprefix lprefix) lprefix (\<lambda>(x, y). f x y) \<Longrightarrow> monotone (rel_prod lprefix lprefix) lprefix (\<lambda>(b, a). case b of LNil \<Rightarrow> LNil | LCons x xs' \<Rightarrow> case a of LNil \<Rightarrow> LNil | LCons y ys' \<Rightarrow> if x < y then LCons x (f xs' a) else if y < x then LCons y (f b ys') else LCons y (f xs' ys'))
[PROOF STEP]
apply(erule conjE|rule allI conjI cont_intro|simp|erule allE, erule llist.mono2mono)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem JF2map_comp: "JF2map (g o f) = JF2map g o JF2map f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. JF2map (g \<circ> f) = JF2map g \<circ> JF2map f
[PROOF STEP]
apply (rule sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. JF2map g \<circ> JF2map f = JF2map (g \<circ> f)
[PROOF STEP]
apply (rule conjunct2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ?P2 \<and> JF2map g \<circ> JF2map f = JF2map (g \<circ> f)
[PROOF STEP]
apply (tactic \<open>rtac @{context} (Thm.permute_prems 0 1 @{thm unfold_unique}) 1\<close>)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F2map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F2map (g \<circ> f) id id \<circ> dtor2) = dtor2 \<circ> (JF2map g \<circ> JF2map f)
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF o_assoc])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F2map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> F2map (g \<circ> f) id id \<circ> dtor2 = dtor2 \<circ> (JF2map g \<circ> JF2map f)
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF arg_cong[OF sym[OF F2.map_comp0]]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2 = dtor2 \<circ> (JF2map g \<circ> JF2map f)
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule sym[OF trans[OF o_assoc]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. dtor2 \<circ> JF2map g \<circ> JF2map f = F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF arg_cong2[OF JF2map refl]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F2map g (JF1map g) (JF2map g) \<circ> dtor2 \<circ> JF2map f = F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF sym[OF o_assoc]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F2map g (JF1map g) (JF2map g) \<circ> (dtor2 \<circ> JF2map f) = F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF arg_cong[OF JF2map]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F2map g (JF1map g) (JF2map g) \<circ> (F2map f (JF1map f) (JF2map f) \<circ> dtor2) = F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF o_assoc])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F2map g (JF1map g) (JF2map g) \<circ> F2map f (JF1map f) (JF2map f) \<circ> dtor2 = F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF arg_cong2[OF sym[OF F2.map_comp0] refl]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor2 = F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule ext)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. (F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor2) x = (F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2) x
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) (dtor2 x) = (F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2) x
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule sym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. (F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor2) x = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) (dtor2 x)
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. F2map (id \<circ> (g \<circ> f)) (?f1.4 \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) (dtor2 x) = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) (dtor2 x)
 2. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule F2.map_cong0)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x z1. z1 \<in> F2set1 (dtor2 x) \<Longrightarrow> (id \<circ> (g \<circ> f)) z1 = (g \<circ> f) z1
 2. \<And>x z2. z2 \<in> F2set2 (dtor2 x) \<Longrightarrow> (?f1.4 \<circ> id) z2 = (JF1map g \<circ> JF1map f) z2
 3. \<And>x z3. z3 \<in> F2set3 (dtor2 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
 4. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x z1. z1 \<in> F2set1 (dtor2 x) \<Longrightarrow> id ((g \<circ> f) z1) = (g \<circ> f) z1
 2. \<And>x z2. z2 \<in> F2set2 (dtor2 x) \<Longrightarrow> (?f1.4 \<circ> id) z2 = (JF1map g \<circ> JF1map f) z2
 3. \<And>x z3. z3 \<in> F2set3 (dtor2 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
 4. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule id_apply)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x z2. z2 \<in> F2set2 (dtor2 x) \<Longrightarrow> (?f1.4 \<circ> id) z2 = (JF1map g \<circ> JF1map f) z2
 2. \<And>x z3. z3 \<in> F2set3 (dtor2 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
 3. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x z2. z2 \<in> F2set2 (dtor2 x) \<Longrightarrow> ?f1.4 (id z2) = (JF1map g \<circ> JF1map f) z2
 2. \<And>x z3. z3 \<in> F2set3 (dtor2 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
 3. F1map id ?f1.4 (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> ?f1.4
[PROOF STEP]
apply (rule arg_cong[OF id_apply])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x z3. z3 \<in> F2set3 (dtor2 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
 2. F1map id (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> (JF1map g \<circ> JF1map f)
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x z3. z3 \<in> F2set3 (dtor2 x) \<Longrightarrow> (JF2map g \<circ> JF2map f) (id z3) = (JF2map g \<circ> JF2map f) z3
 2. F1map id (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> (JF1map g \<circ> JF1map f)
[PROOF STEP]
apply (rule arg_cong[OF id_apply])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F1map id (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> (F1map (g \<circ> f) id id \<circ> dtor1) = dtor1 \<circ> (JF1map g \<circ> JF1map f)
[PROOF STEP]
apply (rule trans[OF o_assoc])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F1map id (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> F1map (g \<circ> f) id id \<circ> dtor1 = dtor1 \<circ> (JF1map g \<circ> JF1map f)
[PROOF STEP]
apply (rule trans[OF arg_cong[OF sym[OF F1.map_comp0]]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1 = dtor1 \<circ> (JF1map g \<circ> JF1map f)
[PROOF STEP]
apply (rule sym[OF trans[OF o_assoc]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dtor1 \<circ> JF1map g \<circ> JF1map f = F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1
[PROOF STEP]
apply (rule trans[OF arg_cong2[OF JF1map refl]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F1map g (JF1map g) (JF2map g) \<circ> dtor1 \<circ> JF1map f = F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1
[PROOF STEP]
apply (rule trans[OF sym[OF o_assoc]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F1map g (JF1map g) (JF2map g) \<circ> (dtor1 \<circ> JF1map f) = F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1
[PROOF STEP]
apply (rule trans[OF arg_cong[OF JF1map]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F1map g (JF1map g) (JF2map g) \<circ> (F1map f (JF1map f) (JF2map f) \<circ> dtor1) = F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1
[PROOF STEP]
apply (rule trans[OF o_assoc])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F1map g (JF1map g) (JF2map g) \<circ> F1map f (JF1map f) (JF2map f) \<circ> dtor1 = F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1
[PROOF STEP]
apply (rule trans[OF arg_cong2[OF sym[OF F1.map_comp0] refl]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F1map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor1 = F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1
[PROOF STEP]
apply (rule ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (F1map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor1) x = (F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1) x
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. F1map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) (dtor1 x) = (F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1) x
[PROOF STEP]
apply (rule sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) \<circ> dtor1) x = F1map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) (dtor1 x)
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. F1map (id \<circ> (g \<circ> f)) (JF1map g \<circ> JF1map f \<circ> id) (JF2map g \<circ> JF2map f \<circ> id) (dtor1 x) = F1map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) (dtor1 x)
[PROOF STEP]
apply (rule F1.map_cong0)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x z1. z1 \<in> F1set1 (dtor1 x) \<Longrightarrow> (id \<circ> (g \<circ> f)) z1 = (g \<circ> f) z1
 2. \<And>x z2. z2 \<in> F1set2 (dtor1 x) \<Longrightarrow> (JF1map g \<circ> JF1map f \<circ> id) z2 = (JF1map g \<circ> JF1map f) z2
 3. \<And>x z3. z3 \<in> F1set3 (dtor1 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x z1. z1 \<in> F1set1 (dtor1 x) \<Longrightarrow> id ((g \<circ> f) z1) = (g \<circ> f) z1
 2. \<And>x z2. z2 \<in> F1set2 (dtor1 x) \<Longrightarrow> (JF1map g \<circ> JF1map f \<circ> id) z2 = (JF1map g \<circ> JF1map f) z2
 3. \<And>x z3. z3 \<in> F1set3 (dtor1 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
[PROOF STEP]
apply (rule id_apply)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x z2. z2 \<in> F1set2 (dtor1 x) \<Longrightarrow> (JF1map g \<circ> JF1map f \<circ> id) z2 = (JF1map g \<circ> JF1map f) z2
 2. \<And>x z3. z3 \<in> F1set3 (dtor1 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x z2. z2 \<in> F1set2 (dtor1 x) \<Longrightarrow> (JF1map g \<circ> JF1map f) (id z2) = (JF1map g \<circ> JF1map f) z2
 2. \<And>x z3. z3 \<in> F1set3 (dtor1 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
[PROOF STEP]
apply (rule arg_cong[OF id_apply])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x z3. z3 \<in> F1set3 (dtor1 x) \<Longrightarrow> (JF2map g \<circ> JF2map f \<circ> id) z3 = (JF2map g \<circ> JF2map f) z3
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x z3. z3 \<in> F1set3 (dtor1 x) \<Longrightarrow> (JF2map g \<circ> JF2map f) (id z3) = (JF2map g \<circ> JF2map f) z3
[PROOF STEP]
apply (rule arg_cong[OF id_apply])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma qdfst_setsum:
  "finite A \<Longrightarrow> qdfst (\<Sum>x\<in>A. f x) = (\<Sum>x\<in>A. qdfst (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> qdfst (sum f A) = (\<Sum>x\<in>A. qdfst (f x))
[PROOF STEP]
by (induct A rule: finite_induct) (auto simp add: zero_QDelta_def plus_QDelta_def)


[STATEMENT]
lemma inorder_n2: "inorder(n2 l a r) = inorder l @ a # inorder r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inorder (n2 l a r) = inorder l @ a # inorder r
[PROOF STEP]
by(cases "(l,a,r)" rule: n2.cases) (auto)


[STATEMENT]
lemma "(i::nat) mod 42 <= 41"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i mod 42 \<le> 41
[PROOF STEP]
by linarith