Semifield structure on the type of nonnegative elements #
This file defines instances and prove some properties about the nonnegative elements
{x : α // 0 ≤ x}
of an arbitrary type α
.
This is used to derive algebraic structures on ℝ≥0
and ℚ≥0
automatically.
Main declarations #
{x : α // 0 ≤ x}
is aCanonicallyLinearOrderedSemifield
ifα
is aLinearOrderedField
.
@[simp]
@[simp]
theorem
Nonneg.mk_div_mk
{α : Type u_1}
[LinearOrderedSemifield α]
{x y : α}
(hx : 0 ≤ x)
(hy : 0 ≤ y)
:
@[simp]
Equations
- Nonneg.instNNRatCast = { nnratCast := fun (q : ℚ≥0) => ⟨↑q, ⋯⟩ }
@[simp]
@[simp]
@[simp]
theorem
Nonneg.mk_nnqsmul
{α : Type u_1}
[LinearOrderedSemifield α]
(q : ℚ≥0)
(a : α)
(ha : 0 ≤ a)
: