lean4-htt/tests/lean/run/def10.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

18 lines
481 B
Text

open nat
inductive bv : nat → Type
| nil : bv 0
| cons : ∀ (n) (hd : bool) (tl : bv n), bv (succ n)
open bv bool
set_option new_elaborator true
definition h : ∀ {n}, bv (succ (succ n)) → bool
| .(succ m) (cons (succ (succ m)) b v) := b
| .0 (cons (succ nat.zero) b v) := bnot b
example (m : nat) (b : bool) (v : bv (succ (succ m))) : @h (succ m) (cons (succ (succ m)) b v) = b :=
rfl
example (m : nat) (b : bool) (v : bv 1) : @h 0 (cons 1 b v) = bnot b :=
rfl