test(tests/lean/run/match_expr2): match example with abstract structures
This commit is contained in:
parent
e52cffd04d
commit
5a38e15c2e
1 changed files with 13 additions and 0 deletions
13
tests/lean/run/match_expr2.lean
Normal file
13
tests/lean/run/match_expr2.lean
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import algebra.ordered_ring
|
||||
open tactic
|
||||
axiom Sorry : ∀ {A:Type}, A
|
||||
|
||||
example {A : Type} [ordered_ring A] (a b c : A) (h₀ : c > 0) (h₁ : a > 1) (h₂ : b > 0) : a + b + c = 0 :=
|
||||
by do
|
||||
[x, y] ← match_target_subexpr `(λ x y : A, x + y) | failed,
|
||||
trace "------ subterms -------",
|
||||
trace x, trace y,
|
||||
(h, [z]) ← match_hypothesis `(λ x : A, x > 1) | failed,
|
||||
trace "--- hypothesis of the form x > 1 ---",
|
||||
trace h, trace z,
|
||||
refine `(Sorry)
|
||||
Loading…
Add table
Reference in a new issue