test(frontends/lean): add example showing higher order matching is working, and is useful

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-10-24 20:18:48 -07:00
parent 02c22e509d
commit cb06d0a959
2 changed files with 17 additions and 0 deletions

7
tests/lean/ho.lean Normal file
View file

@ -0,0 +1,7 @@
Variable g {A : Type} (a : A) : A
Variable a : Int
Variable b : Int
Axiom H1 : a = b
Axiom H2 : (g a) > 0
Theorem T1 : (g b) > 0 := Subst _ H2 H1
Show Environment 2

View file

@ -0,0 +1,10 @@
Set: pp::colors
Set: pp::unicode
Assumed: g
Assumed: a
Assumed: b
Assumed: H1
Assumed: H2
Proved: T1
Axiom H2 : (g a) > 0
Theorem T1 : (g b) > 0 := Subst (λ x : , if Bool ((g x) ≤ 0) ⊥ ) H2 H1