2015-04-28 20:43:05 +00:00
|
|
|
import data.nat
|
2015-10-14 19:27:09 +00:00
|
|
|
open algebra
|
2015-04-28 20:43:05 +00:00
|
|
|
|
|
|
|
example (a b c : Prop) : a → b → c → a ∧ b ∧ c :=
|
|
|
|
begin
|
|
|
|
intro Ha, intro Hb, intro Hc,
|
|
|
|
apply and.intro Ha,
|
|
|
|
apply and.intro Hb Hc
|
|
|
|
end
|
|
|
|
|
|
|
|
example (a b c : Prop) : a → b → c → a ∧ b ∧ c :=
|
|
|
|
by intro Ha; intro Hb; intro Hc; apply and.intro Ha; apply and.intro Hb Hc
|
|
|
|
|
|
|
|
open nat
|
|
|
|
|
|
|
|
example (a b c : nat) : a = b → b = 0 + c → a = c + 0:=
|
|
|
|
begin
|
|
|
|
intro ab, intro bc,
|
|
|
|
change a = c,
|
|
|
|
rewrite zero_add at bc,
|
|
|
|
rewrite -bc,
|
|
|
|
exact ab
|
|
|
|
end
|