lean2/tests/lean/run/nested_begin_end.lean
2015-02-24 11:59:27 -08:00

29 lines
543 B
Text

example (p q : Prop) : p ∧ q ↔ q ∧ p :=
begin
apply iff.intro,
begin
intro H,
apply and.intro,
apply (and.elim_right H),
apply (and.elim_left H)
end,
begin
intro H,
apply and.intro,
apply (and.elim_right H),
apply (and.elim_left H)
end
end
example (p q : Prop) : p ∧ q ↔ q ∧ p :=
begin
apply iff.intro,
{intro H,
apply and.intro,
apply (and.elim_right H),
apply (and.elim_left H)},
{intro H,
apply and.intro,
apply (and.elim_right H),
apply (and.elim_left H)}
end