Cache for the lifting/unlifting transformations #
Transforming an equality repeatedly synthesizes the same instances (MeasurableSpace X,
IsSFiniteKernel κ, ...) and rebuilds the same terms (measurable equivalences, types of
kernels, ...). This file provides a cache, reset at the beginning of each transformation, that
memoizes these computations.
Main declarations #
synthInstanceCached:synthInstancewith memoization.inferTypeCached:inferTypewith memoization.memoized: memoization of an arbitrary computation returning expressions, keyed by a tag and an expression.resetTransformCache: empties the cache.
The cache of the lifting/unlifting transformations.
- insts : Std.HashMap Lean.Expr Lean.Expr
Synthesized instances, keyed by the class application.
- types : Std.HashMap Lean.Expr Lean.Expr
Inferred types, keyed by the expression.
Memoized computations, keyed by a tag and an expression.
Instances For
@[instance_reducible]
Equations
Empties the cache. To be called at the beginning of each transformation.
Equations
Instances For
synthInstance with memoization.
Equations
- One or more equations did not get rendered due to their size.
Instances For
inferType with memoization.
Equations
- One or more equations did not get rendered due to their size.