lean2/tests/lean/run/tactic11.lean
Leonardo de Moura c50227ea6e feat(library/tactic): change apply tactic semantics: goals are not reversed; and dependent arguments are not included
This commit also adds the tactic rapply that corresponds to the previous
semantics we have been using.
2014-10-22 18:11:09 -07:00

18 lines
525 B
Text

import logic
open tactic
theorem tst (a b : Prop) (H : a ↔ b) : b ↔ a
:= have H1 [visible] : a → b, -- We need to mark H1 as fact, otherwise it is not visible by tactics
from iff.elim_left H,
by rapply iff.intro;
apply (assume Ha, H1 Ha);
apply (assume Hb, iff.elim_right H Hb)
theorem tst2 (a b : Prop) (H : a ↔ b) : b ↔ a
:= have H1 [visible] : a → b,
from iff.elim_left H,
begin
rapply iff.intro,
apply (assume Ha, H1 Ha),
apply (assume Hb, iff.elim_right H Hb)
end