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

Counting problems and parsimonious reductions

Lax366625.CountingProblems · concepts/Lax366625/CountingProblems.lean · lax-366625

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

    A counting problem over a relational vocabulary LL attaches a natural number C(A)C(A) to every LL-structure AA, the same on isomorphic structures. Its support is the decision problem whose yes-instances are the structures with a positive count. A problem can be given by any number attached to structures: its value on AA is the least of the numbers attached to the structures isomorphic to AA, which is the number itself when that is invariant.

    A parsimonious reduction from CC to DD, a notion due to Simon, is a first-order interpretation under which the counts agree: C(A)=D(I(A))C(A) = D(I(A)) for every nonempty finite AA. In an ordered parsimonious reduction the interpretation reads the ordered expansion and the equation holds for every linear order on AA; in a relativized one, the interpreted universe is a definable subset of the tagged tuples, nonempty on nonempty structures.

    Concept map
    4 concepts; 21 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 Lax904597.Interpretations
    10import Lax904597.Problems
    11import Lax904597.Relativized
    12import Mathlib.Order.Lattice.Nat
    13
    14/-!
    15---
    16title: Counting problems and parsimonious reductions
    17type: definition
    18---
    19A counting problem over a relational vocabulary LL attaches a natural
    20number C(A)C(A) to every LL-structure AA, the same on isomorphic structures.
    21Its support is the decision problem whose yes-instances are the structures
    22with a positive count. A problem can be given by any number attached to
    23structures: its value on AA is the least of the numbers attached to the
    24structures isomorphic to AA, which is the number itself when that is
    25invariant.
    26
    27A parsimonious reduction from CC to DD, a notion due to Simon, is a
    28first-order interpretation under which the counts agree: C(A)=D(I(A))C(A) = D(I(A))
    29for every nonempty finite AA. In an ordered parsimonious reduction the interpretation reads the
    30ordered expansion and the equation holds for every linear order on AA; in
    31a relativized one, the interpreted universe is a definable subset of the
    32tagged tuples, nonempty on nonempty structures.
    33-/
    34
    35namespace Lax366625.CountingProblems
    36
    37open Lax904597.Interpretations Lax904597.Problems Lax904597.Relativized
    38
    39open FirstOrder
    40
    41open Language Structure
    42
    43variable (L : Language.{0, 0})
    44
    45/-- A counting problem: an isomorphism-invariant natural number attached to
    46every `L`-structure. Only the values on finite structures are ever read. -/
    47structure CountingProblem [L.IsRelational] where
    48 /-- The count: `C A` (through the function coercion) is the number attached
    49 to the structure `A`. -/
    50 Count : ∀ (A : Type) [L.Structure A], ℕ
    51 /-- Counting problems do not distinguish isomorphic structures. -/
    52 iso_invariant : ∀ {A B : Type} [L.Structure A] [L.Structure B],
    53 (A ≃[L] B) → Count A = Count B
    54
    55namespace CountingProblem
    56
    57variable {L} [L.IsRelational]
    58
    59instance instCoeFun : CoeFun (CountingProblem L) fun _ => ∀ (A : Type) [L.Structure A], ℕ :=
    60 ⟨Count⟩
    61
    62/-- The counting problem given by a number attached to every structure: the
    63least value it takes on the structures isomorphic to a given one, which is
    64invariant by construction. When the number is itself invariant, this is the
    65number. -/
    66noncomputable def ofFun (f : ∀ (A : Type) [L.Structure A], ℕ) : CountingProblem L where
    67 Count := fun A _ =>
    68 sInf {n : ℕ | ∃ (B : Type) (i : L.Structure B) (_ : @Language.Equiv L B A i _), @f B i = n}
    69 iso_invariant := fun e =>
    70 congrArg sInf (Set.ext fun _ =>
    71 ⟨fun ⟨B, i, g, h⟩ => ⟨B, i, e.comp g, h⟩, fun ⟨B, i, g, h⟩ => ⟨B, i, e.symm.comp g, h⟩⟩)
    72
    73/-- The decision problem underneath a counting problem: is the count
    74positive? -/
    75def support (C : CountingProblem L) : DecisionProblem L where
    76 Holds := fun A inst => 0 < @Count L _ C A inst
    77 iso_invariant := fun e => by rw [C.iso_invariant e]
    78
    79end CountingProblem
    80
    81variable {L} {L' : Language.{0, 0}}
    82
    83/-- A *parsimonious* first-order reduction from the counting problem `C` to the
    84counting problem `D`: a first-order interpretation under which the two counts
    85agree. -/
    86structure ParsimoniousReduction [L.IsRelational] [L'.IsRelational] (C : CountingProblem L)
    87 (D : CountingProblem L') where
    88 /-- The tags (copies of `A^dim`) used by the underlying interpretation. -/
    89 Tag : Type
    90 /-- Tags are finite, so that finite structures map to finite structures. -/
    91 [tagFinite : Finite Tag]
    92 /-- Tags are nonempty, so that nonempty structures map to nonempty
    93 structures. -/
    94 [tagNonempty : Nonempty Tag]
    95 /-- The dimension of the underlying interpretation. -/
    96 dim : ℕ
    97 /-- The underlying first-order interpretation. -/
    98 toInterpretation : FOInterpretation L L' Tag dim
    99 /-- The counts agree, on the finite nonempty structures. -/
    100 correct : ∀ (A : Type) [L.Structure A] [Finite A] [Nonempty A],
    101 C A = D (toInterpretation.Map A)
    102
    103/-- An *ordered* parsimonious reduction: a first-order interpretation over the
    104ordered expansion of the source vocabulary under which the two counts agree,
    105for every linear order of the (finite) input structure. -/
    106structure OrderedParsimoniousReduction [L.IsRelational] [L'.IsRelational]
    107 (C : CountingProblem L) (D : CountingProblem L') where
    108 /-- The tags (copies of `A^dim`) used by the underlying interpretation. -/
    109 Tag : Type
    110 /-- Tags are finite, so that finite structures map to finite structures. -/
    111 [tagFinite : Finite Tag]
    112 /-- Tags are nonempty, so that nonempty structures map to nonempty
    113 structures. -/
    114 [tagNonempty : Nonempty Tag]
    115 /-- The dimension of the underlying interpretation. -/
    116 dim : ℕ
    117 /-- The underlying first-order interpretation, over the ordered expansion. -/
    118 toInterpretation : FOInterpretation (L.sum Language.order) L' Tag dim
    119 /-- The counts agree, whatever the linear order. -/
    120 correct : ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A],
    121 C A = D (toInterpretation.Map A)
    122
    123open FirstOrder
    124
    125open Language Structure
    126
    127variable {L L' : Language.{0, 0}}
    128
    129/-- An ordered parsimonious reduction through a **relativized**
    130interpretation: the two counts agree, the target structure being carried by
    131the definable subset of `Tag × A^dim` that the domain formula carves out. -/
    132structure RelOrderedParsimoniousReduction [L.IsRelational] [L'.IsRelational]
    133 (C : CountingProblem L) (D : CountingProblem L') where
    134 /-- The tags used by the underlying interpretation. -/
    135 Tag : Type
    136 /-- Tags are finite, so that finite structures map to finite structures. -/
    137 [tagFinite : Finite Tag]
    138 /-- The dimension of the underlying interpretation. -/
    139 dim : ℕ
    140 /-- The underlying relativized interpretation, over the ordered expansion. -/
    141 toRelInterpretation : RelFOInterpretation (L.sum Language.order) L' Tag dim
    142 /-- The definable domain is inhabited. -/
    143 dom_nonempty : ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A],
    144 ∃ (t : Tag) (w : Fin dim → A), (toRelInterpretation.domFormula t).Realize w
    145 /-- The counts agree, whatever the linear order. -/
    146 correct : ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A],
    147 C A = D (toRelInterpretation.MapRel A)
    148
    149end Lax366625.CountingProblems
    150

    Discussion

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

    Loading discussion…