Casts for Rational Numbers #
Summary #
We define the canonical injection from ℚ into an arbitrary division ring and prove various casting lemmas showing the well-behavedness of this injection.
Tags #
rat, rationals, field, ℚ, numerator, denominator, num, denom, cast, coercion, casting
Alias of Rat.cast_intCast
.
Alias of Rat.cast_natCast
.
If monoid with zero homs f
and g
from ℚ≥0
agree on the naturals then they are equal.
If monoid with zero homs f
and g
from ℚ≥0
agree on the naturals then they are equal.
See note [partially-applied ext lemmas] for why comp
is used here.
If monoid with zero homs f
and g
from ℚ≥0
agree on the positive naturals then they are
equal.
If monoid with zero homs f
and g
from ℚ
agree on the integers then they are equal.
If monoid with zero homs f
and g
from ℚ
agree on the integers then they are equal.
See note [partially-applied ext lemmas] for why comp
is used here.
If monoid with zero homs f
and g
from ℚ
agree on the positive naturals and -1
then
they are equal.
Any two ring homomorphisms from ℚ
to a semiring are equal. If the codomain is a division ring,
then this lemma follows from eq_ratCast
.
Scalar multiplication #
Equations
- NNRat.instDistribSMul = DistribSMul.mk ⋯
Equations
- Rat.instDistribSMul = DistribSMul.mk ⋯