Theory CZH_UCAT_PWKan

(* Copyright 2021 (C) Mihails Milehins *)

section‹Pointwise Kan extensions›
theory CZH_UCAT_PWKan
  imports CZH_UCAT_Kan
begin



subsection‹Pointwise Kan extensions›


text‹
The following subsection is based on elements of the
content of section 6.3 in cite"riehl_category_2016" and
Chapter X-5 in cite"mac_lane_categories_2010".
›

locale is_cat_pw_rKe = is_cat_rKe α 𝔅  𝔄 𝔎 𝔗 𝔊 ε
  for α 𝔅  𝔄 𝔎 𝔗 𝔊 ε +
  assumes cat_pw_rKe_preserved: "a  𝔄Obj 
    ε :
      𝔊 CF 𝔎 CF.rKeα𝔗 :
      𝔅 C  C (HomO.Cα𝔄(a,-) : 𝔄 ↦↦C cat_Set α)"

syntax "_is_cat_pw_rKe" :: "V  V  V  V  V  V  V  V  bool"
  (
    (_ :/ _ CF _ CF.rKe.pwı _ :/ _ C _ C _) 
    [51, 51, 51, 51, 51, 51, 51] 51
  )
translations "ε : 𝔊 CF 𝔎 CF.rKe.pwα𝔗 : 𝔅 C  C 𝔄"  
  "CONST is_cat_pw_rKe α 𝔅  𝔄 𝔎 𝔗 𝔊 ε"

locale is_cat_pw_lKe = is_cat_lKe α 𝔅  𝔄 𝔎 𝔗 𝔉 η
  for α 𝔅  𝔄 𝔎 𝔗 𝔉 η +
  assumes cat_pw_lKe_preserved: "a  op_cat 𝔄Obj 
    op_ntcf η :
      op_cf 𝔉 CF op_cf 𝔎 CF.rKeαop_cf 𝔗 :
      op_cat 𝔅 C op_cat  C (HomO.Cα𝔄(-,a) : op_cat 𝔄 ↦↦C cat_Set α)"

syntax "_is_cat_pw_lKe" :: "V  V  V  V  V  V  V  V  bool"
  (
    (_ :/ _ CF.lKe.pwı _ CF _ :/ _ C _ C _) 
    [51, 51, 51, 51, 51, 51, 51] 51
  )
translations "η : 𝔗 CF.lKe.pwα𝔉 CF 𝔎 : 𝔅 C  C 𝔄"  
  "CONST is_cat_pw_lKe α 𝔅  𝔄 𝔎 𝔗 𝔉 η"

lemma (in is_cat_pw_rKe) cat_pw_rKe_preserved'[cat_Kan_cs_intros]: 
  assumes "a  𝔄Obj"
    and "𝔄' = 𝔄"
    and "ℌ' = HomO.Cα𝔄(a,-)"
    and "𝔈' = cat_Set α"
  shows "ε : 𝔊 CF 𝔎 CF.rKeα𝔗 : 𝔅 C  C (ℌ' : 𝔄' ↦↦C 𝔈')"
  using assms(1) unfolding assms(2-4) by (rule cat_pw_rKe_preserved)

lemmas [cat_Kan_cs_intros] = is_cat_pw_rKe.cat_pw_rKe_preserved'

lemma (in is_cat_pw_lKe) cat_pw_lKe_preserved'[cat_Kan_cs_intros]: 
  assumes "a  op_cat 𝔄Obj"
    and "𝔉' = op_cf 𝔉"
    and "𝔎' = op_cf 𝔎"
    and "𝔗' = op_cf 𝔗"
    and "𝔅' = op_cat 𝔅"
    and "ℭ' = op_cat "
    and "𝔄' = op_cat 𝔄"
    and "ℌ' = HomO.Cα𝔄(-,a)"
    and "𝔈' = cat_Set α"
  shows "op_ntcf η :
    𝔉' CF 𝔎' CF.rKeα𝔗' : 𝔅' C ℭ' C (ℌ' : 𝔄' ↦↦C 𝔈')"
  using assms(1) unfolding assms by (rule cat_pw_lKe_preserved)

lemmas [cat_Kan_cs_intros] = is_cat_pw_lKe.cat_pw_lKe_preserved'


text‹Rules.›

lemma (in is_cat_pw_rKe) is_cat_pw_rKe_axioms'[cat_Kan_cs_intros]:
  assumes "α' = α"
    and "𝔊' = 𝔊"
    and "𝔎' = 𝔎"
    and "𝔗' = 𝔗"
    and "𝔅' = 𝔅"
    and "𝔄' = 𝔄"
    and "ℭ' = "
  shows "ε : 𝔊' CF 𝔎' CF.rKe.pwα'𝔗' : 𝔅' C ℭ' C 𝔄'"
  unfolding assms by (rule is_cat_pw_rKe_axioms)

mk_ide rf is_cat_pw_rKe_def[unfolded is_cat_pw_rKe_axioms_def]
  |intro is_cat_pw_rKeI|
  |dest is_cat_pw_rKeD[dest]|
  |elim is_cat_pw_rKeE[elim]|

lemmas [cat_Kan_cs_intros] = is_cat_pw_rKeD(1)

lemma (in is_cat_pw_lKe) is_cat_pw_lKe_axioms'[cat_Kan_cs_intros]:
  assumes "α' = α"
    and "𝔉' = 𝔉"
    and "𝔎' = 𝔎"
    and "𝔗' = 𝔗"
    and "𝔅' = 𝔅"
    and "𝔄' = 𝔄"
    and "ℭ' = "
  shows "η : 𝔗' CF.lKe.pwα'𝔉' CF 𝔎' : 𝔅' C ℭ' C 𝔄'"
  unfolding assms by (rule is_cat_pw_lKe_axioms)

mk_ide rf is_cat_pw_lKe_def[unfolded is_cat_pw_lKe_axioms_def]
  |intro is_cat_pw_lKeI|
  |dest is_cat_pw_lKeD[dest]|
  |elim is_cat_pw_lKeE[elim]|

lemmas [cat_Kan_cs_intros] = is_cat_pw_lKeD(1)


text‹Duality.›

lemma (in is_cat_pw_rKe) is_cat_pw_lKe_op:
  "op_ntcf ε :
    op_cf 𝔗 CF.lKe.pwαop_cf 𝔊 CF op_cf 𝔎 :
    op_cat 𝔅 C op_cat  C op_cat 𝔄"
proof(intro is_cat_pw_lKeI, unfold cat_op_simps)
  fix a assume prems: "a  𝔄Obj"
  from cat_pw_rKe_preserved[OF prems] prems show
    "ε :
      𝔊 CF 𝔎 CF.rKeα𝔗 :
      𝔅 C  C (HomO.Cαop_cat 𝔄(-,a) : 𝔄 ↦↦C cat_Set α)"
    by (cs_concl cs_shallow cs_simp: cat_op_simps cs_intro: cat_cs_intros)    
qed (cs_concl cs_shallow cs_intro: cat_op_intros)

lemma (in is_cat_pw_rKe) is_cat_pw_lKe_op'[cat_op_intros]:
  assumes "𝔗' = op_cf 𝔗"
    and "𝔊' = op_cf 𝔊"
    and "𝔎' = op_cf 𝔎"
    and "𝔅' = op_cat 𝔅"
    and "𝔄' = op_cat 𝔄"
    and "ℭ' = op_cat "
  shows "op_ntcf ε : 𝔗' CF.lKe.pwα𝔊' CF 𝔎' : 𝔅' C ℭ' C 𝔄'"
  unfolding assms by (rule is_cat_pw_lKe_op)

lemmas [cat_op_intros] = is_cat_pw_rKe.is_cat_pw_lKe_op'

lemma (in is_cat_pw_lKe) is_cat_pw_rKe_op:
  "op_ntcf η :
    op_cf 𝔉 CF op_cf 𝔎 CF.rKe.pwαop_cf 𝔗 :
    op_cat 𝔅 C op_cat  C op_cat 𝔄"
proof(intro is_cat_pw_rKeI, unfold cat_op_simps)
  fix a assume prems: "a  𝔄Obj"
  from cat_pw_lKe_preserved[unfolded cat_op_simps, OF prems] prems show 
    "op_ntcf η :
      op_cf 𝔉 CF op_cf 𝔎 CF.rKeαop_cf 𝔗 :
      op_cat 𝔅 C op_cat  C
      (HomO.Cαop_cat 𝔄(a,-) : op_cat 𝔄 ↦↦C cat_Set α)"
    by (cs_concl cs_shallow cs_simp: cat_op_simps cs_intro: cat_cs_intros)    
qed (cs_concl cs_shallow cs_intro: cat_op_intros)

lemma (in is_cat_pw_lKe) is_cat_pw_lKe_op'[cat_op_intros]:
  assumes "𝔗' = op_cf 𝔗"
    and "𝔉' = op_cf 𝔉"
    and "𝔎' = op_cf 𝔎"
    and "𝔅' = op_cat 𝔅"
    and "𝔄' = op_cat 𝔄"
    and "ℭ' = op_cat "
  shows "op_ntcf η : 𝔉' CF 𝔎' CF.rKe.pwα𝔗' : 𝔅' C ℭ' C 𝔄'"
  unfolding assms by (rule is_cat_pw_rKe_op)

lemmas [cat_op_intros] = is_cat_pw_lKe.is_cat_pw_lKe_op'



subsection‹Lemma X.5: L_10_5_N›\label{sec:lem_X_5_start}›


text‹
This subsection and several further subsections 
(\ref{sec:lem_X_5_start}-\ref{sec:lem_X_5_end})
expose definitions that are used in the proof of the technical lemma that
was used in the proof of Theorem 3 from Chapter X-5
in cite"mac_lane_categories_2010".
›

definition L_10_5_N :: "V  V  V  V  V  V"
  where "L_10_5_N α β 𝔗 𝔎 c =
    [
      (
        λa𝔗HomCodObj.
          cf_nt α β 𝔎ObjMapcf_map (HomO.Cα𝔗HomCod(a,-) CF 𝔗), c
      ),
      (
        λf𝔗HomCodArr.
          cf_nt α β 𝔎ArrMap
            ntcf_arrow (HomA.Cα𝔗HomCod(f,-) NTCF-CF 𝔗), 𝔎HomCodCIdc
            
      ),
      op_cat (𝔗HomCod),
      cat_Set β
    ]"


text‹Components.›

lemma L_10_5_N_components:
  shows "L_10_5_N α β 𝔗 𝔎 cObjMap =
      (
        λa𝔗HomCodObj.
          cf_nt α β 𝔎ObjMapcf_map (HomO.Cα𝔗HomCod(a,-) CF 𝔗), c
      )"
    and "L_10_5_N α β 𝔗 𝔎 cArrMap =
      (
        λf𝔗HomCodArr.
          cf_nt α β 𝔎ArrMap
            ntcf_arrow (HomA.Cα𝔗HomCod(f,-) NTCF-CF 𝔗), 𝔎HomCodCIdc
            
      )"
    and "L_10_5_N α β 𝔗 𝔎 cHomDom = op_cat (𝔗HomCod)"
    and "L_10_5_N α β 𝔗 𝔎 cHomCod = cat_Set β"
  unfolding L_10_5_N_def dghm_field_simps by (simp_all add: nat_omega_simps)

context
  fixes α 𝔅  𝔄 𝔎 𝔗
  assumes 𝔎: "𝔎 : 𝔅 ↦↦Cα"
    and 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

interpretation 𝔎: is_functor α 𝔅  𝔎 by (rule 𝔎)
interpretation 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule 𝔗)

lemmas L_10_5_N_components' = L_10_5_N_components[
    where 𝔗=𝔗 and 𝔎=𝔎, unfolded cat_cs_simps
    ]

lemmas [cat_Kan_cs_simps] = L_10_5_N_components'(3,4)

end


subsubsection‹Object map›

mk_VLambda L_10_5_N_components(1)
  |vsv L_10_5_N_ObjMap_vsv[cat_Kan_cs_intros]|

context
  fixes α 𝔅  𝔄 𝔎 𝔗 c
  assumes 𝔎: "𝔎 : 𝔅 ↦↦Cα"
    and 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

mk_VLambda L_10_5_N_components'(1)[OF 𝔎 𝔗]
  |vdomain L_10_5_N_ObjMap_vdomain[cat_Kan_cs_simps]|
  |app L_10_5_N_ObjMap_app[cat_Kan_cs_simps]|

end


subsubsection‹Arrow map›

mk_VLambda L_10_5_N_components(2)
  |vsv L_10_5_N_ArrMap_vsv[cat_Kan_cs_intros]|

context
  fixes α 𝔅  𝔄 𝔎 𝔗 c
  assumes 𝔎: "𝔎 : 𝔅 ↦↦Cα"
    and 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

mk_VLambda L_10_5_N_components'(2)[OF 𝔎 𝔗]
  |vdomain L_10_5_N_ArrMap_vdomain[cat_Kan_cs_simps]|
  |app L_10_5_N_ArrMap_app[cat_Kan_cs_simps]|

end


subsubsectionL_10_5_N› is a functor›

lemma L_10_5_N_is_functor: 
  assumes "𝒵 β" 
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
  shows "L_10_5_N α β 𝔗 𝔎 c : op_cat 𝔄 ↦↦Cβcat_Set β"
proof-

  let ?FUNCT = λ𝔄. cat_FUNCT α 𝔄 (cat_Set α)

  interpret β: 𝒵 β by (rule assms(1))

  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(3))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(4))

  from assms(2) interpret FUNCT_𝔅: tiny_category β ?FUNCT 𝔅
    by (cs_concl cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  
  interpret β𝔎: is_tiny_functor β 𝔅  𝔎
    by (rule is_functor.cf_is_tiny_functor_if_ge_Limit)
      (use assms(2) in cs_concl cs_intro: cat_cs_intros)+
  interpret β𝔗: is_tiny_functor β 𝔅 𝔄 𝔗
    by (rule is_functor.cf_is_tiny_functor_if_ge_Limit)
      (use assms(2) in cs_concl cs_intro: cat_cs_intros)+

  from assms(2) interpret cf_nt: 
    is_functor β ?FUNCT 𝔅 ×C  cat_Set β cf_nt α β 𝔎
    by (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros)

  show ?thesis
  proof(intro is_functorI')

    show "vfsequence (L_10_5_N α β 𝔗 𝔎 c)" unfolding L_10_5_N_def by simp
    show "vcard (L_10_5_N α β 𝔗 𝔎 c) = 4" 
      unfolding L_10_5_N_def by (simp add: nat_omega_simps)
    show "vsv (L_10_5_N α β 𝔗 𝔎 cObjMap)" 
      by (cs_concl cs_shallow cs_intro: cat_Kan_cs_intros)
    from assms(3,4) show "vsv (L_10_5_N α β 𝔗 𝔎 cArrMap)"
      by (cs_concl cs_shallow cs_intro: cat_Kan_cs_intros)
    from assms show "𝒟 (L_10_5_N α β 𝔗 𝔎 cObjMap) = op_cat 𝔄Obj"
      by 
        (
          cs_concl cs_shallow 
            cs_simp: cat_Kan_cs_simps cat_op_simps cs_intro: cat_cs_intros
        )
    show " (L_10_5_N α β 𝔗 𝔎 cObjMap)  cat_Set βObj"
      unfolding L_10_5_N_components'[OF 𝔎.is_functor_axioms 𝔗.is_functor_axioms]
    proof(rule vrange_VLambda_vsubset)
      fix a assume prems: "a  𝔄Obj"
      from prems assms show
        "cf_nt α β 𝔎ObjMapcf_map (HomO.Cα𝔄(a,-) CF 𝔗), c 
          cat_Set βObj"
        by 
          (
            cs_concl 
              cs_simp: cat_Set_components(1) cat_cs_simps  cat_FUNCT_cs_simps
              cs_intro: 
                cat_cs_intros FUNCT_𝔅.cat_Hom_in_Vset cat_FUNCT_cs_intros
          )
    qed

    from assms show "𝒟 (L_10_5_N α β 𝔗 𝔎 cArrMap) = op_cat 𝔄Arr"
      by 
        (
          cs_concl cs_shallow 
            cs_simp: cat_Kan_cs_simps cat_op_simps cs_intro: cat_cs_intros
        )

    show "L_10_5_N α β 𝔗 𝔎 cArrMapf :
      L_10_5_N α β 𝔗 𝔎 cObjMapa cat_Set βL_10_5_N α β 𝔗 𝔎 cObjMapb"
      if "f : a op_cat 𝔄b" for a b f
      using that assms
      unfolding cat_op_simps
      by 
        (
          cs_concl 
            cs_simp: L_10_5_N_ArrMap_app L_10_5_N_ObjMap_app 
            cs_intro: cat_cs_intros cat_prod_cs_intros cat_FUNCT_cs_intros
        )

    show 
      "L_10_5_N α β 𝔗 𝔎 cArrMapg Aop_cat 𝔄f =
        L_10_5_N α β 𝔗 𝔎 cArrMapg Acat_Set βL_10_5_N α β 𝔗 𝔎 cArrMapf"
      if "g : b' op_cat 𝔄c'" and "f : a' op_cat 𝔄b'" for b' c' g a' f
    proof-
      from that assms(5) show ?thesis
        unfolding cat_op_simps
        by (*slow*)
          (
            cs_concl
              cs_intro:
                cat_cs_intros
                cat_prod_cs_intros
                cat_FUNCT_cs_intros 
                cat_op_intros
              cs_simp:
                cat_cs_simps
                cat_Kan_cs_simps
                cat_FUNCT_cs_simps 
                cat_prod_cs_simps 
                cat_op_simps
                cf_nt.cf_ArrMap_Comp[symmetric]
          )
    qed

    show 
      "L_10_5_N α β 𝔗 𝔎 cArrMapop_cat 𝔄CIda =
        cat_Set βCIdL_10_5_N α β 𝔗 𝔎 cObjMapa"
      if "a  op_cat 𝔄Obj" for a
    proof-
      note [cat_cs_simps] = 
        ntcf_id_cf_comp[symmetric] 
        ntcf_arrow_id_ntcf_id[symmetric]
        cat_FUNCT_CId_app[symmetric] 
      from that[unfolded cat_op_simps] assms show ?thesis
        by (*slow*)
          (
            cs_concl 
              cs_intro:
                cat_cs_intros
                cat_FUNCT_cs_intros
                cat_prod_cs_intros
                cat_op_intros
              cs_simp: 
                cat_FUNCT_cs_simps cat_cs_simps cat_Kan_cs_simps cat_op_simps
          )
    qed

  qed (cs_concl cs_simp: cat_Kan_cs_simps cs_intro: cat_cs_intros)+

qed

lemma L_10_5_N_is_functor'[cat_Kan_cs_intros]: 
  assumes "𝒵 β" 
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "𝔄' = op_cat 𝔄"
    and "𝔅' = cat_Set β"
    and "β' = β"
  shows "L_10_5_N α β 𝔗 𝔎 c : 𝔄' ↦↦Cβ'𝔅'"
  using assms(1-5) unfolding assms(6-8) by (rule L_10_5_N_is_functor)



subsection‹Lemma X.5: L_10_5_υ_arrow›


subsubsection‹Definition and elementary properties›

definition L_10_5_υ_arrow :: "V  V  V  V  V  V  V"
  where "L_10_5_υ_arrow 𝔗 𝔎 c τ a b =
    [
      (λfHom (𝔎HomCod) c (𝔎ObjMapb). τNTMap0, b, f),
      Hom (𝔎HomCod) c (𝔎ObjMapb),
      Hom (𝔗HomCod) a (𝔗ObjMapb)
    ]"


text‹Components.›

lemma L_10_5_υ_arrow_components:
  shows "L_10_5_υ_arrow 𝔗 𝔎 c τ a bArrVal =
    (λfHom (𝔎HomCod) c (𝔎ObjMapb). τNTMap0, b, f)"
    and "L_10_5_υ_arrow 𝔗 𝔎 c τ a bArrDom = Hom (𝔎HomCod) c (𝔎ObjMapb)"
    and "L_10_5_υ_arrow 𝔗 𝔎 c τ a bArrCod = Hom (𝔗HomCod) a (𝔗ObjMapb)"
  unfolding L_10_5_υ_arrow_def arr_field_simps 
  by (simp_all add: nat_omega_simps) 

context
  fixes α 𝔅  𝔄 𝔎 𝔗
  assumes 𝔎: "𝔎 : 𝔅 ↦↦Cα"
    and 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

interpretation 𝔎: is_functor α 𝔅  𝔎 by (rule 𝔎)
interpretation 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule 𝔗)

lemmas L_10_5_υ_arrow_components' = L_10_5_υ_arrow_components[
    where 𝔗=𝔗 and 𝔎=𝔎, unfolded cat_cs_simps
    ]

