2014-08-19 01:24:08 +00:00
|
|
|
import logic
|
2014-11-23 01:34:05 +00:00
|
|
|
namespace experiment
|
2014-10-02 23:20:52 +00:00
|
|
|
constant nat : Type.{1}
|
|
|
|
constant int : Type.{1}
|
2014-08-19 01:24:08 +00:00
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant nat_add : nat → nat → nat
|
2014-10-21 22:27:45 +00:00
|
|
|
infixl `+` := nat_add
|
2014-08-19 01:24:08 +00:00
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant int_add : int → int → int
|
2014-10-21 22:27:45 +00:00
|
|
|
infixl `+` := int_add
|
2014-08-19 01:24:08 +00:00
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant of_nat : nat → int
|
2015-01-25 04:23:21 +00:00
|
|
|
attribute of_nat [coercion]
|
2014-08-19 01:24:08 +00:00
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constants a b : nat
|
|
|
|
constants i j : int
|
2014-08-19 01:24:08 +00:00
|
|
|
|
2014-09-17 21:39:05 +00:00
|
|
|
definition c1 := a + b
|
2014-08-19 01:24:08 +00:00
|
|
|
|
|
|
|
theorem T1 : c1 = nat_add a b :=
|
2014-09-04 23:36:06 +00:00
|
|
|
eq.refl _
|
2014-08-19 01:24:08 +00:00
|
|
|
|
2014-09-17 21:39:05 +00:00
|
|
|
definition c2 := i + j
|
2014-08-19 01:24:08 +00:00
|
|
|
|
|
|
|
theorem T2 : c2 = int_add i j :=
|
2014-09-04 23:36:06 +00:00
|
|
|
eq.refl _
|
2014-11-23 01:34:05 +00:00
|
|
|
exit
|