Documentation

Mathlib.ModelTheory.Basic

Basics on First-Order Structures #

This file defines first-order languages and structures in the style of the Flypitch project, as well as several important maps between structures.

Main Definitions #

References #

For the Flypitch project:

Languages and Structures #

structure FirstOrder.Language :
Type (max (u + 1) (v + 1))

A first-order language consists of a type of functions of every natural-number arity and a type of relations of every natural-number arity.

  • Functions : Type u

    For every arity, a Type* of functions of that arity

  • Relations : Type v

    For every arity, a Type* of relations of that arity

Instances For
    @[reducible, inline]

    A language is relational when it has no function symbols.

    Equations
      Instances For
        @[reducible, inline]

        A language is algebraic when it has no relation symbols.

        Equations
          Instances For

            The empty language has no symbols.

            Equations
              Instances For

                The sum of two languages consists of the disjoint union of their symbols.

                Equations
                  Instances For
                    @[reducible, inline]

                    The type of constants in a given language.

                    Equations
                      Instances For
                        @[reducible, inline]
                        abbrev FirstOrder.Language.Symbols (L : Language) :
                        Type (max u v)

                        The type of symbols in a given language.

                        Equations
                          Instances For

                            The cardinality of a language is the cardinality of its type of symbols.

                            Equations
                              Instances For
                                @[deprecated FirstOrder.Language.card_empty (since := "2025-02-05")]

                                Alias of FirstOrder.Language.card_empty.

                                instance FirstOrder.Language.instDecidableEqFunctions {f : Type u_1} {R : Type u_2} (n : ) [DecidableEq (f n)] :
                                DecidableEq ({ Functions := f, Relations := R }.Functions n)

                                Passes a DecidableEq instance on a type of function symbols through the Language constructor. Despite the fact that this is proven by inferInstance, it is still needed - see the examples in ModelTheory/Ring/Basic.

                                Equations
                                  instance FirstOrder.Language.instDecidableEqRelations {f : Type u_1} {R : Type u_2} (n : ) [DecidableEq (R n)] :
                                  DecidableEq ({ Functions := f, Relations := R }.Relations n)

                                  Passes a DecidableEq instance on a type of relation symbols through the Language constructor. Despite the fact that this is proven by inferInstance, it is still needed - see the examples in ModelTheory/Ring/Basic.

                                  Equations
                                    class FirstOrder.Language.Structure (L : Language) (M : Type w) :
                                    Type (max (max u v) w)

                                    A first-order structure on a type M consists of interpretations of all the symbols in a given language. Each function of arity n is interpreted as a function sending tuples of length n (modeled as (Fin n → M)) to M, and a relation of arity n is a function from tuples of length n to Prop.

                                    • funMap {n : } : L.Functions n(Fin nM)M

                                      Interpretation of the function symbols

                                    • RelMap {n : } : L.Relations n(Fin nM)Prop

                                      Interpretation of the relation symbols

                                    Instances
                                      theorem FirstOrder.Language.Structure.ext_iff {L : Language} {M : Type w} {x y : L.Structure M} :
                                      x = y @funMap L M x = @funMap L M y @RelMap L M x = @RelMap L M y
                                      theorem FirstOrder.Language.Structure.ext {L : Language} {M : Type w} {x y : L.Structure M} (funMap : @funMap L M x = @funMap L M y) (RelMap : @RelMap L M x = @RelMap L M y) :
                                      x = y

                                      Used for defining FirstOrder.Language.Theory.ModelType.instInhabited.

                                      Equations
                                        Instances For

                                          Maps #

                                          structure FirstOrder.Language.Hom (L : Language) (M : Type w) (N : Type w') [L.Structure M] [L.Structure N] :
                                          Type (max w w')

                                          A homomorphism between first-order structures is a function that commutes with the interpretations of functions and maps tuples in one structure where a given relation is true to tuples in the second structure where that relation is still true.

                                          Instances For

                                            A homomorphism between first-order structures is a function that commutes with the interpretations of functions and maps tuples in one structure where a given relation is true to tuples in the second structure where that relation is still true.

                                            Equations
                                              Instances For
                                                structure FirstOrder.Language.Embedding (L : Language) (M : Type w) (N : Type w') [L.Structure M] [L.Structure N] extends M N :
                                                Type (max w w')

                                                An embedding of first-order structures is an embedding that commutes with the interpretations of functions and relations.

                                                Instances For

                                                  An embedding of first-order structures is an embedding that commutes with the interpretations of functions and relations.

                                                  Equations
                                                    Instances For
                                                      structure FirstOrder.Language.Equiv (L : Language) (M : Type w) (N : Type w') [L.Structure M] [L.Structure N] extends M N :
                                                      Type (max w w')

                                                      An equivalence of first-order structures is an equivalence that commutes with the interpretations of functions and relations.

                                                      Instances For

                                                        An equivalence of first-order structures is an equivalence that commutes with the interpretations of functions and relations.

                                                        Equations
                                                          Instances For

                                                            Interpretation of a constant symbol

                                                            Equations
                                                              Instances For
                                                                theorem FirstOrder.Language.funMap_eq_coe_constants {L : Language} {M : Type w} [L.Structure M] {c : L.Constants} {x : Fin 0M} :

                                                                Given a language with a nonempty type of constants, any structure will be nonempty. This cannot be a global instance, because L becomes a metavariable.

                                                                class FirstOrder.Language.HomClass (L : outParam Language) (F : Type u_3) (M : outParam (Type u_4)) (N : outParam (Type u_5)) [FunLike F M N] [Structure L M] [Structure L N] :

                                                                HomClass L F M N states that F is a type of L-homomorphisms. You should extend this typeclass when you extend FirstOrder.Language.Hom.

                                                                Instances
                                                                  class FirstOrder.Language.StrongHomClass (L : outParam Language) (F : Type u_3) (M : outParam (Type u_4)) (N : outParam (Type u_5)) [FunLike F M N] [Structure L M] [Structure L N] :

                                                                  StrongHomClass L F M N states that F is a type of L-homomorphisms which preserve relations in both directions.

                                                                  Instances
                                                                    @[instance 100]
                                                                    instance FirstOrder.Language.StrongHomClass.homClass {L : Language} {M : Type w} {N : Type w'} {F : Type u_3} [L.Structure M] [L.Structure N] [FunLike F M N] [L.StrongHomClass F M N] :
                                                                    L.HomClass F M N
                                                                    theorem FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic {L : Language} [L.IsAlgebraic] {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [FunLike F M N] [L.HomClass F M N] :

                                                                    Not an instance to avoid a loop.

                                                                    theorem FirstOrder.Language.HomClass.map_constants {L : Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [FunLike F M N] [L.HomClass F M N] (φ : F) (c : L.Constants) :
                                                                    φ c = c
                                                                    instance FirstOrder.Language.Hom.instFunLike {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] :
                                                                    FunLike (L.Hom M N) M N
                                                                    Equations
                                                                      instance FirstOrder.Language.Hom.homClass {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] :
                                                                      L.HomClass (L.Hom M N) M N
                                                                      @[simp]
                                                                      theorem FirstOrder.Language.Hom.toFun_eq_coe {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {f : L.Hom M N} :
                                                                      f.toFun = f
                                                                      theorem FirstOrder.Language.Hom.ext {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] f g : L.Hom M N (h : ∀ (x : M), f x = g x) :
                                                                      f = g
                                                                      theorem FirstOrder.Language.Hom.ext_iff {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {f g : L.Hom M N} :
                                                                      f = g ∀ (x : M), f x = g x
                                                                      @[simp]
                                                                      theorem FirstOrder.Language.Hom.map_fun {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Hom M N) {n : } (f : L.Functions n) (x : Fin nM) :
                                                                      φ (Structure.funMap f x) = Structure.funMap f (φ x)
                                                                      @[simp]
                                                                      theorem FirstOrder.Language.Hom.map_constants {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Hom M N) (c : L.Constants) :
                                                                      φ c = c
                                                                      @[simp]
                                                                      theorem FirstOrder.Language.Hom.map_rel {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Hom M N) {n : } (r : L.Relations n) (x : Fin nM) :
                                                                      def FirstOrder.Language.Hom.id (L : Language) (M : Type w) [L.Structure M] :
                                                                      L.Hom M M

                                                                      The identity map from a structure to itself.

                                                                      Equations
                                                                        Instances For
                                                                          Equations
                                                                            @[simp]
                                                                            theorem FirstOrder.Language.Hom.id_apply {L : Language} {M : Type w} [L.Structure M] (x : M) :
                                                                            (id L M) x = x
                                                                            def FirstOrder.Language.Hom.comp {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (hnp : L.Hom N P) (hmn : L.Hom M N) :
                                                                            L.Hom M P

                                                                            Composition of first-order homomorphisms.

                                                                            Equations
                                                                              Instances For
                                                                                @[simp]
                                                                                theorem FirstOrder.Language.Hom.comp_apply {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (g : L.Hom N P) (f : L.Hom M N) (x : M) :
                                                                                (g.comp f) x = g (f x)
                                                                                theorem FirstOrder.Language.Hom.comp_assoc {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] {Q : Type u_2} [L.Structure Q] (f : L.Hom M N) (g : L.Hom N P) (h : L.Hom P Q) :
                                                                                (h.comp g).comp f = h.comp (g.comp f)

                                                                                Composition of first-order homomorphisms is associative.

                                                                                @[simp]
                                                                                theorem FirstOrder.Language.Hom.comp_id {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Hom M N) :
                                                                                f.comp (id L M) = f
                                                                                @[simp]
                                                                                theorem FirstOrder.Language.Hom.id_comp {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Hom M N) :
                                                                                (id L N).comp f = f
                                                                                def FirstOrder.Language.HomClass.toHom {L : Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [FunLike F M N] [L.HomClass F M N] :
                                                                                FL.Hom M N

                                                                                Any element of a HomClass can be realized as a first_order homomorphism.

                                                                                Equations
                                                                                  Instances For
                                                                                    @[simp]
                                                                                    theorem FirstOrder.Language.HomClass.toHom_toFun {L : Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [FunLike F M N] [L.HomClass F M N] (a✝ : F) (a : M) :
                                                                                    (toHom a✝) a = a✝ a
                                                                                    instance FirstOrder.Language.Embedding.funLike {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] :
                                                                                    FunLike (L.Embedding M N) M N
                                                                                    Equations
                                                                                      @[simp]
                                                                                      theorem FirstOrder.Language.Embedding.map_fun {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Embedding M N) {n : } (f : L.Functions n) (x : Fin nM) :
                                                                                      φ (Structure.funMap f x) = Structure.funMap f (φ x)
                                                                                      @[simp]
                                                                                      theorem FirstOrder.Language.Embedding.map_constants {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Embedding M N) (c : L.Constants) :
                                                                                      φ c = c
                                                                                      @[simp]
                                                                                      theorem FirstOrder.Language.Embedding.map_rel {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Embedding M N) {n : } (r : L.Relations n) (x : Fin nM) :
                                                                                      def FirstOrder.Language.Embedding.toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] :
                                                                                      L.Embedding M NL.Hom M N

                                                                                      A first-order embedding is also a first-order homomorphism.

                                                                                      Equations
                                                                                        Instances For
                                                                                          @[simp]
                                                                                          theorem FirstOrder.Language.Embedding.coe_toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {f : L.Embedding M N} :
                                                                                          f.toHom = f
                                                                                          theorem FirstOrder.Language.Embedding.ext {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] f g : L.Embedding M N (h : ∀ (x : M), f x = g x) :
                                                                                          f = g
                                                                                          theorem FirstOrder.Language.Embedding.ext_iff {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {f g : L.Embedding M N} :
                                                                                          f = g ∀ (x : M), f x = g x
                                                                                          @[simp]
                                                                                          theorem FirstOrder.Language.Embedding.toHom_inj {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {f g : L.Embedding M N} :
                                                                                          f.toHom = g.toHom f = g
                                                                                          def FirstOrder.Language.Embedding.ofInjective {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] [L.IsAlgebraic] {f : L.Hom M N} (hf : Function.Injective f) :
                                                                                          L.Embedding M N

                                                                                          In an algebraic language, any injective homomorphism is an embedding.

                                                                                          Equations
                                                                                            Instances For
                                                                                              @[simp]
                                                                                              theorem FirstOrder.Language.Embedding.ofInjective_toFun {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] [L.IsAlgebraic] {f : L.Hom M N} (hf : Function.Injective f) (a✝ : M) :
                                                                                              (ofInjective hf) a✝ = f a✝
                                                                                              @[simp]
                                                                                              theorem FirstOrder.Language.Embedding.coeFn_ofInjective {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] [L.IsAlgebraic] {f : L.Hom M N} (hf : Function.Injective f) :
                                                                                              (ofInjective hf) = f
                                                                                              @[simp]
                                                                                              theorem FirstOrder.Language.Embedding.ofInjective_toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] [L.IsAlgebraic] {f : L.Hom M N} (hf : Function.Injective f) :

                                                                                              The identity embedding from a structure to itself.

                                                                                              Equations
                                                                                                Instances For
                                                                                                  @[simp]
                                                                                                  theorem FirstOrder.Language.Embedding.refl_apply {L : Language} {M : Type w} [L.Structure M] (x : M) :
                                                                                                  (refl L M) x = x
                                                                                                  def FirstOrder.Language.Embedding.comp {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (hnp : L.Embedding N P) (hmn : L.Embedding M N) :
                                                                                                  L.Embedding M P

                                                                                                  Composition of first-order embeddings.

                                                                                                  Equations
                                                                                                    Instances For
                                                                                                      @[simp]
                                                                                                      theorem FirstOrder.Language.Embedding.comp_apply {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (g : L.Embedding N P) (f : L.Embedding M N) (x : M) :
                                                                                                      (g.comp f) x = g (f x)
                                                                                                      theorem FirstOrder.Language.Embedding.comp_assoc {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] {Q : Type u_2} [L.Structure Q] (f : L.Embedding M N) (g : L.Embedding N P) (h : L.Embedding P Q) :
                                                                                                      (h.comp g).comp f = h.comp (g.comp f)

                                                                                                      Composition of first-order embeddings is associative.

                                                                                                      @[simp]
                                                                                                      theorem FirstOrder.Language.Embedding.comp_inj {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (h : L.Embedding N P) (f g : L.Embedding M N) :
                                                                                                      h.comp f = h.comp g f = g
                                                                                                      @[simp]
                                                                                                      theorem FirstOrder.Language.Embedding.toHom_comp_inj {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (h : L.Embedding N P) (f g : L.Hom M N) :
                                                                                                      h.toHom.comp f = h.toHom.comp g f = g
                                                                                                      @[simp]
                                                                                                      theorem FirstOrder.Language.Embedding.comp_toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (hnp : L.Embedding N P) (hmn : L.Embedding M N) :
                                                                                                      (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom
                                                                                                      @[simp]
                                                                                                      theorem FirstOrder.Language.Embedding.comp_refl {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Embedding M N) :
                                                                                                      f.comp (refl L M) = f
                                                                                                      @[simp]
                                                                                                      theorem FirstOrder.Language.Embedding.refl_comp {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Embedding M N) :
                                                                                                      (refl L N).comp f = f
                                                                                                      def FirstOrder.Language.StrongHomClass.toEmbedding {L : Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [FunLike F M N] [EmbeddingLike F M N] [L.StrongHomClass F M N] :
                                                                                                      FL.Embedding M N

                                                                                                      Any element of an injective StrongHomClass can be realized as a first_order embedding.

                                                                                                      Equations
                                                                                                        Instances For
                                                                                                          @[simp]
                                                                                                          theorem FirstOrder.Language.StrongHomClass.toEmbedding_toFun {L : Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [FunLike F M N] [EmbeddingLike F M N] [L.StrongHomClass F M N] (a✝ : F) (a : M) :
                                                                                                          (toEmbedding a✝) a = a✝ a
                                                                                                          instance FirstOrder.Language.Equiv.instEquivLike {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] :
                                                                                                          EquivLike (L.Equiv M N) M N
                                                                                                          Equations
                                                                                                            def FirstOrder.Language.Equiv.symm {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                            L.Equiv N M

                                                                                                            The inverse of a first-order equivalence is a first-order equivalence.

                                                                                                            Equations
                                                                                                              Instances For
                                                                                                                @[simp]
                                                                                                                theorem FirstOrder.Language.Equiv.symm_symm {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                f.symm.symm = f
                                                                                                                @[simp]
                                                                                                                theorem FirstOrder.Language.Equiv.apply_symm_apply {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) (a : N) :
                                                                                                                f (f.symm a) = a
                                                                                                                @[simp]
                                                                                                                theorem FirstOrder.Language.Equiv.symm_apply_apply {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) (a : M) :
                                                                                                                f.symm (f a) = a
                                                                                                                @[simp]
                                                                                                                theorem FirstOrder.Language.Equiv.map_fun {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Equiv M N) {n : } (f : L.Functions n) (x : Fin nM) :
                                                                                                                φ (Structure.funMap f x) = Structure.funMap f (φ x)
                                                                                                                @[simp]
                                                                                                                theorem FirstOrder.Language.Equiv.map_constants {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Equiv M N) (c : L.Constants) :
                                                                                                                φ c = c
                                                                                                                @[simp]
                                                                                                                theorem FirstOrder.Language.Equiv.map_rel {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (φ : L.Equiv M N) {n : } (r : L.Relations n) (x : Fin nM) :
                                                                                                                def FirstOrder.Language.Equiv.toEmbedding {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] :
                                                                                                                L.Equiv M NL.Embedding M N

                                                                                                                A first-order equivalence is also a first-order embedding.

                                                                                                                Equations
                                                                                                                  Instances For
                                                                                                                    def FirstOrder.Language.Equiv.toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] :
                                                                                                                    L.Equiv M NL.Hom M N

                                                                                                                    A first-order equivalence is also a first-order homomorphism.

                                                                                                                    Equations
                                                                                                                      Instances For
                                                                                                                        @[simp]
                                                                                                                        theorem FirstOrder.Language.Equiv.toEmbedding_toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                        @[simp]
                                                                                                                        theorem FirstOrder.Language.Equiv.coe_toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {f : L.Equiv M N} :
                                                                                                                        f.toHom = f
                                                                                                                        @[simp]
                                                                                                                        theorem FirstOrder.Language.Equiv.coe_toEmbedding {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                        f.toEmbedding = f
                                                                                                                        theorem FirstOrder.Language.Equiv.ext {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] f g : L.Equiv M N (h : ∀ (x : M), f x = g x) :
                                                                                                                        f = g
                                                                                                                        theorem FirstOrder.Language.Equiv.ext_iff {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {f g : L.Equiv M N} :
                                                                                                                        f = g ∀ (x : M), f x = g x
                                                                                                                        theorem FirstOrder.Language.Equiv.bijective {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                        theorem FirstOrder.Language.Equiv.injective {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                        theorem FirstOrder.Language.Equiv.surjective {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :

                                                                                                                        The identity equivalence from a structure to itself.

                                                                                                                        Equations
                                                                                                                          Instances For
                                                                                                                            @[simp]
                                                                                                                            theorem FirstOrder.Language.Equiv.refl_apply {L : Language} {M : Type w} [L.Structure M] (x : M) :
                                                                                                                            (refl L M) x = x
                                                                                                                            def FirstOrder.Language.Equiv.comp {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (hnp : L.Equiv N P) (hmn : L.Equiv M N) :
                                                                                                                            L.Equiv M P

                                                                                                                            Composition of first-order equivalences.

                                                                                                                            Equations
                                                                                                                              Instances For
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.comp_apply {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (g : L.Equiv N P) (f : L.Equiv M N) (x : M) :
                                                                                                                                (g.comp f) x = g (f x)
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.comp_refl {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (g : L.Equiv M N) :
                                                                                                                                g.comp (refl L M) = g
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.refl_comp {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (g : L.Equiv M N) :
                                                                                                                                (refl L N).comp g = g
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.comp_assoc {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] {Q : Type u_2} [L.Structure Q] (f : L.Equiv M N) (g : L.Equiv N P) (h : L.Equiv P Q) :
                                                                                                                                (h.comp g).comp f = h.comp (g.comp f)

                                                                                                                                Composition of first-order homomorphisms is associative.

                                                                                                                                theorem FirstOrder.Language.Equiv.injective_comp {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (h : L.Equiv N P) :
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.comp_toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (hnp : L.Equiv N P) (hmn : L.Equiv M N) :
                                                                                                                                (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.comp_toEmbedding {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (hnp : L.Equiv N P) (hmn : L.Equiv M N) :
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.self_comp_symm {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                                f.comp f.symm = refl L N
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.symm_comp_self {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                                f.symm.comp f = refl L M
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.symm_comp_self_toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.self_comp_symm_toHom {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] (f : L.Equiv M N) :
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.comp_symm {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (f : L.Equiv M N) (g : L.Equiv N P) :
                                                                                                                                (g.comp f).symm = f.symm.comp g.symm
                                                                                                                                theorem FirstOrder.Language.Equiv.comp_right_injective {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (h : L.Equiv M N) :
                                                                                                                                Function.Injective fun (f : L.Equiv N P) => f.comp h
                                                                                                                                @[simp]
                                                                                                                                theorem FirstOrder.Language.Equiv.comp_right_inj {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {P : Type u_1} [L.Structure P] (h : L.Equiv M N) (f g : L.Equiv N P) :
                                                                                                                                f.comp h = g.comp h f = g
                                                                                                                                def FirstOrder.Language.StrongHomClass.toEquiv {L : Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [EquivLike F M N] [L.StrongHomClass F M N] :
                                                                                                                                FL.Equiv M N

                                                                                                                                Any element of a bijective StrongHomClass can be realized as a first_order isomorphism.

                                                                                                                                Equations
                                                                                                                                  Instances For
                                                                                                                                    @[simp]
                                                                                                                                    theorem FirstOrder.Language.StrongHomClass.toEquiv_invFun {L : Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [EquivLike F M N] [L.StrongHomClass F M N] (a✝ : F) (a✝¹ : N) :
                                                                                                                                    (toEquiv a✝).invFun a✝¹ = EquivLike.inv a✝ a✝¹
                                                                                                                                    @[simp]
                                                                                                                                    theorem FirstOrder.Language.StrongHomClass.toEquiv_toFun {L : Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [L.Structure M] [L.Structure N] [EquivLike F M N] [L.StrongHomClass F M N] (a✝ : F) (a : M) :
                                                                                                                                    (toEquiv a✝) a = a✝ a
                                                                                                                                    instance FirstOrder.Language.sumStructure (L₁ : Language) (L₂ : Language) (S : Type u_3) [L₁.Structure S] [L₂.Structure S] :
                                                                                                                                    (L₁.sum L₂).Structure S
                                                                                                                                    Equations
                                                                                                                                      @[simp]
                                                                                                                                      theorem FirstOrder.Language.funMap_sumInl {L₁ : Language} {L₂ : Language} {S : Type u_3} [L₁.Structure S] [L₂.Structure S] {n : } (f : L₁.Functions n) :
                                                                                                                                      @[simp]
                                                                                                                                      theorem FirstOrder.Language.funMap_sumInr {L₁ : Language} {L₂ : Language} {S : Type u_3} [L₁.Structure S] [L₂.Structure S] {n : } (f : L₂.Functions n) :
                                                                                                                                      @[simp]
                                                                                                                                      theorem FirstOrder.Language.relMap_sumInl {L₁ : Language} {L₂ : Language} {S : Type u_3} [L₁.Structure S] [L₂.Structure S] {n : } (R : L₁.Relations n) :
                                                                                                                                      @[simp]
                                                                                                                                      theorem FirstOrder.Language.relMap_sumInr {L₁ : Language} {L₂ : Language} {S : Type u_3} [L₁.Structure S] [L₂.Structure S] {n : } (R : L₂.Relations n) :
                                                                                                                                      @[deprecated FirstOrder.Language.funMap_sumInl (since := "2025-02-21")]
                                                                                                                                      theorem FirstOrder.Language.funMap_sum_inl {L₁ : Language} {L₂ : Language} {S : Type u_3} [L₁.Structure S] [L₂.Structure S] {n : } (f : L₁.Functions n) :

                                                                                                                                      Alias of FirstOrder.Language.funMap_sumInl.

                                                                                                                                      @[deprecated FirstOrder.Language.funMap_sumInr (since := "2025-02-21")]
                                                                                                                                      theorem FirstOrder.Language.funMap_sum_inr {L₁ : Language} {L₂ : Language} {S : Type u_3} [L₁.Structure S] [L₂.Structure S] {n : } (f : L₂.Functions n) :

                                                                                                                                      Alias of FirstOrder.Language.funMap_sumInr.

                                                                                                                                      @[deprecated FirstOrder.Language.relMap_sumInl (since := "2025-02-21")]
                                                                                                                                      theorem FirstOrder.Language.relMap_sum_inl {L₁ : Language} {L₂ : Language} {S : Type u_3} [L₁.Structure S] [L₂.Structure S] {n : } (R : L₁.Relations n) :

                                                                                                                                      Alias of FirstOrder.Language.relMap_sumInl.

                                                                                                                                      @[deprecated FirstOrder.Language.relMap_sumInr (since := "2025-02-21")]
                                                                                                                                      theorem FirstOrder.Language.relMap_sum_inr {L₁ : Language} {L₂ : Language} {S : Type u_3} [L₁.Structure S] [L₂.Structure S] {n : } (R : L₂.Relations n) :

                                                                                                                                      Alias of FirstOrder.Language.relMap_sumInr.

                                                                                                                                      Any type can be made uniquely into a structure over the empty language.

                                                                                                                                      Equations
                                                                                                                                        Instances For

                                                                                                                                          Makes a Language.empty.Hom out of any function. This is only needed because there is no instance of FunLike (M → N) M N, and thus no instance of Language.empty.HomClass M N.

                                                                                                                                          Equations
                                                                                                                                            Instances For
                                                                                                                                              @[simp]
                                                                                                                                              theorem Function.emptyHom_toFun {M : Type w} {N : Type w'} [FirstOrder.Language.empty.Structure M] [FirstOrder.Language.empty.Structure N] (f : MN) (a✝ : M) :
                                                                                                                                              (emptyHom f) a✝ = f a✝
                                                                                                                                              def Equiv.inducedStructure {L : FirstOrder.Language} {M : Type u_1} {N : Type u_2} [L.Structure M] (e : M N) :

                                                                                                                                              A structure induced by a bijection.

                                                                                                                                              Equations
                                                                                                                                                Instances For
                                                                                                                                                  @[simp]
                                                                                                                                                  theorem Equiv.inducedStructure_RelMap {L : FirstOrder.Language} {M : Type u_1} {N : Type u_2} [L.Structure M] (e : M N) {n✝ : } (r : L.Relations n✝) (x : Fin n✝N) :
                                                                                                                                                  @[simp]
                                                                                                                                                  theorem Equiv.inducedStructure_funMap {L : FirstOrder.Language} {M : Type u_1} {N : Type u_2} [L.Structure M] (e : M N) {n✝ : } (f : L.Functions n✝) (x : Fin n✝N) :
                                                                                                                                                  def Equiv.inducedStructureEquiv {L : FirstOrder.Language} {M : Type u_1} {N : Type u_2} [L.Structure M] (e : M N) :
                                                                                                                                                  L.Equiv M N

                                                                                                                                                  A bijection as a first-order isomorphism with the induced structure on the codomain.

                                                                                                                                                  Equations
                                                                                                                                                    Instances For
                                                                                                                                                      @[simp]
                                                                                                                                                      theorem Equiv.toFun_inducedStructureEquiv {L : FirstOrder.Language} {M : Type u_1} {N : Type u_2} [L.Structure M] (e : M N) :
                                                                                                                                                      @[simp]