Algebraic instances for unit intervals #
For suitably structured underlying type α
, we exhibit the structure of
the unit intervals (Set.Icc
, Set.Ioc
, Set.Ioc
, and Set.Ioo
) from 0
to 1
.
Note: Instances for the interval Ici 0
are dealt with in Algebra/Order/Nonneg.lean
.
Main definitions #
The strongest typeclass provided on each interval is:
TODO #
- algebraic instances for intervals -1 to 1
- algebraic instances for
Ici 1
- algebraic instances for
(Ioo (-1) 1)ᶜ
- provide
distribNeg
instances where applicable - prove versions of
mul_le_{left,right}
for other intervals - prove versions of the lemmas in
Topology/UnitInterval
withℝ
generalized to some arbitrary ordered semiring
Instances for ↥(Set.Icc 0 1)
#
Equations
- Set.Icc.zero = { zero := ⟨0, ⋯⟩ }
Equations
- Set.Icc.one = { one := ⟨1, ⋯⟩ }
@[simp]
@[simp]
@[simp]
theorem
Set.Icc.mk_zero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
(h : 0 ∈ Icc 0 1)
:
@[simp]
theorem
Set.Icc.mk_one
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
(h : 1 ∈ Icc 0 1)
:
@[simp]
theorem
Set.Icc.coe_eq_zero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
{x : ↑(Icc 0 1)}
:
theorem
Set.Icc.coe_ne_zero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
{x : ↑(Icc 0 1)}
:
@[simp]
theorem
Set.Icc.coe_eq_one
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
{x : ↑(Icc 0 1)}
:
theorem
Set.Icc.coe_ne_one
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
{x : ↑(Icc 0 1)}
:
theorem
Set.Icc.nonneg
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
{t : ↑(Icc 0 1)}
:
like coe_nonneg
, but with the inequality in Icc (0:R) 1
.
theorem
Set.Icc.le_one
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
{t : ↑(Icc 0 1)}
:
like coe_le_one
, but with the inequality in Icc (0:R) 1
.
Equations
- Set.Icc.mul = { mul := fun (p q : ↑(Set.Icc 0 1)) => ⟨↑p * ↑q, ⋯⟩ }
Equations
- Set.Icc.pow = { pow := fun (p : ↑(Set.Icc 0 1)) (n : ℕ) => ⟨↑p ^ n, ⋯⟩ }
@[simp]
theorem
Set.Icc.coe_mul
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
(x y : ↑(Icc 0 1))
:
@[simp]
theorem
Set.Icc.coe_pow
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
(x : ↑(Icc 0 1))
(n : ℕ)
:
theorem
Set.Icc.mul_le_left
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
{x y : ↑(Icc 0 1)}
:
theorem
Set.Icc.mul_le_right
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
{x y : ↑(Icc 0 1)}
:
instance
Set.Icc.monoidWithZero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
:
MonoidWithZero ↑(Icc 0 1)
Equations
- One or more equations did not get rendered due to their size.
instance
Set.Icc.commMonoidWithZero
{R : Type u_2}
[CommSemiring R]
[PartialOrder R]
[IsOrderedRing R]
:
CommMonoidWithZero ↑(Icc 0 1)
Equations
- Set.Icc.commMonoidWithZero = { toMonoid := MonoidWithZero.toMonoid, mul_comm := ⋯, toZero := Set.Icc.zero, zero_mul := ⋯, mul_zero := ⋯ }
instance
Set.Icc.cancelMonoidWithZero
{R : Type u_2}
[Ring R]
[PartialOrder R]
[IsOrderedRing R]
[NoZeroDivisors R]
:
CancelMonoidWithZero ↑(Icc 0 1)
Equations
- Set.Icc.cancelMonoidWithZero = { toMonoidWithZero := Set.Icc.monoidWithZero, toIsCancelMulZero := ⋯ }
instance
Set.Icc.cancelCommMonoidWithZero
{R : Type u_2}
[CommRing R]
[PartialOrder R]
[IsOrderedRing R]
[NoZeroDivisors R]
:
CancelCommMonoidWithZero ↑(Icc 0 1)
Equations
- Set.Icc.cancelCommMonoidWithZero = { toCommMonoidWithZero := Set.Icc.commMonoidWithZero, toIsLeftCancelMulZero := ⋯ }
theorem
Set.Icc.one_sub_mem
{β : Type u_2}
[Ring β]
[PartialOrder β]
[IsOrderedRing β]
{t : β}
(ht : t ∈ Icc 0 1)
:
theorem
Set.Icc.mem_iff_one_sub_mem
{β : Type u_2}
[Ring β]
[PartialOrder β]
[IsOrderedRing β]
{t : β}
:
theorem
Set.Icc.one_sub_nonneg
{β : Type u_2}
[Ring β]
[PartialOrder β]
[IsOrderedRing β]
(x : ↑(Icc 0 1))
:
theorem
Set.Icc.one_sub_le_one
{β : Type u_2}
[Ring β]
[PartialOrder β]
[IsOrderedRing β]
(x : ↑(Icc 0 1))
:
Instances for ↥(Set.Ico 0 1)
#
instance
Set.Ico.zero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
[Nontrivial R]
:
Equations
- Set.Ico.zero = { zero := ⟨0, ⋯⟩ }
@[simp]
theorem
Set.Ico.coe_zero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
[Nontrivial R]
:
@[simp]
theorem
Set.Ico.mk_zero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
[Nontrivial R]
(h : 0 ∈ Ico 0 1)
:
@[simp]
theorem
Set.Ico.coe_eq_zero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
[Nontrivial R]
{x : ↑(Ico 0 1)}
:
theorem
Set.Ico.coe_ne_zero
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
[Nontrivial R]
{x : ↑(Ico 0 1)}
:
theorem
Set.Ico.nonneg
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
[Nontrivial R]
{t : ↑(Ico 0 1)}
:
like coe_nonneg
, but with the inequality in Ico (0:R) 1
.
Equations
- Set.Ico.mul = { mul := fun (p q : ↑(Set.Ico 0 1)) => ⟨↑p * ↑q, ⋯⟩ }
@[simp]
theorem
Set.Ico.coe_mul
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsOrderedRing R]
(x y : ↑(Ico 0 1))
:
Equations
- Set.Ico.semigroup = { toMul := Set.Ico.mul, mul_assoc := ⋯ }
instance
Set.Ico.commSemigroup
{R : Type u_2}
[CommSemiring R]
[PartialOrder R]
[IsOrderedRing R]
:
CommSemigroup ↑(Ico 0 1)
Equations
- Set.Ico.commSemigroup = { toSemigroup := Set.Ico.semigroup, mul_comm := ⋯ }
Instances for ↥(Set.Ioc 0 1)
#
Equations
- Set.Ioc.one = { one := ⟨1, ⋯⟩ }
@[simp]
@[simp]
theorem
Set.Ioc.mk_one
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
(h : 1 ∈ Ioc 0 1)
:
@[simp]
theorem
Set.Ioc.coe_eq_one
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
{x : ↑(Ioc 0 1)}
:
theorem
Set.Ioc.coe_ne_one
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
{x : ↑(Ioc 0 1)}
:
theorem
Set.Ioc.le_one
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
{t : ↑(Ioc 0 1)}
:
like coe_le_one
, but with the inequality in Ioc (0:R) 1
.
Equations
- Set.Ioc.mul = { mul := fun (p q : ↑(Set.Ioc 0 1)) => ⟨↑p * ↑q, ⋯⟩ }
Equations
- Set.Ioc.pow = { pow := fun (p : ↑(Set.Ioc 0 1)) (n : ℕ) => ⟨↑p ^ n, ⋯⟩ }
@[simp]
theorem
Set.Ioc.coe_mul
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
(x y : ↑(Ioc 0 1))
:
@[simp]
theorem
Set.Ioc.coe_pow
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
(x : ↑(Ioc 0 1))
(n : ℕ)
:
Equations
- Set.Ioc.semigroup = { toMul := Set.Ioc.mul, mul_assoc := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
instance
Set.Ioc.commSemigroup
{R : Type u_2}
[CommSemiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
:
CommSemigroup ↑(Ioc 0 1)
Equations
- Set.Ioc.commSemigroup = { toSemigroup := Set.Ioc.semigroup, mul_comm := ⋯ }
instance
Set.Ioc.commMonoid
{R : Type u_2}
[CommSemiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
:
CommMonoid ↑(Ioc 0 1)
Equations
- Set.Ioc.commMonoid = { toMonoid := Set.Ioc.monoid, mul_comm := ⋯ }
instance
Set.Ioc.cancelMonoid
{R : Type u_2}
[Ring R]
[PartialOrder R]
[IsStrictOrderedRing R]
[IsDomain R]
:
CancelMonoid ↑(Ioc 0 1)
Equations
- Set.Ioc.cancelMonoid = { toMonoid := Set.Ioc.monoid, mul_left_cancel := ⋯, mul_right_cancel := ⋯ }
instance
Set.Ioc.cancelCommMonoid
{R : Type u_2}
[CommRing R]
[PartialOrder R]
[IsStrictOrderedRing R]
[IsDomain R]
:
CancelCommMonoid ↑(Ioc 0 1)
Equations
- Set.Ioc.cancelCommMonoid = { toMonoid := LeftCancelMonoid.toMonoid, mul_comm := ⋯, mul_left_cancel := ⋯ }
Instances for ↥(Set.Ioo 0 1)
#
Equations
- Set.Ioo.mul = { mul := fun (p q : ↑(Set.Ioo 0 1)) => ⟨↑p * ↑q, ⋯⟩ }
@[simp]
theorem
Set.Ioo.coe_mul
{R : Type u_1}
[Semiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
(x y : ↑(Ioo 0 1))
:
Equations
- Set.Ioo.semigroup = { toMul := Set.Ioo.mul, mul_assoc := ⋯ }
instance
Set.Ioo.commSemigroup
{R : Type u_2}
[CommSemiring R]
[PartialOrder R]
[IsStrictOrderedRing R]
:
CommSemigroup ↑(Ioo 0 1)
Equations
- Set.Ioo.commSemigroup = { toSemigroup := Set.Ioo.semigroup, mul_comm := ⋯ }
theorem
Set.Ioo.one_sub_mem
{β : Type u_2}
[Ring β]
[PartialOrder β]
[IsOrderedRing β]
{t : β}
(ht : t ∈ Ioo 0 1)
:
theorem
Set.Ioo.mem_iff_one_sub_mem
{β : Type u_2}
[Ring β]
[PartialOrder β]
[IsOrderedRing β]
{t : β}
:
theorem
Set.Ioo.one_minus_pos
{β : Type u_2}
[Ring β]
[PartialOrder β]
[IsOrderedRing β]
(x : ↑(Ioo 0 1))
:
theorem
Set.Ioo.one_minus_lt_one
{β : Type u_2}
[Ring β]
[PartialOrder β]
[IsOrderedRing β]
(x : ↑(Ioo 0 1))
: