2020-06-02 21:18:21 +03:00
|
|
|
import Language.Reflection
|
|
|
|
|
|
|
|
%language ElabReflection
|
|
|
|
|
2020-06-03 00:41:37 +03:00
|
|
|
solveReflected : TTImp -> Elab any
|
2020-06-02 21:18:21 +03:00
|
|
|
solveReflected `(Builtin.Equal {a=_} {b=_} ~(left) ~(right))
|
|
|
|
= do logTerm 0 "Left" left
|
|
|
|
logTerm 0 "Right" right
|
|
|
|
fail "Not done"
|
|
|
|
solveReflected g
|
|
|
|
= do logTerm 0 "Goal" g
|
|
|
|
fail "I don't know how to prove this"
|
|
|
|
|
|
|
|
%macro
|
2020-06-03 00:41:37 +03:00
|
|
|
prove : Elab any
|
2020-06-02 21:18:21 +03:00
|
|
|
prove
|
|
|
|
= do env <- localVars
|
|
|
|
Just g <- goal
|
|
|
|
| Nothing => fail "No goal to solve"
|
|
|
|
logMsg 0 (show env)
|
|
|
|
solveReflected g
|
|
|
|
|
|
|
|
commutes : (x, y : Nat) -> plus x y = plus y x
|
|
|
|
commutes x y = prove
|