Theory CZH_ECAT_Simple

(* Copyright 2021 (C) Mihails Milehins *)

section‹Simple categories›
theory CZH_ECAT_Simple
  imports 
    CZH_Foundations.CZH_SMC_Simple
    CZH_ECAT_NTCF
    CZH_ECAT_Small_Functor
begin



subsection‹Background›


text‹
The section presents a variety of simple categories, 
(such as the empty category 0› and the singleton category 1›)
and functors between them (see cite"mac_lane_categories_2010"
for further information).
›



subsection‹Empty category 0›


subsubsection‹Definition and elementary properties›


text‹See Chapter I-2 in cite"mac_lane_categories_2010".›

definition cat_0 :: "V"
  where "cat_0 = [0, 0, 0, 0, 0, 0]"


text‹Components.›

lemma cat_0_components:
  shows "cat_0Obj = 0"
    and "cat_0Arr = 0"
    and "cat_0Dom = 0"
    and "cat_0Cod = 0"
    and "cat_0Comp = 0"
    and "cat_0CId = 0"
  unfolding cat_0_def dg_field_simps by (simp_all add: nat_omega_simps)


text‹Slicing.›

lemma cat_smc_cat_0: "cat_smc cat_0 = smc_0"
  unfolding cat_smc_def cat_0_def smc_0_def dg_field_simps
  by (simp add: nat_omega_simps)

lemmas_with (in 𝒵) [folded cat_smc_cat_0, unfolded slicing_simps]: 
  cat_0_is_arr_iff = smc_0_is_arr_iff


subsubsection0› is a category›

lemma (in 𝒵) category_cat_0[cat_cs_intros]: "category α cat_0"
proof(intro categoryI)
  show "vfsequence cat_0" "vcard cat_0 = 6" 
    by (simp_all add: cat_0_def nat_omega_simps)
qed 
  (
    auto simp: 
      𝒵_axioms
      cat_0_components 
      cat_0_is_arr_iff 
      cat_smc_cat_0 
      𝒵.semicategory_smc_0
  )

lemmas [cat_cs_intros] = 𝒵.category_cat_0


subsubsection‹Opposite of the category 0›

lemma op_cat_cat_0[cat_op_simps]: "op_cat (cat_0) = cat_0"
proof(rule cat_smc_eqI)
  define β where "β = ω + ω"
  interpret β: 𝒵 β unfolding β_def by (rule 𝒵_ωω)
  show "category β (op_cat cat_0)"
    by (cs_concl cs_shallow cs_intro: cat_cs_intros cat_op_intros)
  show "category β cat_0" by (cs_concl cs_shallow cs_intro: cat_cs_intros)
qed 
  (
    simp_all add:
      cat_0_components op_cat_components cat_smc_cat_0 
      slicing_commute[symmetric] smc_op_simps
  )



subsection‹Empty functors›


subsubsection‹Definition and elementary properties›

definition cf_0 :: "V  V"
  where "cf_0 𝔄 = [0, 0, cat_0, 𝔄]"


text‹Components.›

lemma cf_0_components:
  shows "cf_0 𝔄ObjMap = 0"
    and "cf_0 𝔄ArrMap = 0"
    and "cf_0 𝔄HomDom = cat_0"
    and "cf_0 𝔄HomCod = 𝔄"
  unfolding cf_0_def dghm_field_simps by (simp_all add: nat_omega_simps)


text‹Slicing.›

lemma cf_smcf_cf_0: "cf_smcf (cf_0 𝔄) = smcf_0 (cat_smc 𝔄)"
  unfolding 
    dg_field_simps dghm_field_simps 
    cf_smcf_def cf_0_def smc_0_def cat_0_def smcf_0_def cat_smc_def 
  by (simp add: nat_omega_simps)


text‹Opposite empty category homomorphism.›

lemma op_cf_cf_0: "op_cf (cf_0 ) = cf_0 (op_cat )"
  unfolding 
    cf_0_def op_cat_def op_cf_def cat_0_def dghm_field_simps dg_field_simps
  by (simp add: nat_omega_simps)


subsubsection‹Object map›

lemma cf_0_ObjMap_vsv[cat_cs_intros]: "vsv (cf_0 ObjMap)"
  unfolding cf_0_components by simp


