Documentation

Mathlib.ModelTheory.LanguageMap

Language Maps #

Maps between first-order languages in the style of the Flypitch project, as well as several important maps between structures.

Main Definitions #

References #

For the Flypitch project:

structure FirstOrder.Language.LHom (L : FirstOrder.Language) (L' : FirstOrder.Language) :
Type (max (max (max u u') v) v')

A language homomorphism maps the symbols of one language to symbols of another.

  • onFunction : n : ⦄ → L.Functions nL'.Functions n
  • onRelation : n : ⦄ → L.Relations nL'.Relations n
Instances For

    A language homomorphism maps the symbols of one language to symbols of another.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def FirstOrder.Language.LHom.mk₂ {L' : FirstOrder.Language} {c : Type u} {f₁ : Type u} {f₂ : Type u} {r₁ : Type v} {r₂ : Type v} (φ₀ : cFirstOrder.Language.Constants L') (φ₁ : f₁L'.Functions 1) (φ₂ : f₂L'.Functions 2) (φ₁' : r₁L'.Relations 1) (φ₂' : r₂L'.Relations 2) :
      FirstOrder.Language.mk₂ c f₁ f₂ r₁ r₂ →ᴸ L'

      Defines a map between languages defined with Language.mk₂.

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

        Pulls a structure back along a language map.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem FirstOrder.Language.LHom.id_onRelation (L : FirstOrder.Language) (_n : ) (a : L.Relations _n) :
          (FirstOrder.Language.LHom.id L).onRelation a = id a
          @[simp]
          theorem FirstOrder.Language.LHom.id_onFunction (L : FirstOrder.Language) (_n : ) (a : L.Functions _n) :
          (FirstOrder.Language.LHom.id L).onFunction a = id a

          The identity language homomorphism.

          Equations
          Instances For
            Equations
            @[simp]
            theorem FirstOrder.Language.LHom.sumInl_onFunction {L : FirstOrder.Language} {L' : FirstOrder.Language} (_n : ) (val : L.Functions _n) :
            FirstOrder.Language.LHom.sumInl.onFunction val = Sum.inl val
            @[simp]
            theorem FirstOrder.Language.LHom.sumInl_onRelation {L : FirstOrder.Language} {L' : FirstOrder.Language} (_n : ) (val : L.Relations _n) :
            FirstOrder.Language.LHom.sumInl.onRelation val = Sum.inl val

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

            Equations
            • FirstOrder.Language.LHom.sumInl = { onFunction := fun (_n : ) => Sum.inl, onRelation := fun (_n : ) => Sum.inl }
            Instances For
              @[simp]
              theorem FirstOrder.Language.LHom.sumInr_onRelation {L : FirstOrder.Language} {L' : FirstOrder.Language} (_n : ) (val : L'.Relations _n) :
              FirstOrder.Language.LHom.sumInr.onRelation val = Sum.inr val
              @[simp]
              theorem FirstOrder.Language.LHom.sumInr_onFunction {L : FirstOrder.Language} {L' : FirstOrder.Language} (_n : ) (val : L'.Functions _n) :
              FirstOrder.Language.LHom.sumInr.onFunction val = Sum.inr val

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

              Equations
              • FirstOrder.Language.LHom.sumInr = { onFunction := fun (_n : ) => Sum.inr, onRelation := fun (_n : ) => Sum.inr }
              Instances For

                The inclusion of an empty language into any other language.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem FirstOrder.Language.LHom.funext {L : FirstOrder.Language} {L' : FirstOrder.Language} {F : L →ᴸ L'} {G : L →ᴸ L'} (h_fun : F.onFunction = G.onFunction) (h_rel : F.onRelation = G.onRelation) :
                  F = G
                  Equations
                  theorem FirstOrder.Language.LHom.mk₂_funext {L' : FirstOrder.Language} {c : Type u} {f₁ : Type u} {f₂ : Type u} {r₁ : Type v} {r₂ : Type v} {F : FirstOrder.Language.mk₂ c f₁ f₂ r₁ r₂ →ᴸ L'} {G : FirstOrder.Language.mk₂ c f₁ f₂ r₁ r₂ →ᴸ L'} (h0 : ∀ (c_1 : FirstOrder.Language.Constants (FirstOrder.Language.mk₂ c f₁ f₂ r₁ r₂)), F.onFunction c_1 = G.onFunction c_1) (h1 : ∀ (f : (FirstOrder.Language.mk₂ c f₁ f₂ r₁ r₂).Functions 1), F.onFunction f = G.onFunction f) (h2 : ∀ (f : (FirstOrder.Language.mk₂ c f₁ f₂ r₁ r₂).Functions 2), F.onFunction f = G.onFunction f) (h1' : ∀ (r : (FirstOrder.Language.mk₂ c f₁ f₂ r₁ r₂).Relations 1), F.onRelation r = G.onRelation r) (h2' : ∀ (r : (FirstOrder.Language.mk₂ c f₁ f₂ r₁ r₂).Relations 2), F.onRelation r = G.onRelation r) :
                  F = G
                  @[simp]
                  theorem FirstOrder.Language.LHom.comp_onFunction {L : FirstOrder.Language} {L' : FirstOrder.Language} {L'' : FirstOrder.Language} (g : L' →ᴸ L'') (f : L →ᴸ L') (_n : ) (F : L.Functions _n) :
                  (FirstOrder.Language.LHom.comp g f).onFunction F = g.onFunction (f.onFunction F)
                  @[simp]
                  theorem FirstOrder.Language.LHom.comp_onRelation {L : FirstOrder.Language} {L' : FirstOrder.Language} {L'' : FirstOrder.Language} (g : L' →ᴸ L'') (f : L →ᴸ L') :
                  ∀ (x : ) (R : L.Relations x), (FirstOrder.Language.LHom.comp g f).onRelation R = g.onRelation (f.onRelation R)

                  The composition of two language homomorphisms.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[simp]
                    theorem FirstOrder.Language.LHom.sumElim_onFunction {L : FirstOrder.Language} {L' : FirstOrder.Language} (ϕ : L →ᴸ L') {L'' : FirstOrder.Language} (ψ : L'' →ᴸ L') (_n : ) :
                    ∀ (a : L.Functions _n L''.Functions _n), (FirstOrder.Language.LHom.sumElim ϕ ψ).onFunction a = Sum.elim (fun (f : L.Functions _n) => ϕ.onFunction f) (fun (f : L''.Functions _n) => ψ.onFunction f) a
                    @[simp]
                    theorem FirstOrder.Language.LHom.sumElim_onRelation {L : FirstOrder.Language} {L' : FirstOrder.Language} (ϕ : L →ᴸ L') {L'' : FirstOrder.Language} (ψ : L'' →ᴸ L') (_n : ) :
                    ∀ (a : L.Relations _n L''.Relations _n), (FirstOrder.Language.LHom.sumElim ϕ ψ).onRelation a = Sum.elim (fun (f : L.Relations _n) => ϕ.onRelation f) (fun (f : L''.Relations _n) => ψ.onRelation f) a

                    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 FirstOrder.Language.LHom.sumMap_onRelation {L : FirstOrder.Language} {L' : FirstOrder.Language} (ϕ : L →ᴸ L') {L₁ : FirstOrder.Language} {L₂ : FirstOrder.Language} (ψ : L₁ →ᴸ L₂) (_n : ) :
                      ∀ (a : L.Relations _n L₁.Relations _n), (FirstOrder.Language.LHom.sumMap ϕ ψ).onRelation a = Sum.map (fun (f : L.Relations _n) => ϕ.onRelation f) (fun (f : L₁.Relations _n) => ψ.onRelation f) a
                      @[simp]
                      theorem FirstOrder.Language.LHom.sumMap_onFunction {L : FirstOrder.Language} {L' : FirstOrder.Language} (ϕ : L →ᴸ L') {L₁ : FirstOrder.Language} {L₂ : FirstOrder.Language} (ψ : L₁ →ᴸ L₂) (_n : ) :
                      ∀ (a : L.Functions _n L₁.Functions _n), (FirstOrder.Language.LHom.sumMap ϕ ψ).onFunction a = Sum.map (fun (f : L.Functions _n) => ϕ.onFunction f) (fun (f : L₁.Functions _n) => ψ.onFunction f) a

                      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 FirstOrder.Language.LHom.sumMap_comp_inl {L : FirstOrder.Language} {L' : FirstOrder.Language} (ϕ : L →ᴸ L') {L₁ : FirstOrder.Language} {L₂ : FirstOrder.Language} (ψ : L₁ →ᴸ L₂) :
                        FirstOrder.Language.LHom.comp (FirstOrder.Language.LHom.sumMap ϕ ψ) FirstOrder.Language.LHom.sumInl = FirstOrder.Language.LHom.comp FirstOrder.Language.LHom.sumInl ϕ
                        @[simp]
                        theorem FirstOrder.Language.LHom.sumMap_comp_inr {L : FirstOrder.Language} {L' : FirstOrder.Language} (ϕ : L →ᴸ L') {L₁ : FirstOrder.Language} {L₂ : FirstOrder.Language} (ψ : L₁ →ᴸ L₂) :
                        FirstOrder.Language.LHom.comp (FirstOrder.Language.LHom.sumMap ϕ ψ) FirstOrder.Language.LHom.sumInr = FirstOrder.Language.LHom.comp FirstOrder.Language.LHom.sumInr ψ

                        A language homomorphism is injective when all the maps between symbol types are.

                        Instances For
                          noncomputable def FirstOrder.Language.LHom.defaultExpansion {L : FirstOrder.Language} {L' : FirstOrder.Language} (ϕ : L →ᴸ L') [(n : ) → (f : L'.Functions n) → Decidable (f Set.range fun (f : L.Functions n) => ϕ.onFunction f)] [(n : ) → (r : L'.Relations n) → Decidable (r Set.range fun (r : L.Relations n) => ϕ.onRelation r)] (M : Type u_1) [Inhabited M] [FirstOrder.Language.Structure L M] :

                          Pulls an L-structure along a language map ϕ : L →ᴸ L', and then expands it to an L'-structure arbitrarily.

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

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

                            Instances
                              theorem FirstOrder.Language.LHom.Injective.isExpansionOn_default {L : FirstOrder.Language} {L' : FirstOrder.Language} {ϕ : L →ᴸ L'} [(n : ) → (f : L'.Functions n) → Decidable (f Set.range fun (f : L.Functions n) => ϕ.onFunction f)] [(n : ) → (r : L'.Relations n) → Decidable (r Set.range fun (r : L.Relations n) => ϕ.onRelation r)] (h : FirstOrder.Language.LHom.Injective ϕ) (M : Type u_1) [Inhabited M] [FirstOrder.Language.Structure L M] :
                              structure FirstOrder.Language.LEquiv (L : FirstOrder.Language) (L' : FirstOrder.Language) :
                              Type (max (max (max u_1 u_2) u_3) u_4)

                              A language equivalence maps the symbols of one language to symbols of another bijectively.

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

                                  The identity equivalence from a first-order language to itself.

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

                                    The inverse of an equivalence of first-order languages.

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

                                      The composition of equivalences of first-order languages.

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

                                        Gives a constantsOn α structure to a type by assigning each constant a value.

                                        Equations
                                        Instances For

                                          A map between index types induces a map between constant languages.

                                          Equations
                                          Instances For
                                            theorem FirstOrder.Language.constantsOnMap_isExpansionOn {M : Type w} {α : Type u'} {β : Type v'} {f : αβ} {fα : αM} {fβ : βM} (h : f = ) :

                                            Extends a language with a constant for each element of a parameter set in M.

                                            Equations
                                            Instances For

                                              Extends a language with a constant for each element of a parameter set in M.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                @[simp]
                                                theorem FirstOrder.Language.lhomWithConstants_onFunction (L : FirstOrder.Language) (α : Type w') (_n : ) (val : L.Functions _n) :
                                                @[simp]
                                                theorem FirstOrder.Language.lhomWithConstants_onRelation (L : FirstOrder.Language) (α : Type w') (_n : ) (val : L.Relations _n) :

                                                The language map adding constants.

                                                Equations
                                                Instances For

                                                  The constant symbol indexed by a particular element.

                                                  Equations
                                                  Instances For

                                                    The language map removing an empty constant set.

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