Repository navigation
[Merged by Bors] - feat(ModelTheory): the language of Presburger Arithmetic - #27099
staroperator wants to merge 12 commits into
Conversation
PR summary 27ba7f0e60Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
YaelDillies
left a comment
There was a problem hiding this comment.
Thanks for the PR! Here is a first batch of comments.
| namespace FirstOrder | ||
|
|
||
| /-- The type of Presburger arithmetic functions, defined as (0,1,+) -/ | ||
| inductive presburgerFunc : ℕ → Type |
There was a problem hiding this comment.
The usual abbreviation of "function" is "fun"
| inductive presburgerFunc : ℕ → Type | |
| inductive presburgerFun : ℕ → Type |
There was a problem hiding this comment.
I'm following FirstOrder.ringFunc which uses Func instead of Fun.
There was a problem hiding this comment.
Can you maybe raise on Zulip that this is inconsistent with the rest of mathlib?
There was a problem hiding this comment.
Sure! It's https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/abbreviation.20.22func.22.20in.20mathlib/. I also find some other names using "func" instead of "fun".
There was a problem hiding this comment.
Based on the discussions, fun is mostly used for the lambda functions in Lean, so I think I can keep the name presburgerFunc? Or do you have any other suggestions?
There was a problem hiding this comment.
It probably can be changed later if we care
| add := Functions.apply₂ .add | ||
|
|
||
| instance : NatCast (presburger.Term α) where | ||
| natCast := Nat.unaryCast |
There was a problem hiding this comment.
Is it at all relevant to your formalisation of model theory to have log depth terms, in which case a binary cast would be more pertinent?
There was a problem hiding this comment.
Nope, I don't really compute these terms or prove anything on their sizes. However, that might be an interesting topic for future work.
There was a problem hiding this comment.
I think that if we care at all about the size of these terms, we should just do an expansion-by-definitions to a language better suited for that (not in this PR!). The function mapping x to 2x is definable in Presburger, and adding that as a function symbol would make log-length terms.
Co-authored-by: Yaël Dillies <[email protected]>
YaelDillies
left a comment
There was a problem hiding this comment.
Thanks!
maintainer delegate
|
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
|
Everything here looks good to me - I'll take a look at #27100. |
|
Thanks! |
This PR introduces the first-order language of [Presburger Arithmetic](https://en.wikipedia.org/wiki/Presburger_arithmetic). It has not defined the theory of Presburger Arithmetic yet (left as TODO), but is enough to prove some definability results (#27100). Co-authored-by: staroperator <[email protected]>
|
Pull request successfully merged into master. Build succeeded: |
…community#27099) This PR introduces the first-order language of [Presburger Arithmetic](https://en.wikipedia.org/wiki/Presburger_arithmetic). It has not defined the theory of Presburger Arithmetic yet (left as TODO), but is enough to prove some definability results (leanprover-community#27100). Co-authored-by: staroperator <[email protected]>
…community#27099) This PR introduces the first-order language of [Presburger Arithmetic](https://en.wikipedia.org/wiki/Presburger_arithmetic). It has not defined the theory of Presburger Arithmetic yet (left as TODO), but is enough to prove some definability results (leanprover-community#27100). Co-authored-by: staroperator <[email protected]>
…community#27099) This PR introduces the first-order language of [Presburger Arithmetic](https://en.wikipedia.org/wiki/Presburger_arithmetic). It has not defined the theory of Presburger Arithmetic yet (left as TODO), but is enough to prove some definability results (leanprover-community#27100). Co-authored-by: staroperator <[email protected]>
This PR introduces the first-order language of Presburger Arithmetic. It has not defined the theory of Presburger Arithmetic yet (left as TODO), but is enough to prove some definability results (#27100).