Repository navigation
[Merged by Bors] - feat(ModelTheory): define linear and semilinear sets - #27342
staroperator wants to merge 38 commits into
Conversation
PR summary 6c38ba4b23Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| # Linear and semilinear sets | ||
|
|
||
| This file defines linear and semilinear sets over any `AddCommMonoid`. A linear set is a finitely | ||
| generated `ℕ`-submodule added by a single element, and a semilinear set is a finite union of linear |
There was a problem hiding this comment.
Is all of this easier to do over ℕ or ℤ? I usually see Presburger studied in the latter, as it is a group, and model-theoretically it is not so hard to transfer afterwards.
There was a problem hiding this comment.
The ℕ(-submodule) here is for the coefficients and can not be replaced with ℤ. This PR is only for properties that hold in a general AddCommMonoid α, which includes both α = ℕ and α = ℤ.
There was a problem hiding this comment.
But the ℕ/ℤ choice will become important when we prove things like semilinear sets are closed under intersection or complement. My experience is that you have to prove the closure under intersection for ℕ^d first (which you need Dickson's lemma), so I would prefer to define Presburger arithmetic over ℕ instead of ℤ.
There was a problem hiding this comment.
And as future work, there could be another PR to transfer things from ℕ^d to ℤ^d or even any finitely generated AddCommMonoid, as Eilenberg and Schützenberger did.
There was a problem hiding this comment.
FYI: #27789 generalizes the existing results to ℤ^d or any cancellative monoid.
|
This pull request has conflicts, please merge |
|
It looks to me like the theory you're developing about |
Yes we can define
Given the above reasons, I think it's not worth sacrificing readability for a generalization of only some trivial properties. |
|
It looks like the use of |
6c0b55e to
e3bf0c7
Compare
…for linearly and canonically ordered semiring (#27341) If the semiring `R` is linearly and canonically ordered (e.g. `R = ℕ`), `LinearIndependent` can be proved from linear combination over two disjoint sets. This result is stronger than `linearIndependent_iff'ₛ` and is particularly useful in #27342. Co-authored-by: staroperator <[email protected]> Co-authored-by: Jovan Gerbscheid <[email protected]>
e3bf0c7 to
47f2a00
Compare
…for linearly and canonically ordered semiring (leanprover-community#27341) If the semiring `R` is linearly and canonically ordered (e.g. `R = ℕ`), `LinearIndependent` can be proved from linear combination over two disjoint sets. This result is stronger than `linearIndependent_iff'ₛ` and is particularly useful in leanprover-community#27342. Co-authored-by: staroperator <[email protected]> Co-authored-by: Jovan Gerbscheid <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
380061a to
532ceb6
Compare
|
Thanks, everyone—especially @YaelDillies—for the valuable reviews ❤️. This is my most-commented PR so far! bors r+ |
Separated from #27100. This PR defines the [linear and semilinear sets](https://en.wikipedia.org/wiki/Generalized_arithmetic_progression#Semilinear_sets) for any `AddCommMonoid` and prove some basic properties.
|
Pull request successfully merged into master. Build succeeded: |
…unity#27342) Separated from leanprover-community#27100. This PR defines the [linear and semilinear sets](https://en.wikipedia.org/wiki/Generalized_arithmetic_progression#Semilinear_sets) for any `AddCommMonoid` and prove some basic properties.
…unity#27342) Separated from leanprover-community#27100. This PR defines the [linear and semilinear sets](https://en.wikipedia.org/wiki/Generalized_arithmetic_progression#Semilinear_sets) for any `AddCommMonoid` and prove some basic properties.
Separated from #27100. This PR defines the linear and semilinear sets for any
AddCommMonoidand prove some basic properties.AddMonoidHom.coe_toNatLinearMap#27085linearIndependent_iffₒₛetc for linearly and canonically ordered semiring #27341