Precision Projection for Numeric QUDs #
A PrecisionProjection N rounds/approximates values of type N. Composing
it with a numeric projection yields a QUD that distinguishes meanings only
up to that precision — the formal device behind granularity-coarsened
questions ("about a hundred" vs. "exactly 103").
Precision projection for numeric meanings (approximate vs exact).
- round : N → N
Round/approximate the value
- name : String
Name
Instances For
Exact precision: no rounding
Equations
- PrecisionProjection.exact = { round := id, name := "exact" }
Instances For
Round to nearest multiple of k
Equations
- PrecisionProjection.roundTo k = { round := fun (n : ℕ) => n / k * k, name := toString "round" ++ toString k }
Instances For
@[reducible]
def
PrecisionProjection.applyToQUD
{M N : Type}
[BEq N]
[LawfulBEq N]
(prec : PrecisionProjection N)
(proj : M → N)
:
QUD M
Compose precision with a QUD. Delegates to QUD.ofProject.
Equations
- prec.applyToQUD proj = QUD.ofProject (prec.round ∘ proj) prec.name