Rational numbers for implementing decision procedures. We should not confuse them with the Batteries rational numbers, also used by Mathlib.
Instances For
- Std.Internal.Rat.instAdd
- Std.Internal.Rat.instCoeInt
- Std.Internal.Rat.instDiv
- Std.Internal.Rat.instLE
- Std.Internal.Rat.instLT
- Std.Internal.Rat.instMul
- Std.Internal.Rat.instNeg
- Std.Internal.Rat.instOfNat
- Std.Internal.Rat.instSub
- Std.Internal.instBEqRat
- Std.Internal.instInhabitedRat
- Std.Internal.instReprRat
- Std.Internal.instToStringRat
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.
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.
Equations
- One or more equations did not get rendered due to their size.
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 } }
Equations
- Std.Internal.Rat.instCoeInt = { coe := fun (num : Int) => { num := num } }