test(tests/lean/run): add match-with nested in tactic test
This commit is contained in:
parent
4fdac068b0
commit
14ca2d407d
1 changed files with 33 additions and 0 deletions
33
tests/lean/run/match_tac4.lean
Normal file
33
tests/lean/run/match_tac4.lean
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
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
|
Loading…
Reference in a new issue