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/linarith): improve parsing expressions into linear form #2995

Closed
wants to merge 7 commits into from

Conversation

robertylewis
Copy link
Member

@robertylewis robertylewis commented Jun 8, 2020

This PR generalizes the parsing stage of linarith. It will try harder to recognize expressions as linear combinations of monomials, and will match monomials up to commutativity.

example (u v r s t : ℚ) (h : 0 < u*(t*v + t*r + s)) : 0 < (t*(r + v) + s)*3*u :=
by linarith

This is helpful for #2637 .


I'm planning a refactor/documentation push for linarith but wanted to PR this first, since I don't know how long that will take me and this is useful.

@robertylewis robertylewis added the awaiting-review The author would like community review of the PR label Jun 9, 2020
@bryangingechen bryangingechen added the t-meta Tactics, attributes or user commands label Jun 10, 2020
@semorrison
Copy link
Collaborator

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Jun 13, 2020
bors bot pushed a commit that referenced this pull request Jun 13, 2020
…2995)

This PR generalizes the parsing stage of `linarith`. It will try harder to recognize expressions as linear combinations of monomials, and will match monomials up to commutativity. 
```lean
example (u v r s t : ℚ) (h : 0 < u*(t*v + t*r + s)) : 0 < (t*(r + v) + s)*3*u :=
by linarith
```

This is helpful for #2637 .



Co-authored-by: Rob Lewis <rob.y.lewis@gmail.com>
@bors
Copy link

bors bot commented Jun 13, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(tactic/linarith): improve parsing expressions into linear form [Merged by Bors] - feat(tactic/linarith): improve parsing expressions into linear form Jun 13, 2020
@bors bors bot closed this Jun 13, 2020
@bors bors bot deleted the linarith-update branch June 13, 2020 13:30
cipher1024 pushed a commit to cipher1024/mathlib that referenced this pull request Mar 15, 2022
…eanprover-community#2995)

This PR generalizes the parsing stage of `linarith`. It will try harder to recognize expressions as linear combinations of monomials, and will match monomials up to commutativity. 
```lean
example (u v r s t : ℚ) (h : 0 < u*(t*v + t*r + s)) : 0 < (t*(r + v) + s)*3*u :=
by linarith
```

This is helpful for leanprover-community#2637 .



Co-authored-by: Rob Lewis <rob.y.lewis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants