This PR adds a simple implementation of MePo, from "Lightweight relevance filtering for machine-generated resolution problems" by Meng and Paulson. This needs tuning, but is already useful as a baseline or test case. --------- Co-authored-by: Thomas Zhu <thomas.zhu.sh@hotmail.com>
26 lines
678 B
Text
26 lines
678 B
Text
import Lean.PremiseSelection.MePo
|
|
|
|
set_premise_selector Lean.PremiseSelection.mepoSelector (useRarity := false)
|
|
|
|
example (a b : Int) : a + b = b + a := by
|
|
suggest_premises
|
|
sorry
|
|
|
|
-- #time
|
|
example (x y z : List Int) : x ++ y ++ z = x ++ (y ++ z) := by
|
|
suggest_premises
|
|
sorry
|
|
|
|
-- `useRarity` is too slow in practice: it requires analyzing all the types in the environment.
|
|
-- It would need to be cached.
|
|
|
|
-- set_premise_selector Lean.PremiseSelection.mepoSelector (useRarity := true)
|
|
|
|
-- example (a b : Int) : a + b = b + a := by
|
|
-- suggest_premises
|
|
-- sorry
|
|
|
|
-- #time
|
|
-- example (x y z : List Int) : x ++ y ++ z = x ++ (y ++ z) := by
|
|
-- suggest_premises
|
|
-- sorry
|