2014-11-26 22:23:42 +00:00
|
|
|
import logic
|
|
|
|
|
|
|
|
theorem tst {a b c : Prop} : a → b → c → a ∧ b :=
|
|
|
|
begin
|
2015-03-28 00:26:06 +00:00
|
|
|
intros [Ha, Hb, Hc],
|
2014-11-26 22:23:42 +00:00
|
|
|
revert Ha,
|
|
|
|
intro Ha2,
|
|
|
|
apply (and.intro Ha2 Hb),
|
|
|
|
end
|
|
|
|
|
|
|
|
theorem foo1 {A : Type} (a b c : A) (P : A → Prop) : P a → a = b → P b :=
|
|
|
|
begin
|
2015-03-28 00:26:06 +00:00
|
|
|
intros [Hp, Heq],
|
2014-11-26 22:23:42 +00:00
|
|
|
revert Hp,
|
2015-05-01 22:07:28 +00:00
|
|
|
eapply (eq.rec_on Heq),
|
2014-11-26 22:23:42 +00:00
|
|
|
intro Hpa,
|
|
|
|
apply Hpa
|
|
|
|
end
|
|
|
|
|
|
|
|
theorem foo2 {A : Type} (a b c : A) (P : A → Prop) : P a → a = b → P b :=
|
|
|
|
begin
|
2015-03-28 00:26:06 +00:00
|
|
|
intros [Hp, Heq],
|
2014-11-26 22:23:42 +00:00
|
|
|
apply (eq.rec_on Heq Hp)
|
|
|
|
end
|
|
|
|
|
2015-05-09 01:41:33 +00:00
|
|
|
wait foo1 foo2
|
|
|
|
|
2014-11-26 22:23:42 +00:00
|
|
|
print definition foo1
|
|
|
|
print definition foo2
|