lemmas [cat_Kan_cs_simps] = L_10_5_υ_arrow_components'(2,3)

end


subsubsection‹Arrow value›

mk_VLambda L_10_5_υ_arrow_components(1)
  |vsv L_10_5_υ_arrow_ArrVal_vsv[cat_Kan_cs_intros]|

context
  fixes α 𝔅  𝔄 𝔎 𝔗
  assumes 𝔎: "𝔎 : 𝔅 ↦↦Cα"
    and 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

mk_VLambda L_10_5_υ_arrow_components'(1)[OF 𝔎 𝔗]
  |vdomain L_10_5_υ_arrow_ArrVal_vdomain[cat_Kan_cs_simps]|
  |app L_10_5_υ_arrow_ArrVal_app[unfolded in_Hom_iff]|

end

lemma L_10_5_υ_arrow_ArrVal_app':
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "f : c 𝔎ObjMapb"
  shows "L_10_5_υ_arrow 𝔗 𝔎 c τ a bArrValf = τNTMap0, b, f"
proof-
  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))
  from assms(3) have c: "c  Obj" by auto
  show ?thesis by (rule L_10_5_υ_arrow_ArrVal_app[OF assms(1,2,3)])
qed


subsubsectionL_10_5_υ_arrow› is an arrow›

lemma L_10_5_υ_arrow_ArrVal_is_arr: 
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "τ' = ntcf_arrow τ"
    and "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and "f : c 𝔎ObjMapb"
    and "b  𝔅Obj"
  shows "L_10_5_υ_arrow 𝔗 𝔎 c τ' a bArrValf : a 𝔄𝔗ObjMapb"
proof-
  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))
  interpret τ: is_cat_cone α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 τ by (rule assms(4))
  from assms(5,6) show ?thesis
    unfolding assms(3)
    by
      (
        cs_concl 
          cs_simp:
            cat_cs_simps
            L_10_5_υ_arrow_ArrVal_app
            cat_comma_cs_simps
            cat_FUNCT_cs_simps
          cs_intro: cat_cs_intros cat_comma_cs_intros
      )
qed

lemma L_10_5_υ_arrow_ArrVal_is_arr'[cat_Kan_cs_intros]: 
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "τ' = ntcf_arrow τ"
    and "a' = a"
    and "b' = 𝔗ObjMapb"
    and "𝔄' = 𝔄"
    and "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and "f : c 𝔎ObjMapb"
    and "b  𝔅Obj"
  shows "L_10_5_υ_arrow 𝔗 𝔎 c τ' a bArrValf : a' 𝔄b'"
  using assms(1-3, 7-9) 
  unfolding assms(3-6) 
  by (rule L_10_5_υ_arrow_ArrVal_is_arr)


subsubsection‹Further properties›

lemma L_10_5_υ_arrow_is_arr: 
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "τ' = ntcf_arrow τ"
    and "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and "b  𝔅Obj"
  shows "L_10_5_υ_arrow 𝔗 𝔎 c τ' a b :
    Hom  c (𝔎ObjMapb) cat_Set αHom 𝔄 a (𝔗ObjMapb)"
proof-
  note L_10_5_υ_arrow_components = L_10_5_υ_arrow_components'[OF assms(1,2)]
  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))
  interpret τ: is_cat_cone α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 τ by (rule assms(5))
  show ?thesis
  proof(intro cat_Set_is_arrI)
    show "arr_Set α (L_10_5_υ_arrow 𝔗 𝔎 c τ' a b)"
    proof(intro arr_SetI)
      show "vfsequence (L_10_5_υ_arrow 𝔗 𝔎 c τ' a b)" 
        unfolding L_10_5_υ_arrow_def by simp
      show "vcard (L_10_5_υ_arrow 𝔗 𝔎 c τ' a b) = 3"
        unfolding L_10_5_υ_arrow_def by (simp add: nat_omega_simps)
      show 
        " (L_10_5_υ_arrow 𝔗 𝔎 c τ' a bArrVal) 
          L_10_5_υ_arrow 𝔗 𝔎 c τ' a bArrCod"
        unfolding L_10_5_υ_arrow_components
      proof(intro vrange_VLambda_vsubset, unfold in_Hom_iff)
        fix f assume "f : c 𝔎ObjMapb"
        from L_10_5_υ_arrow_ArrVal_is_arr[OF assms(1,2,4,5) this assms(6)] this 
        show "τ'NTMap0, b, f : a 𝔄𝔗ObjMapb"
          by 
            (
              cs_prems cs_shallow 
                cs_simp: L_10_5_υ_arrow_ArrVal_app' cat_cs_simps 
                cs_intro: cat_cs_intros
            ) 
      qed
      from assms(3,6) show "L_10_5_υ_arrow 𝔗 𝔎 c τ' a bArrDom  Vset α"
        by (cs_concl cs_simp: cat_Kan_cs_simps cs_intro: cat_cs_intros)
      from assms(1-3,6) τ.cat_cone_obj show
        "L_10_5_υ_arrow 𝔗 𝔎 c τ' a bArrCod  Vset α"
        by (cs_concl cs_simp: cat_Kan_cs_simps cs_intro: cat_cs_intros)
    qed (auto simp: L_10_5_υ_arrow_components)
  qed (simp_all add: L_10_5_υ_arrow_components)
qed

lemma L_10_5_υ_arrow_is_arr'[cat_Kan_cs_intros]: 
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "τ' = ntcf_arrow τ"
    and "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and "b  𝔅Obj"
    and "A = Hom  c (𝔎ObjMapb)"
    and "B = Hom 𝔄 a (𝔗ObjMapb)"
    and "ℭ' = cat_Set α"
  shows "L_10_5_υ_arrow 𝔗 𝔎 c τ' a b : A ℭ'B"
  using assms(1-6) unfolding assms(7-9) by (rule L_10_5_υ_arrow_is_arr)

lemma L_10_5_υ_cf_hom[cat_Kan_cs_simps]:
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "τ' = ntcf_arrow τ"
    and "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and "a  𝔄Obj"
    and "f : a' 𝔅b'"
  shows 
    "L_10_5_υ_arrow 𝔗 𝔎 c τ' a b' Acat_Set αcf_hom  [CIdc, 𝔎ArrMapf] =
      cf_hom 𝔄 [𝔄CIda, 𝔗ArrMapf] Acat_Set αL_10_5_υ_arrow 𝔗 𝔎 c τ' a a'"
    (is "?lhs = ?rhs")
proof-

  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))
  interpret τ: is_cat_cone α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 τ by (rule assms(5))

  have [cat_Kan_cs_simps]:
    "τNTMapa'', b'', 𝔎ArrMaph' Af' = 
      𝔗ArrMaph' A𝔄τNTMapa', b', f'"
    if F_def: "F = [[a', b', f'], [a'', b'', f''], [g', h']]"
      and A_def: "A = [a', b', f']"
      and B_def: "B = [a'', b'', f'']"
      and F: "F : A c CF 𝔎B"
    for F A B a' b' f' a'' b'' f'' g' h'
  proof-
    from F[unfolded F_def A_def B_def] assms(3) have a'_def: "a' = 0"
      and a''_def: "a'' = 0"
      and g'_def: "g' = 0"
      and h': "h' : b' 𝔅b''"
      and f': "f' : c 𝔎ObjMapb'"
      and f'': "f'' : c 𝔎ObjMapb''"
      and f''_def: "𝔎ArrMaph' Af' = f''"
      by auto
    note τ.cat_cone_Comp_commute[cat_cs_simps del]
    from 
      τ.ntcf_Comp_commute[OF F] 
      that(2) F g' h' f' f'' 
      𝔎.is_functor_axioms 
      𝔗.is_functor_axioms 
    show 
      "τNTMapa'', b'', 𝔎ArrMaph' Af' = 
        𝔗ArrMaph' A𝔄τNTMapa', b', f'"
      unfolding F_def A_def B_def a'_def a''_def g'_def 
      by (*slow*)
        (
          cs_prems
            cs_simp: cat_cs_simps cat_comma_cs_simps f''_def[symmetric]
            cs_intro: cat_cs_intros cat_comma_cs_intros
        )
  qed

  from assms(3) assms(6,7) 𝔎.HomCod.category_axioms have lhs_is_arr:
    "?lhs : Hom  c (𝔎ObjMapa') cat_Set αHom 𝔄 a (𝔗ObjMapb')"
    unfolding assms(4)
    by
      (
        cs_concl cs_intro:
          cat_lim_cs_intros 
          cat_cs_intros 
          cat_Kan_cs_intros 
          cat_prod_cs_intros 
          cat_op_intros
      )
  then have dom_lhs: "𝒟 ((?lhs)ArrVal) = Hom  c (𝔎ObjMapa')" 
    by (cs_concl cs_shallow cs_simp: cat_cs_simps)
  from assms(3) assms(6,7) 𝔎.HomCod.category_axioms 𝔗.HomCod.category_axioms 
  have rhs_is_arr:
    "?rhs : Hom  c (𝔎ObjMapa') cat_Set αHom 𝔄 a (𝔗ObjMapb')"
    unfolding assms(4)
    by
      (
        cs_concl cs_intro:
          cat_lim_cs_intros 
          cat_cs_intros 
          cat_Kan_cs_intros 
          cat_prod_cs_intros 
          cat_op_intros
      )
  then have dom_rhs: "𝒟 ((?rhs)ArrVal) = Hom  c (𝔎ObjMapa')" 
    by (cs_concl cs_shallow cs_simp: cat_cs_simps)
  show ?thesis
  proof(rule arr_Set_eqI)
    from lhs_is_arr show arr_Set_lhs: "arr_Set α ?lhs"
      by (auto dest: cat_Set_is_arrD(1))
    from rhs_is_arr show arr_Set_rhs: "arr_Set α ?rhs"
      by (auto dest: cat_Set_is_arrD(1))
    show "?lhsArrVal = ?rhsArrVal"
    proof(rule vsv_eqI, unfold dom_lhs dom_rhs in_Hom_iff)
      fix g assume prems: "g : c 𝔎ObjMapa'"
      from prems assms(7) have 𝔎f: 
        "𝔎ArrMapf Ag : c 𝔎ObjMapb'"
        by (cs_concl cs_shallow cs_intro: cat_cs_intros)
      with assms(6,7) prems 𝔎.HomCod.category_axioms 𝔗.HomCod.category_axioms 
      show "?lhsArrValg = ?rhsArrValg"
          by (*slow*)
            (
              cs_concl 
                cs_intro:
                  cat_lim_cs_intros 
                  cat_cs_intros 
                  cat_Kan_cs_intros
                  cat_comma_cs_intros
                  cat_prod_cs_intros 
                  cat_op_intros 
                  cat_1_is_arrI
                cs_simp:
                  L_10_5_υ_arrow_ArrVal_app' 
                  cat_cs_simps
                  cat_Kan_cs_simps
                  cat_op_simps
                  cat_FUNCT_cs_simps
                  cat_comma_cs_simps
                  assms(4)
            )+
    qed (use arr_Set_lhs arr_Set_rhs in auto)
  qed
    (
      use lhs_is_arr rhs_is_arr in
        cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros
    )+
qed



subsection‹Lemma X.5: L_10_5_τ›


subsubsection‹Definition and elementary properties›

definition L_10_5_τ where "L_10_5_τ 𝔗 𝔎 c υ a = 
  [
    (λbfc CF 𝔎Obj. υNTMapbf1ArrValbf2),
    cf_const (c CF 𝔎) (𝔗HomCod) a,
    𝔗 CF c OCF 𝔎,
    c CF 𝔎,
    (𝔗HomCod)
  ]"


text‹Components.›

lemma L_10_5_τ_components: 
  shows "L_10_5_τ 𝔗 𝔎 c υ aNTMap =
    (λbfc CF 𝔎Obj. υNTMapbf1ArrValbf2)"
    and "L_10_5_τ 𝔗 𝔎 c υ aNTDom = cf_const (c CF 𝔎) (𝔗HomCod) a"
    and "L_10_5_τ 𝔗 𝔎 c υ aNTCod = 𝔗 CF c OCF 𝔎"
    and "L_10_5_τ 𝔗 𝔎 c υ aNTDGDom = c CF 𝔎"
    and "L_10_5_τ 𝔗 𝔎 c υ aNTDGCod = (𝔗HomCod)"
  unfolding L_10_5_τ_def nt_field_simps by (simp_all add: nat_omega_simps)

context
  fixes α 𝔅  𝔄 𝔎 𝔗
  assumes 𝔎: "𝔎 : 𝔅 ↦↦Cα"
    and 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

interpretation 𝔎: is_functor α 𝔅  𝔎 by (rule 𝔎)
interpretation 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule 𝔗)

lemmas L_10_5_τ_components' = L_10_5_τ_components[
  where 𝔗=𝔗 and 𝔎=𝔎, unfolded cat_cs_simps
  ]

lemmas [cat_Kan_cs_simps] = L_10_5_τ_components'(2-5)

end


subsubsection‹Natural transformation map›

mk_VLambda L_10_5_τ_components(1)
  |vsv L_10_5_τ_NTMap_vsv[cat_Kan_cs_intros]|
  |vdomain L_10_5_τ_NTMap_vdomain[cat_Kan_cs_simps]|

lemma L_10_5_τ_NTMap_app[cat_Kan_cs_simps]: 
  assumes "bf = [0, b, f]" and "bf  c CF 𝔎Obj" 
  shows "L_10_5_τ 𝔗 𝔎 c υ aNTMapbf = υNTMapbArrValf"
  using assms unfolding L_10_5_τ_components by (simp add: nat_omega_simps)


subsubsectionL_10_5_τ› is a cone›

lemma L_10_5_τ_is_cat_cone[cat_cs_intros]:
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and υ'_def: "υ' = ntcf_arrow υ"
    and υ: "υ :
      HomO.Cα(c,-) CF 𝔎 CF HomO.Cα𝔄(a,-) CF 𝔗 : 𝔅 ↦↦Cαcat_Set α"
    and a: "a  𝔄Obj"
  shows "L_10_5_τ 𝔗 𝔎 c υ' a : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
proof-

  let ?H_ℭ = λc. HomO.Cα(c,-) 
  let ?H_𝔄 = λa. HomO.Cα𝔄(a,-)

  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))

  from assms(3) interpret c𝔎: category α c CF 𝔎
    by (cs_concl cs_shallow cs_intro: cat_comma_cs_intros)
  from assms(3) interpret Πc: is_functor α c CF 𝔎 𝔅 c OCF 𝔎
    by
      (
        cs_concl cs_shallow
          cs_simp: cat_comma_cs_simps 
          cs_intro: cat_cs_intros cat_comma_cs_intros
      )
  interpret υ: is_ntcf α 𝔅 cat_Set α ?H_ℭ c CF 𝔎 ?H_𝔄 a CF 𝔗 υ
    by (rule υ)

  show ?thesis
  proof(intro is_cat_coneI is_ntcfI')
    show "vfsequence (L_10_5_τ 𝔗 𝔎 c υ' a)" unfolding L_10_5_τ_def by simp
    show "vcard (L_10_5_τ 𝔗 𝔎 c υ' a) = 5" 
      unfolding L_10_5_τ_def by (simp add: nat_omega_simps)
    from a interpret cf_const:
      is_functor α c CF 𝔎 𝔄 cf_const (c CF 𝔎) 𝔄 a 
      by (cs_concl cs_intro: cat_cs_intros)
    show "L_10_5_τ 𝔗 𝔎 c υ' aNTMapbf :
      cf_const (c CF 𝔎) 𝔄 aObjMapbf 𝔄(𝔗 CF c OCF 𝔎)ObjMapbf"
      if "bf  c CF 𝔎Obj" for bf
    proof-
      from that assms(3) obtain b f 
        where bf_def: "bf = [0, b, f]"
          and b: "b  𝔅Obj"
          and f: "f : c 𝔎ObjMapb"
        by auto
      from υ.ntcf_NTMap_is_arr[OF b] a b assms(3) f have "υNTMapb :
        Hom  c (𝔎ObjMapb) cat_Set αHom 𝔄 a (𝔗ObjMapb)"
        by
          (
            cs_prems cs_shallow 
              cs_simp: cat_cs_simps cat_op_simps 
              cs_intro: cat_cs_intros cat_op_intros
          )
      with that b f show "L_10_5_τ 𝔗 𝔎 c υ' aNTMapbf :
        cf_const (c CF 𝔎) 𝔄 aObjMapbf 𝔄(𝔗 CF c OCF 𝔎)ObjMapbf"
        unfolding bf_def υ'_def
        by
          (
            cs_concl 
              cs_simp:
                cat_cs_simps 
                cat_Kan_cs_simps 
                cat_comma_cs_simps
                cat_FUNCT_cs_simps
              cs_intro: cat_cs_intros cat_comma_cs_intros
          )
    qed

    show 
      "L_10_5_τ 𝔗 𝔎 c υ' aNTMapB A𝔄cf_const (c CF 𝔎) 𝔄 aArrMapF =
        (𝔗 CF c OCF 𝔎)ArrMapF A𝔄L_10_5_τ 𝔗 𝔎 c υ' aNTMapA"
      if "F : A c CF 𝔎B" for A B F
    proof-
      from 𝔎.is_functor_axioms that assms(3) obtain a' f a'' f' g 
        where F_def: "F = [[0, a', f], [0, a'', f'], [0, g]]"
          and A_def: "A = [0, a', f]"
          and B_def: "B = [0, a'', f']"
          and g: "g : a' 𝔅a''"
          and f: "f : c 𝔎ObjMapa'"
          and f': "f' : c 𝔎ObjMapa''" 
          and f'_def: "𝔎ArrMapg Af = f'" 
        by auto
      from υ.ntcf_Comp_commute[OF g] have 
        "(υNTMapa'' Acat_Set α(?H_ℭ c CF 𝔎)ArrMapg)ArrValf =
          ((?H_𝔄 a CF 𝔗)ArrMapg Acat_Set αυNTMapa')ArrValf"
        by simp
      from this a g f f' 𝔎.HomCod.category_axioms 𝔗.HomCod.category_axioms 
      have [cat_cs_simps]:
        "υNTMapa''ArrVal𝔎ArrMapg Af = 
          𝔗ArrMapg A𝔄υNTMapa'ArrValf"
        by (*slow*)
          (
            cs_prems 
              cs_simp: cat_cs_simps cat_op_simps
              cs_intro: cat_cs_intros cat_prod_cs_intros cat_op_intros
          )
      from that a g f f' 𝔎.HomCod.category_axioms 𝔗.HomCod.category_axioms 
      show ?thesis
        unfolding F_def A_def B_def υ'_def (*slow*)
        by
          (
            cs_concl 
              cs_simp:
                f'_def[symmetric] 
                cat_cs_simps 
                cat_Kan_cs_simps 
                cat_comma_cs_simps 
                cat_FUNCT_cs_simps
                cat_op_simps 
              cs_intro: cat_cs_intros cat_op_intros
          )
    qed

  qed
    (
      use assms in
        cs_concl 
            cs_simp: cat_cs_simps cat_Kan_cs_simps 
            cs_intro: cat_cs_intros cat_Kan_cs_intros a
    )+

qed

lemma L_10_5_τ_is_cat_cone'[cat_Kan_cs_intros]:
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "υ' = ntcf_arrow υ"
    and "𝔉' = 𝔗 CF c OCF 𝔎"
    and "c𝔎 = c CF 𝔎"
    and "𝔄' = 𝔄"
    and "α' = α"
    and "υ :
      HomO.Cα(c,-) CF 𝔎 CF HomO.Cα𝔄(a,-) CF 𝔗 :
      𝔅 ↦↦Cαcat_Set α"
    and "a  𝔄Obj"
  shows "L_10_5_τ 𝔗 𝔎 c υ' a : a <CF.cone 𝔉' : c𝔎 ↦↦Cα'𝔄'"
  using assms(1-4,9,10) unfolding assms(5-8) by (rule L_10_5_τ_is_cat_cone)



subsection‹Lemma X.5: L_10_5_υ›


subsubsection‹Definition and elementary properties›

definition L_10_5_υ :: "V  V  V  V  V  V  V"
  where "L_10_5_υ α 𝔗 𝔎 c τ a =
    [
      (λb𝔗HomDomObj. L_10_5_υ_arrow 𝔗 𝔎 c τ a b),
      HomO.Cα𝔎HomCod(c,-) CF 𝔎,
      HomO.Cα𝔗HomCod(a,-) CF 𝔗,
      𝔗HomDom,
      cat_Set α
    ]"


text‹Components.›

lemma L_10_5_υ_components: 
  shows "L_10_5_υ α 𝔗 𝔎 c τ aNTMap =
    (λb𝔗HomDomObj. L_10_5_υ_arrow 𝔗 𝔎 c τ a b)"
    and "L_10_5_υ α 𝔗 𝔎 c τ aNTDom = HomO.Cα𝔎HomCod(c,-) CF 𝔎"
    and "L_10_5_υ α 𝔗 𝔎 c τ aNTCod = HomO.Cα𝔗HomCod(a,-) CF 𝔗"
    and "L_10_5_υ α 𝔗 𝔎 c τ aNTDGDom = 𝔗HomDom"
    and "L_10_5_υ α 𝔗 𝔎 c τ aNTDGCod = cat_Set α"
  unfolding L_10_5_υ_def nt_field_simps by (simp_all add: nat_omega_simps)

context
  fixes α 𝔅  𝔄 𝔎 𝔗
  assumes 𝔎: "𝔎 : 𝔅 ↦↦Cα" and 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

interpretation 𝔎: is_functor α 𝔅  𝔎 by (rule 𝔎)
interpretation 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule 𝔗)

lemmas L_10_5_υ_components' = L_10_5_υ_components[
  where 𝔗=𝔗 and 𝔎=𝔎, unfolded cat_cs_simps
  ]

