Counting problems and parsimonious reductions #
A decision problem is an isomorphism-invariant property of finite structures;
a counting problem (DescriptiveComplexity.CountingProblem) is an
isomorphism-invariant number attached to them – the number of satisfying
assignments of a CNF formula, of proper colorings of a graph, of accepting runs
of a machine. Vocabularies, tagged interpretations and the invariance
discipline carry over unchanged from DescriptiveComplexity.Interpretation.
The reductions of this file are the parsimonious ones: a first-order interpretation under which the two counts are equal,
DescriptiveComplexity.ParsimoniousReduction, notationC ≤ᵖ D, over the bare vocabulary, andDescriptiveComplexity.OrderedParsimoniousReduction, notationC ≤ᵖ[≤] D, over the ordered expansion, the equation holding whatever the linear order.
They are DescriptiveComplexity.FOReduction and
DescriptiveComplexity.OrderedFOReduction with the equivalence of the correct
field replaced by an equation, and they compose for the same reason: the
composite interpretation is isomorphic to the twice-applied one, and a counting
problem does not distinguish isomorphic structures.
Every counting problem has a decision problem underneath, its support
(DescriptiveComplexity.CountingProblem.support): “is the count positive?”. A
parsimonious reduction between two counting problems is in particular a
first-order reduction between their supports
(DescriptiveComplexity.ParsimoniousReduction.toFOReduction), which is how
hardness results for counting problems yield hardness results for decision
problems.
A counting problem in the sense of descriptive complexity: an
isomorphism-invariant natural number attached to every L-structure. As for
DescriptiveComplexity.DecisionProblem, only the values on finite structures are ever
read.
The count:
C A(through the function coercion) is the number attached to the structureA.- iso_invariant {A B : Type} [L.Structure A] [L.Structure B] : ∀ (a : L.Equiv A B), self.Count A = self.Count B
Counting problems do not distinguish isomorphic structures.
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The decision problem underneath a counting problem: is the count positive?
Equations
Instances For
Dependency graph
Dependency graph
Reading an interpretation over a larger source vocabulary #
An interpretation read over a larger source vocabulary: every defining formula is transported along the vocabulary map.
Equations
- DescriptiveComplexity.FOInterpretation.liftSource Φ I = { relFormula := fun {n : ℕ} (R : L'.Relations n) (t : Fin n → Tag) => Φ.onFormula (I.relFormula R t) }
Instances For
Dependency graph
On a structure that is an expansion along the vocabulary map, the lifted interpretation produces the same structure as the original one: the identity on tagged tuples is an isomorphism.
Equations
- DescriptiveComplexity.FOInterpretation.liftSourceLEquiv Φ I A = { toEquiv := Equiv.refl ((DescriptiveComplexity.FOInterpretation.liftSource Φ I).Map A), map_fun' := ⋯, map_rel' := ⋯ }
Instances For
Dependency graph
Parsimonious reductions #
A parsimonious first-order reduction from the counting problem C to the
counting problem D: a first-order interpretation under which the two counts
agree.
- Tag : Type
The tags (copies of
A^dim) used by the underlying interpretation. Tags are finite, so that finite structures map to finite structures.
Tags are nonempty, so that nonempty structures map to nonempty structures.
- dim : ℕ
The dimension of the underlying interpretation.
- toInterpretation : FOInterpretation L L' self.Tag self.dim
The underlying first-order interpretation.
- correct (A : Type) [L.Structure A] [Finite A] [Nonempty A] : C.Count A = D.Count (self.toInterpretation.Map A)
The counts agree, on the finite nonempty structures.
Instances For
Dependency graph
A parsimonious first-order reduction from the counting problem C to the
counting problem D: a first-order interpretation under which the two counts
agree.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
An ordered parsimonious reduction: a first-order interpretation over the ordered expansion of the source vocabulary under which the two counts agree, for every linear order of the (finite) input structure.
- Tag : Type
The tags (copies of
A^dim) used by the underlying interpretation. Tags are finite, so that finite structures map to finite structures.
Tags are nonempty, so that nonempty structures map to nonempty structures.
- dim : ℕ
The dimension of the underlying interpretation.
- toInterpretation : FOInterpretation (L.sum FirstOrder.Language.order) L' self.Tag self.dim
The underlying first-order interpretation, over the ordered expansion.
- correct (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] : C.Count A = D.Count (self.toInterpretation.Map A)
The counts agree, whatever the linear order.
Instances For
Dependency graph
An ordered parsimonious reduction: a first-order interpretation over the ordered expansion of the source vocabulary under which the two counts agree, for every linear order of the (finite) input structure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A parsimonious reduction is a first-order reduction between the supports: equal counts are positive together.
Equations
- f.toFOReduction = { Tag := f.Tag, tagFinite := ⋯, tagNonempty := ⋯, dim := f.dim, toInterpretation := f.toInterpretation, correct := ⋯ }
Instances For
Dependency graph
An ordered parsimonious reduction is an ordered first-order reduction between the supports.
Equations
- f.toOrderedFOReduction = { Tag := f.Tag, tagFinite := ⋯, tagNonempty := ⋯, dim := f.dim, toInterpretation := f.toInterpretation, correct := ⋯ }
Instances For
Dependency graph
Reflexivity and transitivity #
Every counting problem parsimoniously reduces to itself, via the identity interpretation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Transitivity of parsimonious reductions. The composite interpretation
is only isomorphic to the twice-applied one, so the isomorphism-invariance
built into DescriptiveComplexity.CountingProblem concludes.
Equations
Instances For
Dependency graph
Transitivity of ordered parsimonious reductions. 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 parsimonious reduction is in particular an ordered one: lift its defining formulas to the ordered expansion, where they ignore the order.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Mixed transitivity: an ordered parsimonious reduction followed by a plain one.
Equations
- g.trans_pars f = g.trans f.toOrdered
Instances For
Dependency graph
Mixed transitivity: a plain parsimonious reduction followed by an ordered one.
Equations
- g.trans_ordered f = g.toOrdered.trans f
Instances For
Dependency graph
Trans instance for parsimonious reductions, enabling calc chains.
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
Trans instance for ordered parsimonious reductions.
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
Mixed transitivity: an ordered parsimonious 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 parsimonious reduction followed by an ordered one.
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
Replacing the source of an ordered parsimonious reduction by a counting problem with the same values on finite structures.
Equations
- DescriptiveComplexity.OrderedParsimoniousReduction.congrSource h g = { Tag := g.Tag, tagFinite := ⋯, tagNonempty := ⋯, dim := g.dim, toInterpretation := g.toInterpretation, correct := ⋯ }