TorchLean API

FloatLib.Floats.Formats.Posit.Configured.Projective

Optional projective views of configured posits #

These adapters intentionally map NaR to the added point of mathlib's one-point completion and projective line. They are proof-side views, not executable posit semantics, and are kept outside the basic configured API to avoid imposing topology and projective-geometry dependencies on ordinary programs.

@[inline]

Explicit one-point view of a configured posit.

This view maps NaR to OnePoint.infty, reinterpreting its meaning as the added projective point. The primary denotation returned by decode keeps NaR as ExceptionalValue.notAReal.

Instances For
    @[inline]

    Canonical mathlib rational projective-line view of a configured posit.

    Instances For
      @[inline]

      Explicit real one-point view, obtained by embedding exact rational finite values.

      Instances For
        @[inline]

        Canonical mathlib real projective-line view of a configured posit.

        Instances For
          @[simp]

          A configured posit maps to the rational point at infinity exactly when it is NaR.

          @[simp]
          theorem FloatLib.Floats.ExecFloat.Posit.toProjectiveRat_eq_coe_iff {format : Formats.Posit.Format} {plan : Formats.Posit.Configured.StoragePlan format} {code : Type} [codec : ModelCodec plan (Formats.Posit.Model format) code] (value : ExecFloat (Formats.Posit.Configured.Family format code plan)) (rational : ) :
          toProjectiveRat value = rational toRat? value = some rational

          Equality with a finite rational point is equivalent to the exact optional rational view.

          The rational projective-line view represents precisely the same finite rational values.

          @[simp]

          The distinguished rational projective point is attained exactly by posit NaR.

          @[simp]

          A configured posit maps to the real point at infinity exactly when it is NaR.

          @[simp]
          theorem FloatLib.Floats.ExecFloat.Posit.toProjectiveReal_eq_coe_iff {format : Formats.Posit.Format} {plan : Formats.Posit.Configured.StoragePlan format} {code : Type} [codec : ModelCodec plan (Formats.Posit.Model format) code] (value : ExecFloat (Formats.Posit.Configured.Family format code plan)) (rational : ) :
          toProjectiveReal value = rational toRat? value = some rational

          Equality with an embedded rational real point agrees with the exact rational view.

          The real projective-line view represents precisely the embedded finite rational values.

          @[simp]

          The distinguished real projective point is attained exactly by posit NaR.