lemmas [cat_Kan_cs_simps] = L_10_5_υ_components'(2-5)

end


subsubsection‹Natural transformation map›

mk_VLambda L_10_5_υ_components(1)
  |vsv L_10_5_υ_NTMap_vsv[cat_Kan_cs_intros]|

context
  fixes α 𝔅  𝔄 𝔎 𝔗
  assumes 𝔎: "𝔎 : 𝔅 ↦↦Cα"
    and 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

interpretation 𝔎: is_functor α 𝔅  𝔎 by (rule 𝔎)
interpretation 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule 𝔗)

mk_VLambda L_10_5_υ_components'(1)[OF 𝔎 𝔗]
  |vdomain L_10_5_υ_NTMap_vdomain[cat_Kan_cs_simps]|
  |app L_10_5_υ_NTMap_app[cat_Kan_cs_simps]|

end


subsubsectionL_10_5_υ› is a natural transformation›

lemma L_10_5_υ_is_ntcf:
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and τ'_def: "τ' = ntcf_arrow τ"
    and τ: "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and a: "a  𝔄Obj"
  shows "L_10_5_υ α 𝔗 𝔎 c τ' a :
    HomO.Cα(c,-) CF 𝔎 CF HomO.Cα𝔄(a,-) CF 𝔗 : 𝔅 ↦↦Cαcat_Set α"
    (is ?L_10_5_υ : ?H_ℭ c CF 𝔎 CF ?H_𝔄 a CF 𝔗 : 𝔅 ↦↦Cαcat_Set α)
proof-

  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))

  interpret τ: is_cat_cone α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 τ  
    by (rule assms(5))

  from assms(3) interpret c𝔎: category α c CF 𝔎
    by (cs_concl cs_shallow cs_intro: cat_comma_cs_intros)
  from assms(3) interpret Πc: is_functor α c CF 𝔎 𝔅 c OCF 𝔎
    by
      (
        cs_concl cs_shallow
          cs_simp: cat_comma_cs_simps 
          cs_intro: cat_cs_intros cat_comma_cs_intros
      )

  show "?L_10_5_υ : ?H_ℭ c CF 𝔎 CF ?H_𝔄 a CF 𝔗 : 𝔅 ↦↦Cαcat_Set α"
  proof(intro is_ntcfI')
    show "vfsequence ?L_10_5_υ" unfolding L_10_5_υ_def by auto
    show "vcard ?L_10_5_υ = 5" 
      unfolding L_10_5_υ_def by (simp add: nat_omega_simps)
    show "?L_10_5_υNTMapb :
      (?H_ℭ c CF 𝔎)ObjMapb cat_Set α(?H_𝔄 a CF 𝔗)ObjMapb"
      if "b  𝔅Obj" for b
    proof-
      from a that assms(3) show ?thesis
        unfolding τ'_def
        by
          (
            cs_concl cs_shallow
              cs_simp: cat_cs_simps cat_Kan_cs_simps
              cs_intro:
                cat_Kan_cs_intros
                cat_lim_cs_intros
                cat_cs_intros
                cat_op_intros
          )
    qed
    show
      "?L_10_5_υNTMapb' Acat_Set α(?H_ℭ c CF 𝔎)ArrMapf =
        (?H_𝔄 a CF 𝔗)ArrMapf Acat_Set α?L_10_5_υNTMapa'"
      if "f : a' 𝔅b'" for a' b' f
    proof-
      from that a assms(3) show ?thesis
        by
          (
            cs_concl 
              cs_simp: cat_cs_simps cat_Kan_cs_simps cat_op_simps τ'_def
              cs_intro: cat_lim_cs_intros cat_cs_intros 
          )
    qed

  qed
    (
      use assms(3,6) in
        cs_concl 
            cs_simp: cat_cs_simps cat_Kan_cs_simps
            cs_intro: cat_cs_intros cat_Kan_cs_intros
    )+

qed

lemma L_10_5_υ_is_ntcf'[cat_Kan_cs_intros]:
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "τ' = ntcf_arrow τ"
    and "𝔉' = HomO.Cα(c,-) CF 𝔎"
    and "𝔊' = HomO.Cα𝔄(a,-) CF 𝔗"
    and "𝔅' = 𝔅"
    and "ℭ' = cat_Set α"
    and "α' = α"
    and "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and "a  𝔄Obj"
  shows "L_10_5_υ α 𝔗 𝔎 c τ' a : 𝔉' CF 𝔊' : 𝔅' ↦↦Cα'ℭ'"
  using assms(1-4,10,11) unfolding assms(5-9) by (rule L_10_5_υ_is_ntcf)



subsection‹Lemma X.5: L_10_5_χ_arrow›


subsubsection‹Definition and elementary properties›

definition L_10_5_χ_arrow 
  where "L_10_5_χ_arrow α β 𝔗 𝔎 c a =
    [
      (λυL_10_5_N α β 𝔗 𝔎 cObjMapa. ntcf_arrow (L_10_5_τ 𝔗 𝔎 c υ a)), 
      L_10_5_N α β 𝔗 𝔎 cObjMapa,
      cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa
    ]"


text‹Components.›

lemma L_10_5_χ_arrow_components: 
  shows "L_10_5_χ_arrow α β 𝔗 𝔎 c aArrVal = 
      (λυL_10_5_N α β 𝔗 𝔎 cObjMapa. ntcf_arrow (L_10_5_τ 𝔗 𝔎 c υ a))"
    and "L_10_5_χ_arrow α β 𝔗 𝔎 c aArrDom = L_10_5_N α β 𝔗 𝔎 cObjMapa"
    and "L_10_5_χ_arrow α β 𝔗 𝔎 c aArrCod = 
      cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa"
  unfolding L_10_5_χ_arrow_def arr_field_simps
  by (simp_all add: nat_omega_simps)

lemmas [cat_Kan_cs_simps] = L_10_5_χ_arrow_components(2,3)


subsubsection‹Arrow value›

mk_VLambda L_10_5_χ_arrow_components(1)
  |vsv L_10_5_χ_arrow_vsv[cat_Kan_cs_intros]|
  |vdomain L_10_5_χ_arrow_vdomain|
  |app L_10_5_χ_arrow_app|

lemma L_10_5_χ_arrow_vdomain'[cat_Kan_cs_simps]:
  assumes "𝒵 β"
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "a  𝔄Obj"
  shows "𝒟 (L_10_5_χ_arrow α β 𝔗 𝔎 c aArrVal) = Hom 
    (cat_FUNCT α 𝔅 (cat_Set α)) 
    (cf_map (HomO.Cα(c,-) CF 𝔎)) 
    (cf_map (HomO.Cα𝔄(a,-) CF 𝔗))"
  using assms
  by
    (
      cs_concl  
        cs_simp: cat_cs_simps cat_Kan_cs_simps L_10_5_χ_arrow_vdomain 
        cs_intro: cat_cs_intros
    )

lemma L_10_5_χ_arrow_app'[cat_Kan_cs_simps]:
  assumes "𝒵 β"
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and υ'_def: "υ' = ntcf_arrow υ"
    and υ: "υ :
      HomO.Cα(c,-) CF 𝔎 CF HomO.Cα𝔄(a,-) CF 𝔗 : 𝔅 ↦↦Cαcat_Set α"
    and a: "a  𝔄Obj"
  shows 
    "L_10_5_χ_arrow α β 𝔗 𝔎 c aArrValυ' =
      ntcf_arrow (L_10_5_τ 𝔗 𝔎 c υ' a)"
  using assms
  by
    (
      cs_concl cs_shallow
        cs_simp: cat_cs_simps cat_Kan_cs_simps L_10_5_χ_arrow_app 
        cs_intro: cat_cs_intros cat_FUNCT_cs_intros
    )

lemma υτa_def:
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and υτa'_def: "υτa' = ntcf_arrow υτa"
    and υτa: "υτa :
      HomO.Cα(c,-) CF 𝔎 CF HomO.Cα𝔄(a,-) CF 𝔗 :
      𝔅 ↦↦Cαcat_Set α"
    and a: "a  𝔄Obj"
  shows "υτa = L_10_5_υ α 𝔗 𝔎 c (ntcf_arrow (L_10_5_τ 𝔗 𝔎 c υτa' a)) a"
  (is υτa = ?L_10_5_υ (ntcf_arrow ?L_10_5_τ) a)
proof-

  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))

  interpret υτa: is_ntcf 
    α 𝔅 cat_Set α HomO.Cα(c,-) CF 𝔎 HomO.Cα𝔄(a,-) CF 𝔗 υτa
    by (rule υτa)

  show ?thesis
  proof(rule ntcf_eqI)
    show "υτa : 
      HomO.Cα(c,-) CF 𝔎 CF HomO.Cα𝔄(a,-) CF 𝔗 : 𝔅 ↦↦Cαcat_Set α"
      by (rule υτa)
    from assms(1-3) a show 
      "?L_10_5_υ (ntcf_arrow ?L_10_5_τ) a :
        HomO.Cα(c,-) CF 𝔎 CF HomO.Cα𝔄(a,-) CF 𝔗 : 𝔅 ↦↦Cαcat_Set α" 
      by
        (
          cs_concl 
            cs_simp: cat_Kan_cs_simps υτa'_def
            cs_intro: cat_cs_intros cat_Kan_cs_intros
        )
    have dom_lhs: "𝒟 (υτaNTMap) = 𝔅Obj"
      by (cs_concl cs_shallow cs_simp: cat_cs_simps)
    have dom_rhs: "𝒟 (?L_10_5_υ (ntcf_arrow (?L_10_5_τ)) aNTMap) = 𝔅Obj"
      by (cs_concl cs_shallow cs_simp: cat_Kan_cs_simps cs_intro: cat_cs_intros)
    show "υτaNTMap = ?L_10_5_υ (ntcf_arrow ?L_10_5_τ) aNTMap"
    proof(rule vsv_eqI, unfold dom_lhs dom_rhs)
      fix b assume prems: "b  𝔅Obj"
      from prems assms(3) a have lhs: "υτaNTMapb :
        Hom  c (𝔎ObjMapb) cat_Set αHom 𝔄 a (𝔗ObjMapb)"
        by 
          (
            cs_concl cs_shallow 
              cs_simp: cat_cs_simps cs_intro: cat_cs_intros cat_op_intros
          )
      then have dom_lhs: "𝒟 (υτaNTMapbArrVal) = Hom  c (𝔎ObjMapb)"
        by (cs_concl cs_shallow cs_simp: cat_cs_simps)
      from prems assms(3) a have rhs: 
        "L_10_5_υ_arrow 𝔗 𝔎 c (ntcf_arrow ?L_10_5_τ) a b :
          Hom  c (𝔎ObjMapb) cat_Set αHom 𝔄 a (𝔗ObjMapb)"
        unfolding υτa'_def
        by
          (
            cs_concl cs_shallow 
              cs_simp: cat_Kan_cs_simps 
              cs_intro: cat_Kan_cs_intros cat_cs_intros
          )

      then have dom_rhs: 
        "𝒟 (L_10_5_υ_arrow 𝔗 𝔎 c  (ntcf_arrow ?L_10_5_τ) a bArrVal) =
          Hom  c (𝔎ObjMapb)"
        by (cs_concl cs_shallow cs_simp: cat_cs_simps)
      have [cat_cs_simps]:  
        "υτaNTMapb = L_10_5_υ_arrow 𝔗 𝔎 c (ntcf_arrow ?L_10_5_τ) a b"
      proof(rule arr_Set_eqI)
        from lhs show arr_Set_lhs: "arr_Set α (υτaNTMapb)"
          by (auto dest: cat_Set_is_arrD(1))
        from rhs show arr_Set_rhs: 
          "arr_Set α (L_10_5_υ_arrow 𝔗 𝔎 c (ntcf_arrow (?L_10_5_τ)) a b)"
          by (auto dest: cat_Set_is_arrD(1))
        show "υτaNTMapbArrVal = 
          L_10_5_υ_arrow 𝔗 𝔎 c (ntcf_arrow ?L_10_5_τ) a bArrVal"
        proof(rule vsv_eqI, unfold dom_lhs dom_rhs in_Hom_iff)
          fix f assume "f : c 𝔎ObjMapb"
          with assms prems show 
            "υτaNTMapbArrValf =
              L_10_5_υ_arrow 𝔗 𝔎 c (ntcf_arrow ?L_10_5_τ) a bArrValf"
            unfolding υτa'_def
            by
              (
                cs_concl cs_shallow
                  cs_simp:
                    cat_Kan_cs_simps cat_FUNCT_cs_simps L_10_5_υ_arrow_ArrVal_app 
                  cs_intro: cat_cs_intros cat_comma_cs_intros
              )
        qed (use arr_Set_lhs arr_Set_rhs in auto)
      qed (use lhs rhs in cs_concl cs_shallow cs_simp: cat_cs_simps)+

      from prems show 
        "υτaNTMapb = L_10_5_υ α 𝔗 𝔎 c (ntcf_arrow ?L_10_5_τ) aNTMapb"
        by
          (
            cs_concl cs_shallow 
              cs_simp: cat_cs_simps cat_Kan_cs_simps cs_intro: cat_cs_intros
          )

    qed (cs_concl cs_intro: cat_cs_intros cat_Kan_cs_intros V_cs_intros)+

  qed simp_all

qed



subsection‹Lemma X.5: L_10_5_χ'_arrow›


subsubsection‹Definition and elementary properties›

definition L_10_5_χ'_arrow :: "V  V  V  V  V  V  V"
  where "L_10_5_χ'_arrow α β 𝔗 𝔎 c a =
    [
      (
        λτcf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa.
          ntcf_arrow (L_10_5_υ α 𝔗 𝔎 c τ a)
      ),
      cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa,
      L_10_5_N α β 𝔗 𝔎 cObjMapa
    ]"


text‹Components.›

lemma L_10_5_χ'_arrow_components:
  shows "L_10_5_χ'_arrow α β 𝔗 𝔎 c aArrVal =
    (
      λτcf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa.
        ntcf_arrow (L_10_5_υ α 𝔗 𝔎 c τ a)
    )"
    and [cat_Kan_cs_simps]: "L_10_5_χ'_arrow α β 𝔗 𝔎 c aArrDom =
      cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa"
    and [cat_Kan_cs_simps]: "L_10_5_χ'_arrow α β 𝔗 𝔎 c aArrCod =
       L_10_5_N α β 𝔗 𝔎 cObjMapa"
  unfolding L_10_5_χ'_arrow_def arr_field_simps by (simp_all add: nat_omega_simps)


subsubsection‹Arrow value›

mk_VLambda L_10_5_χ'_arrow_components(1)
  |vsv L_10_5_χ'_arrow_ArrVal_vsv[cat_Kan_cs_intros]|
  |vdomain L_10_5_χ'_arrow_ArrVal_vdomain|
  |app L_10_5_χ'_arrow_ArrVal_app|

lemma L_10_5_χ'_arrow_ArrVal_vdomain'[cat_Kan_cs_simps]:
  assumes "𝒵 β"
    and "α  β"
    and τ: "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and a: "a  𝔄Obj"
  shows "𝒟 (L_10_5_χ'_arrow α β 𝔗 𝔎 c aArrVal) = Hom
    (cat_FUNCT α (c CF 𝔎) 𝔄)
    (cf_map (cf_const (c CF 𝔎) 𝔄 a)) 
    (cf_map (𝔗 CF c OCF 𝔎))"
proof-
  interpret β: 𝒵 β by (rule assms(1))
  interpret τ: is_cat_cone α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 τ
    by (rule assms(3))
  from assms(1,2,4) show ?thesis
    by 
      (
        cs_concl cs_shallow
          cs_simp: cat_cs_simps L_10_5_χ'_arrow_ArrVal_vdomain 
          cs_intro: cat_cs_intros
      )
qed

