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

Exponential expansions

Lax480241.Expansions · concepts/Lax480241/Expansions.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

    An exponential expansion maps a finite ordered LL-structure AA to a structure over another vocabulary EE whose universe is a definable set of tagged assignments of a block of second-order variables: a tag tt and an assignment ρ\rho of the block form a point when the domain sentence of tt holds of ρ\rho, and each symbol of EE holds of points when its defining sentence, at their tags, holds of AA with one copy of the block per argument interpreted by their assignments. A block with a variable of arity aa has 2na2^{n^a} assignments over nn elements, so the expanded universe is one exponential larger; the expansion is described by first-order sentences.

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

    Lean source view on GitHub

    1import Mathlib.Order.PiLex
    2import Mathlib.Data.Prod.Lex
    3import Mathlib.Data.Fintype.EquivFin
    4import Mathlib.ModelTheory.Order
    5import Mathlib.ModelTheory.Semantics
    6import Mathlib.ModelTheory.Complexity
    7import Mathlib.Tactic.FinCases
    8import Mathlib.Logic.Equiv.Fin.Basic
    9import Mathlib.Data.Finite.Sigma
    10import Mathlib.Data.Fintype.Lattice
    11import Mathlib.Order.Lattice.Nat
    12import Mathlib.Data.Set.Card
    13import Mathlib.Data.Fintype.Pigeonhole
    14import Mathlib.Dynamics.FixedPoints.Basic
    15import Lax904597.SecondOrder
    16import Lax904597.Interpretations
    17
    18/-!
    19---
    20title: Exponential expansions
    21type: definition
    22---
    23An exponential expansion maps a finite ordered LL-structure AA to a
    24structure over another vocabulary EE whose universe is a definable set of
    25tagged assignments of a block of second-order variables: a tag tt and an
    26assignment ρ\rho of the block form a point when the domain sentence of tt
    27holds of ρ\rho, and each symbol of EE holds of points when its defining
    28sentence, at their tags, holds of AA with one copy of the block per
    29argument interpreted by their assignments. A block with a variable of arity
    30aa has 2na2^{n^a} assignments over nn elements, so the expanded universe is
    31one exponential larger; the expansion is described by first-order sentences.
    32-/
    33
    34namespace Lax480241.Expansions
    35
    36open Lax904597.SecondOrder
    37
    38open FirstOrder
    39
    40open Language Structure
    41
    42namespace SOBlock
    43
    44/-- `n` independent copies of a block: one relation variable per pair of a copy
    45index and a relation variable of `B`, keeping its arity. -/
    46def replicate (B : SOBlock) (n : ℕ) : SOBlock where
    47 ι := Fin n × B.ι
    48 arity p := B.arity p.2
    49
    50/-- The assignment of the replicated block determined by one assignment per
    51copy. The index type being a plain product, this is currying and nothing
    52more. -/
    53def replicateAssign (B : SOBlock) {A : Type} {n : ℕ} (ρs : Fin n → B.Assignment A) :
    54 (SOBlock.replicate B n).Assignment A :=
    55 fun p => ρs p.1 p.2
    56
    57end SOBlock
    58
    59instance instFiniteAssignment {B : SOBlock} {A : Type} [Finite A] : Finite (B.Assignment A) :=
    60 inferInstanceAs (Finite (∀ i : B.ι, (Fin (B.arity i) → A) → Prop))
    61
    62variable {L : Language.{0, 0}}
    63
    64section Expand
    65
    66/-- The structure over `L` expanded by one copy of a block's vocabulary,
    67interpreted by an assignment. -/
    68@[reducible]
    69def SOBlock.structure₁ (B : SOBlock) {A : Type} [inst : L.Structure A]
    70 (ρ : B.Assignment A) : (L.sum B.lang).Structure A :=
    71 @sumStructure L B.lang A inst (B.structure ρ)
    72
    73end Expand
    74
    75open FirstOrder
    76
    77open Language Structure
    78
    79variable {L : Language.{0, 0}}
    80
    81/-- An **exponential expansion** of `L`-structures into `E`-structures: the
    82universe is a definable set of tagged assignments of the block `B`, and each
    83relation symbol of `E` is defined, at each tuple of tags, by a first-order
    84sentence over the ordered base vocabulary expanded by one copy of the block per
    85argument. -/
    86structure ExpExpansion (L : Language.{0, 0}) : Type 1 where
    87 /-- The tags: finitely many copies of the space of block assignments. -/
    88 Tag : Type
    89 /-- Tags are finite, so that finite structures expand to finite
    90 structures. -/
    91 [tagFinite : Finite Tag]
    92 /-- The block whose assignments are the points of the expanded universe. -/
    93 B : SOBlock
    94 /-- The vocabulary of the expanded structure. -/
    95 E : Language.{0, 0}
    96 /-- The expanded vocabulary is relational, as every vocabulary of this
    97 library. -/
    98 [eRelational : E.IsRelational]
    99 /-- The domain sentence of each tag: a tagged assignment `(t, ρ)` is a point
    100 of the expanded universe iff `dom t` holds of `ρ`. -/
    101 dom : Tag → ((L.sum Language.order).sum B.lang).Sentence
    102 /-- The defining sentence of each relation symbol at each tuple of tags, over
    103 as many copies of the block as the symbol has arguments. -/
    104 relSentence : ∀ {n : ℕ}, E.Relations n → (Fin n → Tag) →
    105 ((L.sum Language.order).sum (SOBlock.replicate B n).lang).Sentence
    106 /-- The definable domain is inhabited, so that nonempty structures expand to
    107 nonempty structures. -/
    108 dom_nonempty : ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A],
    109 ∃ (t : Tag) (ρ : B.Assignment A),
    110 @Sentence.Realize _ A (SOBlock.structure₁ B (L := L.sum Language.order) ρ) (dom t)
    111
    112namespace ExpExpansion
    113
    114variable (X : ExpExpansion L)
    115
    116attribute [instance] tagFinite eRelational
    117
    118/-- A candidate point of the expanded universe: a tagged assignment of the
    119block. An `abbrev`, so that the pair structure stays visible to `rw` and to
    120instance search – only `ExpExpansion.Map` needs to be
    121opaque, to carry the expanded structure. -/
    122abbrev Point (A : Type) : Type :=
    123 X.Tag × X.B.Assignment A
    124
    125variable {X}
    126
    127/-- The domain condition on a candidate point: its tag's domain sentence holds
    128of its assignment. -/
    129def DomHolds {A : Type} [L.Structure A] [LinearOrder A] (p : X.Point A) : Prop :=
    130 @Sentence.Realize _ A (SOBlock.structure₁ X.B (L := L.sum Language.order) p.2) (X.dom p.1)
    131
    132variable (X)
    133
    134/-- **The expanded universe**: the tagged block assignments satisfying their
    135tag's domain sentence. -/
    136def Map (A : Type) [L.Structure A] [LinearOrder A] : Type :=
    137 {p : X.Point A // DomHolds p}
    138
    139variable {X}
    140
    141/-- The point of the expanded universe carried by a tag and an assignment
    142satisfying the domain sentence. -/
    143def pt {A : Type} [L.Structure A] [LinearOrder A] (t : X.Tag) (ρ : X.B.Assignment A)
    144 (h : DomHolds (X := X) (t, ρ)) : X.Map A :=
    145 ⟨(t, ρ), h⟩
    146
    147variable (X)
    148
    149/-- **The expanded structure**: an `n`-ary symbol holds of `n` points iff its
    150defining sentence, at their tags, holds in the base structure with the `n`
    151copies of the block interpreted by their assignments. -/
    152instance mapStructure (A : Type) [L.Structure A] [LinearOrder A] :
    153 X.E.Structure (X.Map A) where
    154 funMap f := isEmptyElim f
    155 RelMap {n} r xs :=
    156 @Sentence.Realize _ A
    157 (SOBlock.structure₁ (SOBlock.replicate X.B n) (L := L.sum Language.order)
    158 (SOBlock.replicateAssign X.B fun i => (xs i).1.2))
    159 (X.relSentence r fun i => (xs i).1.1)
    160
    161instance mapFinite (A : Type) [L.Structure A] [LinearOrder A] [Finite A] :
    162 Finite (X.Map A) :=
    163 inferInstanceAs (Finite {p : X.Point A // DomHolds p})
    164
    165instance mapNonempty (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] :
    166 Nonempty (X.Map A) :=
    167 let ⟨t, ρ, h⟩ := X.dom_nonempty A
    168 ⟨pt t ρ h⟩
    169
    170end ExpExpansion
    171
    172open FirstOrder
    173
    174open Language Structure
    175
    176
    177open FirstOrder
    178
    179open Language Structure
    180
    181open Function (IsFixedPt)
    182
    183variable {L : Language.{0, 0}}
    184
    185
    186end Lax480241.Expansions
    187

    Discussion

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

    Loading discussion…