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

linarith not ignoring irrelevant (in)equalities #2610

Closed
mo271 opened this issue Mar 3, 2023 · 2 comments
Closed

linarith not ignoring irrelevant (in)equalities #2610

mo271 opened this issue Mar 3, 2023 · 2 comments
Labels
bug Something isn't working t-meta Tactics, attributes or user commands

Comments

@mo271
Copy link
Collaborator

mo271 commented Mar 3, 2023

see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/linarith.20and.20ENNReal and the mwe of @eric-wieser there:

import Mathlib.Tactic.Linarith

example : 01 := by linarith -- ok

example (s : Set ℕ) (h : s = ∅) : 01 :=
by linarith
/-
failed to synthesize
  AddGroup (Set ℕ)
-/

Seems like linarith should ignore (in)equalities in the context it doesn't get.

@mo271 mo271 added the bug Something isn't working label Mar 3, 2023
@dwrensha
Copy link
Member

dwrensha commented Mar 3, 2023

@mo271
Copy link
Collaborator Author

mo271 commented Mar 3, 2023

I see, you used the same workaround: clear the interfering lemmas before invoking linarith.

@hrmacbeth hrmacbeth added the t-meta Tactics, attributes or user commands label Mar 21, 2023
@bors bors bot closed this as completed in 32cb47a Apr 20, 2023
semorrison added a commit that referenced this issue 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working t-meta Tactics, attributes or user commands
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants