lean4-htt/tests/lean/lift_coe_off.lean
Daniel Selsam a9b01991c2 feat(frontends/lean/inductive_cmd): new frontend for the inductive cmd
Conflicts:
	src/frontends/lean/CMakeLists.txt
	src/frontends/lean/structure_cmd.h
2016-08-17 07:34:03 -07:00

15 lines
395 B
Text

open nat
inductive tree (A : Type)
| leaf : A → tree
| node : tree → tree → tree
-- set_option elaborator.lift_coercions false
definition size {A : Type} (t : tree A) :nat:=
tree.rec (λ a, 1) (λ t₁ t₂ n₁ n₂, n₁ + n₂) t
--set_option elaborator.lift_coercions true
definition size2 {A : Type} (t : tree A) :nat:=
tree.rec (λ a, 1) (λ t₁ t₂ n₁ n₂, n₁ + n₂) t