Additional instances for ring
over PNat
#
This adds some instances which enable ring
to work on PNat
even though it is not a commutative
semiring, by lifting to Nat
.
Equations
- Mathlib.Tactic.Ring.instCSLiftPNatNat = { lift := PNat.val, inj := PNat.coe_injective }
instance
Mathlib.Tactic.Ring.instCSLiftValPNatNatOfNatHAdd
{n : ℕ}
:
CSLiftVal (OfNat.ofNat (n + 1)) (n + 1)
instance
Mathlib.Tactic.Ring.instCSLiftValPNatNatToPNat
{n : ℕ}
{h : 0 < n}
:
CSLiftVal (n.toPNat h) n