subsubsection‹Arrow map›

lemma cf_0_ArrMap_vsv[cat_cs_intros]: "vsv (cf_0 ArrMap)"
  unfolding cf_0_components by simp


subsubsection‹Empty functor is a faithful functor›

lemma cf_0_is_ft_functor: 
  assumes "category α 𝔄"
  shows "cf_0 𝔄 : cat_0 ↦↦C.faithfulα𝔄"
proof(rule is_ft_functorI)
  interpret 𝔄: category α 𝔄 by (rule assms(1))
  show "cf_0 𝔄 : cat_0 ↦↦Cα𝔄"
  proof(rule is_functorI, unfold cat_smc_cat_0 cf_smcf_cf_0)
    show "vfsequence (cf_0 𝔄)" unfolding cf_0_def by simp
    show "vcard (cf_0 𝔄) = 4"
      unfolding cf_0_def by (simp add: nat_omega_simps)
    from 𝒵.smcf_0_is_ft_semifunctor assms show 
      "smcf_0 (cat_smc 𝔄) : smc_0 ↦↦SMCαcat_smc 𝔄"   
      by auto
  qed (auto simp: assms 𝔄.category_cat_0 cat_0_components cf_0_components)
  show "cf_smcf (cf_0 𝔄) : cat_smc cat_0 ↦↦SMC.faithfulαcat_smc 𝔄"
    by 
      (
        auto simp:
          assms 
          𝔄.𝒵_axioms
          𝔄.smcf_0_is_ft_semifunctor  
          category.cat_semicategory 
          cf_smcf_cf_0 
          cat_smc_cat_0
      )
qed

lemma cf_0_is_ft_functor'[cf_cs_intros]:
  assumes "category α 𝔄"
    and "𝔅' = 𝔄"
    and "𝔄' = cat_0"
  shows "cf_0 𝔄 : 𝔄' ↦↦C.faithfulα𝔅'"
  using assms(1) unfolding assms(2,3) by (rule cf_0_is_ft_functor)

lemma cf_0_is_functor: 
  assumes "category α 𝔄"
  shows "cf_0 𝔄 : cat_0 ↦↦Cα𝔄"
  using cf_0_is_ft_functor[OF assms] by auto

lemma cf_0_is_functor'[cat_cs_intros]: 
  assumes "category α 𝔄"
    and "𝔅' = 𝔄"
    and "𝔄' = cat_0"
  shows "cf_0 𝔄 : 𝔄' ↦↦Cα𝔅'"
  using assms(1) unfolding assms(2,3) by (rule cf_0_is_functor)


subsubsection‹Further properties›

lemma is_functor_is_cf_0_if_cat_0:
  assumes "𝔉 : cat_0 ↦↦Cα"
  shows "𝔉 = cf_0 "
proof(rule cf_smcf_eqI)
  interpret 𝔉: is_functor α cat_0  𝔉 by (rule assms(1))
  show "𝔉 : cat_0 ↦↦Cα" by (rule assms(1))
  then have dom_lhs: "𝒟 (𝔉ObjMap) = 0" "𝒟 (𝔉ArrMap) = 0" 
    by (cs_concl cs_shallow cs_simp: cat_cs_simps cat_0_components)+
  show "cf_0  : cat_0 ↦↦Cα" 
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  show "cf_smcf 𝔉 = cf_smcf (cf_0 )"
    unfolding cf_smcf_cf_0
    by 
      (
        rule is_semifunctor_is_smcf_0_if_smc_0, 
        rule 𝔉.cf_is_semifunctor[unfolded slicing_simps cat_smc_cat_0]
      )
qed simp_all 

