A very simple parameter minimizer.
@[instance_reducible]
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
We use throw () to interrupt the search.
def Lean.Util.ParamMinimizer.search {m : Type → Type} [Monad m] (initialMask : Array Bool) (test : Array Bool → m Bool) (maxCalls : Nat := 0) :
m Result
Runs the parameter minimization procedure.
Given an initial bitmask initialMask representing the active parameters,
and a monotonic predicate test : Array Bool → m Bool, this function searches
for the smallest (1-minimal) superset of initialMask that satisfies test.
Execution proceeds in two phases:
init– gradually activates parameters untiltestfirst succeeds;prune– removes superfluous active parameters while preserving success.
If the search completes without exceeding maxCalls, the result is marked as
.precise. If the budget is exceeded but a valid configuration was found,
the result is .approx. If no configuration satisfies test, the result is
.missing.
maxCalls = 0 disables the call budget limit.
Equations
- One or more equations did not get rendered due to their size.