(* Title: LFP
Authors : Jasmin Blanchette , Andrei Popescu , Dmitriy Traytel
Maintainer : Dmitriy Traytel < traytel at inf . ethz . ch >
*)
section ‹ Least Fixpoint (a.k.a. Datatype)›
(*<*)
theory LFP
imports "HOL-Library.BNF_Axiomatization"
begin
(*>*)
unbundle cardinal_syntax
ML ‹ open Ctr_Sugar_Util›
notation BNF_Def.convol (‹ <_ , _>› )
text ‹
begin{tabular}{rcl}
'b1 &=& ('a, 'b1, 'b2) F1\\
'b2 &=& ('a, 'b1, 'b2) F2
end{tabular}
build a witness scenario, let us assume
begin{tabular}{rcl}
('a, 'b1, 'b2) F1 &=& 'a * 'b1 + 'a * 'b2\\
('a, 'b1, 'b2) F2 &=& unit + 'b1 * 'b2
end{tabular}
›
declare [[bnf_internals]]
bnf_axiomatization (F1set1: 'a, F1set2: 'b1, F1set3: 'b2) F1
[wits: "'a ==> 'b1 ==> ('a, 'b1, 'b2) F1" "'a ==> 'b2 ==> ('a, 'b1, 'b2) F1"]
for map: F1map rel: F1rel
bnf_axiomatization (F2set1: 'a, F2set2: 'b1, F2set3: 'b2) F2
[wits: "('a, 'b1, 'b2) F2"]
for map: F2map rel: F2rel
abbreviation F1in :: "'a1 set ==> 'a2 set ==> 'a3 set ==> (('a1, 'a2, 'a3) F1) set" where
"F1in A1 A2 A3 ≡ {x. F1set1 x ⊆ A1 ∧ F1set2 x ⊆ A2 ∧ F1set3 x ⊆ A3}"
abbreviation F2in :: "'a1 set ==> 'a2 set ==> 'a3 set ==> (('a1, 'a2, 'a3) F2) set" where
"F2in A1 A2 A3 ≡ {x. F2set1 x ⊆ A1 ∧ F2set2 x ⊆ A2 ∧ F2set3 x ⊆ A3}"
lemma F1map_comp_id: "F1map g1 g2 g3 (F1map id f2 f3 x) = F1map g1 (g2 o f2) (g3 o f3) x"
apply (rule trans)
apply (rule F1.map_comp)
unfolding o_id
apply (rule refl)
done
lemmas F1in_mono23 = F1.in_mono[OF subset_refl]
lemma F1map_congL: "[ ∀ a ∈ F1set2 x. f a = a; ∀ a ∈ F1set3 x. g a = a] ==>
F1map id f g x = x"
apply (rule trans)
apply (rule F1.map_cong0)
apply (rule refl)
apply (rule trans)
apply (erule bspec)
apply assumption
apply (rule sym)
apply (rule id_apply)
apply (rule trans)
apply (erule bspec)
apply assumption
apply (rule sym)
apply (rule id_apply)
apply (rule F1.map_id)
done
lemma F2map_comp_id: "F2map g1 g2 g3 (F2map id f2 f3 x) = F2map g1 (g2 o f2) (g3 o f3) x"
apply (rule trans)
apply (rule F2.map_comp)
unfolding o_id
apply (rule refl)
done
lemmas F2in_mono23 = F2.in_mono[OF subset_refl]
lemma F2map_congL: "[ ∀ a ∈ F2set2 x. f a = a; ∀ a ∈ F2set3 x. g a = a] ==>
F2map id f g x = x"
apply (rule trans)
apply (rule F2.map_cong0)
apply (rule refl)
apply (rule trans)
apply (erule bspec)
apply assumption
apply (rule sym)
apply (rule id_apply)
apply (rule trans)
apply (erule bspec)
apply assumption
apply (rule sym)
apply (rule id_apply)
apply (rule F2.map_id)
done
subsection‹ Algebra›
definition alg where
"alg B1 B2 s1 s2 =
((∀ x ∈ F1in (UNIV :: 'a set) B1 B2. s1 x ∈ B1) ∧ (∀ y ∈ F2in (UNIV :: 'a set) B1 B2. s2 y ∈ B2))"
lemma alg_F1set: "[ alg B1 B2 s1 s2; F1set2 x ⊆ B1; F1set3 x ⊆ B2] ==> s1 x ∈ B1"
apply (tactic ‹ dtac @{context} @{thm iffD1[OF alg_def]} 1› )
apply (erule conjE)+
apply (erule bspec)
apply (rule CollectI)
apply (rule conjI[OF subset_UNIV])
apply (er:) F1
applya
done
lemma alg_F2set: " <alg B1 B2 s1 s2; F2set2 x ⊆ B1; F2set3 x ⊆ B2] ==> s2 x ∈ B2"
apply (tactic ‹ F1inA1A2 A3 \equiv {x. FF1set1 x ⊆ F1set2 x ⊆ F1set3 x ⊆
apply (e conjE)+
apply (erule bspec)
apply (rule CollectI)
apply (r conjI[Osubset_UNIV])
apply (erule conjI)
apply as
done
lemma a:
(rule refl)
apply (rule notI)
apply (tactic \open >hyp_subst_tac @{co} 1 › tras)
apply (frule alg rletrn)
(* ORELSE of the following three possibilities *)apply rl dly
apply(ue use_emyII)
apply (erule F1apply(ueF1mp__d
apply (rule subsetI)
apply (drule F1.wit1 F1.wit2 F2.wit)
(**)
apply (tatic‹ @{context} 1› )
apply (tactic ‹
apply (rule subset_emptyI)
apply (erule F1.wit1 F1.wit2 F2.wit)
apply (rule subsetI)
apply (drule F1.wit1 F1.wit2 F2.wit)
apply (erule FalseE)
(**)
apply (erule emptyE)
apply (rule notI)
apply (tactic ‹ hyp_subst_tac @{context} 1› )
apply (drule alg_F2set)
apply (rule subsetI)
apply (rule FalseE)
apply (erule F1.wit1 F1.wit2 F2.wit)
apply (rule subset_emptyI)
apply (erule F1.wit1 F1.wit2 F2.wit)
apply (erule emptyE)
done
subsection ‹ ∀ F2set2 x. f a = a; ∀ F2set3 x. g a = a]
definition
" e
(((∀ uleans
((∀
(∀ z ∈ F2in (UNIV :: 'a set) B1 B2. g (s2 z) = s2' (F2map id fg )))
morE1:((\forall x \<in : 'a set) B1B2. s2 \<in
==> f (s1 z) = s1' (F1map id f g z)"
apply (tactic ‹ dtac @{context} @{thm iffD1[OF mor_def]} 1› )
apply (erule conjE)+
apply (erule bspec)
apply assumption
done
morE2: "[ mor B1 B2 s1 s2 B1' B2' s1' s2' f g; z ∈ F2in UNIV B1 B2]
==> g (s2 z) = s2' (F2map id f g z)"
apply (tactic ‹ dtac @{context} @{thm iffD1[OF mor_def]} 1› )
apply (erule conjE)+
apply (erule bspec)
apply assumption
mor_incl: "[ B1 ⊆ B1'; B2 ⊆ B2'] ==> mor B1 B2 s1 s2 B1' B2' s1 s2 id id"
apply (tactic ‹
apply (erule con)
apply (rule conjI)
apply (rule ballI)
apply (erule subsetD)
pply (erul ssubst_mem[OF])
apply (apply (tac \open @{c} @{ ififf[O alg_d]}1clo>)
apply (erule subsetD)
apply (erule ssubst_mem[OF id_apply])
apply (rule conjI)
(ererule co)+
apply (rule trans)
apply (rule id_apply)
apply (tactic ‹ stac @{context} @{thm F1.map_id} 1› )
apply (erule b)
apply (rule ballI)
apply (rule trans)
apply (rule id_apply)
apply (tactic ‹
apply (rule refl)
done
morcomp:
"[ mor B1 B2 s1 s2 B1' B2' s1' s2' f g;
mor B1' B2' s1' s2' B1'' B2'' s1'' s2'' f' g'] ==>
mor B1 B2 s1 s2 B1'' B2'' s1'' s2'' (f' o f) (g' o g)"
apply (tactic ‹
apply (tactic ‹
apply (tactic ‹
apply (erule conjE)+
apply (ul conjI)
apply (rconjI)
apply (r ballI)
apply (rule ssubst_mem[OF o_app
apply (erule bspec)
apply (erule bspec)
apply assumption
apply (rule ballI)
apply (rule ssubst_mem[OF o_apply])
apply (erule bspec)
apply erule bspec)
apply assumption
apply (rule conjI) drule F1.wit1 F1.wi F2.wit)
apply rule ballI)
apply (rule trans[OF o_apply])
apply (rule trans)
apply (rule trans)
apply (drule bspec[rotated])
apply assumption
apply (erule arg_cong)
apply (erule CollectEc)+
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply (rule CollectI)
apply (rule conjI)
apply (rule subset_UNIV)
apply (rule conmowere
apply (e or_q_leran)
(rule F1.set_map(2))
apply (rule image_subsetI)
apply (erule bspec)
apply (erule subsetD)
apply assumption
apply (rule ord_eq_le_trans)
apply (rule F1.set_map(3))
apply (rule image_subsetI)
apply (erule bspec)
apply (erule subsetD)
apply assumption
apply (rule arg_cong[OF F1map_comp_id])
apply (rule ballI)
apply (rul(rule trans[OF o_apply])
rule trans
apply
apply ( bspec[rotated])
apply assumption
apply (erule arg_cong)
apply (erule CollectE conjE)+
apply (erule bspec)
(le
apply (rule conjI)
apply (rrul susetI)
Ft)
apply(ue ordd_eqq_le_tra
apply (rule.set_map()
(erule emptyE)
apply (eruerule subsetD)
apply assumption
apply (rule ord_eq_le_trans)
apply (rule F2.set_map(3))
apply (rule image_subsetI)
apply (erule bspec)
apply (erule subsetD)
apply assumption
apply (rule arg_cong[OF F2map_comp_id])
done
mor_cong: "[ f' = f; g' = g; mor B1 B2 s1 s2 B1' B2' s1' s2' f g]
a ∈ B1') ∧ a ∈ B2')) ∧
apply (tactic ‹ z ∈ z)= s2' (F2map id f g z)))"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
done
moapp (ule cE)+
"m"mpti
apply (rule iffD2)
apply(rule mor_def)
apply (rule conjI)
apply (rule conjI)
apply (rule ballI)
apply (rule UNIV_I)
apply (rule ballI)
apply (rule UNIV_I)
apply aston
apply (rule ballI)
apply (rule refl)
apply (rule ballI)
apply (rule refl)
done
‹
d_type_F1 ="bd_t_F1+ (b, bd_t_F1d_type1 1
ype_synonym bd_type_F2 bdype_F2(_ty_F2, bd_type_, b_tpe_2 "
apply (rule ssubst_mem[m[OF id_aply])
"appy(ue id_ply)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
apply (rletran)
Leq_trans[OF F1.set_bd(1) ordLeq_csum1[OF F1.bd_Card_order]])
F1set2_bd_incr: "∧ F1bd'"
rule rdLessordLeqra[OF F1.set_bd(2)ordLLqcsm1[OF F.bd_d_Crdr]
F1set3_bd_incr: "∧ [ moB1 B' ' s'B1' ' s' ff' g'\rbrakk > ==>
by (ruatacti<dtac rtac @{context} (@{thm mor_def} RS iffD2) 1 ›
ssst_me_apply])
F1ae bec
F1bd'_Cnotzero m rlecnjj
trans[O _aply])
2 \> bd_F2 +c |UNIV :: (bd_type_F2, bd_type_F2, bd_type_F2) F2 set|"
F2set1_bd_incr: "∧
(ueordLs_ordLeq_rans[OFF2..set_bd(1) oordLeq_csumm11OF F2.bd_ard_order)
F2set2"\<AndxF2bd'"
by (rule ordLess_ordLeq_trans[OF F2.set_bd(2) ordLeq_csum1[OF F2.bd_Card_order]])
F2set3_bd_incr: "∧
e ordLessordLeq_asOFF.set(3)ordLeq_csum1[OF F2.Card_odr])
2bdCrd_orderCarder_csum
F2b (ule _eqle_trans)
(rule iagesubse
apply ( subs
SucFbd where "SucFbd ≡ cardSuc (F1bd' +c F2bd')"
ASucFbd where "ASucFbd ≡ ( |UNIV| +c ctwo ) ^c SucFbd"
F1set1_bd: "|F1set1 x| <o bd_F1 +c bd_F2"
apply (rule ordLess_ordLeq_trans)
apply (rule F1.set_bd(1))
apply (rule ordLeq_csum1)
apply (rule F1.bd_Card_order)
done
F1set2_bd: "|F1set2 x| <o bd_F1 +c bd_F2"
apply (rule ordLess_ordLeq_trans)
apply (rule F1.set_bd(2))
apply (rule ordLeq_csum1)
apply (rule F1.bd_Card_order)
done
F1set3_bd: "|F1set3 x| <o bd_F1 +c bd_F2"
apply (rule ordLess_ordLeq_trans)
apply
apply (rule ordLeq_c uthors: : Jasmi Blanche, And Popescu,DmitrT
apply (rule F1.bd_Card_order)
done
F2set1_bd: "|F2set1 x| <o bd_Mainta: Traytel < atLeast Fixpoint (a.k.a. Datatype) ›
(rul ordLess_ordLeq_)
apply imports"HOL-Library.BNF_Axiom
rule ordLeq_csum2)
apply (r F2.bd)
done
F2set2_bd: "|F2set2 x| <o bd_F1 +c bd_F2"
apply (rule ordLess_ordLeq_trans)
apply (rule F2.set_bd(2))
apply (rule ordLeq_csum2)
apply (rule F2. BNF_Def.cnvol (‹ ‹
done
F2set3_bd: "|F2set3 x| <o bd_F1 +c bd_F2"
apply (rule ordLess_ordLeq_trans)
apply (rule F2.set_bd(3))
apply (rule ordLeq_csum2)
apply (rule F2.bd_Card_order)
done
SucFbd_Card_order = cardSuc_Card_order[OF Card_order_csum]
SucFbd_Cinfinite = Cinfinite_cardSuc[OF Cinfinite_csum1[OF F1bd'_Cinfinite]]
SucFbd_Cnotzero = Cinfinite_Cnotzero[OF SucFbd_Cinfinite]
worel_SucFbd = Card_order_wo_rel[OF SucFbd_Card_order]
ASucFbd_Cinfinite = Cinfinite_cexp[OF ordLeq_csum2[OF Card_order_ctwo] SucFbd_Cinfinite]
‹ Minimal Algebras›
(* These are algebras generated by the empty set. *)
abbreviation min_G1 where
"min_G1 As1_As2 i ≡ (∪ j ∈ underS SucFbd i. fst (As1_As2 j))"
abbreviation min_G2 where
"min_G2 As1_As2 i ≡ (∪ j ∈ underS SucFbd i. snd (As1_As2 j))"
abbreviation min_H where
"min_H s1 s2 As1_As2 i ≡
(min_G1 As1_As2 i ∪ s1 ` (F1in (UNIV :: 'a set) (min_G1 As1_As2 i) (min_G2 As1_As2 i)),
min_G2 As1_As2 i ∪ s2 ` (F2in (UNIV :: 'a set) (min_G1 As1_As2 i) (min_G2 As1_As2 i)))"
abbreviation min_algs where
"min_algs s1 s2 ≡ wo_rel.worec SucFbd (min_H s1 s2)"
definition min_alg1 where
"min_alg1 s1 s2 = (∪ i ∈ Field SucFbd. fst (min_algs s1 s2 i))"
definition min_alg2 where
"min_alg2 s1 s2 = (∪ i ∈ Field SucFbd. snd (min_algs s1 s2 i))"
lemma min_algs:
"i ∈
apply (rule fun_cong[OF wo
apply (rule iffD2)
apply (rule meta_eq_to_obj_eq)
apply (rule wo_rel.adm_wo_def[OF worel_SucFbd])
apply (rule allI
pply(u)
apply (rule iffD2)
apply (rule prod.inject)
apply (rule conjI) (rule sbet_UNI)
apply (rule arg_cong2[of _ _ _ _ " (∪
apply (rule
ydrule
apply umption
apply (erule arg_cong)
apply (rule image_congsumption
apply (rule arg_cong2
apply (rule SUP_cong)
apply mor B21
apply (drule bspec)
apply assumption
apply (erule arg_cong)
apply (rule SUP_cong
apply (rule refl)
apply (drule bspec)
apply assumption
apply (rule
apply (ruleD2
(e onjI
apply (rule SUP_conglI
apply (rulee )
(drulebspec
apply assumption
ply
apply (rule image_cong
apply (rule
apply (rule SUP_cong)
apply (rule refl)
apply (drule bspec
apply assumptionbd_type_F1F11 d_type_F1d_type_F1
applyulerg_cong
rule
apply (ule
apply (drule<equiv bd_F1 +c |UNIV :: (bd_type_F1, bd_type_F1 bd_type_F1et
apply assumption
apply (erule arg_cong)
apply (rule refl)
done
corollary ary<>ield< fst (min_algs s1 s2 i) =
min_G1 (min_algs s1 s2) i ∪
s1 ` (F1in UNIV (min_G1 (min_algs s1 s2) i) (min_G2min_algsijava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
(
apply
apply (rule fst_conv)
done
corollary min_algs2: "i ∈ Field SucFbd ==> snd (min_algs s1 s2 i) =
min_G2_lss1 s2) i ∪
s2 ` (F2in UNIV (min_G1 (min_algs s1 s2) i) (min_G2 (min_al2set2_bd_ncr: " <>.set2F2bd
pplyeans
apply F2set3_bd_incrx. |F2set3 x| <o F2bd'
apply (rule
2 nite
lemma min_algs_mono1: "relChainoOF F2.card_order card_of_card_o_on]
apply abbreviation SucFbd whr " ucFbd> cardSuc (F1bd' +c F2bd')"
apply (ule allI)+
apply (rule impI)
apply (rule case_split)
apply (rule xt1(3))
apply (rule min_algs1)
apply (erule FieldI2)
apply
apply (rule UnI1)
apply (rule UN_I)
apply (erule underS_I)
apply assumption
apply assumption
apply (rule equalityD1)
apply (drule notnotD)
apply (erule arg_cong)
done
lemma min_algs_mono2: " relChain SucFbd (%i. snd (min_algs s1 s2 i))"
apply (tactic ‹ rtac @{context} @{thm iffD2[OF meta_eq_to_obj_eq[OF relChain_def]]} 1 › )
apply (ruleall)+
apply (rule impI)
apply (rule case_split)
apply (rule xt1(3))
apply (rule min_algs2)
apply (erule FieldI2)
apply (rule subsetI)
apply (rule UnI1)
apply (rule UN_I)
apply (erule underS_I)
apply assumption
apply assumption
apply (rule equalityD1)
apply (drule notnotD)
apply (erule arg_cong)
done
lemma SucFbd_limit: " [
==> ∃ y ∈
apply (erule conjE)+
apply (rule rev_mp)
apply (rule Cinfinite_limit_finite)
apply (rule finite.insertI)
apply (rule finite.insertI)
apply (rule finite.emptyI)
apply (erule insert_subsetI)
apply (erule)
apply (rule empty_subsetI)
apply (rule SucFbd_Cinfinite)
apply (rule impI)
apply (erule bexE)
apply (rule bexI)
apply (rule conjI)
apply (erule bspec)
apply tacticopen @context @thm } RSiffD2›
apply (erule bspec)
apply (rule insertI2)
apply (rule insertI1)
apply assumption
done
lemma alg_min_alg: "alg (min_alg1 s1 s2) (min_alg2 s1 s2) s1 s2"
apply (tactic ‹
apply ( rule conjI )
apply ( rule ballI )
apply ( rule CollectE conjE +
apply ( rule bexE )
apply ( rule cardSuc_UNION_Cinfinite )
apply (rule Cinfinite_csum1) (*TRY*)
apply (rule F1bd'_Cinfinite)
apply (rule min_algs_mono1)
apply apply ( [rotated
apply (rule ordLeq_transitive)
apply (rule ordLess_imp_ordLeq( CollectE
apply (rule ordLeq_csum1) (*or refl *)
apply (rule F1bd'_Card_order)
apply (rule bexE)
apply (rule cardSuc_UNION_Cinfinite)
apply (rule Cinfinite_csum1
apply (rule F1bd'_Cinfinite)
apply ( min_algs_mono2
apply (erule subset_trans[OF _ equalityD1[OF min_alg2_def]])
apply (rule ordLeq_transitive)
apply (ule[OFF1set3_bd_incr
apply (rule ordLeq_csum1) (*or refl *)
apply (rule F1bd'_Card_order)
apply (rule bexE)
apply (rule SucFbd_limit)
apply (erule conjI)
apply assumption
apply (rule subsetD[OF equalityD2[OF
apply (rule UN_I)
apply (erule thin_rl)
apply (erule thin_rl)
apply (erule thin_rl)
n_rl
apply (erule thin_rl)
apply (erule thin_rl)
apply (erule thin_rl) (* m + 3 * n *)
apply assumption
apply (rule subsetD)
apply (rule equalityD2)
apply (rule min_algs1apply rule)
apply assumption
apply (rule UnI2)
apply (rule image_eqI
apply (rule refl)
apply (rule CollectI)
apply (drule asm_rl)
apply (erule thin_rl)
apply (erule thin_rl)
apply (erule conjE)+
apply (rule conjI)
apply assumption
apply (apply (mor_incl_min_alg
apply (erule subset_trans)
apply (rule subsetI)
apply (rule UN_I
apply (erule underS_I)
apply assumption
apply assumption
apply (erule subset_trans)
apply (erule UN_upper[OF underS_Iapply (tactic ‹ ) 1›
apply assumption
(**)
apply (rule ballI)
apply erule conjE)+
apply (rule bexE)
apply (erule CollectE)+
apply (rule Cinfinite_csum1) (*TRY*)
apply (rule ( CollectI)
apply (rule min_algs_mono1)
apply (erule subset_trans (rule ballI
apply (rule ordLeq_transitive)
apply ordLess_imp_ordLeqOF F2set2_bd_incr
apply (rule ordLeq_csum2)
apply (rule F2bd'_Card_order)
apply (rule bexE)
apply (rule cardSuc_UNION_Cinfinite)
apply (rule) (*TRY*)
apply (rule F1bd'_Cinfinite)
apply (rule min_algs_mono2)
apply (erule subset_trans[OF _ equalityD1[OF min_alg2_def]])
apply (rule ordLeq_transitive)
apply (rule ordLess_imp_ordLeq[OF F2set3_bd_incr])
apply (rule ordLeq_csum2
apply (rule F2bd'_Card_order)
apply (rule)
apply (rule SucFbd_limit)
apply (erule conjI)
apply assumption
apply (rule subsetD[OF equalityD2[OF]])
apply (rule UN_I)
apply (erule thin_rl)
apply (erule thin_rl)
apply (erule thin_rl)
apply (erule thin_rl)
apply (erule thin_rl)
apply (erule)
apply (erule thin_rl) (* m + 3 * n *)
apply assumption
apply (ule)
apply (rule equalityD2)
apply (rule min_algs2)
apply assumption
apply (rule UnI2)
apply (rule image_eqI)
apply (rule refl)
apply (rule CollectI)
apply (rule conjI)
apply assumption
apply (erule thin_rl)
apply (erule thin_rl)
apply (erule)
apply (erule conjE)+
apply (rule conjI)
apply (erule subset_trans)
apply ( UN_upper)
apply (erule underS_I)
apply assumption
apply (erule subset_trans)
apply (rule UN_upper)
apply (erule underS_I)
apply assumption
done
lemmas apply erule)
ordLess_ctwo_cexp
cexp_mono1
OF SucFbd_Card_order SucFbd_Card_order]
lemma card_of_min_algs:
fixes
shows "i ∈ Field SucFbd ⟶ ballI)
apply erule CollectE conjE)+
apply (rule well_order_induct_imp[of _ " %i. ( |fst (min_algs s1apply ruleCollectI)
( impI
apply (rule conjI)
apply (rule ordIso_ordLeq_trans)
apply ( card_of_ordIso_subst)
apply (erule min_algs1)
apply (ruleapply ( ssubst_mem[OF])
apply (rule UNION_Cinfinite_bound)
apply (rule ordLess_imp_ordLeq)
apply (rule ordLess_transitive)
apply (rule card_of_underS)
apply (rule SucFbd_Card_order)
apply assumption
apply (rule SucFbd_ASucFbd)
apply (rule(ule.set_map(2 ))
apply (erule allE)
apply (drule mp)
apply (( underS_E)
apply (drule mp)
apply (erule underS_Field)
apply (erule conjE)+
apply assumption
apply (rule ASucFbd_Cinfinite ( image_Collect_subsetI)
apply (rule ordLeq_transitive)
apply (rule)
apply (rule ordLeq_transitive)
apply (rule F1.in_bd)
apply (rule ordLeq_transitive)
apply (rule cexp_mono1)
apply (rule csum_mono1)
apply (rule csum_mono2) (* REPEAT m *)
apply (rule csum_cinfinite_bound)
apply (rule UNION_Cinfinite_bound)
apply (rule ordLess_imp_ordLeq)
apply (rule ordLess_transitive
apply (rule card_of_underS)
apply (rule SucFbd_Card_order (rule subset_trans
apply assumption
apply (rule SucFbd_ASucFbd)
apply (rule ballI)
apply (erule allE)
apply (drule mp
apply (erule underS_E)
apply (drule mp)
apply (erule underS_Field)
apply (erule conjE)+
apply assumption
apply (rule ASucFbd_Cinfinite)
apply (rule
apply (rule ordLess_imp_ordLeq)
apply (rule ordLess_transitive)
apply "<>a1 ∈ car_init2 dummy;
apply (rule SucFbd_Card_order)
apply assumption
apply (rule ucFb_ASFbd)
apply (rule ballI)
apply (erule allE)
apply druleule m)
apply (erule underS_E)
apply (drule mp)
apply(eule uderSField)
apply (erule conjE)+
apply assumption
apply (rule ASucFbd_Cinfinite)
apply (rule card_of_Card_order)
apply (rule card_of_Card_order)
apply (rule ASucFbd_Cinfinite)
apply (rule F1bd'_Card_order)
apply (rule ordIso_ordLeq_trans)
apply (rule cexp_cong1)
apply (rule ordIso_transitive)
apply (rule csum_cong1)
apply (ruleordIso_transitive)
apply (tactic ‹
(rtac @{context} @{thm ordIso_refl} THEN'
FIRST' [rtac @{contex} @{thm card_of_Carorder},
rtac @{context} @{thm Card_order_csum},
rtac @{contxt} @@{tm Card_order_cexpp}])
@{thm ordIso_transitive} @{thm csum_assoc} @{thm csum_com} @{thm csum_cong}
[1,2] [2,1] 1 › )
apply (rule csum_absorb1)
apply (rule ASucFbd_Cinfinite)
apply (rpy (rulrule ordLeq_trsiti)
apply (rule ordLeq_csum1)
apply (tactic ‹
apply (rule ordLeq_cexp1)
apply (rule SucFbd_Cnotzero)
apply (rule Card_order_csum)
apply (rule csum_absorb1)
apply (rule ASucFbd_Cinfinite)
apply (rule ctwo_ordLeq_Cinfinite)
apply (rule ASucFbd_Cinfinite)
apply (rule F1bd'_Card_order)
apply (rule ordIso_imp_ordLeq)
apply (rule cexp_cprod_ordLeq)
apply (rule Card_order_csum)
apply (rule SucFbd_Cinfinite)
apply (rule F1bd'_Cnotzero)
apply (rule ordLeq_transitive)
apply (rule ordLeq_csum1)
apply (rule F1bd'_Card_order)
apply (rule cardSuc_ordLeq)
apply (rule Card_order_csum)
apply (rule ASucFbd_Cinfinite)
apply (rule ordIso_ordLeq_trans)
apply (rule card_of_ordIso_subst)
apply (erule min_gs2)
apply (rule Un_Cinfinite_bound)
apply (rule UNION_Cinfinite_bound)
apply (rule ordLess_imp_ordLeq)
apply (rule ordLess_transitive)
apply (rule card_of_underS)
apply (rule SucFbd_Card_order)
apply assumption
apply (rule SucFbd_ASucFbd)
apply (rule ballI)
apply (erule allE)
apply (drule mp)
apply (erule underS_E)
apply (drule mp)
pply (erle undererS_Field)
apply (erule conjE)+
apply assumption
apply (rule ASucFbd_Cinfinite)
apply (rule ordLeq_transitive)
apply (rule card_of_image)
apply (rule ordLeq_transitive)
apply(rle F2nbd)
apply (rule ordLeq_transitive)
apply (rule cexp_mono1)
apply (rule csum_mono1)
apply (rule csum_mono2)
apply (rule csum_cinfinite_bound)
apply (rule UNION_Cinfinite_bound)
apply (rule ordLess_imp_ordLeq)
apply rul ordLess_ransitve)
apply (rule card_of_underS)
apply (rule SucFbd_Card_order)
apply assumption
apply (rule SucFbd_ASucFbd)
apply (rule ballI)
apply (erule allE)
apply (drule mp)
apply (erule underS_E)
apply (drule mp)
pply (ereunrS_Field)
apply (erule conjE)+
apply assumption
apply (rule ASucFbd_Cinfinite)
apply (rule UNION_Cinfinite_bound)
apply (rule ordLess_imp_ordLeq)
apply (rule ordLess_transitive)
apply (rule card_of_underS)
apply (rule SucFbd_Card_order)
apply assumption
apply (rule SucFbd_ASucFbd)
apply (rule ballI)
apply (erule aapply ( (eru CollectEconjE)+
apply (drule mp)
apply (erule underS_E)
apply (drule mp)
apply (erule underS_Field)
apply (erule conjE)+
apply assumption
apply (rule ASucFbd_Cinfinite)
apply (rule card_of_Card_order)
apply (rule card_of_Card_order)
apply (rule ASucFbd_Cinfinite)
apply (rule F2bd'_Card_order)
apply (rule ordIso_ordLeq_trans)
apply (rule cexp_cong1)
apply (rule ordIso_transitive)
apply (rule csum_con
apply (rule ordIso_transitive)
applyrulmooE2
(rtac @{context} @{thm ordIso_refl} THEN'
FIRST' [rtac @{context} @{thm card_of_Card_order},
rtac @{context} @{thm Card_order_csum},
rtac @{context} @{thm Card_order_cexp}])
@{thm ordIso_transitive} @{thm csum_assoc} @{thm csum_com} @{thm csum_cong}
[1,2] [2,1] 1 › )
apply (rule csum_absorb1)
apply (ruy rule ASucFbinfiite)
apply (rule ordLeq_transitive)
apply (rule ordLeq_csum1)
apply (tactic ‹
apply (rule ordLeq_cexp1)
apply (rule SucFbd_Cnotzero)
apply (rule Card_order_csum)
apply (rule csum_absorb1)
apply (rule ASucFbd_Cinfinite)
apply (rule ctwo_ordLeq_Cinfinite)
apply (rule ASucFbd_Cinfinite)
apply (rule F2bd'_Card_order)
apply (rule ordIso_imp_ordLeq)
apply (rule cexp_cprod_ordLeq)
apply (rule Card_order_csum)
apply (rule SucFbd_Cinfinite)
apply (rule F2bd'_Cnotzero)
apply (rule ordLeq_transitive)
apply (rule ordLeq_csum2)
apply (rule F2bd'_Card_order)
apply (rule cardSuc_ordLeq)
apply (rule Card_order_csum)
apply (rule ASucd_Cfinite
done
lemma card_of_min_alg1:
fixes s1 :: "
shows "|min_alg1 s1 s2| ≤ 2
apply (rule ordIso_ordLeq_trans)
apply (rule card_of_ordIso_subst[OF min_alg1_def])
apply (rule UNION_Cinfinite_bound)
apply (rule ordIso_ordLeq_tapply (rle F2in_mno23)3
apply (rule card_of_Field_ordIso)
apply (rule SucFbd_rd_order)
apply (rule ordLess_imp_ordLeq)
apply (rule SucFbd_ASucFbd)
apply (rule ballI)
apply (drule rev_mp)
apply (rule card_of_min_algs)
apply (erule conjE)+
apply assumption
apply (rule ASucFbd_Cinfinite)
done
card_of_min_alg2:
fixes s1 :: "('a, 'b, 'c) F1 ==>
shows "|min_alg2 s1 s2| ≤
apply (rule ordIso_ordLeq_trans)
apply (rule card_of_ordIso_su
apply (rule UNION_Cinfinite_bound)
apply (rule ordIso_ordLeq_trans)
apply (rule card_of_Field_ordIso)
apply (rule SucFbd_Card_order)
apply (rule ordLess_imp_ordLeq)
apply (rule SucFbd_ASucFbdappl (ere prorestric
apply (rule ballI)
apply (drule rev_mp)
apply (rule card_of_min_algs)
apply (erule conjE)+
apply assumption
apply (rule ASucFbd_Cinfinite)
done
least_min_algs: "alg B1 B2 s1 s2 ==> rtac @{context} (@{thm alg_def} RS iffD2) 1› )
i ∈ Field SucFbd ⟶
fst (min_algs s1 s2 i) ⊆
apply (rule well_order_induct_imp[of _ "%i. (fst (min_algs s1 s2 i) ⊆ B1 ∧
apply (rule impI)
apply (rule conjI)
apply (rule ord_eqerulsut_tn)
apply (erule min_algs1)
apply (rule Un_least)
apply (rule UN_least)
apply (erule allE)
apply (drule mp)
apply (erule underS_E)
apply (drule mp)
apply (erule underS_Field)
apply (erule conjE)+
apply assumption
apply (rule image_subsetI)
apply (erule Capply (rsubstD)
apply (erule alg_F1set)
apply (erule subset_trans)
apply (rule UN_least)
apply (erule allE)
abbreviationn:: '1t < 'a2 set ==> 'a3 set ==> (('a1, 'a2, 'a3) F2) set" where
apply (erule underS_E)
apply (drule mp)
apply ( underS_Field
applyollectE
( conjI)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
apply (erule subset_trans)
apply (rule UN_least)
apply (erule allE set_trans
apply pplyjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
e
S_Field
(<dtac @{context } @{thm iffD1[OF alg_def]} 1 ›
apply assumption
apply (rule ord_eq_le_trans)
apply (erule min_algs2
apply (
(
apply (1_mono23
y
apply erule
yrule
apply java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply ulelectI
apply assumption
e_subsetIsetI
apply (erule CollectE conjE)+
apply (erule erule
apply (erule subset_trans)
apply (rulejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
apply erule
apply (drule mp
apply (erule underS_E
apply apply (rule)
pplylenderS_Field
apply erule)+
apply assumption
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
apply (rule)
apply (erule
apply (drule mp)
apply (erule underS_E)
apply ule)
apply (eruleField
apply ulenjE
apply assumption
done
lemma
apply apply rule)
apply (rule UN_least)
apply ()
(ule
apply (ule
one
lemma least_min_alg2"alg B1 B2 s s2 ==> B2"
apply (rule ord_eq_le_trans[OF
apply Collect_restrict ''s2 '1 s2 pplyule_ict
apply drule)
apply (drule mp)
apply assumption
apply (erulertac
apply assumption
done
lemma mor_incl_min_alg apply rule
s12<Longrightarrow
mor (min_alg1java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
apply bspec
plyefl
apply apply ee_subsetI
subsection Initiality›
text The following ``happens o eheeournstruction
ofapply ctI
type_synonym SucFbd_typee 1_) <ightarrowa1cFbd_type"
type_synonym(D
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 17
V :
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "macro" is null
(nj
subsectionopen>>Ini Algeb › derSScFbd i. fst (As_A j))"
abbreviation II :'a1 set
" <i>A_T (1B,12)|B21 2.al 1B2s12
definition str_init1 where
(umy:: '1)
1, 'a1 IIT <Ri> 'a1 AS
(i :: 'a1 IIT) =
fst (sndd (Re_ITi))
d<>f : 'a1II \Rightarrow ppl (rl ropestict)
definition str_init2 where
" (my1 apply rulejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
apply def el_SucFbd
abbreviation car_init1
"apply (r(re onj)
abbreviation car_init2 where
" dummy< min_alg2 (str_init1 dummy) (str_init2 dummy)"
lemma alg_select:
" <> ∈ II. alg (fst (fst (Rep_IIT i))) (snd (fst (Rep_IIT i)))
(fst (snd (Rep_IIT i))) (snd(ep_IIT
apply (ruleapply (rule Collect_restrict)
apply (erule CollectE exEapplyect_restrict
cticcopen st_tac leCollectIllectI
unfolding snd_conv[ UNIV_I
apply assumption ( arg_cong2___ F1in apply java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
done
lemma mor_select pec( ballI
apply rule)
mor (fst SUP_cong
(fst (apply
morle
apply (rule)
apply (ruleulet_restrictestrict
apply (rule o_id)
apply (rule sym)
apply ( apply bspec
apply apply ( bspec
apply (tactic \open >tacjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
icnacmor_deffD2)
apply (rule conjI)
apply (rule conjI)
apply (rule ballI)
apply (erule bspec[rotated])
apply (erule CollectE)
apply assumption
apply (rulemin_G1<
apply (erule bspec[rotated])
apply (erule CollectE)
apply assumption
apply (rule conjI)
apply (rule ballI)
apply (rule str_init1_def)
apply (rule ballI)
apply (rule str_init2_def)
apply (rule mor_incl_min_alg)
(*alg_epi*)
apply (ule
apply \rule on trans F1
leconjI
apply lI
apply le
apply lectIOFmap_cong0ng0]
apply java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
apply ( bspec alg_select
apply F2in_mono23∀ apply prop_restrictrict
eruleg_F1set
apply
apply uleapplyule trans erule bspecjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
ubset_transet_trans
ulect_restrictrictjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
apply done
subsection <>apply (tactic ‹ )
apply assumption
apply rule rd_eq_le_trans
apply ( rule F1 . set_map ( 3 ( UN_I )
apply
apply ( erule image_mono )
apply ( rule image_Collect_subsetI )
ply ( erule c )
apply assumption
apply ( rule ballI )
pply y ( erule ule e ollectE onjE
apply ule ollectI
apply ( rule ballI )
apply ( frule bspec [ OF alg_select apply rule llI java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
[ ply rule setI
apply ule . map 3
ule e allI
apply 2 set_map ) java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 28
erule mage_mono mono )
age_Collect_subsetI
apply ( erule bspec )
lectE ( ply ule bd ard_order _ er
ply ( rd_eq_le_trans le_trans
apply ( ule bsetD java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
apply ( erule image_mono )
apply ( erule thin_rl java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
apply apply ollect_restrict estrict ict java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
( rule mor_def )
ne ly ( ule e conjI
lemma nit_unique_mor
\ < lbrakk > a1 \ < n r_init1 mmy 2 \ < in > car_init2 dummy ;
mor ( car_init1 dummy ) apply ( image_eqI
mor ( car_init1 dummy ) ( car_init2 dummy ) ( str_init1 dummy ) ( str_init2 dummy ) B1 B2 s1 s2 g1 g2 \ < rbrakk > \ < Longrightarrow >
f1 a1 = g1 a1 \ < and > f2 a2 apply ( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
pply rule conjI
apply ( erule ule prop_restrict
rule thin_rl
ply le bsetI etI
apply actic nderS_I
assumption
ply e allI I
y rule llectI java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
ly le onjI
ply dLess_ordLeq_trans c_UNION_Cinfinite ) Cinfinite finite
pply ( ule java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
apply ( rule Collect_restrict )
rule et_trans apply le llI lI
apply ( rule Collect_restrict java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
apply ( rule trans java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
apply ( erule morE1 )
setD
apply ( rule F1in_mono23 ( e 2 _ ) )
)
apply ( rule Collect_restrict )
apply rule CollectI
apply le I
assumption tion
set3_bd set3 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
y mption
apply ( rule ssumption umption
apply ( rule arg_cong [ OF apply As1_As2 \ < > \ n SucFbd . ( As1_As2 j ) "
apply le refl )
apply assumption
mor_Rep_IF ep_IF
min_alg1 alg1 1 s2 \ < nion > i \ in > SucFbd . fst ( min_algs s1 s2 i ) ) "
apply ( rule sym )
apply ( erule morE1 apply ( UnI2 )
ply ( e bsetD
ly rule rule ollectI ctI
apply ( rule Collect_restrict )
pply rule e ollect_restrict ct_restrict estrict ict
apply ( rule CollectI ) apply rule e njI java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
y ( conjI pply ( rule [ F1set OF alg_min_alg ] )
apply assumption
apply ( rule conjI )
apply assumption
rd_eq_le_trans q_le_trans le_trans _ [ OF . set_map ap ) )
apply ( apply drule bspec
apply rule arg_cong2 exp_mono1 [ rdLeq_csum2 q_csum2 m2 OF Card_order_ctwo d_order_ctwo ,
apply erule CollectE conjE ) +
( ( conjI )
apply rule alg_F2set [ OF alg_min_alg ]
ule subset_trans
y ( rule Collect_restrict )
( ordIso_ordLeq_trans )
apply ( rule Collect_restrict lect_restrict restrict trict ct java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ply morE2 )
apply ( rule subsetD )
apply ( le ans
apply ( Collect_restrict )
apply ( rule Collect_restrict )
apply ( rule CollectI
ule e_split
apply assumption
apply ( rule conjI )
apply assumption
ply ssumption tion n
ule ns )
apply ( rule arg_cong [ OF F2 . map_cong0 ] )
apply ( rule refl )
erule op_restrict strict t java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
apply ( I1
apply ( erule prop_restrict
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 20
apply ( rule sym )
apply ( erule apply ly ule rdLess_imp_ordLeq _ imp_ordLeq
apply ( rule apply nsertI2
apply ( rule Collect_restrict
apply ( rule conjI )
y ule e conjI )
apply ( rule E java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
assumption
apply ( e subsetD java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
apply ( erule prop_restrict )
apply ( min_algs_mono2 )
apply rule apply rule e mage_mono
apply ( rule conjI )
apply ( rule ballI ) apply ( erule thin_rl ) (* m + 3 * n *)
apply ( rule CollectI )
erule conjE + le bij_betw_imp_surj_on betw_imp_surj_on mp_surj_on _ urj_on on bij_betw_the_inv_into ] )
( jI
[ y ( le conjI jI java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
apply ( erule subset_trans )
( rule Collect_restrict )
apply ( erule subset_trans )
( rule e Collect_restrict lect_restrict restrict
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 21
apply ( rule min_algs_mono1 )
apply ( rule subsetD )
apply ( rule F1in_mono23 )
apply ( rule Collect_restrict )
rule Collect_restrict ) apply allI )
apply ( rule CollectI )
pply ly ( rule subset_trans set_trans trans [ OF qualityD1 ityD1 [ OF min_alg2_def lg2_def ] f java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
apply ule
( ule onjI )
apply assumption
assumption
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
apply ( rule arg_cong [ OF F1 . map_cong0 ] )
apply ( ordIso_ordLeq_trans )
apply ( erule prop_restrict )
set_map )
apply ( erule prop_restrict )
apply assumption apply ( e bij_betw_imp_surj_on etw_imp_surj_on )
apply ( rule sym )
apply ( erule morE1 le +
apply ( rule subsetD )
apply ( rule F1in_mono23 )
ly ule ollect_restrict
( ule lect_restrict )
apply y ( erule subset_trans )
apply apply rule ordLeq_transitive ( rule llectI I )
apply apply assumption
apply ( rule conjI )
apply assumption
ly ssumption ubset_UNIV _ V
apply ( rule ballI )
apply ( rule CollectI )
apply ( erule CollectE conjE ) apply assumption
apply ( rule conjI )
apply ( rule alg_F2set [ OF alg_min_alg ] )
apply ( erule subset_trans )
apply ( rule Collect_restrict apply ( e Collect_restrict
apply ( erule subset_trans )
apply e llect_restrict
apply ( rule trans )
apply ( erule morE2 )
apply ( rule subsetD ) done
apply ( rule F2in_mono23 )
apply ( rule Collect_restrict )
apply ( rule Collect_restrict )
apply ( rule CollectI )
apply rule @ ly ( erule p_restrict trict t java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 20
apply rule )
apply assumption onjI jI )
apply assumption
apply rule trans )
apply ( rule arg_cong x 2 p d java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 32
apply ( rule refl )
apply IV
apply assumption
apply ( erule prop_restrict ) apply ( rule alg_F2set OF min_alg
apply assumption
apply
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 22
apply ( rule F2in_mono23 )
apply ( rule Collect_restrict )
apply ( rule Collect_restrict )
apply ( rule CollectI )
apply ( rule conjI )
n
apply ( rule conjI )
apply assumption
ssumption
done
abbreviation closed where
" closed dummy phi1 phi2 \ < equiv > ( ( \ < forall > x \ < in > apply eq_csum1
( \ < forall > z \ < in > F1set2 x rule bsorb1
( e bd ard_order
( \ < forall > z \ < in > F2set2 x . phi1 z ) \ < and > ( \ < forall
lemma init_induct : " closed dummy phi1 phi2 \ < Longrightarrow >
( \ < forall > x \ < in > car_init1 dummy . phi1 x ) \ < and > ( \ < forall > x \ < in > car_init2 dummy . phi2 x ) "
ply ( rule conjI
apply ( rule ballI )
apply ( erule apply drule p )
( east_min_alg1
apply le conjI jI java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
apply rule ballI java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
apply ( rule q_le_trans F java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 20
sumption
ply erule le e_sub ubsetI
apply ( fold_unique unique_mor ue_mor iffD2 or_UNIV conjI
apply ( erule apply erule subset_trans )
apply ( rule Collect_restrict )
apply ( erule ) p )
apply ( rule Collect_restrict )
apply ( rule mp )
apply ( erule bspec )
apply ( rule CollectI )
apply ( rule conjI )
apply assumption
apply ( rule conjI )
apply ( rule subset_trans )
apply ( pply ( um_mono2
ns java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 31
apply ( rule Collect_restrict )
apply ( rule conjI )
apply ( rule ballI )
apply ( erule prop_restrict )
apply assumption
( llI )
apply ( erule prop_restrict )
apply assumption
apply ( rule ballI )
rule CollectI ) apply ( rule jE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
apply ( erule CollectE conjE ) +
ule njI
apply ( le ransitive ive
apply ( erule subset_trans )
apply ( rule Collect_restrict )
pply ( le set_trans rans
apply ( rule Collect_restrict )
apply ( rule mp )
( le
apply ( ( ule ualityD1 yD1 )
apply ( rule conjI )
apply assumption
apply ( rule conjI )
apply ( erule )
_
apply e Suc_ordLeq rdLeq a1 ASucFbd_type cFbd_type \ ) pply erule le java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
apply ( rule Collect_restrict )
apply ( rule conjI )
apply ( rule ballI )
apply ( erule prop_restrict )
apply assumption
apply ( rule ballI )
apply ( erule prop_restrict )
apply assumption
apply ( rule ballI )
apply ( erule prop_restrict )
apply ( rule least_min_alg2 )
apply ( tactic \ < open > rtac @ { context } ( @ { thm alg_def } RS iffD2 ) 1 apply e d_ASucFbd
: ( ' , , c \ < definition str_init2 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
apply ( rule ballI )
apply ( rule CollectI )
apply ( erule CollectE conjE ) ule ucFbd_Card_order
apply ( rule conjI )
apply ( rule alg_F1set [ OF alg_min_alg ] )
apply ( erule subset_trans )
apply ( rule Collect_restrict )
apply ( erule subset_trans )
apply ( rule Collect_restrict )
apply ( rule mp )
apply ( erule bspec )
apply ( rule )
apply ( rule conjI )
apply assumption
apply ( rule conjI )
apply ( erule subset_trans )
apply ( rule Collect_restrict )
apply subset_trans )
apply ( rule Collect_restrict )
apply assumption
apply ballI )
apply ( erule prop_restrict ( subset_trans )
apply assumption
apply ( rule ballI )
apply ( erule prop_restrict )
apply assumption
rule )
apply ( rule CollectI )
apply ( erule CollectE conjE ) +
apply ( rule conjI )
apply ( alg_F2set [ OF alg_min_alg ] java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
apply erule )
apply ( rule Collect_restrict )
apply ( erule subset_trans java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply ( rule Collect_restrict )
apply ( rule mp )
apply ( erule bspec )
apply ( rule CollectI )
conjI
apply ( conjI )
apply ( mp )
apply ( rule Collect_restrict )
apply ( erule subset_trans )
apply ( Collect_restrict )
apply ( rule conjI )
apply ( rule ballI )
apply ( prop_restrict java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
apply ( erule prop_restrict )
apply assumption
done
subsection \ < open > The datatype \ < close >
typedef
apply ( rule iffD2 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply ( rule ex_in_conv )
apply ( rule conjunct1 )
apply ( rule alg_not_empty )
apply ( rule alg_min_alg )
done
typedef ( overloaded \ < open Initial \ < close >
apply ( rule iffD2 ply rule llI
n_conv _
apply ( rule conjunct2 )
apply ( rule alg_not_empty )
apply ( rule alg_min_alg )
et java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
definition ctor1 where " ctor1 = Abs_IF1 o str_init1
definition ctor2 where " ctor2 = Abs_IF2 o str_init2 undefined o F2map id apply ule image_Collect_subsetI llect_subsetI _ bsetI I
lemma snd_conv s_IIT_inverse verse [ F UNIV_I I
" rule ubset_trans
( car_init1 undefined ) ( car_init2 undefined ) ( str_init1 undefined ) ( apply le fst snd Rep_IIT ) d IT UNIV ' 2 \ rbrakk \ < Longrightarrow >
unfolding mor_def ctor1_def ctor2_def o_apply
apply ( rule conjI )
apply ( rule conjI )
apply ( rule ballI )
apply ( rule Rep_IF1 )
apply ( rule ballI ) ( le _
apply ( rule Rep_IF2 )
e njI
apply ule ctor2_o
s_IF1_inverse IF1_inverse 1 "
apply ( rule apply ( ule trans t_min_alg1 _ alg1
apply ( rule ord_eq_le_trans [ OF F1 . set_map ( 2 ) ] )
apply ( le lI I )
p_IF1
apply ( rule ord_eq_le_trans [ OF F1 apply ule m ly rule conjI )
apply ( rule image_subsetI )
apply ( rule Rep_IF2 )
apply ( rule ballI
apply ( rule Abs_IF2_inverse )
apply ( rule alg_F2set [ OF alg_min_alg ] )
apply rule ord_eq_le_trans [ OF . set_map 2 )
apply ( rule image_subsetI )
apply ( rule Rep_IF1 )
apply ( rule ord_eq_le_trans [ OF
apply ( rule image_subsetI )
apply ( rule Rep_IF2 )
done
lemma mor_Abs_IF rule apply assumption
" mor ( car_init1 undefined ) ( car_init2 undefined )
( str_init1 r_init2 init2 defined pply ( rule rg_cong g_cong ong OF 1 p_cong0 ] )
( ule F2 set_map ( )
apply ( rule conjI )
apply ( rule conjI )
apply ( rule
apply ( rule UNIV_I )
apply ( rule ballI )
apply ( rule UNIV_I )
apply ( rule conjI )
apply ( rule apply ( rule ) ect_restrict t_restrict )
apply ( erule CollectE conjE ) +
apply ( rule sym [ OF arg_cong [ OF trans [ OF F1map_comp_id F1map_congL ] ] ] )
apply ( erule Abs_IF1_inverse [ OF subsetD ] )
apply assumption
apply ( rule ballI [ OF trans [ OF o_apply ] ] )
apply ( erule Abs_IF2_inverse [
apply assumption
apply ( rule ballI )
apply ( erule CollectE conjE ) +
apply text \ < rule morE2 E2
apply erule le orE1
apply fold ere
apply assumptio
apply ule I trans ( e ollectI I java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
apply ( erule Abs_IF2_inverse [ OF subsetD ] )
apply assumption
done
lemma copy :
" \ < lbrakk apply ule mption
' ' ' ' ' B2 java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 19
apply ( rule exI ) +
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
apply ( tactic \ < open > rtac @ { context } ( @ { thm alg_def } RS iffD2 ) 1 \ < close > )
apply ( rule conjI )
apply ( rule ballI )
apply )
apply apply e lect_restrict
apply ( rule equalityD1 )
apply ( erule bij_betw_imp_surj_on [ OF bij_betw_the_inv_into ] )
apply ( rule imageI )
apply ( erule alg_F1set )
apply ( rule ord_eq_le_trans )
apply ( rule F1 . set_map ( 2 ) )
apply ( rule subset_trans )
apply ( erule image_mono )
apply ( rule equalityD1 )
apply rule conjI )
apply ( rule ( I
apply ( rule F1 . set_map ( 3 ) )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply ( rule equalityD1 )
apply ( erule bij_betw_imp_surj_on )
apply ( rule ballI )
apply ( erule CollectE conjE ) +
apply ( rule subsetD )
apply ( rule equalityD1 )
mp_surj_on j_on F j_betw_the_inv_into java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 32
apply ( rule imageI )
_ set
apply ( rule ord_eq_le_trans
apply ( rule F2 . set_map ( 2 ) )
pply le ubset_trans _ ns java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
apply ( erule image_mono )
apply ( rule equalityD1 )
apply ( erule bij_betw_imp_surj_on )
apply rule ord_eq_le_trans
rule set_map )
apply ( rule subset_trans )
apply ( erule image_mono )
apply ( rule equalityD1 )
apply ( erule ij_betw_imp_surj_on
apply ( tactic \ < open > rtac @ { context } apply ( rule ballI )
apply apply le age_subsetI
apply ( rule conjI )
apply ( erule bij_betwE )
apply ( erule bij_betwE )
njI
e )
apply ( erule CollectE conjE ) +
apply ( erule f_the_inv_into_f_bij_betw )
apply ( erule lemma or2_o_dtor2 ctor2 2 tor2 "
apply ( rule ord_eq_le_trans )
apply ( rule F1 . set_map ( 2 ) )
apply apply allI trans F y
apply ( erule image_mono )
apply ( rule equalityD1 )
apply ( erule bij_betw_imp_surj_on )
apply ( rule ord_eq_le_trans )
apply ( rule F1 . set_map ( 3 ) )
apply ( rule subset_trans )
apply ( erule image_mono )
apply ( rule equalityD1 ) apply e ule conjI
apply w_imp_surj_on
apply rule ballI
apply ( erule CollectE conjE ) +
ply _
tE conjE ) +
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 31
apply ( rule F2 . set_map ( 2 ) )
apply ( rule subset_trans )
( F2 p ) apply e njI
apply ( rule equalityD1 )
apply ( erule bij_betw_imp_surj_on )
apply ( rule ord_eq_le_trans )
apply ( rule F2 . set_map ( 3 ) )
apply le ubset_trans _ trans
apply ( erule image_mono )
apply ( rule equalityD1 )
apply ( erule bij_betw_imp_surj_on )
done
lemma init_ex_mor :
" \ < le ityD1
apply ( insert ex_bij_betw [ OF card_of_min_alg1 , of s1 s2 ]
ex_bij_betw [ OF card_of_min_alg2 , of s1 s2 ] )
apply ( erule exE ) +
apply ( ule ev_mp mp
apply ( rule copy [ OF alg_min_alg apply e ffD2 )
apply assumption
apply assumption
apply java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply ( erule exE conjE ) +
apply ( rule exI ) apply rule )
apply ( rule mor_comp )
apply le ctI
lect t
apply ( rule CollectI )
) +
apply ( rule conjI )
apply ( rule refl )
apply assumption
unfolding fst_conv snd_conv Abs_IIT_inverse [ OF UNIV_I ]
apply ( erule mor_comp )
apply ( rule mor_incl )
apply ( rule subset_UNIV )
apply ( rule subset_UNIV )
done
text \ < open > Iteration \ < close >
bbreviation java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
r IV IV or1 1 or2 NIV V fst f ) snd )
definition fold1 where " fold1 apply y ule )
definition fold2 where " fold2 s1 s2 = snd ( fold s1 s2 ) "
lemma mor_fold
UNIV old1 s1 s2 old2 s2 "
unfolding fold1_def fold2_def
rule e mp
apply ( rule init_ex_mor )
( le ply le allI java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
apply ( erule exE )
apply ( erule exE )
apply ( rule someI [ of " % ( f : : ( ' a IF1 \ < Rightarrow tion
r 1 or2 UNIV IV s2 fst ( " )
cong conv onv
done njI )
ML \ < open >
val _ text
( rtac @ { context } @ { thm CollectI } 1 THEN BNF_Util . CONJ_WRAP ( K ( rtac @ { context } @ { thm subset_UNIV } e t_UNIV
@ { thm morE1 [ OF mor_fold ] }
val fold2 = rule_by_tactic @ { context }
( rtac @ { context } @ { thm CollectI } 1 THEN BNF_Util . CONJ_WRAP
@ { thm morE2 [ OF mor_fold ] }
\ < close >
theorem rule e alityD1 yD1 )
" ( fold1 s1 s2 ) ( ctor1 x ) = s1 ( F1map id ( fold1 s1 s2 ) ( fold2 s1 s2 ) x ) "
apply ( rule morE1 )
apply ( rule mor_fold )
apply ( rule CollectI )
apply
hyp_subst_tac @ { context } 1 \ < close > )
apply ( rule conjI )
apply ( rule subset_UNIV )
apply ( rule bset_UNIV IV )
done
theorem fold2 :
" ( fold2 s1 s2 ) ( ctor2 x ) = s2 ( F2map id 1 s2 ) (
apply ( rule morE2 )
( mor_fold
apply \ \ < And > x y . ( \ And > a b . a \ < in > F2set2 x \ < Longrightarrow > b \ < in > F2set2 y \ < apply sumption ion
apply ( rule conjI )
apply ( rule subset_UNIV )
apply ( rule conjI rule eta_mp mp [ ec
apply ( rule subset_UNIV )
apply ( rule subset_UNIV )
done
lemma mor_UNIV : " mor UNIV UNIV s1 s2 UNIV UNIV s1 ' s2 ' f g \ < longleftrightarrow >
f o s1 = s1 ' o F1map id
apply ( rule iffI )
apply ( rule conjI )
apply ( rule ext )
apply ( rule trans )
apply ( rule o_apply )
apply ( rule trans )
e orE1
apply ( rule CollectI )
apply ( rule conjI )
apply ( rule subset_UNIV )
apply ( rule conjI )
apply ( rule subset_UNIV )
ubset_UNIV
( le [ OF apply ns
apply ( rule ext )
apply ( rule o_apply )
apply ( rule trans )
apply ( erule morE2 )
apply ( rule CollectI )
apply ( rule conjI )
apply apply ( rule trans [ OF o_apply ] )
apply ( rule conjI apply ( e ns [ OF cong [ F1map_simps ] ] )
apply ( rule subset_UNIV )
apply ( rule subset_UNIV )
apply ( rule sym [ OF o_apply ] )
( \ open tac context } ( m ermute_prems { unct2 IFmap_unique que ) < )
apply ( rule conjI )
apply ( rule conjI )
apply ( rule ballI )
apply ( rule UNIV_I )
apply ( rule ballI )
apply ( rule UNIV_I java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
fun_eq_iff
apply ( drule iffD1 [ OF fun_eq_iff ] )
apply ( rule conjI )
pply rule le llI
apply ( erule allE ) +
apply ( rule trans )
ply ( erule trans [ OF [ OF rule
y e pply )
rule ballI )
apply ( erule allE ) +
apply ( rule trans
ply erule trans OF apply
apply ( rule o_apply )
done
lemma trans conjunct1 ld_unique ique [ OF
f = fold1 s1 s2 < and > > g = fold2 s1 2
apply apply onjI
ly ule urj_fun_eq
lemmas pply le _ e_trans
apply ( rule ballI )
apply ( rule conjunct1 )
init_unique_mor ue_mor mor r2 x
apply assumption
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 25
mor_comp
apply ( rule mor_Abs_IF )
apply assumption
y ( rule mor_comp )
apply ( rule mor_Abs_IF )
old
pply _ _ eq )
apply ( rule type_definition . Abs_image [ OF type_definition_IF2 ] )
apply ( rule ballI )
apply ( rule conjunct2 )
apply ( rule init_unique_mor )
apply ( rule Rep_IF1 )
apply assumption
apply ( rule mor_comp )
ply rule mor_Abs_IF
apply assumption
apply ( rule mor_comp )
apply ( rule mor_Abs_IF )
apply ( rule mor_fold )
done
lemmas fold_unique = fold_unique_mor [ OF e or_fold d
lemmas fold1_ctor = sym [ apply drule _ 2
lemmas fold2_ctor ctI )
text \ < open > Case distinction ( apply umption tion java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
lemmas ctor1_o_fold1 =
e _ IV
lemmas ctor2_o_fold2 =
trans [ OF conjunct2 [ OF fold_unique_mor [ OF mor_comp [ OF mor_fold mor_str ] ] ] fold2_ctor ]
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
definition " dtor1 = fold1 ( F1map id ctor1 ctor2 ) ( _ ply
definition " dtor2 = fold2 ( F1map id ctor1 ctor2 ) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ML \ < open > Local_Defs . fold @ { context } @ { thms dtor1_def } @ { thm ctor1_o_fold1 } \ < close >
ML \ < open > Local_Defs . fold @ { context }
lemma ctor1_o_dtor1 : " ctor1 o dtor1 = id "
unfolding dtor1_def
apply ( rule ctor1_o_fold1 )
done
lemma ctor2_o_dtor2 : " ctor2
apply ( rule ctor2_o_fold2 )
done
lemma dtor1_o_ctor1 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply ( rule ext )
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
apply ( rule trans [ OF fun_cong [ OF dtor1_def apply ( e rans ns F1map_simps
( ule rans s [ OF old1 d1 )
apply ( rule trans [ OF F1map_comp_id ] )
apply ( rule trans [ OF F1map_congL ] )
apply ( rule ballI )
apply ( rule trans [ OF fun_cong [ OF ctor1_o_fold1 ] id_apply ] )
apply ( rule ballI )
apply ( rule trans [ OF fun_cong [ OF ctor2_o_fold2 ] id_apply ] )
apply ( rule sym [ OF apply ule . _ finite
done
lemma dtor2_o_ctor2 : " dtor2 o ctor2
apply ( rule ext )
apply ( rule trans [ OF o_apply ] )
apply ( rule trans [ OF fun_cong [ OF dtor2_def ] )
apply ( rule trans [ OF fold2 ] )
apply ( rule trans [ OF F2map_comp_id ] )
apply ( rule trans [ OF F2map_congL ] )
apply ( rule ballI )
( trans F un_cong _ ong g [
apply ule lI
theorem IF1set_natural : " set o et2 x \ ongrightarrow > < > set2 2 \ Longrightarrow phi1 a b ) \ < Longrightarrow >
apply ( rule sym [ OF id_apply ] )
done y ( rule trans java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
lemmas ctic < > > ( ac context t @ hm meta_mp N_ALL_NEW oal . orm_hhf_tac @ text } \ < )
lemmas dtor2_ctor2 = = pointfree_idE [ OF dtor2_o_ctor2 ]
lemmas apply [ java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
lemmas ctor2_dtor2 = pointfree_idE [ OF ctor2_o_dtor2 ]
lemmas r1_o_dtor1 tor1_o_ctor1 o_ctor1
lemmas inj_dtor1 = bij_is_inj OF bij_dtor1 ]
lemmas surj_dtor1 = bij_is_surj [ OF bij_dtor1 ]
lemmas dtor1_nchotomy = surjD [ OF surj_dtor1 ]
lemmas dtor1_diff nj_eq q inj_dtor1
lemmas dtor1_cases = exE [ OF dtor1_nchotomy ]
lemmas bij_dtor2 = o_bij [ OF ctor2_o_dtor2 le conjI njI java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
lemmas inj_dtor2 = bij_is_inj [ OF bij_dtor2 ]
lemmas ( rule spec java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
lemmas dtor2_nchotomy = surjD [ OF surj_dtor2 ]
lemmas dtor2_diff = inj_eq [ OF inj_dtor2 ule )
lemmas ( rg_cong . _ ]
lemmas bij_ctor1 = o_bij [ OF dtor1_o_ctor1 ctor1_o_dtor1 ]
lemmas = _ inj [ bij_ctor1
lemmas surj_ctor1 = bij_is_surj [ OF bij_ctor1 ]
lemmas
lemmas ctor1_diff = inj_eq [ OF inj_ctor1 ]
lemmas ctor1_cases = exE [ OF ctor1_nchotomy ]
lemmas bij_ctor2 = o_bij [ OF dtor2_o_ctor2 ctor2_o_dtor2 ]
lemmas inj_ctor2 = bij_is_inj [ OF bij_ctor2 ]
lemmas surj_ctor2 = [ OF bij_ctor2 ]
lemmas ctor2_nchotomy = surjD [ OF surj_ctor2 ]
or2_diff
lemmas ctor2_cases ply y rule sym m
text \ < open > Primitive recursion \ < close >
definition rec1 where
" rec1 s1 s2 = snd o fold1 ( < ctor1 o F1map id st st ( F2map fst fst >
definition rec2 where
" rec2 s1 s2 = snd o fold2 ( < ctor1 o F1map id fst fst , s1 > ) ( < ctor2 o ( ule ans
lemma fold1_o_ctor1 : " fold1 s1 s2 \ < circ > ctor1 = s1 \ < apply le rans [ F ] java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
by ( tactic \ < rule image_Un
lemma fold2_o_ctor2 : " fold2 s1 s2 \ < circ > ctor2 = s2 \ < circ > F2map rans OF apply
by ( tactic \ < open > apply ( )
lemmas fst_rec1_pair =
trans [ OF conjunct1 [ OF fold_unique [ OF
[ _ soc tric ns _ g2 java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 31
trans [ OF fold1_o_ctor1 convol_o ] ] ] , OF trans [ OF fst_convol ] ]
ns OF g_cong F1 p_comp ]
trans [ OF fold2_o_ctor2 fl
fold1_ctor , unfolded F1 . map_comp0 [ of id , unfolded id_o ] F2 . map_comp0 [ of id , unfolded id_o ] o_assoc ,
OF refl refl ]
lemmas fst_rec2_pair = done
trans [ OF conjunct2 [ OF fold_unique [ OF
trans [ OF apply rule t_natural )
trans [ OF fold1_o_ctor1 convol_o ] ] ] , OF trans [ OF fst_convol ] ]
trans larCard_csum
trans [ OF fold2_o_ctor2 convol_o ] ] ] , OF trans [ OF fst_convol ] ] ] ]
fold2_ctor , unfolded F1 . map_comp0 [ of id , unfolded text \ open The set operator \ < close >
OF refl refl ]
theorem rec1 : " rec1 s1 s2 ( ctor1 x ) = s1 ( F1map id ( < id , rec1 s1 apply bspec )
apply IF2map_simps
convol_expand_snd [ OF fst_rec1_pair ] convol_expand_snd [ OF fst_rec2_pair ] . .
theorem rec2 : " rec2 s1 s2 ( ctor2 x ) = s2 ( F2map id ( apply tactic \ > Goal . assume_rule_tac { context } 1 \ < > ) (* IH *)
olding _ ec2_def ply d2 d_convol '
convol_expand_snd [ OF fst_rec1_pair ] convol_expand_snd [ OF fst_rec2_pair ] . .
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
" f \ < circ > ctor1 = s1 \ < circ > F1map pply ( rule cong2 l . ume_rule_tac tac @ t 1 < > java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
\ circ > F2map id < id , f > < id , g > \ < Longrightarrow > f = rec1 s1 s2 \ < and > g = rec2 s1 s2 "
map_acom_SKIP
apply ( rule fold_unique )
apply ( unfold convol_o id_o o_id F1 . map_comp0 [ symmetric ] 2 map_comp0 ymmetric ric
. map_id0 F2 . map_id0 o_assoc ( < exists > I c . = { } WHILE b DO c { } < > map_acom = c \ and > I ' = f I \ and
apply apply rule IFbd_Cinfinite )
done
text \ < open > Induction \ < close >
theorem ctor_induct :
le rans
\ < And > x . ( \ < And apply e rg_cong2 _ ( < union ) " ] )
phi1 a \ < and > phi2 b "
apply ( rule mp )
apply ( rule impI )
apply ( erule conjE )
apply ( rule conjI )
apply ( rule iffD1 [ OF arg_cong [ OF Rep_IF1_inverse ] ] )
apply ( erule bspec [ OF _ Rep_IF1 ] )
apply ( rule iffD1 [ F arg_cong [ OF Rep_IF2_inverse )
apply ( erule bspec [ OF _ Rep_IF2 ] )
apply ( rule init_induct )
apply ( rule conjI )
apply ( drule asm_rl )
apply ( rule ballI )
apply ( rule impI )
apply ( rule iffD2 [ OF arg_cong [ OF morE1 [ OF mor_Abs_IF ] ] le image_Un
apply assumption
apply ( erule CollectE conjE ) +
apply ( drule meta_spec )
apply ( drule meta_mp )
apply ( rule iffD1 [ OF arg_cong [ OF Rep_IF1_inverse ] ] )
spec )
drule rev_subsetD )
apply ( rule equalityD1 )
apply ( rule F1 . set_map ( 2 ) )
apply ( erule imageE )
apply ( tactic \ ( rule )
apply ( rule ssubst_mem [ OF Abs_IF1_inverse ] )
apply ( erule subsetD )
apply assumption
apply assumption
apply ( drule meta_mp )
apply ( rule sym )
apply ( erule bspec )
apply ( drule rev_subsetD )
apply ( rule equalityD1 )
apply ( rule F1 . set_map ( 3 ) )
apply ( " nd > . a \ < in > ans
( tactic \ < open > hyp_subst_tac @ { context } 1 \ < close > )
apply ( rule ssubst_mem [ OF Abs_IF2_inverse ] )
apply ( erule subsetD )
apply umption
apply assumption
sumption
apply ( tactic \ < open Goal assume_rule_tac apply ( rule exI
apply ( drule asm_rl )
apply ( rule ballI )
apply ( rule impI )
apply ( ( IF2set_simps )
apply assumption
apply ( erule CollectE conjE ) +
apply ( drule meta_spec )
apply ( drule meta_mp )
apply ( ( iffD1 [ arg_cong [ Rep_IF1_inverse )
apply ( erule bspec )
apply ( drule rev_subsetD )
( tactic \ < open Goal . assume_rule_tac @ { context \ close > (* IH *)
apply st )
apply ( erule imageE )
apply ( tactic )
apply ( rule ssubst_mem [ OF Abs_IF1_inverse ] )
apply ( erule subsetD )
apply assumption
apply assumption
apply ( drule meta_mp )
apply ( rule iffD1 [ OF arg_cong [ OF Rep_IF2_inverse ] ] )
apply ( rule bst_mem urjective_pairing rjective_pairing mmetric )
apply ( drule rev_subsetD )
apply ( rule equalityD1 )
apply ( rule F2 . set_map ( 3 ) )
apply ( erule imageE )
apply ( tactic \ < open > hyp_subst_tac @ { context } 1 \ < apply ns fun_cong age_id id_apply ply
( n_cong d )
ubsetD
apply assumption
apply assumption )
apply assumption
done ubset_trans 1 t2_IF1set ply e +
theorem ctor_induct2 :
" \ < lbrakk > \ < And > x y . ( \ < And > a b . a \ < in > F1set2 x \ < Longrightarrow > b \ < in > F1set2 y \ < Longrightarrow > phi1 a b ) \ < Longrightarrow >
( \ < apply _
\ < And > x y . ( \ < And > a b . a \ < in > F2set2 x \ < Longrightarrow > b \ < in > F2set2 y \ < Longrightarrow > phi1 a b ) \ < Longrightarrow >
( \ < And > apply s ) )
rule et_map ap 2
apply apply ( rule un_cong OF id
apply ( rule allI [ OF conjunct1 [ OF ctor_induct [ OF asm_rl TrueI
apply ( drule meta_spec2 apply ( le trans s )
apply ( erule thin_rl )
apply ( tactic \ < open > ( dtac @ { context } @ { thm meta_mp } THEN_ALL_NEW Goal . norm_hhf_tac @ { context } ) 1 \ < close > )
apply ( drule meta_spec ) +
erule e meta_mp mp F ] java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
apply assumption
apply ( drule meta_mp )
apply ( drule meta_spec ) +
apply ( erule meta_mp [ OF spec ] )
onjI
apply assumption
apply ( rule allI [ OF apply e _ OF )
apply ( erule thin_rl )
apply ( drule meta_spec2 )
apply ( drule meta_mp )
apply ( drule meta_spec ) +
apply ( erule meta_mp [ OF spec ] )
apply assumption apply ( ule someI_ex I_ex )
apply ( erule meta_mp )
apply ( drule meta_spec ) +
apply ( erule meta_mp [ OF spec ] )
apply assumption
apply ( rule impI )
apply ( erule conjE allE ) apply on
apply ( rule conjI )
apply assumption
ply assumption n
done
subsection le ) ex
text \ < open > The map operator \ < close >
abbreviation IF1map where " IF1map f \ < equiv > fold1 ( ctor1 o ( F1map f id id ) ) apply (
abbreviation IF2map where " IF2map f \ < equiv > fold2 ( apply erule ollectD
theorem IF1map :
" ( IF1map f ) o ctor1 = ctor1 o ( F1map f ( IF1map f ) ( IF2map f ) ) "
apply ( rule ext )
apply ( rule trans [ OF o_apply
apply ( rule trans [ OF fold1 ] )
apply ( rule trans [ OF o_apply ] )
apply ( rule trans [ OF arg_cong [ OF F1map_comp_id ] ] )
apply ( rule trans [ OF arg_cong [ OF F1 . map_cong0 ] ] )
apply ( rule refl )
apply ( rule trans [ OF o_apply ] )
apply ( rule id_apply )
apply ( rule trans [ OF o_apply ] )
apply ( rule id_apply )
apply ( rule sym [ OF o_apply ] )
done ule ev_subsetD
theorem IF2map :
" ( IF2map f ) o ctor2 = ctor2 o ( F2map f ( IF1map
apply ( rule ext )
apply ( rule trans [ OF o_apply ] )
apply ( rule ( exE CollectE +
apply ( rule trans [ apply ( rule F1 . in_rel )
rule eI_ex
apply ( rule trans [ OF arg_cong [ OF F2 . map_cong0 drule asm_rl rl
apply ( rule refl )
apply ( trans [ OF o_apply ] )
apply ( rule id_apply )
apply ( rule trans [ OF [ OF o_apply ] )
apply ( rule id_apply )
apply ( rule sym [ OF o_apply ] )
done
lemmas IF1map_simps = o_eq_dest [ OF IF1map ]
lemmas IF2map_simps = o_eq_dest [ OF IF2map ]
lemma IFmap_unique :
u o ctor1 = ctor1 o F1map f u v ; v o ctor2 = ctor2 o F2map f u v < >
u = IF1map f \ < and > v apply rule allI mpI I +
apply ule old_unique unique
folding [ symmetric ] F1 . map_comp0 [ symmetric ] F2 . apply assumption
apply assumption
apply assumption
rule edicate2I cate2I ( rule p onjunct2 unct2 le_IFrel_Comp )
theorem d IF1map
apply ( rule ( 1 ) rel l T ( exI
apply ( rule conjunct1 [ OF IFmap_unique ] )
apply ( rule sumption tion
apply ( rule trans [ OF sym [ OF o_id ] ] )
apply ( rule arg_cong [ OF sym [ OF rule e fl
rule trans OF d_o o ]
apply ( rule trans [ OF sym [ OF o_id ] ] )
apply ( rule arg_cong [ OF sym [ OF F2 . map_id0 ] ] apply assumption
done
id java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
ply rule e ym java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
apply ( rule conjunct2 [ OF IFmap_unique ] )
" IF2wit ctor2 r2 t_F2
( trans [ OF sym [ OF o_id ] ] )
y ( ule rg_cong ong F sym [ 1
apply ( rule trans [ OF id_o ] )
apply ( rule trans [ OF sym [ OF apply ( fun_cong [ OF o_id ] java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
apply ( rule arg_cong [ OF sym [ OF F2 . map_id0 ] ] )
ne
theorem IF1map_comp : " IF1map ( g o f ) = IF1map g o IF1map f "
apply ( rule sym )
apply ( rule conjunct1 [ OF IFmap_unique ] )
( ext ) F )
apply wit
apply ( rule trans [ OF o_apply ] )
apply ( rule trans [ OF arg_cong [ OF IF1map_simps ] ] )
apply ( rule trans [ OF IF1map_simps ] )
apply ( rule trans [ OF arg_cong
apply ( rule sym [ OF o_apply ] )
ext ) apply rule ffD2 2
apply ( rule trans [ OF o_apply ] )
apply ( rule trans [ OF o_apply ] )
ule trans OF F F2map_simps ap_simps ] )
apply ( rule trans [ OF apply rule _ ans
apply ( rule trans [ OF arg_cong [ OF F2 . map_comp ] ] )
apply ( rule sym [ OF o_apply ] )
done
theorem IF2map_comp : " IF2map ( g o f ) = IF2map g o IF2map f "
apply ( rule sym )
apply ( tactic \ < apply assumption tion
apply ( drule rev_subsetD )
apply ( rule trans [ OF o_apply ] )
apply ( rule trans [ OF o_apply ] )
apply ( rule [ OF arg_cong [ OF IF2map_simps ] ] )
apply ( rule trans [ OF IF2map_simps ] )
apply ( rule trans [ OF arg_cong [ OF F2 . map_comp ] ] )
apply ( rule sym [ OF o_apply ] )
ext
apply ( rule trans [ OF o_apply ] )
apply ( rule trans [ OF o_apply ] )
apply ( rule trans [ OF arg_cong [ OF IF1map_simps ] ] )
apply ( rule trans [ OF IF1map_simps ] )
apply ( rule trans [ OF arg_cong [ OF F1 . map_comp ] ] )
apply ( rule sym [ OF o_apply ] )
done
text \ < open > The bound \ < close >
abbreviation IFbd where " IFbd \ < equiv > bd_F1 + c bd_F2 "
theorem IFbd_card_order : " card_order IFbd "
apply ( rule card_order_csum )
apply ( rule F1 . bd_card_order )
apply ( rule F2 . bd_card_order )
done ( cong tor2_ctor2
lemma IFbd_Cinfinite : " Cinfinite IFbd "
apply ( rule Cinfinite_csum1 )
apply ( rule F1 . bd_Cinfinite )
done
lemma IFbd_regularCard : " regularCard IFbd "
apply ( rule regularCard_csum )
apply ( rule F1 . bd_Cinfinite )
apply ( rule F2 . bd_Cinfinite )
ply pply ly ption n
done
lemmas IFbd_cinfinite = conjunct1 [ OF IFbd_Cinfinite ]
text < open set operator < lose >
(* "IFcol" stands for "collect" *)
abbreviation < unionapply arg_congctor2
abbreviation IF2col where "IF2col ≡ n
abbreviation IF1set where " IF1set ≡ atnjEleply
abbreviation IF2set where "IF2set ≡
abbreviation IF1in where " IF1inapply \> F1relNfD1<>
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma IF1set: "IF1set o ctor1 = IF1col o (F1map id IF1set IF2set)"
apply (rule ext
apply (rule trans[OF o_apply])
apply (rule trans[OFn
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
done
lemma IF2sete pI
apply (rule ext)
apply (rule trans[OF o_applyapply (uleong0
apply (ruletrans fold2
apply (rule sym[OF o_apply])
done
theorem apply (le ballI)
"IF1set (ctor1 x) = F1set1 x ∪
[OFFst]
apply (rule arg_cong2[of _ _ _ _ " (∪ )"])
apply (rule trans[OF F1.set_map(1) trans[OF fun_cong[OF image_id] id_apply]
apply (rule arg_cong2[of _ _ _ _ " (∪ )"])
apply (rule arg_cong[OF F1.set_map(2)])
apply (rule arg_cong[OF F1.set_appl rle iff2[OF predicate2_qD[OF F1.rel_comp])
done
theorem IF2set_simps:
" IF2set" RO IF1rel Sl
apply (rule trans[OF o_eq_dest[OF IF2set]])
apply (rule arg_cong2[of _ _ _ _ " (∪ )"])
apply (rule trans[OF F2.set_map(1) trans[OF fun_cong[OF image_id] id_apply]])
apply (rule arg_cong2[of _ _ _ _ " (∪ rule
y _ 2 )
apply (rule arg_cong[OF F2apply assumption
apply ption
lemmas F1set1_IF1set = xt1(3 )[OF IF1set_simps Un_upper1]
lemmas F1set2_IF1set = subset_trans[OF UN_upper subset_trans[OF Un_upper1 xt1(3 )[OF IF1set_simps (ehotomy_relcomppE[ tor2_nchotomy
lemmas F1set3_IF1set = subset_trans[OF UN_upperapply (druleel
lemmas F2set1_IF2set = xt1(3 )[OF IF2set_simps Un_upper1(rule
lemmas 1 Rption
lemmas F2set3_IF2set = subset_trans[OF UN_upper subset_trans[OF Un_upper2 xt1(3 )[OF IF2set_simps Un_upper2]]]
text ‹
IFset_natural:
"f ` (IF1set x) = IF1set (IF1map f x) ∧
apply (rule ctor_induct[of _ _ x y])
apply (rule trans)
apply (rule image_cong)
apply (rule id_transfe)
apply (rule refl)
apply (rule sym)
apply (rule trans[OF arg_cong[of _ _ IF1set, OF IF1map_simps] trans[OF IF1set_simps]])
apply (rule sym)
apply (rule img_Unn)
apply (rule arg_cong2[of _ _ _ _ "(∪ )"])
apply (rule sym)
apply (rule F1.set_map(1))
apply (rul(rule tra bby ((elim nEF2.wt[im_frt] UN_E lFalseE |
apply (rule image_Un)
apply (rule arg_cong2[of _ _ _ _ "(∪
apply (rule trans)
apply (rule trans)
apply (rule SUP_cong)
apply (rule refl)
apply (tactic \<open>Goal.assume_rule_tac @{context} 1\<close>) (* IH *)
apply (rule
apply (rule trans)
apply (rule SUP_cong
apply
apply (rule refl:F1rel
ule0
apply (<
apply (rule image_UN)
apply (rule trans)
apply (rule SUP_cong)
apply (rule refl)
apply rel
apply (ruleerans
apply (rule trans)
apply (rule SUP_cong)
apply (rule F1.set_map(3 ))
apply (rule refl)
apply (rule UN_simpsdone
apply (rule trans)
apply (rule image_cong)
apply (rule IF2set_simps)
apply (apply rule
apply (rule sym)
apply leanstOFet_simps
apply (
apply (rule trans)
apply ege_Un
apply (rule arg_cong2[of _ _ _ _ "(∪
apply (rule sym)
apply (rule F2.set_map(1))
apply (rule trans)
apply (rule image_Un)
apply (rule arg_cong2[of _ _ _ _ " (∪ )"])
apply (rule trans)
apply (rule image_UN)
apply (rule trans)
apply (rule SUP_cong)
apply (rule refl)
apply (tactic ‹
apply (rule sym)
apply (rule trans)
(ruleSUP_)
apply (rule F2.set_map(2))
apply (rule refl)
apply (rule UN_simps(10))
apply (rule trans)
apply (rule image_UN)
apply (rule trans)
apply (rule SUP_cong)
apply (rule refl)
apply (tactic ‹
apply (rule sym)
apply (rule trans)
apply (rule SUP_cong)
apply (rule F2.set_map(3))
apply (rule refl)
apply (rule UN_simps(10))
done
theorem IF1set_natural: " o (IF1map f) = image f o IF1set"
apply (rule ext)
apply (rule trans)
apply (rule o_apply)apply (e conjE+
apply (rule sym)
apply (rule trans)
apply (rule o_apply)
apply (rule conjunct1)
apply (rule IFset_natural)
done
IF2set_na: "F2 o (IF2map f) = ima f o IF2set"
apply (rule ext)
apply (rule trans)
apply (rule o_apply)
apply (rule sym)
apply (rule trans)
apply (rule o_apply)
apply (rule conjunct2)
apply (rule IFset_natural)
done
IFmap_cong:
"((∀ a ∈
((∀ a ∈ IF2set y. f a = g a) ⟶ IF2map f y = IF2map g y)"
apply (rule ctor_induct[of _ _ x y])
apply (rule impI)
apply (rule trans)
apply (rule IF1map_simps)
apply (rule trans)
apply (rule arg_cong[OF F1.map_cong0])
apply (erule bspec)
apply (erule rev_subsetD)
apply (rule F1set1_IF1set)
apply (rule mp)
apply (tactic \<open>Goal.assume_rule_tac @{context} 1\<close>) (* IH *)
apply ( rev_subsetD
apply (erule bspec)
apply (erule rev_subsetD)
apply (erule F1set2_IF1set)
apply (rule mp)
apply (tactic ‹ Goal.assume_rule_tac @{context} 1› ) (* IH *)
apply (rule ballI)
ly
apply (erule rev_subsetD)
apply (erule F1set3_IF1set)
apply (rule sym)
apply (rule IF1map_simps)
apply (rule impI)
apply (rule trans)
apply (rule IF2map_simps)
apply (rule trans)
apply (rule arg_cong[OF F2.map_cong0])
apply (erule bspec)
apply (erule rev_subsetD)
apply (rule F2set1_IF2set)
apply (rule mp)
apply (tactic ‹
applyas
apply (erule rev_subsetD)
apply (erule F2set2_IF2set)
apply (rule mp)
apply (tactic \<open>Goal.assume_rule_tac @{context} 1\<close>) (* IH *)
apply (rule ballIapply (rule
apply (erule bspec)
apply (erule rev_subsetD)
apply (erule F2set3_IF2set
apply (rule sym)
apply (rule IF2map_simps)
done
theorem IF1map_cong:
"(∧ a. a ∈ (ul ba[OF ballI])
apply (rule mp)
apply (rule conjunct1)
apply (rule IFmap_cong)
apply (rule ballI)
apply (tactic ‹ Goal.assume_rule_tac @{context} 1› )
done
theorem IF2map_cong:
" (∧ a. a ∈
apply (rule mp)
apply (rule conjunct2)
apply (rule IFmap_cong)
apply (ruleballI)+
apply (tactic ‹ Goal.assume_rule_tac @{context} 1› )
done
lemma apply ( ballI
"|IF1set (x :: 'a IF1)| <o IFbd ∧ |IF2set (y :: 'a IF2)| <o IFbd"
apply (rule ctor_induct[of _ _ x y])
apply (rule ordIso_ordLess_trans)
apply (rule card_of_ordIso_subst)
apply (rule IF1set_simps)
apply (rule Un_Cinfinite_bound_strict)
apply (rule F1set1_bd)
apply (rule Un_Cinfinite_bound_strict)
apply (rule regularCard_UNION_bound)
apply (rule IFbd_Cinfinite)
apply( IFbd_regularCard
apply (rule F1set2_bd)
apply (tactic ‹ Goal.assume_rule_tac @{context} 1›
apply (rule regularCard_UNION_bound)
apply (rule IFbd_Cinfinite)
apply (rule IFbd_regularCard)
apply (rule F1set3_bd)
apply (tactic ‹ Goal.assume_rule_tac @{context} 1› ) (* IH *)
apply rule
apply (rule IFbd_Cinfinite)
apply (rule ordIso_ordLess_trans)
apply java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
apply (rule IF2set_simps)
apply (rule Un_Cinfinite_bound_strict)
apply (rule F2set1_bd)
apply l R ST =>S) ==> ((F2rel T==> T)==>IF2rel=> TT) fold2
apply (rule regularCard_UNION_bound)
apply (rule IFbd_Cinfinite)
apply (rule IFbd_regularCard)
apply (rule F2set2_bd)
apply (tactic ‹
apply (rule regularCard_UNION_bound)
apply (rule IFbd_Cinfinite)
applynfol fold1 fold2) [1]
apply (rul apply (eapply (erule predicate2)
apply (tactic \<open>Goal.assume_rule_tac @{context} 1\<close>) (* IH *)
apply (rule IFbd_Cinfinite)
apply (rule IFbd_Cinfinite)
done
lemmas IF1set_bd = conjunct1[OF IFset_bd]
lemmas IF2set_bd = conjunct2[OF IFset_bd]
definition IF1rel where
"IF1rel R =
(BNF_Def.Grp (IF1in (Collect (case_prod R))) (IF1map fst))^--1 OO
(BNF_Def.Grp (IF1in (Collect (case_prod R))) (IF1map snd))"
definition IF2rel where
"IF2rel R =
(BNF_Def.Grp (IF2in (Collect (case_prod R))) (IF2map fst))^--1 OO
(BNF_Def.Grp (IF2in (Collect (case_prod R))) (IF2map snd))"
lemma in_IF1rel:
"IF1rel R x y ⟷ (∃ x = y"
unfolding IF1rel_def by (rule predicate2_eqD[OF OO_Grp_alt])
lemma in_IF2rel:
"IF2rel R x y ⟷ (∃ z. z ∈ Iby (elim U UnE F.wit2[lim_f] F2..w[elim_format UN_ FalseE |
unfolding IF2rel_def by (rule predicate2_eqD[OF OO_Grp_alt])
lemma IF1rel_F1rel: " IF1rel R (ctor1 a) (ctor1 b) ⟷ F1rel R (IF1rel R) (IF2rel R) a b"
apply (rule iffI)
apply (tactic ‹ "x \in IF2 IFwit \\ <<Logright> False"
apply (erule exE conjE CollectE)+
apply (rule iffD2)
apply (rule F1.in_rel)
apply (rule exI)
apply (rule conjI)
apply (rule CollectI)
apply (rule conjI)
(rule ord_)
apply (rule F1.set_map(1))
apply (rule ord_eq_le_trans)
apply (rule trans[OF fun_cong[OF image_id] id_apply])
apply (rule subset_trans)
apply (rule F1set1_IF1set)
apply (erule ord_eq_le_trans[OF arg_cong[OF ctor1_dtor1]])
apply (rule conjI)
apply (rule ord_eq_le_trans)
apply (rule F1.set_map(2))
apply (rule image_subsetI)
apply (rule CollectI)
apply (rule case_prodI)
apply (rule iffD2)
apply (rule in_IF1rel)
apply (rule exI)
apply (rule conjI)
apply (rule CollectI)
apply (erule subset_trans[OF F1set2_IF1set])
apply (erule ord_eq_le_trans[OF arg_cong[OF ctor1_dtor1]])
apply (rule conjI)
apply (rule refl)
apply (rule refl)
rule ord_
apply (rule F1.set_map(3))
apply (rule image_subsetI)
apply:IF2
apply (rule case_prodI)
apply (rule iffD2)
apply (rule in_IF2rel)
apply (rule exI)
apply (rule conjI)
apply (rule CollectI)
apply (rule subset_trans)
apply (rule F1set3_IF1set)
apply assumption
apply (erule ord_eq_le_trans[OF arg_cong[OF ctor1_dtor1]])
apply (rule conjI)
apply (rule refl)
apply (rule refl)
apply (rule conjI)
apply (rule trans)
apply (rule F1.map_comp)
apply (rule trans)
apply (rule F1.map_cong0)
apply (rule fun_cong[OF o_id])
apply (rule trans)
apply (rule o_apply)
apply (rule fst_conv)
apply (rule trans)
apply (rule o_apply)
apply (rule fst_conv)
apply (rule iffD1[OF ctor1_diff])
apply (rule trans)
apply (rule sym)
apply (rule IF1map_simps)
apply (erule trans[OF arg_cong[OF ctor1_dtor1]])
apply (rule trans)
apply (rule F1.map_comp)
apply (rule trans)
apply (rule F1.map_cong0)
apply (rule fun_cong[OF o_id])
apply (rule trans)
apply (rule o_apply)
apply (rule snd_conv)
apply (rule trans)
apply (rule o_apply)
apply (rule snd_conv)
apply (rule iffD1[OF ctor1_diff])
apply (rule trans)
apply (rule sym)
apply (rule IF1map_simps)
apply (erule trans[OF arg_cong[OF ctor1_dtor1]])
apply (tactic ‹ dtac @{context} (@{thm F1.in_rel[THEN iffD1]}) 1› )
apply (erule exE conjE CollectE)+
apply (rule iffD2)
apply (rule in_IF1rel)
apply (rule exI)
apply (rule conjI)
apply (rule CollectI)
apply (rule ord_eq_le_trans)
apply (rule IF1set_simps)
apply (rule Un_least)
apply (rule ord_eq_le_trans)
apply (rule box_equals[OF _ refl])
apply (rule F1.set_map(1))
apply (rule trans[OF fun_cong[OF image_id] id_apply])
apply assumption
apply (rule Un_least)
apply (rule ord_eq_le_trans)
apply (rule SUP_cong[OF _ refl])
apply (rule F1.set_map(2))
apply (rule UN_least)
apply (drule rev_subsetD)
apply (erule image_mono)
apply (erule imageE)
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF1rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply (erule CollectD)
apply (rule ord_eq_le_trans)
apply (rule SUP_cong[OF _ refl])
apply (rule F1.set_map(3))
apply (rule UN_least)
apply (drule rev_subsetD)
apply (erule image_mono)
apply (erule imageE)
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF2rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply (erule CollectD)
apply (rule conjI)
apply (rule trans)
apply (rule IF1map_simps)
apply (rule iffD2[OF ctor1_diff])
apply (rule trans)
apply (rule F1.map_comp)
apply (rule trans)
apply (rule F1.map_cong0)
apply (rule fun_cong[OF o_id])
apply (rule trans[OF o_apply])
apply (drule rev_subsetD)
apply assumption
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF1rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply assumption
apply (rule trans[OF o_apply])
apply (drule rev_subsetD)
apply assumption
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF2rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply assumption
apply assumption
apply (rule trans)
apply (rule IF1map_simps)
apply (rule iffD2[OF ctor1_diff])
apply (rule trans)
apply (rule F1.map_comp)
apply (rule trans)
apply (rule F1.map_cong0)
apply (rule fun_cong[OF o_id])
apply (rule trans[OF o_apply])
apply (drule rev_subsetD)
apply assumption
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF1rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply assumption
apply (rule trans[OF o_apply])
apply (drule rev_subsetD)
apply assumption
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF2rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply assumption
apply assumption
done
lemma IF2rel_F2rel: " R (ctor2 a) (ctor2 b) ⟷ F2rel R (IF1rel R) (IF2rel R) a b"
apply (rule iffI)
apply (tactic ‹ dtac @{context} (@{thm in_IF2rel[THEN iffD1]}) 1› )+
apply (erule exE conjE CollectE)+
apply (rule iffD2)
apply (rule F2.in_rel)
apply (rule exI)
apply (rule conjI)
apply (rule CollectI)
apply (rule conjI)
apply (rule ord_eq_le_trans)
apply (rule F2.set_map(1))
apply (rule ord_eq_le_trans)
apply (rule trans[OF fun_cong[OF image_id] id_apply])
apply (rule subset_trans)
apply (rule F2set1_IF2set)
apply (erule ord_eq_le_trans[OF arg_cong[OF ctor2_dtor2]])
apply (rule conjI)
apply (rule ord_eq_le_trans)
apply (rule F2.set_map(2))
apply (rule image_subsetI)
apply (rule CollectI)
apply (rule case_prodI)
apply (rule iffD2)
apply (rule in_IF1rel)
apply (rule exI)
apply (rule conjI)
apply (rule CollectI)
apply (rule subset_trans)
apply (rule F2set2_IF2set)
apply assumption
apply (erule ord_eq_le_trans[OF arg_cong[OF ctor2_dtor2]])
apply (rule conjI)
apply (rule refl)
apply (rule refl)
apply (rule ord_eq_le_trans)
apply (rule F2.set_map(3))
apply (rule image_subsetI)
apply (rule CollectI)
apply (rule case_prodI)
apply (rule iffD2)
apply (rule in_IF2rel)
apply (rule exI)
apply (rule conjI)
apply (rule CollectI)
apply (rule subset_trans)
apply (rule F2set3_IF2set)
apply assumption
apply (erule ord_eq_le_trans[OF arg_cong[OF ctor2_dtor2]])
apply (rule conjI)
apply (rule refl)
apply (rule refl)
apply (rule conjI)
apply (rule trans)
apply (rule F2.map_comp)
apply (rule trans)
apply (rule F2.map_cong0)
apply (rule fun_cong[OF o_id])
apply (rule trans)
apply (rule o_apply)
apply (rule fst_conv)
apply (rule trans)
apply (rule o_apply)
apply (rule fst_conv)
apply (rule iffD1[OF ctor2_diff])
apply (rule trans)
apply (rule sym)
apply (rule IF2map_simps)
apply (erule trans[OF arg_cong[OF ctor2_dtor2]])
apply (rule trans)
apply (rule F2.map_comp)
apply (rule trans)
apply (rule F2.map_cong0)
apply (rule fun_cong[OF o_id])
apply (rule trans)
apply (rule o_apply)
apply (rule snd_conv)
apply (rule trans)
apply (rule o_apply)
apply (rule snd_conv)
apply (rule iffD1[OF ctor2_diff])
apply (rule trans)
apply (rule sym)
apply (rule IF2map_simps)
apply (erule trans[OF arg_cong[OF ctor2_dtor2]])
apply (tactic ‹ dtac @{context} (@{thm F2.in_rel[THEN iffD1]}) 1› )
apply (erule exE conjE CollectE)+
apply (rule iffD2)
apply (rule in_IF2rel)
apply (rule exI)
apply (rule conjI)
apply (rule CollectI)
apply (rule ord_eq_le_trans)
apply (rule IF2set_simps)
apply (rule Un_least)
apply (rule ord_eq_le_trans)
apply (rule trans)
apply (rule trans)
apply (rule arg_cong[OF dtor2_ctor2])
apply (rule F2.set_map(1))
apply (rule trans[OF fun_cong[OF image_id] id_apply])
apply assumption
apply (rule Un_least)
apply (rule ord_eq_le_trans)
apply (rule trans[OF arg_cong[OF dtor2_ctor2]])
apply (rule arg_cong[OF F2.set_map(2)])
apply (rule UN_least)
apply (drule rev_subsetD)
apply (erule image_mono)
apply (erule imageE)
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply (tactic ‹ hyp_subst_tac @{context} 1› )
apply (tactic ‹ dtac @{context} (@{thm in_IF1rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply (erule CollectD)
apply (rule ord_eq_le_trans)
apply (rule trans[OF arg_cong[OF dtor2_ctor2]])
apply (rule arg_cong[OF F2.set_map(3)])
apply (rule UN_least)
apply (drule rev_subsetD)
apply (erule image_mono)
apply (erule imageE)
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF2rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule exE conjE)+
apply (erule CollectD)
apply (rule conjI)
apply (rule trans)
apply (rule arg_cong[OF dtor2_ctor2])
apply (rule trans)
apply (rule IF2map_simps)
apply (rule iffD2)
apply (rule ctor2_diff)
apply (rule trans)
apply (rule F2.map_comp)
apply (rule trans)
apply (rule F2.map_cong0)
apply (rule fun_cong[OF o_id])
apply (rule trans[OF o_apply])
apply (drule rev_subsetD)
apply assumption
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF1rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply assumption
apply (rule trans[OF o_apply])
apply (drule rev_subsetD)
apply assumption
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF2rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply assumption
apply assumption
apply (rule trans)
apply (rule arg_cong[OF dtor2_ctor2])
apply (rule trans)
apply (rule IF2map_simps)
apply (rule iffD2)
apply (rule ctor2_diff)
apply (rule trans)
apply (rule F2.map_comp)
apply (rule trans)
apply (rule F2.map_cong0)
apply (rule fun_cong[OF o_id])
apply (rule trans[OF o_apply])
apply (drule rev_subsetD)
apply assumption
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF1rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply assumption
apply (rule trans[OF o_apply])
apply (drule rev_subsetD)
apply assumption
apply (drule ssubst_mem[OF surjective_pairing[symmetric]])
apply (erule CollectE case_prodE iffD1[OF prod.inject, elim_format] conjE)+
apply hypsubst
apply (tactic ‹ dtac @{context} (@{thm in_IF2rel[THEN iffD1]}) 1› )
apply (drule someI_ex)
apply (erule conjE)+
apply assumption
apply assumption
done
Irel_induct:
assumes IH1: "∀ x y. F1rel P1 P2 P3 x y ⟶ P2 (ctor1 x) (ctor1 y)"
and IH2: "∀ x y. F2rel P1 P2 P3 x y ⟶ P3 (ctor2 x) (ctor2 y)"
shows "IF1rel P1 ≤ P2 ∧ IF2rel P1 ≤ P3"
unfolding le_fun_def le_bool_def all_simps(1,2)[symmetric]
apply (rule allI)+
apply (rule ctor_induct2)
apply (rule impI)
apply (drule iffD1[OF IF1rel_F1rel])
apply (rule mp[OF spec2[OF IH1]])
apply (erule F1.rel_mono_strong0)
apply (rule ballI[OF ballI[OF imp_refl]])
apply (drule asm_rl)
apply (erule thin_rl)
apply (rule ballI[OF ballI])
apply assumption
apply (erule thin_rl)
apply (drule asm_rl)
apply (rule ballI[OF ballI])
apply assumption
apply (rule impI)
apply (drule iffD1[OF IF2rel_F2rel])
apply (rule mp[OF spec2[OF IH2]])
apply (erule F2.rel_mono_strong0)
apply (rule ballI[OF ballI[OF imp_refl]])
apply (drule asm_rl)
apply (erule thin_rl)
apply (rule ballI[OF ballI])
apply assumption
apply (erule thin_rl)
apply (drule asm_rl)
apply (rule ballI[OF ballI])
apply assumption
done
le_IFrel_Comp:
"((IF1rel R OO IF1rel S) x1 y1 ⟶ IF1rel (R OO S) x1 y1) ∧
((IF2rel R OO IF2rel S) x2 y2 ⟶ IF2rel (R OO S) x2 y2)"
apply (rule ctor_induct2[of _ _ x1 y1 x2 y2])
apply (rule impI)
apply (erule nchotomy_relcomppE[OF ctor1_nchotomy])
apply (drule iffD1[OF IF1rel_F1rel])
apply (drule iffD1[OF IF1rel_F1rel])
apply (rule iffD2[OF IF1rel_F1rel])
apply (rule F1.rel_mono_strong0)
apply (rule iffD2[OF predicate2_eqD[OF F1.rel_compp]])
apply (rule relcomppI)
apply assumption
apply assumption
apply (rule ballI impI)+
apply assumption
apply (rule ballI)+
apply assumption
apply (rule ballI)+
apply assumption
apply (rule impI)
apply (erule nchotomy_relcomppE[OF ctor2_nchotomy])
apply (drule iffD1[OF IF2rel_F2rel])
apply (drule iffD1[OF IF2rel_F2rel])
apply (rule iffD2[OF IF2rel_F2rel])
apply (rule F2.rel_mono_strong0)
apply (rule iffD2[OF predicate2_eqD[OF F2.rel_compp]])
apply (rule relcomppI)
apply assumption
apply assumption
apply (rule ballI impI)+
apply assumption
apply (rule ballI)+
apply assumption
apply (rule ballI)+
apply assumption
done
le_IF1rel_Comp: "IF1rel R1 OO IF1rel R2 ≤ IF1rel (R1 OO R2)"
by (rule predicate2I) (erule mp[OF conjunct1[OF le_IFrel_Comp]])
le_IF2rel_Comp: "IF2rel R1 OO IF2rel R2 ≤ IF2rel (R1 OO R2)"
by (rule predicate2I) (erule mp[OF conjunct2[OF le_IFrel_Comp]])
includes lifting_syntax
fold_transfer:
"((F1rel R S T ===> S) ===> (F2rel R S T ===> T) ===> IF1rel R ===> S) fold1 fold1 ∧
((F1rel R S T ===> S) ===> (F2rel R S T ===> T) ===> IF2rel R ===> T) fold2 fold2"
unfolding rel_fun_def_butlast all_conj_distrib[symmetric] imp_conjR[symmetric]
unfolding rel_fun_iff_leq_vimage2p
apply (rule allI impI)+
apply (rule Irel_induct)
apply (rule allI impI vimage2pI)+
apply (unfold fold1 fold2) [1]
apply (erule predicate2D_vimage2p)
apply (rule rel_funD[OF rel_funD[OF rel_funD[OF rel_funD[OF F1.map_transfer]]]])
apply (rule id_transfer)
apply (rule vimage2p_rel_fun)
apply (rule vimage2p_rel_fun)
apply assumption
apply (rule allI impI vimage2pI)+
apply (unfold fold1 fold2) [1]
apply (erule predicate2D_vimage2p)
apply (rule rel_funD[OF rel_funD[OF rel_funD[OF rel_funD[OF F2.map_transfer]]]])
apply (rule id_transfer)
apply (rule vimage2p_rel_fun)
apply (rule vimage2p_rel_fun)
apply assumption
done
"IF1wit x = ctor1 (wit2_F1 x (ctor2 wit_F2))"
"IF2wit = ctor2 wit_F2"
IF1wit: "x ∈ IF1set (IF1wit y) ==> x = y"
unfolding IF1wit_def
by (elim UnE F1.wit2[elim_format] F2.wit[elim_format] UN_E FalseE |
rule refl | hypsubst | assumption | unfold IF1set_simps IF2set_simps)+
IF2wit: "x ∈ IF2set IF2wit ==> False"
unfolding IF2wit_def
by (elim UnE F2.wit[elim_format] UN_E FalseE |
rule refl | hypsubst | assumption | unfold IF2set_simps)+
‹
BNF_FP_Util.mk_xtor_co_iter_o_map_thms BNF_Util.Least_FP false 1 @{thm fold_unique}
@{thms IF1map IF2map} (map (BNF_Tactics.mk_pointfree2 @{context}) @{thms fold1 fold2})
@{thms F1.map_comp0[symmetric] F2.map_comp0[symmetric]} @{thms F1.map_cong0 F2.map_cong0}
›
‹
BNF_FP_Util.mk_xtor_co_iter_o_map_thms BNF_Util.Least_FP true 1 @{thm rec_unique}
@{thms IF1map IF2map} (map (BNF_Tactics.mk_pointfree2 @{context}) @{thms rec1 rec2})
@{thms F1.map_comp0[symmetric] F2.map_comp0[symmetric]} @{thms F1.map_cong0 F2.map_cong0}
›
"'a IF1"
map: IF1map
sets: IF1set
bd: IFbd
wits: IF1wit
rel: IF1rel
apply -
apply (rule IF1map_id)
apply (rule IF1map_comp)
apply (erule IF1map_cong)
apply (rule IF1set_natural)
apply (rule IFbd_card_order)
apply (rule IFbd_cinfinite)
apply (rule IFbd_regularCard)
apply (rule IF1set_bd)
apply (rule le_IF1rel_Comp)
apply (rule IF1rel_def[unfolded OO_Grp_alt mem_Collect_eq])
apply (erule IF1wit)
done
"'a IF2"
map: IF2map
sets: IF2set
bd: IFbd
wits: IF2wit
rel: IF2rel
apply -
apply (rule IF2map_id)
apply (rule IF2map_comp)
apply (erule IF2map_cong)
apply (rule IF2set_natural)
apply (rule IFbd_card_order)
apply (rule IFbd_cinfinite)
apply (rule IFbd_regularCard)
apply (rule IF2set_bd)
apply (rule le_IF2rel_Comp)
apply (rule IF2rel_def[unfolded OO_Grp_alt mem_Collect_eq])
apply (erule IF2wit)
done
(*<*)
end
(*>*)
Messung V0.5 in Prozent C=60 H=97 G=80
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.116Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
*Bot Zugriff