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 = do let __do_lift ← Qq.synthInstanceQ q(CharZero «$α») <|> Lean.throwError (Lean.toMessageData "not a characteristic zero ring") pure __do_lift
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
- One or more equations did not get rendered due to their size.
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
- One or more equations did not get rendered due to their size.
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.isRat_ratCast
{R : Type u_1}
[DivisionRing R]
[CharZero R]
{q : ℚ}
{n : ℤ}
{d : ℕ}
:
The norm_num
extension which identifies an expression RatCast.ratCast q
where norm_num
recognizes q
, returning the cast of q
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Mathlib.Meta.NormNum.isRat_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.evalInv.core
{u : Lean.Level}
{α : Q(Type u)}
(e a : Q(«$α»))
(ra : Result a)
(dα : Q(DivisionRing «$α»))
(i : Option Q(CharZero «$α»))
:
Main part of evalInv
.