English
There is an estimator for the HAdd of two thunk Nat estimators, using Nat addition in the bound and a synchronized improve.
Русский
Существует оцениватель HAdd двух thunk-оценивателей Nat, используя сложение Nat в границе и согласованное улучшение.
LaTeX
$$instEstimatorNatHAddThunkProd a b εa εb : Estimator (a + b) (εa × εb) with bound e := bound a e.1 + bound b e.2 and improve as in the general HAdd case$$
Lean4
/-- Pop a `β` off the `MLList m β` with lowest priority,
also returning the index in `α` and the value of the current best lower bound for its priority.
-/
def popWithPriority (q : BestFirstQueue prio ε m β maxSize) :
m (Option (((α × ω) × β) × BestFirstQueue prio ε m β maxSize)) := do
match ← q.popWithBound with
| none =>
pure none
| some (⟨a, e, b⟩, q') =>
pure (some (((a, bound (prio a) e), b), q'))