Composition of ordered first-order reductions #
Transitivity of P ≤ᶠᵒ[≤] Q (DescriptiveComplexity.OrderedFOReduction.trans), and the
mixed variants with plain FO reductions.
The obstacle to composing two ordered reductions with the plain composition
of DescriptiveComplexity.Composition is that the outer reduction's formulas mention
the order of the intermediate structure, which is not part of the inner
interpretation's output. The fix is classical: the interpreted universe
Tag × A^dim carries a linear order that is first-order definable from the
order of A – the lexicographic order comparing tags first (by an arbitrary
fixed linear order on the finite tag type; tag comparisons are static, i.e.
resolved at formula-construction time), then the tuple coordinates in order.
Concretely:
DescriptiveComplexity.tagTupleLeis the lexicographic order onTag × (Fin d → A), bundled asDescriptiveComplexity.tagTupleOrder : LinearOrder (Tag × (Fin d → A))(via Mathlib'sProd.LexandPi.Lex);DescriptiveComplexity.lexLeFis the corresponding first-order formula over the ordered expansion, with realization lemmaDescriptiveComplexity.realize_lexLeF;DescriptiveComplexity.FOInterpretation.ordExtendextends an interpretation with targetL₂to one with targetL₂.sum Language.order, interpreting the order symbol bylexLeF; the interpreted structure is isomorphic to the original one equipped with the lexicographic order (DescriptiveComplexity.FOInterpretation.ordExtendLEquiv);DescriptiveComplexity.OrderedFOReduction.transcomposes the outer interpretation with the extended inner one, usingFOInterpretation.comp;DescriptiveComplexity.FOReduction.toOrderedupgrades a plain FO reduction to an ordered one (lifting its formulas alongLHom.sumInl), giving the mixed transitivity variantsDescriptiveComplexity.OrderedFOReduction.trans_foandDescriptiveComplexity.FOReduction.trans_ordered, andTransinstances for all combinations.
A linear order on any finite type #
An arbitrary linear order on a finite type, obtained by pulling back the
order of Fin n along an arbitrary enumeration. Used to order tags.
Equations
Instances For
Dependency graph
The lexicographic order on tagged tuples #
Lexicographic comparison of tuples: equality, or agreement up to a position where the left tuple is smaller.
Equations
Instances For
Dependency graph
The lexicographic order on tagged tuples: tags first, then the coordinates in order.
Equations
- DescriptiveComplexity.tagTupleLe p q = (p.1 < q.1 ∨ p.1 = q.1 ∧ DescriptiveComplexity.tupLeLex p.2 q.2)
Instances For
Dependency graph
The lexicographic linear order on tagged tuples, lifted along
lexEmbed; its ≤ is characterized by tagTupleLe_iff.
Instances For
Dependency graph
The relation tagTupleLe is the ≤ of tagTupleOrder. (Public companion
to the private tagTupleLe_iff, for use in relativized composition.)
Dependency graph
First-order formulas for the lexicographic order #
Lexicographic comparison of two d-tuples (the two arguments of a binary
relation), as a formula over the ordered expansion.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
The full lexicographic comparison of tagged tuples, as a formula over the ordered expansion: the tags are compared statically.
Equations
Instances For
Dependency graph
Dependency graph
Extending an interpretation with the lexicographic order #
Extension of an interpretation over an ordered base to one whose target carries the order vocabulary, interpreted by the lexicographic order on tagged tuples.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The lexicographic linear order on the interpreted universe.
Equations
Instances For
Dependency graph
The extended interpretation produces exactly the original interpreted structure equipped with the lexicographic order: the identity map is an isomorphism over the ordered expansion of the target language.
Equations
- I.ordExtendLEquiv A = { toEquiv := Equiv.refl (I.ordExtend.Map A), map_fun' := ⋯, map_rel' := ⋯ }
Instances For
Dependency graph
Transitivity #
Transitivity of ordered FO reductions: if P ≤ᶠᵒ[≤] Q and
Q ≤ᶠᵒ[≤] R, then P ≤ᶠᵒ[≤] R. The intermediate structure is ordered by the
lexicographic order on tagged tuples, which is first-order definable from the
order of the input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A plain FO reduction is in particular an ordered FO reduction: lift its defining formulas to the ordered expansion (they simply ignore the order).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Mixed transitivity: an ordered FO reduction followed by a plain one.
Instances For
Dependency graph
Mixed transitivity: a plain FO reduction followed by an ordered one.
Equations
- g.trans_ordered f = g.toOrdered.trans f
Instances For
Dependency graph
Trans instance for ordered FO reductions, enabling calc chains.
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
Mixed transitivity: an ordered FO reduction followed by a plain one.
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
Mixed transitivity: a plain FO reduction followed by an ordered one.
Equations
- One or more equations did not get rendered due to their size.