Equations
- Time.instReprFixed = { reprPrec := Time.reprFixed✝ }
Equations
- Time.instBEqFixed = { beq := Time.beqFixed✝ }
Equations
Equations
- Time.instReprSign = { reprPrec := Time.reprSign✝ }
Equations
- Time.instDecidableEqSign x✝ y✝ = if h : x✝.toCtorIdx = y✝.toCtorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Time.Fixed.instReprDenominator = { reprPrec := Time.Fixed.reprDenominator✝ }
Equations
instance
Time.Fixed.instDecidableEqDenominator
{precision✝ : Nat}
:
DecidableEq (Denominator precision✝)
Equations
- Time.Fixed.instReprParts = { reprPrec := Time.Fixed.reprParts✝ }
Equations
- Time.Fixed.instBEqParts = { beq := Time.Fixed.beqParts✝ }
Equations
- Time.Fixed.Denominator.zero = { val := 0, lt := ⋯ }
Instances For
Equations
- Time.instInhabitedFixed = { default := Time.Fixed.zero }
Equations
- Time.instLTFixed = { lt := fun (a b : Time.Fixed p) => a.val < b.val }
Equations
- Time.instLEFixed = { le := fun (a b : Time.Fixed p) => a.val ≤ b.val }
Equations
- Time.instInhabitedDenominator = { default := Time.Fixed.Denominator.zero }
Equations
- Time.instLTDenominator = { lt := fun (a b : Time.Fixed.Denominator p) => a.val < b.val }
Equations
- Time.instLEDenominator = { le := fun (a b : Time.Fixed.Denominator p) => a.val ≤ b.val }
Equations
- f.toParts = { sign := if f.val < 0 then Time.Sign.Neg else Time.Sign.Nonneg, numerator := f.val.natAbs / 10 ^ p, denominator := f.val.natAbs % 10 ^ p, lt := ⋯ }
Instances For
Equations
- Time.Fixed.toFixed Time.Sign.Neg num denom = { val := Int.negOfNat (num * 10 ^ p + denom.val) }
- Time.Fixed.toFixed Time.Sign.Nonneg num denom = { val := ↑num * 10 ^ p + ↑denom.val }
Instances For
Equations
- parts.fromParts = Time.Fixed.toFixed parts.sign parts.numerator { val := parts.denominator, lt := ⋯ }
Instances For
Equations
- Time.Fixed.toSign n = if n < 0 then Time.Sign.Neg else Time.Sign.Nonneg
Instances For
Equations
- Time.Fixed.toDenominator n p h = { val := n, lt := h }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- f.denominatorToString = match f.toParts with | { sign := sign, numerator := numerator, denominator := d, lt := lt } => Time.Fixed.denominatorValueToString (↑d) p
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Time.Fixed.instSub = { sub := Time.Fixed.sub }
Equations
- Time.Fixed.instAdd = { add := Time.Fixed.add }
Equations
- Time.Fixed.Int.toFixed n p = { val := n }
Instances For
Equations
- Time.Fixed.instHDivInt = { hDiv := Time.Fixed.div }
Equations
- Time.Fixed.mul a f = { val := a * f.val }
Instances For
Equations
- Time.Fixed.instHMulInt = { hMul := Time.Fixed.mul }
Equations
- Time.Fixed.instMod = { mod := Time.Fixed.mod }
theorem
Time.Fixed.toFixed_lt_toFixed
(p n : Nat)
(n_denom : Denominator p)
(m : Nat)
(m_denom : Denominator p)
(hnm : n < m)
:
toFixed Sign.Nonneg n n_denom < toFixed Sign.Nonneg m m_denom
theorem
Time.Fixed.zero_lt_toFixed
(p m : Nat)
(m_denom : Denominator p)
(h : 0 < m)
:
zero < toFixed Sign.Nonneg m m_denom
theorem
Time.Fixed.toFixed_le_toFixed_of_lt
(p n : Nat)
(n_denom : Denominator p)
(m : Nat)
(m_denom : Denominator p)
(hnm : n < m)
:
toFixed Sign.Nonneg n n_denom ≤ toFixed Sign.Nonneg m m_denom
theorem
Time.Fixed.zero_le_toFixed
(p m : Nat)
(m_denom : Denominator p)
(hnm : 0 < m)
:
zero ≤ toFixed Sign.Nonneg m m_denom