Documentation

Linglib.Core.ModelTheory.ManySorted.LanguageMap

Maps between many-sorted languages #

A map between two languages over the same sorts sends each symbol to a symbol with arguments of the same shape and a result of the same sort, as FirstOrder.Language.LHom does for the first-order languages of mathlib. Along a map a term of the first language is a term of the second, a structure for the second restricts to one for the first, and where a structure for the second expands one for the first, interpreting the image of each symbol as the symbol, a term keeps its value. Each of two languages maps into their sum, whose structure expands both.

Main definitions #

Implementation notes #

The declarations are those of Mathlib/ModelTheory/LanguageMap.lean, in its order and under its names, for function symbols typed by shape and sort. Two things differ. The structures are arguments of IsExpansionOn, where mathlib takes them as instances, since a language here has several structures over the same domains; the instances of mathlib are theorems here. And pi_isExpansionOn has no counterpart, the structure on values that depend on a parameter being defined here.

structure ManySorted.Language.LHom {S : Type u} (L L' : Language S) :
Type (max u v)

A language homomorphism maps the symbols of one language to symbols of another, with arguments of the same shape and a result of the same sort.

Instances For
    def ManySorted.«term_→ᴸ_» :
    Lean.TrailingParserDescr

    A language homomorphism maps the symbols of one language to symbols of another, with arguments of the same shape and a result of the same sort.

    Equations
    • ManySorted.«term_→ᴸ_» = Lean.ParserDescr.trailingNode `ManySorted.«term_→ᴸ_» 10 10 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " →ᴸ ") (Lean.ParserDescr.cat `term 11))
    Instances For
      @[instance_reducible]
      def ManySorted.Language.LHom.reduct {S : Type u} {L L' : Language S} {D : S → Type x} (φ : L.LHom L') (M' : L'.Structure D) :

      Pulls a structure back along a language map.

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

        The identity language homomorphism.

        Equations
        Instances For
          @[simp]
          theorem ManySorted.Language.LHom.id_onFunction {S : Type u} (L : Language S) (x✝ : Signature S) (x✝¹ : S) (a : L.Functions x✝ x✝¹) :
          (LHom.id L).onFunction a = id a
          def ManySorted.Language.LHom.sumInl {S : Type u} {L L' : Language S} :
          L.LHom (L.sum L')

          The inclusion of the left factor into the sum of two languages.

          Equations
          Instances For
            @[simp]
            theorem ManySorted.Language.LHom.sumInl_onFunction {S : Type u} {L L' : Language S} (x✝ : Signature S) (x✝¹ : S) (f : L.Functions x✝ x✝¹) :
            def ManySorted.Language.LHom.sumInr {S : Type u} {L L' : Language S} :
            L'.LHom (L.sum L')

            The inclusion of the right factor into the sum of two languages.

            Equations
            Instances For
              @[simp]
              theorem ManySorted.Language.LHom.sumInr_onFunction {S : Type u} {L L' : Language S} (x✝ : Signature S) (x✝¹ : S) (f : L'.Functions x✝ x✝¹) :
              theorem ManySorted.Language.LHom.funext {S : Type u} {L L' : Language S} {F G : L.LHom L'} (h_fun : F.onFunction = G.onFunction) :
              F = G
              theorem ManySorted.Language.LHom.funext_iff {S : Type u} {L L' : Language S} {F G : L.LHom L'} :
              F = G ↔ F.onFunction = G.onFunction
              def ManySorted.Language.LHom.comp {S : Type u} {L L' L'' : Language S} (g : L'.LHom L'') (f : L.LHom L') :
              L.LHom L''

              The composition of two language homomorphisms.

              Equations
              Instances For
                @[simp]
                theorem ManySorted.Language.LHom.comp_onFunction {S : Type u} {L L' L'' : Language S} (g : L'.LHom L'') (f : L.LHom L') (x✝ : Signature S) (x✝¹ : S) (F : L.Functions x✝ x✝¹) :
                def ManySorted.«term_∘ᴸ_» :
                Lean.TrailingParserDescr

                The composition of two language homomorphisms.

                Equations
                • ManySorted.«term_∘ᴸ_» = Lean.ParserDescr.trailingNode `ManySorted.«term_∘ᴸ_» 60 60 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ∘ᴸ ") (Lean.ParserDescr.cat `term 61))
                Instances For
                  @[simp]
                  theorem ManySorted.Language.LHom.id_comp {S : Type u} {L L' : Language S} (F : L.LHom L') :
                  (LHom.id L').comp F = F
                  @[simp]
                  theorem ManySorted.Language.LHom.comp_id {S : Type u} {L L' : Language S} (F : L.LHom L') :
                  F.comp (LHom.id L) = F
                  theorem ManySorted.Language.LHom.comp_assoc {S : Type u} {L L' L'' L3 : Language S} (F : L''.LHom L3) (G : L'.LHom L'') (H : L.LHom L') :
                  (F.comp G).comp H = F.comp (G.comp H)
                  def ManySorted.Language.LHom.sumElim {S : Type u} {L L' : Language S} (φ : L.LHom L') {L'' : Language S} (ψ : L''.LHom L') :
                  (L.sum L'').LHom L'

                  A language map defined on two factors of a sum.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[simp]
                    theorem ManySorted.Language.LHom.sumElim_onFunction_inl {S : Type u} {L L' : Language S} (φ : L.LHom L') {L'' : Language S} (ψ : L''.LHom L') {σ : Signature S} {t : S} (f : L.Functions σ t) :
                    @[simp]
                    theorem ManySorted.Language.LHom.sumElim_onFunction_inr {S : Type u} {L L' : Language S} (φ : L.LHom L') {L'' : Language S} (ψ : L''.LHom L') {σ : Signature S} {t : S} (f : L''.Functions σ t) :
                    theorem ManySorted.Language.LHom.sumElim_comp_inl {S : Type u} {L L' : Language S} (φ : L.LHom L') {L'' : Language S} (ψ : L''.LHom L') :
                    (φ.sumElim ψ).comp LHom.sumInl = φ
                    theorem ManySorted.Language.LHom.sumElim_comp_inr {S : Type u} {L L' : Language S} (φ : L.LHom L') {L'' : Language S} (ψ : L''.LHom L') :
                    (φ.sumElim ψ).comp LHom.sumInr = ψ
                    theorem ManySorted.Language.LHom.comp_sumElim {S : Type u} {L L' : Language S} (φ : L.LHom L') {L'' : Language S} (ψ : L''.LHom L') {L3 : Language S} (θ : L'.LHom L3) :
                    θ.comp (φ.sumElim ψ) = (θ.comp φ).sumElim (θ.comp ψ)
                    def ManySorted.Language.LHom.sumMap {S : Type u} {L L' : Language S} (φ : L.LHom L') {L₁ L₂ : Language S} (ψ : L₁.LHom L₂) :
                    (L.sum L₁).LHom (L'.sum L₂)

                    The map between two sum-languages induced by maps on the two factors.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[simp]
                      theorem ManySorted.Language.LHom.sumMap_onFunction_inl {S : Type u} {L L' : Language S} (φ : L.LHom L') {L₁ L₂ : Language S} (ψ : L₁.LHom L₂) {σ : Signature S} {t : S} (f : L.Functions σ t) :
                      @[simp]
                      theorem ManySorted.Language.LHom.sumMap_onFunction_inr {S : Type u} {L L' : Language S} (φ : L.LHom L') {L₁ L₂ : Language S} (ψ : L₁.LHom L₂) {σ : Signature S} {t : S} (f : L₁.Functions σ t) :
                      @[simp]
                      theorem ManySorted.Language.LHom.sumMap_comp_inl {S : Type u} {L L' : Language S} (φ : L.LHom L') {L₁ L₂ : Language S} (ψ : L₁.LHom L₂) :
                      @[simp]
                      theorem ManySorted.Language.LHom.sumMap_comp_inr {S : Type u} {L L' : Language S} (φ : L.LHom L') {L₁ L₂ : Language S} (ψ : L₁.LHom L₂) :

                      Expansions #

                      structure ManySorted.Language.LHom.IsExpansionOn {S : Type u} {L L' : Language S} {D : S → Type x} (φ : L.LHom L') (M : L.Structure D) (M' : L'.Structure D) :

                      A language homomorphism is an expansion on a pair of structures if it commutes with the interpretation of all symbols.

                      Instances For
                        theorem ManySorted.Language.LHom.id_isExpansionOn {S : Type u} {L : Language S} {D : S → Type x} (M : L.Structure D) :
                        theorem ManySorted.Language.LHom.sumElim_isExpansionOn {S : Type u} {L L' : Language S} {D : S → Type x} {φ : L.LHom L'} {L'' : Language S} {ψ : L''.LHom L'} {M : L.Structure D} {M' : L'.Structure D} {M'' : L''.Structure D} (hφ : φ.IsExpansionOn M M') (hψ : ψ.IsExpansionOn M'' M') :
                        (φ.sumElim ψ).IsExpansionOn (M.sum M'') M'
                        theorem ManySorted.Language.LHom.sumMap_isExpansionOn {S : Type u} {L L' : Language S} {D : S → Type x} {φ : L.LHom L'} {L₁ L₂ : Language S} {ψ : L₁.LHom L₂} {M : L.Structure D} {M' : L'.Structure D} {M₁ : L₁.Structure D} {M₂ : L₂.Structure D} (hφ : φ.IsExpansionOn M M') (hψ : ψ.IsExpansionOn M₁ M₂) :
                        (φ.sumMap ψ).IsExpansionOn (M.sum M₁) (M'.sum M₂)
                        theorem ManySorted.Language.LHom.sumInl_isExpansionOn {S : Type u} {L L' : Language S} {D : S → Type x} (M : L.Structure D) (M' : L'.Structure D) :
                        theorem ManySorted.Language.LHom.sumInr_isExpansionOn {S : Type u} {L L' : Language S} {D : S → Type x} (M : L.Structure D) (M' : L'.Structure D) :
                        theorem ManySorted.Language.LHom.isExpansionOn_reduct {S : Type u} {L L' : Language S} {D : S → Type x} (φ : L.LHom L') (M' : L'.Structure D) :
                        φ.IsExpansionOn (φ.reduct M') M'
                        theorem ManySorted.Language.LHom.pi_isExpansionOn {S : Type u} {L L' : Language S} {D : S → Type x} {φ : L.LHom L'} {M : L.Structure D} {M' : L'.Structure D} (h : φ.IsExpansionOn M M') (A : Type x) :

                        An expansion is one of the structures on values that depend on a parameter.

                        Terms #

                        def ManySorted.Language.LHom.onTerm {S : Type u} {L L' : Language S} {α : S → Type w} (φ : L.LHom L') {σ : Signature S} :
                        L.Term α σ → L'.Term α σ

                        Maps a term's symbols along a language map.

                        Equations
                        Instances For
                          @[simp]
                          theorem ManySorted.Language.LHom.id_onTerm {S : Type u} {L : Language S} {α : S → Type w} {σ : Signature S} (t : L.Term α σ) :
                          (LHom.id L).onTerm t = t
                          @[simp]
                          theorem ManySorted.Language.LHom.comp_onTerm {S : Type u} {L L' : Language S} {α : S → Type w} {L'' : Language S} (ψ : L'.LHom L'') (φ : L.LHom L') {σ : Signature S} (t : L.Term α σ) :
                          (ψ.comp φ).onTerm t = ψ.onTerm (φ.onTerm t)
                          @[simp]
                          theorem ManySorted.Language.LHom.realize_onTerm {S : Type u} {L L' : Language S} {α : S → Type w} {D : S → Type x} {φ : L.LHom L'} {M : L.Structure D} {M' : L'.Structure D} (h : φ.IsExpansionOn M M') (ρ : {s : S} → α s → D s) {σ : Signature S} (t : L.Term α σ) :
                          Term.realize M' (fun {s : S} => ρ) (φ.onTerm t) = Term.realize M (fun {s : S} => ρ) t