Documentation

Mathlib.ModelTheory.Arithmetic.Presburger.Semilinear.Defs

Linear and semilinear sets #

This file defines linear and semilinear sets. In an AddCommMonoid, a linear set is a coset of a finitely generated additive submonoid, and a semilinear set is a finite union of linear sets.

We prove that semilinear sets are closed under union, projection, set addition and additive closure. We also prove that any semilinear set can be decomposed into a finite union of proper linear sets, which are linear sets with linearly independent submonoid generators (periods).

Main Definitions #

Main Results #

Naming convention #

IsSemilinearSet.proj projects a semilinear set of ι ⊕ κ → M to ι → M by taking Sum.inl on the index. It is a special case of IsSemilinearSet.image, and is useful in proving semilinearity of sets in form { x | ∃ y, p x y }.

References #

def IsLinearSet {M : Type u_1} [AddCommMonoid M] (s : Set M) :

A set is linear if it is a coset of a finitely generated additive submonoid.

Equations
Instances For
    theorem isLinearSet_iff {M : Type u_1} [AddCommMonoid M] {s : Set M} :
    IsLinearSet s ∃ (a : M) (t : Finset M), s = a +ᵥ (AddSubmonoid.closure t)

    An equivalent expression of IsLinearSet in terms of Finset instead of Set.Finite.

    @[simp]
    theorem IsLinearSet.singleton {M : Type u_1} [AddCommMonoid M] (a : M) :
    theorem isLinearSet_iff_exists_fg_eq_vadd {M : Type u_1} [AddCommMonoid M] {s : Set M} :
    IsLinearSet s ∃ (a : M) (P : AddSubmonoid M), P.FG s = a +ᵥ P
    theorem IsLinearSet.of_fg {M : Type u_1} [AddCommMonoid M] {P : AddSubmonoid M} (hP : P.FG) :
    theorem IsLinearSet.vadd {M : Type u_1} [AddCommMonoid M] {s : Set M} (a : M) (hs : IsLinearSet s) :
    theorem IsLinearSet.add {M : Type u_1} [AddCommMonoid M] {s₁ s₂ : Set M} (hs₁ : IsLinearSet s₁) (hs₂ : IsLinearSet s₂) :
    IsLinearSet (s₁ + s₂)
    theorem IsLinearSet.image {M : Type u_1} {N : Type u_2} {F : Type u_5} [AddCommMonoid M] [AddCommMonoid N] [FunLike F M N] [AddMonoidHomClass F M N] {s : Set M} (hs : IsLinearSet s) (f : F) :
    IsLinearSet (f '' s)
    def IsSemilinearSet {M : Type u_1} [AddCommMonoid M] (s : Set M) :

    A set is semilinear if it is a finite union of linear sets.

    Equations
    Instances For
      @[simp]
      theorem IsSemilinearSet.of_fg {M : Type u_1} [AddCommMonoid M] {P : AddSubmonoid M} (hP : P.FG) :
      theorem IsSemilinearSet.union {M : Type u_1} [AddCommMonoid M] {s₁ s₂ : Set M} (hs₁ : IsSemilinearSet s₁) (hs₂ : IsSemilinearSet s₂) :
      IsSemilinearSet (s₁ s₂)

      Semilinear sets are closed under union.

      theorem IsSemilinearSet.sUnion {M : Type u_1} [AddCommMonoid M] {S : Set (Set M)} (hS : S.Finite) (hS' : sS, IsSemilinearSet s) :
      theorem IsSemilinearSet.iUnion {M : Type u_1} {ι : Type u_3} [AddCommMonoid M] [Finite ι] {s : ιSet M} (hs : ∀ (i : ι), IsSemilinearSet (s i)) :
      IsSemilinearSet (⋃ (i : ι), s i)
      theorem IsSemilinearSet.biUnion {M : Type u_1} {ι : Type u_3} [AddCommMonoid M] {s : Set ι} {t : ιSet M} (hs : s.Finite) (ht : is, IsSemilinearSet (t i)) :
      IsSemilinearSet (⋃ is, t i)
      theorem IsSemilinearSet.biUnion_finset {M : Type u_1} {ι : Type u_3} [AddCommMonoid M] {s : Finset ι} {t : ιSet M} (ht : is, IsSemilinearSet (t i)) :
      IsSemilinearSet (⋃ is, t i)
      theorem IsSemilinearSet.vadd {M : Type u_1} [AddCommMonoid M] {s : Set M} (a : M) (hs : IsSemilinearSet s) :
      theorem IsSemilinearSet.add {M : Type u_1} [AddCommMonoid M] {s₁ s₂ : Set M} (hs₁ : IsSemilinearSet s₁) (hs₂ : IsSemilinearSet s₂) :
      IsSemilinearSet (s₁ + s₂)

      Semilinear sets are closed under set addition.

      theorem IsSemilinearSet.image {M : Type u_1} {N : Type u_2} {F : Type u_5} [AddCommMonoid M] [AddCommMonoid N] [FunLike F M N] [AddMonoidHomClass F M N] {s : Set M} (hs : IsSemilinearSet s) (f : F) :
      theorem isSemilinearSet_image_iff {M : Type u_1} {N : Type u_2} [AddCommMonoid M] [AddCommMonoid N] {s : Set M} {F : Type u_6} [EquivLike F M N] [AddEquivClass F M N] (f : F) :
      theorem IsSemilinearSet.proj {M : Type u_1} {ι : Type u_3} {κ : Type u_4} [AddCommMonoid M] {s : Set (ι κM)} (hs : IsSemilinearSet s) :
      IsSemilinearSet {x : ιM | ∃ (y : κM), Sum.elim x y s}

      Semilinear sets are closed under projection (from ι ⊕ κ → M to ι → M by taking Sum.inl on the index). It is a special case of IsSemilinearSet.image.

      theorem IsSemilinearSet.proj' {M : Type u_1} {ι : Type u_3} {κ : Type u_4} [AddCommMonoid M] {p : (ιM)(κM)Prop} :
      IsSemilinearSet {x : ι κM | p (x Sum.inl) (x Sum.inr)}IsSemilinearSet {x : ιM | ∃ (y : κM), p x y}

      A variant of Semilinear.proj for backward reasoning.

      Semilinear sets are closed under additive closure.

      def IsProperLinearSet {M : Type u_1} [AddCommMonoid M] (s : Set M) :

      A linear set is proper if its submonoid generators (periods) are linearly independent.

      Equations
      Instances For
        theorem isProperLinearSet_iff {M : Type u_1} [AddCommMonoid M] {s : Set M} :
        IsProperLinearSet s ∃ (a : M) (t : Finset M), LinearIndepOn id t s = a +ᵥ (AddSubmonoid.closure t)
        def IsProperSemilinearSet {M : Type u_1} [AddCommMonoid M] (s : Set M) :

        A semilinear set is proper if it is a finite union of proper linear sets.

        Equations
        Instances For
          theorem IsProperSemilinearSet.union {M : Type u_1} [AddCommMonoid M] {s₁ s₂ : Set M} (hs₁ : IsProperSemilinearSet s₁) (hs₂ : IsProperSemilinearSet s₂) :
          theorem IsProperSemilinearSet.sUnion {M : Type u_1} [AddCommMonoid M] {S : Set (Set M)} (hS : S.Finite) (hS' : sS, IsProperSemilinearSet s) :
          theorem IsProperSemilinearSet.biUnion {M : Type u_1} {ι : Type u_3} [AddCommMonoid M] {s : Set ι} {t : ιSet M} (hs : s.Finite) (ht : is, IsProperSemilinearSet (t i)) :
          IsProperSemilinearSet (⋃ is, t i)
          theorem IsProperSemilinearSet.biUnion_finset {M : Type u_1} {ι : Type u_3} [AddCommMonoid M] {s : Finset ι} {t : ιSet M} (ht : is, IsProperSemilinearSet (t i)) :
          IsProperSemilinearSet (⋃ is, t i)

          The proper decomposition of semilinear sets: every semilinear set is a finite union of proper linear sets.