lemma L_10_5_χ'_arrow_ArrVal_app'[cat_cs_simps]:
  assumes "𝒵 β"
    and "α  β"
    and τ'_def: "τ' = ntcf_arrow τ"
    and τ: "τ : a <CF.cone 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    and a: "a  𝔄Obj"
  shows "L_10_5_χ'_arrow α β 𝔗 𝔎 c aArrValτ' =
    ntcf_arrow (L_10_5_υ α 𝔗 𝔎 c τ' a)"
proof-
  interpret β: 𝒵 β by (rule assms(1))
  interpret τ: is_cat_cone α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 τ
    by (rule assms(4))
  from assms(2,5) have "τ'  cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa"
    unfolding τ'_def
    by
      (
        cs_concl 
          cs_simp: cat_cs_simps 
          cs_intro: cat_FUNCT_cs_intros cat_cs_intros
      )
  then show
    "L_10_5_χ'_arrow α β 𝔗 𝔎 c aArrValτ' =
      ntcf_arrow (L_10_5_υ α 𝔗 𝔎 c τ' a)"
    unfolding L_10_5_χ'_arrow_components by auto
qed


subsubsectionL_10_5_χ'_arrow› is an isomorphism in the category Set›

lemma L_10_5_χ'_arrow_is_iso_arr: 
  assumes "𝒵 β"
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "a  𝔄Obj"
  shows "L_10_5_χ'_arrow α β 𝔗 𝔎 c a :
    cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa isocat_Set βL_10_5_N α β 𝔗 𝔎 cObjMapa" (*FIXME: any reason not to evaluate ObjMap?*)
    (
      is 
        ?L_10_5_χ'_arrow :
            cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa isocat_Set β?L_10_5_NObjMapa
    )
proof-

  let ?FUNCT = λ𝔄. cat_FUNCT α 𝔄 (cat_Set α)
  let ?c𝔎_𝔄 = cat_FUNCT α (c CF 𝔎) 𝔄
  let ?H_ℭ = λc. HomO.Cα(c,-)
  let ?H_𝔄 = λc. HomO.Cα𝔄(a,-)

  from assms(1,2) interpret β: 𝒵 β by simp 

  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(3))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(4))

  from 𝔎.vempty_is_zet assms interpret c𝔎: category α c CF 𝔎
    by (cs_concl cs_shallow cs_intro: cat_comma_cs_intros)
  from assms(2,6) interpret c𝔎_𝔄: category β ?c𝔎_𝔄
    by
      (
        cs_concl cs_intro:
          cat_small_cs_intros cat_cs_intros cat_FUNCT_cs_intros
      )
  from 𝔎.vempty_is_zet assms interpret Πc: 
    is_functor α c CF 𝔎 𝔅 c OCF 𝔎
    by (cs_concl cs_shallow cs_intro: cat_comma_cs_intros)

  from assms(2) interpret FUNCT_𝔄: tiny_category β ?FUNCT 𝔄
    by (cs_concl cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  from assms(2) interpret FUNCT_𝔅: tiny_category β ?FUNCT 𝔅
    by (cs_concl cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  from assms(2) interpret FUNCT_ℭ: tiny_category β ?FUNCT 
    by (cs_concl cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  
  have 𝔗Π: "𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    by (cs_concl cs_intro: cat_cs_intros)

  from assms(5,6) have [cat_cs_simps]: 
    "cf_of_cf_map (c CF 𝔎) 𝔄 (cf_map (cf_const (c CF 𝔎) 𝔄 a)) =
      cf_const (c CF 𝔎) 𝔄 a"
    "cf_of_cf_map (c CF 𝔎) 𝔄 (cf_map (𝔗 CF c OCF 𝔎)) = 𝔗 CF c OCF 𝔎"
    "cf_of_cf_map 𝔅 (cat_Set α) (cf_map (HomO.Cα(c,-) CF 𝔎)) = 
      HomO.Cα(c,-) CF 𝔎"
    "cf_of_cf_map 𝔅 (cat_Set α) (cf_map (HomO.Cα𝔄(a,-) CF 𝔗)) = 
      HomO.Cα𝔄(a,-) CF 𝔗"
    by (cs_concl cs_simp: cat_FUNCT_cs_simps cs_intro: cat_cs_intros)+

  note cf_Cone_ObjMap_app = is_functor.cf_Cone_ObjMap_app[OF 𝔗Π assms(1,2,6)]

  show ?thesis
  proof
    (
      intro cat_Set_is_iso_arrI cat_Set_is_arrI arr_SetI, 
      unfold L_10_5_χ'_arrow_components(3) cf_Cone_ObjMap_app
    )
    show "vfsequence ?L_10_5_χ'_arrow" 
      unfolding L_10_5_χ'_arrow_def by auto
    show χ'_arrow_ArrVal_vsv: "vsv (?L_10_5_χ'_arrowArrVal)" 
      unfolding L_10_5_χ'_arrow_components by auto
    show "vcard ?L_10_5_χ'_arrow = 3"
      unfolding L_10_5_χ'_arrow_def by (simp add: nat_omega_simps)
    show [cat_cs_simps]: 
      "𝒟 (?L_10_5_χ'_arrowArrVal) = ?L_10_5_χ'_arrowArrDom"
      unfolding L_10_5_χ'_arrow_components by simp
    show vrange_χ'_arrow_vsubset_N'': 
      " (?L_10_5_χ'_arrowArrVal)  ?L_10_5_NObjMapa"
      unfolding L_10_5_χ'_arrow_components
    proof(rule vrange_VLambda_vsubset)
      fix τ assume prems: "τ  cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa"
      from this assms c𝔎_𝔄.category_axioms have τ_is_arr:
        "τ : cf_map (cf_const (c CF 𝔎) 𝔄 a) ?c𝔎_𝔄cf_map (𝔗 CF c OCF 𝔎)"
        by
          (
            cs_prems 
              cs_simp: cat_cs_simps cat_Kan_cs_simps cat_FUNCT_components(1)
              cs_intro: cat_cs_intros
          )
      note τ = cat_FUNCT_is_arrD(1,2)[OF τ_is_arr, unfolded cat_cs_simps]
      have "cf_of_cf_map (c CF 𝔎) 𝔄 (cf_map (𝔗 CF c OCF 𝔎)) = 𝔗 CF c OCF 𝔎"
        by (cs_concl cs_simp: cat_FUNCT_cs_simps cs_intro: cat_cs_intros)
      from prems assms τ(1) show 
        "ntcf_arrow (L_10_5_υ α 𝔗 𝔎 c τ a)  ?L_10_5_NObjMapa"
        by (subst τ(2)) (*slow*)
          (
            cs_concl 
              cs_simp: cat_cs_simps cat_Kan_cs_simps
              cs_intro: 
                is_cat_coneI cat_cs_intros cat_Kan_cs_intros cat_FUNCT_cs_intros
          )
    qed

    show " (?L_10_5_χ'_arrowArrVal) = ?L_10_5_NObjMapa"
    proof
      (
        intro vsubset_antisym[OF vrange_χ'_arrow_vsubset_N''], 
        intro vsubsetI
      )

      fix υτa assume "υτa  ?L_10_5_NObjMapa"
      from this assms have υτa:
        "υτa : cf_map (?H_ℭ c CF 𝔎) ?FUNCT 𝔅cf_map (?H_𝔄 a CF 𝔗)"
        by 
          (
            cs_prems 
              cs_simp: cat_cs_simps cat_Kan_cs_simps cs_intro: cat_cs_intros
          )
      note υτa = cat_FUNCT_is_arrD[OF this, unfolded cat_cs_simps]
      interpret τ: 
        is_cat_cone α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 L_10_5_τ 𝔗 𝔎 c υτa a
        by (rule L_10_5_τ_is_cat_cone[OF assms(3,4,5) υτa(2,1) assms(6)])

      show "υτa   (?L_10_5_χ'_arrowArrVal)"
      proof(rule vsv.vsv_vimageI2')
        show "vsv (?L_10_5_χ'_arrowArrVal)" by (rule χ'_arrow_ArrVal_vsv)
        from τ.is_cat_cone_axioms assms show
          "ntcf_arrow (L_10_5_τ 𝔗 𝔎 c υτa a)  𝒟 (?L_10_5_χ'_arrowArrVal)"
          by
            (
              cs_concl
                cs_simp: cat_Kan_cs_simps 
                cs_intro: cat_cs_intros cat_FUNCT_cs_intros
            )
        from assms υτa(1,2) show 
          "υτa = ?L_10_5_χ'_arrowArrValntcf_arrow (L_10_5_τ 𝔗 𝔎 c υτa a)"
          by 
            (
              subst υτa(2), 
              cs_concl_step υτa_def[OF assms(3,4,5) υτa(2,1) assms(6)]  
            )
            (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)
      qed
    qed

    from assms show "?L_10_5_χ'_arrowArrDom  Vset β"
      by 
        (
          cs_concl 
            cs_simp: cat_Kan_cs_simps cat_FUNCT_components(1) cf_Cone_ObjMap_app
            cs_intro: cat_cs_intros cat_FUNCT_cs_intros c𝔎_𝔄.cat_Hom_in_Vset
        )
    with assms(2) have "?L_10_5_χ'_arrowArrDom  Vset β"
      by (meson Vset_in_mono Vset_trans)
    from assms show "?L_10_5_NObjMapa  Vset β"
      by
        (
          cs_concl 
            cs_simp: cat_cs_simps cat_Kan_cs_simps cat_FUNCT_cs_simps 
            cs_intro: cat_cs_intros FUNCT_𝔅.cat_Hom_in_Vset cat_FUNCT_cs_intros
        )
    show dom_χ'_arrow: "𝒟 (?L_10_5_χ'_arrowArrVal) =
      Hom ?c𝔎_𝔄 (cf_map (cf_const (c CF 𝔎) 𝔄 a)) (cf_map (𝔗 CF c OCF 𝔎))"
      unfolding L_10_5_χ'_arrow_components cf_Cone_ObjMap_app by simp
    show "?L_10_5_χ'_arrowArrDom = 
      Hom ?c𝔎_𝔄 (cf_map (cf_const (c CF 𝔎) 𝔄 a)) (cf_map (𝔗 CF c OCF 𝔎))"
      unfolding L_10_5_χ'_arrow_components cf_Cone_ObjMap_app by simp
    show "v11 (?L_10_5_χ'_arrowArrVal)"
    proof(rule vsv.vsv_valeq_v11I, unfold dom_χ'_arrow in_Hom_iff)
      fix τ' τ'' assume prems: 
        "τ' : cf_map (cf_const (c CF 𝔎) 𝔄 a) ?c𝔎_𝔄cf_map (𝔗 CF c OCF 𝔎)"
        "τ'' : cf_map (cf_const (c CF 𝔎) 𝔄 a) ?c𝔎_𝔄cf_map (𝔗 CF c OCF 𝔎)"
        "?L_10_5_χ'_arrowArrValτ' = ?L_10_5_χ'_arrowArrValτ''"
      note τ' = cat_FUNCT_is_arrD[OF prems(1), unfolded cat_cs_simps]
        and τ'' = cat_FUNCT_is_arrD[OF prems(2), unfolded cat_cs_simps]
      interpret τ': is_cat_cone 
        α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ'
        by (rule is_cat_coneI[OF τ'(1) assms(6)])
      interpret τ'': is_cat_cone 
        α a c CF 𝔎 𝔄 𝔗 CF c OCF 𝔎 ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ''
        by (rule is_cat_coneI[OF τ''(1) assms(6)])
      have τ'τ': "ntcf_arrow (ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ') = τ'"
        by (subst (2) τ'(2)) (cs_concl cs_shallow cs_simp: cat_FUNCT_cs_simps)
      have τ''τ'': "ntcf_arrow (ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ'') = τ''"
        by (subst (2) τ''(2)) (cs_concl cs_shallow cs_simp: cat_FUNCT_cs_simps)
      from prems(3) τ'(1) τ''(1) assms have
        "L_10_5_υ α 𝔗 𝔎 c τ' a = L_10_5_υ α 𝔗 𝔎 c τ'' a"
        by (subst (asm) τ'(2), use nothing in subst (asm) τ''(2)) (*slow*)
          (
            cs_prems cs_shallow
              cs_simp: τ'τ' τ''τ'' cat_cs_simps cat_FUNCT_cs_simps 
              cs_intro: cat_lim_cs_intros cat_Kan_cs_intros cat_cs_intros
          )
      from this have υτ'a_υτ''a: 
        "L_10_5_υ α 𝔗 𝔎 c τ' aNTMapbArrValf =
          L_10_5_υ α 𝔗 𝔎 c τ'' aNTMapbArrValf" 
        if "b  𝔅Obj" and "f : c (𝔎ObjMapb)" for b f
        by simp
      have [cat_cs_simps]: "τ'NTMap0, b, f = τ''NTMap0, b, f"
        if "b  𝔅Obj" and "f : c (𝔎ObjMapb)" for b f
        using υτ'a_υτ''a[OF that] that
        by
          (
            cs_prems cs_shallow
              cs_simp: cat_Kan_cs_simps L_10_5_υ_arrow_ArrVal_app
              cs_intro: cat_cs_intros 
          )
      have
        "ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ' =
          ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ''"
      proof(rule ntcf_eqI)
        show "ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ' :
          cf_const (c CF 𝔎) 𝔄 a CF 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
          by (rule τ'.is_ntcf_axioms)
        then have dom_lhs: 
          "𝒟 (ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ'NTMap) = c CF 𝔎Obj"
          by (cs_concl cs_shallow cs_simp: cat_cs_simps)
        show "ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ'' :
          cf_const (c CF 𝔎) 𝔄 a CF 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
          by (rule τ''.is_ntcf_axioms)
        then have dom_rhs: 
          "𝒟 (ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ''NTMap) = c CF 𝔎Obj"
          by (cs_concl cs_shallow cs_simp: cat_cs_simps)
        show
          "ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ'NTMap =
            ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ''NTMap"
        proof(rule vsv_eqI, unfold dom_lhs dom_rhs)
          fix A assume "A  c CF 𝔎Obj"
          with assms(5) obtain b f 
            where A_def: "A = [0, b, f]"
              and b: "b  𝔅Obj"
              and f: "f : c 𝔎ObjMapb"
            by auto
          from b f show 
            "ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ'NTMapA =
              ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 τ''NTMapA"
            unfolding A_def 
            by (cs_concl cs_simp: cat_cs_simps cat_map_extra_cs_simps)
        qed (cs_concl cs_shallow cs_intro: V_cs_intros)+
      qed simp_all
      then show "τ' = τ''"
      proof(rule inj_onD[OF bij_betw_imp_inj_on[OF bij_betw_ntcf_of_ntcf_arrow]])
        show "τ'  ntcf_arrows α (c CF 𝔎) 𝔄"
          by (subst τ'(2))
            (
              cs_concl cs_intro:
                cat_lim_cs_intros cat_cs_intros cat_FUNCT_cs_intros
            )
        show "τ''  ntcf_arrows α (c CF 𝔎) 𝔄"
          by (subst τ''(2))
            (
              cs_concl cs_intro: 
                cat_lim_cs_intros cat_cs_intros cat_FUNCT_cs_intros
            )
      qed
    qed (cs_concl cs_shallow cs_intro: cat_Kan_cs_intros)

  qed auto

qed

lemma L_10_5_χ'_arrow_is_iso_arr'[cat_Kan_cs_intros]: 
  assumes "𝒵 β"
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "a  𝔄Obj" 
    and "A = cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa"
    and "B = L_10_5_N α β 𝔗 𝔎 cObjMapa"
    and "ℭ' = cat_Set β"
  shows "L_10_5_χ'_arrow α β 𝔗 𝔎 c a : A isoℭ'B"
  using assms(1-6)
  unfolding assms(7-9) 
  by (rule L_10_5_χ'_arrow_is_iso_arr)

lemma L_10_5_χ'_arrow_is_arr: 
  assumes "𝒵 β"
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "a  𝔄Obj"
  shows "L_10_5_χ'_arrow α β 𝔗 𝔎 c a :
      cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa cat_Set βL_10_5_N α β 𝔗 𝔎 cObjMapa"
    by 
      (
        rule cat_Set_is_iso_arrD(1)[
          OF L_10_5_χ'_arrow_is_iso_arr[OF assms(1-6)]
          ]
      )

lemma L_10_5_χ'_arrow_is_arr'[cat_Kan_cs_intros]: 
  assumes "𝒵 β"
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
    and "a  𝔄Obj" 
    and "A = cf_Cone α β (𝔗 CF c OCF 𝔎)ObjMapa"
    and "B = L_10_5_N α β 𝔗 𝔎 cObjMapa"
    and "ℭ' = cat_Set β"
  shows "L_10_5_χ'_arrow α β 𝔗 𝔎 c a : A ℭ'B"
  using assms(1-6) unfolding assms(7-9) by (rule L_10_5_χ'_arrow_is_arr)



subsection‹Lemma X.5: L_10_5_χ›\label{sec:lem_X_5_end}›


subsubsection‹Definition and elementary properties›

definition L_10_5_χ :: "V  V  V  V  V  V"
  where "L_10_5_χ α β 𝔗 𝔎 c =
    [
      (λa𝔗HomCodObj. L_10_5_χ'_arrow α β 𝔗 𝔎 c a),
      cf_Cone α β (𝔗 CF c OCF 𝔎),
      L_10_5_N α β 𝔗 𝔎 c,
      op_cat (𝔗HomCod),
      cat_Set β
    ]"


text‹Components.›

lemma L_10_5_χ_components: 
  shows "L_10_5_χ α β 𝔗 𝔎 cNTMap = 
    (λa𝔗HomCodObj. L_10_5_χ'_arrow α β 𝔗 𝔎 c a)"
    and [cat_Kan_cs_simps]: 
      "L_10_5_χ α β 𝔗 𝔎 cNTDom = cf_Cone α β (𝔗 CF c OCF 𝔎)"
    and [cat_Kan_cs_simps]: 
      "L_10_5_χ α β 𝔗 𝔎 cNTCod = L_10_5_N α β 𝔗 𝔎 c"
    and "L_10_5_χ α β 𝔗 𝔎 cNTDGDom = op_cat (𝔗HomCod)"
    and [cat_Kan_cs_simps]: "L_10_5_χ α β 𝔗 𝔎 cNTDGCod = cat_Set β"
  unfolding L_10_5_χ_def nt_field_simps by (simp_all add: nat_omega_simps)

context
  fixes α 𝔄 𝔅 𝔗
  assumes 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

interpretation is_functor α 𝔅 𝔄 𝔗 by (rule 𝔗)

lemmas L_10_5_χ_components' =
  L_10_5_χ_components[where 𝔗=𝔗, unfolded cat_cs_simps]

lemmas [cat_Kan_cs_simps] = L_10_5_χ_components'(4)

end


subsubsection‹Natural transformation map›

mk_VLambda L_10_5_χ_components(1)
  |vsv L_10_5_χ_NTMap_vsv[cat_Kan_cs_intros]|

context
  fixes α 𝔄 𝔅 𝔗
  assumes 𝔗: "𝔗 : 𝔅 ↦↦Cα𝔄"
begin

interpretation is_functor α 𝔅 𝔄 𝔗 by (rule 𝔗)

mk_VLambda L_10_5_χ_components(1)[where 𝔗=𝔗, unfolded cat_cs_simps]
  |vdomain L_10_5_χ_NTMap_vdomain[cat_Kan_cs_simps]|
  |app L_10_5_χ_NTMap_app[cat_Kan_cs_simps]|

end


subsubsectionL_10_5_χ› is a natural isomorphism›

lemma L_10_5_χ_is_iso_ntcf:
  ―‹See lemma on page 245 in \cite{mac_lane_categories_2010}.›
  assumes "𝒵 β"
    and "α  β"
    and "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
  shows "L_10_5_χ α β 𝔗 𝔎 c :
    cf_Cone α β (𝔗 CF c OCF 𝔎) CF.iso L_10_5_N α β 𝔗 𝔎 c :
    op_cat 𝔄 ↦↦Cβcat_Set β"
    (is ?L_10_5_χ : ?cf_Cone CF.iso ?L_10_5_N : op_cat 𝔄 ↦↦Cβcat_Set β)
proof-

  let ?FUNCT = λ𝔄. cat_FUNCT α 𝔄 (cat_Set α)
  let ?c𝔎_𝔄 = cat_FUNCT α (c CF 𝔎) 𝔄
  let ?ntcf_c𝔎_𝔄 = ntcf_const (c CF 𝔎) 𝔄
  let ?𝔗_c𝔎 = 𝔗 CF c OCF 𝔎
  let ?H_ℭ = λc. HomO.Cα(c,-)
  let ?H_𝔄 = λa. HomO.Cα𝔄(a,-)
  let ?L_10_5_χ'_arrow = L_10_5_χ'_arrow α β 𝔗 𝔎 c
  let ?cf_c𝔎_𝔄 = cf_const (c CF 𝔎) 𝔄
  let ?L_10_5_υ = L_10_5_υ α 𝔗 𝔎 c
  let ?L_10_5_υ_arrow = L_10_5_υ_arrow 𝔗 𝔎 c

  interpret β: 𝒵 β by (rule assms(1))

  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(3))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(4))

  from 𝔎.vempty_is_zet assms(5) interpret c𝔎: category α c CF 𝔎
    by (cs_concl cs_shallow cs_intro: cat_comma_cs_intros)
  from assms(1,2,5) interpret c𝔎_𝔄: category β ?c𝔎_𝔄
    by
      (
        cs_concl cs_intro:  
          cat_small_cs_intros cat_cs_intros cat_FUNCT_cs_intros
      )
  interpret β_c𝔎_𝔄: category β ?c𝔎_𝔄
    by (cs_concl cs_shallow cs_intro: cat_cs_intros assms(2))+
  from assms(2,5) interpret Δ: is_functor β 𝔄 ?c𝔎_𝔄 ΔCF α (c CF 𝔎) 𝔄
    by (cs_concl cs_intro: cat_cs_intros cat_op_intros)+
  from 𝔎.vempty_is_zet assms(5) interpret Πc: 
    is_functor α c CF 𝔎 𝔅 c OCF 𝔎
    by
      (
        cs_concl cs_shallow
          cs_simp: cat_comma_cs_simps 
          cs_intro: cat_cs_intros cat_comma_cs_intros
      )
  interpret βΠc: is_tiny_functor β c CF 𝔎 𝔅 c OCF 𝔎
    by (rule Πc.cf_is_tiny_functor_if_ge_Limit[OF assms(1,2)])
  
  interpret E: is_functor β ?FUNCT  ×C  cat_Set β cf_eval α β 
    by (rule 𝔎.HomCod.cat_cf_eval_is_functor[OF assms(1,2)])

  from assms(2) interpret FUNCT_𝔄: tiny_category β ?FUNCT 𝔄
    by (cs_concl cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  from assms(2) interpret FUNCT_𝔅: tiny_category β ?FUNCT 𝔅
    by (cs_concl cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  from assms(2) interpret FUNCT_ℭ: tiny_category β ?FUNCT 
    by (cs_concl cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  
  interpret β𝔄: tiny_category β 𝔄
    by (rule category.cat_tiny_category_if_ge_Limit)
      (use assms(2) in cs_concl cs_intro: cat_cs_intros)+
  interpret β𝔅: tiny_category β 𝔅
    by (rule category.cat_tiny_category_if_ge_Limit)
      (use assms(2) in cs_concl cs_intro: cat_cs_intros)+
  interpret βℭ: tiny_category β 
    by (rule category.cat_tiny_category_if_ge_Limit)
      (use assms(2) in cs_concl cs_intro: cat_cs_intros)+

  interpret β𝔎: is_tiny_functor β 𝔅  𝔎
    by (rule is_functor.cf_is_tiny_functor_if_ge_Limit)
      (use assms(2) in cs_concl cs_intro: cat_cs_intros)+
  interpret β𝔗: is_tiny_functor β 𝔅 𝔄 𝔗
    by (rule is_functor.cf_is_tiny_functor_if_ge_Limit)
      (use assms(2) in cs_concl cs_intro: cat_cs_intros)+

  interpret cat_Set_αβ: subcategory β cat_Set α cat_Set β
    by (rule 𝔎.subcategory_cat_Set_cat_Set[OF assms(1,2)])
  
  show ?thesis
  proof(intro is_iso_ntcfI is_ntcfI', unfold cat_op_simps)

    show "vfsequence (?L_10_5_χ)" unfolding L_10_5_χ_def by auto
    show "vcard (?L_10_5_χ) = 5" 
      unfolding L_10_5_χ_def by (simp add: nat_omega_simps)
    from assms(2) show "?cf_Cone : op_cat 𝔄 ↦↦Cβcat_Set β" 
      by (intro is_functor.tm_cf_cf_Cone_is_functor_if_ge_Limit)
        (cs_concl cs_intro: cat_cs_intros)+

    from assms show "?L_10_5_N : op_cat 𝔄 ↦↦Cβcat_Set β" 
      by (cs_concl cs_shallow cs_intro: cat_Kan_cs_intros)
    show "?L_10_5_χNTMapa : 
      ?cf_ConeObjMapa isocat_Set β?L_10_5_NObjMapa"
      if "a  𝔄Obj" for a 
      using assms(2,3,4,5) that
      by
        (
          cs_concl 
            cs_simp: L_10_5_χ_NTMap_app 
            cs_intro: cat_cs_intros L_10_5_χ'_arrow_is_iso_arr
         )
    from cat_Set_is_iso_arrD[OF this] show 
      "?L_10_5_χNTMapa : ?cf_ConeObjMapa cat_Set β?L_10_5_NObjMapa"
      if "a  𝔄Obj" for a
      using that by auto

    have [cat_cs_simps]:
      "?L_10_5_χ'_arrow b Acat_Set βcf_hom ?c𝔎_𝔄 [ntcf_arrow (?ntcf_c𝔎_𝔄 f), ntcf_arrow (ntcf_id ?𝔗_c𝔎)] =
        cf_hom (?FUNCT 𝔅)
          [
            ntcf_arrow (ntcf_id (?H_ℭ c CF 𝔎)),
            ntcf_arrow (HomA.Cα𝔄(f,-) NTCF-CF 𝔗)
          ] Acat_Set β?L_10_5_χ'_arrow a"
      (
        is 
          "?L_10_5_χ'_arrow b Acat_Set β?cf_hom_lhs =
            ?cf_hom_rhs Acat_Set β?L_10_5_χ'_arrow a"
      )
      if "f : b 𝔄a" for a b f
    proof-
      let ?H_f = HomA.Cα𝔄(f,-)
      from that assms c𝔎_𝔄.category_axioms c𝔎_𝔄.category_axioms have lhs:
        "?L_10_5_χ'_arrow b Acat_Set β?cf_hom_lhs :
          Hom ?c𝔎_𝔄 (cf_map (?cf_c𝔎_𝔄 a)) (cf_map ?𝔗_c𝔎) cat_Set β?L_10_5_NObjMapb"
        by (*slow*)
          (
            cs_concl 
              cs_simp:
                cat_Kan_cs_simps
                cat_cs_simps
                cat_FUNCT_cs_simps
                cat_FUNCT_components(1)
                cat_op_simps
              cs_intro:
                cat_Kan_cs_intros
                cat_FUNCT_cs_intros
                cat_cs_intros
                cat_prod_cs_intros
                cat_op_intros
          )
      then have dom_lhs:
        "𝒟 ((?L_10_5_χ'_arrow b Acat_Set β?cf_hom_lhs)ArrVal) =
          Hom ?c𝔎_𝔄 (cf_map (?cf_c𝔎_𝔄 a)) (cf_map ?𝔗_c𝔎)"
        by (cs_concl cs_shallow cs_simp: cat_cs_simps)
      from that assms c𝔎_𝔄.category_axioms c𝔎_𝔄.category_axioms have rhs:
        "?cf_hom_rhs Acat_Set β?L_10_5_χ'_arrow a :
          Hom ?c𝔎_𝔄 (cf_map (?cf_c𝔎_𝔄 a)) (cf_map ?𝔗_c𝔎) cat_Set β?L_10_5_NObjMapb"
        by (*slow*)
          (
            cs_concl 
              cs_simp: 
                cat_Kan_cs_simps 
                cat_cs_simps
                cat_FUNCT_components(1)
                cat_op_simps
              cs_intro:
                cat_Kan_cs_intros
                cat_cs_intros
                cat_prod_cs_intros
                cat_FUNCT_cs_intros
                cat_op_intros
          )
      then have dom_rhs:
        "𝒟 ((?cf_hom_rhs Acat_Set β?L_10_5_χ'_arrow a)ArrVal) =
          Hom ?c𝔎_𝔄 (cf_map (?cf_c𝔎_𝔄 a)) (cf_map ?𝔗_c𝔎)"
        by (cs_concl cs_shallow cs_simp: cat_cs_simps)

      show ?thesis
      proof(rule arr_Set_eqI)
        from lhs show arr_Set_lhs: 
          "arr_Set β (?L_10_5_χ'_arrow b Acat_Set β?cf_hom_lhs)"
          by (auto dest: cat_Set_is_arrD(1))
        from rhs show arr_Set_rhs:
          "arr_Set β (?cf_hom_rhs Acat_Set β?L_10_5_χ'_arrow a)"
          by (auto dest: cat_Set_is_arrD(1))
        show 
          "(?L_10_5_χ'_arrow b Acat_Set β?cf_hom_lhs)ArrVal =
            (?cf_hom_rhs Acat_Set β?L_10_5_χ'_arrow a)ArrVal"
        proof(rule vsv_eqI, unfold dom_lhs dom_rhs in_Hom_iff)
          fix F assume prems: "F : cf_map (?cf_c𝔎_𝔄 a) ?c𝔎_𝔄cf_map ?𝔗_c𝔎"
          let ?F = ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 F
          from that have [cat_cs_simps]:
            "cf_of_cf_map (c CF 𝔎) 𝔄 (cf_map (?cf_c𝔎_𝔄 a)) = ?cf_c𝔎_𝔄 a"
            "cf_of_cf_map (c CF 𝔎) 𝔄 (cf_map (?𝔗_c𝔎)) = ?𝔗_c𝔎"
            by (cs_concl cs_simp: cat_FUNCT_cs_simps cs_intro: cat_cs_intros)
          note F = cat_FUNCT_is_arrD[OF prems, unfolded cat_cs_simps]
          from that F(1) have F_const_is_cat_cone:
            "?F NTCF ?ntcf_c𝔎_𝔄 f : b <CF.cone ?𝔗_c𝔎 : c CF 𝔎 ↦↦Cα𝔄"
            by
              (
                cs_concl 
                  cs_simp: cat_cs_simps cs_intro: is_cat_coneI cat_cs_intros
              )
          have [cat_cs_simps]:
            "?L_10_5_υ (ntcf_arrow (?F NTCF ?ntcf_c𝔎_𝔄 f)) b =
              ?H_f NTCF-CF 𝔗 NTCF ?L_10_5_υ (ntcf_arrow ?F) a"
          proof(rule ntcf_eqI)
            from assms that F(1) show
              "?L_10_5_υ (ntcf_arrow (?F NTCF ?ntcf_c𝔎_𝔄 f)) b :
                ?H_ℭ c CF 𝔎 CF ?H_𝔄 b CF 𝔗 : 𝔅 ↦↦Cαcat_Set α"
              by
                (
                  cs_concl cs_intro:
                    cat_Kan_cs_intros cat_cs_intros is_cat_coneI
                )
            then have dom_υ: 
              "𝒟 (?L_10_5_υ (ntcf_arrow (?F NTCF ?ntcf_c𝔎_𝔄 f)) bNTMap) = 
                𝔅Obj"
              by (cs_concl cs_shallow cs_simp: cat_cs_simps)
            from assms that F(1) show 
              "?H_f NTCF-CF 𝔗 NTCF ?L_10_5_υ (ntcf_arrow ?F) a :
                ?H_ℭ c CF 𝔎 CF ?H_𝔄 b CF 𝔗 : 𝔅 ↦↦Cαcat_Set α"
              by
                (
                  cs_concl cs_intro:
                    cat_Kan_cs_intros cat_cs_intros is_cat_coneI
                )
            then have dom_f𝔗υ:
              "𝒟 ((?H_f NTCF-CF 𝔗 NTCF ?L_10_5_υ (ntcf_arrow ?F) a)NTMap) =
                𝔅Obj"
              by (cs_concl cs_simp: cat_cs_simps)
            show 
              "?L_10_5_υ (ntcf_arrow (?F NTCF ?ntcf_c𝔎_𝔄 f)) bNTMap =
                (?H_f NTCF-CF 𝔗 NTCF ?L_10_5_υ (ntcf_arrow ?F) a)NTMap"
            proof(rule vsv_eqI, unfold dom_υ dom_f𝔗υ)
              fix b' assume prems': "b'  𝔅Obj"
              let ?Y = Yoneda_component (?H_𝔄 b) a f (𝔗ObjMapb')
              let ?𝔎b' = 𝔎ObjMapb'
              let ?𝔗b' = 𝔗ObjMapb'
              have [cat_cs_simps]:
                "?L_10_5_υ_arrow (ntcf_arrow (?F NTCF ?ntcf_c𝔎_𝔄 f)) b b' =
                  ?Y Acat_Set α?L_10_5_υ_arrow (ntcf_arrow ?F) a b'"
                (is ?υ_Ffbb' = ?Yυ)
              proof-
                from assms prems' F_const_is_cat_cone have υ_Ffbb': 
                  "?υ_Ffbb' : Hom  c ?𝔎b' cat_Set αHom 𝔄 b ?𝔗b'"
                  by 
                    (
                      cs_concl cs_shallow 
                        cs_intro: cat_cs_intros L_10_5_υ_arrow_is_arr
                    )
                then have dom_υ_Ffbb': "𝒟 (?υ_Ffbb'ArrVal) = Hom  c (?𝔎b')"
                  by (cs_concl cs_shallow cs_simp: cat_cs_simps)
                from assms that 𝔗.HomCod.category_axioms prems' F(1) have :
                  "?Yυ : Hom  c ?𝔎b' cat_Set αHom 𝔄 b ?𝔗b'"
                  by
                    (
                      cs_concl 
                        cs_simp: cat_Kan_cs_simps cat_cs_simps cat_op_simps
                        cs_intro: is_cat_coneI cat_Kan_cs_intros cat_cs_intros
                    )
                then have dom_Yυ: "𝒟 (?YυArrVal) = Hom  c (?𝔎b')"
                  by (cs_concl cs_shallow cs_simp: cat_cs_simps)
                show ?thesis
                proof(rule arr_Set_eqI)
                  from υ_Ffbb' show arr_Set_υ_Ffbb': "arr_Set α ?υ_Ffbb'"
                    by (auto dest: cat_Set_is_arrD(1))
                  from  show arr_Set_Yυ: "arr_Set α ?Yυ"
                    by (auto dest: cat_Set_is_arrD(1))
                  show "?υ_Ffbb'ArrVal = ?YυArrVal"
                  proof(rule vsv_eqI, unfold dom_υ_Ffbb' dom_Yυ in_Hom_iff)
                    fix g assume "g : c ?𝔎b'"
                    with 
                      assms(2-) 
                      𝔎.is_functor_axioms 
                      𝔗.is_functor_axioms 
                      𝔗.HomCod.category_axioms 
                      𝔎.HomCod.category_axioms 
                      that prems' F(1) 
                    show "?υ_Ffbb'ArrValg = ?YυArrValg"
                      by (*slow*)
                        (
                          cs_concl 
                            cs_simp:
                              cat_Kan_cs_simps
                              cat_cs_simps
                              L_10_5_υ_arrow_ArrVal_app
                              cat_comma_cs_simps
                              cat_op_simps
                            cs_intro: 
                              cat_Kan_cs_intros 
                              is_cat_coneI 
                              cat_cs_intros 
                              cat_comma_cs_intros
                              cat_op_intros 
                            cs_simp: cat_FUNCT_cs_simps
                        )
                  qed (use arr_Set_υ_Ffbb' arr_Set_Yυ in auto)
                qed 
                  (
                    use υ_Ffbb'  in
                      cs_concl cs_shallow cs_simp: cat_cs_simps
                  )+
              qed

              from assms prems' that F(1) show
                "?L_10_5_υ (ntcf_arrow (?F NTCF ?ntcf_c𝔎_𝔄 f)) bNTMapb' =
                  (?H_f NTCF-CF 𝔗 NTCF ?L_10_5_υ (ntcf_arrow ?F) a)NTMapb'"
                by
                  (
                    cs_concl 
                      cs_simp: cat_Kan_cs_simps cat_cs_simps
                      cs_intro: is_cat_coneI cat_Kan_cs_intros cat_cs_intros
                  )

            qed (cs_concl cs_intro: cat_Kan_cs_intros cat_cs_intros)+

          qed simp_all

          from that F(1) interpret F: is_cat_cone α a c CF 𝔎 𝔄 ?𝔗_c𝔎 ?F
            by (cs_concl cs_shallow cs_intro: is_cat_coneI cat_cs_intros)
          from
            assms(2-) prems F(1) that
            𝔗.HomCod.cat_ntcf_Hom_snd_is_ntcf[OF that] (*speedup*)
            c𝔎_𝔄.category_axioms (*speedup*)
          show 
            "(?L_10_5_χ'_arrow b Acat_Set β?cf_hom_lhs)ArrValF =
              (?cf_hom_rhs Acat_Set β?L_10_5_χ'_arrow a)ArrValF"
            by (subst (1 2) F(2)) (*exceptionally slow*)
              (
                cs_concl
                  cs_simp: 
                    cat_cs_simps 
                    cat_Kan_cs_simps
                    cat_FUNCT_cs_simps 
                    cat_FUNCT_components(1) 
                    cat_op_simps 
                  cs_intro: 
                    is_cat_coneI 
                    cat_Kan_cs_intros
                    cat_cs_intros 
                    cat_prod_cs_intros 
                    cat_FUNCT_cs_intros 
                    cat_op_intros
              )
        qed (use arr_Set_lhs arr_Set_rhs in auto)

      qed (use lhs rhs in cs_concl cs_shallow cs_simp: cat_cs_simps)+

    qed

    show 
      "?L_10_5_χNTMapb Acat_Set β?cf_ConeArrMapf =
        ?L_10_5_NArrMapf Acat_Set β?L_10_5_χNTMapa"
      if "f : b 𝔄a" for a b f
      using that assms
      by
        (
          cs_concl 
            cs_simp:
              cat_cs_simps
              cat_Kan_cs_simps
              cat_FUNCT_components(1)
              cat_FUNCT_cs_simps
              cat_op_simps
            cs_intro: 
              cat_Kan_cs_intros
              cat_cs_intros
              cat_FUNCT_cs_intros
              cat_op_intros
        )

  qed 
    (
      cs_concl 
        cs_simp: cat_Kan_cs_simps cs_intro: cat_cs_intros cat_Kan_cs_intros
    )+

qed



subsection‹
The existence of a canonical limit or a canonical colimit for the
pointwise Kan extensions
›

lemma (in is_cat_pw_rKe) cat_pw_rKe_ex_cat_limit:
  ―‹Based on the elements of Chapter X-5 in \cite{mac_lane_categories_2010}.›
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
  obtains UA 
    where "UA : 𝔊ObjMapc <CF.lim 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
proof-

  define β where "β = α + ω"
  have β: "𝒵 β" and αβ: "α  β" 
    by (simp_all add: β_def AG.𝒵_Limit_αω AG.𝒵_ω_αω 𝒵_def AG.𝒵_α_αω)
  then interpret β: 𝒵 β by simp 

  let ?FUNCT = λ𝔄. cat_FUNCT α 𝔄 (cat_Set α)
  let ?H_A = λf. HomA.Cα𝔄(f,-)
  let ?H_A𝔊 = λf. ?H_A f NTCF-CF 𝔊
  let ?H_𝔄 = λa. HomO.Cα𝔄(a,-)
  let ?H_𝔄𝔗 = λa. ?H_𝔄 a CF 𝔗
  let ?H_𝔄𝔊 = λa. ?H_𝔄 a CF 𝔊
  let ?H_ℭ = λc. HomO.Cα(c,-)
  let ?H_ℭ𝔎 = λc. ?H_ℭ c CF 𝔎
  let ?H_𝔄ε = λb. ?H_𝔄 b CF-NTCF ε
  let ?SET_𝔎 = exp_cat_cf α (cat_Set α) 𝔎
  let ?H_FUNCT = λ 𝔉. HomO.Cβ?FUNCT (-,cf_map 𝔉)
  let ?ua_NTDGDom = op_cat (?FUNCT )
  let ?ua_NTDom = λa. ?H_FUNCT  (?H_𝔄𝔊 a)
  let ?ua_NTCod = λa. ?H_FUNCT 𝔅 (?H_𝔄𝔗 a) CF op_cf ?SET_𝔎
  let ?c𝔎_𝔄 = cat_FUNCT α (c CF 𝔎) 𝔄
  let ?ua = 
    λa. ntcf_ua_fo
        β
        ?SET_𝔎
        (cf_map (?H_𝔄𝔗 a))
        (cf_map (?H_𝔄𝔊 a))
        (ntcf_arrow (?H_𝔄ε a))
  let ?cf_nt = cf_nt α β (cf_id )
  let ?cf_eval = cf_eval α β 
  let ?𝔗_c𝔎 = 𝔗 CF c OCF 𝔎
  let ?cf_c𝔎_𝔄 = cf_const (c CF 𝔎) 𝔄
  let ?𝔊c = 𝔊ObjMapc
  let  = ΔCF α (c CF 𝔎) 𝔄
  let ?ntcf_ua_fo = 
    λa. ntcf_ua_fo
        β 
        ?SET_𝔎 
        (cf_map (?H_𝔄𝔗 a)) 
        (cf_map (?H_𝔄𝔊 a)) 
        (ntcf_arrow (?H_𝔄ε a))
  let ?umap_fo =
    λb. umap_fo
        ?SET_𝔎
        (cf_map (?H_𝔄𝔗 b))
        (cf_map (?H_𝔄𝔊 b))
        (ntcf_arrow (?H_𝔄ε b))
        (cf_map (?H_ℭ c))

  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))

  from AG.vempty_is_zet assms(3) interpret c𝔎: category α c CF 𝔎
    by (cs_concl cs_shallow cs_intro: cat_comma_cs_intros)
  from αβ assms(3) interpret c𝔎_𝔄: category β ?c𝔎_𝔄
    by
      (
        cs_concl cs_intro:
          cat_small_cs_intros cat_cs_intros cat_FUNCT_cs_intros
      )
  from αβ assms(3) interpret Δ: is_functor β 𝔄 ?c𝔎_𝔄 
    by (cs_concl cs_shallow cs_intro: cat_cs_intros cat_op_intros)+
  from AG.vempty_is_zet assms(3) interpret Πc: 
    is_functor α c CF 𝔎 𝔅 c OCF 𝔎
    by
      (
        cs_concl cs_shallow
          cs_simp: cat_comma_cs_simps 
          cs_intro: cat_cs_intros cat_comma_cs_intros
      )

  interpret βΠc: is_tiny_functor β c CF 𝔎 𝔅 c OCF 𝔎
    by (rule Πc.cf_is_tiny_functor_if_ge_Limit[OF β αβ])
  
  interpret E: is_functor β ?FUNCT  ×C  cat_Set β ?cf_eval
    by (rule AG.HomCod.cat_cf_eval_is_functor[OF β αβ])

  from αβ interpret FUNCT_𝔄: tiny_category β ?FUNCT 𝔄
    by (cs_concl cs_shallow cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  from αβ interpret FUNCT_𝔅: tiny_category β ?FUNCT 𝔅
    by (cs_concl cs_shallow cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  from αβ interpret FUNCT_ℭ: tiny_category β ?FUNCT 
    by (cs_concl cs_shallow cs_intro: cat_cs_intros cat_FUNCT_cs_intros)
  
  interpret β𝔄: tiny_category β 𝔄
    by (rule category.cat_tiny_category_if_ge_Limit)
      (use αβ in cs_concl cs_intro: cat_cs_intros)+
  interpret β𝔅: tiny_category β 𝔅
    by (rule category.cat_tiny_category_if_ge_Limit)
      (use αβ in cs_concl cs_intro: cat_cs_intros)+
  interpret βℭ: tiny_category β 
    by (rule category.cat_tiny_category_if_ge_Limit)
      (use αβ in cs_concl cs_intro: cat_cs_intros)+

  interpret β𝔎: is_tiny_functor β 𝔅  𝔎
    by (rule is_functor.cf_is_tiny_functor_if_ge_Limit)
      (use αβ in cs_concl cs_shallow cs_intro: cat_cs_intros)+
  interpret β𝔊: is_tiny_functor β  𝔄 𝔊
    by (rule is_functor.cf_is_tiny_functor_if_ge_Limit)
      (use αβ in cs_concl cs_shallow cs_intro: cat_cs_intros)+
  interpret β𝔗: is_tiny_functor β 𝔅 𝔄 𝔗
    by (rule is_functor.cf_is_tiny_functor_if_ge_Limit)
      (use αβ in cs_concl cs_shallow cs_intro: cat_cs_intros)+

  interpret cat_Set_αβ: subcategory β cat_Set α cat_Set β
    by (rule AG.subcategory_cat_Set_cat_Set[OF β αβ])

  from assms(3) αβ interpret Hom_c: is_functor α  cat_Set α ?H_ℭ c 
    by (cs_concl cs_intro: cat_cs_intros)

  (** E' **)

  define E' :: V where "E' =
    [
      (λa𝔄Obj. ?cf_evalObjMapcf_map (?H_𝔄𝔊 a), c),
      (λf𝔄Arr. ?cf_evalArrMapntcf_arrow (?H_A𝔊 f), CIdc),
      op_cat 𝔄,
      cat_Set β
    ] "

  have E'_components:
    "E'ObjMap = (λa𝔄Obj. ?cf_evalObjMapcf_map (?H_𝔄𝔊 a), c)"
    "E'ArrMap =
      (λf𝔄Arr. ?cf_evalArrMapntcf_arrow (?H_A𝔊 f), CIdc)"
    "E'HomDom = op_cat 𝔄"
    "E'HomCod = cat_Set β"
    unfolding E'_def dghm_field_simps by (simp_all add: nat_omega_simps)

  note [cat_cs_simps] = E'_components(3,4)
  
  have E'_ObjMap_app[cat_cs_simps]: 
    "E'ObjMapa = ?cf_evalObjMapcf_map (?H_𝔄𝔊 a), c"
    if "a  𝔄Obj" for a
    using that unfolding E'_components by simp
  have E'_ArrMap_app[cat_cs_simps]: 
    "E'ArrMapf = ?cf_evalArrMapntcf_arrow (?H_A𝔊 f), CIdc"
    if "f  𝔄Arr" for f
    using that unfolding E'_components by simp

  have E': "E' : op_cat 𝔄 ↦↦Cβcat_Set β"
  proof(intro is_functorI')

    show "vfsequence E'" unfolding E'_def by auto
    show "vcard E' = 4" unfolding E'_def by (simp add: nat_omega_simps)
    show "vsv (E'ObjMap)" unfolding E'_components by simp
    show "vsv (E'ArrMap)" unfolding E'_components by simp
    show "𝒟 (E'ObjMap) = op_cat 𝔄Obj"
      unfolding E'_components by (simp add: cat_op_simps)
    show " (E'ObjMap)  cat_Set βObj"
      unfolding E'_components
    proof(rule vrange_VLambda_vsubset)
      fix a assume prems: "a  𝔄Obj"
      then have "?H_𝔄𝔊 a :  ↦↦Cαcat_Set α"
        by (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros)
      with assms(3) prems show 
        "?cf_evalObjMapcf_map (?H_𝔄𝔊 a), c  cat_Set βObj"
        by 
          (
            cs_concl 
              cs_simp: cat_cs_simps cat_Set_components(1)
              cs_intro: cat_cs_intros cat_op_intros Ran.HomCod.cat_Hom_in_Vset
          )
    qed
    show "𝒟 (E'ArrMap) = op_cat 𝔄Arr"
      unfolding E'_components by (simp add: cat_op_simps)
    show "E'ArrMapf : E'ObjMapa cat_Set βE'ObjMapb"
      if "f : a op_cat 𝔄b" for a b f
    proof-
      from that[unfolded cat_op_simps] assms(3) show ?thesis
        by (intro cat_Set_αβ.subcat_is_arrD)
          (
            cs_concl 
              cs_simp:
                category.cf_eval_ObjMap_app
                category.cf_eval_ArrMap_app
                E'_ObjMap_app
                E'_ArrMap_app
              cs_intro: cat_cs_intros
          )
    qed
    then have [cat_cs_intros]: "E'ArrMapf : A cat_Set βB"
      if "A = E'ObjMapa" and "B = E'ObjMapb" and "f : b 𝔄a" 
      for a b f A B
      using that by (simp add: cat_op_simps)
    show
      "E'ArrMapg Aop_cat 𝔄f = E'ArrMapg Acat_Set βE'ArrMapf"
      if "g : b op_cat 𝔄c" and "f : a op_cat 𝔄b" for b c g a f
    proof-
      note g = that(1)[unfolded cat_op_simps]
        and f = that(2)[unfolded cat_op_simps]
      from g f assms(3) αβ show ?thesis
        by 
          (
            cs_concl 
              cs_intro:
                cat_cs_intros
                cat_prod_cs_intros
                cat_FUNCT_cs_intros 
                cat_op_intros
              cs_simp:
                cat_cs_simps
                cat_FUNCT_cs_simps 
                cat_prod_cs_simps 
                cat_op_simps
                E.cf_ArrMap_Comp[symmetric]
          )+
    qed
    
    show "E'ArrMapop_cat 𝔄CIda = cat_Set βCIdE'ObjMapa"
      if "a  op_cat 𝔄Obj" for a
    proof(cs_concl_step cat_Set_αβ.subcat_CId[symmetric])
      from that[unfolded cat_op_simps] assms(3) show 
        "E'ObjMapa  cat_Set αObj"
        by 
          (
            cs_concl  
              cs_simp: cat_Set_components(1) cat_cs_simps cat_op_simps 
              cs_intro: cat_cs_intros
          )
      from that[unfolded cat_op_simps] assms(3) show 
        "E'ArrMapop_cat 𝔄CIda = cat_Set αCIdE'ObjMapa"
        by
          (
            cs_concl 
              cs_intro: cat_cs_intros
              cs_simp:
                cat_Set_components(1)
                cat_cs_simps
                cat_op_simps
                ntcf_id_cf_comp[symmetric]
          )
    qed
  qed (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)+
  then interpret E': is_functor β op_cat 𝔄 cat_Set β E' by simp


  (** N' **)

  define N' :: V where "N' =
    [
      (λa𝔄Obj. ?cf_ntObjMapcf_map (?H_𝔄𝔊 a), c),
      (λf𝔄Arr. ?cf_ntArrMapntcf_arrow (?H_A𝔊 f), CIdc),
      op_cat 𝔄,
      cat_Set β
    ] "

  have N'_components:
    "N'ObjMap = (λa𝔄Obj. ?cf_ntObjMapcf_map (?H_𝔄𝔊 a), c)"
    "N'ArrMap =
      (λf𝔄Arr. ?cf_ntArrMapntcf_arrow (?H_A𝔊 f), CIdc)"
    "N'HomDom = op_cat 𝔄"
    "N'HomCod = cat_Set β"
    unfolding N'_def dghm_field_simps by (simp_all add: nat_omega_simps)

  note [cat_cs_simps] = N'_components(3,4)
  
  have N'_ObjMap_app[cat_cs_simps]: 
    "N'ObjMapa = ?cf_ntObjMapcf_map (?H_𝔄𝔊 a), c"
    if "a  𝔄Obj" for a
    using that unfolding N'_components by simp
  have N'_ArrMap_app[cat_cs_simps]: 
    "N'ArrMapf = ?cf_ntArrMapntcf_arrow (?H_A𝔊 f), CIdc"
    if "f  𝔄Arr" for f
    using that unfolding N'_components by simp

  from αβ interpret cf_nt_ℭ: is_functor β ?FUNCT  ×C  cat_Set β ?cf_nt
    by (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros)
  
  have N': "N' : op_cat 𝔄 ↦↦Cβcat_Set β"
  proof(intro is_functorI')
    show "vfsequence N'" unfolding N'_def by simp
    show "vcard N' = 4" unfolding N'_def by (simp add: nat_omega_simps)
    show "vsv (N'ObjMap)" unfolding N'_components by simp
    show "vsv (N'ArrMap)" unfolding N'_components by simp
    show "𝒟 (N'ObjMap) = op_cat 𝔄Obj"
      unfolding N'_components by (simp add: cat_op_simps)
    show " (N'ObjMap)  cat_Set βObj"
      unfolding N'_components
    proof(rule vrange_VLambda_vsubset)
      fix a assume prems: "a  𝔄Obj"
      with assms(3) αβ show 
        "?cf_ntObjMapcf_map (?H_𝔄𝔊 a), c  cat_Set βObj"
        by 
          (
            cs_concl 
              cs_simp: cat_Set_components(1) cat_cs_simps cat_FUNCT_cs_simps  
              cs_intro: cat_cs_intros FUNCT_ℭ.cat_Hom_in_Vset cat_FUNCT_cs_intros
          )
    qed
    show "𝒟 (N'ArrMap) = op_cat 𝔄Arr" 
      unfolding N'_components by (simp add: cat_op_simps)
    show "N'ArrMapf : N'ObjMapa cat_Set βN'ObjMapb"
      if "f : a op_cat 𝔄b" for a b f
      using that[unfolded cat_op_simps] assms(3)
      by 
        (
          cs_concl 
            cs_simp: N'_ObjMap_app N'_ArrMap_app 
            cs_intro: cat_cs_intros cat_prod_cs_intros cat_FUNCT_cs_intros
        )
    show 
      "N'ArrMapg Aop_cat 𝔄f = N'ArrMapg Acat_Set βN'ArrMapf"
      if "g : b op_cat 𝔄c" and "f : a op_cat 𝔄b" for b c g a f
    proof-
      from that assms(3) αβ show ?thesis
        unfolding cat_op_simps
        by
          (
            cs_concl 
              cs_intro:
                cat_cs_intros
                cat_prod_cs_intros
                cat_FUNCT_cs_intros 
                cat_op_intros
              cs_simp:
                cat_cs_simps
                cat_FUNCT_cs_simps 
                cat_prod_cs_simps 
                cat_op_simps
                cf_nt_ℭ.cf_ArrMap_Comp[symmetric]
          )
    qed
    show "N'ArrMapop_cat 𝔄CIda = cat_Set βCIdN'ObjMapa"
      if "a  op_cat 𝔄Obj" for a
    proof-
      note [cat_cs_simps] = 
        ntcf_id_cf_comp[symmetric] 
        ntcf_arrow_id_ntcf_id[symmetric]
        cat_FUNCT_CId_app[symmetric] 
      from that[unfolded cat_op_simps] assms(3) αβ show ?thesis
        by (*very slow*)
          (
            cs_concl
              cs_intro:
                cat_cs_intros
                cat_FUNCT_cs_intros
                cat_prod_cs_intros
                cat_op_intros
              cs_simp: cat_FUNCT_cs_simps cat_cs_simps cat_op_simps 
          )+
    qed
  qed (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)+
  then interpret N': is_functor β op_cat 𝔄 cat_Set β N' by simp


  (** Y' **)
  
  define Y' :: V where "Y' =
    [
      (λa𝔄Obj. ntcf_Yoneda α β NTMapcf_map (?H_𝔄𝔊 a), c),
      N',
      E',
      op_cat 𝔄,
      cat_Set β
    ]"

  have Y'_components:
    "Y'NTMap = (λa𝔄Obj. ntcf_Yoneda α β NTMapcf_map (?H_𝔄𝔊 a), c)"
    "Y'NTDom = N'"
    "Y'NTCod = E'"
    "Y'NTDGDom = op_cat 𝔄"
    "Y'NTDGCod = cat_Set β"
    unfolding Y'_def nt_field_simps by (simp_all add: nat_omega_simps)

  note [cat_cs_simps] = Y'_components(2-5)

  have Y'_NTMap_app[cat_cs_simps]: 
    "Y'NTMapa = ntcf_Yoneda α β NTMapcf_map (?H_𝔄𝔊 a), c" 
    if "a  𝔄Obj" for a
    using that unfolding Y'_components by simp

  from β αβ interpret Y: 
    is_iso_ntcf β ?FUNCT  ×C  cat_Set β ?cf_nt ?cf_eval ntcf_Yoneda α β 
    by (rule AG.HomCod.cat_ntcf_Yoneda_is_ntcf)

  have Y': "Y' : N' CF.iso E' : op_cat 𝔄 ↦↦Cβcat_Set β"
  proof(intro is_iso_ntcfI is_ntcfI')

    show "vfsequence Y'" unfolding Y'_def by simp
    show "vcard Y' = 5"
      unfolding Y'_def by (simp add: nat_omega_simps)
    show "vsv (Y'NTMap)" unfolding Y'_components by auto
    show "𝒟 (Y'NTMap) = op_cat 𝔄Obj"
      unfolding Y'_components by (simp add: cat_op_simps)
    show Y'_NTMap_a: "Y'NTMapa : N'ObjMapa isocat_Set βE'ObjMapa"
      if "a  op_cat 𝔄Obj" for a
      using that[unfolded cat_op_simps] assms(3) αβ
      by (*slow*)
        (
          cs_concl 
            cs_simp: cat_cs_simps cat_FUNCT_cs_simps cat_op_simps 
            cs_intro: 
              cat_arrow_cs_intros 
              cat_cs_intros 
              cat_prod_cs_intros 
              cat_FUNCT_cs_intros
        )
    then show "Y'NTMapa : N'ObjMapa cat_Set βE'ObjMapa"
      if "a  op_cat 𝔄Obj" for a
      by (intro cat_Set_is_iso_arrD[OF Y'_NTMap_a[OF that]])
    show
      "Y'NTMapb Acat_Set βN'ArrMapf =
        E'ArrMapf Acat_Set βY'NTMapa"
      if "f : a op_cat 𝔄b" for a b f
    proof-
      note f = that[unfolded cat_op_simps]
      from f assms(3) show ?thesis
        by 
          (
            cs_concl   
              cs_simp: cat_cs_simps Y.ntcf_Comp_commute 
              cs_intro: cat_cs_intros cat_prod_cs_intros cat_FUNCT_cs_intros
          )+      
    qed
  qed (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)+

  have E'_def: "E' = HomO.Cβ𝔄(-,?𝔊c)"
  proof(rule cf_eqI)
    show "E' : op_cat 𝔄 ↦↦Cβcat_Set β"
      by (cs_concl cs_shallow cs_intro: cat_cs_intros)
    from assms(3) show
      "HomO.Cβ𝔄(-,?𝔊c) : op_cat 𝔄 ↦↦Cβcat_Set β"
      by (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)
    have dom_lhs: "𝒟 (E'ObjMap) = 𝔄Obj" unfolding E'_components by simp
    from assms(3) have dom_rhs: 
      "𝒟 (HomO.Cβ𝔄(-,?𝔊c)ObjMap) = 𝔄Obj"
      unfolding E'_components 
      by 
        (
          cs_concl cs_shallow 
            cs_simp: cat_cs_simps cat_op_simps cs_intro: cat_cs_intros
        )
    show "E'ObjMap = HomO.Cβ𝔄(-,?𝔊c)ObjMap"
    proof(rule vsv_eqI, unfold dom_lhs dom_rhs)
      fix a assume "a  𝔄Obj"
      with assms(3) show "E'ObjMapa = HomO.Cβ𝔄(-,?𝔊c)ObjMapa"
        by
          (
            cs_concl
              cs_simp: cat_op_simps cat_cs_simps
              cs_intro: cat_cs_intros cat_op_intros
          )
    qed (auto simp: E'_components cat_cs_intros assms(3))

    have dom_lhs: "𝒟 (E'ArrMap) = 𝔄Arr" unfolding E'_components by simp
    from assms(3) have dom_rhs: 
      "𝒟 (HomO.Cβ𝔄(-,?𝔊c)ArrMap) = 𝔄Arr"
      unfolding E'_components 
      by 
        (
          cs_concl cs_shallow 
            cs_simp: cat_cs_simps cat_op_simps cs_intro: cat_cs_intros
        )
    
    show "E'ArrMap = HomO.Cβ𝔄(-,?𝔊c)ArrMap"
    proof(rule vsv_eqI, unfold dom_lhs dom_rhs)

      fix f assume prems: "f  𝔄Arr"
      then obtain a b where f: "f : a 𝔄b" by auto
      have [cat_cs_simps]:
        "cf_eval_arrow  (ntcf_arrow (?H_A𝔊 f)) (CIdc) =
          cf_hom 𝔄 [f, 𝔄CId?𝔊c]"
        (is ?cf_eval_arrow = ?cf_hom_f𝔊c)
      proof-
        have cf_eval_arrow_f_CId_𝔊c:
          "?cf_eval_arrow :
            Hom 𝔄 b ?𝔊c cat_Set αHom 𝔄 a ?𝔊c"
        proof(rule cf_eval_arrow_is_arr')
          from f show "?H_A𝔊 f : ?H_𝔄𝔊 b CF ?H_𝔄𝔊 a :  ↦↦Cαcat_Set α"
            by (cs_concl cs_intro: cat_cs_intros)
        qed
          (
            use f assms(3) in
              cs_concl 
                  cs_simp: cat_cs_simps cs_intro: cat_cs_intros cat_op_intros
          )+
        from f assms(3) have dom_lhs:
          "𝒟 (?cf_eval_arrowArrVal) = Hom 𝔄 b ?𝔊c"
          by
            (
              cs_concl 
                cs_simp: cat_cs_simps cs_intro: cat_cs_intros cat_op_intros
            )
        from assms(3) f Ran.HomCod.category_axioms have cf_hom_f𝔊c:
          "?cf_hom_f𝔊c :
            Hom 𝔄 b ?𝔊c cat_Set αHom 𝔄 a ?𝔊c"
          by 
            (
              cs_concl cs_shallow cs_intro:
                cat_cs_intros cat_prod_cs_intros cat_op_intros
            )
        from f assms(3) have dom_rhs: 
          "𝒟 (?cf_hom_f𝔊cArrVal) = Hom 𝔄 b ?𝔊c"
          by
            (
              cs_concl cs_shallow
                cs_simp: cat_cs_simps cs_intro: cat_cs_intros cat_op_intros
            )

        show ?thesis
        proof(rule arr_Set_eqI)
          from cf_eval_arrow_f_CId_𝔊c show "arr_Set α ?cf_eval_arrow"
            by (auto dest: cat_Set_is_arrD(1))
          from cf_hom_f𝔊c show "arr_Set α ?cf_hom_f𝔊c"
            by (auto dest: cat_Set_is_arrD(1))
          show "?cf_eval_arrowArrVal = ?cf_hom_f𝔊cArrVal"
          proof(rule vsv_eqI, unfold dom_lhs dom_rhs, unfold in_Hom_iff)
            from f assms(3) show "vsv (?cf_eval_arrowArrVal)"
              by (cs_concl cs_intro: cat_cs_intros)
            from f assms(3) show "vsv (?cf_hom_f𝔊cArrVal)"
              by
                (
                  cs_concl cs_shallow
                    cs_simp: cat_cs_simps cat_op_simps 
                    cs_intro: cat_cs_intros cat_op_intros
                )            
            fix g assume "g : b 𝔄?𝔊c"
            with f assms(3) show 
              "?cf_eval_arrowArrValg = ?cf_hom_f𝔊cArrValg"
              by
                (
                  cs_concl 
                    cs_simp: cat_cs_simps cat_op_simps
                    cs_intro: cat_cs_intros cat_op_intros
                )
          qed simp

        qed
          (
            use cf_eval_arrow_f_CId_𝔊c cf_hom_f𝔊c in 
              cs_concl cs_simp: cat_cs_simps
          )+

      qed
      
      from f prems assms(3) show "E'ArrMapf = HomO.Cβ𝔄(-,?𝔊c)ArrMapf"
        by
          (
            cs_concl 
              cs_simp: cat_op_simps cat_cs_simps 
              cs_intro: cat_cs_intros cat_op_intros
          )

    qed (auto simp: E'_components cat_cs_intros assms(3))

  qed simp_all

  from Y' have inv_Y': "inv_ntcf Y' :
    HomO.Cβ𝔄(-,?𝔊c) CF.iso N' : op_cat 𝔄 ↦↦Cβcat_Set β"
    unfolding E'_def by (auto intro: iso_ntcf_is_iso_arr)

  interpret N'': is_functor β op_cat 𝔄 cat_Set β L_10_5_N α β 𝔗 𝔎 c
    by (rule L_10_5_N_is_functor[OF β αβ assms])


  (** ψ **)

  define ψ :: V
    where "ψ =
      [
        (λa𝔄Obj. ?ntcf_ua_fo aNTMapcf_map (?H_ℭ c)),
        N',
        L_10_5_N α β 𝔗 𝔎 c,
        op_cat 𝔄,
        cat_Set β
      ]"

  have ψ_components:
    "ψNTMap = (λa𝔄Obj. ?ntcf_ua_fo aNTMapcf_map (?H_ℭ c))"
    "ψNTDom = N'"
    "ψNTCod = L_10_5_N α β 𝔗 𝔎 c"
    "ψNTDGDom = op_cat 𝔄"
    "ψNTDGCod = cat_Set β"
    unfolding ψ_def nt_field_simps by (simp_all add: nat_omega_simps)

  note [cat_cs_simps] = Y'_components(2-5)

  have ψ_NTMap_app[cat_cs_simps]: 
    "ψNTMapa = ?ntcf_ua_fo aNTMapcf_map (?H_ℭ c)" 
    if "a  𝔄Obj" for a
    using that unfolding ψ_components by simp

  have ψ: "ψ : N' CF.iso L_10_5_N α β 𝔗 𝔎 c : op_cat 𝔄 ↦↦Cβcat_Set β"
  proof-

    show ?thesis
    proof(intro is_iso_ntcfI is_ntcfI')

      show "vfsequence ψ" unfolding ψ_def by auto
      show "vcard ψ = 5" unfolding ψ_def by (simp_all add: nat_omega_simps)
      show "N' : op_cat 𝔄 ↦↦Cβcat_Set β" by (rule N')
      show "L_10_5_N α β 𝔗 𝔎 c : op_cat 𝔄 ↦↦Cβcat_Set β"
        by (cs_concl cs_shallow cs_simp: cat_cs_simps cs_intro: cat_cs_intros)
      show "ψNTDom = N'" unfolding ψ_components by simp
      show "ψNTCod = L_10_5_N α β 𝔗 𝔎 c" unfolding ψ_components by simp
      show "ψNTDGDom = op_cat 𝔄" unfolding ψ_components by simp
      show "ψNTDGCod = cat_Set β" unfolding ψ_components by simp
      show "vsv (ψNTMap)" unfolding ψ_components by simp
      show "𝒟 (ψNTMap) = op_cat 𝔄Obj" 
        unfolding ψ_components by (simp add: cat_op_simps)

      show ψ_NTMap_is_iso_arr[unfolded cat_op_simps]:
        "ψNTMapa : N'ObjMapa isocat_Set βL_10_5_N α β 𝔗 𝔎 cObjMapa"
        if "a  op_cat 𝔄Obj" for a
      proof-
        note a = that[unfolded cat_op_simps]
        interpret ε: 
          is_cat_rKe_preserves α 𝔅  𝔄 cat_Set α 𝔎 𝔗 𝔊 ?H_𝔄 a ε
          by (rule cat_pw_rKe_preserved[OF a])
        interpret: 
          is_cat_rKe α 𝔅  cat_Set α 𝔎 ?H_𝔄𝔗 a ?H_𝔄𝔊 a ?H_𝔄ε a
          by (rule ε.cat_rKe_preserves)
        interpret is_iso_ntcf
          β
          op_cat (?FUNCT )
          cat_Set β
          ?H_FUNCT  (?H_𝔄𝔊 a)
          ?H_FUNCT 𝔅 (?H_𝔄𝔗 a) CF op_cf ?SET_𝔎
          ?ntcf_ua_fo a
          by (rule aε.cat_rKe_ntcf_ua_fo_is_iso_ntcf_if_ge_Limit[OF β αβ])
        have "cf_map (?H_ℭ c)  ?FUNCT Obj"
          by
            (
              cs_concl cs_shallow 
                cs_simp: cat_cs_simps cat_FUNCT_cs_simps 
                cs_intro: cat_cs_intros cat_FUNCT_cs_intros
            )
        from 
          iso_ntcf_is_iso_arr[unfolded cat_op_simps, OF this] 
          a assms αβ 
        show ?thesis
          by (*very slow*)
            (
              cs_prems  
                cs_simp: 
                  cat_cs_simps cat_Kan_cs_simps cat_FUNCT_cs_simps cat_op_simps 
                cs_intro: 
                  cat_small_cs_intros 
                  cat_Kan_cs_intros
                  cat_cs_intros
                  cat_FUNCT_cs_intros
                  cat_op_intros
            )
      qed
      show ψ_NTMap_is_arr[unfolded cat_op_simps]: 
        "ψNTMapa : N'ObjMapa cat_Set βL_10_5_N α β 𝔗 𝔎 cObjMapa"
        if "a  op_cat 𝔄Obj" for a
        by 
          (
            rule cat_Set_is_iso_arrD[
              OF ψ_NTMap_is_iso_arr[OF that[unfolded cat_op_simps]]
              ]
          )

      show 
        "ψNTMapb Acat_Set βN'ArrMapf =
          L_10_5_N α β 𝔗 𝔎 cArrMapf Acat_Set βψNTMapa"
        if "f : a op_cat 𝔄b" for a b f
      proof-

        note f = that[unfolded cat_op_simps]
        from f have a: "a  𝔄Obj" and b: "b  𝔄Obj" by auto

        interpret p_a_ε: 
          is_cat_rKe_preserves α 𝔅  𝔄 cat_Set α 𝔎 𝔗 𝔊 ?H_𝔄 a ε
          by (rule cat_pw_rKe_preserved[OF a])
        interpret a_ε: is_cat_rKe 
          α 𝔅  cat_Set α 𝔎 ?H_𝔄𝔗 a ?H_𝔄𝔊 a ?H_𝔄ε a
          by (rule p_a_ε.cat_rKe_preserves)
        interpret ntcf_ua_fo_a_ε: is_iso_ntcf
          β ?ua_NTDGDom cat_Set β ?ua_NTDom a ?ua_NTCod a ?ua a
          by (rule a_ε.cat_rKe_ntcf_ua_fo_is_iso_ntcf_if_ge_Limit[OF β αβ])

        interpret p_b_ε:
          is_cat_rKe_preserves α 𝔅  𝔄 cat_Set α 𝔎 𝔗 𝔊 ?H_𝔄 b ε
          by (rule cat_pw_rKe_preserved[OF b])
        interpret b_ε: is_cat_rKe 
          α 𝔅  cat_Set α 𝔎 ?H_𝔄𝔗 b ?H_𝔄𝔊 b ?H_𝔄ε b
          by (rule p_b_ε.cat_rKe_preserves)
        interpret ntcf_ua_fo_b_ε: is_iso_ntcf
          β ?ua_NTDGDom cat_Set β ?ua_NTDom b ?ua_NTCod b ?ua b
          by (rule b_ε.cat_rKe_ntcf_ua_fo_is_iso_ntcf_if_ge_Limit[OF β αβ])

        interpret 𝔎_SET: is_tiny_functor β ?FUNCT  ?FUNCT 𝔅 ?SET_𝔎
          by 
            (
              rule exp_cat_cf_is_tiny_functor[
                OF β αβ AG.category_cat_Set AG.is_functor_axioms
                ]
            )
        from f interpret Hom_f: 
          is_ntcf α 𝔄 cat_Set α ?H_𝔄 a ?H_𝔄 b ?H_A f
          by (cs_concl cs_intro: cat_cs_intros)

        let ?cf_hom_lhs =
          cf_hom
              (?FUNCT )
              [ntcf_arrow (ntcf_id (?H_ℭ c)), ntcf_arrow (?H_A𝔊 f)]
        let ?cf_hom_rhs = 
          cf_hom
              (?FUNCT 𝔅)
              [
                ntcf_arrow (ntcf_id (?H_ℭ c CF 𝔎)),
                ntcf_arrow (?H_A f NTCF-CF 𝔗)
              ]
        let ?dom =
          Hom (?FUNCT ) (cf_map (?H_ℭ c)) (cf_map (?H_𝔄𝔊 a))
        let ?cod = Hom (?FUNCT 𝔅) (cf_map (?H_ℭ𝔎 c)) (cf_map (?H_𝔄𝔗 b))
        let ?cf_hom_lhs_umap_fo_inter =
          Hom (?FUNCT ) (cf_map (?H_ℭ c)) (cf_map (?H_𝔄𝔊 b))
        let ?umap_fo_cf_hom_rhs_inter =
          Hom (?FUNCT 𝔅) (cf_map (?H_ℭ𝔎 c)) (cf_map (?H_𝔄𝔗 a))

        have [cat_cs_simps]:
          "?umap_fo b Acat_Set β?cf_hom_lhs =
            ?cf_hom_rhs Acat_Set β?umap_fo a"
        proof-

          from f assms(3) αβ have cf_hom_lhs:
            "?cf_hom_lhs : ?dom cat_Set β?cf_hom_lhs_umap_fo_inter"
            by
              (
                cs_concl 
                  cs_simp: cat_cs_simps cat_FUNCT_cs_simps
                  cs_intro:
                    cat_cs_intros
                    cat_FUNCT_cs_intros
                    cat_prod_cs_intros
                    cat_op_intros
              )
          from f assms(3) αβ have umap_fo_b:
            "?umap_fo b : ?cf_hom_lhs_umap_fo_inter cat_Set β?cod"
            by
              (
                cs_concl 
                  cs_simp: cat_cs_simps cat_FUNCT_cs_simps
                  cs_intro: 
                    cat_cs_intros
                    cat_FUNCT_cs_intros
                    cat_prod_cs_intros
                    cat_op_intros
              )
          from cf_hom_lhs umap_fo_b have umap_fo_cf_hom_lhs:
            "?umap_fo b Acat_Set β?cf_hom_lhs : ?dom cat_Set β?cod"
            by 
              (
                cs_concl cs_shallow 
                  cs_simp: cat_cs_simps cs_intro: cat_cs_intros
              )
          then have dom_umap_fo_cf_hom_lhs: 
            "𝒟 ((?umap_fo b Acat_Set β?cf_hom_lhs)ArrVal) = ?dom"
            by 
              (
                cs_concl cs_shallow 
                  cs_simp: cat_cs_simps cs_intro: cat_cs_intros
              )

          from f assms(3) αβ have cf_hom_rhs: 
            "?cf_hom_rhs : ?umap_fo_cf_hom_rhs_inter cat_Set β?cod"
            by (*slow*)
              (
                cs_concl
                  cs_simp: cat_cs_simps cat_FUNCT_cs_simps
                  cs_intro:
                    cat_cs_intros
                    cat_FUNCT_cs_intros
                    cat_prod_cs_intros
                    cat_op_intros
              )
          from f assms(3) αβ have umap_fo_a:
            "?umap_fo a : ?dom cat_Set β?umap_fo_cf_hom_rhs_inter"
            by (*slow*)
              (
                cs_concl
                  cs_simp: cat_cs_simps cat_FUNCT_cs_simps
                  cs_intro:
                    cat_cs_intros 
                    cat_FUNCT_cs_intros 
                    cat_prod_cs_intros 
                    cat_op_intros
              )
          from cf_hom_rhs umap_fo_a have cf_hom_rhs_umap_fo_a: 
            "?cf_hom_rhs Acat_Set β?umap_fo a : ?dom cat_Set β?cod"
            by 
              (
                cs_concl cs_shallow 
                  cs_simp: cat_cs_simps cs_intro: cat_cs_intros 
              )
          then have dom_cf_hom_rhs_umap_fo_a: 
            "𝒟 ((?cf_hom_rhs Acat_Set β?umap_fo a)ArrVal) = ?dom"
            by 
              (
                cs_concl cs_shallow 
                  cs_simp: cat_cs_simps cs_intro: cat_cs_intros
              )
          
          show ?thesis
          proof(rule arr_Set_eqI)

            from umap_fo_cf_hom_lhs show arr_Set_umap_fo_cf_hom_lhs: 
              "arr_Set β (?umap_fo b Acat_Set β?cf_hom_lhs)"
              by (auto dest: cat_Set_is_arrD(1))
            from cf_hom_rhs_umap_fo_a show arr_Set_cf_hom_rhs_umap_fo_a: 
              "arr_Set β (?cf_hom_rhs Acat_Set β?umap_fo a)"
              by (auto dest: cat_Set_is_arrD(1))

            show 
              "(?umap_fo b Acat_Set β?cf_hom_lhs)ArrVal =
                (?cf_hom_rhs Acat_Set β?umap_fo a)ArrVal"
            proof
              (
                rule vsv_eqI, 
                unfold 
                  dom_umap_fo_cf_hom_lhs dom_cf_hom_rhs_umap_fo_a in_Hom_iff; 
                (rule refl)?
              )

              fix  assume prems:
                " : cf_map (?H_ℭ c) ?FUNCT cf_map (?H_𝔄𝔊 a)"

              let ?ℌ = ntcf_of_ntcf_arrow  (cat_Set α) 
              let ?lhs = ?H_𝔄ε b NTCF ((?H_A𝔊 f NTCF ?ℌ) NTCF-CF 𝔎)
              let ?rhs = 
                (?H_A f NTCF-CF 𝔗 NTCF ?H_𝔄ε a NTCF (?ℌ NTCF-CF 𝔎))
              let ?cf_hom_𝔄ε = λb b'. cf_hom 𝔄 [𝔄CIdb, εNTMapb']
              let ?Yc = λQ. Yoneda_component (?H_𝔄 b) a f Q
              let ?ℌ𝔎 = λb'. ?ℌNTMap𝔎ObjMapb'
              let ?𝔊𝔎 = λb'. 𝔊ObjMap𝔎ObjMapb'

              have [cat_cs_simps]: 
                "cf_of_cf_map  (cat_Set α) (cf_map (?H_ℭ c)) = ?H_ℭ c"
                by 
                  (
                    cs_concl cs_shallow 
                      cs_simp: cat_FUNCT_cs_simps cs_intro: cat_cs_intros
                  )
              have [cat_cs_simps]: 
                "cf_of_cf_map  (cat_Set α) (cf_map (?H_𝔄𝔊 a)) = ?H_𝔄𝔊 a"
                by 
                  (
                    cs_concl cs_shallow 
                      cs_simp: cat_FUNCT_cs_simps cs_intro: cat_cs_intros
                  )
              note  = cat_FUNCT_is_arrD[OF prems, unfolded cat_cs_simps]
              have Hom_c: "?H_ℭ𝔎 c : 𝔅 ↦↦Cαcat_Set α"
                by (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros)

              have [cat_cs_simps]: "?lhs = ?rhs"
              proof(rule ntcf_eqI)
                from (1) f show lhs: 
                  "?lhs : ?H_ℭ𝔎 c CF ?H_𝔄𝔗 b : 𝔅 ↦↦Cαcat_Set α"
                  by (cs_concl cs_simp: cs_intro: cat_cs_intros)
                then have dom_lhs: "𝒟 (?lhsNTMap) = 𝔅Obj" 
                  by (cs_concl cs_simp: cat_cs_simps)+
                from (1) f show rhs: 
                  "?rhs : ?H_ℭ𝔎 c CF ?H_𝔄𝔗 b : 𝔅 ↦↦Cαcat_Set α"
                  by (cs_concl cs_intro: cat_cs_intros)
                then have dom_rhs: "𝒟 (?rhsNTMap) = 𝔅Obj"
                  by (cs_concl cs_simp: cat_cs_simps)+
                have [cat_cs_simps]:
                  "?cf_hom_𝔄ε b b' Acat_Set α(?Yc (?𝔊𝔎 b') Acat_Set α?ℌ𝔎 b') =
                      ?Yc (𝔗ObjMapb') Acat_Set α(?cf_hom_𝔄ε a b' Acat_Set α?ℌ𝔎 b')"
                  (is ?lhs_Set = ?rhs_Set)
                  if "b'  𝔅Obj" for b'
                proof-
                  let ?𝔎b' = 𝔎ObjMapb'
                  from (1) f that assms(3) Ran.HomCod.category_axioms 
                  have lhs_Set_is_arr: "?lhs_Set :
                    Hom  c (?𝔎b') cat_Set αHom 𝔄 b (𝔗ObjMapb')"
                    by
                      (
                        cs_concl
                          cs_simp: cat_cs_simps cat_op_simps 
                          cs_intro: 
                            cat_cs_intros cat_prod_cs_intros cat_op_intros
                      )
                  then have dom_lhs_Set: "𝒟 (?lhs_SetArrVal) = Hom  c ?𝔎b'" 
                    by (cs_concl cs_shallow cs_simp: cat_cs_simps)
                  from (1) f that assms(3) Ran.HomCod.category_axioms 
                  have rhs_Set_is_arr: "?rhs_Set :
                    Hom  c (?𝔎b') cat_Set αHom 𝔄 b (𝔗ObjMapb')"
                    by
                      (
                        cs_concl
                          cs_simp: cat_cs_simps cat_op_simps 
                          cs_intro:
                            cat_cs_intros cat_prod_cs_intros cat_op_intros
                      )
                  then have dom_rhs_Set: "𝒟 (?rhs_SetArrVal) = Hom  c ?𝔎b'" 
                    by (cs_concl cs_shallow cs_simp: cat_cs_simps)
                  show ?thesis
                  proof(rule arr_Set_eqI)
                    from lhs_Set_is_arr show arr_Set_lhs_Set: "arr_Set α ?lhs_Set" 
                      by (auto dest: cat_Set_is_arrD(1))
                    from rhs_Set_is_arr show arr_Set_rhs_Set: "arr_Set α ?rhs_Set"
                      by (auto dest: cat_Set_is_arrD(1))
                    show "?lhs_SetArrVal = ?rhs_SetArrVal"
                    proof(rule vsv_eqI, unfold dom_lhs_Set dom_rhs_Set in_Hom_iff)
                      fix h assume "h : c ?𝔎b'"
                      with (1) f that assms Ran.HomCod.category_axioms show 
                        "?lhs_SetArrValh = ?rhs_SetArrValh"
                        by (*exceptionally slow*) 
                          (
                            cs_concl 
                              cs_simp: cat_cs_simps cat_op_simps 
                              cs_intro: 
                                cat_cs_intros cat_prod_cs_intros cat_op_intros
                          )
                    qed (use arr_Set_lhs_Set arr_Set_rhs_Set in auto)
                  qed
                    (
                      use lhs_Set_is_arr rhs_Set_is_arr in
                        cs_concl cs_shallow cs_simp: cat_cs_simps
                    )+

              qed

              show "?lhsNTMap = ?rhsNTMap"
              proof(rule vsv_eqI, unfold dom_lhs dom_rhs)
                fix b' assume "b'  𝔅Obj"
                with (1) f assms(3) show "?lhsNTMapb' = ?rhsNTMapb'"
                  by (*slow*)
                    (
                      cs_concl
                        cs_simp: cat_cs_simps cat_op_simps 
                        cs_intro: cat_cs_intros
                    )
              qed (cs_concl cs_intro: cat_cs_intros)

            qed simp_all

            from 
              assms(3) f (1) prems αβ 
              (*speedup*)
              Ran.HomCod.category_axioms 
              FUNCT_ℭ.category_axioms
              FUNCT_𝔅.category_axioms
              AG.is_functor_axioms
              Ran.is_functor_axioms
              Hom_f.is_ntcf_axioms
            show
              "(?umap_fo b Acat_Set β?cf_hom_lhs)ArrVal =
                (?cf_hom_rhs Acat_Set β?umap_fo a)ArrVal"
                by (subst (1 2) (2)) (*exceptionally slow*)
                  (
                    cs_concl
                      cs_simp: cat_cs_simps cat_FUNCT_cs_simps cat_op_simps
                      cs_intro:
                        cat_cs_intros 
                        cat_prod_cs_intros 
                        cat_FUNCT_cs_intros
                        cat_op_intros
                  )
            qed
              (
                use arr_Set_umap_fo_cf_hom_lhs arr_Set_cf_hom_rhs_umap_fo_a in
                  auto
              )

          qed
            (
              use umap_fo_cf_hom_lhs cf_hom_rhs_umap_fo_a in
                cs_concl cs_shallow cs_simp: cat_cs_simps
            )+

        qed

        from f assms αβ show ?thesis
          by (*slow*)
            (
              cs_concl 
                cs_simp: cat_cs_simps cat_Kan_cs_simps cat_FUNCT_cs_simps
                cs_intro: cat_small_cs_intros cat_cs_intros cat_FUNCT_cs_intros
            )

      qed

    qed auto

  qed


  (**main**)

  from L_10_5_χ_is_iso_ntcf[OF β αβ assms] have inv_χ:
    "inv_ntcf (L_10_5_χ α β 𝔗 𝔎 c) :
      L_10_5_N α β 𝔗 𝔎 c CF.iso cf_Cone α β ?𝔗_c𝔎 :
      op_cat 𝔄 ↦↦Cβcat_Set β"
    by (auto intro: iso_ntcf_is_iso_arr)
 
  define φ where "φ = inv_ntcf (L_10_5_χ α β 𝔗 𝔎 c) NTCF ψ NTCF inv_ntcf Y'"
  
  from inv_Y' ψ inv_χ have φ: "φ :
    HomO.Cβ𝔄(-,?𝔊c) CF.iso cf_Cone α β ?𝔗_c𝔎 :
    op_cat 𝔄 ↦↦Cβcat_Set β"
    unfolding φ_def by (cs_concl cs_shallow cs_intro: cat_cs_intros)

  interpret φ: is_iso_ntcf
    β op_cat 𝔄 cat_Set β HomO.Cβ𝔄(-,?𝔊c) cf_Cone α β ?𝔗_c𝔎 φ
    by (rule φ)

  let ?φ_𝔊c_CId = φNTMap?𝔊cArrVal𝔄CId?𝔊c
  let ?ntcf_φ_𝔊c_CId = ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 ?φ_𝔊c_CId

  from AG.vempty_is_zet assms(3) have Δ: " : 𝔄 ↦↦Cβ?c𝔎_𝔄"
    by
      (
        cs_concl cs_shallow
          cs_simp: cat_comma_cs_simps 
          cs_intro: cat_cs_intros cat_comma_cs_intros
      )
  from assms(3) have 𝔊c: "?𝔊c  𝔄Obj" 
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  from AG.vempty_is_zet have 𝔗_c𝔎: "cf_map (?𝔗_c𝔎)  ?c𝔎_𝔄Obj"
    by
      (
        cs_concl 
          cs_simp: cat_FUNCT_components(1) 
          cs_intro: cat_cs_intros cat_FUNCT_cs_intros
      )

  from
    φ.ntcf_NTMap_is_arr[unfolded cat_op_simps, OF 𝔊c]
    assms(3)
    AG.vempty_is_zet
    β.vempty_is_zet
    αβ
  have φ_𝔊c: "φNTMap?𝔊c :
    Hom 𝔄 ?𝔊c?𝔊c cat_Set βHom ?c𝔎_𝔄 (cf_map (?cf_c𝔎_𝔄 ?𝔊c)) (cf_map ?𝔗_c𝔎)"
    by (*very slow*)
      (
        cs_prems
          cs_simp:
            cat_cs_simps
            cat_Kan_cs_simps
            cat_comma_cs_simps 
            cat_op_simps 
            cat_FUNCT_components(1) 
          cs_intro: 
            cat_Kan_cs_intros
            cat_comma_cs_intros 
            cat_cs_intros 
            cat_FUNCT_cs_intros 
            cat_op_intros 
      )

  with assms(3) have φ_𝔊c_CId: 
    "?φ_𝔊c_CId : cf_map (?cf_c𝔎_𝔄 ?𝔊c) ?c𝔎_𝔄cf_map ?𝔗_c𝔎"
    by (cs_concl cs_shallow cs_intro: cat_cs_intros)
  have ntcf_arrow_φ_𝔊c_CId: "ntcf_arrow ?ntcf_φ_𝔊c_CId = ?φ_𝔊c_CId"
    by (rule cat_FUNCT_is_arrD(2)[OF φ_𝔊c_CId, symmetric])

  have ua: "universal_arrow_fo  (cf_map (?𝔗_c𝔎)) ?𝔊c ?φ_𝔊c_CId"
    by 
      (
        rule is_functor.cf_universal_arrow_fo_if_is_iso_ntcf[
          OF Δ 𝔊c 𝔗_c𝔎 φ[unfolded cf_Cone_def cat_cs_simps]
          ]
      )
  moreover have ntcf_φ_𝔊c_CId: 
    "?ntcf_φ_𝔊c_CId : ?𝔊c <CF.cone ?𝔗_c𝔎 : c CF 𝔎 ↦↦Cα𝔄"
  proof(intro is_cat_coneI)
    from cat_FUNCT_is_arrD(1)[OF φ_𝔊c_CId] assms(3) AG.vempty_is_zet show 
      "ntcf_of_ntcf_arrow (c CF 𝔎) 𝔄 ?φ_𝔊c_CId :
        ?cf_c𝔎_𝔄 ?𝔊c CF ?𝔗_c𝔎 : c CF 𝔎 ↦↦Cα𝔄"
      by
        (
          cs_prems 
            cs_simp: cat_cs_simps cat_FUNCT_cs_simps
            cs_intro: cat_cs_intros cat_FUNCT_cs_intros
        )
  qed (rule 𝔊c)
  ultimately have "?ntcf_φ_𝔊c_CId : ?𝔊c <CF.lim ?𝔗_c𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    by (intro is_cat_cone.cat_cone_is_cat_limit) 
      (simp_all add: ntcf_arrow_φ_𝔊c_CId)
  then show ?thesis using that by auto

qed

lemma (in is_cat_pw_lKe) cat_pw_lKe_ex_cat_colimit:
  ―‹Based on the elements of Chapter X-5 in \cite{mac_lane_categories_2010}.›
  assumes "𝔎 : 𝔅 ↦↦Cα"
    and "𝔗 : 𝔅 ↦↦Cα𝔄"
    and "c  Obj"
  obtains UA 
    where "UA : 𝔗 CF 𝔎 CFO c >CF.colim 𝔉ObjMapc : 𝔎 CF c ↦↦Cα𝔄"
proof-
  from 
    is_cat_pw_rKe.cat_pw_rKe_ex_cat_limit
      [
        OF is_cat_pw_rKe_op AG.is_functor_op ntcf_lKe.NTDom.is_functor_op,
        unfolded cat_op_simps, 
        OF assms(3)
      ]
  obtain UA where UA: "UA :
    𝔉ObjMapc <CF.lim op_cf 𝔗 CF c OCF (op_cf 𝔎) : 
    c CF (op_cf 𝔎) ↦↦Cαop_cat 𝔄"
    by auto
  from assms(3) have [cat_cs_simps]:
    "op_cf 𝔗 CF c OCF (op_cf 𝔎) CF op_cf_obj_comma 𝔎 c = 
      op_cf 𝔗 CF op_cf (𝔎 CFO c)"
    by
      (
        cs_concl cs_shallow
          cs_simp: cat_cs_simps AG.op_cf_cf_obj_comma_proj[OF assms(3)] 
          cs_intro: cat_cs_intros cat_comma_cs_intros cat_op_intros
      )
  from assms(3) have [cat_op_simps]:
    "𝔗 CF op_cf (c OCF (op_cf 𝔎)) CF op_cf (op_cf_obj_comma 𝔎 c) = 
      𝔗 CF 𝔎 CFO c"
    by
      (
        cs_concl cs_shallow
          cs_simp:
            cat_cs_simps cat_op_simps 
            op_cf_cf_comp[symmetric] AG.op_cf_cf_obj_comma_proj[symmetric] 
          cs_intro: cat_cs_intros cat_comma_cs_intros cat_op_intros
      )
  from assms(3) have [cat_op_simps]: "op_cat (op_cat (𝔎 CF c)) = 𝔎 CF c"
    by
      (
        cs_concl cs_shallow
          cs_simp: cat_op_simps cs_intro: cat_cs_intros cat_comma_cs_intros 
      )
  note ntcf_cf_comp_is_cat_limit_if_is_iso_functor =
    ntcf_cf_comp_is_cat_limit_if_is_iso_functor
      [
        OF UA AG.op_cf_obj_comma_is_iso_functor[OF assms(3)], 
        unfolded cat_op_simps
      ]
  have "op_ntcf UA NTCF-CF op_cf (op_cf_obj_comma 𝔎 c) : 
    𝔗 CF 𝔎 CFO c >CF.colim 𝔉ObjMapc : 𝔎 CF c ↦↦Cα𝔄"
    by 
      (
        rule is_cat_limit.is_cat_colimit_op
          [
            OF ntcf_cf_comp_is_cat_limit_if_is_iso_functor, 
            unfolded cat_op_simps
          ]
      )
  then show ?thesis using that by auto
qed



subsection‹The limit and the colimit for the pointwise Kan extensions›


subsubsection‹Definition and elementary properties›


text‹See Theorem 3 in Chapter X-5 in cite"mac_lane_categories_2010".›

definition the_pw_cat_rKe_limit :: "V  V  V  V  V  V"
  where "the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊 c =
    [
      𝔊ObjMapc,
      (
        SOME UA.
          UA : 𝔊ObjMapc <CF.lim 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔗HomCod
      )
    ]"

definition the_pw_cat_lKe_colimit :: "V  V  V  V  V  V"
  where "the_pw_cat_lKe_colimit α 𝔎 𝔗 𝔉 c =
    [
      𝔉ObjMapc,
      op_ntcf
        (
          the_pw_cat_rKe_limit α (op_cf 𝔎) (op_cf 𝔗) (op_cf 𝔉) cUArr NTCF-CF
          op_cf_obj_comma 𝔎 c
        )
    ]"


text‹Components.›

lemma the_pw_cat_rKe_limit_components:
  shows "the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊 cUObj = 𝔊ObjMapc"
    and "the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊 cUArr = 
      (
        SOME UA.
          UA : 𝔊ObjMapc <CF.lim 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔗HomCod
      )"
  unfolding the_pw_cat_rKe_limit_def ua_field_simps
  by (simp_all add: nat_omega_simps)

lemma the_pw_cat_lKe_colimit_components:
  shows "the_pw_cat_lKe_colimit α 𝔎 𝔗 𝔉 cUObj = 𝔉ObjMapc"
    and "the_pw_cat_lKe_colimit α 𝔎 𝔗 𝔉 cUArr = op_ntcf
      (
        the_pw_cat_rKe_limit α (op_cf 𝔎) (op_cf 𝔗) (op_cf 𝔉) cUArr NTCF-CF
        op_cf_obj_comma 𝔎 c
      )"
  unfolding the_pw_cat_lKe_colimit_def ua_field_simps
  by (simp_all add: nat_omega_simps)

context is_functor
begin

lemmas the_pw_cat_rKe_limit_components' = 
  the_pw_cat_rKe_limit_components[where 𝔗=𝔉, unfolded cat_cs_simps]

end


subsubsection‹
The limit for the pointwise right Kan extension is a limit,
the colimit for the pointwise left Kan extension is a colimit
›

lemma (in is_cat_pw_rKe) cat_pw_rKe_the_pw_cat_rKe_limit_is_cat_limit:
  assumes "𝔎 : 𝔅 ↦↦Cα" and "𝔗 : 𝔅 ↦↦Cα𝔄" and "c  Obj"
  shows "the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊 cUArr :
    the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊 cUObj <CF.lim 𝔗 CF c OCF 𝔎 :
    c CF 𝔎 ↦↦Cα𝔄"
proof-
  from cat_pw_rKe_ex_cat_limit[OF assms] obtain UA 
    where UA: "UA : 𝔊ObjMapc <CF.lim 𝔗 CF c OCF 𝔎 : c CF 𝔎 ↦↦Cα𝔄"
    by auto
  show ?thesis
    unfolding the_pw_cat_rKe_limit_components
    by (rule someI2, unfold cat_cs_simps, rule UA)
qed

lemma (in is_cat_pw_lKe) cat_pw_lKe_the_pw_cat_lKe_colimit_is_cat_colimit:
  assumes "𝔎 : 𝔅 ↦↦Cα" and "𝔗 : 𝔅 ↦↦Cα𝔄" and "c  Obj"
  shows "the_pw_cat_lKe_colimit α 𝔎 𝔗 𝔉 cUArr : 
    𝔗 CF 𝔎 CFO c >CF.colim the_pw_cat_lKe_colimit α 𝔎 𝔗 𝔉 cUObj :
    𝔎 CF c ↦↦Cα𝔄"
proof-
  interpret 𝔎: is_functor α 𝔅  𝔎 by (rule assms(1))
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))
  note cat_pw_rKe_the_pw_cat_rKe_limit_is_cat_limit = 
    is_cat_pw_rKe.cat_pw_rKe_the_pw_cat_rKe_limit_is_cat_limit
      [
        OF is_cat_pw_rKe_op AG.is_functor_op ntcf_lKe.NTDom.is_functor_op, 
        unfolded cat_op_simps,
        OF assms(3)
      ]
  from assms(3) have
    "op_cf 𝔗 CF c OCF (op_cf 𝔎) CF op_cf_obj_comma 𝔎 c = 
      op_cf 𝔗 CF op_cf (𝔎 CFO c)"
    by
      (
        cs_concl cs_shallow
          cs_simp:
            cat_cs_simps cat_comma_cs_simps cat_op_simps
            AG.op_cf_cf_obj_comma_proj[OF assms(3)] 
          cs_intro: cat_cs_intros cat_comma_cs_intros cat_op_intros
      )
  note ntcf_cf_comp_is_cat_limit_if_is_iso_functor = 
    ntcf_cf_comp_is_cat_limit_if_is_iso_functor
      [
        OF 
          cat_pw_rKe_the_pw_cat_rKe_limit_is_cat_limit 
          AG.op_cf_obj_comma_is_iso_functor[OF assms(3)],
          unfolded this, folded op_cf_cf_comp
      ]
  from assms(3) have [cat_op_simps]: "op_cat (op_cat (𝔎 CF c)) = 𝔎 CF c"
    by 
      (
        cs_concl cs_shallow 
          cs_simp: cat_op_simps cs_intro: cat_cs_intros cat_comma_cs_intros
      )
  from assms(3) have [cat_op_simps]: "op_cf (op_cf (𝔎 CFO c)) = 𝔎 CFO c"
    by 
      (
        cs_concl cs_shallow
          cs_simp: cat_op_simps cs_intro: cat_cs_intros cat_comma_cs_intros
      )
  have [cat_op_simps]:
    "the_pw_cat_rKe_limit α (op_cf 𝔎) (op_cf 𝔗) (op_cf 𝔉) cUObj = 
      the_pw_cat_lKe_colimit α 𝔎 𝔗 𝔉 cUObj"
    unfolding 
      the_pw_cat_lKe_colimit_components 
      the_pw_cat_rKe_limit_components   
      cat_op_simps
    by simp
  show ?thesis
    by 
      (
        rule is_cat_limit.is_cat_colimit_op
          [
            OF ntcf_cf_comp_is_cat_limit_if_is_iso_functor, 
            folded the_pw_cat_lKe_colimit_components,
            unfolded cat_op_simps
          ]
      )
qed

lemma (in is_cat_pw_rKe) cat_pw_rKe_the_ntcf_rKe_is_cat_rKe: 
  assumes "𝔎 : 𝔅 ↦↦Cα" and "𝔗 : 𝔅 ↦↦Cα𝔄"
  shows "the_ntcf_rKe α 𝔗 𝔎 (the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊) :
    the_cf_rKe α 𝔗 𝔎 (the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊) CF 𝔎 CF.rKeα𝔗 :
    𝔅 C  C 𝔄"
proof-
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))
  show "the_ntcf_rKe α 𝔗 𝔎 (the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊) :
    the_cf_rKe α 𝔗 𝔎 (the_pw_cat_rKe_limit α 𝔎 𝔗 𝔊) CF 𝔎 CF.rKeα𝔗 :
    𝔅 C  C 𝔄"
    by
      (
        rule
          the_ntcf_rKe_is_cat_rKe
            [
              OF
                assms(1)
                ntcf_rKe.NTCod.is_functor_axioms 
                cat_pw_rKe_the_pw_cat_rKe_limit_is_cat_limit[OF assms]
            ]
      )
qed

lemma (in is_cat_pw_lKe) cat_pw_lKe_the_ntcf_lKe_is_cat_lKe:
  assumes "𝔎 : 𝔅 ↦↦Cα" and "𝔗 : 𝔅 ↦↦Cα𝔄"
  shows "the_ntcf_lKe α 𝔗 𝔎 (the_pw_cat_lKe_colimit α 𝔎 𝔗 𝔉) :
    𝔗 CF.lKeαthe_cf_lKe α 𝔗 𝔎 (the_pw_cat_lKe_colimit α 𝔎 𝔗 𝔉) CF 𝔎 :
    𝔅 C  C 𝔄"
proof-
  interpret 𝔗: is_functor α 𝔅 𝔄 𝔗 by (rule assms(2))
  show ?thesis
    by 
      (
        rule the_ntcf_lKe_is_cat_lKe
          [
            OF
              assms(1,2) 
              cat_pw_lKe_the_pw_cat_lKe_colimit_is_cat_colimit[OF assms], 
            simplified
          ]
      )
qed

text‹\newpage›

end