The areas / V32. Logic, model theory and computability
Mathlib.ModelTheory.Fraisse
42 declarations. Mathlib docs · Source
Fraïssé Classes and Fraïssé Limits
This file pertains to the ages of countable first-order structures. The age of a structure is the class of all finitely-generated structures that embed into it.
Of particular interest are Fraïssé classes, which are exactly the ages of countable ultrahomogeneous structures. To each is associated a unique (up to nonunique isomorphism) Fraïssé limit - the countable ultrahomogeneous structure with that age.
Main Definitions
FirstOrder.Language.ageis the class of finitely-generated structures that embed into a particular structure.- A class
KisFirstOrder.Language.Hereditarywhen all finitely-generated structures that embed into structures inKare also inK. - A class
KhasFirstOrder.Language.JointEmbeddingwhen for everyM,NinK, there is another structure inKinto which bothMandNembed. - A class
KhasFirstOrder.Language.Amalgamationwhen for any pair of embeddings of a structureMinKinto other structures inK, those two structures can be embedded into a fourth structure inKsuch that the resulting square of embeddings commutes. FirstOrder.Language.IsFraisseindicates that a class is nonempty, essentially countable, and satisfies the hereditary, joint embedding, and amalgamation properties.FirstOrder.Language.IsFraisseLimitindicates that a structure is a Fraïssé limit for a given class.
Main Results
- We show that the age of any structure is isomorphism-invariant and satisfies the hereditary and joint-embedding properties.
FirstOrder.Language.age.countable_quotientshows that the age of any countable structure is essentially countable.FirstOrder.Language.exists_countable_is_age_of_iffgives necessary and sufficient conditions for a class to be the age of a countable structure in a language with countably many functions.FirstOrder.Language.IsFraisseLimit.nonempty_equivshows that any class which is Fraïssé has at most one Fraïssé limit up to equivalence.FirstOrder.Language.empty.isFraisseLimit_of_countable_infiniteshows that any countably infinite structure in the empty language is a Fraïssé limit of the class of finite structures.FirstOrder.Language.empty.isFraisse_finiteshows that the class of finite structures in the empty language is Fraïssé.
Implementation notes
- Classes of structures are formalized with
Set (Bundled L.Structure). - Some results pertain to countable limit structures, others to countably-generated limit structures. In the case of a language with countably many function symbols, these are equivalent.
References
- [W. Hodges, A Shorter Model Theory][Hodges97]
- [K. Tent, M. Ziegler, A Course in Model Theory][Tent_Ziegler]
TODO
- Show existence of Fraïssé limits
The Age of a Structure and Fraïssé Classes
theorem FirstOrder.Language.StrongHomClass.toEquiv.congr_simp E1 #
∀ {L : FirstOrder.Language} {F : Type u_3} {M : Type u_4} {N : Type u_5} [inst : L.Structure M] [inst_1 : L.Structure N]
[inst_2 : EquivLike F M N] [inst_3 : L.StrongHomClass F M N] (a a_1 : F),
a = a_1 → FirstOrder.Language.StrongHomClass.toEquiv a = FirstOrder.Language.StrongHomClass.toEquiv a_1
def FirstOrder.Language.age E3 #
(L : FirstOrder.Language) → (M : Type w) → [L.Structure M] → Set (CategoryTheory.Bundled L.Structure)
The age of a structure M is the class of finitely-generated structures that embed into it.
def FirstOrder.Language.Hereditary E3 #
{L : FirstOrder.Language} → Set (CategoryTheory.Bundled L.Structure) → Prop
A class K has the hereditary property when all finitely-generated structures that embed into
structures in K are also in K.
def FirstOrder.Language.JointEmbedding E3 #
{L : FirstOrder.Language} → Set (CategoryTheory.Bundled L.Structure) → Prop
A class K has the joint embedding property when for every M, N in K, there is another
structure in K into which both M and N embed.
def FirstOrder.Language.Amalgamation E3 #
{L : FirstOrder.Language} → Set (CategoryTheory.Bundled L.Structure) → Prop
A class K has the amalgamation property when for any pair of embeddings of a structure M in
K into other structures in K, those two structures can be embedded into a fourth structure in
K such that the resulting square of embeddings commutes.
class FirstOrder.Language.IsFraisse E3 #
{L : FirstOrder.Language} → Set (CategoryTheory.Bundled L.Structure) → Prop
A Fraïssé class is a nonempty, essentially countable class of structures satisfying the hereditary, joint embedding, and amalgamation properties.
ctor FirstOrder.Language.IsFraisse.mk E0 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)},
K.Nonempty →
(∀ M ∈ K, FirstOrder.Language.Structure.FG L ↑M) →
(Quotient.mk' '' K).Countable →
FirstOrder.Language.Hereditary K →
FirstOrder.Language.JointEmbedding K → FirstOrder.Language.Amalgamation K → FirstOrder.Language.IsFraisse K
theorem FirstOrder.Language.IsFraisse.is_nonempty E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} [self : FirstOrder.Language.IsFraisse K],
K.Nonempty
theorem FirstOrder.Language.IsFraisse.FG E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} [self : FirstOrder.Language.IsFraisse K],
∀ M ∈ K, FirstOrder.Language.Structure.FG L ↑M
theorem FirstOrder.Language.IsFraisse.is_essentially_countable E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} [self : FirstOrder.Language.IsFraisse K],
(Quotient.mk' '' K).Countable
theorem FirstOrder.Language.IsFraisse.hereditary E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} [self : FirstOrder.Language.IsFraisse K],
FirstOrder.Language.Hereditary K
theorem FirstOrder.Language.IsFraisse.jointEmbedding E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} [self : FirstOrder.Language.IsFraisse K],
FirstOrder.Language.JointEmbedding K
theorem FirstOrder.Language.IsFraisse.amalgamation E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} [self : FirstOrder.Language.IsFraisse K],
FirstOrder.Language.Amalgamation K
theorem FirstOrder.Language.age.is_equiv_invariant E1 #
∀ (L : FirstOrder.Language) (M : Type w) [inst : L.Structure M] (N P : CategoryTheory.Bundled L.Structure),
Nonempty (L.Equiv ↑N ↑P) → (N ∈ L.age M ↔ P ∈ L.age M)
theorem FirstOrder.Language.Embedding.age_subset_age E1 #
∀ {L : FirstOrder.Language} {M : Type w} [inst : L.Structure M] {N : Type w} [inst_1 : L.Structure N]
(MN : L.Embedding M N), L.age M ⊆ L.age N
theorem FirstOrder.Language.Equiv.age_eq_age E1 #
∀ {L : FirstOrder.Language} {M : Type w} [inst : L.Structure M] {N : Type w} [inst_1 : L.Structure N]
(MN : L.Equiv M N), L.age M = L.age N
theorem FirstOrder.Language.Structure.FG.mem_age_of_equiv E0 #
∀ {L : FirstOrder.Language} {M N : CategoryTheory.Bundled L.Structure},
FirstOrder.Language.Structure.FG L ↑M → Nonempty (L.Equiv ↑M ↑N) → N ∈ L.age ↑M
theorem FirstOrder.Language.Hereditary.is_equiv_invariant_of_fg E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)},
FirstOrder.Language.Hereditary K →
(∀ M ∈ K, FirstOrder.Language.Structure.FG L ↑M) →
∀ (M N : CategoryTheory.Bundled L.Structure), Nonempty (L.Equiv ↑M ↑N) → (M ∈ K ↔ N ∈ K)
theorem FirstOrder.Language.IsFraisse.is_equiv_invariant E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} [h : FirstOrder.Language.IsFraisse K]
{M N : CategoryTheory.Bundled L.Structure}, Nonempty (L.Equiv ↑M ↑N) → (M ∈ K ↔ N ∈ K)
theorem FirstOrder.Language.age.nonempty E1 #
∀ {L : FirstOrder.Language} (M : Type w) [inst : L.Structure M], (L.age M).Nonempty
theorem FirstOrder.Language.age.hereditary E1 #
∀ {L : FirstOrder.Language} (M : Type w) [inst : L.Structure M], FirstOrder.Language.Hereditary (L.age M)
theorem FirstOrder.Language.age.jointEmbedding E1 #
∀ {L : FirstOrder.Language} (M : Type w) [inst : L.Structure M], FirstOrder.Language.JointEmbedding (L.age M)
theorem FirstOrder.Language.age.fg_substructure E1 #
∀ {L : FirstOrder.Language} {M : Type w} [inst : L.Structure M] {S : L.Substructure M},
S.FG → { α := ↥S, str := inferInstance } ∈ L.age M
theorem FirstOrder.Language.age.has_representative_as_substructure E1 #
∀ {L : FirstOrder.Language} (M : Type w) [inst : L.Structure M],
∀ C ∈ Quotient.mk' '' L.age M, ∃ V, ⟦{ α := ↥↑V, str := inferInstance }⟧ = C
Any class in the age of a structure has a representative which is a finitely generated substructure.
theorem FirstOrder.Language.age.countable_quotient E3 #
∀ {L : FirstOrder.Language} (M : Type w) [inst : L.Structure M] [h : Countable M], (Quotient.mk' '' L.age M).Countable
The age of a countable structure is essentially countable (has countably many isomorphism classes).
theorem FirstOrder.Language.age_directLimit E1 #
∀ {L : FirstOrder.Language} {ι : Type w} [inst : Preorder ι] [inst_1 : IsDirectedOrder ι] [inst_2 : Nonempty ι]
(G : ι → Type (max w w')) [inst_3 : (i : ι) → L.Structure (G i)] (f : (i j : ι) → i ≤ j → L.Embedding (G i) (G j))
[inst_4 : DirectedSystem G fun i j h ↦ ⇑(f i j h)], L.age (FirstOrder.Language.DirectLimit G f) = ⋃ i, L.age (G i)
The age of a direct limit of structures is the union of the ages of the structures.
theorem FirstOrder.Language.exists_cg_is_age_of E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)},
K.Nonempty →
(Quotient.mk' '' K).Countable →
(∀ M ∈ K, FirstOrder.Language.Structure.FG L ↑M) →
FirstOrder.Language.Hereditary K →
FirstOrder.Language.JointEmbedding K → ∃ M, FirstOrder.Language.Structure.CG L ↑M ∧ L.age ↑M = K
Sufficient conditions for a class to be the age of a countably-generated structure.
theorem FirstOrder.Language.exists_countable_is_age_of_iff E3 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} [Countable ((l : ℕ) × L.Functions l)],
(∃ M, Countable ↑M ∧ L.age ↑M = K) ↔
K.Nonempty ∧
(∀ (M N : CategoryTheory.Bundled L.Structure), Nonempty (L.Equiv ↑M ↑N) → (M ∈ K ↔ N ∈ K)) ∧
(Quotient.mk' '' K).Countable ∧
(∀ M ∈ K, FirstOrder.Language.Structure.FG L ↑M) ∧
FirstOrder.Language.Hereditary K ∧ FirstOrder.Language.JointEmbedding K
def FirstOrder.Language.IsUltrahomogeneous E1 #
(L : FirstOrder.Language) → (M : Type w) → [L.Structure M] → Prop
A structure M is ultrahomogeneous if every embedding of a finitely generated substructure
into M extends to an automorphism of M.
structure FirstOrder.Language.IsFraisseLimit E3 #
{L : FirstOrder.Language} →
Set (CategoryTheory.Bundled L.Structure) →
(M : Type w) → [L.Structure M] → [Countable ((l : ℕ) × L.Functions l)] → [Countable M] → Prop
A structure M is a Fraïssé limit for a class K if it is countably generated,
ultrahomogeneous, and has age K.
ctor FirstOrder.Language.IsFraisseLimit.mk E0 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} {M : Type w} [inst : L.Structure M]
[inst_1 : Countable ((l : ℕ) × L.Functions l)] [inst_2 : Countable M],
L.IsUltrahomogeneous M → L.age M = K → FirstOrder.Language.IsFraisseLimit K M
theorem FirstOrder.Language.IsFraisseLimit.ultrahomogeneous E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} {M : Type w} [inst : L.Structure M]
[inst_1 : Countable ((l : ℕ) × L.Functions l)] [inst_2 : Countable M],
FirstOrder.Language.IsFraisseLimit K M → L.IsUltrahomogeneous M
theorem FirstOrder.Language.IsFraisseLimit.age E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} {M : Type w} [inst : L.Structure M]
[inst_1 : Countable ((l : ℕ) × L.Functions l)] [inst_2 : Countable M],
FirstOrder.Language.IsFraisseLimit K M → L.age M = K
theorem FirstOrder.Language.IsUltrahomogeneous.extend_embedding E1 #
∀ {L : FirstOrder.Language} {M : Type w} [inst : L.Structure M],
L.IsUltrahomogeneous M →
∀ {S : Type u_1} [inst_1 : L.Structure S],
FirstOrder.Language.Structure.FG L S →
∀ {T : Type u_2} [inst_2 : L.Structure T] [h : Nonempty (L.Embedding T M)] (f : L.Embedding S M)
(g : L.Embedding S T), ∃ f', f = f'.comp g
Any embedding from a finitely generated S to an ultrahomogeneous structure M
can be extended to an embedding from any structure with an embedding to M.
theorem FirstOrder.Language.isUltrahomogeneous_iff_IsExtensionPair E1 #
∀ {L : FirstOrder.Language} {M : Type w} [inst : L.Structure M],
FirstOrder.Language.Structure.CG L M → (L.IsUltrahomogeneous M ↔ L.IsExtensionPair M M)
A countably generated structure is ultrahomogeneous if and only if any equivalence between finitely generated substructures can be extended to any element in the domain.
theorem FirstOrder.Language.IsUltrahomogeneous.amalgamation_age E1 #
∀ {L : FirstOrder.Language} {M : Type w} [inst : L.Structure M],
L.IsUltrahomogeneous M → FirstOrder.Language.Amalgamation (L.age M)
theorem FirstOrder.Language.IsUltrahomogeneous.age_isFraisse E1 #
∀ {L : FirstOrder.Language} {M : Type w} [inst : L.Structure M] [Countable M],
L.IsUltrahomogeneous M → FirstOrder.Language.IsFraisse (L.age M)
theorem FirstOrder.Language.IsFraisseLimit.isFraisse E1 #
∀ {L : FirstOrder.Language} (K : Set (CategoryTheory.Bundled L.Structure)) {M : Type w} [inst : L.Structure M]
[inst_1 : Countable ((l : ℕ) × L.Functions l)] [inst_2 : Countable M],
FirstOrder.Language.IsFraisseLimit K M → FirstOrder.Language.IsFraisse K
If a class has a Fraïssé limit, it must be Fraïssé.
theorem FirstOrder.Language.IsFraisseLimit.isExtensionPair E1 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} {M : Type w} [inst : L.Structure M]
{N : Type w} [inst_1 : L.Structure N] [inst_2 : Countable ((l : ℕ) × L.Functions l)] [inst_3 : Countable M]
[inst_4 : Countable N],
FirstOrder.Language.IsFraisseLimit K M → FirstOrder.Language.IsFraisseLimit K N → L.IsExtensionPair M N
theorem FirstOrder.Language.IsFraisseLimit.nonempty_equiv E3 #
∀ {L : FirstOrder.Language} {K : Set (CategoryTheory.Bundled L.Structure)} {M : Type w} [inst : L.Structure M]
{N : Type w} [inst_1 : L.Structure N] [inst_2 : Countable ((l : ℕ) × L.Functions l)] [inst_3 : Countable M]
[inst_4 : Countable N],
FirstOrder.Language.IsFraisseLimit K M → FirstOrder.Language.IsFraisseLimit K N → Nonempty (L.Equiv M N)
The Fraïssé limit of a class is unique, in that any two Fraïssé limits are isomorphic.
theorem FirstOrder.Language.empty.isFraisseLimit_of_countable_infinite E3 #
∀ (M : Type u_1) [inst : Countable M] [Infinite M] [inst_2 : FirstOrder.Language.empty.Structure M],
FirstOrder.Language.IsFraisseLimit {S | Finite ↑S} M
Any countable infinite structure in the empty language is a Fraïssé limit of the class of finite structures.
theorem FirstOrder.Language.empty.isFraisse_finite E3 #
FirstOrder.Language.IsFraisse {S | Finite ↑S}
The class of finite structures in the empty language is Fraïssé.