-
Notifications
You must be signed in to change notification settings - Fork 80
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(library/init/logic): mark dif_ctx_congr as @[congr] #378
Conversation
Have you tried building mathlib with it? |
The first sentence of the PR is "mathlib still compiles", right? |
Right, I should read more carefully. This looks good to me. I haven't reviewed a PR for a while. What is the new way of putting one on the build queue? |
You can type |
Nice! Thanks! So by you explaining it to me, you actually accepted the PR, right? |
No, I didn't put the command on its own line. Didn't want to keep all the fun for myself. 😉 |
Here we go then! |
bors merge |
mathlib still compiles, and we can simplify inside the condition of a `dite`: ``` inductive A (α : Type) | mk : α → A @[instance] axiom classical {α : Type} : decidable_eq α example {α : Type} (a b : α) : (if h : A.mk a = A.mk b then true else false) ↔ (if h : a = b then true else false) := begin simp, -- fails end attribute [congr] dif_ctx_congr example {α : Type} (a b : α) : (if h : A.mk a = A.mk b then true else false) ↔ (if h : a = b then true else false) := begin simp, -- succeeds end ``` The example where I wanted this to work actually using the hypothesis `h` in the branches, and it now works fine. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Pull request successfully merged into master. Build succeeded: |
mathlib still compiles, and we can simplify inside the condition of a
dite
:The example where I wanted this to work actually using the hypothesis
h
in the branches, and it now works fine.