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

25 lines
454 B
Text

open nat
namespace test
inductive lift .{l} (A : Type.{l}) : Type.{l+1}
| up : A → lift
namespace lift
definition down {A : Type} (a : lift A) : A :=
lift.rec (λ a, a) a
theorem down_up {A : Type} (a : A) : down (up a) = a :=
rfl
theorem up_down {A : Type} (a' : lift A) : up (down a') = a' :=
lift.induction_on a' (λ a, rfl)
end lift
set_option pp.universes true
check nat
check lift nat
open lift
definition one1 : lift nat := up 1
end test