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).
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.Order.Rat01 = ↑(Set.Icc 0 1)
Instances For
Equations
- Core.Order.Rat01.instRepr = { reprPrec := fun (r : Core.Order.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
Equations
The complement 1 - r, again in [0, 1].
Models the relationship between a gradient property and its dual on the same scale — e.g. not-at-issueness as the complement of at-issueness.
Equations
- r.compl = ⟨1 - ↑r, ⋯⟩
Instances For
The complement is order-reversing: a larger value has a smaller complement.