2014-11-30 21:16:01 -08:00
|
|
|
import logic
|
2014-10-20 15:26:16 -07:00
|
|
|
open tactic
|
|
|
|
|
|
|
|
theorem tst1 (a b : Prop) : a → b → b :=
|
2014-10-22 16:15:00 -07:00
|
|
|
by intro Ha; intro Hb; apply Hb
|
2014-10-20 15:26:16 -07:00
|
|
|
|
|
|
|
theorem tst2 (a b : Prop) : a → b → a ∧ b :=
|
2014-10-22 18:11:09 -07:00
|
|
|
by intro Ha; intro Hb; rapply and.intro; apply Hb; apply Ha
|
2014-10-20 15:26:16 -07:00
|
|
|
|
|
|
|
theorem tst3 (a b : Prop) : a → b → a ∧ b :=
|
|
|
|
begin
|
2014-10-22 16:15:00 -07:00
|
|
|
intro Ha,
|
|
|
|
intro Hb,
|
2014-10-20 15:26:16 -07:00
|
|
|
apply and.intro,
|
2014-10-22 18:11:09 -07:00
|
|
|
apply Ha,
|
2014-10-20 15:26:16 -07:00
|
|
|
apply Hb,
|
|
|
|
end
|
|
|
|
|
|
|
|
theorem tst4 (a b : Prop) : a → b → a ∧ b :=
|
|
|
|
begin
|
2014-10-22 16:15:00 -07:00
|
|
|
intros (Ha, Hb),
|
2014-10-22 18:11:09 -07:00
|
|
|
rapply and.intro,
|
2014-10-20 15:26:16 -07:00
|
|
|
apply Hb,
|
|
|
|
apply Ha
|
|
|
|
end
|
|
|
|
|
|
|
|
theorem tst5 (a b : Prop) : a → b → a ∧ b :=
|
|
|
|
begin
|
|
|
|
intros,
|
|
|
|
apply and.intro,
|
|
|
|
eassumption,
|
|
|
|
eassumption
|
|
|
|
end
|