2014-10-20 22:26:16 +00:00
|
|
|
import logic tools.tactic
|
|
|
|
open tactic
|
|
|
|
|
|
|
|
theorem tst1 (a b : Prop) : a → b → b :=
|
2014-10-22 23:15:00 +00:00
|
|
|
by intro Ha; intro Hb; apply Hb
|
2014-10-20 22:26:16 +00:00
|
|
|
|
|
|
|
theorem tst2 (a b : Prop) : a → b → a ∧ b :=
|
2014-10-22 23:15:00 +00:00
|
|
|
by intro Ha; intro Hb; apply and.intro; apply Hb; apply Ha
|
2014-10-20 22:26:16 +00:00
|
|
|
|
|
|
|
theorem tst3 (a b : Prop) : a → b → a ∧ b :=
|
|
|
|
begin
|
2014-10-22 23:15:00 +00:00
|
|
|
intro Ha,
|
|
|
|
intro Hb,
|
2014-10-20 22:26:16 +00:00
|
|
|
apply and.intro,
|
|
|
|
apply Hb,
|
|
|
|
apply Ha
|
|
|
|
end
|
|
|
|
|
|
|
|
theorem tst4 (a b : Prop) : a → b → a ∧ b :=
|
|
|
|
begin
|
2014-10-22 23:15:00 +00:00
|
|
|
intros (Ha, Hb),
|
2014-10-20 22:26:16 +00:00
|
|
|
apply and.intro,
|
|
|
|
apply Hb,
|
|
|
|
apply Ha
|
|
|
|
end
|
|
|
|
|
|
|
|
theorem tst5 (a b : Prop) : a → b → a ∧ b :=
|
|
|
|
begin
|
|
|
|
intros,
|
|
|
|
apply and.intro,
|
|
|
|
eassumption,
|
|
|
|
eassumption
|
|
|
|
end
|