lean4-htt/tests/lean/run/matchGenBug.lean
Leonardo de Moura 4657d47c16 chore: fix tests
2022-03-03 18:13:34 -08:00

20 lines
658 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.

theorem foo (x : Nat) (h : x > 0) : x ≠ 0 :=
match x with
| 0 => sorry
| h+1 => sorry
inductive Mem : α → List α → Prop where
| head (a : α) (as : List α) : Mem a (a::as)
| tail (a b : α) (bs : List α) : Mem a bs → Mem a (b::bs)
infix:50 (priority := high) "∈" => Mem
theorem mem_split {a : α} {as : List α} (h : a ∈ as) : ∃ s t, as = s ++ a :: t := by
induction as with
| nil => cases h
| cons b bs ih => cases h with
| head a bs => exact ⟨[], ⟨bs, rfl⟩⟩
| tail a b bs h =>
match bs, ih h with
| _, ⟨s, t, rfl⟩ =>
exists b::s; exists t
rw [List.cons_append]