lemma (in is_functor) cf_comp_cf_cf_0[cat_cs_simps]: "𝔉 CF cf_0 𝔄 = cf_0 𝔅"
proof(rule cf_eqI)
  show "𝔉 CF cf_0 𝔄 : cat_0 ↦↦Cα𝔅" by (cs_concl cs_intro: cat_cs_intros)
  then have ObjMap_dom_lhs: "𝒟 ((𝔉 CF cf_0 𝔄)ObjMap) = cat_0Obj"
    and ArrMap_dom_lhs: "𝒟 ((𝔉 CF cf_0 𝔄)ArrMap) = cat_0Arr"
    by (cs_concl cs_simp: cat_cs_simps)+
  show "cf_0 𝔅 : cat_0 ↦↦Cα𝔅" 
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  then have ObjMap_dom_rhs: "𝒟 (cf_0 𝔅ObjMap) = cat_0Obj"
    and ArrMap_dom_rhs: "𝒟 (cf_0 𝔅ArrMap) = cat_0Arr"
    by (cs_concl cs_simp: cat_cs_simps)+
  show "(𝔉 CF cf_0 𝔄)ObjMap = cf_0 𝔅ObjMap"
    by 
      (
        rule vsv_eqI, 
        unfold ObjMap_dom_lhs ObjMap_dom_rhs ArrMap_dom_lhs ArrMap_dom_rhs
      )
      (auto simp: cat_0_components intro: cat_cs_intros)
  show "(𝔉 CF cf_0 𝔄)ArrMap = cf_0 𝔅ArrMap"
    by 
      (
        rule vsv_eqI, 
        unfold ObjMap_dom_lhs ObjMap_dom_rhs ArrMap_dom_lhs ArrMap_dom_rhs
      )
      (auto simp: cat_0_components intro: cat_cs_intros)
qed simp_all

lemmas [cat_cs_simps] = is_functor.cf_comp_cf_cf_0



subsection‹Empty natural transformation›


subsubsection‹Definition and elementary properties›


text‹See Chapter X-1 in cite"mac_lane_categories_2010".›

definition ntcf_0 :: "V  V" 
  where "ntcf_0  = [0, cf_0 , cf_0 , cat_0, ]"


text‹Components.›

lemma ntcf_0_components:
  shows "ntcf_0 NTMap = 0"
    and [cat_cs_simps]: "ntcf_0 NTDom = cf_0 "
    and [cat_cs_simps]: "ntcf_0 NTCod = cf_0 "
    and [cat_cs_simps]: "ntcf_0 NTDGDom = cat_0"
    and [cat_cs_simps]: "ntcf_0 NTDGCod = "
  unfolding ntcf_0_def nt_field_simps by (simp_all add: nat_omega_simps)


text‹Slicing.›

lemma ntcf_ntsmcf_ntcf_0: "ntcf_ntsmcf (ntcf_0 𝔄) = ntsmcf_0 (cat_smc 𝔄)"
  unfolding 
    ntcf_ntsmcf_def ntcf_0_def ntsmcf_0_def cat_smc_def
    cf_smcf_def smcf_0_def cf_0_def cat_0_def smc_0_def
    dg_field_simps dghm_field_simps nt_field_simps
  by (simp add: nat_omega_simps)


text‹Duality.›

lemma op_ntcf_ntcf_0: "op_ntcf (ntcf_0 ) = ntcf_0 (op_cat )"
  by
    (
      simp_all add:
        op_ntcf_def ntcf_0_def op_cat_def op_cf_cf_0 cat_0_def
        nt_field_simps dg_field_simps nat_omega_simps
    )


subsubsection‹Natural transformation map›

lemma ntcf_0_NTMap_vsv[cat_cs_intros]: "vsv (ntcf_0 NTMap)"
  unfolding ntcf_0_components by simp

lemma ntcf_0_NTMap_vdomain[cat_cs_simps]: "𝒟 (ntcf_0 NTMap) = 0"
  unfolding ntcf_0_components by simp

lemma ntcf_0_NTMap_vrange[cat_cs_simps]: " (ntcf_0 NTMap) = 0"
  unfolding ntcf_0_components by simp


subsubsection‹Empty natural transformation is a natural transformation›

lemma (in category) cat_ntcf_0_is_ntcfI: 
  "ntcf_0  : cf_0  CF cf_0  : cat_0 ↦↦Cα"
proof(intro is_ntcfI)
  show "vfsequence (ntcf_0 )" unfolding ntcf_0_def by simp
  show "vcard (ntcf_0 ) = 5"
    unfolding ntcf_0_def by (simp add: nat_omega_simps)
  show "ntcf_ntsmcf (ntcf_0 ) :
    cf_smcf (cf_0 ) SMCF cf_smcf (cf_0 ) :
    cat_smc cat_0 ↦↦SMCαcat_smc "
    unfolding ntcf_ntsmcf_ntcf_0 cf_smcf_cf_0 cat_smc_cat_0
    by (cs_concl cs_shallow cs_intro: smc_cs_intros slicing_intros)
