Documentation

Linglib.Core.Scales.Rat01

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
Instances For
    @[reducible, inline]
    abbrev Core.Scale.Rat01.value (r : Rat01) :

    The rational value.

    Equations
    Instances For
      theorem Core.Scale.Rat01.nonneg (r : Rat01) :
      0 r

      Proof that the value is non-negative.

      theorem Core.Scale.Rat01.le_one (r : Rat01) :
      r 1

      Proof that the value is at most 1.

      @[implicit_reducible]
      Equations

      The endpoint 1.

      Equations
      Instances For

        The midpoint ½, the standard default threshold.

        Equations
        Instances For

          Does the value strictly exceed a threshold?

          Equations
          Instances For
            @[implicit_reducible]
            instance Core.Scale.Rat01.instDecidableExceeds (d θ : Rat01) :
            Decidable (d.exceeds θ)
            Equations