[STATEMENT]
lemma cf_lcomp_Hom_ArrMap_app[cat_cs_simps]:
  assumes "category \<alpha> \<CC>"
    and "\<FF> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
    and "g : a \<mapsto>\<^bsub>op_cat \<BB>\<^esub> b"
    and "f : a' \<mapsto>\<^bsub>\<CC>\<^esub> b'"
  shows "Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(\<FF>-,-)\<lparr>ArrMap\<rparr>\<lparr>g, f\<rparr>\<^sub>\<bullet> =
    Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,-)\<lparr>ArrMap\<rparr>\<lparr>\<FF>\<lparr>ArrMap\<rparr>\<lparr>g\<rparr>, f\<rparr>\<^sub>\<bullet>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>A\<^bsub>Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(\<FF>-,-)\<^esub> f = \<FF>\<lparr>ArrMap\<rparr>\<lparr>g\<rparr> \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>A\<^bsub>Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,-)\<^esub> f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<CC>
\<FF> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
g : a \<mapsto>\<^bsub>op_cat \<BB>\<^esub> b
f : a' \<mapsto>\<^bsub>\<CC>\<^esub> b'

goal (1 subgoal):
 1. g \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>A\<^bsub>Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(\<FF>-,-)\<^esub> f = \<FF>\<lparr>ArrMap\<rparr>\<lparr>g\<rparr> \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>A\<^bsub>Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,-)\<^esub> f
[PROOF STEP]
unfolding cf_lcomp_Hom_def cat_op_simps
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<CC>
\<FF> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
g : b \<mapsto>\<^bsub>\<BB>\<^esub> a
f : a' \<mapsto>\<^bsub>\<CC>\<^esub> b'

goal (1 subgoal):
 1. g \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>A\<^bsub>cf_cn_cov_lcomp \<CC> Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,-) \<FF>\<^esub> f = \<FF>\<lparr>ArrMap\<rparr>\<lparr>g\<rparr> \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>A\<^bsub>Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,-)\<^esub> f
[PROOF STEP]
by
    (
      cs_concl cs_shallow
        cs_simp: cat_cs_simps cat_op_simps
        cs_intro: cat_cs_intros cat_prod_cs_intros
    )


