Rational numbers for implementing decision procedures. We should not confuse them with the Mathlib rational numbers.
Equations
- Std.Internal.instInhabitedRat = { default := { num := default, den := default } }
Equations
- Std.Internal.instBEqRat = { beq := Std.Internal.beqRat✝ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
@[inline]
Equations
Instances For
Equations
- Std.Internal.mkRat num den = if (den == 0) = true then { num := 0, den := 1 } else { num := num, den := den }.normalize
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
Instances For
Equations
- a.div b = a.mul b.inv
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Std.Internal.Rat.instLT = { lt := fun (a b : Std.Internal.Rat) => a.lt b = true }
Equations
- a.instDecidableLt b = inferInstanceAs (Decidable (a.lt b = true))
Equations
- Std.Internal.Rat.instLE = { le := fun (a b : Std.Internal.Rat) => ¬b < a }
Equations
- a.instDecidableLe b = inferInstanceAs (Decidable ¬b < a)
Equations
- Std.Internal.Rat.instAdd = { add := Std.Internal.Rat.add }
Equations
- Std.Internal.Rat.instSub = { sub := Std.Internal.Rat.sub }
Equations
- Std.Internal.Rat.instNeg = { neg := Std.Internal.Rat.neg }
Equations
- Std.Internal.Rat.instMul = { mul := Std.Internal.Rat.mul }
Equations
- Std.Internal.Rat.instDiv = { div := fun (a b : Std.Internal.Rat) => a * b.inv }
Equations
- Std.Internal.Rat.instOfNat = { ofNat := { num := ↑n, den := 1 } }
Equations
- Std.Internal.Rat.instCoeInt = { coe := fun (num : Int) => { num := num, den := 1 } }