Documentation

Complexitylib.DescriptiveComplexity.Numerical

First-order logic with canonical numerical predicates #

Canonical expansions make order, BIT, addition, and multiplication available to the existing FO syntax. Numerical atoms have their specified natural-number semantics; input formulas embed without changing truth. The computable expansion agrees with its propositional counterpart, so the existing Boolean evaluator can check formulas on these expansions.

This supplies the semantic interfaces for FO[BIT] and FO[ADD, MUL]. Their equality of expressive power, formula definitions of one arithmetic basis from the other, and the uniform circuit capture theorem remain separate results.

@[simp]

Canonical numerical expansion preserves the universe exactly.

@[simp]

Forgetting the added symbols recovers the original structure.

@[simp]
theorem Complexity.DescriptiveComplexity.Formula.withNumerical_sat {V : Vocabulary} {n : ℕ} (A : FinStruct V) (φ : Formula V n) (predicates : List NumericalPredicate) (σ : Env A.card n) :
Sat (A.withNumerical predicates) σ (φ.withNumerical predicates) ↔ Sat A σ φ

Embedding an input formula into the numerical vocabulary preserves satisfaction.

@[simp]
theorem Complexity.DescriptiveComplexity.Formula.numerical_sat {V : Vocabulary} {n : ℕ} (A : FinStruct V) (predicates : List NumericalPredicate) (r : Fin predicates.length) (args : Fin (predicates.get r).arity → Term (V.withNumerical predicates) n) (σ : Env A.card n) :
Sat (A.withNumerical predicates) σ (numerical predicates r args) ↔ (predicates.get r).Holds fun (i : Fin (predicates.get r).arity) => ↑(Term.eval (A.withNumerical predicates) σ (args i))

A designated numerical atom has its canonical meaning on the evaluated arguments.

@[simp]

The order atom compares the natural indices of its two elements.

@[simp]

BIT reads the indicated zero-based bit of the element's natural index.

@[simp]

The computable expansion has exactly the specified propositional semantics.

Every input FO definition remains a definition after adding numerical predicates.