Skip to content

[Merged by Bors] - fix: discard linarith wrong type equalities, style#2611

Closed
digama0 wants to merge 6 commits intomasterfrom
wrong_type_linarith
Closed

[Merged by Bors] - fix: discard linarith wrong type equalities, style#2611
digama0 wants to merge 6 commits intomasterfrom
wrong_type_linarith

Conversation

@digama0
Copy link
Copy Markdown
Member

@digama0 digama0 commented Mar 3, 2023

Mostly style fixes in linarith, but also fixes #2610


Open in Gitpod

return [← rearrangeComparison e] }
def compWithZero : Preprocessor where
name := "make comparisons with zero"
transform e := try pure [← rearrangeComparison e] catch _ => pure []
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is the actual fix for #2610

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't catching everything a bit risky? Shouldn't we only catch typeclass failures?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay, I've changed this to only catch synthesis exceptions, but it is probably clunky.

Comment on lines 412 to +414
def preprocess (pps : List GlobalBranchingPreprocessor) (g : MVarId) (l : List Expr) :
MetaM (List Branch) :=
pps.foldlM (fun ls pp => do pure (← ls.mapM $ fun b => do pp.process b.1 b.2).join) [(g, l)]
pps.foldlM (fun ls pp => return (← ls.mapM fun (g, l) => do pp.process g l).join) [(g, l)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will conflict with #2605

@kim-em kim-em added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 6, 2023
@kim-em kim-em removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 20, 2023
@kim-em kim-em added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 24, 2023
@alexjbest alexjbest added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. awaiting-review and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Apr 19, 2023
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 19, 2023
@kim-em kim-em added the t-meta Tactics, attributes or user commands label Apr 20, 2023
@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Apr 20, 2023

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Apr 20, 2023
bors bot pushed a commit that referenced this pull request Apr 20, 2023
Mostly style fixes in linarith, but also fixes #2610




Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Alex J Best <alex.j.best@gmail.com>
@bors
Copy link
Copy Markdown

bors bot commented Apr 20, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix: discard linarith wrong type equalities, style [Merged by Bors] - fix: discard linarith wrong type equalities, style Apr 20, 2023
@bors bors bot closed this Apr 20, 2023
@bors bors bot deleted the wrong_type_linarith branch April 20, 2023 05:40
bors bot pushed a commit that referenced this pull request Apr 20, 2023
Those used to be necessary because of a linarith bug, which was fixed in
#2611



Co-authored-by: Moritz Firsching <firsching@google.com>
kbuzzard pushed a commit that referenced this pull request Apr 22, 2023
Those used to be necessary because of a linarith bug, which was fixed in
#2611



Co-authored-by: Moritz Firsching <firsching@google.com>
kim-em added a commit that referenced this pull request May 10, 2023
Mostly style fixes in linarith, but also fixes #2610




Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Alex J Best <alex.j.best@gmail.com>
kim-em pushed a commit that referenced this pull request May 10, 2023
Those used to be necessary because of a linarith bug, which was fixed in
#2611



Co-authored-by: Moritz Firsching <firsching@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linarith not ignoring irrelevant (in)equalities

4 participants