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

24 lines
940 B
Text

set_option pp.notation false
constant A : Type
constants a b : A
constant P : A → Type
constant H₁ : a = a
constant H₂ : P a
constant H₃ : a = b
constant f {A : Type} (a : A) : a = a
eval (eq.rec H₂ (@f A a) : P a)
eval (eq.rec H₂ H₁ : P a)
eval (eq.rec H₂ H₃ : P b)
eval (eq.rec H₂ (@eq.refl A a) : P a)
-- eval λ (A : Type) (a b : A) (H₁ : a = a) (P : A → Prop) (H₂ : P a) (H₃ : a = a) (c : A), eq.rec (eq.rec H₂ H₁) H₃
check @eq.rec A a P H₂ a
check λ H : a = a, H₂
inductive to_type {B : Type} : B → Type
| mk : Π (b : B), to_type b
definition tst1 : to_type (λ H : a = a, H₂) := to_type.mk (@eq.rec A a P H₂ a)
check to_type.mk(λ H : a = a, H₂)
check to_type.mk(@eq.rec A a P H₂ a)
check to_type.mk(λ H : a = a, H₂) = to_type.mk(@eq.rec A a P H₂ a)
-- check to_type.mk(eq.rec H₂ H₁) = to_type.mk(H₂)
-- check to_type.mk(eq.rec H₂ (f a)) = to_type.mk(H₂)