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