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

an equation lemma with autoParam arguments fails to rewrite #2243

Closed
Komyyy opened this issue May 30, 2023 · 0 comments · Fixed by #3316
Closed

an equation lemma with autoParam arguments fails to rewrite #2243

Komyyy opened this issue May 30, 2023 · 0 comments · Fixed by #3316

Comments

@Komyyy
Copy link

Komyyy commented May 30, 2023

Description

When we use an equation lemma of a definition with autoParam arguments in rewrite tactic, it fails.

Steps to Reproduce

import Lean

open Lean Elab Tactic in
elab "exact_false" : tactic =>
  closeMainGoal (mkConst ``Bool.false)

def f (b : Bool := by exact_false) : Nat := bif b then 1 else 0

example : f false = bif false then 1 else 0 := by rw [f]
example : f true = bif true then 1 else 0 := by rw [f]
example (b : Bool) : f b = bif b then 1 else 0 := by rw [f]

Expected behavior:

Above all 3 examples succeed.

Actual behavior:

example : f false = bif false then 1 else 0 := by rw [f]
-- failed to rewrite using equation theorems for 'f'
example : f true = bif true then 1 else 0 := by rw [f]
-- failed to rewrite using equation theorems for 'f'
example (b : Bool) : f b = bif b then 1 else 0 := by rw [f]
-- failed to rewrite using equation theorems for 'f'

Versions

Lean (version 4.0.0-nightly-2023-05-16, commit ebc32af, Release)
Windows 11

bors bot pushed a commit to leanprover-community/mathlib4 that referenced this issue May 31, 2023
This PR also rename `locallyCompactSpace_of_Group` to `locallyCompactSpace_of_group`, and add a reference to the [issue](leanprover/lean4#2243) in `MeasureTheory.Group.Measure`.
qawbecrdtey pushed a commit to qawbecrdtey/greedoid-mathlib4 that referenced this issue Jun 12, 2023
This PR also rename `locallyCompactSpace_of_Group` to `locallyCompactSpace_of_group`, and add a reference to the [issue](leanprover/lean4#2243) in `MeasureTheory.Group.Measure`.
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this issue Mar 25, 2024
These attributes are unused in Mathlib.

Many of them were workarounds for the now-resolved leanprover/lean4#2243; this also allows the lemmas themselves (`hasFiniteIntegral_def`, `integrable_def`, `memℒp_def`, and `integrableOn_def`) to be deleted.

We are currently experiencing problems with the `@[eqns]` attribute on the Lean nightlies. I'm uncertain yet what the outcome is going to be there, but it seems prudent to reduce our unnecessary exposure to a language feature added in Mathlib.

Co-authored-by: Scott Morrison <[email protected]>
Louddy pushed a commit to leanprover-community/mathlib4 that referenced this issue Mar 25, 2024
These attributes are unused in Mathlib.

Many of them were workarounds for the now-resolved leanprover/lean4#2243; this also allows the lemmas themselves (`hasFiniteIntegral_def`, `integrable_def`, `memℒp_def`, and `integrableOn_def`) to be deleted.

We are currently experiencing problems with the `@[eqns]` attribute on the Lean nightlies. I'm uncertain yet what the outcome is going to be there, but it seems prudent to reduce our unnecessary exposure to a language feature added in Mathlib.

Co-authored-by: Scott Morrison <[email protected]>
utensil pushed a commit to leanprover-community/mathlib4 that referenced this issue Mar 26, 2024
These attributes are unused in Mathlib.

Many of them were workarounds for the now-resolved leanprover/lean4#2243; this also allows the lemmas themselves (`hasFiniteIntegral_def`, `integrable_def`, `memℒp_def`, and `integrableOn_def`) to be deleted.

We are currently experiencing problems with the `@[eqns]` attribute on the Lean nightlies. I'm uncertain yet what the outcome is going to be there, but it seems prudent to reduce our unnecessary exposure to a language feature added in Mathlib.

Co-authored-by: Scott Morrison <[email protected]>
Louddy pushed a commit to leanprover-community/mathlib4 that referenced this issue Apr 15, 2024
These attributes are unused in Mathlib.

Many of them were workarounds for the now-resolved leanprover/lean4#2243; this also allows the lemmas themselves (`hasFiniteIntegral_def`, `integrable_def`, `memℒp_def`, and `integrableOn_def`) to be deleted.

We are currently experiencing problems with the `@[eqns]` attribute on the Lean nightlies. I'm uncertain yet what the outcome is going to be there, but it seems prudent to reduce our unnecessary exposure to a language feature added in Mathlib.

Co-authored-by: Scott Morrison <[email protected]>
atarnoam pushed a commit to leanprover-community/mathlib4 that referenced this issue Apr 16, 2024
These attributes are unused in Mathlib.

Many of them were workarounds for the now-resolved leanprover/lean4#2243; this also allows the lemmas themselves (`hasFiniteIntegral_def`, `integrable_def`, `memℒp_def`, and `integrableOn_def`) to be deleted.

We are currently experiencing problems with the `@[eqns]` attribute on the Lean nightlies. I'm uncertain yet what the outcome is going to be there, but it seems prudent to reduce our unnecessary exposure to a language feature added in Mathlib.

Co-authored-by: Scott Morrison <[email protected]>
uniwuni pushed a commit to leanprover-community/mathlib4 that referenced this issue Apr 19, 2024
These attributes are unused in Mathlib.

Many of them were workarounds for the now-resolved leanprover/lean4#2243; this also allows the lemmas themselves (`hasFiniteIntegral_def`, `integrable_def`, `memℒp_def`, and `integrableOn_def`) to be deleted.

We are currently experiencing problems with the `@[eqns]` attribute on the Lean nightlies. I'm uncertain yet what the outcome is going to be there, but it seems prudent to reduce our unnecessary exposure to a language feature added in Mathlib.

Co-authored-by: Scott Morrison <[email protected]>
callesonne pushed a commit to leanprover-community/mathlib4 that referenced this issue Apr 22, 2024
These attributes are unused in Mathlib.

Many of them were workarounds for the now-resolved leanprover/lean4#2243; this also allows the lemmas themselves (`hasFiniteIntegral_def`, `integrable_def`, `memℒp_def`, and `integrableOn_def`) to be deleted.

We are currently experiencing problems with the `@[eqns]` attribute on the Lean nightlies. I'm uncertain yet what the outcome is going to be there, but it seems prudent to reduce our unnecessary exposure to a language feature added in Mathlib.

Co-authored-by: Scott Morrison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant