Core/Scales/Rat01.lean — rational unit interval #
A rational number in [0, 1] for gradient linguistic properties (at-issueness, projectivity) and their contextual thresholds.
This file is part of the Phase A decomposition of the legacy
Core/Scales/Scale.lean dumping ground (master plan v4).
@[reducible, inline]
A rational number in the unit interval [0, 1].
Wraps Mathlib's Set.Icc subtype for gradient linguistic properties
(at-issueness, projectivity, etc.) and their contextual thresholds.
Using Set.Icc gives us standard interval infrastructure from Mathlib
(order, membership, etc.) without custom boilerplate.
Access: r.val for the rational value, r.prop.1 for 0 ≤ r,
r.prop.2 for r ≤ 1.
Equations
- Core.Scale.Rat01 = ↑(Set.Icc 0 1)
Instances For
@[implicit_reducible]
Equations
- Core.Scale.Rat01.instRepr = { reprPrec := fun (r : Core.Scale.Rat01) (x : ℕ) => repr ↑r }
The endpoint 0.
Equations
Instances For
The endpoint 1.
Equations
Instances For
The midpoint ½, the standard default threshold.
Equations
Instances For
@[implicit_reducible]