def Mathlib.Meta.NormNum.inferCharZeroOfRing {u : Lean.Level} {α : Q(Type u)} (_i : Q(Ring «$α») := by with_reducible assumption) :
Lean.MetaM Q(CharZero «$α»)
Helper function to synthesize a typed CharZero α expression given Ring α.
Equations
- Mathlib.Meta.NormNum.inferCharZeroOfRing _i = (Qq.synthInstanceQ q(CharZero «$α») <|> Lean.throwError (Lean.toMessageData "not a characteristic zero ring"))
Instances For
def Mathlib.Meta.NormNum.inferCharZeroOfRing? {u : Lean.Level} {α : Q(Type u)} (_i : Q(Ring «$α») := by with_reducible assumption) :
Lean.MetaM (Option Q(CharZero «$α»))
Helper function to synthesize a typed CharZero α expression given Ring α, if it exists.
Equations
- Mathlib.Meta.NormNum.inferCharZeroOfRing? _i = do let __do_lift ← Qq.trySynthInstanceQ q(CharZero «$α») pure __do_lift.toOption
Instances For
def Mathlib.Meta.NormNum.inferCharZeroOfAddMonoidWithOne {u : Lean.Level} {α : Q(Type u)} (_i : Q(AddMonoidWithOne «$α») := by with_reducible assumption) :
Lean.MetaM Q(CharZero «$α»)
Helper function to synthesize a typed CharZero α expression given AddMonoidWithOne α.
Equations
- Mathlib.Meta.NormNum.inferCharZeroOfAddMonoidWithOne _i = (Qq.synthInstanceQ q(CharZero «$α») <|> Lean.throwError (Lean.toMessageData "not a characteristic zero AddMonoidWithOne"))
Instances For
def Mathlib.Meta.NormNum.inferCharZeroOfAddMonoidWithOne? {u : Lean.Level} {α : Q(Type u)} (_i : Q(AddMonoidWithOne «$α») := by with_reducible assumption) :
Lean.MetaM (Option Q(CharZero «$α»))
Helper function to synthesize a typed CharZero α expression given AddMonoidWithOne α, if it
exists.
Equations
- Mathlib.Meta.NormNum.inferCharZeroOfAddMonoidWithOne? _i = do let __do_lift ← Qq.trySynthInstanceQ q(CharZero «$α») pure __do_lift.toOption
Instances For
def Mathlib.Meta.NormNum.inferCharZeroOfDivisionRing {u : Lean.Level} {α : Q(Type u)} (_i : Q(DivisionRing «$α») := by with_reducible assumption) :
Lean.MetaM Q(CharZero «$α»)
Helper function to synthesize a typed CharZero α expression given DivisionRing α.
Equations
- Mathlib.Meta.NormNum.inferCharZeroOfDivisionRing _i = (Qq.synthInstanceQ q(CharZero «$α») <|> Lean.throwError (Lean.toMessageData "not a characteristic zero division ring"))
Instances For
def Mathlib.Meta.NormNum.inferCharZeroOfDivisionSemiring? {u : Lean.Level} {α : Q(Type u)} (_i : Q(DivisionSemiring «$α») := by with_reducible assumption) :
Lean.MetaM (Option Q(CharZero «$α»))
Helper function to synthesize a typed CharZero α expression given Divisionsemiring α, if it
exists.
Equations
- Mathlib.Meta.NormNum.inferCharZeroOfDivisionSemiring? _i = do let __do_lift ← Qq.trySynthInstanceQ q(CharZero «$α») pure __do_lift.toOption
Instances For
def Mathlib.Meta.NormNum.inferCharZeroOfDivisionRing? {u : Lean.Level} {α : Q(Type u)} (_i : Q(DivisionRing «$α») := by with_reducible assumption) :
Lean.MetaM (Option Q(CharZero «$α»))
Helper function to synthesize a typed CharZero α expression given DivisionRing α, if it
exists.
Equations
- Mathlib.Meta.NormNum.inferCharZeroOfDivisionRing? _i = do let __do_lift ← Qq.trySynthInstanceQ q(CharZero «$α») pure __do_lift.toOption
Instances For
theorem Mathlib.Meta.NormNum.isNat_nnratCast {R : Type u_1} [DivisionSemiring R] {q : ℚ≥0} {n : ℕ} :
theorem Mathlib.Meta.NormNum.isNNRat_ratCast {R : Type u_1} [DivisionRing R] [CharZero R] {q : ℚ} {n d : ℕ} :
theorem Mathlib.Meta.NormNum.isNNRat_nnratCast {R : Type u_1} [DivisionSemiring R] [CharZero R] {q : ℚ≥0} {n d : ℕ} :
theorem Mathlib.Meta.NormNum.isRat_ratCast {R : Type u_1} [DivisionRing R] [CharZero R] {q : ℚ} {n : ℤ} {d : ℕ} :
theorem Mathlib.Meta.NormNum.isInt_inv_neg_one {α : Type u_1} [DivisionRing α] {a : α} :
IsInt a (Int.negOfNat 1) → IsInt a⁻¹ (Int.negOfNat 1)
theorem Mathlib.Meta.NormNum.isRat_inv_neg {α : Type u_1} [DivisionRing α] [CharZero α] {a : α} {n d : ℕ} :
IsRat a (Int.negOfNat n.succ) d → IsRat a⁻¹ (Int.negOfNat d) n.succ
def Mathlib.Meta.NormNum.Result.inv {u : Lean.Level} {α : Q(Type u)} {a : Q(«$α»)} (ra : Result a) (dsα : Q(DivisionSemiring «$α»)) (czα? : Option Q(CharZero «$α»)) :
Lean.MetaM (Result q(«$a»⁻¹))
The result of inverting a norm_num result.
Equations
- One or more equations did not get rendered due to their size.