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

New simp lemmas can remove old ones from simp set #163

Closed
gebner opened this issue Mar 27, 2020 · 0 comments
Closed

New simp lemmas can remove old ones from simp set #163

gebner opened this issue Mar 27, 2020 · 0 comments

Comments

@gebner
Copy link
Member

gebner commented Mar 27, 2020

example {α} [subsingleton α] (a b : α) : a = b := by simp -- fails

@[simp] lemma subsingleton.eq {α} [subsingleton α] (a b : α) : a = b ↔ true := by cc

example {α} [subsingleton α] (a b : α) : a = b := by simp -- works


-- let's generalize this to unique
class unique (α : Sort*) extends inhabited α := [ss : subsingleton α]
attribute [instance] unique.ss

@[simp] lemma unique.eq {α} [unique α] (a b : α) : a = b ↔ true :=
subsingleton.eq _ _



example {α} [subsingleton α] (a b : α) : a = b := by simp -- fails!?!
mergify bot pushed a commit to leanprover-community/mathlib3 that referenced this issue Apr 2, 2020
This PR fixes some bugs in the `simp_nf` linter.  Previously it ignored all errors (from failing tactics).  I've changed this so that errors from linters are handled centrally and reported as linter warnings.  The `simp_is_conditional` function was also broken.

As usual, new linters find new issues:

 1. Apparently Lean sometimes throws away simp lemmas.  leanprover-community/lean#163
 2. Some types define `has_coe` but have an incorrect `has_coe_to_fun`, causing the simplifier to loop `⇑f a = ⇑↑f a = ⇑f a`.  See the new library note:
@bors bors bot closed this as completed in a1ef7c1 May 15, 2020
anrddh pushed a commit to anrddh/mathlib that referenced this issue May 15, 2020
…#2266)

This PR fixes some bugs in the `simp_nf` linter.  Previously it ignored all errors (from failing tactics).  I've changed this so that errors from linters are handled centrally and reported as linter warnings.  The `simp_is_conditional` function was also broken.

As usual, new linters find new issues:

 1. Apparently Lean sometimes throws away simp lemmas.  leanprover-community/lean#163
 2. Some types define `has_coe` but have an incorrect `has_coe_to_fun`, causing the simplifier to loop `⇑f a = ⇑↑f a = ⇑f a`.  See the new library note:
anrddh pushed a commit to anrddh/mathlib that referenced this issue May 16, 2020
…#2266)

This PR fixes some bugs in the `simp_nf` linter.  Previously it ignored all errors (from failing tactics).  I've changed this so that errors from linters are handled centrally and reported as linter warnings.  The `simp_is_conditional` function was also broken.

As usual, new linters find new issues:

 1. Apparently Lean sometimes throws away simp lemmas.  leanprover-community/lean#163
 2. Some types define `has_coe` but have an incorrect `has_coe_to_fun`, causing the simplifier to loop `⇑f a = ⇑↑f a = ⇑f a`.  See the new library note:
cipher1024 pushed a commit to cipher1024/mathlib that referenced this issue Mar 15, 2022
…#2266)

This PR fixes some bugs in the `simp_nf` linter.  Previously it ignored all errors (from failing tactics).  I've changed this so that errors from linters are handled centrally and reported as linter warnings.  The `simp_is_conditional` function was also broken.

As usual, new linters find new issues:

 1. Apparently Lean sometimes throws away simp lemmas.  leanprover-community/lean#163
 2. Some types define `has_coe` but have an incorrect `has_coe_to_fun`, causing the simplifier to loop `⇑f a = ⇑↑f a = ⇑f a`.  See the new library note:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant