lean2/tests/lean/run/match_tac4.lean
Leonardo de Moura 754276a660 feat(frontends/lean): round parenthesis for [tactic1 | tactic2]
This commit also replaces the notation for divides
     `(` a `|` b `)`
with
      a `∣` b

The character `∣` is entered by typing \|

closes #516
2015-04-06 09:24:09 -07:00

33 lines
736 B
Text

notation `⟪`:max t:(foldr `,` (e r, and.intro e r)) `⟫`:0 := t
check ⟪ trivial, trivial, trivial ⟫
theorem tst (a b c d : Prop) : a ∧ b ∧ c ∧ d ↔ d ∧ c ∧ b ∧ a :=
begin
apply iff.intro,
begin
intro H,
match H with
| ⟪ H₁, H₂, H₃, H₄ ⟫ := ⟪ H₄, H₃, H₂, H₁ ⟫
end
end,
begin
intro H,
match H with
| ⟪ H₁, H₂, H₃, H₄ ⟫ :=
begin
repeat (apply and.intro | assumption)
end
end
end
end
print definition tst
theorem tst2 (a b c d : Prop) : a ∧ b ∧ c ∧ d ↔ d ∧ c ∧ b ∧ a :=
begin
apply iff.intro,
repeat (intro H; repeat (cases H with [H', H] | apply and.intro | assumption))
end
print definition tst2