TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.DirectedSemantics.Power

Real binary-power semantics #

Rational and directed rounding share this low-level real binary-power API. The file deliberately does not import executable arithmetic, allowing native kernels to reuse the logarithm proofs without an import cycle through Model.Arithmetic.

@[reducible, inline]

Binary power as a real number.

Instances For

    Every real binary power is positive.

    Every real binary power is nonnegative.

    @[simp]

    The binary power at exponent zero is one.

    @[simp]

    The binary power at exponent one is two.

    @[simp]

    The binary power at exponent minus one is one half.

    theorem FloatLib.Floats.Formats.BinaryInterchange.Model.bpow_add (left right : ) :
    bpow (left + right) = bpow left * bpow right

    Binary powers turn addition of exponents into multiplication.

    theorem FloatLib.Floats.Formats.BinaryInterchange.Model.bpow_le_bpow_of_le {left right : } (h : left right) :
    bpow left bpow right

    Binary powers are monotone in the exponent.

    A binary power at a natural exponent is the corresponding natural power of two.

    theorem FloatLib.Floats.Formats.BinaryInterchange.Model.bpow_natCast (exponent : ) :
    bpow exponent = 2 ^ exponent

    A natural exponent coerced to an integer denotes the corresponding real power of two.

    A binary power at a negative successor is the inverse natural power of two.