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

26 lines
564 B
Text

--
set_option pp.notation false
inductive [class] C (A : Type)
| mk : A → C
definition val {A : Type} (c : C A) : A :=
C.rec (λa, a) c
constant magic (A : Type) : A
attribute [instance, priority std.priority.max]
definition C_magic (A : Type) : C A :=
C.mk (magic A)
attribute [instance]
definition C_prop : C Prop :=
C.mk true
attribute [instance]
definition C_prod {A B : Type} (Ha : C A) (Hb : C B) : C (prod A B) :=
C.mk (pair (val Ha) (val Hb))
-- C_magic will be used because it has max priority
definition test : C (prod Prop Prop) := _
eval test