2014-12-01 05:16:01 +00:00
|
|
|
prelude definition Prop : Type.{1} := Type.{0}
|
2014-10-02 23:20:52 +00:00
|
|
|
constant N : Type.{1}
|
2014-06-13 22:13:32 +00:00
|
|
|
check N
|
2014-10-02 23:20:52 +00:00
|
|
|
constant a : N
|
2014-06-13 22:13:32 +00:00
|
|
|
check a
|
2014-07-22 16:43:18 +00:00
|
|
|
check Prop → Prop
|
2014-10-02 23:20:52 +00:00
|
|
|
constant F.{l} : Type.{l} → Type.{l}
|
2014-06-13 22:13:32 +00:00
|
|
|
check F.{2}
|
|
|
|
universe u
|
|
|
|
check F.{u}
|
2014-10-02 23:20:52 +00:00
|
|
|
constant vec.{l} (A : Type.{l}) (n : N) : Type.{l}
|
|
|
|
constant f (a b : N) : N
|
|
|
|
constant len.{l} (A : Type.{l}) (n : N) (v : vec.{l} A n) : N
|
2014-06-13 22:13:32 +00:00
|
|
|
check f
|
|
|
|
check len.{1}
|
2014-10-09 14:13:06 +00:00
|
|
|
context
|
2014-10-02 23:20:52 +00:00
|
|
|
parameter A : Type
|
|
|
|
parameter B : Prop
|
2014-06-13 22:13:32 +00:00
|
|
|
hypothesis H : B
|
2014-06-23 00:51:00 +00:00
|
|
|
parameter {C : Type}
|
2014-06-13 22:13:32 +00:00
|
|
|
check B -> B
|
|
|
|
check A → A
|
|
|
|
check C
|
|
|
|
end
|
|
|
|
check A -- Error: A is part of the section
|
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant R : Type → Type
|
2014-06-13 22:13:32 +00:00
|
|
|
check R.{1 0}
|
|
|
|
|
|
|
|
check fun x y : N, x
|
|
|
|
|
|
|
|
namespace tst
|
2014-10-02 23:20:52 +00:00
|
|
|
constant N : Type.{2}
|
|
|
|
constant M : Type.{2}
|
2014-06-13 22:13:32 +00:00
|
|
|
print raw N -- Two possible interpretations N and tst.N
|
|
|
|
print raw tst.N -- Only one interpretation
|
2014-08-07 23:59:08 +00:00
|
|
|
end tst
|
2014-06-13 22:13:32 +00:00
|
|
|
print raw N -- Only one interpretation
|
|
|
|
namespace foo
|
2014-10-02 23:20:52 +00:00
|
|
|
constant M : Type.{3}
|
2014-06-13 22:13:32 +00:00
|
|
|
print raw M -- Only one interpretation
|
2014-08-07 23:59:08 +00:00
|
|
|
end foo
|
2014-06-13 22:13:32 +00:00
|
|
|
check tst.M
|
|
|
|
check foo.M
|
|
|
|
namespace foo
|
|
|
|
check M
|
2014-08-07 23:59:08 +00:00
|
|
|
end foo
|
2014-06-13 22:13:32 +00:00
|
|
|
check M -- Error
|
|
|
|
|
|
|
|
print "ok"
|
|
|
|
(*
|
|
|
|
local env = get_env()
|
|
|
|
print("Declarations:")
|
|
|
|
env:for_each_decl(function(d) print(d:name()) end)
|
|
|
|
print("-------------")
|
|
|
|
*)
|
|
|
|
|
|
|
|
universe l_1
|
2014-10-02 23:20:52 +00:00
|
|
|
constant T1 : Type -- T1 parameter is going to be called l_2
|