2014-10-09 05:21:29 +00:00
|
|
|
import logic
|
|
|
|
|
2014-11-03 23:43:58 +00:00
|
|
|
set_option pp.universes true
|
|
|
|
set_option pp.implicit true
|
|
|
|
|
2014-10-09 14:13:06 +00:00
|
|
|
context
|
2014-10-09 05:21:29 +00:00
|
|
|
universe k
|
|
|
|
parameter A : Type
|
|
|
|
|
2014-10-09 14:13:06 +00:00
|
|
|
context
|
2014-10-09 05:21:29 +00:00
|
|
|
universe l
|
|
|
|
universe u
|
|
|
|
parameter B : Type
|
|
|
|
definition foo (a : A) (b : B) := b
|
|
|
|
|
|
|
|
inductive mypair :=
|
|
|
|
mk : A → B → mypair
|
2014-11-03 23:43:58 +00:00
|
|
|
|
|
|
|
definition pr1' (p : mypair) : A := mypair.rec (λ a b, a) p
|
|
|
|
definition pr2' (p : mypair) : B := mypair.rec (λ a b, b) p
|
|
|
|
check mypair.rec
|
|
|
|
|
2014-10-09 05:21:29 +00:00
|
|
|
end
|
2014-11-03 23:43:58 +00:00
|
|
|
check mypair.rec
|
2014-10-09 05:21:29 +00:00
|
|
|
variable a : A
|
|
|
|
check foo num a 0
|
|
|
|
definition pr1 (p : mypair num) : A := mypair.rec (λ a b, a) p
|
|
|
|
definition pr2 (p : mypair num) : num := mypair.rec (λ a b, b) p
|
|
|
|
end
|