Documentation

GroupoidModel.Syntax.Interpretation

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

    Universe level bound helpers #

    theorem EqTp.lt_slen {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : NaturalModel.Universe.UHomSeq π’ž} (slen : univMax ≀ s.length) {Ο‡ : Type u_1} {E : Axioms Ο‡} {Ξ“ : Ctx Ο‡} {A B : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] A ≑ B) :
    l < s.length + 1
    theorem WfTp.lt_slen {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : NaturalModel.Universe.UHomSeq π’ž} (slen : univMax ≀ s.length) {Ο‡ : Type u_1} {E : Axioms Ο‡} {Ξ“ : Ctx Ο‡} {A : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] A) :
    l < s.length + 1
    theorem EqTm.lt_slen {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : NaturalModel.Universe.UHomSeq π’ž} (slen : univMax ≀ s.length) {Ο‡ : Type u_1} {E : Axioms Ο‡} {Ξ“ : Ctx Ο‡} {A t u : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] t ≑ u : A) :
    l < s.length + 1
    theorem WfTm.lt_slen {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : NaturalModel.Universe.UHomSeq π’ž} (slen : univMax ≀ s.length) {Ο‡ : Type u_1} {E : Axioms Ο‡} {Ξ“ : Ctx Ο‡} {A t : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] t : A) :
    l < s.length + 1

    Extension sequences #

    inductive NaturalModel.Universe.UHomSeq.ExtSeq {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] (s : UHomSeq π’ž) (Ξ“ : π’ž) :
    π’ž β†’ Type u

    s.ExtSeq Ξ“ Ξ“' is a diff from the semantic context Ξ“ to Ξ“', where Ξ“ is a prefix of Ξ“'. It witnesses a sequence of context extension operations in s that built Ξ“' on top of Ξ“. We write Ξ“ ≀ Ξ“'.

    Instances For
      def NaturalModel.Universe.UHomSeq.ExtSeq.length {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ“ Ξ“' : π’ž} :
      s.ExtSeq Ξ“ Ξ“' β†’ β„•
      Equations
      Instances For
        def NaturalModel.Universe.UHomSeq.ExtSeq.append {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Γ₁ Ξ“β‚‚ Γ₃ : π’ž} :
        s.ExtSeq Γ₁ Ξ“β‚‚ β†’ s.ExtSeq Ξ“β‚‚ Γ₃ β†’ s.ExtSeq Γ₁ Γ₃
        Equations
        Instances For
          theorem NaturalModel.Universe.UHomSeq.ExtSeq.append_assoc {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Γ₁ Ξ“β‚‚ Γ₃ Ξ“β‚„ : π’ž} (d₁ : s.ExtSeq Γ₁ Ξ“β‚‚) (dβ‚‚ : s.ExtSeq Ξ“β‚‚ Γ₃) (d₃ : s.ExtSeq Γ₃ Ξ“β‚„) :
          d₁.append (dβ‚‚.append d₃) = (d₁.append dβ‚‚).append d₃
          def NaturalModel.Universe.UHomSeq.ExtSeq.disp {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ“ Ξ“' : π’ž} :
          s.ExtSeq Ξ“ Ξ“' β†’ (Ξ“' ⟢ Ξ“)

          The composite display map associated to a sequence.

          Equations
          Instances For
            def NaturalModel.Universe.UHomSeq.ExtSeq.substWk {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ” Ξ“ Ξ“' : π’ž} (Οƒ : Ξ” ⟢ Ξ“) :
            s.ExtSeq Ξ“ Ξ“' β†’ (Ξ”' : π’ž) Γ— s.ExtSeq Ξ” Ξ”' Γ— (Ξ”' ⟢ Ξ“')

            Weaken a substitution and its domain by an extension sequence.

            Ξ” ⊒ Οƒ : Ξ“  d : Ξ“ ≀ Ξ“'
            -----------------------------
            Ξ” ≀ Ξ”.d[Οƒ]  Ξ”.d[Οƒ] ⊒ Οƒ.d : Ξ“'
            

            where

            Ξ” ⊒ Οƒ : Ξ“  d : Ξ“ ≀ Ξ“.Aβ‚™.….A₁
            -----------------------------
            Ξ”.d[Οƒ] ≑ Ξ”.Aβ‚™[Οƒ].….A₁[β‹―]
            
            Equations
            Instances For
              @[simp]
              theorem NaturalModel.Universe.UHomSeq.ExtSeq.substWk_length {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ” Ξ“ Ξ“' : π’ž} (Οƒ : Ξ” ⟢ Ξ“) (d : s.ExtSeq Ξ“ Ξ“') :
              (substWk Οƒ d).snd.1.length = d.length
              theorem NaturalModel.Universe.UHomSeq.ExtSeq.substWk_disp {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ” Ξ“ Ξ“' : π’ž} (Οƒ : Ξ” ⟢ Ξ“) (d : s.ExtSeq Ξ“ Ξ“') :
              theorem NaturalModel.Universe.UHomSeq.ExtSeq.substWk_disp_functor_map {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ” Ξ“ Ξ“' : π’ž} (Οƒ : Ξ” ⟢ Ξ“) (d : s.ExtSeq Ξ“ Ξ“') {D : Type _uniq.17897} [CategoryTheory.Category.{_uniq.17896, _uniq.17897} D] (F : CategoryTheory.Functor π’ž D) :
              theorem NaturalModel.Universe.UHomSeq.ExtSeq.substWk_disp_assoc {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ” Ξ“ Ξ“' : π’ž} (Οƒ : Ξ” ⟢ Ξ“) (d : s.ExtSeq Ξ“ Ξ“') {Z : π’ž} (h : Ξ“ ⟢ Z) :
              def NaturalModel.Universe.UHomSeq.ExtSeq.var {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ“ Ξ“' : π’ž} {l : β„•} (llen : l < s.length + 1) :
              s.ExtSeq Ξ“ Ξ“' β†’ β„• β†’ Part (CategoryTheory.yoneda.obj Ξ“' ⟢ s[l].Tm)

              Ξ“.Aβ‚–.….Aβ‚€ ⊒ vβ‚™ : Aβ‚™[↑ⁿ⁺¹]

              Equations
              Instances For
                def NaturalModel.Universe.UHomSeq.ExtSeq.tp {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ“ Ξ“' : π’ž} {l : β„•} (llen : l < s.length + 1) :
                s.ExtSeq Ξ“ Ξ“' β†’ β„• β†’ Part (CategoryTheory.yoneda.obj Ξ“' ⟢ s[l].Ty)

                Ξ“.Aβ‚–.….Aβ‚€ ⊒ Aβ‚™[↑ⁿ⁺¹]

                Equations
                Instances For
                  theorem NaturalModel.Universe.UHomSeq.ExtSeq.var_tp {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ“ Ξ“' : π’ž} {l : β„•} (d : s.ExtSeq Ξ“ Ξ“') (llen : l < s.length + 1) (n : β„•) :
                  theorem NaturalModel.Universe.UHomSeq.ExtSeq.var_eq_of_lt_length {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l i : β„•} {llen : l < s.length + 1} {sΞ“ sΞ“' sΞ“'' : π’ž} (d : s.ExtSeq sΞ“ sΞ“') (e : s.ExtSeq sΞ“' sΞ“'') :
                  i < e.length β†’ ExtSeq.var llen (d.append e) i = ExtSeq.var llen e i
                  theorem NaturalModel.Universe.UHomSeq.ExtSeq.var_append_add_length {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l i : β„•} {llen : l < s.length + 1} {sΞ“ sΞ“' sΞ“'' : π’ž} (d : s.ExtSeq sΞ“ sΞ“') (e : s.ExtSeq sΞ“' sΞ“'') :
                  theorem NaturalModel.Universe.UHomSeq.ExtSeq.var_substWk_add_length {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l i : β„•} {llen : l < s.length + 1} {sΞ” sΞ”' sΞ“ sΞ“' : π’ž} (d : s.ExtSeq sΞ” sΞ”') (Οƒ : sΞ”' ⟢ sΞ“) (e : s.ExtSeq sΞ“ sΞ“') :
                  match substWk Οƒ e with | ⟨fst, (d', snd)⟩ => ExtSeq.var llen (d.append d') (i + e.length) = Part.map (fun (x : CategoryTheory.yoneda.obj sΞ”' ⟢ s[l].Tm) => CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map d'.disp) x) (ExtSeq.var llen d i)
                  theorem NaturalModel.Universe.UHomSeq.ExtSeq.var_substWk_of_lt_length {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l i : β„•} {Ξ” Ξ“ Ξ“' : π’ž} (Οƒ : Ξ” ⟢ Ξ“) (d : s.ExtSeq Ξ“ Ξ“') (llen : l < s.length + 1) {st : CategoryTheory.yoneda.obj Ξ“' ⟢ s[l].Tm} (st_mem : st ∈ ExtSeq.var llen d i) :

                  Contextual objects #

                  A "contextual" object (as in Cartmell's contextual categories), i.e., one of the form 1.Aₙ₋₁.….Aβ‚€, together with the extension sequence [Aₙ₋₁ :: … :: Aβ‚€].

                  This kind of object can be destructured.

                  Equations
                  Instances For
                    def NaturalModel.Universe.UHomSeq.CObj.snoc {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l : β„•} (Ξ“ : s.CObj) (llen : l < s.length + 1) (A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty) :
                    Equations
                    Instances For
                      @[simp]
                      theorem NaturalModel.Universe.UHomSeq.CObj.snoc_snd {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l : β„•} (Ξ“ : s.CObj) (llen : l < s.length + 1) (A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty) :
                      (Ξ“.snoc llen A).snd = Ξ“.snd.snoc llen A
                      @[simp]
                      theorem NaturalModel.Universe.UHomSeq.CObj.snoc_fst {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l : β„•} (Ξ“ : s.CObj) (llen : l < s.length + 1) (A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty) :
                      (Ξ“.snoc llen A).fst = s[l].ext A
                      def NaturalModel.Universe.UHomSeq.CObj.append {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {sΞ“' : π’ž} (Ξ“ : s.CObj) (d : s.ExtSeq Ξ“.fst sΞ“') :
                      Equations
                      Instances For
                        @[simp]
                        theorem NaturalModel.Universe.UHomSeq.CObj.append_snd {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {sΞ“' : π’ž} (Ξ“ : s.CObj) (d : s.ExtSeq Ξ“.fst sΞ“') :
                        (Ξ“.append d).snd = Ξ“.snd.append d
                        @[simp]
                        theorem NaturalModel.Universe.UHomSeq.CObj.append_fst {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {sΞ“' : π’ž} (Ξ“ : s.CObj) (d : s.ExtSeq Ξ“.fst sΞ“') :
                        (Ξ“.append d).fst = sΞ“'
                        @[simp]
                        theorem NaturalModel.Universe.UHomSeq.CObj.append_nil {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} (Ξ“ : s.CObj) :
                        Ξ“.append ExtSeq.nil = Ξ“
                        @[simp]
                        theorem NaturalModel.Universe.UHomSeq.CObj.append_snoc {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {sΞ“' : π’ž} {l : β„•} (Ξ“ : s.CObj) (d : s.ExtSeq Ξ“.fst sΞ“') (llen : l < s.length + 1) (A : CategoryTheory.yoneda.obj sΞ“' ⟢ s[l].Ty) :
                        Ξ“.append (d.snoc llen A) = (Ξ“.append d).snoc llen A
                        def NaturalModel.Universe.UHomSeq.CObj.substWk {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {sΞ“ sΞ“' : π’ž} (Ξ” : s.CObj) (Οƒ : Ξ”.fst ⟢ sΞ“) (d : s.ExtSeq sΞ“ sΞ“') :
                        (Ξ”' : s.CObj) Γ— (Ξ”'.fst ⟢ sΞ“')
                        Equations
                        Instances For
                          @[simp]
                          theorem NaturalModel.Universe.UHomSeq.CObj.substWk_nil {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {sΞ“ : π’ž} (Ξ” : s.CObj) (Οƒ : Ξ”.fst ⟢ sΞ“) :
                          Ξ”.substWk Οƒ ExtSeq.nil = βŸ¨Ξ”, ΟƒβŸ©
                          theorem NaturalModel.Universe.UHomSeq.CObj.substWk_snoc {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {sΞ“ sΞ“' : π’ž} {l : β„•} (Ξ” : s.CObj) (Οƒ : Ξ”.fst ⟢ sΞ“) (d : s.ExtSeq sΞ“ sΞ“') (llen : l < s.length + 1) (A : CategoryTheory.yoneda.obj sΞ“' ⟢ s[l].Ty) :
                          Ξ”.substWk Οƒ (d.snoc llen A) = match Ξ”.substWk Οƒ d with | βŸ¨Ξ”', Οƒ'⟩ => βŸ¨Ξ”'.snoc llen (CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map Οƒ') A), s[l].substWk Οƒ' A (CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map Οƒ') A) β‹―βŸ©
                          def NaturalModel.Universe.UHomSeq.CObj.var {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l : β„•} (Ξ“ : s.CObj) (llen : l < s.length + 1) (i : β„•) :
                          Equations
                          Instances For
                            def NaturalModel.Universe.UHomSeq.CObj.tp {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l : β„•} (Ξ“ : s.CObj) (llen : l < s.length + 1) (i : β„•) :
                            Equations
                            Instances For
                              @[simp]
                              theorem NaturalModel.Universe.UHomSeq.CObj.mem_var_zero {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ“ : s.CObj} {l' : β„•} {l'len : l' < s.length + 1} {A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l'].Ty} {l : β„•} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj (Ξ“.snoc l'len A).fst ⟢ s[l].Tm} :
                              x ∈ (Ξ“.snoc l'len A).var llen 0 ↔ βˆƒ (l'l : l' = l), x = Eq.ndrec (motive := fun {l : β„•} => {llen : l < s.length + 1} β†’ {x : CategoryTheory.yoneda.obj (Ξ“.snoc l'len A).fst ⟢ s[l].Tm} β†’ CategoryTheory.yoneda.obj (Ξ“.snoc l'len A).fst ⟢ s[l].Tm) (fun {llen : l' < s.length + 1} {x : CategoryTheory.yoneda.obj (Ξ“.snoc l'len A).fst ⟢ s[l'].Tm} => s[l'].var A) l'l
                              @[simp]
                              theorem NaturalModel.Universe.UHomSeq.CObj.mem_var_succ {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ξ“ : s.CObj} {l' : β„•} {l'len : l' < s.length + 1} {A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l'].Ty} {l i : β„•} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj (Ξ“.snoc l'len A).fst ⟢ s[l].Tm} :
                              x ∈ (Ξ“.snoc l'len A).var llen (i + 1) ↔ βˆƒ a ∈ Ξ“.var llen i, x = CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map (s[l'].disp A)) a
                              theorem NaturalModel.Universe.UHomSeq.CObj.var_tp {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {l : β„•} (Ξ“ : s.CObj) (llen : l < s.length + 1) (i : β„•) :
                              Part.map (fun (x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm) => CategoryTheory.CategoryStruct.comp x s[l].tp) (Ξ“.var llen i) = Ξ“.tp llen i

                              Interpretation #

                              structure NaturalModel.Universe.Interpretation {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] (Ο‡ : Type u_1) (s : UHomSeq π’ž) :
                              Type (max u u_1)

                              An interpretation of a signature consists of a semantic term for each named axiom. This is the semantic equivalent of Axioms Ο‡.

                              Instances For
                                def NaturalModel.Universe.Interpretation.ofType {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] (Ξ“ : s.CObj) (l : β„•) :
                                Expr Ο‡ β†’ (x : autoParam (l < s.length + 1) _auto✝) β†’ Part (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty)
                                Equations
                                • One or more equations did not get rendered due to their size.
                                • I.ofType Ξ“ l x x_1 = Part.none
                                Instances For
                                  def NaturalModel.Universe.Interpretation.ofTerm {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] (Ξ“ : s.CObj) (l : β„•) :
                                  Expr Ο‡ β†’ (x : autoParam (l < s.length + 1) _auto✝) β†’ Part (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm)
                                  Equations
                                  Instances For
                                    def NaturalModel.Universe.Interpretation.ofCtx {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] :
                                    Ctx Ο‡ β†’ Part s.CObj
                                    Equations
                                    Instances For
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofType_pi {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i j : β„•} {A B : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} :
                                      x ∈ I.ofType Ξ“ l (Expr.pi i j A B) llen ↔ βˆƒ (lij : l = max i j), have ilen := β‹―; have jlen := β‹―; βˆƒ A' ∈ I.ofType Ξ“ i A ilen, βˆƒ B' ∈ I.ofType (Ξ“.snoc ilen A') j B jlen, x = (fun (h : max i j = l) => (fun (h_1 : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[max i j].Ty) => Eq.ndrec (motive := fun {l : β„•} => {llen : l < s.length + 1} β†’ {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} β†’ l = max i j β†’ (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty)) (fun {llen : max i j < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[max i j].Ty} (lij : max i j = max i j) => h_1) h lij) (s.mkPi ilen jlen A' B')) β‹―
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofType_sigma {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i j : β„•} {A B : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} :
                                      x ∈ I.ofType Ξ“ l (Expr.sigma i j A B) llen ↔ βˆƒ (lij : l = max i j), have ilen := β‹―; have jlen := β‹―; βˆƒ A' ∈ I.ofType Ξ“ i A ilen, βˆƒ B' ∈ I.ofType (Ξ“.snoc ilen A') j B jlen, x = (fun (h : max i j = l) => (fun (h_1 : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[max i j].Ty) => Eq.ndrec (motive := fun {l : β„•} => {llen : l < s.length + 1} β†’ {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} β†’ l = max i j β†’ (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty)) (fun {llen : max i j < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[max i j].Ty} (lij : max i j = max i j) => h_1) h lij) (s.mkSig ilen jlen A' B')) β‹―
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofType_Id {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i : β„•} {A a b : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} :
                                      x ∈ I.ofType Ξ“ l (Expr.Id i A a b) llen ↔ βˆƒ A' ∈ I.ofType Ξ“ l A llen, βˆƒ a' ∈ I.ofTerm Ξ“ l a llen, βˆƒ b' ∈ I.ofTerm Ξ“ l b llen, βˆƒ (eq : CategoryTheory.CategoryStruct.comp a' s[l].tp = A') (eq' : CategoryTheory.CategoryStruct.comp b' s[l].tp = A'), x = s.mkId llen A' a' b' eq eq'
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofType_el {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l : β„•} {t : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} :
                                      x ∈ I.ofType Ξ“ l t.el llen ↔ βˆƒ (llen_1 : l < s.length), βˆƒ A ∈ I.ofTerm Ξ“ (l + 1) t β‹―, βˆƒ (A_tp : CategoryTheory.CategoryStruct.comp A s[l + 1].tp = UHom.wkU Ξ“.fst (s.homSucc l llen_1)), x = s.el llen_1 A A_tp
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.ofTerm_bvar {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i : β„•} {llen : l < s.length + 1} :
                                      I.ofTerm Ξ“ l (Expr.bvar i) llen = Ξ“.var llen i
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofTerm_lam {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i j : β„•} {A e : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} :
                                      x ∈ I.ofTerm Ξ“ l (Expr.lam i j A e) llen ↔ βˆƒ (lij : l = max i j), have ilen := β‹―; have jlen := β‹―; βˆƒ A' ∈ I.ofType Ξ“ i A ilen, βˆƒ e' ∈ I.ofTerm (Ξ“.snoc ilen A') j e jlen, x = (fun (h : max i j = l) => (fun (h_1 : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[max i j].Tm) => Eq.ndrec (motive := fun {l : β„•} => {llen : l < s.length + 1} β†’ {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} β†’ l = max i j β†’ (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm)) (fun {llen : max i j < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[max i j].Tm} (lij : max i j = max i j) => h_1) h lij) (s.mkLam ilen jlen A' e')) β‹―
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofTerm_app {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i j : β„•} {B f a : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} :
                                      x ∈ I.ofTerm Ξ“ l (Expr.app i j B f a) llen ↔ βˆƒ (ilen : i < s.length + 1), βˆƒ f' ∈ I.ofTerm Ξ“ (max i l) f β‹―, βˆƒ a' ∈ I.ofTerm Ξ“ i a ilen, βˆƒ (A' : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[i].Ty) (eq : CategoryTheory.CategoryStruct.comp a' s[i].tp = A'), βˆƒ B' ∈ I.ofType (Ξ“.snoc ilen A') l B llen, βˆƒ (h : CategoryTheory.CategoryStruct.comp f' s[max i l].tp = s.mkPi ilen llen A' B'), x = s.mkApp ilen llen A' B' f' h a' eq
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofTerm_pair {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i j : β„•} {B t u : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} :
                                      x ∈ I.ofTerm Ξ“ l (Expr.pair i j B t u) llen ↔ βˆƒ (lij : l = max i j), have ilen := β‹―; have jlen := β‹―; βˆƒ t' ∈ I.ofTerm Ξ“ i t ilen, βˆƒ (A' : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[i].Ty) (eq : CategoryTheory.CategoryStruct.comp t' s[i].tp = A'), βˆƒ B' ∈ I.ofType (Ξ“.snoc ilen A') j B jlen, βˆƒ u' ∈ I.ofTerm Ξ“ j u jlen, βˆƒ (u_tp : CategoryTheory.CategoryStruct.comp u' s[j].tp = CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map (s[i].sec A' t' eq)) B'), x = (fun (h : max i j = l) => Eq.ndrec (motive := fun {l : β„•} => {llen : l < s.length + 1} β†’ {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} β†’ l = max i j β†’ (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm)) (fun {llen : max i j < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[max i j].Tm} (lij : max i j = max i j) => s.mkPair ilen jlen A' B' t' eq u' u_tp) h lij) β‹―
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofTerm_fst {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i j : β„•} {A B p : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} :
                                      x ∈ I.ofTerm Ξ“ l (Expr.fst i j A B p) llen ↔ have ilen := β‹―; βˆƒ (jlen : j < s.length + 1), βˆƒ A' ∈ I.ofType Ξ“ l A ilen, βˆƒ B' ∈ I.ofType (Ξ“.snoc llen A') j B jlen, βˆƒ p' ∈ I.ofTerm Ξ“ (max l j) p β‹―, βˆƒ (p_tp : CategoryTheory.CategoryStruct.comp p' s[max l j].tp = s.mkSig llen jlen A' B'), x = s.mkFst llen jlen A' B' p' p_tp
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofTerm_snd {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i j : β„•} {A B p : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} :
                                      x ∈ I.ofTerm Ξ“ l (Expr.snd i j A B p) llen ↔ have llen_1 := β‹―; βˆƒ (ilen : i < s.length + 1), βˆƒ A' ∈ I.ofType Ξ“ i A ilen, βˆƒ B' ∈ I.ofType (Ξ“.snoc ilen A') l B llen_1, βˆƒ p' ∈ I.ofTerm Ξ“ (max i l) p β‹―, βˆƒ (p_tp : CategoryTheory.CategoryStruct.comp p' s[max i l].tp = s.mkSig ilen llen_1 A' B'), x = s.mkSnd ilen llen_1 A' B' p' p_tp
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofTerm_refl {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i : β„•} {t : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} :
                                      x ∈ I.ofTerm Ξ“ l (Expr.refl i t) llen ↔ βˆƒ t' ∈ I.ofTerm Ξ“ l t llen, x = s.mkRefl llen t'
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofTerm_idRec {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i j : β„•} {t M r u h : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} :
                                      x ∈ I.ofTerm Ξ“ l (Expr.idRec i j t M r u h) llen ↔ βˆƒ (ilen : i < s.length + 1), βˆƒ t' ∈ I.ofTerm Ξ“ i t ilen, βˆƒ (A' : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[i].Ty) (t_tp : CategoryTheory.CategoryStruct.comp t' s[i].tp = A') (B' : CategoryTheory.yoneda.obj (Ξ“.snoc ilen A').fst ⟢ s[i].Ty) (B_eq : s.mkId ilen (CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map (s[i].disp A')) A') (CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map (s[i].disp A')) t') (s[i].var A') β‹― β‹― = B'), βˆƒ M' ∈ I.ofType ((Ξ“.snoc ilen A').snoc ilen B') l M llen, βˆƒ r' ∈ I.ofTerm Ξ“ l r llen, βˆƒ (r_tp : CategoryTheory.CategoryStruct.comp r' s[l].tp = CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map (s[i].substCons (s[i].sec A' t' t_tp) B' (s.mkRefl ilen t') β‹―)) M'), βˆƒ u' ∈ I.ofTerm Ξ“ i u ilen, βˆƒ (u_tp : CategoryTheory.CategoryStruct.comp u' s[i].tp = A'), βˆƒ h' ∈ I.ofTerm Ξ“ i h ilen, βˆƒ (h_tp : CategoryTheory.CategoryStruct.comp h' s[i].tp = s.mkId ilen A' t' u' t_tp u_tp), x = s.mkIdRec ilen llen A' t' t_tp B' B_eq M' r' r_tp u' u_tp h' h_tp
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofTerm_code {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l : β„•} {t : Expr Ο‡} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} :
                                      x ∈ I.ofTerm Ξ“ l t.code llen ↔ βˆƒ (i : β„•) (li : l = i + 1), βˆƒ t' ∈ I.ofType Ξ“ i t β‹―, x = (fun (h : i + 1 = l) => Eq.ndrec (motive := fun {l : β„•} => {llen : l < s.length + 1} β†’ {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} β†’ (li : l = i + 1) β†’ (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[i].Ty) β†’ (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm)) (fun {llen : i + 1 < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[i + 1].Tm} (li : i + 1 = i + 1) (t' : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[i].Ty) => s.code β‹― t') h li t') β‹―
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofType_univ {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : s.CObj} {l i : β„•} {llen : l < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} :
                                      x ∈ I.ofType Ξ“ l (Expr.univ i) llen ↔ βˆƒ (li : l = i + 1), x = (fun (h : i + 1 = l) => Eq.ndrec (motive := fun {l : β„•} => {llen : l < s.length + 1} β†’ {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} β†’ l = i + 1 β†’ (CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty)) (fun {llen : i + 1 < s.length + 1} {x : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[i + 1].Ty} (li : i + 1 = i + 1) => UHom.wkU Ξ“.fst (s.homSucc i β‹―)) h li) β‹―
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.ofCtx_nil {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] :
                                      I.ofCtx [] = ↑(some s.nilCObj)
                                      @[simp]
                                      theorem NaturalModel.Universe.Interpretation.mem_ofCtx_snoc {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : List (Expr Ο‡ Γ— β„•)} {A : Expr Ο‡} {l : β„•} {sΞ“' : s.CObj} :
                                      sΞ“' ∈ I.ofCtx ((A, l) :: Ξ“) ↔ βˆƒ sΞ“ ∈ I.ofCtx Ξ“, βˆƒ (llen : l < s.length + 1), βˆƒ sA ∈ I.ofType sΞ“ l A llen, sΞ“' = sΞ“.snoc llen sA

                                      Semantic substitutions #

                                      inductive NaturalModel.Universe.Interpretation.CSb {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] (Ξ” Ξ“ : s.CObj) :
                                      (Ξ”.fst ⟢ Ξ“.fst) β†’ (full : optParam Bool true) β†’ Type (max u u_1)

                                      An inductive characterization of those semantic substitutions that appear in syntactic operations. We use this as an auxiliary device in the proof of semantic substitution admissibility.

                                      The family with full = false characterizes renamings, whereas full = true contains general substitutions but where composition is limited to renamings on the left.

                                      Instances For
                                        def NaturalModel.Universe.Interpretation.CSb.toSb {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] {I : Interpretation Ο‡ s} {Ξ” Ξ“ : s.CObj} {Οƒ : Ξ”.fst ⟢ Ξ“.fst} {full : Bool} :
                                        I.CSb Ξ” Ξ“ Οƒ full β†’ β„• β†’ Expr Ο‡
                                        Equations
                                        Instances For
                                          @[irreducible]
                                          theorem NaturalModel.Universe.Interpretation.CSb.toSb_is_bvar {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] {I : Interpretation Ο‡ s} {Ξ” Ξ“ : s.CObj} {Οƒ : Ξ”.fst ⟢ Ξ“.fst} (sΟƒ : I.CSb Ξ” Ξ“ Οƒ false) (i : β„•) :
                                          βˆƒ (j : β„•), sΟƒ.toSb i = Expr.bvar j
                                          def NaturalModel.Universe.Interpretation.CSb.snoc {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] {I : Interpretation Ο‡ s} {Ξ” Ξ“ : s.CObj} {Οƒ : Ξ”.fst ⟢ Ξ“.fst} (sΟƒ : I.CSb Ξ” Ξ“ Οƒ) {l : β„•} (llen : l < s.length + 1) (A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty) (e : Expr Ο‡) {se : CategoryTheory.yoneda.obj Ξ”.fst ⟢ s[l].Tm} (eq : CategoryTheory.CategoryStruct.comp se s[l].tp = CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map Οƒ) A) (H : se ∈ I.ofTerm Ξ” l e llen) :
                                          I.CSb Ξ” (Ξ“.snoc llen A) (s[l].substCons Οƒ A se eq)
                                          Equations
                                          • sΟƒ.snoc llen A e eq H = sΟƒ.snoc' llen A e β‹― eq H
                                          Instances For
                                            @[simp]
                                            theorem NaturalModel.Universe.Interpretation.CSb.snoc_toSb {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] {I : Interpretation Ο‡ s} {Ξ” Ξ“ : s.CObj} {Οƒ : Ξ”.fst ⟢ Ξ“.fst} (sΟƒ : I.CSb Ξ” Ξ“ Οƒ) {l : β„•} (llen : l < s.length + 1) (A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty) (e : Expr Ο‡) {se : CategoryTheory.yoneda.obj Ξ”.fst ⟢ s[l].Tm} (eq : CategoryTheory.CategoryStruct.comp se s[l].tp = CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map Οƒ) A) (H : se ∈ I.ofTerm Ξ” l e llen) :
                                            (sσ.snoc llen A e eq H).toSb = Expr.snoc sσ.toSb e
                                            def NaturalModel.Universe.Interpretation.CSb.sub1 {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] {I : Interpretation Ο‡ s} {Ξ“ : s.CObj} {l : β„•} (llen : l < s.length + 1) {se : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} (A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty) (e : Expr Ο‡) (eq : CategoryTheory.CategoryStruct.comp se s[l].tp = A) (H : se ∈ I.ofTerm Ξ“ l e llen) :
                                            I.CSb Ξ“ (Ξ“.snoc llen A) (s[l].sec A se eq)
                                            Equations
                                            Instances For
                                              @[simp]
                                              theorem NaturalModel.Universe.Interpretation.CSb.sub1_toSb {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] {I : Interpretation Ο‡ s} {Ξ“ : s.CObj} {l : β„•} (llen : l < s.length + 1) {se : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} (A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty) (e : Expr Ο‡) (eq : CategoryTheory.CategoryStruct.comp se s[l].tp = A) (H : se ∈ I.ofTerm Ξ“ l e llen) :
                                              (sub1 llen A e eq H).toSb = e.toSb
                                              def NaturalModel.Universe.Interpretation.CSb.up {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] {I : Interpretation Ο‡ s} {Ξ” Ξ“ : s.CObj} {Οƒ : Ξ”.fst ⟢ Ξ“.fst} {full : Bool} (sΟƒ : I.CSb Ξ” Ξ“ Οƒ full) {l : β„•} (llen : l < s.length + 1) (A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty) (A' : CategoryTheory.yoneda.obj Ξ”.fst ⟢ s[l].Ty := CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map Οƒ) A) (eq : CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map Οƒ) A = A' := by rfl) :
                                              I.CSb (Ξ”.snoc llen A') (Ξ“.snoc llen A) (s[l].substWk Οƒ A A' eq) full
                                              Equations
                                              Instances For
                                                @[simp]
                                                theorem NaturalModel.Universe.Interpretation.CSb.up_toSb {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] {I : Interpretation Ο‡ s} {Ξ” Ξ“ : s.CObj} {Οƒ : Ξ”.fst ⟢ Ξ“.fst} {full : Bool} (sΟƒ : I.CSb Ξ” Ξ“ Οƒ full) {l : β„•} {llen : l < s.length + 1} {A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} {A' : CategoryTheory.yoneda.obj Ξ”.fst ⟢ s[l].Ty} {eq : CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map Οƒ) A = A'} :
                                                (sσ.up llen A A' eq).toSb = Expr.up sσ.toSb

                                                Admissibility of substitution #

                                                theorem NaturalModel.Universe.Interpretation.mem_ofType_ofTerm_subst' {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {full : Bool} (IH : full = true β†’ βˆ€ {Ξ” Ξ“ : s.CObj} {l : β„•} (llen : l < s.length + 1) {sΟƒ : Ξ”.fst ⟢ Ξ“.fst} (Οƒ : I.CSb Ξ” Ξ“ sΟƒ false) {se : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} {e : Expr Ο‡}, se ∈ I.ofTerm Ξ“ l e llen β†’ CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map sΟƒ) se ∈ I.ofTerm Ξ” l (Expr.subst Οƒ.toSb e) llen) {e : Expr Ο‡} {l : β„•} (llen : l < s.length + 1) {Ξ” Ξ“ : s.CObj} {sΟƒ : Ξ”.fst ⟢ Ξ“.fst} (Οƒ : I.CSb Ξ” Ξ“ sΟƒ full) {Οƒ' : β„• β†’ Expr Ο‡} (eq : Οƒ.toSb = Οƒ') :
                                                (βˆ€ {sA : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty}, sA ∈ I.ofType Ξ“ l e llen β†’ CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map sΟƒ) sA ∈ I.ofType Ξ” l (Expr.subst Οƒ' e) llen) ∧ βˆ€ {se : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm}, se ∈ I.ofTerm Ξ“ l e llen β†’ CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map sΟƒ) se ∈ I.ofTerm Ξ” l (Expr.subst Οƒ' e) llen
                                                theorem NaturalModel.Universe.Interpretation.mem_ofType_ofTerm_subst {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {e : Expr Ο‡} {l : β„•} (llen : l < s.length + 1) {Ξ” Ξ“ : s.CObj} {sΟƒ : Ξ”.fst ⟢ Ξ“.fst} {full : Bool} (Οƒ : I.CSb Ξ” Ξ“ sΟƒ full) {Οƒ' : β„• β†’ Expr Ο‡} (eq : Οƒ.toSb = Οƒ') :
                                                (βˆ€ {sA : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty}, sA ∈ I.ofType Ξ“ l e llen β†’ CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map sΟƒ) sA ∈ I.ofType Ξ” l (Expr.subst Οƒ' e) llen) ∧ βˆ€ {se : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm}, se ∈ I.ofTerm Ξ“ l e llen β†’ CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map sΟƒ) se ∈ I.ofTerm Ξ” l (Expr.subst Οƒ' e) llen
                                                theorem NaturalModel.Universe.Interpretation.mem_ofType_wk {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {e : Expr Ο‡} {l l' : β„•} {hl : l < s.length + 1} (hl' : l' < s.length + 1) {Ξ“ : s.CObj} {X : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l'].Ty} {se : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Ty} (H : se ∈ I.ofType Ξ“ l e hl) :
                                                theorem NaturalModel.Universe.Interpretation.mem_ofTerm_wk {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {e : Expr Ο‡} {l l' : β„•} {hl : l < s.length + 1} (hl' : l' < s.length + 1) {Ξ“ : s.CObj} {X : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l'].Ty} {se : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l].Tm} (H : se ∈ I.ofTerm Ξ“ l e hl) :
                                                theorem NaturalModel.Universe.Interpretation.mem_ofType_toSb {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {e : Expr Ο‡} {l l' : β„•} {hl : l < s.length + 1} (hl' : l' < s.length + 1) {Ξ“ : s.CObj} {A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l'].Ty} {a : Expr Ο‡} {sa : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l'].Tm} (ha : sa ∈ I.ofTerm Ξ“ l' a hl') (eq : CategoryTheory.CategoryStruct.comp sa s[l'].tp = A) {se : CategoryTheory.yoneda.obj (Ξ“.snoc hl' A).fst ⟢ s[l].Ty} (H : se ∈ I.ofType (Ξ“.snoc hl' A) l e hl) :
                                                theorem NaturalModel.Universe.Interpretation.mem_ofTerm_toSb {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {e : Expr Ο‡} {l l' : β„•} {hl : l < s.length + 1} (hl' : l' < s.length + 1) {Ξ“ : s.CObj} {A : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l'].Ty} {a : Expr Ο‡} {sa : CategoryTheory.yoneda.obj Ξ“.fst ⟢ s[l'].Tm} (ha : sa ∈ I.ofTerm Ξ“ l' a hl') (eq : CategoryTheory.CategoryStruct.comp sa s[l'].tp = A) {se : CategoryTheory.yoneda.obj (Ξ“.snoc hl' A).fst ⟢ s[l].Tm} (H : se ∈ I.ofTerm (Ξ“.snoc hl' A) l e hl) :

                                                Soundness of interpretation #

                                                theorem NaturalModel.Universe.Interpretation.tp_sound {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {i : β„•} {A : Expr Ο‡} {l : β„•} (H : Lookup Ξ“ i A l) {sΞ“ : s.CObj} (hΞ“ : sΞ“ ∈ I.ofCtx Ξ“) :
                                                βˆƒ (llen : l < s.length + 1), βˆƒ sA ∈ sΞ“.tp llen i, sA ∈ I.ofType sΞ“ l A llen
                                                theorem NaturalModel.Universe.Interpretation.var_sound {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {i : β„•} {A : Expr Ο‡} {l : β„•} (H : Lookup Ξ“ i A l) {sΞ“ : s.CObj} (hΞ“ : sΞ“ ∈ I.ofCtx Ξ“) :
                                                βˆƒ (llen : l < s.length + 1), βˆƒ st ∈ sΞ“.var llen i, CategoryTheory.CategoryStruct.comp st s[l].tp ∈ I.ofType sΞ“ l A llen
                                                def NaturalModel.Universe.Interpretation.WfCtxIH {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] (Ξ“ : Ctx Ο‡) :
                                                Equations
                                                Instances For
                                                  def NaturalModel.Universe.Interpretation.WfTpIH {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] (Ξ“ : Ctx Ο‡) (l : β„•) (A : Expr Ο‡) :
                                                  Equations
                                                  Instances For
                                                    def NaturalModel.Universe.Interpretation.EqTpIH {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] (Ξ“ : Ctx Ο‡) (l : β„•) (A B : Expr Ο‡) :
                                                    Equations
                                                    Instances For
                                                      def NaturalModel.Universe.Interpretation.WfTmIH {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] (Ξ“ : Ctx Ο‡) (l : β„•) (A t : Expr Ο‡) :
                                                      Equations
                                                      Instances For
                                                        def NaturalModel.Universe.Interpretation.EqTmIH {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} (I : Interpretation Ο‡ s) [s.PiSeq] [s.SigSeq] [s.IdSeq] (Ξ“ : Ctx Ο‡) (l : β„•) (A t u : Expr Ο‡) :
                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For
                                                          theorem NaturalModel.Universe.Interpretation.EqTpIH.left {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {l : β„•} {A B : Expr Ο‡} :
                                                          I.EqTpIH Ξ“ l A B β†’ I.WfTpIH Ξ“ l A
                                                          theorem NaturalModel.Universe.Interpretation.WfTpIH.refl {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {l : β„•} {A : Expr Ο‡} :
                                                          I.WfTpIH Ξ“ l A β†’ I.EqTpIH Ξ“ l A A
                                                          theorem NaturalModel.Universe.Interpretation.EqTpIH.symm {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' : Expr Ο‡} {l : β„•} :
                                                          I.EqTpIH Ξ“ l A A' β†’ I.EqTpIH Ξ“ l A' A
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.left {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {l : β„•} {A t u : Expr Ο‡} :
                                                          I.EqTmIH Ξ“ l A t u β†’ I.WfTmIH Ξ“ l A t
                                                          theorem NaturalModel.Universe.Interpretation.WfTmIH.refl {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {l : β„•} {A t : Expr Ο‡} :
                                                          I.WfTmIH Ξ“ l A t β†’ I.EqTmIH Ξ“ l A t t
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.symm {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {l : β„•} {A t u : Expr Ο‡} :
                                                          I.EqTmIH Ξ“ l A t u β†’ I.EqTmIH Ξ“ l A u t
                                                          theorem NaturalModel.Universe.Interpretation.WfCtxIH.nil {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] :
                                                          theorem NaturalModel.Universe.Interpretation.WfCtxIH.snoc {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A : Expr Ο‡} {l : β„•} :
                                                          I.WfTpIH Ξ“ l A β†’ I.WfCtxIH ((A, l) :: Ξ“)
                                                          theorem NaturalModel.Universe.Interpretation.WfTpIH.univ {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] (slen : univMax ≀ s.length) {Ξ“ : Ctx Ο‡} {l : β„•} :
                                                          l < univMax β†’ I.WfCtxIH Ξ“ β†’ I.WfTpIH Ξ“ (l + 1) (Expr.univ l)
                                                          theorem NaturalModel.Universe.Interpretation.EqTpIH.pi {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' B B' : Expr Ο‡} {l l' : β„•} :
                                                          I.EqTpIH Ξ“ l A A' β†’ I.EqTpIH ((A, l) :: Ξ“) l' B B' β†’ I.EqTpIH Ξ“ (max l l') (Expr.pi l l' A B) (Expr.pi l l' A' B')
                                                          theorem NaturalModel.Universe.Interpretation.EqTpIH.sigma {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' B B' : Expr Ο‡} {l l' : β„•} :
                                                          I.EqTpIH Ξ“ l A A' β†’ I.EqTpIH ((A, l) :: Ξ“) l' B B' β†’ I.EqTpIH Ξ“ (max l l') (Expr.sigma l l' A B) (Expr.sigma l l' A' B')
                                                          theorem NaturalModel.Universe.Interpretation.EqTpIH.Id {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' t t' u u' : Expr Ο‡} {l : β„•} :
                                                          I.EqTpIH Ξ“ l A A' β†’ I.EqTmIH Ξ“ l A t t' β†’ I.EqTmIH Ξ“ l A u u' β†’ I.EqTpIH Ξ“ l (Expr.Id l A t u) (Expr.Id l A' t' u')
                                                          theorem NaturalModel.Universe.Interpretation.EqTpIH.el {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' : Expr Ο‡} {l : β„•} :
                                                          I.EqTmIH Ξ“ (l + 1) (Expr.univ l) A A' β†’ I.EqTpIH Ξ“ l A.el A'.el
                                                          theorem NaturalModel.Universe.Interpretation.EqTpIH.el_code {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] (slen : univMax ≀ s.length) {Ξ“ : Ctx Ο‡} {A : Expr Ο‡} {l : β„•} :
                                                          l < univMax β†’ I.WfTpIH Ξ“ l A β†’ I.EqTpIH Ξ“ l A.code.el A
                                                          theorem NaturalModel.Universe.Interpretation.EqTpIH.trans {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' A'' : Expr Ο‡} {l : β„•} :
                                                          I.EqTpIH Ξ“ l A A' β†’ I.EqTpIH Ξ“ l A' A'' β†’ I.EqTpIH Ξ“ l A A''
                                                          theorem NaturalModel.Universe.Interpretation.WfTmIH.bvar {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A : Expr Ο‡} {i l : β„•} (H : Lookup Ξ“ i A l) :
                                                          I.WfCtxIH Ξ“ β†’ I.WfTmIH Ξ“ l A (Expr.bvar i)
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.lam {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' B t t' : Expr Ο‡} {l l' : β„•} :
                                                          I.EqTpIH Ξ“ l A A' β†’ I.EqTmIH ((A, l) :: Ξ“) l' B t t' β†’ I.EqTmIH Ξ“ (max l l') (Expr.pi l l' A B) (Expr.lam l l' A t) (Expr.lam l l' A' t')
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.app {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : List (Expr Ο‡ Γ— β„•)} {A B B' f f' a a' : Expr Ο‡} {l l' : β„•} :
                                                          I.EqTpIH ((A, l) :: Ξ“) l' B B' β†’ I.EqTmIH Ξ“ (max l l') (Expr.pi l l' A B) f f' β†’ I.EqTmIH Ξ“ l A a a' β†’ I.EqTmIH Ξ“ l' (Expr.subst a.toSb B) (Expr.app l l' B f a) (Expr.app l l' B' f' a')
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.pair {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : List (Expr Ο‡ Γ— β„•)} {A B B' t t' u u' : Expr Ο‡} {l l' : β„•} :
                                                          I.EqTpIH ((A, l) :: Ξ“) l' B B' β†’ I.EqTmIH Ξ“ l A t t' β†’ I.EqTmIH Ξ“ l' (Expr.subst t.toSb B) u u' β†’ I.EqTmIH Ξ“ (max l l') (Expr.sigma l l' A B) (Expr.pair l l' B t u) (Expr.pair l l' B' t' u')
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.fst_snd {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' B B' p p' : Expr Ο‡} {l l' : β„•} :
                                                          I.EqTpIH Ξ“ l A A' β†’ I.EqTpIH ((A, l) :: Ξ“) l' B B' β†’ I.EqTmIH Ξ“ (max l l') (Expr.sigma l l' A B) p p' β†’ I.EqTmIH Ξ“ l A (Expr.fst l l' A B p) (Expr.fst l l' A' B' p') ∧ I.EqTmIH Ξ“ l' (Expr.subst (Expr.fst l l' A B p).toSb B) (Expr.snd l l' A B p) (Expr.snd l l' A' B' p')
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.refl_tm {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A t t' : Expr Ο‡} {l : β„•} :
                                                          I.EqTmIH Ξ“ l A t t' β†’ I.EqTmIH Ξ“ l (Expr.Id l A t t) (Expr.refl l t) (Expr.refl l t')
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.idRec {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A M M' t t' r r' u u' h h' : Expr Ο‡} {l l' : β„•} :
                                                          I.EqTmIH Ξ“ l A t t' β†’ I.EqTpIH ((Expr.Id l (Expr.subst Expr.wk A) (Expr.subst Expr.wk t) (Expr.bvar 0), l) :: (A, l) :: Ξ“) l' M M' β†’ I.EqTmIH Ξ“ l' (Expr.subst (Expr.snoc t.toSb (Expr.refl l t)) M) r r' β†’ I.EqTmIH Ξ“ l A u u' β†’ I.EqTmIH Ξ“ l (Expr.Id l A t u) h h' β†’ I.EqTmIH Ξ“ l' (Expr.subst (Expr.snoc u.toSb h) M) (Expr.idRec l l' t M r u h) (Expr.idRec l l' t' M' r' u' h')
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.code {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] (slen : univMax ≀ s.length) {Ξ“ : Ctx Ο‡} {A A' : Expr Ο‡} {l : β„•} :
                                                          l < univMax β†’ I.EqTpIH Ξ“ l A A' β†’ I.EqTmIH Ξ“ (l + 1) (Expr.univ l) A.code A'.code
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.app_lam {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : List (Expr Ο‡ Γ— β„•)} {A B t u : Expr Ο‡} {l l' : β„•} :
                                                          I.WfTmIH ((A, l) :: Ξ“) l' B t β†’ I.WfTmIH Ξ“ l A u β†’ I.EqTmIH Ξ“ l' (Expr.subst u.toSb B) (Expr.app l l' B (Expr.lam l l' A t) u) (Expr.subst u.toSb t)
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.fst_snd_pair {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : List (Expr Ο‡ Γ— β„•)} {A B t u : Expr Ο‡} {l l' : β„•} :
                                                          I.WfTpIH ((A, l) :: Ξ“) l' B β†’ I.WfTmIH Ξ“ l A t β†’ I.WfTmIH Ξ“ l' (Expr.subst t.toSb B) u β†’ I.EqTmIH Ξ“ l A (Expr.fst l l' A B (Expr.pair l l' B t u)) t ∧ I.EqTmIH Ξ“ l' (Expr.subst t.toSb B) (Expr.snd l l' A B (Expr.pair l l' B t u)) u
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.idRec_refl {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A M t r : Expr Ο‡} {l l' : β„•} :
                                                          I.WfTmIH Ξ“ l A t β†’ I.WfTpIH ((Expr.Id l (Expr.subst Expr.wk A) (Expr.subst Expr.wk t) (Expr.bvar 0), l) :: (A, l) :: Ξ“) l' M β†’ I.WfTmIH Ξ“ l' (Expr.subst (Expr.snoc t.toSb (Expr.refl l t)) M) r β†’ I.EqTmIH Ξ“ l' (Expr.subst (Expr.snoc t.toSb (Expr.refl l t)) M) (Expr.idRec l l' t M r t (Expr.refl l t)) r
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.lam_app {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A B f : Expr Ο‡} {l l' : β„•} :
                                                          I.WfTmIH Ξ“ (max l l') (Expr.pi l l' A B) f β†’ I.EqTmIH Ξ“ (max l l') (Expr.pi l l' A B) f (Expr.lam l l' A (Expr.app l l' (Expr.subst (Expr.up Expr.wk) B) (Expr.subst Expr.wk f) (Expr.bvar 0)))
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.pair_fst_snd {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A B p : Expr Ο‡} {l l' : β„•} :
                                                          I.WfTmIH Ξ“ (max l l') (Expr.sigma l l' A B) p β†’ I.EqTmIH Ξ“ (max l l') (Expr.sigma l l' A B) p (Expr.pair l l' B (Expr.fst l l' A B p) (Expr.snd l l' A B p))
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.code_el {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {a : Expr Ο‡} {l : β„•} :
                                                          I.WfTmIH Ξ“ (l + 1) (Expr.univ l) a β†’ I.EqTmIH Ξ“ (l + 1) (Expr.univ l) a a.el.code
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.conv {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A A' t t' : Expr Ο‡} {l : β„•} :
                                                          I.EqTmIH Ξ“ l A t t' β†’ I.EqTpIH Ξ“ l A A' β†’ I.EqTmIH Ξ“ l A' t t'
                                                          theorem NaturalModel.Universe.Interpretation.EqTmIH.trans {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {Ξ“ : Ctx Ο‡} {A t t' t'' : Expr Ο‡} {l : β„•} :
                                                          I.EqTmIH Ξ“ l A t t' β†’ I.EqTmIH Ξ“ l A t' t'' β†’ I.EqTmIH Ξ“ l A t t''
                                                          structure NaturalModel.Universe.Interpretation.Wf {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} [s.PiSeq] [s.SigSeq] [s.IdSeq] (slen : univMax ≀ s.length) (I : Interpretation Ο‡ s) (E : Axioms Ο‡) :

                                                          I is a well-formed interpretation of the axiom environment E.

                                                          Instances For
                                                            theorem NaturalModel.Universe.Interpretation.WfTmIH.ax {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} {c : Ο‡} {Al : { Al : Expr Ο‡ Γ— β„• // Expr.isClosed 0 Al.1 = true ∧ Al.2 ≀ univMax }} (Ec : E c = some Al) :
                                                            I.WfCtxIH Ξ“ β†’ I.WfTmIH Ξ“ (↑Al).2 (↑Al).1 (Expr.ax c (↑Al).1)
                                                            theorem NaturalModel.Universe.Interpretation.ofType_ofTerm_sound {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] :
                                                            (βˆ€ {Ξ“ : Ctx Ο‡}, WfCtx E Ξ“ β†’ I.WfCtxIH Ξ“) ∧ (βˆ€ {Ξ“ : Ctx Ο‡} {l : β„•} {A : Expr Ο‡}, E ∣ Ξ“ ⊒[l] A β†’ I.WfTpIH Ξ“ l A) ∧ (βˆ€ {Ξ“ : Ctx Ο‡} {l : β„•} {A B : Expr Ο‡}, E ∣ Ξ“ ⊒[l] A ≑ B β†’ I.EqTpIH Ξ“ l A B) ∧ (βˆ€ {Ξ“ : Ctx Ο‡} {l : β„•} {A t : Expr Ο‡}, E ∣ Ξ“ ⊒[l] t : A β†’ I.WfTmIH Ξ“ l A t) ∧ βˆ€ {Ξ“ : Ctx Ο‡} {l : β„•} {A t u : Expr Ο‡}, E ∣ Ξ“ ⊒[l] t ≑ u : A β†’ I.EqTmIH Ξ“ l A t u

                                                            Interpretation API #

                                                            def NaturalModel.Universe.Interpretation.interpCtx {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} (H : WfCtx E Ξ“) :

                                                            Given Ξ“ s.t. WfCtx Ξ“, return βŸ¦Ξ“βŸ§.

                                                            Equations
                                                            Instances For
                                                              @[simp]
                                                              theorem NaturalModel.Universe.Interpretation.interpCtx_mem {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} (H : WfCtx E Ξ“) :
                                                              def NaturalModel.Universe.Interpretation.interpTy {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} {A : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] A) :

                                                              Given Ξ“, l, A s.t. Ξ“ ⊒[l] A, return ⟦A⟧_βŸ¦Ξ“βŸ§.

                                                              Equations
                                                              Instances For
                                                                @[simp]
                                                                theorem NaturalModel.Universe.Interpretation.interpTy_mem {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} {A : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] A) :
                                                                interpTy H ∈ I.ofType (interpCtx β‹―) l A β‹―
                                                                theorem NaturalModel.Universe.Interpretation.interpTy_eq {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} {A B : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] A ≑ B) :
                                                                interpTy β‹― = interpTy β‹―
                                                                def NaturalModel.Universe.Interpretation.interpTm {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} {A t : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] t : A) :

                                                                Given Ξ“, l, t, A s.t. Ξ“ ⊒[l] t : A, return ⟦t⟧_βŸ¦Ξ“βŸ§.

                                                                Equations
                                                                Instances For
                                                                  @[simp]
                                                                  theorem NaturalModel.Universe.Interpretation.interpTm_mem {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} {A t : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] t : A) :
                                                                  interpTm H ∈ I.ofTerm (interpCtx β‹―) l t β‹―
                                                                  @[simp]
                                                                  theorem NaturalModel.Universe.Interpretation.interpTm_tp {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} {A t : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] t : A) :
                                                                  theorem NaturalModel.Universe.Interpretation.interpTm_eq {π’ž : Type u} [CategoryTheory.SmallCategory π’ž] [CategoryTheory.ChosenTerminal π’ž] {s : UHomSeq π’ž} {Ο‡ : Type u_1} {I : Interpretation Ο‡ s} [s.PiSeq] [s.SigSeq] [s.IdSeq] {slen : univMax ≀ s.length} {E : Axioms Ο‡} [Iwf : Fact (Wf slen I E)] {Ξ“ : Ctx Ο‡} {A t u : Expr Ο‡} {l : β„•} (H : E ∣ Ξ“ ⊒[l] t ≑ u : A) :
                                                                  interpTm β‹― = interpTm β‹―
                                                                  Equations
                                                                  Instances For
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For