2014-12-01 05:16:01 +00:00
|
|
|
prelude
|
2014-10-02 23:20:52 +00:00
|
|
|
constant int : Type.{1}
|
|
|
|
constant nat : Type.{1}
|
2014-09-04 21:21:03 +00:00
|
|
|
namespace int
|
2014-10-02 23:20:52 +00:00
|
|
|
constant plus : int → int → int
|
2014-09-04 21:21:03 +00:00
|
|
|
end int
|
|
|
|
|
|
|
|
namespace nat
|
2014-10-02 23:20:52 +00:00
|
|
|
constant plus : nat → nat → nat
|
2014-09-04 21:21:03 +00:00
|
|
|
end nat
|
|
|
|
|
|
|
|
open int nat
|
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constants a b : int
|
2014-09-04 21:21:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
check plus a b
|
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant f : int → int → int
|
|
|
|
constant g : nat → nat → int
|
2014-09-04 21:21:03 +00:00
|
|
|
notation A `+`:65 B:65 := f A (g B B)
|
2014-10-02 23:20:52 +00:00
|
|
|
constant n : nat
|
2014-09-04 21:21:03 +00:00
|
|
|
check a + n
|