2014-08-19 01:24:08 +00:00
|
|
|
import logic
|
|
|
|
|
|
|
|
variable nat : Type.{1}
|
|
|
|
variable int : Type.{1}
|
|
|
|
|
|
|
|
variable nat_add : nat → nat → nat
|
|
|
|
infixl `+`:65 := nat_add
|
|
|
|
|
|
|
|
variable int_add : int → int → int
|
|
|
|
infixl `+`:65 := int_add
|
|
|
|
|
|
|
|
variable of_nat : nat → int
|
|
|
|
coercion of_nat
|
|
|
|
|
|
|
|
variables a b : nat
|
|
|
|
variables i j : int
|
|
|
|
|
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 _
|