Documentation

GroupoidModel.Syntax.UHom

Morphisms of natural models, and Russell-universe embeddings.

Instances For
    def NaturalModelBase.Hom.comp {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] {M N O : NaturalModelBase Ctx} (α : M.Hom N) (β : N.Hom O) :
    M.Hom O
    Equations
    Instances For
      def NaturalModelBase.Hom.comp_assoc {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] {M N O P : NaturalModelBase Ctx} (α : M.Hom N) (β : N.Hom O) (γ : O.Hom P) :
      (α.comp β).comp γ = α.comp (β.comp γ)
      Equations
      • =
      Instances For

        Morphism into the representable natural transformation M from the pullback of M along a type.

        Equations
        Instances For

          Given M : NaturalModelBase, a semantic type A : y(Γ) ⟶ M.Ty, and a substitution σ : Δ ⟶ Γ, construct a Hom for the substitution A[σ].

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            A Russell universe embedding is a hom of natural models M ⟶ N such that types in M correspond to terms of a universe U in N.

            These don't form a category since UHom.id M is essentially Type : Type in M.

            Note this doesn't need to extend Hom as none of its fields are used; it's just convenient to pack up the data.

            Instances For
              Equations
              Instances For
                def NaturalModelBase.UHom.comp_assoc {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] {M N O P : NaturalModelBase Ctx} (α : M.UHom N) (β : N.UHom O) (γ : O.UHom P) :
                (α.comp β).comp γ = α.comp (β.comp γ)
                Equations
                • =
                Instances For

                  Universe embeddings #

                  A sequence of Russell universe embeddings.

                  Instances For
                    def NaturalModelBase.UHomSeq.homSucc {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeq Ctx) (i : ) (h : i < s.length := by get_elem_tactic) :
                    s[i].UHom s[i + 1]
                    Equations
                    Instances For
                      @[irreducible]
                      def NaturalModelBase.UHomSeq.hom {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeq Ctx) (i j : ) (ij : i < j := by omega) (jlen : j < s.length + 1 := by get_elem_tactic) :
                      s[i].UHom s[j]

                      Composition of embeddings between i and j in the chain.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[irreducible]
                        theorem NaturalModelBase.UHomSeq.hom_comp_trans {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeq Ctx) (i j k : ) (ij : i < j) (jk : j < k) (klen : k < s.length + 1) :
                        (s.hom i j ij ).comp (s.hom j k jk klen) = s.hom i k klen
                        Equations
                        Instances For
                          Equations
                          • s.el ilen a a_tp = sorry
                          Instances For

                            The data of type and term formers at each universe s[i].tp.

                            This data is universe-monomorphic, but we can use it to construct universe-polymorphic formation in a model-independent manner. For example, universe-monomorphic Pi

                            Γ ⊢ᵢ A type  Γ.A ⊢ᵢ B type
                            --------------------------
                            Γ ⊢ᵢ ΠA. B type
                            

                            can be extended to

                            Γ ⊢ᵢ A type  Γ.A ⊢ⱼ B type
                            --------------------------
                            Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ ΠA. B type
                            
                            Instances For

                              Pi #

                              Equations
                              Instances For
                                Equations
                                • s.lam ilen jlen = sorry
                                Instances For
                                  def NaturalModelBase.UHomSeqPiSigma.Pi_pb {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeqPiSigma Ctx) {i j : } (ilen : i < s.length + 1) (jlen : j < s.length + 1) :
                                  CategoryTheory.IsPullback (s.lam ilen jlen) (s[i].Ptp.map s[j].tp) s[max i j].tp (s.Pi ilen jlen)
                                  Equations
                                  • =
                                  Instances For
                                    Γ ⊢ᵢ A  Γ.A ⊢ⱼ B
                                    -----------------
                                    Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ ΠA. B
                                    
                                    Equations
                                    Instances For
                                      Γ ⊢ᵢ A  Γ.A ⊢ⱼ t : B
                                      -------------------------
                                      Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ λA. t : ΠA. B
                                      
                                      Equations
                                      Instances For
                                        @[simp]
                                        Γ ⊢ᵢ A  Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ f : ΠA. B
                                        -----------------------------
                                        Γ.A ⊢ⱼ unlam f : B
                                        
                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem NaturalModelBase.UHomSeqPiSigma.unLam_tp {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeqPiSigma Ctx) {i j : } (ilen : i < s.length + 1) (jlen : j < s.length + 1) {Γ : Ctx} (A : CategoryTheory.yoneda.obj Γ s[i].Ty) (B : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Ty) (f : CategoryTheory.yoneda.obj Γ s[max i j].Tm) (f_tp : CategoryTheory.CategoryStruct.comp f s[max i j].tp = s.mkPi ilen jlen A B) :
                                          CategoryTheory.CategoryStruct.comp (s.unLam ilen jlen A B f f_tp) s[j].tp = B
                                          Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ f : ΠA. B  Γ ⊢ᵢ a : A
                                          ---------------------------------
                                          Γ ⊢ⱼ f a : B[id.a]
                                          
                                          Equations
                                          Instances For
                                            @[simp]
                                            theorem NaturalModelBase.UHomSeqPiSigma.mkLam_unLam {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeqPiSigma Ctx) {i j : } (ilen : i < s.length + 1) (jlen : j < s.length + 1) {Γ : Ctx} (A : CategoryTheory.yoneda.obj Γ s[i].Ty) (B : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Ty) (f : CategoryTheory.yoneda.obj Γ s[max i j].Tm) (f_tp : CategoryTheory.CategoryStruct.comp f s[max i j].tp = s.mkPi ilen jlen A B) :
                                            s.mkLam ilen jlen A (s.unLam ilen jlen A B f f_tp) = f
                                            @[simp]
                                            theorem NaturalModelBase.UHomSeqPiSigma.unLam_mkLam {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeqPiSigma Ctx) {i j : } (ilen : i < s.length + 1) (jlen : j < s.length + 1) {Γ : Ctx} (A : CategoryTheory.yoneda.obj Γ s[i].Ty) (B : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Ty) (t : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Tm) (t_tp : CategoryTheory.CategoryStruct.comp t s[j].tp = B) (lam_tp : CategoryTheory.CategoryStruct.comp (s.mkLam ilen jlen A t) s[max i j].tp = s.mkPi ilen jlen A B) :
                                            s.unLam ilen jlen A B (s.mkLam ilen jlen A t) lam_tp = t
                                            Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ f : ΠA. B
                                            --------------------------------------
                                            Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ λA. f[↑] v₀ : ΠA. B
                                            
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              theorem NaturalModelBase.UHomSeqPiSigma.etaExpand_eq {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeqPiSigma Ctx) {i j : } (ilen : i < s.length + 1) (jlen : j < s.length + 1) {Γ : Ctx} (A : CategoryTheory.yoneda.obj Γ s[i].Ty) (B : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Ty) (f : CategoryTheory.yoneda.obj Γ s[max i j].Tm) (f_tp : CategoryTheory.CategoryStruct.comp f s[max i j].tp = s.mkPi ilen jlen A B) :
                                              s.etaExpand ilen jlen A B f f_tp = f
                                              @[simp]
                                              theorem NaturalModelBase.UHomSeqPiSigma.mkApp_mkLam {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeqPiSigma Ctx) {i j : } (ilen : i < s.length + 1) (jlen : j < s.length + 1) {Γ : Ctx} (A : CategoryTheory.yoneda.obj Γ s[i].Ty) (B : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Ty) (t : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Tm) (t_tp : CategoryTheory.CategoryStruct.comp t s[j].tp = B) (lam_tp : CategoryTheory.CategoryStruct.comp (s.mkLam ilen jlen A t) s[max i j].tp = s.mkPi ilen jlen A B) (a : CategoryTheory.yoneda.obj Γ s[i].Tm) (a_tp : CategoryTheory.CategoryStruct.comp a s[i].tp = A) :
                                              s.mkApp ilen jlen A B (s.mkLam ilen jlen A t) lam_tp a a_tp = CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map (s[i].sec A a a_tp)) t
                                              Γ ⊢ᵢ A  Γ.A ⊢ⱼ t : B  Γ ⊢ᵢ a : A
                                              --------------------------------
                                              Γ.A ⊢ⱼ (λA. t) a ≡ t[a] : B[a]
                                              

                                              Sigma #

                                              Equations
                                              Instances For
                                                Equations
                                                Instances For
                                                  Equations
                                                  • =
                                                  Instances For
                                                    Γ ⊢ᵢ A  Γ.A ⊢ⱼ B
                                                    -----------------
                                                    Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ ΣA. B
                                                    
                                                    Equations
                                                    Instances For
                                                      Γ ⊢ᵢ t : A  Γ ⊢ⱼ u : B[t]
                                                      --------------------------
                                                      Γ ⊢ₘₐₓ₍ᵢ,ⱼ₎ ⟨t, u⟩ : ΣA. B
                                                      
                                                      Equations
                                                      Instances For
                                                        Equations
                                                        Instances For
                                                          @[simp]
                                                          theorem NaturalModelBase.UHomSeqPiSigma.mkFst_tp {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeqPiSigma Ctx) {i j : } (ilen : i < s.length + 1) (jlen : j < s.length + 1) {Γ : Ctx} (A : CategoryTheory.yoneda.obj Γ s[i].Ty) (B : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Ty) (p : CategoryTheory.yoneda.obj Γ s[max i j].Tm) (p_tp : CategoryTheory.CategoryStruct.comp p s[max i j].tp = s.mkSigma ilen jlen A B) :
                                                          CategoryTheory.CategoryStruct.comp (s.mkFst ilen jlen A B p p_tp) s[i].tp = A
                                                          @[simp]
                                                          Equations
                                                          Instances For
                                                            @[simp]
                                                            @[simp]
                                                            @[simp]
                                                            theorem NaturalModelBase.UHomSeqPiSigma.mkPair_mkFst_mkSnd {Ctx : Type u} [CategoryTheory.SmallCategory Ctx] [CategoryTheory.CartesianMonoidalCategory Ctx] (s : UHomSeqPiSigma Ctx) {i j : } (ilen : i < s.length + 1) (jlen : j < s.length + 1) {Γ : Ctx} (A : CategoryTheory.yoneda.obj Γ s[i].Ty) (B : CategoryTheory.yoneda.obj (s[i].ext A) s[j].Ty) (p : CategoryTheory.yoneda.obj Γ s[max i j].Tm) (p_tp : CategoryTheory.CategoryStruct.comp p s[max i j].tp = s.mkSigma ilen jlen A B) :
                                                            s.mkPair ilen jlen A B (s.mkFst ilen jlen A B p p_tp) (s.mkSnd ilen jlen A B p p_tp) = p