While this submission is a draft, it cannot be used by other submissions.

Second-order fixed points

Lax480241.SecondOrderFixedPoints · concepts/Lax480241/SecondOrderFixedPoints.lean · lax-480241

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    SO(≤, LFP) and SO(≤, PFP) are first-order logic with least and partial fixed points read one exponential up: a problem PP is SO(≤, LFP)-definable when an exponential expansion XX and an FO(≤, LFP)-definable problem QQ of its vocabulary are such that P(A)P(A) holds exactly when Q(X(A))Q(X(A)) does, for every nonempty finite structure AA and every linear order on it. The order-free forms use expansions whose sentences read no order, the equivalence being asked of structures carrying none.

    Concept map
    10 concepts; 7 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Mathlib.Tactic.FinCases
    2import Mathlib.Order.PiLex
    3import Mathlib.Data.Prod.Lex
    4import Mathlib.Data.Fintype.EquivFin
    5import Mathlib.ModelTheory.Order
    6import Mathlib.ModelTheory.Semantics
    7import Mathlib.ModelTheory.Complexity
    8import Mathlib.Logic.Equiv.Fin.Basic
    9import Mathlib.Data.Fintype.Lattice
    10import Mathlib.Data.Finite.Sigma
    11import Mathlib.Order.Lattice.Nat
    12import Mathlib.Data.Set.Card
    13import Mathlib.Data.Fintype.Pigeonhole
    14import Mathlib.Dynamics.FixedPoints.Basic
    15import Mathlib.ModelTheory.Syntax
    16import Mathlib.SetTheory.Cardinal.Finite
    17import Mathlib.Logic.Relation
    18import Mathlib.Algebra.BigOperators.Finprod
    19import Mathlib.Data.Set.Finite.Lemmas
    20import Mathlib.Logic.Equiv.Prod
    21import Mathlib.Algebra.Order.BigOperators.Group.Finset
    22import Mathlib.Data.Fintype.Card
    23import Lax134656.PartialFixedPoint
    24import Lax480241.Expansions
    25import Lax535992.LeastFixedPoint
    26import Lax904597.Problems
    27import Lax904597.SecondOrder
    28import Lax904597.Interpretations
    29
    30/-!
    31---
    32title: Second-order fixed points
    33type: definition
    34---
    35SO(≤, LFP) and SO(≤, PFP) are first-order logic with least and partial fixed
    36points read one exponential up: a problem PP is SO(≤, LFP)-definable when
    37an exponential expansion XX and an FO(≤, LFP)-definable problem QQ of its
    38vocabulary are such that P(A)P(A) holds exactly when Q(X(A))Q(X(A)) does, for every
    39nonempty finite structure AA and every linear order on it. The order-free
    40forms use expansions whose sentences read no order, the equivalence being
    41asked of structures carrying none.
    42-/
    43
    44namespace Lax480241.SecondOrderFixedPoints
    45
    46open Lax134656.PartialFixedPoint Lax480241.Expansions Lax535992.LeastFixedPoint Lax904597.Problems
    47open Lax904597.SecondOrder
    48
    49open FirstOrder
    50
    51open Language Structure
    52
    53variable {L : Language.{0, 0}}
    54
    55/-- An **order-free exponential expansion**: as
    56`ExpExpansion`, except that the domain sentence and the
    57defining sentences live over the bare vocabulary expanded by copies of the
    58block, with no order symbol available. Its universe is therefore defined on a
    59structure carrying no order. -/
    60structure ExpExpansionFree (L : Language.{0, 0}) : Type 1 where
    61 /-- The tags: finitely many copies of the space of block assignments. -/
    62 Tag : Type
    63 /-- Tags are finite, so that finite structures expand to finite
    64 structures. -/
    65 [tagFinite : Finite Tag]
    66 /-- The block whose assignments are the points of the expanded universe. -/
    67 B : SOBlock
    68 /-- The vocabulary of the expanded structure. -/
    69 E : Language.{0, 0}
    70 /-- The expanded vocabulary is relational, as every vocabulary of this
    71 library. -/
    72 [eRelational : E.IsRelational]
    73 /-- The domain sentence of each tag, over the bare vocabulary. -/
    74 dom : Tag → (L.sum B.lang).Sentence
    75 /-- The defining sentence of each relation symbol at each tuple of tags, over
    76 the bare vocabulary and as many copies of the block as the symbol has
    77 arguments. -/
    78 relSentence : ∀ {n : ℕ}, E.Relations n → (Fin n → Tag) →
    79 (L.sum (SOBlock.replicate B n).lang).Sentence
    80 /-- The definable domain is inhabited. -/
    81 dom_nonempty : ∀ (A : Type) [L.Structure A] [Finite A] [Nonempty A],
    82 ∃ (t : Tag) (ρ : B.Assignment A),
    83 @Sentence.Realize _ A (SOBlock.structure₁ B (L := L) ρ) (dom t)
    84
    85namespace ExpExpansionFree
    86
    87variable (X : ExpExpansionFree L)
    88
    89attribute [instance] tagFinite eRelational
    90
    91/-- A candidate point: a tagged assignment of the block. -/
    92abbrev Point (A : Type) : Type := X.Tag × X.B.Assignment A
    93
    94variable {X}
    95
    96/-- The domain condition on a candidate point. -/
    97def DomHolds {A : Type} [L.Structure A] (p : X.Point A) : Prop :=
    98 @Sentence.Realize _ A (SOBlock.structure₁ X.B (L := L) p.2) (X.dom p.1)
    99
    100variable (X)
    101
    102/-- **The expanded universe**: the tagged block assignments satisfying their
    103tag's domain sentence. No order on `A` is involved. -/
    104def Map (A : Type) [L.Structure A] : Type := {p : X.Point A // DomHolds p}
    105
    106variable {X}
    107
    108variable (X)
    109
    110/-- **The expanded structure.** -/
    111instance mapStructure (A : Type) [L.Structure A] : X.E.Structure (X.Map A) where
    112 funMap f := isEmptyElim f
    113 RelMap {n} r xs :=
    114 @Sentence.Realize _ A
    115 (SOBlock.structure₁ (SOBlock.replicate X.B n) (L := L)
    116 (SOBlock.replicateAssign X.B fun i => (xs i).1.2))
    117 (X.relSentence r fun i => (xs i).1.1)
    118
    119instance mapFinite (A : Type) [L.Structure A] [Finite A] : Finite (X.Map A) :=
    120 inferInstanceAs (Finite {p : X.Point A // DomHolds p})
    121
    122instance mapNonempty (A : Type) [L.Structure A] [Finite A] [Nonempty A] :
    123 Nonempty (X.Map A) :=
    124 let ⟨t, ρ, h⟩ := X.dom_nonempty A
    125 ⟨⟨(t, ρ), h⟩⟩
    126
    127end ExpExpansionFree
    128
    129open FirstOrder
    130
    131open Language Structure
    132
    133variable {L : Language.{0, 0}} [L.IsRelational]
    134
    135/-- **SO(PFP) without the order**: a partial fixed point over a second-order
    136universe *defined without an order*, the equivalence being asked of structures
    137carrying none. -/
    138def SOPFPDefinableFree (P : DecisionProblem L) : Prop :=
    139 ∃ (X : ExpExpansionFree L) (Q : DecisionProblem X.E), PFPDefinable Q ∧
    140 ∀ (A : Type) [L.Structure A] [Finite A] [Nonempty A], P A ↔ Q (X.Map A)
    141
    142open FirstOrder
    143
    144open Language Structure
    145
    146variable {L : Language.{0, 0}} [L.IsRelational]
    147
    148/-- **SO(LFP) without the order**: a least fixed point over a second-order
    149universe *defined without an order*, the equivalence being asked of structures
    150carrying none. -/
    151def SOLFPDefinableFree (P : DecisionProblem L) : Prop :=
    152 ∃ (X : ExpExpansionFree L) (Q : DecisionProblem X.E), LFPDefinable Q ∧
    153 ∀ (A : Type) [L.Structure A] [Finite A] [Nonempty A], P A ↔ Q (X.Map A)
    154
    155open FirstOrder
    156
    157open Language
    158
    159variable {L : Language.{0, 0}} [L.IsRelational]
    160
    161/-- **SO(≤, LFP)**: a least fixed point over a second-order universe. The
    162problem holds of `A` exactly when an FO(≤, LFP) definition holds of an
    163exponential expansion of `A`. The order the expansion's own sentences read can
    164be removed (`solfpDefinable_iff_free`), by guessing it
    165into the block. -/
    166def SOLFPDefinable (P : DecisionProblem L) : Prop :=
    167 ∃ (X : ExpExpansion L) (Q : DecisionProblem X.E), LFPDefinable Q ∧
    168 ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A], P A ↔ Q (X.Map A)
    169
    170/-- **SO(≤, PFP)**: a partial fixed point over a second-order universe. The
    171order the expansion's own sentences read can be removed
    172(`sopfpDefinable_iff_free`), by guessing it into the
    173block. -/
    174def SOPFPDefinable (P : DecisionProblem L) : Prop :=
    175 ∃ (X : ExpExpansion L) (Q : DecisionProblem X.E), PFPDefinable Q ∧
    176 ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A], P A ↔ Q (X.Map A)
    177
    178end Lax480241.SecondOrderFixedPoints
    179

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…