Equality for cache keys with a work budget. .undef means the comparison exhausted its budget.
The comparison may break referential transparency by depending on pointer sharing, so it runs
in BaseIO. A definite result must agree with the key's intended equality.
Instances
A persistent cache storing one candidate per full hash. Insertion replaces both the key and value for that hash. Lookup verifies the candidate with budgeted equality and evicts it on exhaustion. Hash retrieval must take constant time; structural key equality is never used by the backing map.
- map : Lean.PersistentHashMap α β
Instances For
Equations
Equations
- Lean.BudgetedCache.instEmptyCollection = { emptyCollection := default }
Instances For
Finds a cached value with the given comparison budget, as interpreted by BudgetedBEq.
On exhaustion, calls onEvict with the cache after erasing the candidate. The caller
must retain this update. Hits, absent hashes, and definite inequality do not call onEvict.
Equations
- One or more equations did not get rendered due to their size.