2015-07-30 17:18:03 +00:00
|
|
|
import data.int
|
|
|
|
open nat int
|
|
|
|
|
|
|
|
variables a b : nat
|
|
|
|
variables i j : int
|
2015-08-18 19:39:14 +00:00
|
|
|
axiom mysorry : ∀ {A : Type}, A
|
2015-07-30 17:18:03 +00:00
|
|
|
definition foo := add a i
|
|
|
|
definition f₁ := a + i
|
|
|
|
|
|
|
|
example (n : nat) : n + n = 2 * n :=
|
|
|
|
begin
|
|
|
|
unfold [nat.add,mul],
|
2015-08-18 19:39:14 +00:00
|
|
|
apply mysorry
|
2015-07-30 17:18:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
example (n : nat) : n + n = n + n :=
|
|
|
|
rfl
|
2015-07-30 18:21:45 +00:00
|
|
|
|
|
|
|
example (a₁ a₂ a₃ : nat) : a₁ = 0 → a₂ = 0 → a₃ = 0 → a₁ + a₂ + a₃ = 0 :=
|
|
|
|
assume h₁ h₂ h₃, calc
|
|
|
|
a₁ + a₂ + a₃ = 0 + a₂ + a₃ : h₁
|
|
|
|
... = 0 + 0 + a₃ : h₂
|
|
|
|
... = 0 + 0 + 0 : h₃
|