The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V32. Logic, model theory and computability

Mathlib.ModelTheory.Arithmetic.Presburger.Definability

10 declarations. Mathlib docs · Source

Presburger definability and semilinear sets

This file formalizes the classical result that Presburger definable sets are the same as semilinear sets. As an application of this result, we show that the graph of multiplication is not Presburger definable.

Main Results

  • presburger.definable_iff_isSemilinearSet: a set is Presburger definable in ℕ if and only if it is semilinear.
  • presburger.definable₁_iff_ultimately_periodic: in the 1-dimensional case, a set is Presburger arithmetic definable in ℕ if and only if it is ultimately periodic, i.e. periodic after some number k.
  • presburger.mul_not_definable: the graph of multiplication is not Presburger definable in ℕ.

References

  • [Seymour Ginsburg and Edwin H. Spanier, Bounded ALGOL-Like Languages][ginsburg1964]
  • [Seymour Ginsburg and Edwin H. Spanier, Semigroups, Presburger Formulas, and Languages][ginsburg1966]
  • [Samuel Eilenberg and M. P. Schützenberger, Rational Sets in Commutative Monoids][eilenberg1969]

theorem FirstOrder.Language.Formula.iInf.congr_simp E1 #

∀ {L : FirstOrder.Language} {α : Type u'} {β : Type v'} [inst : Finite α] (f f_1 : α → L.Formula β),
  f = f_1 → FirstOrder.Language.Formula.iInf f = FirstOrder.Language.Formula.iInf f_1

theorem FirstOrder.Language.Formula.iSup.congr_simp E1 #

∀ {L : FirstOrder.Language} {α : Type u'} {β : Type v'} [inst : Finite α] (f f_1 : α → L.Formula β),
  f = f_1 → FirstOrder.Language.Formula.iSup f = FirstOrder.Language.Formula.iSup f_1

theorem IsLinearSet.definable E1 #

∀ {α : Type u_1} {s : Set (α → ℕ)} {A : Set ℕ} [Finite α], IsLinearSet s → A.Definable FirstOrder.Language.presburger s

theorem IsSemilinearSet.definable E1 #

∀ {α : Type u_1} {s : Set (α → ℕ)} {A : Set ℕ} [Finite α],
  IsSemilinearSet s → A.Definable FirstOrder.Language.presburger s

theorem FirstOrder.Language.presburger.term_realize_eq_add_dotProduct E1 #

∀ {α : Type u_1} {A : Set ℕ} [inst : Fintype α] (t : (FirstOrder.Language.presburger.withConstants ↑A).Term α),
  ∃ k u, ∀ (v : α → ℕ), FirstOrder.Language.Term.realize v t = k + u ⬝ᵥ v

theorem FirstOrder.Language.presburger.isSemilinearSet_boundedFormula_realize E1 #

∀ {α : Type u_1} {A : Set ℕ} [Finite α] {n : ℕ}
  (φ : (FirstOrder.Language.presburger.withConstants ↑A).BoundedFormula α n),
  IsSemilinearSet {v | φ.Realize (v ∘ Sum.inl) (v ∘ Sum.inr)}

theorem FirstOrder.Language.presburger.isSemilinearSet_formula_realize_semilinear E1 #

∀ {α : Type u_1} {A : Set ℕ} [Finite α] (φ : (FirstOrder.Language.presburger.withConstants ↑A).Formula α),
  IsSemilinearSet {x | φ.Realize x}

theorem FirstOrder.Language.presburger.definable_iff_isSemilinearSet E3 #

∀ {α : Type u_1} {A : Set ℕ} [Finite α] {s : Set (α → ℕ)},
  A.Definable FirstOrder.Language.presburger s ↔ IsSemilinearSet s

A set is Presburger definable in ℕ if and only if it is semilinear.

theorem FirstOrder.Language.presburger.definable₁_iff_ultimately_periodic E3 #

∀ {A s : Set ℕ}, A.Definable₁ FirstOrder.Language.presburger s ↔ ∃ k, ∃ p > 0, ∀ x ≥ k, x ∈ s ↔ x + p ∈ s

In the 1-dimensional case, a set is Presburger arithmetic definable in ℕ if and only if it is ultimately periodic, i.e. periodic after some number k.

theorem FirstOrder.Language.presburger.mul_not_definable E3 #

∀ {A : Set ℕ}, ¬A.Definable FirstOrder.Language.presburger {v | v 0 = v 1 * v 2}

The graph of multiplication is not Presburger definable in ℕ.