-
Notifications
You must be signed in to change notification settings - Fork 257
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: Handle powers and multiplicative inverses in cancel_denoms #7819
Conversation
Drive-by comment: I think the proper way to format things (so they can be picked up by github) is to make "feat: Handle powers and multiplicative inverses in cancel_denoms" the PR title. The "fixes ..." part should go above the line, so it will become part of the eventual commit message. Thanks for doing this, I'm always excited to see tactic improvements! |
This is great -- thanks for the quick fix! bors merge |
fixes #7732 Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
@@ -177,6 +197,24 @@ partial def mkProdPrf (α : Q(Type u)) (sα : Q(Field $α)) (v : ℕ) (t : Tree | |||
| t, ~q(-$e) => do | |||
let v ← mkProdPrf α sα v t e | |||
mkAppM ``CancelDenoms.neg_subst #[v] | |||
| .node _ lhs@(.node k1 _ _) (.node k2 .nil .nil), ~q($e1 ^ $e2) => do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better as
| .node _ lhs@(.node k1 _ _) (.node k2 .nil .nil), ~q($e1 ^ $e2) => do | |
| .node _ lhs@(.node k1 _ _) (.node k2 .nil .nil), ~q($e1 ^ ($e2 : ℕ)) => do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cool to handle zpow
here too, such as 2 ^ (-1)
; but it's very reasonable to dexlare that out of scope.
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
fixes #7732
Also solves the specific example in #7808, but I would imagine that there are still cases where
cancel_denoms
is not idempotent.