def
Mathlib.Meta.NormNum.inferCharZeroOfRing
{u : Lean.Level}
{α : Q(Type u)}
(_i : autoParam Q(Ring «$α») _auto✝)
:
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 : autoParam Q(Ring «$α») _auto✝)
:
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 : autoParam Q(AddMonoidWithOne «$α») _auto✝)
:
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 : autoParam Q(AddMonoidWithOne «$α») _auto✝)
:
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 : autoParam Q(DivisionRing «$α») _auto✝)
:
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 : autoParam Q(DivisionRing «$α») _auto✝)
:
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_mkRat
{a : ℤ}
{na : ℤ}
{n : ℤ}
{b : ℕ}
{nb : ℕ}
{d : ℕ}
:
Mathlib.Meta.NormNum.IsInt a na →
Mathlib.Meta.NormNum.IsNat b nb →
Mathlib.Meta.NormNum.IsRat (↑na / ↑nb) n d → Mathlib.Meta.NormNum.IsRat (mkRat a b) n d
theorem
Mathlib.Meta.NormNum.isNat_ratCast
{R : Type u_1}
[DivisionRing R]
{q : ℚ}
{n : ℕ}
:
Mathlib.Meta.NormNum.IsNat q n → Mathlib.Meta.NormNum.IsNat (↑q) n
theorem
Mathlib.Meta.NormNum.isInt_ratCast
{R : Type u_1}
[DivisionRing R]
{q : ℚ}
{n : ℤ}
:
Mathlib.Meta.NormNum.IsInt q n → Mathlib.Meta.NormNum.IsInt (↑q) n
theorem
Mathlib.Meta.NormNum.isRat_ratCast
{R : Type u_1}
[DivisionRing R]
[CharZero R]
{q : ℚ}
{n : ℤ}
{d : ℕ}
:
Mathlib.Meta.NormNum.IsRat q n d → Mathlib.Meta.NormNum.IsRat (↑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_pos
{α : Type u_1}
[DivisionRing α]
[CharZero α]
{a : α}
{n : ℕ}
{d : ℕ}
:
Mathlib.Meta.NormNum.IsRat a (Int.ofNat n.succ) d → Mathlib.Meta.NormNum.IsRat a⁻¹ (Int.ofNat d) n.succ
theorem
Mathlib.Meta.NormNum.isRat_inv_neg
{α : Type u_1}
[DivisionRing α]
[CharZero α]
{a : α}
{n : ℕ}
{d : ℕ}
:
Mathlib.Meta.NormNum.IsRat a (Int.negOfNat n.succ) d → Mathlib.Meta.NormNum.IsRat a⁻¹ (Int.negOfNat d) n.succ
def
Mathlib.Meta.NormNum.evalInv.core
{u : Lean.Level}
{α : Q(Type u)}
(e : Q(«$α»))
(a : Q(«$α»))
(ra : Mathlib.Meta.NormNum.Result a)
(dα : Q(DivisionRing «$α»))
(i : Option Q(CharZero «$α»))
:
Main part of evalInv
.