Documentation

Actus.Util.Amount

class Actus.Amount (α : Type) extends Zero α, One α, Add α, Sub α, Mul α, Div α, Neg α, Min α, Max α, LE α :

Lawless numeric operations shared by the executable (Float) and the specification () amount types. Definitions of the lending engine take [Amount α]; instantiate at Float to run and at to prove.

  • zero : α
  • one : α
  • add : ααα
  • sub : ααα
  • mul : ααα
  • div : ααα
  • neg : αα
  • min : ααα
  • max : ααα
  • le : ααProp
  • abs : αα

    Absolute value (magnitude).

Instances
    @[implicit_reducible]

    Executable instance: native IEEE-754 Float.

    Equations
    • One or more equations did not get rendered due to their size.
    @[implicit_reducible]
    noncomputable instance Actus.instAmountReal :

    Specification instance: the real numbers. Noncomputable (so it never leaks into the executable engine), with abs the Mathlib absolute value, so that Amount.abs (x : ℝ) = |x| definitionally and the order lemmas apply.

    Equations
    • One or more equations did not get rendered due to their size.
    @[simp]
    theorem Actus.Amount.abs_real (x : ) :
    abs x = |x|