You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During elaboration, Lean.Elab.Term.ToDepElimPattern.normalize ignores the explicit inaccessible pattern in (.(b), b) and rewrites it to (b, .(b)), which causes an error since the second component is now neither a constructor nor a variable pattern.
Steps to Reproduce
Run the code above.
Expected behavior: The code succeeds with no errors.
Actual behavior: The code results in the following error:
dependent match elimination failed, inaccessible pattern found
.(fst✝)
constructor expected
Versions
Lean 4.16.0-nightly-2025-01-06
This behavior has existed since Lean 4.0.0-m1
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
example : (x : Bool × Bool) → x.fst = x.snd ⊕' Unit → Unit | (.(b), b), .inl rfl => () | (_, false), _ => () | (_, true), _ => ()
During elaboration,
Lean.Elab.Term.ToDepElimPattern.normalize
ignores the explicit inaccessible pattern in(.(b), b)
and rewrites it to(b, .(b))
, which causes an error since the second component is now neither a constructor nor a variable pattern.Steps to Reproduce
Run the code above.
Expected behavior: The code succeeds with no errors.
Actual behavior: The code results in the following error:
Versions
Lean 4.16.0-nightly-2025-01-06
This behavior has existed since Lean 4.0.0-m1
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: