Skip to content
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

[Merged by Bors] - feat(tactic/ring): recursive ring_nf #14429

Closed
wants to merge 7 commits into from

Conversation

digama0
Copy link
Member

@digama0 digama0 commented May 28, 2022

As reported on Zulip. This allows ring_nf to rewrite inside the atoms of a ring expression, meaning that things like f (a + b) + c can simplify in both + expressions.

@eric-wieser
Copy link
Member

Does it make sense to hide the old behavior behind a { recursive := ff } flag?

@digama0
Copy link
Member Author

digama0 commented May 28, 2022

Yes, it is possible. Are folks interested in such an option?

@hrmacbeth
Copy link
Member

Are folks interested in such an option?

No strong opinion -- I see the merits of having the flexibility, but am also excited just to get the new feature merged.

@digama0 digama0 added the awaiting-review The author would like community review of the PR label Jun 2, 2022
Copy link
Member

@fpvandoorn fpvandoorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

bors d+

(red : transparency) (mode := normalize_mode.horner) (e : expr) : tactic (expr × expr) :=
do
(red : transparency) (mode := normalize_mode.horner) :
expr → opt_param _ ff → tactic (expr × expr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add to the doc what the new opt_param does?

@bors
Copy link

bors bot commented Jun 4, 2022

✌️ digama0 can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Jun 4, 2022
@robertylewis
Copy link
Member

I think the option is a nice idea but not necessary. Agree with Floris about the docs!

@digama0 digama0 added t-meta Tactics, attributes or user commands modifies-tactic-syntax This PR adds a new interactive tactic or modifies the syntax of an existing tactic. labels Jun 15, 2022
@digama0
Copy link
Member Author

digama0 commented Jun 15, 2022

bors r+

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Jun 15, 2022
@bors
Copy link

bors bot commented Jun 15, 2022

Canceled.

@digama0
Copy link
Member Author

digama0 commented Jun 15, 2022

bors r+

@bors
Copy link

bors bot commented Jun 15, 2022

Canceled.

@digama0
Copy link
Member Author

digama0 commented Jun 15, 2022

bors r+

@fpvandoorn
Copy link
Member

bors r-

You also have to provide a docstring to the structure.

@bors
Copy link

bors bot commented Jun 15, 2022

Canceled.

@digama0
Copy link
Member Author

digama0 commented Jun 15, 2022

bors r+

bors bot pushed a commit that referenced this pull request Jun 15, 2022
As [reported on Zulip](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/.60ring_nf.60.20not.20consistently.20normalizing.3F). This allows `ring_nf` to rewrite inside the atoms of a ring expression, meaning that things like `f (a + b) + c` can simplify in both `+` expressions.
@bors
Copy link

bors bot commented Jun 15, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(tactic/ring): recursive ring_nf [Merged by Bors] - feat(tactic/ring): recursive ring_nf Jun 15, 2022
@bors bors bot closed this Jun 15, 2022
@bors bors bot deleted the ring_nf_rec branch June 15, 2022 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. modifies-tactic-syntax This PR adds a new interactive tactic or modifies the syntax of an existing tactic. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants