Theory CZH_ECAT_Parallel
sectionβΉCategories with parallel arrows between two objectsβΊ
theory CZH_ECAT_Parallel
imports CZH_ECAT_Small_Functor
begin
subsectionβΉBackground: category with parallel arrows between two objectsβΊ
named_theorems cat_parallel_cs_simps
named_theorems cat_parallel_cs_intros
definition πβ©Pβ©L :: "V β V" where "πβ©Pβ©L F = set {F, 0}"
definition πβ©Pβ©L :: "V β V" where "πβ©Pβ©L F = set {F, 1β©β}"
lemma cat_PL_π_nin_F[cat_parallel_cs_intros]: "πβ©Pβ©L F ββ©β F"
unfolding πβ©Pβ©L_def using mem_not_sym by auto
lemma cat_PL_π_nin_F[cat_parallel_cs_intros]: "πβ©Pβ©L F ββ©β F"
unfolding πβ©Pβ©L_def using mem_not_sym by auto
lemma cat_PL_ππ[cat_parallel_cs_intros]: "πβ©Pβ©L F β πβ©Pβ©L F"
unfolding πβ©Pβ©L_def πβ©Pβ©L_def by (simp add: Set.doubleton_eq_iff)
lemmas cat_PL_ππ[cat_parallel_cs_intros] = cat_PL_ππ[symmetric]
subsectionβΉ
Composable arrows for a category with parallel arrows between two objects
βΊ
definition cat_parallel_composable :: "V β V β V β V"
where "cat_parallel_composable π π F β‘
set {[π, π]β©β, [π, π]β©β} βͺβ©β
(F Γβ©β set {π}) βͺβ©β
(set {π} Γβ©β F)"
textβΉRules.βΊ
lemma cat_parallel_composable_ππ[cat_parallel_cs_intros]:
assumes "g = π" and "f = π"
shows "[g, f]β©β ββ©β cat_parallel_composable π π F"
unfolding assms cat_parallel_composable_def by auto
lemma cat_parallel_composable_ππ£[cat_parallel_cs_intros]:
assumes "g = π" and "f ββ©β F"
shows "[g, f]β©β ββ©β cat_parallel_composable π π F"
using assms(2) unfolding assms(1) cat_parallel_composable_def by auto
lemma cat_parallel_composable_π£π[cat_parallel_cs_intros]:
assumes "g ββ©β F" and "f = π"
shows "[g, f]β©β ββ©β cat_parallel_composable π π F"
using assms(1) unfolding assms(2) cat_parallel_composable_def by auto
lemma cat_parallel_composable_ππ[cat_parallel_cs_intros]:
assumes "g = π" and "f = π"
shows "[g, f]β©β ββ©β cat_parallel_composable π π F"
unfolding assms cat_parallel_composable_def by auto
lemma cat_parallel_composableE:
assumes "[g, f]β©β ββ©β cat_parallel_composable π π F"
obtains "g = π" and "f = π"
| "g = π" and "f ββ©β F"
| "g ββ©β F" and "f = π"
| "g = π" and "f = π"
using assms that unfolding cat_parallel_composable_def by auto
textβΉElementary properties.βΊ
lemma cat_parallel_composable_fconverse:
"(cat_parallel_composable π π F)Β―β©β = cat_parallel_composable π π F"
unfolding cat_parallel_composable_def by auto
subsectionβΉ
Local assumptions for a category with parallel arrows between two objects
βΊ
locale cat_parallel = π΅ Ξ± for Ξ± +
fixes π π F
assumes cat_parallel_ππ[cat_parallel_cs_intros]: "π β π"
and cat_parallel_πF[cat_parallel_cs_intros]: "π ββ©β F"
and cat_parallel_πF[cat_parallel_cs_intros]: "π ββ©β F"
and cat_parallel_π_in_Vset[cat_parallel_cs_intros]: "π ββ©β Vset Ξ±"
and cat_parallel_π_in_Vset[cat_parallel_cs_intros]: "π ββ©β Vset Ξ±"
and cat_parallel_F_in_Vset[cat_parallel_cs_intros]: "F ββ©β Vset Ξ±"
lemmas (in cat_parallel) cat_parallel_ineq =
cat_parallel_ππ
cat_parallel_πF
cat_parallel_πF
textβΉRules.βΊ
lemmas (in cat_parallel) [cat_parallel_cs_intros] = cat_parallel_axioms
mk_ide rf cat_parallel_def[unfolded cat_parallel_axioms_def]
|intro cat_parallelI|
|dest cat_parallelD[dest]|
|elim cat_parallelE[elim]|
textβΉDuality.βΊ
lemma (in cat_parallel) cat_parallel_op[cat_op_intros]:
"cat_parallel Ξ± π π F"
by (intro cat_parallelI)
(auto intro!: cat_parallel_cs_intros cat_parallel_ππ[symmetric])
textβΉElementary properties.βΊ
lemma (in π΅) cat_parallel_PL:
assumes "F ββ©β Vset Ξ±"
shows "cat_parallel Ξ± (πβ©Pβ©L F) (πβ©Pβ©L F) F"
proof (rule cat_parallelI)
show "πβ©Pβ©L F ββ©β Vset Ξ±"
unfolding πβ©Pβ©L_def by (intro Limit_vdoubleton_in_VsetI assms) auto
show "πβ©Pβ©L F ββ©β Vset Ξ±"
unfolding πβ©Pβ©L_def
by (intro Limit_vdoubleton_in_VsetI ord_of_nat_in_Vset assms) simp
qed (auto simp: assms cat_PL_ππ cat_PL_π_nin_F cat_PL_π_nin_F)
subsectionβΉβΉββΊ: category with parallel arrows between two objectsβΊ
subsubsectionβΉDefinition and elementary propertiesβΊ
textβΉSee Chapter I-2 and Chapter III-3 in \<^cite>βΉ"mac_lane_categories_2010"βΊ.βΊ
definition the_cat_parallel :: "V β V β V β V" (βΉββ©CβΊ)
where "ββ©C π π F =
[
set {π, π},
set {π, π} βͺβ©β F,
(Ξ»xββ©βset {π, π} βͺβ©β F. (x = π ? π : π)),
(Ξ»xββ©βset {π, π} βͺβ©β F. (x = π ? π : π)),
(
Ξ»gfββ©βcat_parallel_composable π π F.
if gf = [π, π]β©β β π
| βf. gf = [π, f]β©β β gfβ¦1β©ββ¦
| βf. gf = [f, π]β©β β gfβ¦0β¦
| otherwise β π
),
vid_on (set {π, π})
]β©β"
textβΉComponents.βΊ
lemma the_cat_parallel_components:
shows "ββ©C π π Fβ¦Objβ¦ = set {π, π}"
and "ββ©C π π Fβ¦Arrβ¦ = set {π, π} βͺβ©β F"
and "ββ©C π π Fβ¦Domβ¦ = (Ξ»xββ©βset {π, π} βͺβ©β F. (x = π ? π : π))"
and "ββ©C π π Fβ¦Codβ¦ = (Ξ»xββ©βset {π, π} βͺβ©β F. (x = π ? π : π))"
and "ββ©C π π Fβ¦Compβ¦ =
(
Ξ»gfββ©βcat_parallel_composable π π F.
if gf = [π, π]β©β β π
| βf. gf = [π, f]β©β β gfβ¦1β©ββ¦
| βf. gf = [f, π]β©β β gfβ¦0β¦
| otherwise β π
)"
and "ββ©C π π Fβ¦CIdβ¦ = vid_on (set {π, π})"
unfolding the_cat_parallel_def dg_field_simps
by (simp_all add: nat_omega_simps)
subsubsectionβΉObjectsβΊ
lemma the_cat_parallel_Obj_πI[cat_parallel_cs_intros]:
assumes "a = π"
shows "a ββ©β ββ©C π π Fβ¦Objβ¦"
using assms unfolding the_cat_parallel_components by simp
lemma the_cat_parallel_Obj_πI[cat_parallel_cs_intros]:
assumes "a = π"
shows "a ββ©β ββ©C π π Fβ¦Objβ¦"
using assms unfolding the_cat_parallel_components by simp
lemma the_cat_parallel_ObjE:
assumes "a ββ©β ββ©C π π Fβ¦Objβ¦"
obtains "a = π" | "a = π"
using assms unfolding the_cat_parallel_components(1) by fastforce
subsubsectionβΉArrowsβΊ
lemma the_cat_parallel_Arr_πI[cat_parallel_cs_intros]:
assumes "f = π"
shows "f ββ©β ββ©C π π Fβ¦Arrβ¦"
using assms unfolding the_cat_parallel_components by simp
lemma the_cat_parallel_Arr_πI[cat_parallel_cs_intros]:
assumes "f = π"
shows "f ββ©β ββ©C π π Fβ¦Arrβ¦"
using assms unfolding the_cat_parallel_components by simp
lemma the_cat_parallel_Arr_FI[cat_parallel_cs_intros]:
assumes "f ββ©β F"
shows "f ββ©β ββ©C π π Fβ¦Arrβ¦"
using assms unfolding the_cat_parallel_components by simp
lemma the_cat_parallel_ArrE:
assumes "f ββ©β ββ©C π π Fβ¦Arrβ¦"
obtains "f = π" | "f = π" | "f ββ©β F"
using assms that unfolding the_cat_parallel_components by auto
subsubsectionβΉDomainβΊ
mk_VLambda the_cat_parallel_components(3)
|vsv the_cat_parallel_Dom_vsv[cat_parallel_cs_intros]|
|vdomain the_cat_parallel_Dom_vdomain[cat_parallel_cs_simps]|
lemma (in cat_parallel) the_cat_parallel_Dom_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "ββ©C π π Fβ¦Domβ¦β¦fβ¦ = π"
unfolding the_cat_parallel_components assms by simp
lemmas [cat_parallel_cs_simps] = cat_parallel.the_cat_parallel_Dom_app_π
lemma (in cat_parallel) the_cat_parallel_Dom_app_F[cat_parallel_cs_simps]:
assumes "f ββ©β F"
shows "ββ©C π π Fβ¦Domβ¦β¦fβ¦ = π"
unfolding the_cat_parallel_components using assms cat_parallel_ineq by auto
lemmas [cat_parallel_cs_simps] = cat_parallel.the_cat_parallel_Dom_app_F
lemma (in cat_parallel) the_cat_parallel_Dom_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "ββ©C π π Fβ¦Domβ¦β¦fβ¦ = π"
unfolding the_cat_parallel_components assms by auto
lemmas [cat_parallel_cs_simps] = cat_parallel.the_cat_parallel_Dom_app_π
subsubsectionβΉCodomainβΊ
mk_VLambda the_cat_parallel_components(4)
|vsv the_cat_parallel_Cod_vsv[cat_parallel_cs_intros]|
|vdomain the_cat_parallel_Cod_vdomain[cat_parallel_cs_simps]|
lemma (in cat_parallel) the_cat_parallel_Cod_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "ββ©C π π Fβ¦Codβ¦β¦fβ¦ = π"
unfolding the_cat_parallel_components assms by simp
lemmas [cat_parallel_cs_simps] = cat_parallel.the_cat_parallel_Cod_app_π
lemma (in cat_parallel) the_cat_parallel_Cod_app_F[cat_parallel_cs_simps]:
assumes "f ββ©β F"
shows "ββ©C π π Fβ¦Codβ¦β¦fβ¦ = π"
unfolding the_cat_parallel_components using assms cat_parallel_ineq by auto
lemmas [cat_parallel_cs_simps] = cat_parallel.the_cat_parallel_Cod_app_F
lemma (in cat_parallel) the_cat_parallel_Cod_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "ββ©C π π Fβ¦Codβ¦β¦fβ¦ = π"
unfolding the_cat_parallel_components assms by auto
lemmas [cat_parallel_cs_simps] = cat_parallel.the_cat_parallel_Cod_app_π
subsubsectionβΉCompositionβΊ
mk_VLambda the_cat_parallel_components(5)
|vsv the_cat_parallel_Comp_vsv[cat_parallel_cs_intros]|
|vdomain the_cat_parallel_Comp_vdomain[cat_parallel_cs_simps]|
|app the_cat_parallel_Comp_app[cat_parallel_cs_simps]|
lemma the_cat_parallel_Comp_app_ππ[cat_parallel_cs_simps]:
assumes "g = π" and "f = π"
shows "g ββ©Aβββ©C π π Fβ f = g" "g ββ©Aβββ©C π π Fβ f = f"
proof-
from assms have "[g, f]β©β ββ©β cat_parallel_composable π π F"
by (cs_concl cs_shallow cs_intro: cat_parallel_cs_intros)
then show "g ββ©Aβββ©C π π Fβ f = g" "g ββ©Aβββ©C π π Fβ f = f"
unfolding the_cat_parallel_components(5) assms
by (auto simp: nat_omega_simps)
qed
lemma the_cat_parallel_Comp_app_ππ[cat_parallel_cs_simps]:
assumes "g = π" and "f = π"
shows "g ββ©Aβββ©C π π Fβ f = g" "g ββ©Aβββ©C π π Fβ f = f"
proof-
from assms have "[g, f]β©β ββ©β cat_parallel_composable π π F"
by (cs_concl cs_intro: cat_parallel_cs_intros)
then show "g ββ©Aβββ©C π π Fβ f = g" "g ββ©Aβββ©C π π Fβ f = f"
unfolding the_cat_parallel_components(5) assms
by (auto simp: nat_omega_simps)
qed
lemma the_cat_parallel_Comp_app_πF[cat_parallel_cs_simps]:
assumes "g = π" and "f ββ©β F"
shows "g ββ©Aβββ©C π π Fβ f = f"
proof-
from assms have "[g, f]β©β ββ©β cat_parallel_composable π π F"
by (cs_concl cs_intro: cat_parallel_cs_intros)
then show "g ββ©Aβββ©C π π Fβ f = f"
unfolding the_cat_parallel_components(5) assms
by (auto simp: nat_omega_simps)
qed
lemma (in cat_parallel) the_cat_parallel_Comp_app_Fπ[cat_parallel_cs_simps]:
assumes "g ββ©β F" and "f = π"
shows "g ββ©Aβββ©C π π Fβ f = g"
proof-
from assms have "[g, f]β©β ββ©β cat_parallel_composable π π F"
by (cs_concl cs_intro: cat_parallel_cs_intros)
then show "g ββ©Aβββ©C π π Fβ f = g"
unfolding the_cat_parallel_components(5)
using assms cat_parallel_ineq
by (auto simp: nat_omega_simps)
qed
subsubsectionβΉIdentityβΊ
mk_VLambda the_cat_parallel_components(6)[unfolded VLambda_vid_on[symmetric]]
|vsv the_cat_parallel_CId_vsv[cat_parallel_cs_intros]|
|vdomain the_cat_parallel_CId_vdomain[cat_parallel_cs_simps]|
|app the_cat_parallel_CId_app|
lemma the_cat_parallel_CId_app_π[cat_parallel_cs_simps]:
assumes "a = π"
shows "ββ©C π π Fβ¦CIdβ¦β¦aβ¦ = π"
unfolding assms by (auto simp: the_cat_parallel_CId_app)
lemma the_cat_parallel_CId_app_π[cat_parallel_cs_simps]:
assumes "a = π"
shows "ββ©C π π Fβ¦CIdβ¦β¦aβ¦ = π"
unfolding assms by (auto simp: the_cat_parallel_CId_app)
subsubsectionβΉArrow with a domain and a codomainβΊ
lemma (in cat_parallel) the_cat_parallel_is_arr_πππ[cat_parallel_cs_intros]:
assumes "a' = π" and "b' = π" and "f = π"
shows "f : a' β¦βββ©C π π Fβ b'"
proof(intro is_arrI, unfold assms)
show "ββ©C π π Fβ¦Domβ¦β¦πβ¦ = π" "ββ©C π π Fβ¦Codβ¦β¦πβ¦ = π"
by (cs_concl cs_shallow cs_simp: cat_parallel_cs_simps cs_intro: V_cs_intros)+
qed (auto simp: the_cat_parallel_components)
lemma (in cat_parallel) the_cat_parallel_is_arr_πππ[cat_parallel_cs_intros]:
assumes "a' = π" and "b' = π" and "f = π"
shows "f : a' β¦βββ©C π π Fβ b'"
proof(intro is_arrI, unfold assms)
show "ββ©C π π Fβ¦Domβ¦β¦πβ¦ = π" "ββ©C π π Fβ¦Codβ¦β¦πβ¦ = π"
by (cs_concl cs_simp: cat_parallel_cs_simps cs_intro: V_cs_intros)+
qed (auto simp: the_cat_parallel_components)
lemma (in cat_parallel) the_cat_parallel_is_arr_ππF[cat_parallel_cs_intros]:
assumes "a' = π" and "b' = π" and "f ββ©β F"
shows "f : a' β¦βββ©C π π Fβ b'"
proof(intro is_arrI, unfold assms(1,2))
from assms(3) show "ββ©C π π Fβ¦Domβ¦β¦fβ¦ = π" "ββ©C π π Fβ¦Codβ¦β¦fβ¦ = π"
by (cs_concl cs_simp: cat_parallel_cs_simps cs_intro: V_cs_intros)+
qed (auto simp: the_cat_parallel_components assms(3))
lemma (in cat_parallel) the_cat_parallel_is_arrE:
assumes "f' : a' β¦βββ©C π π Fβ b'"
obtains "a' = π" and "b' = π" and "f' = π"
| "a' = π" and "b' = π" and "f' = π"
| "a' = π" and "b' = π" and "f' ββ©β F"
proof-
note f = is_arrD[OF assms]
from f(1) consider (π) βΉf' = πβΊ | (π) βΉf' = πβΊ | (F) βΉf' ββ©β FβΊ
unfolding the_cat_parallel_components(2) by auto
then show ?thesis
proof cases
case π
moreover from f(2)[unfolded π, symmetric] have "a' = π"
by
(
cs_prems cs_shallow
cs_simp: cat_parallel_cs_simps cs_intro: V_cs_intros
)
moreover from f(3)[unfolded π, symmetric] have "b' = π"
by
(
cs_prems cs_shallow
cs_simp: cat_parallel_cs_simps cs_intro: V_cs_intros
)
ultimately show ?thesis using that by auto
next
case π
moreover from f(2)[unfolded π, symmetric] have "a' = π"
by
(
cs_prems cs_shallow
cs_simp: cat_parallel_cs_simps cs_intro: V_cs_intros
)
moreover from f(3)[unfolded π, symmetric] have "b' = π"
by
(
cs_prems cs_shallow
cs_simp: cat_parallel_cs_simps cs_intro: V_cs_intros
)
ultimately show ?thesis using that by auto
next
case F
moreover from f(2)[symmetric] F have "a' = π"
by
(
cs_prems cs_shallow
cs_simp: cat_parallel_cs_simps cs_intro: V_cs_intros
)
moreover from f(3)[symmetric] F have "b' = π"
by (cs_prems cs_shallow cs_simp: cat_parallel_cs_simps)
ultimately show ?thesis using that by auto
qed
qed
subsubsectionβΉβΉββΊ is a categoryβΊ
lemma (in cat_parallel) tiny_category_the_cat_parallel[cat_parallel_cs_intros]:
"tiny_category Ξ± (ββ©C π π F)"
proof(intro tiny_categoryI'')
show "vfsequence (ββ©C π π F)" unfolding the_cat_parallel_def by simp
show "vcard (ββ©C π π F) = 6β©β"
unfolding the_cat_parallel_def by (simp_all add: nat_omega_simps)
show "ββ©β (ββ©C π π Fβ¦Domβ¦) ββ©β ββ©C π π Fβ¦Objβ¦"
by (auto simp: the_cat_parallel_components)
show "ββ©β (ββ©C π π Fβ¦Codβ¦) ββ©β ββ©C π π Fβ¦Objβ¦"
by (auto simp: the_cat_parallel_components)
show "(gf ββ©β πβ©β (ββ©C π π Fβ¦Compβ¦)) =
(βg f b c a. gf = [g, f]β©β β§ g : b β¦βββ©C π π Fβ c β§ f : a β¦βββ©C π π Fβ b)"
for gf
unfolding the_cat_parallel_Comp_vdomain
proof
assume prems: "gf ββ©β cat_parallel_composable π π F"
then obtain g f where gf_def: "gf = [g, f]β©β"
unfolding cat_parallel_composable_def by auto
from prems show
"βg f b c a. gf = [g, f]β©β β§ g : b β¦βββ©C π π Fβ c β§ f : a β¦βββ©C π π Fβ b"
unfolding gf_def
by
(
cases rule: cat_parallel_composableE;
(intro exI conjI)?;
cs_concl_step?;
(simp only:)?,
allβΉintro is_arrI, unfold the_cat_parallel_components(2)βΊ
)
(
cs_concl
cs_simp: cat_parallel_cs_simps V_cs_simps cs_intro: V_cs_intros
)+
next
assume
"βg f b' c' a'.
gf = [g, f]β©β β§ g : b' β¦βββ©C π π Fβ c' β§ f : a' β¦βββ©C π π Fβ b'"
then obtain g f b c a
where gf_def: "gf = [g, f]β©β"
and g: "g : b β¦βββ©C π π Fβ c"
and f: "f : a β¦βββ©C π π Fβ b"
by clarsimp
from g f show "gf ββ©β cat_parallel_composable π π F"
unfolding gf_def
by (elim the_cat_parallel_is_arrE) (auto simp: cat_parallel_cs_intros)
qed
show "πβ©β (ββ©C π π Fβ¦CIdβ¦) = ββ©C π π Fβ¦Objβ¦"
by (simp add: cat_parallel_cs_simps the_cat_parallel_components)
show "g ββ©Aβββ©C π π Fβ f : a β¦βββ©C π π Fβ c"
if "g : b β¦βββ©C π π Fβ c" and "f : a β¦βββ©C π π Fβ b" for b c g a f
using that
by (elim the_cat_parallel_is_arrE; simp only:)
(
allβΉ
solvesβΉsimp add: cat_parallel_ππ[symmetric]βΊ |
cs_concl cs_simp: cat_parallel_cs_simps
βΊ
)
show
"h ββ©Aβββ©C π π Fβ g ββ©Aβββ©C π π Fβ f =
h ββ©Aβββ©C π π Fβ (g ββ©Aβββ©C π π Fβ f)"
if "h : c β¦βββ©C π π Fβ d"
and "g : b β¦βββ©C π π Fβ c"
and "f : a β¦βββ©C π π Fβ b"
for c d h b g a f
using that
by (elim the_cat_parallel_is_arrE; simp only:)
(
allβΉ
solvesβΉsimp only: cat_parallel_ineq cat_parallel_ππ[symmetric]βΊ |
cs_concl
cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros
βΊ
)
show "ββ©C π π Fβ¦CIdβ¦β¦aβ¦ : a β¦βββ©C π π Fβ a" if "a ββ©β ββ©C π π Fβ¦Objβ¦"
for a
proof-
from that consider βΉa = πβΊ | βΉa = πβΊ
unfolding the_cat_parallel_components(1) by auto
then show "ββ©C π π Fβ¦CIdβ¦β¦aβ¦ : a β¦βββ©C π π Fβ a"
by cases
(
cs_concl
cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros
)+
qed
show "ββ©C π π Fβ¦CIdβ¦β¦bβ¦ ββ©Aβββ©C π π Fβ f = f"
if "f : a β¦βββ©C π π Fβ b" for a b f
using that
by (elim the_cat_parallel_is_arrE)
(cs_concl cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros)
show "f ββ©Aβββ©C π π Fβ ββ©C π π Fβ¦CIdβ¦β¦bβ¦ = f"
if "f : b β¦βββ©C π π Fβ c" for b c f
using that
by (elim the_cat_parallel_is_arrE)
(cs_concl cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros)
show "ββ©C π π Fβ¦Objβ¦ ββ©β Vset Ξ±"
by
(
cs_concl cs_shallow
cs_simp: the_cat_parallel_components nat_omega_simps
cs_intro: V_cs_intros cat_parallel_cs_intros
)
qed
(
cs_concl
cs_simp:
nat_omega_simps cat_parallel_cs_simps the_cat_parallel_components(2)
cs_intro:
cat_cs_intros
cat_parallel_cs_intros
V_cs_intros
Limit_succ_in_VsetI
)+
lemmas [cat_parallel_cs_intros] = cat_parallel.tiny_category_the_cat_parallel
subsubsectionβΉOpposite parallel categoryβΊ
lemma (in cat_parallel) op_cat_the_cat_parallel[cat_op_simps]:
"op_cat (ββ©C π π F) = ββ©C π π F"
proof(rule cat_eqI)
interpret par: cat_parallel Ξ± π π F by (rule cat_parallel_op)
show ππ: "category Ξ± (ββ©C π π F)"
by (cs_concl cs_shallow cs_intro: cat_small_cs_intros cat_parallel_cs_intros)
show ππ: "category Ξ± (op_cat (ββ©C π π F))"
by
(
cs_concl cs_shallow
cs_intro: cat_small_cs_intros cat_op_intros cat_parallel_cs_intros
)
interpret ππ: category Ξ± βΉββ©C π π FβΊ by (rule ππ)
interpret ππ: category Ξ± βΉββ©C π π FβΊ
by (cs_concl cs_shallow cs_intro: cat_small_cs_intros cat_parallel_cs_intros)
show "op_cat (ββ©C π π F)β¦Compβ¦ = ββ©C π π Fβ¦Compβ¦"
proof(rule vsv_eqI)
show "vsv (op_cat (ββ©C π π F)β¦Compβ¦)"
unfolding op_cat_components by (rule fflip_vsv)
show "vsv (ββ©C π π Fβ¦Compβ¦)"
by (cs_concl cs_shallow cs_intro: cat_parallel_cs_intros)
show [cat_op_simps]: "πβ©β (op_cat (ββ©C π π F)β¦Compβ¦) = πβ©β (ββ©C π π Fβ¦Compβ¦)"
by
(
cs_concl cs_shallow
cs_simp:
cat_parallel_composable_fconverse
op_cat_components(5)
vdomain_fflip
cat_parallel_cs_simps
cs_intro: cat_cs_intros
)
fix gf assume "gf ββ©β πβ©β (op_cat (ββ©C π π F)β¦Compβ¦)"
then have "gf ββ©β πβ©β (ββ©C π π Fβ¦Compβ¦)" unfolding cat_op_simps by simp
then obtain g f a b c
where gf_def: "gf = [g, f]β©β"
and g: "g : b β¦βββ©C π π Fβ c"
and f: "f : a β¦βββ©C π π Fβ b"
by auto
from g f show "op_cat (ββ©C π π F)β¦Compβ¦β¦gfβ¦ = ββ©C π π Fβ¦Compβ¦β¦gfβ¦"
unfolding gf_def
by (elim par.the_cat_parallel_is_arrE)
(
simp add: cat_parallel_cs_intros |
cs_concl
cs_simp: cat_op_simps cat_parallel_cs_simps
cs_intro: cat_cs_intros cat_parallel_cs_intros
)+
qed
show "op_cat (ββ©C π π F)β¦CIdβ¦ = ββ©C π π Fβ¦CIdβ¦"
proof(unfold cat_op_simps, rule vsv_eqI, unfold cat_parallel_cs_simps)
fix a assume "a ββ©β set {π, π}"
then consider βΉa = πβΊ | βΉa = πβΊ by auto
then show "ββ©C π π Fβ¦CIdβ¦β¦aβ¦ = ββ©C π π Fβ¦CIdβ¦β¦aβ¦"
by cases (cs_concl cs_simp: cat_parallel_cs_simps)+
qed auto
qed (auto simp: the_cat_parallel_components op_cat_components)
lemmas [cat_op_simps] = cat_parallel.op_cat_the_cat_parallel
subsectionβΉParallel functorβΊ
subsubsectionβΉBackgroundβΊ
textβΉ
See Chapter III-3 and Chapter III-4 in \<^cite>βΉ"mac_lane_categories_2010"βΊ).
βΊ
subsubsectionβΉLocal assumptions for the parallel functorβΊ
locale cf_parallel = cat_parallel Ξ± π π F + category Ξ± β + F': vsv F'
for Ξ± π π F π' π' F' β :: V +
assumes cf_parallel_F'_vdomain[cat_parallel_cs_simps]: "πβ©β F' = F"
and cf_parallel_F'[cat_parallel_cs_intros]: "π£ ββ©β F βΉ F'β¦π£β¦ : π' β¦βββ π'"
and cf_parallel_π'[cat_parallel_cs_intros]: "π' ββ©β ββ¦Objβ¦"
and cf_parallel_π'[cat_parallel_cs_intros]: "π' ββ©β ββ¦Objβ¦"
lemmas (in cf_parallel) [cat_parallel_cs_intros] = F'.vsv_axioms
lemma (in cf_parallel) cf_parallel_F''[cat_parallel_cs_intros]:
assumes "π£ ββ©β F" and "a = π'" and "b = π'"
shows "F'β¦π£β¦ : a β¦βββ b"
using assms(1) unfolding assms(2-3) by (rule cf_parallel_F')
lemma (in cf_parallel) cf_parallel_F'''[cat_parallel_cs_intros]:
assumes "π£ ββ©β F" and "f = F'β¦π£β¦" and "b = π'"
shows "f : π' β¦βββ b"
using assms(1) unfolding assms(2-3) by (rule cf_parallel_F')
lemma (in cf_parallel) cf_parallel_F''''[cat_parallel_cs_intros]:
assumes "π£ ββ©β F" and "f = F'β¦π£β¦" and "a = π'"
shows "f : a β¦βββ π'"
using assms(1) unfolding assms(2,3) by (rule cf_parallel_F')
textβΉRules.βΊ
lemma (in cf_parallel) cf_parallel_axioms'[cat_parallel_cs_intros]:
assumes "Ξ±' = Ξ±"
and "a'' = π"
and "b'' = π"
and "F'' = F"
and "a''' = π'"
and "b''' = π'"
and "F''' = F'"
shows "cf_parallel Ξ±' a'' b'' F'' a''' b''' F''' β"
unfolding assms by (rule cf_parallel_axioms)
mk_ide rf cf_parallel_def[unfolded cf_parallel_axioms_def]
|intro cf_parallelI|
|dest cf_parallelD[dest]|
|elim cf_parallelE[elim]|
lemmas [cat_parallel_cs_intros] = cf_parallelD(1,2)
textβΉDuality.βΊ
lemma (in cf_parallel) cf_parallel_op[cat_op_intros]:
"cf_parallel Ξ± π π F π' π' F' (op_cat β)"
by (intro cf_parallelI, unfold cat_op_simps insert_commute)
(
cs_concl
cs_simp: cat_parallel_cs_simps
cs_intro: cat_parallel_cs_intros cat_cs_intros cat_op_intros
)+
lemmas [cat_op_intros] = cf_parallel.cf_parallel_op
subsubsectionβΉDefinition and elementary propertiesβΊ
definition the_cf_parallel :: "V β V β V β V β V β V β V β V"
(βΉββββ©Cβ©FβΊ)
where "ββββ©Cβ©F β π π F π' π' F' =
[
(Ξ»aββ©βββ©C π π Fβ¦Objβ¦. (a = π ? π' : π')),
(
Ξ»fββ©βββ©C π π Fβ¦Arrβ¦.
(
if f = π β ββ¦CIdβ¦β¦π'β¦
| f = π β ββ¦CIdβ¦β¦π'β¦
| otherwise β F'β¦fβ¦
)
),
ββ©C π π F,
β
]β©β"
textβΉComponents.βΊ
lemma the_cf_parallel_components:
shows "ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦ =
(Ξ»aββ©βββ©C π π Fβ¦Objβ¦. (a = π ? π' : π'))"
and "ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦ =
(
Ξ»fββ©βββ©C π π Fβ¦Arrβ¦.
(
if f = π β ββ¦CIdβ¦β¦π'β¦
| f = π β ββ¦CIdβ¦β¦π'β¦
| otherwise β F'β¦fβ¦
)
)"
and [cat_parallel_cs_simps]: "ββββ©Cβ©F β π π F π' π' F'β¦HomDomβ¦ = ββ©C π π F"
and [cat_parallel_cs_simps]: "ββββ©Cβ©F β π π F π' π' F'β¦HomCodβ¦ = β"
unfolding the_cf_parallel_def dghm_field_simps
by (simp_all add: nat_omega_simps)
subsubsectionβΉObject mapβΊ
mk_VLambda the_cf_parallel_components(1)
|vsv the_cf_parallel_ObjMap_vsv[cat_parallel_cs_intros]|
|vdomain the_cf_parallel_ObjMap_vdomain[cat_parallel_cs_simps]|
|app the_cf_parallel_ObjMap_app|
lemma (in cf_parallel) the_cf_parallel_ObjMap_app_π[cat_parallel_cs_simps]:
assumes "x = π"
shows "ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦β¦xβ¦ = π'"
by
(
cs_concl
cs_simp:
assms the_cf_parallel_ObjMap_app cat_parallel_cs_simps V_cs_simps
cs_intro: cat_parallel_cs_intros
)
lemmas [cat_parallel_cs_simps] = cf_parallel.the_cf_parallel_ObjMap_app_π
lemma (in cf_parallel) the_cf_parallel_ObjMap_app_π[cat_parallel_cs_simps]:
assumes "x = π"
shows "ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦β¦xβ¦ = π'"
using cat_parallel_ineq
by
(
cs_concl
cs_simp:
assms the_cf_parallel_ObjMap_app cat_parallel_cs_simps V_cs_simps
cs_intro: cat_parallel_cs_intros
)
lemmas [cat_parallel_cs_simps] = cf_parallel.the_cf_parallel_ObjMap_app_π
lemma (in cf_parallel) the_cf_parallel_ObjMap_vrange:
"ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦) = set {π', π'}"
proof(intro vsubset_antisym)
show "ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦) ββ©β set {π', π'}"
unfolding the_cf_parallel_components
by (intro vrange_VLambda_vsubset)
(simp_all add: cat_parallel_ππ cf_parallel_π' cf_parallel_π')
show "set {π', π'} ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦)"
proof(rule vsubsetI)
fix x assume prems: "x ββ©β set {π', π'}"
from prems consider βΉx = π'βΊ | βΉx = π'βΊ by auto
moreover have "π' ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦)"
by (rule vsv.vsv_vimageI2'[of _ _ π])
(
cs_concl
cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros
)
moreover have "π' ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦)"
by (rule vsv.vsv_vimageI2'[of _ _ π])
(
cs_concl
cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros
)
ultimately show "x ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦)" by auto
qed
qed
lemma (in cf_parallel) the_cf_parallel_ObjMap_vrange_vsubset_Obj:
"ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦) ββ©β ββ¦Objβ¦"
unfolding the_cf_parallel_components
by (intro vrange_VLambda_vsubset)
(simp_all add: cat_parallel_ππ cf_parallel_π' cf_parallel_π')
subsubsectionβΉArrow mapβΊ
mk_VLambda the_cf_parallel_components(2)
|vsv the_cf_parallel_ArrMap_vsv[cat_parallel_cs_intros]|
|vdomain the_cf_parallel_ArrMap_vdomain[cat_parallel_cs_simps]|
|app the_cf_parallel_ArrMap_app|
lemma (in cf_parallel) the_cf_parallel_ArrMap_app_F[cat_parallel_cs_simps]:
assumes "f ββ©β F"
shows "ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦fβ¦ = F'β¦fβ¦"
proof-
from assms have "f ββ©β ββ©C π π Fβ¦Arrβ¦"
by (cs_concl cs_shallow cs_intro: cat_parallel_cs_intros a_in_succ_xI)
from assms this show ?thesis
using cat_parallel_ineq
by (auto simp: the_cf_parallel_ArrMap_app cat_parallel_cs_simps)
qed
lemmas [cat_parallel_cs_simps] = cf_parallel.the_cf_parallel_ArrMap_app_F
lemma (in cf_parallel) the_cf_parallel_ArrMap_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦fβ¦ = ββ¦CIdβ¦β¦π'β¦"
proof-
from assms have "f ββ©β ββ©C π π Fβ¦Arrβ¦"
by (cs_concl cs_intro: cat_parallel_cs_intros a_in_succ_xI)
from this show ?thesis
using cat_parallel_ineq
by (elim the_cat_parallel_ArrE; simp only: assms)
(auto simp: the_cf_parallel_ArrMap_app)
qed
lemmas [cat_parallel_cs_simps] = cf_parallel.the_cf_parallel_ArrMap_app_π
lemma (in cf_parallel) the_cf_parallel_ArrMap_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦fβ¦ = ββ¦CIdβ¦β¦π'β¦"
proof-
from assms have "f ββ©β ββ©C π π Fβ¦Arrβ¦"
by (cs_concl cs_intro: cat_parallel_cs_intros a_in_succ_xI)
from this show ?thesis
using cat_parallel_ineq
by (elim the_cat_parallel_ArrE; simp only: assms)
(auto simp: the_cf_parallel_ArrMap_app)
qed
lemmas [cat_parallel_cs_simps] = cf_parallel.the_cf_parallel_ArrMap_app_π
lemma (in cf_parallel) the_cf_parallel_ArrMap_vrange:
"ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦) = (F' `β©β F) βͺβ©β set {ββ¦CIdβ¦β¦π'β¦, ββ¦CIdβ¦β¦π'β¦}"
(is βΉββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦) = ?FF βͺβ©β ?CIDβΊ)
proof(intro vsubset_antisym)
show "ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦) ββ©β ?FF βͺβ©β ?CID"
proof
(
intro vsv.vsv_vrange_vsubset the_cf_parallel_ArrMap_vsv,
unfold the_cf_parallel_ArrMap_vdomain
)
fix f assume prems: "f ββ©β ββ©C π π Fβ¦Arrβ¦"
from prems show "ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦fβ¦ ββ©β ?FF βͺβ©β ?CID"
by (elim the_cat_parallel_ArrE; (simp only:)?)
(
cs_concl
cs_simp: vinsert_set_insert_eq cat_parallel_cs_simps
cs_intro: vsv.vsv_vimageI1 V_cs_intros
)
qed
show "?FF βͺβ©β ?CID ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
proof(rule vsubsetI)
fix f assume prems: "f ββ©β F' `β©β F βͺβ©β set {ββ¦CIdβ¦β¦π'β¦, ββ¦CIdβ¦β¦π'β¦}"
then consider βΉf ββ©β F' `β©β FβΊ | βΉf = ββ¦CIdβ¦β¦π'β¦βΊ | βΉf = ββ¦CIdβ¦β¦π'β¦βΊ by auto
then show "f ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
proof cases
assume "f ββ©β F' `β©β F"
then obtain π£ where π£: "π£ ββ©β F" and f_def: "f = F'β¦π£β¦" by auto
from π£ have f_def': "f = ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦π£β¦"
unfolding f_def by (cs_concl cs_simp: cat_parallel_cs_simps)
from π£ have "π£ ββ©β πβ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
by
(
cs_concl cs_shallow
cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros
)
then show "f ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
unfolding f_def'
by (auto simp: cat_parallel_cs_intros intro: vsv.vsv_vimageI2)
next
assume prems: "f = ββ¦CIdβ¦β¦π'β¦"
have f_def': "f = ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦πβ¦"
by (cs_concl cs_simp: cat_parallel_cs_simps prems)
have "π ββ©β πβ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
by
(
cs_concl
cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros
)
then show "f ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
unfolding f_def'
by (auto simp: cat_parallel_cs_intros intro: vsv.vsv_vimageI2)
next
assume prems: "f = ββ¦CIdβ¦β¦π'β¦"
have f_def': "f = ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦πβ¦"
by (cs_concl cs_shallow cs_simp: V_cs_simps cat_parallel_cs_simps prems)
have "π ββ©β πβ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
by
(
cs_concl
cs_simp: cat_parallel_cs_simps cs_intro: cat_parallel_cs_intros
)
then show "f ββ©β ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
unfolding f_def'
by (auto simp: cat_parallel_cs_intros intro: vsv.vsv_vimageI2)
qed
qed
qed
lemma (in cf_parallel) the_cf_parallel_ArrMap_vrange_vsubset_Arr:
"ββ©β (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦) ββ©β ββ¦Arrβ¦"
proof(intro vsv.vsv_vrange_vsubset, unfold cat_parallel_cs_simps)
show "vsv (ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦)"
by (cs_intro_step cat_parallel_cs_intros)
fix f assume "f ββ©β ββ©C π π Fβ¦Arrβ¦"
then show "ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦fβ¦ ββ©β ββ¦Arrβ¦"
by (elim the_cat_parallel_ArrE)
(
cs_concl
cs_simp: cat_parallel_cs_simps
cs_intro: cat_cs_intros cat_parallel_cs_intros
)+
qed
subsubsectionβΉParallel functor is a functorβΊ
lemma (in cf_parallel) cf_parallel_the_cf_parallel_is_tm_functor:
"ββββ©Cβ©F β π π F π' π' F' : ββ©C π π F β¦β¦β©Cβ©.β©tβ©mβΞ±β β"
proof(intro is_tm_functorI' is_functorI')
interpret tcp: tiny_category Ξ± βΉββ©C π π FβΊ
by (rule tiny_category_the_cat_parallel)
show "vfsequence (ββββ©Cβ©F β π π F π' π' F')"
unfolding the_cf_parallel_def by auto
show "vcard (ββββ©Cβ©F β π π F π' π' F') = 4β©β"
unfolding the_cf_parallel_def by (simp add: nat_omega_simps)
show "ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦fβ¦ :
ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦β¦aβ¦ β¦βββ
ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦β¦bβ¦"
if "f : a β¦βββ©C π π Fβ b" for a b f
using that
by (cases rule: the_cat_parallel_is_arrE; simp only:)
(
cs_concl
cs_simp: cat_parallel_cs_simps
cs_intro: cat_cs_intros cat_parallel_cs_intros
)+
show
"ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦g ββ©Aβββ©C π π Fβ fβ¦ =
ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦gβ¦ ββ©Aβββ
ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦fβ¦"
if "g : b β¦βββ©C π π Fβ c" and "f : a β¦βββ©C π π Fβ b" for b c g a f
using that
by (elim the_cat_parallel_is_arrE)
(
allβΉsimp only:βΊ,
allβΉ
solvesβΉsimp add: cat_parallel_ineq cat_parallel_ππ[symmetric]βΊ |
cs_concl
cs_simp: cat_cs_simps cat_parallel_cs_simps
cs_intro: cat_cs_intros cat_parallel_cs_intros
βΊ
)
show
"ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦ββ©C π π Fβ¦CIdβ¦β¦cβ¦β¦ =
ββ¦CIdβ¦β¦ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦β¦cβ¦β¦"
if "c ββ©β ββ©C π π Fβ¦Objβ¦" for c
using that
by (elim the_cat_parallel_ObjE; simp only:)
(cs_concl cs_simp: cat_parallel_cs_simps)+
show "ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦ ββ©β Vset Ξ±"
proof
(
rule vbrelation.vbrelation_Limit_in_VsetI,
unfold
the_cf_parallel_ObjMap_vdomain
the_cf_parallel_ObjMap_vrange
the_cat_parallel_components(1);
(intro Limit_vdoubleton_in_VsetI)?
)
show "π ββ©β Vset Ξ±" "π ββ©β Vset Ξ±" "π' ββ©β Vset Ξ±" "π' ββ©β Vset Ξ±"
by (cs_concl cs_intro: cat_cs_intros cat_parallel_cs_intros)+
qed (use the_cf_parallel_ObjMap_vsv in blast)+
show "ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦ ββ©β Vset Ξ±"
proof
(
rule vbrelation.vbrelation_Limit_in_VsetI,
unfold
the_cf_parallel_ArrMap_vdomain
the_cf_parallel_ArrMap_vrange
the_cat_parallel_components(1);
(intro tcp.tiny_cat_Arr_in_Vset vunion_in_VsetI Limit_vdoubleton_in_VsetI)?
)
show "ββ¦CIdβ¦β¦π'β¦ ββ©β Vset Ξ±" "ββ¦CIdβ¦β¦π'β¦ ββ©β Vset Ξ±"
by (cs_concl cs_intro: cat_cs_intros cat_parallel_cs_intros)+
from cf_parallel_F' have "F' `β©β F ββ©β Hom β π' π'"
by (simp add: F'.vsv_vimage_vsubsetI)
moreover have "Hom β π' π' ββ©β Vset Ξ±"
by (auto simp: cat_Hom_in_Vset cf_parallel_π' cf_parallel_π')
ultimately show "F' `β©β F ββ©β Vset Ξ±" by auto
qed (use the_cf_parallel_ArrMap_vsv in blast)+
qed
(
cs_concl
cs_simp: cat_parallel_cs_simps
cs_intro:
the_cf_parallel_ObjMap_vrange_vsubset_Obj
cat_parallel_cs_intros cat_cs_intros cat_small_cs_intros
)+
lemma (in cf_parallel) cf_parallel_the_cf_parallel_is_tm_functor':
assumes "π' = ββ©C π π F" and "β' = β"
shows "ββββ©Cβ©F β π π F π' π' F' : π' β¦β¦β©Cβ©.β©tβ©mβΞ±β β'"
unfolding assms by (rule cf_parallel_the_cf_parallel_is_tm_functor)
lemmas [cat_parallel_cs_intros] =
cf_parallel.cf_parallel_the_cf_parallel_is_tm_functor'
subsubsectionβΉOpposite parallel functorβΊ
lemma (in cf_parallel) cf_parallel_the_cf_parallel_op[cat_op_simps]:
"op_cf (ββββ©Cβ©F β π π F π' π' F') = ββββ©Cβ©F (op_cat β) π π F π' π' F'"
proof-
interpret β: is_tm_functor Ξ± βΉββ©C π π FβΊ β βΉββββ©Cβ©F β π π F π' π' F'βΊ
by (rule cf_parallel_the_cf_parallel_is_tm_functor)
show ?thesis
proof
(
rule cf_eqI[of Ξ± βΉββ©C π π FβΊ βΉop_cat ββΊ _ βΉββ©C π π FβΊ βΉop_cat ββΊ],
unfold cat_op_simps
)
show "op_cf (ββββ©Cβ©F β π π F π' π' F') : ββ©C π π F β¦β¦β©CβΞ±β op_cat β"
by (cs_concl cs_shallow cs_simp: cat_op_simps cs_intro: cat_op_intros)
show "ββββ©Cβ©F (op_cat β) π π F π' π' F' : ββ©C π π F β¦β¦β©CβΞ±β op_cat β"
by
(
cs_concl
cs_intro: cat_op_intros cat_small_cs_intros cat_parallel_cs_intros
)
show
"ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦ =
ββββ©Cβ©F (op_cat β) π π F π' π' F'β¦ObjMapβ¦"
proof
(
rule vsv_eqI;
(intro cat_parallel_cs_intros)?;
unfold cat_parallel_cs_simps
)
fix a assume "a ββ©β ββ©C π π Fβ¦Objβ¦"
then consider βΉa = πβΊ | βΉa = πβΊ by (elim the_cat_parallel_ObjE) simp
then show
"ββββ©Cβ©F β π π F π' π' F'β¦ObjMapβ¦β¦aβ¦ =
ββββ©Cβ©F (op_cat β) π π F π' π' F'β¦ObjMapβ¦β¦aβ¦"
by cases
(
cs_concl
cs_simp: cat_parallel_cs_simps
cs_intro: cat_parallel_cs_intros cat_op_intros
)
qed (auto simp: the_cat_parallel_components)
show
"ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦ =
ββββ©Cβ©F (op_cat β) π π F π' π' F'β¦ArrMapβ¦"
proof
(
rule vsv_eqI;
(intro cat_parallel_cs_intros)?;
unfold cat_parallel_cs_simps
)
fix f assume "f ββ©β ββ©C π π Fβ¦Arrβ¦"
then consider βΉf = πβΊ | βΉf = πβΊ | βΉf ββ©β FβΊ
by (elim the_cat_parallel_ArrE) simp
then show
"ββββ©Cβ©F β π π F π' π' F'β¦ArrMapβ¦β¦fβ¦ =
ββββ©Cβ©F (op_cat β) π π F π' π' F'β¦ArrMapβ¦β¦fβ¦"
by cases
(
cs_concl
cs_simp: cat_parallel_cs_simps cat_op_simps
cs_intro: cat_parallel_cs_intros cat_op_intros
)+
qed (auto simp: the_cat_parallel_components)
qed simp_all
qed
lemmas [cat_op_simps] = cf_parallel.cf_parallel_the_cf_parallel_op
subsectionβΉ
Background for the definition of a category with two parallel arrows
between two objects
βΊ
textβΉ
The case of two parallel arrows between two objects is treated explicitly
because it is prevalent in applications.
βΊ
definition π€β©Pβ©L :: V where "π€β©Pβ©L = 0"
definition π£β©Pβ©L :: V where "π£β©Pβ©L = 1β©β"
definition πβ©Pβ©Lβ©2 :: V where "πβ©Pβ©Lβ©2 = πβ©Pβ©L (set {π€β©Pβ©L, π£β©Pβ©L})"
definition πβ©Pβ©Lβ©2 :: V where "πβ©Pβ©Lβ©2 = πβ©Pβ©L (set {π€β©Pβ©L, π£β©Pβ©L})"
lemma cat_PL2_ineq:
shows cat_PL2_ππ[cat_parallel_cs_intros]: "πβ©Pβ©Lβ©2 β πβ©Pβ©Lβ©2"
and cat_PL2_ππ€[cat_parallel_cs_intros]: "πβ©Pβ©Lβ©2 β π€β©Pβ©L"
and cat_PL2_ππ£[cat_parallel_cs_intros]: "πβ©Pβ©Lβ©2 β π£β©Pβ©L"
and cat_PL2_ππ€[cat_parallel_cs_intros]: "πβ©Pβ©Lβ©2 β π€β©Pβ©L"
and cat_PL2_ππ£[cat_parallel_cs_intros]: "πβ©Pβ©Lβ©2 β π£β©Pβ©L"
and cat_PL2_π€π£[cat_parallel_cs_intros]: "π€β©Pβ©L β π£β©Pβ©L"
unfolding πβ©Pβ©Lβ©2_def πβ©Pβ©Lβ©2_def π€β©Pβ©L_def π£β©Pβ©L_def πβ©Pβ©L_def πβ©Pβ©L_def
by (simp_all add: Set.doubleton_eq_iff one)
lemma (in π΅)
shows cat_PL2_π[cat_parallel_cs_intros]: "πβ©Pβ©Lβ©2 ββ©β Vset Ξ±"
and cat_PL2_π[cat_parallel_cs_intros]: "πβ©Pβ©Lβ©2 ββ©β Vset Ξ±"
and cat_PL2_π€[cat_parallel_cs_intros]: "π€β©Pβ©L ββ©β Vset Ξ±"
and cat_PL2_π£[cat_parallel_cs_intros]: "π£β©Pβ©L ββ©β Vset Ξ±"
unfolding πβ©Pβ©L_def πβ©Pβ©L_def πβ©Pβ©Lβ©2_def πβ©Pβ©Lβ©2_def π€β©Pβ©L_def π£β©Pβ©L_def
by (simp_all add: Limit_vdoubleton_in_VsetI)
subsectionβΉ
Local assumptions for a category with two parallel arrows between two objects
βΊ
locale cat_parallel_2 = π΅ Ξ± for Ξ± +
fixes π π π€ π£
assumes cat_parallel_2_ππ[cat_parallel_cs_intros]: "π β π"
and cat_parallel_2_ππ€[cat_parallel_cs_intros]: "π β π€"
and cat_parallel_2_ππ£[cat_parallel_cs_intros]: "π β π£"
and cat_parallel_2_ππ€[cat_parallel_cs_intros]: "π β π€"
and cat_parallel_2_ππ£[cat_parallel_cs_intros]: "π β π£"
and cat_parallel_2_π€π£[cat_parallel_cs_intros]: "π€ β π£"
and cat_parallel_2_π_in_Vset[cat_parallel_cs_intros]: "π ββ©β Vset Ξ±"
and cat_parallel_2_π_in_Vset[cat_parallel_cs_intros]: "π ββ©β Vset Ξ±"
and cat_parallel_2_π€_in_Vset[cat_parallel_cs_intros]: "π€ ββ©β Vset Ξ±"
and cat_parallel_2_π£_in_Vset[cat_parallel_cs_intros]: "π£ ββ©β Vset Ξ±"
lemmas (in cat_parallel_2) cat_parallel_ineq =
cat_parallel_2_ππ
cat_parallel_2_ππ€
cat_parallel_2_ππ£
cat_parallel_2_ππ€
cat_parallel_2_ππ£
cat_parallel_2_π€π£
textβΉRules.βΊ
lemmas (in cat_parallel_2) [cat_parallel_cs_intros] = cat_parallel_2_axioms
mk_ide rf cat_parallel_2_def[unfolded cat_parallel_2_axioms_def]
|intro cat_parallel_2I|
|dest cat_parallel_2D[dest]|
|elim cat_parallel_2E[elim]|
sublocale cat_parallel_2 β cat_parallel Ξ± π π βΉset {π€, π£}βΊ
by unfold_locales
(simp_all add: cat_parallel_cs_intros Limit_vdoubleton_in_VsetI)
textβΉDuality.βΊ
lemma (in cat_parallel_2) cat_parallel_op[cat_op_intros]:
"cat_parallel_2 Ξ± π π π£ π€"
by (intro cat_parallel_2I)
(auto intro!: cat_parallel_cs_intros cat_parallel_ineq[symmetric])
subsectionβΉβΉβββΊ: category with two parallel arrows between two objectsβΊ
subsubsectionβΉDefinition and elementary propertiesβΊ
textβΉSee Chapter I-2 and Chapter III-3 in \<^cite>βΉ"mac_lane_categories_2010"βΊ.βΊ
definition the_cat_parallel_2 :: "V β V β V β V β V" (βΉβββ©CβΊ)
where "βββ©C π π π€ π£ = ββ©C π π (set {π€, π£})"
textβΉComponents.βΊ
lemma the_cat_parallel_2_components:
shows "βββ©C π π π€ π£β¦Objβ¦ = set {π, π}"
and "βββ©C π π π€ π£β¦Arrβ¦ = set {π, π, π€, π£}"
unfolding the_cat_parallel_2_def the_cat_parallel_components by auto
textβΉElementary properties.βΊ
lemma the_cat_parallel_2_commute: "βββ©C π π π€ π£ = βββ©C π π π£ π€"
unfolding the_cat_parallel_2_def by (simp add: insert_commute)
lemma cat_parallel_is_cat_parallel_2:
assumes "cat_parallel Ξ± π π (set {π€, π£})" and "π€ β π£"
shows "cat_parallel_2 Ξ± π π π€ π£"
proof-
interpret cat_parallel Ξ± π π βΉset {π€, π£}βΊ by (rule assms(1))
show ?thesis
using cat_parallel_πF cat_parallel_πF cat_parallel_F_in_Vset assms
by (intro cat_parallel_2I)
(
auto
dest: vdoubleton_in_VsetD
simp: cat_parallel_π_in_Vset cat_parallel_π_in_Vset
)
qed
subsubsectionβΉObjectsβΊ
lemma the_cat_parallel_2_Obj_πI[cat_parallel_cs_intros]:
assumes "a = π"
shows "a ββ©β βββ©C π π π€ π£β¦Objβ¦"
unfolding the_cat_parallel_2_def
by (cs_concl cs_simp: assms cs_intro: cat_parallel_cs_intros)
lemma the_cat_parallel_2_Obj_πI[cat_parallel_cs_intros]:
assumes "a = π"
shows "a ββ©β βββ©C π π π€ π£β¦Objβ¦"
unfolding the_cat_parallel_2_def
by (cs_concl cs_shallow cs_simp: assms cs_intro: cat_parallel_cs_intros)
lemma the_cat_parallel_2_ObjE:
assumes "a ββ©β βββ©C π π π€ π£β¦Objβ¦"
obtains "a = π" | "a = π"
using assms unfolding the_cat_parallel_2_def by (elim the_cat_parallel_ObjE)
subsubsectionβΉArrowsβΊ
lemma the_cat_parallel_2_Arr_πI[cat_parallel_cs_intros]:
assumes "f = π"
shows "f ββ©β βββ©C π π π€ π£β¦Arrβ¦"
using assms unfolding the_cat_parallel_2_def by (intro the_cat_parallel_Arr_πI)
lemma the_cat_parallel_2_Arr_πI[cat_parallel_cs_intros]:
assumes "f = π"
shows "f ββ©β βββ©C π π π€ π£β¦Arrβ¦"
using assms unfolding the_cat_parallel_2_def by (intro the_cat_parallel_Arr_πI)
lemma the_cat_parallel_2_Arr_π€I[cat_parallel_cs_intros]:
assumes "f = π€"
shows "f ββ©β βββ©C π π π€ π£β¦Arrβ¦"
unfolding assms(1) the_cat_parallel_2_def
by (cs_concl cs_simp: V_cs_simps cs_intro: V_cs_intros cat_parallel_cs_intros)
lemma the_cat_parallel_2_Arr_π£I[cat_parallel_cs_intros]:
assumes "f = π£"
shows "f ββ©β βββ©C π π π€ π£β¦Arrβ¦"
unfolding assms(1) the_cat_parallel_2_def
by
(
cs_concl cs_shallow
cs_simp: V_cs_simps cs_intro: V_cs_intros cat_parallel_cs_intros
)
lemma the_cat_parallel_2_ArrE:
assumes "f ββ©β βββ©C π π π€ π£β¦Arrβ¦"
obtains "f = π" | "f = π" | "f = π€" | "f = π£"
using assms that
unfolding the_cat_parallel_2_def
by (auto elim!: the_cat_parallel_ArrE)
subsubsectionβΉDomainβΊ
lemma the_cat_parallel_2_Dom_vsv[cat_parallel_cs_intros]: "vsv (βββ©C π π π€ π£β¦Domβ¦)"
unfolding the_cat_parallel_2_def by (rule the_cat_parallel_Dom_vsv)
lemma the_cat_parallel_2_Dom_vdomain[cat_parallel_cs_simps]:
"πβ©β (βββ©C π π π€ π£β¦Domβ¦) = set {π, π, π€, π£}"
unfolding the_cat_parallel_2_def the_cat_parallel_Dom_vdomain by auto
lemma (in cat_parallel_2) the_cat_parallel_2_Dom_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "βββ©C π π π€ π£β¦Domβ¦β¦fβ¦ = π"
using assms
unfolding the_cat_parallel_2_def
by (simp add: the_cat_parallel_Dom_app_π)
lemmas [cat_parallel_cs_simps] = cat_parallel_2.the_cat_parallel_2_Dom_app_π
lemma (in cat_parallel_2) the_cat_parallel_2_Dom_app_π€[cat_parallel_cs_simps]:
assumes "f = π€"
shows "βββ©C π π π€ π£β¦Domβ¦β¦fβ¦ = π"
using assms
unfolding the_cat_parallel_2_def
by (intro the_cat_parallel_Dom_app_F) simp
lemmas [cat_parallel_cs_simps] = cat_parallel_2.the_cat_parallel_2_Dom_app_π€
lemma (in cat_parallel_2) the_cat_parallel_2_Dom_app_π£[cat_parallel_cs_simps]:
assumes "f = π£"
shows "βββ©C π π π€ π£β¦Domβ¦β¦fβ¦ = π"
using assms
unfolding the_cat_parallel_2_def
by (intro the_cat_parallel_Dom_app_F) simp
lemmas [cat_parallel_cs_simps] = cat_parallel_2.the_cat_parallel_2_Dom_app_π£
lemma (in cat_parallel_2) the_cat_parallel_2_Dom_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "βββ©C π π π€ π£β¦Domβ¦β¦fβ¦ = π"
using assms
unfolding the_cat_parallel_2_def
by (simp add: the_cat_parallel_Dom_app_π)
lemmas [cat_parallel_cs_simps] = cat_parallel_2.the_cat_parallel_2_Dom_app_π
subsubsectionβΉCodomainβΊ
lemma the_cat_parallel_2_Cod_vsv[cat_parallel_cs_intros]: "vsv (βββ©C π π π€ π£β¦Codβ¦)"
unfolding the_cat_parallel_2_def by (rule the_cat_parallel_Cod_vsv)
lemma the_cat_parallel_2_Cod_vdomain[cat_parallel_cs_simps]:
"πβ©β (βββ©C π π π€ π£β¦Codβ¦) = set {π, π, π€, π£}"
unfolding the_cat_parallel_2_def the_cat_parallel_Cod_vdomain by auto
lemma (in cat_parallel_2) the_cat_parallel_2_Cod_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "βββ©C π π π€ π£β¦Codβ¦β¦fβ¦ = π"
using assms
unfolding the_cat_parallel_2_def
by (simp add: the_cat_parallel_Cod_app_π)
lemmas [cat_parallel_cs_simps] = cat_parallel_2.the_cat_parallel_2_Cod_app_π
lemma (in cat_parallel_2) the_cat_parallel_2_Cod_app_π€[cat_parallel_cs_simps]:
assumes "f = π€"
shows "βββ©C π π π€ π£β¦Codβ¦β¦fβ¦ = π"
using assms
unfolding the_cat_parallel_2_def
by (intro the_cat_parallel_Cod_app_F) simp
lemmas [cat_parallel_cs_simps] = cat_parallel_2.the_cat_parallel_2_Cod_app_π€
lemma (in cat_parallel_2) the_cat_parallel_2_Cod_app_π£[cat_parallel_cs_simps]:
assumes "f = π£"
shows "βββ©C π π π€ π£β¦Codβ¦β¦fβ¦ = π"
using assms
unfolding the_cat_parallel_2_def
by (intro the_cat_parallel_Cod_app_F) simp
lemmas [cat_parallel_cs_simps] = cat_parallel_2.the_cat_parallel_2_Cod_app_π£
lemma (in cat_parallel_2) the_cat_parallel_2_Cod_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "βββ©C π π π€ π£β¦Codβ¦β¦fβ¦ = π"
using assms
unfolding the_cat_parallel_2_def
by (simp add: the_cat_parallel_Cod_app_π)
lemmas [cat_parallel_cs_simps] = cat_parallel_2.the_cat_parallel_2_Cod_app_π
subsubsectionβΉCompositionβΊ
lemma the_cat_parallel_2_Comp_vsv[cat_parallel_cs_intros]:
"vsv (βββ©C π π π€ π£β¦Compβ¦)"
unfolding the_cat_parallel_2_def by (rule the_cat_parallel_Comp_vsv)
lemma the_cat_parallel_2_Comp_app_ππ[cat_parallel_cs_simps]:
assumes "g = π" and "f = π"
shows "g ββ©Aββββ©C π π π€ π£β f = g" "g ββ©Aββββ©C π π π€ π£β f = f"
proof-
note gf = the_cat_parallel_Comp_app_ππ[OF assms, where F=βΉset {π€, π£}βΊ]
show "g ββ©Aββββ©C π π π€ π£β f = g" "g ββ©Aββββ©C π π π€ π£β f = f"
unfolding the_cat_parallel_2_def
subgoal unfolding gf(1) by simp
subgoal unfolding gf(2) by simp
done
qed
lemma the_cat_parallel_2_Comp_app_ππ[cat_parallel_cs_simps]:
assumes "g = π" and "f = π"
shows "g ββ©Aββββ©C π π π€ π£β f = g" "g ββ©Aββββ©C π π π€ π£β f = f"
proof-
note gf = the_cat_parallel_Comp_app_ππ[OF assms, where F=βΉset {π€, π£}βΊ]
show "g ββ©Aββββ©C π π π€ π£β f = g" "g ββ©Aββββ©C π π π€ π£β f = f"
unfolding the_cat_parallel_2_def
subgoal unfolding gf(1) by simp
subgoal unfolding gf(2) by simp
done
qed
lemma the_cat_parallel_2_Comp_app_ππ€[cat_parallel_cs_simps]:
assumes "g = π" and "f = π€"
shows "g ββ©Aββββ©C π π π€ π£β f = f"
unfolding
the_cat_parallel_2_def assms
the_cat_parallel_Comp_app_πF[
where F=βΉset {π€, π£}βΊ, OF assms(1), of π€, unfolded assms, simplified
]
by simp
lemma the_cat_parallel_2_Comp_app_ππ£[cat_parallel_cs_simps]:
assumes "g = π" and "f = π£"
shows "g ββ©Aββββ©C π π π€ π£β f = f"
unfolding
the_cat_parallel_2_def assms
the_cat_parallel_Comp_app_πF[
where F=βΉset {π€, π£}βΊ, OF assms(1), of π£, unfolded assms, simplified
]
by simp
lemma (in cat_parallel_2) the_cat_parallel_2_Comp_app_π€π[cat_parallel_cs_simps]:
assumes "g = π€" and "f = π"
shows "g ββ©Aββββ©C π π π€ π£β f = g"
unfolding
the_cat_parallel_2_def assms
the_cat_parallel_Comp_app_Fπ[
of π€, OF _ assms(2), unfolded assms, simplified
]
by simp
lemma (in cat_parallel_2) the_cat_parallel_2_Comp_app_π£π[cat_parallel_cs_simps]:
assumes "g = π£" and "f = π"
shows "g ββ©Aββββ©C π π π€ π£β f = g"
unfolding
the_cat_parallel_2_def assms
the_cat_parallel_Comp_app_Fπ[
of π£, OF _ assms(2), unfolded assms, simplified
]
by simp
subsubsectionβΉIdentityβΊ
lemma the_cat_parallel_2_CId_vsv[cat_parallel_cs_intros]: "vsv (βββ©C π π π€ π£β¦CIdβ¦)"
unfolding the_cat_parallel_2_def by (rule the_cat_parallel_CId_vsv)
lemma the_cat_parallel_2_CId_vdomain[cat_parallel_cs_simps]:
"πβ©β (βββ©C π π π€ π£β¦CIdβ¦) = set {π, π}"
unfolding the_cat_parallel_2_def by (rule the_cat_parallel_CId_vdomain)
lemma the_cat_parallel_2_CId_app_π[cat_parallel_cs_simps]:
assumes "a = π"
shows "βββ©C π π π€ π£β¦CIdβ¦β¦aβ¦ = π"
unfolding assms the_cat_parallel_2_def
by (simp add: the_cat_parallel_CId_app_π)
lemma the_cat_parallel_2_CId_app_π[cat_parallel_cs_simps]:
assumes "a = π"
shows "βββ©C π π π€ π£β¦CIdβ¦β¦aβ¦ = π"
unfolding assms the_cat_parallel_2_def
by (simp add: the_cat_parallel_CId_app_π)
subsubsectionβΉArrow with a domain and a codomainβΊ
lemma (in cat_parallel_2) the_cat_parallel_2_is_arr_πππ[cat_parallel_cs_intros]:
assumes "a' = π" and "b' = π" and "f = π"
shows "f : a' β¦ββββ©C π π π€ π£β b'"
unfolding assms the_cat_parallel_2_def
by (simp add: the_cat_parallel_is_arr_πππ)
lemma (in cat_parallel_2) the_cat_parallel_2_is_arr_πππ[cat_parallel_cs_intros]:
assumes "a' = π" and "b' = π" and "f = π"
shows "f : a' β¦ββββ©C π π π€ π£β b'"
unfolding assms the_cat_parallel_2_def
by (simp add: the_cat_parallel_is_arr_πππ)
lemma (in cat_parallel_2) the_cat_parallel_2_is_arr_πππ€[cat_parallel_cs_intros]:
assumes "a' = π" and "b' = π" and "f = π€"
shows "f : a' β¦ββββ©C π π π€ π£β b'"
unfolding assms the_cat_parallel_2_def
by
(
rule the_cat_parallel_is_arr_ππF[
OF assms(1,2), of π€, unfolded assms, simplified
]
)
lemma (in cat_parallel_2) the_cat_parallel_2_is_arr_πππ£[cat_parallel_cs_intros]:
assumes "a' = π" and "b' = π" and "f = π£"
shows "f : a' β¦ββββ©C π π π€ π£β b'"
unfolding assms the_cat_parallel_2_def
by
(
rule the_cat_parallel_is_arr_ππF[
OF assms(1,2), of π£, unfolded assms, simplified
]
)
lemma (in cat_parallel_2) the_cat_parallel_2_is_arrE:
assumes "f' : a' β¦ββββ©C π π π€ π£β b'"
obtains "a' = π" and "b' = π" and "f' = π"
| "a' = π" and "b' = π" and "f' = π"
| "a' = π" and "b' = π" and "f' = π€"
| "a' = π" and "b' = π" and "f' = π£"
using assms
unfolding the_cat_parallel_2_def
by (elim the_cat_parallel_is_arrE) auto
subsubsectionβΉβΉβββΊ is a categoryβΊ
lemma (in cat_parallel_2)
finite_category_the_cat_parallel_2[cat_parallel_cs_intros]:
"finite_category Ξ± (βββ©C π π π€ π£)"
proof(intro finite_categoryI'' )
show "tiny_category Ξ± (βββ©C π π π€ π£)"
unfolding the_cat_parallel_2_def by (rule tiny_category_the_cat_parallel)
qed (auto simp: the_cat_parallel_2_components)
lemmas [cat_parallel_cs_intros] =
cat_parallel_2.finite_category_the_cat_parallel_2
subsubsectionβΉOpposite parallel categoryβΊ
lemma (in cat_parallel_2) op_cat_the_cat_parallel_2[cat_op_simps]:
"op_cat (βββ©C π π π€ π£) = βββ©C π π π£ π€"
unfolding the_cat_parallel_2_def cat_op_simps by (metis doubleton_eq_iff)
lemmas [cat_op_simps] = cat_parallel_2.op_cat_the_cat_parallel_2
subsectionβΉ
Parallel functor for a category with two parallel arrows between two objects
βΊ
locale cf_parallel_2 = cat_parallel_2 Ξ± π π π€ π£ + category Ξ± β
for Ξ± π π π€ π£ π' π' π€' π£' β :: V +
assumes cf_parallel_π€'[cat_parallel_cs_intros]: "π€' : π' β¦βββ π'"
and cf_parallel_π£'[cat_parallel_cs_intros]: "π£' : π' β¦βββ π'"
sublocale cf_parallel_2 β
cf_parallel Ξ± π π βΉset {π€, π£}βΊ π' π' βΉΞ»fββ©βset {π€, π£}. (f = π£ ? π£' : π€')βΊ β
by unfold_locales (auto intro: cat_parallel_cs_intros cat_cs_intros)
lemma (in cf_parallel_2) cf_parallel_2_π€''[cat_parallel_cs_intros]:
assumes "a = π'" and "b = π'"
shows "π€' : a β¦βββ b"
unfolding assms by (rule cf_parallel_π€')
lemma (in cf_parallel_2) cf_parallel_2_π€'''[cat_parallel_cs_intros]:
assumes "g = π€'" and "b = π'"
shows "g : π' β¦βββ b"
unfolding assms by (rule cf_parallel_π€')
lemma (in cf_parallel_2) cf_parallel_2_π€''''[cat_parallel_cs_intros]:
assumes "g = π€'" and "a = π'"
shows "g : a β¦βββ π'"
unfolding assms by (rule cf_parallel_π€')
lemma (in cf_parallel_2) cf_parallel_2_π£''[cat_parallel_cs_intros]:
assumes "a = π'" and "b = π'"
shows "π£' : a β¦βββ b"
unfolding assms by (rule cf_parallel_π£')
lemma (in cf_parallel_2) cf_parallel_2_π£'''[cat_parallel_cs_intros]:
assumes "f = π£'" and "b = π'"
shows "f : π' β¦βββ b"
unfolding assms by (rule cf_parallel_π£')
lemma (in cf_parallel_2) cf_parallel_2_π£''''[cat_parallel_cs_intros]:
assumes "f = π£'" and "a = π'"
shows "f : a β¦βββ π'"
unfolding assms by (rule cf_parallel_π£')
textβΉRules.βΊ
lemma (in cf_parallel_2) cf_parallel_axioms'[cat_parallel_cs_intros]:
assumes "Ξ±' = Ξ±"
and "a = π"
and "b = π"
and "g = π€"
and "f = π£"
and "a' = π'"
and "b' = π'"
and "g' = π€'"
and "f' = π£'"
shows "cf_parallel_2 Ξ±' a b g f a' b' g' f' β"
unfolding assms by (rule cf_parallel_2_axioms)
mk_ide rf cf_parallel_2_def[unfolded cf_parallel_2_axioms_def]
|intro cf_parallel_2I|
|dest cf_parallel_2D[dest]|
|elim cf_parallel_2E[elim]|
lemmas [cat_parallel_cs_intros] = cf_parallelD(1,2)
textβΉDuality.βΊ
lemma (in cf_parallel_2) cf_parallel_2_op[cat_op_intros]:
"cf_parallel_2 Ξ± π π π£ π€ π' π' π£' π€' (op_cat β)"
by (intro cf_parallel_2I, unfold cat_op_simps)
(cs_concl cs_intro: cat_parallel_cs_intros cat_cs_intros cat_op_intros)
lemmas [cat_op_intros] = cf_parallel.cf_parallel_op
subsubsectionβΉDefinition and elementary propertiesβΊ
definition the_cf_parallel_2 :: "V β V β V β V β V β V β V β V β V β V"
(βΉββββββ©Cβ©FβΊ)
where "ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£' =
ββββ©Cβ©F β π π (set {π€, π£}) π' π' (Ξ»fββ©βset {π€, π£}. (f = π£ ? π£' : π€'))"
textβΉComponents.βΊ
lemma the_cf_parallel_2_components:
shows [cat_parallel_cs_simps]:
"ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦HomDomβ¦ = βββ©C π π π€ π£"
and [cat_parallel_cs_simps]:
"ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦HomCodβ¦ = β"
unfolding
the_cf_parallel_2_def the_cat_parallel_2_def the_cf_parallel_components
by simp_all
textβΉElementary properties.βΊ
lemma (in cf_parallel_2) cf_parallel_2_the_cf_parallel_2_commute:
"ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£' = ββββββ©Cβ©F β π π π£ π€ π' π' π£' π€'"
using cat_parallel_2_π€π£
unfolding the_cf_parallel_2_def insert_commute
by (force simp: VLambda_vdoubleton)
lemma cf_parallel_is_cf_parallel_2:
assumes
"cf_parallel Ξ± π π (set {π€, π£}) π' π' (Ξ»fββ©βset {π€, π£}. (f = π£ ? π£' : π€')) β"
and "π€ β π£"
shows "cf_parallel_2 Ξ± π π π€ π£ π' π' π€' π£' β"
proof-
interpret
cf_parallel Ξ± π π βΉset {π€, π£}βΊ π' π' βΉΞ»fββ©βset {π€, π£}. (f = π£ ? π£' : π€')βΊ β
by (rule assms(1))
have π€π£: "π€ ββ©β set {π€, π£}" "π£ ββ©β set {π€, π£}" by auto
show ?thesis
using cat_parallel_axioms assms(2) category_axioms π€π£[THEN cf_parallel_F']
by (intro cf_parallel_2I cat_parallel_is_cat_parallel_2)
(auto simp: assms(2))
qed
subsubsectionβΉObject mapβΊ
lemma the_cf_parallel_2_ObjMap_vsv[cat_parallel_cs_intros]:
"vsv (ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ObjMapβ¦)"
unfolding the_cf_parallel_2_def by (intro cat_parallel_cs_intros)
lemma the_cf_parallel_2_ObjMap_vdomain[cat_parallel_cs_simps]:
"πβ©β (ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ObjMapβ¦) = βββ©C π π π€ π£β¦Objβ¦"
unfolding the_cf_parallel_2_def
by (cs_concl cs_shallow cs_simp: cat_parallel_cs_simps the_cat_parallel_2_def)
lemma (in cf_parallel_2) the_cf_parallel_2_ObjMap_app_π[cat_parallel_cs_simps]:
assumes "x = π"
shows "ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ObjMapβ¦β¦xβ¦ = π'"
unfolding the_cf_parallel_2_def
by (cs_concl cs_simp: assms cat_parallel_cs_simps)
lemmas [cat_parallel_cs_simps] = cf_parallel_2.the_cf_parallel_2_ObjMap_app_π
lemma (in cf_parallel_2) the_cf_parallel_2_ObjMap_app_π[cat_parallel_cs_simps]:
assumes "x = π"
shows "ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ObjMapβ¦β¦xβ¦ = π'"
unfolding the_cf_parallel_2_def
by (cs_concl cs_shallow cs_simp: assms cat_parallel_cs_simps)
lemmas [cat_parallel_cs_simps] = cf_parallel_2.the_cf_parallel_2_ObjMap_app_π
lemma (in cf_parallel_2) the_cf_parallel_2_ObjMap_vrange:
"ββ©β (ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ObjMapβ¦) = set {π', π'}"
unfolding the_cf_parallel_2_def by (rule the_cf_parallel_ObjMap_vrange)
lemma (in cf_parallel_2) the_cf_parallel_2_ObjMap_vrange_vsubset_Obj:
"ββ©β (ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ObjMapβ¦) ββ©β ββ¦Objβ¦"
unfolding the_cf_parallel_2_def
by (rule the_cf_parallel_ObjMap_vrange_vsubset_Obj)
subsubsectionβΉArrow mapβΊ
lemma (in cf_parallel_2) the_cf_parallel_2_ArrMap_app_π€[cat_parallel_cs_simps]:
assumes "f = π€"
shows "ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ArrMapβ¦β¦fβ¦ = π€'"
unfolding the_cf_parallel_2_def assms
by
(
cs_concl
cs_simp: V_cs_simps cat_parallel_cs_simps
cs_intro: V_cs_intros cat_parallel_cs_intros
)
lemmas [cat_parallel_cs_simps] = cf_parallel_2.the_cf_parallel_2_ArrMap_app_π€
lemma (in cf_parallel_2) the_cf_parallel_2_ArrMap_app_π£[cat_parallel_cs_simps]:
assumes "f = π£"
shows "ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ArrMapβ¦β¦fβ¦ = π£'"
unfolding the_cf_parallel_2_def assms
by
(
cs_concl
cs_simp: V_cs_simps cat_parallel_cs_simps
cs_intro: V_cs_intros cat_parallel_cs_intros
)
lemmas [cat_parallel_cs_simps] = cf_parallel_2.the_cf_parallel_2_ArrMap_app_π£
lemma (in cf_parallel_2) the_cf_parallel_2_ArrMap_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ArrMapβ¦β¦fβ¦ = ββ¦CIdβ¦β¦π'β¦"
unfolding the_cf_parallel_2_def assms
by (cs_concl cs_simp: cat_parallel_cs_simps)
lemmas [cat_parallel_cs_simps] = cf_parallel_2.the_cf_parallel_2_ArrMap_app_π
lemma (in cf_parallel_2) the_cf_parallel_2_ArrMap_app_π[cat_parallel_cs_simps]:
assumes "f = π"
shows "ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ArrMapβ¦β¦fβ¦ = ββ¦CIdβ¦β¦π'β¦"
unfolding the_cf_parallel_2_def assms
by (cs_concl cs_shallow cs_simp: cat_parallel_cs_simps)
lemmas [cat_parallel_cs_simps] = cf_parallel_2.the_cf_parallel_2_ArrMap_app_π
lemma (in cf_parallel_2) the_cf_parallel_2_ArrMap_vrange:
"ββ©β (ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ArrMapβ¦) = set {ββ¦CIdβ¦β¦π'β¦, ββ¦CIdβ¦β¦π'β¦, π£', π€'}"
unfolding the_cf_parallel_2_def the_cf_parallel_ArrMap_vrange
using cat_parallel_2_π€π£
by (auto simp: app_vimage_iff VLambda_vdoubleton)
lemma (in cf_parallel_2) the_cf_parallel_2_ArrMap_vrange_vsubset_Arr:
"ββ©β (ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£'β¦ArrMapβ¦) ββ©β ββ¦Arrβ¦"
unfolding the_cf_parallel_2_def
by (rule the_cf_parallel_ArrMap_vrange_vsubset_Arr)
subsubsectionβΉ
Parallel functor for a category with two parallel arrows between
two objects is a functor
βΊ
lemma (in cf_parallel_2) cf_parallel_2_the_cf_parallel_2_is_tm_functor:
"ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£' : βββ©C π π π€ π£ β¦β¦β©Cβ©.β©tβ©mβΞ±β β"
unfolding the_cf_parallel_2_def the_cat_parallel_2_def
by (rule cf_parallel_the_cf_parallel_is_tm_functor)
lemma (in cf_parallel_2) cf_parallel_2_the_cf_parallel_2_is_tm_functor':
assumes "π' = βββ©C π π π€ π£" and "β' = β"
shows "ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£' : π' β¦β¦β©Cβ©.β©tβ©mβΞ±β β'"
unfolding assms by (rule cf_parallel_2_the_cf_parallel_2_is_tm_functor)
lemmas [cat_parallel_cs_intros] =
cf_parallel_2.cf_parallel_2_the_cf_parallel_2_is_tm_functor'
subsubsectionβΉ
Opposite parallel functor for a category with two parallel arrows between
two objects
βΊ
lemma (in cf_parallel_2) cf_parallel_2_the_cf_parallel_2_op[cat_op_simps]:
"op_cf (ββββββ©Cβ©F β π π π€ π£ π' π' π€' π£') =
ββββββ©Cβ©F (op_cat β) π π π£ π€ π' π' π£' π€'"
using cat_parallel_2_π€π£
unfolding the_cf_parallel_2_def cf_parallel_the_cf_parallel_op
by (auto simp: VLambda_vdoubleton insert_commute)
lemmas [cat_op_simps] = cf_parallel_2.cf_parallel_2_the_cf_parallel_2_op
textβΉ\newpageβΊ
end