Documentation

Lean.Util.ParamMinimizer

A very simple parameter minimizer.

Status of the parameter minimizer procedure.

  • missing : Status

    Has not found a solution.

  • approx : Status

    Found a non minimal solution.

  • precise : Status

    Found a precise solution.

Instances For

    Result type for the parameter minimizer.

    Instances For

      We use throw () to interrupt the search.

      def Lean.Util.ParamMinimizer.search {m : TypeType} [Monad m] (initialMask : Array Bool) (test : Array Boolm Bool) (maxCalls : Nat := 0) :

      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:

      1. init – gradually activates parameters until test first succeeds;
      2. 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
        Instances For