-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: PProd and MProd syntax (part 2) #4730
Conversation
Not sure if it is acceptable to waste syntax space on something internal like this, hence marking as This seems to need a stage0 update after defining the parser, unless I am mistaken. |
d5f6f6e
to
06e19e5
Compare
Mathlib CI status (docs):
|
06e19e5
to
67bdcfe
Compare
the internal constructions for structural and well-founded recursion use plenty of `PProd` and `MProd`, and reading these, deeply nested and in prefix notation, is unnecessarily troublesome. Therefore this introduces notations ``` a ×ₚ b -- PProd a b a ×ₘ b -- MProd a b ()ₚ -- PUnit.unit (x,y,z)ₚ -- PProd.mk x (PProd.mk y z) (x,y,z)ₘ -- MProd.mk x (MProd.mk y z) ``` (This is part 1, the rest will follow in #4730 after a stage0 update.)
actually enables the syntax, adds a test file and updates the test output.
67bdcfe
to
c9fbd76
Compare
I was just about to take a look at this PR at the start of my day and was surprised to see it's already been merged — that gave me just one working day, and Friday I wasn't doing any Lean. I'm not sure about global "p" and "m" tuple notation. Are users supposed to figure out they mean "polymorphic" and "monomorphic"? Should these notations be scoped since these are fairly specialized? Are there alternative notations? Did we check other projects that we're not stepping on their pre-existing notations? I would have strongly suggested that the notation |
You are absolutely right, I was a bit too trigger happy with this PR. I disregarded And for terms: Special syntax isn’t actually needed given that we can use angle brackets. I’ll change this tomorrow or so. Sorry for the confusion, I should have waited for your feedback. |
the internal constructions for structural and well-founded recursion
use plenty of
PProd
andMProd
, and reading these, deeplynested and in prefix notation, is unnecessarily troublesome.
Therefore this introduces notations
(This is the post-stage0-part 2.)