lean4-htt/tests/lean/run/bug_proving_eqn_lemmas.lean
2017-03-09 18:41:19 -08:00

13 lines
355 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.

universe variables u
inductive bintree (α : Type u)
| leaf : α → bintree
| node : bintree → bintree → bintree
open bintree
def to_list {α : Type u} : bintree α → list α → list α
| (leaf α) l := α :: l
| (node t₁ t₂) l := to_list t₁ (to_list t₂ l)
#eval to_list (node (node (leaf 1) (leaf 2)) (node (leaf 3) (leaf 4))) []