qed (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)+

lemma (in category) cat_ntcf_0_is_ntcfI'[cat_cs_intros]:
  assumes "𝔉' = cf_0 "
    and "𝔊' = cf_0 "
    and "𝔄' = cat_0"
    and "𝔅' = "
    and "𝔉' = 𝔉"
    and "𝔊' = 𝔊"
  shows "ntcf_0  : 𝔉' CF 𝔊' : 𝔄' ↦↦Cα𝔅'"
  unfolding assms by (rule cat_ntcf_0_is_ntcfI)

lemmas [cat_cs_intros] = category.cat_ntcf_0_is_ntcfI'

lemma is_ntcf_is_ntcf_0_if_cat_0:
  assumes "𝔑 : 𝔉 CF 𝔊 : cat_0 ↦↦Cα"
  shows "𝔑 = ntcf_0 " and "𝔉 = cf_0 " and "𝔊 = cf_0 "
proof-
  interpret 𝔑: is_ntcf α cat_0  𝔉 𝔊 𝔑 by (rule assms(1))
  note is_ntsmcf_is_ntsmcf_0_if_smc_0 = is_ntsmcf_is_ntsmcf_0_if_smc_0
    [
      OF 𝔑.ntcf_is_ntsmcf[unfolded cat_smc_cat_0], 
      folded smcf_dghm_smcf_0 ntsmcf_tdghm_ntsmcf_0
    ]
  show 𝔉_def: "𝔉 = cf_0 " and 𝔊_def: "𝔊 = cf_0 "
    by (allintro is_functor_is_cf_0_if_cat_0)
      (cs_concl cs_shallow cs_intro: cat_cs_intros)+
  show "𝔑 = ntcf_0 " 
  proof(rule ntcf_ntsmcf_eqI)
    show "𝔑 : 𝔉 CF 𝔊 : cat_0 ↦↦Cα" by (rule assms(1))
    show "ntcf_0  : 𝔉 CF 𝔊 : cat_0 ↦↦Cα"
      by (cs_concl cs_shallow cs_simp: 𝔉_def 𝔊_def cs_intro: cat_cs_intros)
  qed 
    (
      simp_all add: 
        𝔉_def 𝔊_def is_ntsmcf_is_ntsmcf_0_if_smc_0 ntcf_ntsmcf_ntcf_0
    )
qed


subsubsection‹Further properties›

lemma ntcf_vcomp_ntcf_ntcf_0[cat_cs_simps]:
  assumes "𝔑 : 𝔉 CF 𝔊 : cat_0 ↦↦Cα"
  shows "𝔑 NTCF ntcf_0  = ntcf_0 "
proof(rule ntcf_ntsmcf_eqI)
  interpret 𝔑: is_ntcf α cat_0  𝔉 𝔊 𝔑 by (rule assms(1))
  show "𝔑 NTCF ntcf_0  : cf_0  CF cf_0  : cat_0 ↦↦Cα"
    unfolding is_ntcf_is_ntcf_0_if_cat_0[OF assms]
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  show "ntcf_0  : cf_0  CF cf_0  : cat_0 ↦↦Cα"
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  show "ntcf_ntsmcf (𝔑 NTSMCF ntcf_0 ) = ntcf_ntsmcf (ntcf_0 )"
    unfolding 
      slicing_commute[symmetric]
      ntsmcf_vcomp_ntsmcf_ntsmcf_0
        [
          OF 𝔑.ntcf_is_ntsmcf[unfolded cat_smc_cat_0], 
          folded ntcf_ntsmcf_ntcf_0
        ]
      ..
qed simp_all

lemma ntcf_vcomp_ntcf_0_ntcf[cat_cs_simps]:
  assumes "𝔑 : 𝔉 CF 𝔊 : cat_0 ↦↦Cα"
  shows "ntcf_0  NTCF 𝔑 = ntcf_0 "
