Factors of relational structures #
A k-factor is a connected structure on at most k elements, presented by a set of atoms on
Fin n whose Gaifman graph is connected. It occurs in a structure when some assignment realizes
its atoms there, that is, when its canonical structure maps homomorphically into the structure.
Homomorphisms are the weak ones of mathlib, so a factor may leave a relation unsaid, and a factor
occurring in a structure occurs in every structure it maps into.
Main definitions #
FirstOrder.Language.Atom.gaifman: the Gaifman graph of a set of atoms.FirstOrder.Language.Factor: connected sets of atoms on at mostkvariables.FirstOrder.Language.Factor.Occurs,FirstOrder.Language.factors: occurrence, and thek-factors of a structure.
Main statements #
FirstOrder.Language.Factor.occurs_iff_nonempty_hom: a factor occurs exactly when its canonical structure maps homomorphically into the structure.FirstOrder.Language.factors_mono: a homomorphism carries the factors of its domain to factors of its codomain.
References #
The Gaifman graph of a set of atoms joins two distinct variables that an atom mentions together.
Equations
- FirstOrder.Language.Atom.gaifman T = SimpleGraph.fromRel fun (x y : α) => ∃ a ∈ T, x ∈ Set.range a.args ∧ y ∈ Set.range a.args
Instances For
A k-factor is a connected set of atoms on at most k variables, presenting a connected
structure on at most k elements.
- n : ℕ
The number of variables.
- le : self.n ≤ k
The atoms.
- preconnected : (Atom.gaifman self.atoms).Preconnected
Instances For
A factor occurs in a structure when some assignment realizes its atoms there.
Equations
- FirstOrder.Language.Factor.Occurs M f = (FirstOrder.Language.Atom.realizers M f.atoms).Nonempty
Instances For
A factor occurs exactly when its canonical structure maps homomorphically into the structure.
The k-factors of a structure are the factors occurring in it.
Equations
- L.factors k M = {f : L.Factor k | FirstOrder.Language.Factor.Occurs M f}