[STATEMENT]
lemma invD:
  assumes "inv C R"
  shows "sc C (U - R)" "R \<subseteq> U"
        "\<exists>c. sum w C = sum c (U - R) \<and> (\<forall>i. 0 \<le> c i)
      \<and> (\<forall>k \<in> {1..m}. sum c (S k \<inter> (U - R))
                    \<le> (\<Sum>j = card (S k \<inter> R) + 1..card (S k). inverse j) * w k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sc C (U - R) &&& R \<subseteq> U &&& \<exists>c. sum w C = sum c (U - R) \<and> (\<forall>i. 0 \<le> c i) \<and> (\<forall>k\<in>{1..m}. sum c (S k \<inter> (U - R)) \<le> (\<Sum>j = card (S k \<inter> R) + 1..card (S k). inverse (real j)) * w k)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
local.inv C R

goal (1 subgoal):
 1. sc C (U - R) &&& R \<subseteq> U &&& \<exists>c. sum w C = sum c (U - R) \<and> (\<forall>i. 0 \<le> c i) \<and> (\<forall>k\<in>{1..m}. sum c (S k \<inter> (U - R)) \<le> (\<Sum>j = card (S k \<inter> R) + 1..card (S k). inverse (real j)) * w k)
[PROOF STEP]
by (auto simp: inv_def c_exists_def)


[STATEMENT]
lemma (in topological_space) at_within_union:
  "at x within (S \<union> T) = sup (at x within S) (at x within T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. at x within S \<union> T = sup (at x within S) (at x within T)
[PROOF STEP]
unfolding filter_eq_iff eventually_sup eventually_at_filter
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>P. (\<forall>\<^sub>F xa in nhds x. xa \<noteq> x \<longrightarrow> xa \<in> S \<union> T \<longrightarrow> P xa) = ((\<forall>\<^sub>F xa in nhds x. xa \<noteq> x \<longrightarrow> xa \<in> S \<longrightarrow> P xa) \<and> (\<forall>\<^sub>F xa in nhds x. xa \<noteq> x \<longrightarrow> xa \<in> T \<longrightarrow> P xa))
[PROOF STEP]
by (auto elim!: eventually_rev_mp)


[STATEMENT]
lemma generate_topology_transfer[transfer_rule]:
  assumes [transfer_rule]: "bi_unique A" "right_total A"
  shows
    "((rel_set (rel_set A)) ===> (rel_set A ===> (=)))
      (\<lambda>B. generate_topology_on B (Collect (Domainp A))) generate_topology"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rel_set (rel_set A) ===> rel_set A ===> (=)) (\<lambda>B. generate_topology_on B (Collect (Domainp A))) generate_topology
[PROOF STEP]
proof(intro rel_funI, standard)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa\<rbrakk> \<Longrightarrow> generate_topology y ya
 2. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
fix BL BR xl xr
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa\<rbrakk> \<Longrightarrow> generate_topology y ya
 2. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
assume
    rsrsT_BLR: "rel_set (rel_set A) BL BR" and
    rsT_xl_xr: "rel_set A xl xr" and
    gto: "generate_topology_on BL (Collect (Domainp A)) xl"
[PROOF STATE]
proof (state)
this:
rel_set (rel_set A) BL BR
rel_set A xl xr
in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl

goal (2 subgoals):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa\<rbrakk> \<Longrightarrow> generate_topology y ya
 2. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
define CDT where CDT: "CDT = (Collect (Domainp A))"
[PROOF STATE]
proof (state)
this:
CDT = Collect (Domainp A)

goal (2 subgoals):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa\<rbrakk> \<Longrightarrow> generate_topology y ya
 2. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
with gto
[PROOF STATE]
proof (chain)
picking this:
in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
CDT = Collect (Domainp A)
[PROOF STEP]
have gto_CDT: "generate_topology_on BL CDT xl"
[PROOF STATE]
proof (prove)
using this:
in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
CDT = Collect (Domainp A)

goal (1 subgoal):
 1. in_topology_generated_by BL on CDT : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on CDT : \<guillemotleft>open\<guillemotright> xl

goal (2 subgoals):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa\<rbrakk> \<Longrightarrow> generate_topology y ya
 2. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
from gto_CDT CDT rsrsT_BLR rsT_xl_xr
[PROOF STATE]
proof (chain)
picking this:
in_topology_generated_by BL on CDT : \<guillemotleft>open\<guillemotright> xl
CDT = Collect (Domainp A)
rel_set (rel_set A) BL BR
rel_set A xl xr
[PROOF STEP]
show "generate_topology BR xr"
[PROOF STATE]
proof (prove)
using this:
in_topology_generated_by BL on CDT : \<guillemotleft>open\<guillemotright> xl
CDT = Collect (Domainp A)
rel_set (rel_set A) BL BR
rel_set A xl xr

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
proof(induction arbitrary: xr rule: generate_topology_on.induct)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>U xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A U xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 2. \<And>U a b xr. \<lbrakk>in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> a; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A a xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> b; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A b xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; a \<subseteq> U; b \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (a \<inter> b) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 3. \<And>K U xr. \<lbrakk>K \<subseteq> Pow U; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 4. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
case (UNIV S)
[PROOF STATE]
proof (state)
this:
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A S xr

goal (4 subgoals):
 1. \<And>U xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A U xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 2. \<And>U a b xr. \<lbrakk>in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> a; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A a xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> b; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A b xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; a \<subseteq> U; b \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (a \<inter> b) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 3. \<And>K U xr. \<lbrakk>K \<subseteq> Pow U; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 4. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
from assms UNIV.prems
[PROOF STATE]
proof (chain)
picking this:
bi_unique A
right_total A
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A S xr
[PROOF STEP]
have "xr = UNIV"
[PROOF STATE]
proof (prove)
using this:
bi_unique A
right_total A
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A S xr

goal (1 subgoal):
 1. xr = UNIV
[PROOF STEP]
by (meson bi_uniqueDr bi_unique_rel_set right_total_UNIV_transfer)
[PROOF STATE]
proof (state)
this:
xr = UNIV

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
thus "generate_topology BR xr"
[PROOF STATE]
proof (prove)
using this:
xr = UNIV

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
by (simp add: generate_topology.UNIV)
[PROOF STATE]
proof (state)
this:
generate_topology BR xr

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
generate_topology BR xr

goal (3 subgoals):
 1. \<And>U a b xr. \<lbrakk>in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> a; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A a xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> b; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A b xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; a \<subseteq> U; b \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (a \<inter> b) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 2. \<And>K U xr. \<lbrakk>K \<subseteq> Pow U; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 3. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>U a b xr. \<lbrakk>in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> a; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A a xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> b; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A b xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; a \<subseteq> U; b \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (a \<inter> b) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 2. \<And>K U xr. \<lbrakk>K \<subseteq> Pow U; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 3. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
case (Int S a b)
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> a
in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> b
a \<subseteq> S
b \<subseteq> S
\<lbrakk>S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A a ?xr\<rbrakk> \<Longrightarrow> generate_topology BR ?xr
\<lbrakk>S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A b ?xr\<rbrakk> \<Longrightarrow> generate_topology BR ?xr
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A (a \<inter> b) xr

goal (3 subgoals):
 1. \<And>U a b xr. \<lbrakk>in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> a; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A a xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> b; \<And>xr. \<lbrakk>U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A b xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; a \<subseteq> U; b \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (a \<inter> b) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 2. \<And>K U xr. \<lbrakk>K \<subseteq> Pow U; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 3. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
from Int.hyps(3) Int.prems(1)
[PROOF STATE]
proof (chain)
picking this:
a \<subseteq> S
S = {a. Domainp A a}
[PROOF STEP]
obtain a' where a': "rel_set A a a'"
[PROOF STATE]
proof (prove)
using this:
a \<subseteq> S
S = {a. Domainp A a}

goal (1 subgoal):
 1. (\<And>a'. rel_set A a a' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis Ball_Collect Domainp_iff Domainp_set)
[PROOF STATE]
proof (state)
this:
rel_set A a a'

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
from Int.hyps(4) Int.prems(1)
[PROOF STATE]
proof (chain)
picking this:
b \<subseteq> S
S = {a. Domainp A a}
[PROOF STEP]
obtain b' where b': "rel_set A b b'"
[PROOF STATE]
proof (prove)
using this:
b \<subseteq> S
S = {a. Domainp A a}

goal (1 subgoal):
 1. (\<And>b'. rel_set A b b' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis Ball_Collect Domainp_iff Domainp_set)
[PROOF STATE]
proof (state)
this:
rel_set A b b'

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
from Int.prems(1) Int.prems(2) a'
[PROOF STATE]
proof (chain)
picking this:
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A a a'
[PROOF STEP]
have gt_a': "generate_topology BR a'"
[PROOF STATE]
proof (prove)
using this:
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A a a'

goal (1 subgoal):
 1. generate_topology BR a'
[PROOF STEP]
by (rule Int.IH(1))
[PROOF STATE]
proof (state)
this:
generate_topology BR a'

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
from Int.prems(1) Int.prems(2) b'
[PROOF STATE]
proof (chain)
picking this:
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A b b'
[PROOF STEP]
have gt_b': "generate_topology BR b'"
[PROOF STATE]
proof (prove)
using this:
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A b b'

goal (1 subgoal):
 1. generate_topology BR b'
[PROOF STEP]
by (rule Int.IH(2))
[PROOF STATE]
proof (state)
this:
generate_topology BR b'

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
from gt_a' gt_b'
[PROOF STATE]
proof (chain)
picking this:
generate_topology BR a'
generate_topology BR b'
[PROOF STEP]
have "generate_topology BR (a' \<inter> b')"
[PROOF STATE]
proof (prove)
using this:
generate_topology BR a'
generate_topology BR b'

goal (1 subgoal):
 1. generate_topology BR (a' \<inter> b')
[PROOF STEP]
by (rule generate_topology.Int)
[PROOF STATE]
proof (state)
this:
generate_topology BR (a' \<inter> b')

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
generate_topology BR (a' \<inter> b')

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
from assms(1) a' b' Int.prems(3)
[PROOF STATE]
proof (chain)
picking this:
bi_unique A
rel_set A a a'
rel_set A b b'
rel_set A (a \<inter> b) xr
[PROOF STEP]
have "a' \<inter> b' = xr"
[PROOF STATE]
proof (prove)
using this:
bi_unique A
rel_set A a a'
rel_set A b b'
rel_set A (a \<inter> b) xr

goal (1 subgoal):
 1. a' \<inter> b' = xr
[PROOF STEP]
by (rule bi_unique_intersect_r)
[PROOF STATE]
proof (state)
this:
a' \<inter> b' = xr

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
generate_topology BR (a' \<inter> b')
a' \<inter> b' = xr
[PROOF STEP]
show "generate_topology BR xr"
[PROOF STATE]
proof (prove)
using this:
generate_topology BR (a' \<inter> b')
a' \<inter> b' = xr

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
generate_topology BR xr

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
generate_topology BR xr

goal (2 subgoals):
 1. \<And>K U xr. \<lbrakk>K \<subseteq> Pow U; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 2. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>K U xr. \<lbrakk>K \<subseteq> Pow U; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 2. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
case (UN K S)
[PROOF STATE]
proof (state)
this:
K \<subseteq> Pow S
?k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> ?k
\<lbrakk>?k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A ?k ?xr\<rbrakk> \<Longrightarrow> generate_topology BR ?xr
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A (\<Union> K) xr

goal (2 subgoals):
 1. \<And>K U xr. \<lbrakk>K \<subseteq> Pow U; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on U : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
 2. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
K \<subseteq> Pow S
?k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> ?k
\<lbrakk>?k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A ?k ?xr\<rbrakk> \<Longrightarrow> generate_topology BR ?xr
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A (\<Union> K) xr

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>K \<subseteq> Pow S; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
define K' where K': "K' = {(x, y). rel_set A x y} `` K" (is "K' = ?K'")
[PROOF STATE]
proof (state)
this:
K' = {(x, y). rel_set A x y} `` K

goal (1 subgoal):
 1. \<lbrakk>K \<subseteq> Pow S; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
have Union_ss_CDT: "\<Union>K \<subseteq> Collect (Domainp A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> K \<subseteq> Collect (Domainp A)
[PROOF STEP]
by (metis CollectI Domainp.DomainI UN.prems(3) rel_setD1 subsetI)
[PROOF STATE]
proof (state)
this:
\<Union> K \<subseteq> Collect (Domainp A)

goal (1 subgoal):
 1. \<lbrakk>K \<subseteq> Pow S; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
from assms(1) Union_ss_CDT UN.prems(3)
[PROOF STATE]
proof (chain)
picking this:
bi_unique A
\<Union> K \<subseteq> Collect (Domainp A)
rel_set A (\<Union> K) xr
[PROOF STEP]
have "\<Union>?K' = xr"
[PROOF STATE]
proof (prove)
using this:
bi_unique A
\<Union> K \<subseteq> Collect (Domainp A)
rel_set A (\<Union> K) xr

goal (1 subgoal):
 1. \<Union> ({(x, y). rel_set A x y} `` K) = xr
[PROOF STEP]
by (rule bi_unique_Union_r)
[PROOF STATE]
proof (state)
this:
\<Union> ({(x, y). rel_set A x y} `` K) = xr

goal (1 subgoal):
 1. \<lbrakk>K \<subseteq> Pow S; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<Union> ({(x, y). rel_set A x y} `` K) = xr
[PROOF STEP]
have UK_eq_xr: "\<Union>K' = xr"
[PROOF STATE]
proof (prove)
using this:
\<Union> ({(x, y). rel_set A x y} `` K) = xr

goal (1 subgoal):
 1. \<Union> K' = xr
[PROOF STEP]
unfolding K'
[PROOF STATE]
proof (prove)
using this:
\<Union> ({(x, y). rel_set A x y} `` K) = xr

goal (1 subgoal):
 1. \<Union> ({(x, y). rel_set A x y} `` K) = xr
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<Union> K' = xr

goal (1 subgoal):
 1. \<lbrakk>K \<subseteq> Pow S; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
have "k' \<in> K' \<Longrightarrow> generate_topology BR k'" for k'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k' \<in> K' \<Longrightarrow> generate_topology BR k'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k' \<in> K' \<Longrightarrow> generate_topology BR k'
[PROOF STEP]
assume k'_in_K': "k' \<in> K'"
[PROOF STATE]
proof (state)
this:
k' \<in> K'

goal (1 subgoal):
 1. k' \<in> K' \<Longrightarrow> generate_topology BR k'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k' \<in> K'
[PROOF STEP]
obtain k where k: "rel_set A k k'"
[PROOF STATE]
proof (prove)
using this:
k' \<in> K'

goal (1 subgoal):
 1. (\<And>k. rel_set A k k' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding K'
[PROOF STATE]
proof (prove)
using this:
k' \<in> {(x, y). rel_set A x y} `` K

goal (1 subgoal):
 1. (\<And>k. rel_set A k k' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rel_set A k k'

goal (1 subgoal):
 1. k' \<in> K' \<Longrightarrow> generate_topology BR k'
[PROOF STEP]
from assms(1)
[PROOF STATE]
proof (chain)
picking this:
bi_unique A
[PROOF STEP]
have "bi_unique (rel_set A)"
[PROOF STATE]
proof (prove)
using this:
bi_unique A

goal (1 subgoal):
 1. bi_unique (rel_set A)
[PROOF STEP]
by (rule bi_unique_rel_set)
[PROOF STATE]
proof (state)
this:
bi_unique (rel_set A)

goal (1 subgoal):
 1. k' \<in> K' \<Longrightarrow> generate_topology BR k'
[PROOF STEP]
with k
[PROOF STATE]
proof (chain)
picking this:
rel_set A k k'
bi_unique (rel_set A)
[PROOF STEP]
have "\<exists>!k. rel_set A k k'"
[PROOF STATE]
proof (prove)
using this:
rel_set A k k'
bi_unique (rel_set A)

goal (1 subgoal):
 1. \<exists>!k. rel_set A k k'
[PROOF STEP]
by (meson bi_uniqueDl)
[PROOF STATE]
proof (state)
this:
\<exists>!k. rel_set A k k'

goal (1 subgoal):
 1. k' \<in> K' \<Longrightarrow> generate_topology BR k'
[PROOF STEP]
with k'_in_K' k
[PROOF STATE]
proof (chain)
picking this:
k' \<in> K'
rel_set A k k'
\<exists>!k. rel_set A k k'
[PROOF STEP]
have k_in_K: "k \<in> K"
[PROOF STATE]
proof (prove)
using this:
k' \<in> K'
rel_set A k k'
\<exists>!k. rel_set A k k'

goal (1 subgoal):
 1. k \<in> K
[PROOF STEP]
unfolding K'
[PROOF STATE]
proof (prove)
using this:
k' \<in> {(x, y). rel_set A x y} `` K
rel_set A k k'
\<exists>!k. rel_set A k k'

goal (1 subgoal):
 1. k \<in> K
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
k \<in> K

goal (1 subgoal):
 1. k' \<in> K' \<Longrightarrow> generate_topology BR k'
[PROOF STEP]
from k_in_K UN.prems(1,2) k
[PROOF STATE]
proof (chain)
picking this:
k \<in> K
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A k k'
[PROOF STEP]
show "generate_topology BR k'"
[PROOF STATE]
proof (prove)
using this:
k \<in> K
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A k k'

goal (1 subgoal):
 1. generate_topology BR k'
[PROOF STEP]
by (rule UN.IH)
[PROOF STATE]
proof (state)
this:
generate_topology BR k'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?k' \<in> K' \<Longrightarrow> generate_topology BR ?k'

goal (1 subgoal):
 1. \<lbrakk>K \<subseteq> Pow S; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?k' \<in> K' \<Longrightarrow> generate_topology BR ?k'
[PROOF STEP]
have "generate_topology BR (\<Union>K')"
[PROOF STATE]
proof (prove)
using this:
?k' \<in> K' \<Longrightarrow> generate_topology BR ?k'

goal (1 subgoal):
 1. generate_topology BR (\<Union> K')
[PROOF STEP]
by (rule generate_topology.UN)
[PROOF STATE]
proof (state)
this:
generate_topology BR (\<Union> K')

goal (1 subgoal):
 1. \<lbrakk>K \<subseteq> Pow S; \<And>k. k \<in> K \<Longrightarrow> in_topology_generated_by BL on S : \<guillemotleft>open\<guillemotright> k; \<And>k xr. \<lbrakk>k \<in> K; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A k xr\<rbrakk> \<Longrightarrow> generate_topology BR xr; S = {a. Domainp A a}; rel_set (rel_set A) BL BR; rel_set A (\<Union> K) xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
with UK_eq_xr
[PROOF STATE]
proof (chain)
picking this:
\<Union> K' = xr
generate_topology BR (\<Union> K')
[PROOF STEP]
show "generate_topology BR xr"
[PROOF STATE]
proof (prove)
using this:
\<Union> K' = xr
generate_topology BR (\<Union> K')

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
generate_topology BR xr

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
generate_topology BR xr

goal (1 subgoal):
 1. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
case (Basis xl S)
[PROOF STATE]
proof (state)
this:
xl \<in> BL
xl \<subseteq> S
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A xl xr

goal (1 subgoal):
 1. \<And>s U xr. \<lbrakk>s \<in> BL; s \<subseteq> U; U = Collect (Domainp A); rel_set (rel_set A) BL BR; rel_set A s xr\<rbrakk> \<Longrightarrow> generate_topology BR xr
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
xl \<in> BL
xl \<subseteq> S
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A xl xr

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
xl \<in> BL
xl \<subseteq> S
S = {a. Domainp A a}
rel_set (rel_set A) BL BR
rel_set A xl xr
bi_unique A

goal (1 subgoal):
 1. generate_topology BR xr
[PROOF STEP]
by (metis Int_absorb1 bi_unique_intersect_r generate_topology.Basis
          rel_setD1 subset_refl)
[PROOF STATE]
proof (state)
this:
generate_topology BR xr

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
generate_topology BR xr

goal (1 subgoal):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
fix BL BR xl xr
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
assume rsrsT_BLR: "rel_set (rel_set A) BL BR"
    and rsT_xl_xr: "rel_set A xl xr"
    and gt: "generate_topology BR xr"
[PROOF STATE]
proof (state)
this:
rel_set (rel_set A) BL BR
rel_set A xl xr
generate_topology BR xr

goal (1 subgoal):
 1. \<And>x y xa ya. \<lbrakk>rel_set (rel_set A) x y; rel_set A xa ya; generate_topology y ya\<rbrakk> \<Longrightarrow> in_topology_generated_by x on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xa
[PROOF STEP]
from gt rsrsT_BLR rsT_xl_xr
[PROOF STATE]
proof (chain)
picking this:
generate_topology BR xr
rel_set (rel_set A) BL BR
rel_set A xl xr
[PROOF STEP]
show
    "generate_topology_on BL (Collect (Domainp A)) xl"
[PROOF STATE]
proof (prove)
using this:
generate_topology BR xr
rel_set (rel_set A) BL BR
rel_set A xl xr

goal (1 subgoal):
 1. in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
proof(induction arbitrary: xl rule: generate_topology.induct)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl UNIV\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 2. \<And>a b xl. \<lbrakk>generate_topology BR a; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl a\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; generate_topology BR b; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl b\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (a \<inter> b)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 3. \<And>K xl. \<lbrakk>\<And>k. k \<in> K \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 4. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
case UNIV
[PROOF STATE]
proof (state)
this:
rel_set (rel_set A) BL BR
rel_set A xl UNIV

goal (4 subgoals):
 1. \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl UNIV\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 2. \<And>a b xl. \<lbrakk>generate_topology BR a; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl a\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; generate_topology BR b; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl b\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (a \<inter> b)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 3. \<And>K xl. \<lbrakk>\<And>k. k \<in> K \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 4. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
rel_set (rel_set A) BL BR
rel_set A xl UNIV

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
rel_set (rel_set A) BL BR
rel_set A xl UNIV
bi_unique A
right_total A

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
by (metis bi_uniqueDl bi_unique_rel_set generate_topology_on.simps
          right_total_UNIV_transfer)
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl

goal (3 subgoals):
 1. \<And>a b xl. \<lbrakk>generate_topology BR a; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl a\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; generate_topology BR b; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl b\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (a \<inter> b)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 2. \<And>K xl. \<lbrakk>\<And>k. k \<in> K \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 3. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>a b xl. \<lbrakk>generate_topology BR a; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl a\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; generate_topology BR b; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl b\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (a \<inter> b)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 2. \<And>K xl. \<lbrakk>\<And>k. k \<in> K \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 3. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
case (Int a' b')
[PROOF STATE]
proof (state)
this:
generate_topology BR a'
generate_topology BR b'
\<lbrakk>rel_set (rel_set A) BL BR; rel_set A ?xl a'\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> ?xl
\<lbrakk>rel_set (rel_set A) BL BR; rel_set A ?xl b'\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> ?xl
rel_set (rel_set A) BL BR
rel_set A xl (a' \<inter> b')

goal (3 subgoals):
 1. \<And>a b xl. \<lbrakk>generate_topology BR a; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl a\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; generate_topology BR b; \<And>xl. \<lbrakk>rel_set (rel_set A) BL BR; rel_set A xl b\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (a \<inter> b)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 2. \<And>K xl. \<lbrakk>\<And>k. k \<in> K \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 3. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
right_total A
[PROOF STEP]
obtain a where a: "rel_set A a a'"
[PROOF STATE]
proof (prove)
using this:
right_total A

goal (1 subgoal):
 1. (\<And>a. rel_set A a a' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson right_totalE right_total_rel_set)
[PROOF STATE]
proof (state)
this:
rel_set A a a'

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
right_total A
[PROOF STEP]
obtain b where b: "rel_set A b b'"
[PROOF STATE]
proof (prove)
using this:
right_total A

goal (1 subgoal):
 1. (\<And>b. rel_set A b b' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson right_totalE right_total_rel_set)
[PROOF STATE]
proof (state)
this:
rel_set A b b'

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from Int.prems(1) a
[PROOF STATE]
proof (chain)
picking this:
rel_set (rel_set A) BL BR
rel_set A a a'
[PROOF STEP]
have gto_a:
        "generate_topology_on BL {x. Domainp A x} a"
[PROOF STATE]
proof (prove)
using this:
rel_set (rel_set A) BL BR
rel_set A a a'

goal (1 subgoal):
 1. in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> a
[PROOF STEP]
by (rule Int.IH(1))
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> a

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from Int.prems(1) b
[PROOF STATE]
proof (chain)
picking this:
rel_set (rel_set A) BL BR
rel_set A b b'
[PROOF STEP]
have gto_b:
        "generate_topology_on BL {x. Domainp A x} b"
[PROOF STATE]
proof (prove)
using this:
rel_set (rel_set A) BL BR
rel_set A b b'

goal (1 subgoal):
 1. in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> b
[PROOF STEP]
by (rule Int.IH(2))
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> b

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from a
[PROOF STATE]
proof (chain)
picking this:
rel_set A a a'
[PROOF STEP]
have a_ss_DT: "a \<subseteq> {x. Domainp A x}"
[PROOF STATE]
proof (prove)
using this:
rel_set A a a'

goal (1 subgoal):
 1. a \<subseteq> {x. Domainp A x}
[PROOF STEP]
by auto (meson Domainp.DomainI rel_setD1)
[PROOF STATE]
proof (state)
this:
a \<subseteq> {x. Domainp A x}

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from b
[PROOF STATE]
proof (chain)
picking this:
rel_set A b b'
[PROOF STEP]
have b_ss_DT: "b \<subseteq> {x. Domainp A x}"
[PROOF STATE]
proof (prove)
using this:
rel_set A b b'

goal (1 subgoal):
 1. b \<subseteq> {x. Domainp A x}
[PROOF STEP]
by auto (meson Domainp.DomainI rel_setD1)
[PROOF STATE]
proof (state)
this:
b \<subseteq> {x. Domainp A x}

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from gto_a gto_b a_ss_DT b_ss_DT
[PROOF STATE]
proof (chain)
picking this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> a
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> b
a \<subseteq> {x. Domainp A x}
b \<subseteq> {x. Domainp A x}
[PROOF STEP]
have
        "generate_topology_on BL {x. Domainp A x} (a \<inter> b)"
[PROOF STATE]
proof (prove)
using this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> a
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> b
a \<subseteq> {x. Domainp A x}
b \<subseteq> {x. Domainp A x}

goal (1 subgoal):
 1. in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (a \<inter> b)
[PROOF STEP]
by (rule generate_topology_on.Int)
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (a \<inter> b)

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (a \<inter> b)

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from assms(1) a b Int.prems(2)
[PROOF STATE]
proof (chain)
picking this:
bi_unique A
rel_set A a a'
rel_set A b b'
rel_set A xl (a' \<inter> b')
[PROOF STEP]
have "a \<inter> b = xl"
[PROOF STATE]
proof (prove)
using this:
bi_unique A
rel_set A a a'
rel_set A b b'
rel_set A xl (a' \<inter> b')

goal (1 subgoal):
 1. a \<inter> b = xl
[PROOF STEP]
by (rule bi_unique_intersect_l)
[PROOF STATE]
proof (state)
this:
a \<inter> b = xl

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (a \<inter> b)
a \<inter> b = xl
[PROOF STEP]
show "generate_topology_on BL {a. Domainp A a} xl"
[PROOF STATE]
proof (prove)
using this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (a \<inter> b)
a \<inter> b = xl

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl

goal (2 subgoals):
 1. \<And>K xl. \<lbrakk>\<And>k. k \<in> K \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 2. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>K xl. \<lbrakk>\<And>k. k \<in> K \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 2. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
case (UN K')
[PROOF STATE]
proof (state)
this:
?k \<in> K' \<Longrightarrow> generate_topology BR ?k
\<lbrakk>?k \<in> K'; rel_set (rel_set A) BL BR; rel_set A ?xl ?k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> ?xl
rel_set (rel_set A) BL BR
rel_set A xl (\<Union> K')

goal (2 subgoals):
 1. \<And>K xl. \<lbrakk>\<And>k. k \<in> K \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K)\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
 2. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
?k \<in> K' \<Longrightarrow> generate_topology BR ?k
\<lbrakk>?k \<in> K'; rel_set (rel_set A) BL BR; rel_set A ?xl ?k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> ?xl
rel_set (rel_set A) BL BR
rel_set A xl (\<Union> K')

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
define K where K: "K = {(x, y). rel_set (\<lambda>y x. A x y) x y} `` K'"
        (is "K = ?K")
[PROOF STATE]
proof (state)
this:
K = {(x, y). rel_set (\<lambda>y x. A x y) x y} `` K'

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
right_total A
[PROOF STEP]
have Union_ss_CRT: "\<Union>K' \<subseteq> Collect (Rangep A)"
[PROOF STATE]
proof (prove)
using this:
right_total A

goal (1 subgoal):
 1. \<Union> K' \<subseteq> Collect (Rangep A)
[PROOF STEP]
by (auto simp add: Domainp_iff right_total_def)
[PROOF STATE]
proof (state)
this:
\<Union> K' \<subseteq> Collect (Rangep A)

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from assms(1) Union_ss_CRT UN.prems(2)
[PROOF STATE]
proof (chain)
picking this:
bi_unique A
\<Union> K' \<subseteq> Collect (Rangep A)
rel_set A xl (\<Union> K')
[PROOF STEP]
have "\<Union>?K = xl"
[PROOF STATE]
proof (prove)
using this:
bi_unique A
\<Union> K' \<subseteq> Collect (Rangep A)
rel_set A xl (\<Union> K')

goal (1 subgoal):
 1. \<Union> ({(x, y). rel_set (\<lambda>y x. A x y) x y} `` K') = xl
[PROOF STEP]
by (rule bi_unique_Union_l)
[PROOF STATE]
proof (state)
this:
\<Union> ({(x, y). rel_set (\<lambda>y x. A x y) x y} `` K') = xl

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<Union> ({(x, y). rel_set (\<lambda>y x. A x y) x y} `` K') = xl
[PROOF STEP]
have UK_eq_xr: "\<Union>K = xl"
[PROOF STATE]
proof (prove)
using this:
\<Union> ({(x, y). rel_set (\<lambda>y x. A x y) x y} `` K') = xl

goal (1 subgoal):
 1. \<Union> K = xl
[PROOF STEP]
unfolding K
[PROOF STATE]
proof (prove)
using this:
\<Union> ({(x, y). rel_set (\<lambda>y x. A x y) x y} `` K') = xl

goal (1 subgoal):
 1. \<Union> ({(x, y). rel_set (\<lambda>y x. A x y) x y} `` K') = xl
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<Union> K = xl

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<Union> K = xl
[PROOF STEP]
have "K \<subseteq> Pow xl"
[PROOF STATE]
proof (prove)
using this:
\<Union> K = xl

goal (1 subgoal):
 1. K \<subseteq> Pow xl
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
K \<subseteq> Pow xl

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
K \<subseteq> Pow xl

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from UN.prems(2)
[PROOF STATE]
proof (chain)
picking this:
rel_set A xl (\<Union> K')
[PROOF STEP]
have "xl \<subseteq> {x. Domainp A x}"
[PROOF STATE]
proof (prove)
using this:
rel_set A xl (\<Union> K')

goal (1 subgoal):
 1. xl \<subseteq> {x. Domainp A x}
[PROOF STEP]
unfolding rel_set_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>xl. Bex (\<Union> K') (A x)) \<and> (\<forall>y\<in>\<Union> K'. \<exists>x\<in>xl. A x y)

goal (1 subgoal):
 1. xl \<subseteq> {x. Domainp A x}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
xl \<subseteq> {x. Domainp A x}

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
K \<subseteq> Pow xl
xl \<subseteq> {x. Domainp A x}
[PROOF STEP]
have UN_prem_1: "K \<subseteq> Pow {x. Domainp A x}"
[PROOF STATE]
proof (prove)
using this:
K \<subseteq> Pow xl
xl \<subseteq> {x. Domainp A x}

goal (1 subgoal):
 1. K \<subseteq> Pow {x. Domainp A x}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
K \<subseteq> Pow {x. Domainp A x}

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
have UN_prem_2:
        "k \<in> K \<Longrightarrow> generate_topology_on BL {x. Domainp A x} k" for k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
assume k_in_K: "k \<in> K"
[PROOF STATE]
proof (state)
this:
k \<in> K

goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
with UN_prem_1
[PROOF STATE]
proof (chain)
picking this:
K \<subseteq> Pow {x. Domainp A x}
k \<in> K
[PROOF STEP]
have k_ss_DT: "k \<subseteq> {x. Domainp A x}"
[PROOF STATE]
proof (prove)
using this:
K \<subseteq> Pow {x. Domainp A x}
k \<in> K

goal (1 subgoal):
 1. k \<subseteq> {x. Domainp A x}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
k \<subseteq> {x. Domainp A x}

goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
with k_in_K
[PROOF STATE]
proof (chain)
picking this:
k \<in> K
k \<subseteq> {x. Domainp A x}
[PROOF STEP]
obtain k' where k': "rel_set (\<lambda>y x. A x y) k' k"
[PROOF STATE]
proof (prove)
using this:
k \<in> K
k \<subseteq> {x. Domainp A x}

goal (1 subgoal):
 1. (\<And>k'. rel_set (\<lambda>y x. A x y) k' k \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding K Ball_Collect[symmetric]
[PROOF STATE]
proof (prove)
using this:
k \<in> {(x, y). rel_set (\<lambda>y x. A x y) x y} `` K'
Ball k (Domainp A)

goal (1 subgoal):
 1. (\<And>k'. rel_set (\<lambda>y x. A x y) k' k \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
rel_set (\<lambda>y x. A x y) k' k

goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
from assms(1)
[PROOF STATE]
proof (chain)
picking this:
bi_unique A
[PROOF STEP]
have "bi_unique (\<lambda>y x. A x y)"
[PROOF STATE]
proof (prove)
using this:
bi_unique A

goal (1 subgoal):
 1. bi_unique (\<lambda>y x. A x y)
[PROOF STEP]
unfolding bi_unique_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>x y z. A x y \<longrightarrow> A x z \<longrightarrow> y = z) \<and> (\<forall>x y z. A x z \<longrightarrow> A y z \<longrightarrow> x = y)

goal (1 subgoal):
 1. (\<forall>x y z. A y x \<longrightarrow> A z x \<longrightarrow> y = z) \<and> (\<forall>x y z. A z x \<longrightarrow> A z y \<longrightarrow> x = y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
bi_unique (\<lambda>y x. A x y)

goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bi_unique (\<lambda>y x. A x y)
[PROOF STEP]
have "bi_unique (rel_set (\<lambda>y x. A x y))"
[PROOF STATE]
proof (prove)
using this:
bi_unique (\<lambda>y x. A x y)

goal (1 subgoal):
 1. bi_unique (rel_set (\<lambda>y x. A x y))
[PROOF STEP]
by (rule bi_unique_rel_set)
[PROOF STATE]
proof (state)
this:
bi_unique (rel_set (\<lambda>y x. A x y))

goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
with k'
[PROOF STATE]
proof (chain)
picking this:
rel_set (\<lambda>y x. A x y) k' k
bi_unique (rel_set (\<lambda>y x. A x y))
[PROOF STEP]
have "\<exists>!k'. rel_set (\<lambda>y x. A x y) k' k"
[PROOF STATE]
proof (prove)
using this:
rel_set (\<lambda>y x. A x y) k' k
bi_unique (rel_set (\<lambda>y x. A x y))

goal (1 subgoal):
 1. \<exists>!k'. rel_set (\<lambda>y x. A x y) k' k
[PROOF STEP]
by (meson bi_uniqueDl)
[PROOF STATE]
proof (state)
this:
\<exists>!k'. rel_set (\<lambda>y x. A x y) k' k

goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
with k_in_K k'
[PROOF STATE]
proof (chain)
picking this:
k \<in> K
rel_set (\<lambda>y x. A x y) k' k
\<exists>!k'. rel_set (\<lambda>y x. A x y) k' k
[PROOF STEP]
have k'_in_K': "k' \<in> K'"
[PROOF STATE]
proof (prove)
using this:
k \<in> K
rel_set (\<lambda>y x. A x y) k' k
\<exists>!k'. rel_set (\<lambda>y x. A x y) k' k

goal (1 subgoal):
 1. k' \<in> K'
[PROOF STEP]
unfolding K
[PROOF STATE]
proof (prove)
using this:
k \<in> {(x, y). rel_set (\<lambda>y x. A x y) x y} `` K'
rel_set (\<lambda>y x. A x y) k' k
\<exists>!k'. rel_set (\<lambda>y x. A x y) k' k

goal (1 subgoal):
 1. k' \<in> K'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
k' \<in> K'

goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
from k'
[PROOF STATE]
proof (chain)
picking this:
rel_set (\<lambda>y x. A x y) k' k
[PROOF STEP]
have rsT_kk': "rel_set A k k'"
[PROOF STATE]
proof (prove)
using this:
rel_set (\<lambda>y x. A x y) k' k

goal (1 subgoal):
 1. rel_set A k k'
[PROOF STEP]
unfolding rel_set_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>k'. \<exists>xa\<in>k. A xa x) \<and> (\<forall>y\<in>k. Bex k' (A y))

goal (1 subgoal):
 1. (\<forall>x\<in>k. Bex k' (A x)) \<and> (\<forall>y\<in>k'. \<exists>x\<in>k. A x y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rel_set A k k'

goal (1 subgoal):
 1. k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
from k'_in_K' UN.prems(1) rsT_kk'
[PROOF STATE]
proof (chain)
picking this:
k' \<in> K'
rel_set (rel_set A) BL BR
rel_set A k k'
[PROOF STEP]
show
          "generate_topology_on BL {x. Domainp A x} k"
[PROOF STATE]
proof (prove)
using this:
k' \<in> K'
rel_set (rel_set A) BL BR
rel_set A k k'

goal (1 subgoal):
 1. in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k
[PROOF STEP]
by (rule UN.IH)
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> ?k

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
from UN_prem_1 UN_prem_2
[PROOF STATE]
proof (chain)
picking this:
K \<subseteq> Pow {x. Domainp A x}
?k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> ?k
[PROOF STEP]
have
        "generate_topology_on BL {x. Domainp A x} (\<Union>K)"
[PROOF STATE]
proof (prove)
using this:
K \<subseteq> Pow {x. Domainp A x}
?k \<in> K \<Longrightarrow> in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> ?k

goal (1 subgoal):
 1. in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (\<Union> K)
[PROOF STEP]
by (rule generate_topology_on.UN)
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (\<Union> K)

goal (1 subgoal):
 1. \<lbrakk>\<And>k. k \<in> K' \<Longrightarrow> generate_topology BR k; \<And>k xl. \<lbrakk>k \<in> K'; rel_set (rel_set A) BL BR; rel_set A xl k\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl; rel_set (rel_set A) BL BR; rel_set A xl (\<Union> K')\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
with UK_eq_xr
[PROOF STATE]
proof (chain)
picking this:
\<Union> K = xl
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (\<Union> K)
[PROOF STEP]
show "generate_topology_on BL {a. Domainp A a} xl"
[PROOF STATE]
proof (prove)
using this:
\<Union> K = xl
in_topology_generated_by BL on {x. Domainp A x} : \<guillemotleft>open\<guillemotright> (\<Union> K)

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl

goal (1 subgoal):
 1. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
case (Basis xr)
[PROOF STATE]
proof (state)
this:
xr \<in> BR
rel_set (rel_set A) BL BR
rel_set A xl xr

goal (1 subgoal):
 1. \<And>s xl. \<lbrakk>s \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl s\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
xr \<in> BR
rel_set (rel_set A) BL BR
rel_set A xl xr

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>xr \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl xr\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
assume xr_in_BR: "xr \<in> BR"
        and rsrsT_BL_BR: "rel_set (rel_set A) BL BR"
        and rsT_xl_xr: "rel_set A xl xr"
[PROOF STATE]
proof (state)
this:
xr \<in> BR
rel_set (rel_set A) BL BR
rel_set A xl xr

goal (1 subgoal):
 1. \<lbrakk>xr \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl xr\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
with assms(1)
[PROOF STATE]
proof (chain)
picking this:
bi_unique A
xr \<in> BR
rel_set (rel_set A) BL BR
rel_set A xl xr
[PROOF STEP]
have "xl \<in> BL"
[PROOF STATE]
proof (prove)
using this:
bi_unique A
xr \<in> BR
rel_set (rel_set A) BL BR
rel_set A xl xr

goal (1 subgoal):
 1. xl \<in> BL
[PROOF STEP]
by (metis bi_uniqueDl bi_unique_rel_set rel_setD2)
[PROOF STATE]
proof (state)
this:
xl \<in> BL

goal (1 subgoal):
 1. \<lbrakk>xr \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl xr\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
xl \<in> BL

goal (1 subgoal):
 1. \<lbrakk>xr \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl xr\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
with rsrsT_BL_BR
[PROOF STATE]
proof (chain)
picking this:
rel_set (rel_set A) BL BR
xl \<in> BL
[PROOF STEP]
have "xl \<subseteq> {a. Domainp A a}"
[PROOF STATE]
proof (prove)
using this:
rel_set (rel_set A) BL BR
xl \<in> BL

goal (1 subgoal):
 1. xl \<subseteq> {a. Domainp A a}
[PROOF STEP]
unfolding Ball_Collect[symmetric]
[PROOF STATE]
proof (prove)
using this:
rel_set (rel_set A) BL BR
xl \<in> BL

goal (1 subgoal):
 1. Ball xl (Domainp A)
[PROOF STEP]
by (meson Domainp.DomainI rel_setD1)
[PROOF STATE]
proof (state)
this:
xl \<subseteq> {a. Domainp A a}

goal (1 subgoal):
 1. \<lbrakk>xr \<in> BR; rel_set (rel_set A) BL BR; rel_set A xl xr\<rbrakk> \<Longrightarrow> in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
xl \<in> BL
xl \<subseteq> {a. Domainp A a}
[PROOF STEP]
show "generate_topology_on BL {a. Domainp A a} xl"
[PROOF STATE]
proof (prove)
using this:
xl \<in> BL
xl \<subseteq> {a. Domainp A a}

goal (1 subgoal):
 1. in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl
[PROOF STEP]
by (rule generate_topology_on.Basis)
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on {a. Domainp A a} : \<guillemotleft>open\<guillemotright> xl

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
in_topology_generated_by BL on (Collect (Domainp A)) : \<guillemotleft>open\<guillemotright> xl

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nat_in_between_eq:
  "(a<b \<and> b\<le>Suc a) \<longleftrightarrow> b = Suc a"
  "(a\<le>b \<and> b<Suc a) \<longleftrightarrow> b = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a < b \<and> b \<le> Suc a) = (b = Suc a) &&& (a \<le> b \<and> b < Suc a) = (b = a)
[PROOF STEP]
by auto


[STATEMENT]
lemma affine_bounded_eq_lowdim:
  fixes S :: "'a::euclidean_space set"
  assumes "affine S"
  shows "bounded S \<longleftrightarrow> aff_dim S \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded S = (aff_dim S \<le> 0)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. bounded S \<Longrightarrow> aff_dim S \<le> 0
 2. aff_dim S \<le> 0 \<Longrightarrow> bounded S
[PROOF STEP]
show "aff_dim S \<le> 0 \<Longrightarrow> bounded S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aff_dim S \<le> 0 \<Longrightarrow> bounded S
[PROOF STEP]
by (metis aff_dim_sing aff_dim_subset affine_dim_equal affine_sing all_not_in_conv assms bounded_empty bounded_insert dual_order.antisym empty_subsetI insert_subset)
[PROOF STATE]
proof (state)
this:
aff_dim S \<le> 0 \<Longrightarrow> bounded S

goal (1 subgoal):
 1. bounded S \<Longrightarrow> aff_dim S \<le> 0
[PROOF STEP]
qed (use affine_bounded_eq_trivial assms in fastforce)


[STATEMENT]
lemma acyclic_rt_bu_transfer[transfer_rule]:
  assumes[transfer_rule]: "bi_unique A" "right_total A"
  shows
    "((rel_set (rel_prod A A)) ===> (=))
      (acyclic_on (Collect (Domainp A))) acyclic"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rel_set (rel_prod A A) ===> (=)) (acyclic_on (Collect (Domainp A))) acyclic
[PROOF STEP]
unfolding acyclic_on_def acyclic_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rel_set (rel_prod A A) ===> (=)) (\<lambda>r. \<forall>x\<in>Collect (Domainp A). (x, x) \<notin> on (Collect (Domainp A)) r\<^sup>+) (\<lambda>r. \<forall>x. (x, x) \<notin> r\<^sup>+)
[PROOF STEP]
by transfer_prover


[STATEMENT]
lemma oDeriv_oLimit [simp]:
"oDeriv F (oLimit f) = oLimit (\<lambda>n. oDeriv F (f n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. oDeriv F (oLimit f) = oLimit (\<lambda>n. oDeriv F (f n))
[PROOF STEP]
apply (unfold oDeriv_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordinal_rec (oFix F 0) (\<lambda>p x. oFix F (oSuc x)) (oLimit f) = oLimit (\<lambda>n. ordinal_rec (oFix F 0) (\<lambda>p x. oFix F (oSuc x)) (f n))
[PROOF STEP]
apply (rule ordinal_rec_oLimit, clarify)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>p x. x \<le> oFix F (oSuc x)
[PROOF STEP]
apply (rule order_trans[OF order_less_imp_le[OF less_oSuc]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>p x. oSuc x \<le> oFix F (oSuc x)
[PROOF STEP]
apply (rule le_oFix)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma product_path[iff]:
      assumes "length w = length r" "length r = length s"
      shows "c.path (product A B) (w || r || s) (p, q) \<longleftrightarrow>
        a.path A (w || r) p \<and> b.path B (w || s) q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c.path' (product A B) (w || r || s) (p, q) = (a.path' A (w || r) p \<and> b.path' B (w || s) q)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length w = length r
length r = length s

goal (1 subgoal):
 1. c.path' (product A B) (w || r || s) (p, q) = (a.path' A (w || r) p \<and> b.path' B (w || s) q)
[PROOF STEP]
by (induct arbitrary: p q rule: list_induct3) (auto)


[STATEMENT]
lemma cart_prod_split:"((x,y) \<in> A \<times> B) = (x \<in> A \<and> y \<in> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x, y) \<in> A \<times> B) = (x \<in> A \<and> y \<in> B)
[PROOF STEP]
by auto


[STATEMENT]
lemma T_arcs_compl_fin:
  assumes "fin_digraph G" and "es \<subseteq> arcs T"
  shows "finite {e2\<in> arcs G. (\<exists>e1 \<in> es. head G e2 = tail G e1 \<and> head G e1 = tail G e2)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {e2 \<in> arcs G. \<exists>e1\<in>es. head G e2 = tail G e1 \<and> head G e1 = tail G e2}
[PROOF STEP]
using assms fin_digraph.finite_arcs
[PROOF STATE]
proof (prove)
using this:
fin_digraph G
es \<subseteq> arcs T
fin_digraph ?G \<Longrightarrow> finite (arcs ?G)

goal (1 subgoal):
 1. finite {e2 \<in> arcs G. \<exists>e1\<in>es. head G e2 = tail G e1 \<and> head G e1 = tail G e2}
[PROOF STEP]
by fastforce


[STATEMENT]
lemma ani_omega_below_ani_star:
  "ani(x\<^sup>\<omega>) \<le> ani(x\<^sup>\<star>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ani (x\<^sup>\<omega>) \<le> ani (x\<^sup>\<star>)
[PROOF STEP]
by (simp add: an_omega_below_an_star ani_an_order)


[STATEMENT]
lemma sint_above_size: "2 ^ (size w - 1) \<le> x \<Longrightarrow> sint w < x"
  for w :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ (size w - 1) \<le> x \<Longrightarrow> sint w < x
[PROOF STEP]
unfolding word_size
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ (LENGTH('a) - 1) \<le> x \<Longrightarrow> sint w < x
[PROOF STEP]
by (rule less_le_trans [OF sint_lt])


[STATEMENT]
lemma qbs_prob_integral_diff:
  assumes "qbs_integrable (s::'a qbs_prob_space) f"
      and "qbs_integrable s g"
    shows "qbs_prob_integral s (\<lambda>x. f x - g x) = qbs_prob_integral s f - qbs_prob_integral s g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sub>Q x. f x - g x \<partial>s = qbs_prob_integral s f - qbs_prob_integral s g
[PROOF STEP]
using Bochner_Integration.integral_diff[OF integrable_if_qbs_integrable[OF assms(1)] integrable_if_qbs_integrable[OF assms(2)]]
[PROOF STATE]
proof (prove)
using this:
qbs_prob_measure_prob_space.expectation s (\<lambda>x. f x - g x) = qbs_prob_measure_prob_space.expectation s f - qbs_prob_measure_prob_space.expectation s g

goal (1 subgoal):
 1. \<integral>\<^sub>Q x. f x - g x \<partial>s = qbs_prob_integral s f - qbs_prob_integral s g
[PROOF STEP]
by(simp add: qbs_prob_integral_def2)