proof(rule ntcf_ntsmcf_eqI)
  interpret 𝔑: is_ntcf α cat_0  𝔉 𝔊 𝔑 by (rule assms(1))
  show "ntcf_0  NTCF 𝔑 : cf_0  CF cf_0  : cat_0 ↦↦Cα"
    unfolding is_ntcf_is_ntcf_0_if_cat_0[OF assms]
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  show "ntcf_0  : cf_0  CF cf_0  : cat_0 ↦↦Cα"
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  show "ntcf_ntsmcf (ntcf_0  NTCF 𝔑) = ntcf_ntsmcf (ntcf_0 )"
    unfolding 
      slicing_commute[symmetric]
      ntsmcf_vcomp_ntsmcf_0_ntsmcf
        [
          OF 𝔑.ntcf_is_ntsmcf[unfolded cat_smc_cat_0], 
          folded ntcf_ntsmcf_ntcf_0
        ]
      ..
  qed simp_all

lemma (in is_functor) cf_ntcf_comp_cf_ntcf_0[cat_cs_simps]: 
  "𝔉 CF-NTCF ntcf_0 𝔄 = ntcf_0 𝔅"
proof(rule ntcf_eqI)
  show "𝔉 CF-NTCF ntcf_0 𝔄 : cf_0 𝔅 CF cf_0 𝔅 : cat_0 ↦↦Cα𝔅"
    by (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)
  then have dom_lhs: "𝒟 ((𝔉 CF-NTCF ntcf_0 𝔄)NTMap) = cat_0Obj"
    by (cs_concl cs_simp: cat_cs_simps)
  show "ntcf_0 𝔅 : cf_0 𝔅 CF cf_0 𝔅 : cat_0 ↦↦Cα𝔅"
    by (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)
  then have dom_rhs: "𝒟 (ntcf_0 𝔅NTMap) = cat_0Obj"
    by (cs_concl cs_simp: cat_cs_simps)
  show "(𝔉 CF-NTCF ntcf_0 𝔄)NTMap = ntcf_0 𝔅NTMap"
    by (rule vsv_eqI, unfold dom_lhs dom_rhs)
      (auto simp: cat_0_components intro!: cat_cs_intros)+
qed simp_all

lemmas [cat_cs_simps] = is_functor.cf_ntcf_comp_cf_ntcf_0



subsection1›: category with one object and one arrow›


subsubsection‹Definition and elementary properties›


text‹See Chapter I-2 in cite"mac_lane_categories_2010".›

definition cat_1 :: "V  V  V"
  where "cat_1 𝔞 𝔣 =
    [
      set {𝔞},
      set {𝔣},
      set {𝔣, 𝔞},
      set {𝔣, 𝔞},
      set {[𝔣, 𝔣], 𝔣},
      set {𝔞, 𝔣}
    ]"


text‹Components.›

lemma cat_1_components:
  shows "cat_1 𝔞 𝔣Obj = set {𝔞}"
    and "cat_1 𝔞 𝔣Arr = set {𝔣}"
    and "cat_1 𝔞 𝔣Dom = set {𝔣, 𝔞}"
    and "cat_1 𝔞 𝔣Cod = set {𝔣, 𝔞}"
    and "cat_1 𝔞 𝔣Comp = set {[𝔣, 𝔣], 𝔣}"
    and "cat_1 𝔞 𝔣CId = set {𝔞, 𝔣}"
  unfolding cat_1_def dg_field_simps by (simp_all add: nat_omega_simps)


text‹Slicing.›

lemma smc_cat_1: "cat_smc (cat_1 𝔞 𝔣) = smc_1 𝔞 𝔣"
  unfolding cat_smc_def cat_1_def smc_1_def dg_field_simps
  by (simp add: nat_omega_simps)

lemmas_with [folded smc_cat_1, unfolded slicing_simps]: 
  cat_1_is_arrI = smc_1_is_arrI
  and cat_1_is_arrD = smc_1_is_arrD
  and cat_1_is_arrE = smc_1_is_arrE
  and cat_1_is_arr_iff = smc_1_is_arr_iff
  and cat_1_Comp_app[cat_cs_simps] = smc_1_Comp_app


subsubsection‹Object›

lemma cat_1_ObjI[cat_cs_intros]:
  assumes "a = 𝔞"
  shows "a  cat_1 𝔞 𝔣 Obj"
  unfolding cat_1_components(1) assms by simp


subsubsection‹Identity›

