lean4-htt/tests/lean/run/def6.lean
Leonardo de Moura f0f9880ece refactor(library/equations_compiler/elim_match,library/tactic/cases_tactic):
new design for elim_match

I still need to fix lemma generation, and refactor induction/subst tactics
2016-08-28 13:15:10 -07:00

19 lines
424 B
Text

set_option new_elaborator true
inductive vec (A : Type) : nat → Type
| nil {} : vec 0
| cons : Π {n}, A → vec n → vec (n+1)
open vec
definition h {A : Type} : ∀ {n}, vec A (n+1) → A
| n (cons a v) := a
definition t {A : Type} : ∀ {n}, vec A (n+1) → vec A n
| n (cons a v) := v
example {A n} (a : A) (v : vec A n) : h (cons a v) = a :=
rfl
example {A n} (a : A) (v : vec A n) : t (cons a v) = v :=
rfl