lean4-htt/tests/lean/run/match_eqns_bug.lean
Leonardo de Moura 778333c667
fix: match equality generation (#6719)
This PR fixes a bug in the equational theorem generator for
`match`-expressions. See new test for an example.

Signed-off-by: Leonardo de Moura <leodemoura@amazon.com>
Co-authored-by: Leonardo de Moura <leodemoura@amazon.com>
2025-01-21 02:05:37 +00:00

13 lines
324 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

inductive Vec (α : Type u) : Nat → Type u
| zero : Vec α 0
| cons : α → Vec α n → Vec α (n+1)
def g (n : Nat) (v w : Vec α n) : Nat :=
match v, w with
| .zero, _ => 1
| _, .cons _ (.cons _ _ ) => 2
| _, _ => 3
example (h : g a b c = 4) : False := by
unfold g at h
split at h <;> contradiction