lemma cat_1_CId_app: "cat_1 𝔞 𝔣CId𝔞 = 𝔣" 
  unfolding cat_1_components by simp


subsubsection1› is a category›

lemma (in 𝒵) category_cat_1: 
  assumes "𝔞  Vset α" and "𝔣  Vset α" 
  shows "category α (cat_1 𝔞 𝔣)"
proof(intro categoryI, unfold smc_cat_1)
  show "vfsequence (cat_1 𝔞 𝔣)"
    unfolding cat_1_def by (simp add: nat_omega_simps)
  show "vcard (cat_1 𝔞 𝔣) = 6"
    unfolding cat_1_def by (simp add: nat_omega_simps)
qed (auto simp: assms semicategory_smc_1 cat_1_is_arr_iff cat_1_components)

lemmas [cat_cs_intros] = 𝒵.category_cat_1

lemma (in 𝒵) finite_category_cat_1: 
  assumes "𝔞  Vset α" and "𝔣  Vset α" 
  shows "finite_category α (cat_1 𝔞 𝔣)"
  by (intro finite_categoryI')
    (auto simp: cat_1_components intro: category_cat_1[OF assms])

lemmas [cat_small_cs_intros] = 𝒵.finite_category_cat_1


subsubsection‹Opposite of the category 1›

lemma (in 𝒵) cat_1_op[cat_op_simps]:
  assumes "𝔞  Vset α" and "𝔣  Vset α"
  shows "op_cat (cat_1 𝔞 𝔣) = cat_1 𝔞 𝔣"
proof(rule cat_eqI, unfold cat_op_simps)
  from assms show "category α (op_cat (cat_1 𝔞 𝔣))"
    by (cs_concl cs_shallow cs_intro: cat_cs_intros cat_op_intros)
  from assms show "category α (cat_1 𝔞 𝔣)"
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  show "op_cat (cat_1 𝔞 𝔣)Comp = cat_1 𝔞 𝔣Comp"
    unfolding cat_1_components op_cat_components fflip_vsingleton ..
qed (simp_all add: cat_1_components)

lemma (in 𝒵) cat_1_op_0[cat_op_simps]: "op_cat (cat_1 0 0) = cat_1 0 0"
  by 
    (
      cs_concl cs_shallow 
        cs_simp: cat_op_simps cs_intro: V_cs_intros cat_cs_intros
    )


subsubsection‹Further properties›

lemma cf_const_if_HomCod_is_cat_1:
  assumes "𝔎 : 𝔅 ↦↦Cαcat_1 𝔞 𝔣"
  shows "𝔎 = cf_const 𝔅 (cat_1 𝔞 𝔣) 𝔞"
proof(rule cf_eqI)
  interpret 𝔎: is_functor α 𝔅 cat_1 𝔞 𝔣 𝔎 by (rule assms(1))
  show "cf_const 𝔅 (cat_1 𝔞 𝔣) 𝔞 : 𝔅 ↦↦Cαcat_1 𝔞 𝔣"
    by (cs_concl cs_intro: cat_cs_intros)
  have ObjMap_dom_lhs: "𝒟 (𝔎ObjMap) = 𝔅Obj" by (simp add: cat_cs_simps)
  have ObjMap_dom_rhs: "𝒟 (cf_const 𝔅 (cat_1 𝔞 𝔣) 𝔞ObjMap) = 𝔅Obj"
    by (simp add: cat_cs_simps)
  have ArrMap_dom_lhs: "𝒟 (𝔎ArrMap) = 𝔅Arr" by (simp add: cat_cs_simps)
  have ArrMap_dom_rhs: "𝒟 (cf_const 𝔅 (cat_1 𝔞 𝔣) 𝔞ArrMap) = 𝔅Arr"
    by (simp add: cat_cs_simps)
  show "𝔎ObjMap = cf_const 𝔅 (cat_1 𝔞 𝔣) 𝔞ObjMap"
  proof(rule vsv_eqI, unfold ObjMap_dom_lhs ObjMap_dom_rhs)
    fix a assume prems: "a  𝔅Obj"
    then have "𝔎ObjMapa  cat_1 𝔞 𝔣Obj"
      by (auto intro: 𝔎.cf_ObjMap_app_in_HomCod_Obj)
    then have "𝔎ObjMapa = 𝔞" by (auto simp: cat_1_components)
    with prems show "𝔎ObjMapa = cf_const 𝔅 (cat_1 𝔞 𝔣) 𝔞ObjMapa"
      by (auto simp: cat_cs_simps)
  qed (auto intro: cat_cs_intros)
  show "𝔎ArrMap = cf_const 𝔅 (cat_1 𝔞 𝔣) 𝔞ArrMap"
  proof(rule vsv_eqI, unfold ArrMap_dom_lhs ArrMap_dom_rhs)
    fix a assume prems: "a  𝔅Arr"
    then have "𝔎ArrMapa  cat_1 𝔞 𝔣Arr"
      by (auto intro: 𝔎.cf_ArrMap_app_in_HomCod_Arr)
    then have "𝔎ArrMapa = 𝔣" by (auto simp: cat_1_components)
    with prems show "𝔎ArrMapa = cf_const 𝔅 (cat_1 𝔞 𝔣) 𝔞ArrMapa"
      by (auto simp: cat_1_CId_app cat_cs_simps)
  qed (auto intro: cat_cs_intros)
qed (simp_all add: assms)

lemma cf_const_if_HomDom_is_cat_1:
  assumes "𝔎 : cat_1 𝔞 𝔣 ↦↦Cα"
  shows "𝔎 = cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞)"
proof-

  interpret 𝔎: is_functor α cat_1 𝔞 𝔣  𝔎 by (rule assms(1))

  from cat_1_components(1) have 𝔞: "𝔞  Vset α" 
    by (auto simp: 𝔎.HomDom.cat_in_Obj_in_Vset)
  from cat_1_components(2) have 𝔣: "𝔣  Vset α" 
    by (auto simp: 𝔎.HomDom.cat_in_Arr_in_Vset)

  from 𝔞 𝔣 interpret cf_1: 
    is_tm_functor α cat_1 𝔞 𝔣  cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞)
    by (cs_concl cs_intro: cat_small_cs_intros cat_cs_intros)
  
  show ?thesis
  proof(rule cf_eqI)
    show "cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞) : cat_1 𝔞 𝔣 ↦↦Cα"
      by (cs_concl cs_shallow cs_intro: cat_cs_intros)
    have ObjMap_dom_lhs: "𝒟 (𝔎ObjMap) = set {𝔞}" 
      by (simp add: cat_cs_simps cat_1_components)
    have ObjMap_dom_rhs: 
      "𝒟 (cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞)ObjMap) = set {𝔞}"
      by (simp add: cat_cs_simps cat_1_components)
    show "𝔎ObjMap = cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞)ObjMap"
    proof(rule vsv_eqI, unfold ObjMap_dom_lhs ObjMap_dom_rhs)
      fix a assume "a  set {𝔞}"
      then have a_def: "a = 𝔞" by simp
      show "𝔎ObjMapa = cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞)ObjMapa"
        by 
          (
            cs_concl cs_shallow 
              cs_simp: cat_1_components(1) cat_cs_simps a_def 
              cs_intro: V_cs_intros
          )
    qed auto

    have ArrMap_dom_lhs: "𝒟 (𝔎ArrMap) = set {𝔣}" 
      by (simp add: cat_cs_simps cat_1_components)
    have ArrMap_dom_rhs: 
      "𝒟 (cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞)ArrMap) = set {𝔣}"
      by (simp add: cat_cs_simps cat_1_components)
    
    show "𝔎ArrMap = cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞)ArrMap"
    proof(rule vsv_eqI, unfold ArrMap_dom_lhs ArrMap_dom_rhs)
      fix f assume "f  set {𝔣}"
      then have f_def: "f = 𝔣" by simp
      show "𝔎ArrMapf = cf_const (cat_1 𝔞 𝔣)  (𝔎ObjMap𝔞)ArrMapf"
        unfolding f_def
        by (subst cat_1_CId_app[symmetric, of 𝔣 𝔞])
          (
            cs_concl cs_shallow
              cs_simp: cat_1_components(1,2) cat_cs_simps 
              cs_intro: V_cs_intros cat_cs_intros
          )
    qed auto

  qed (simp_all add: assms)

qed

text‹\newpage›

end