Algebraic instances for unit intervals #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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:
set.Icc.cancel_comm_monoid_with_zero
set.Ico.comm_semigroup
set.Ioc.comm_monoid
set.Ioo.comm_semigroup
TODO #
- algebraic instances for intervals -1 to 1
- algebraic instances for
Ici 1
- algebraic instances for
(Ioo (-1) 1)ᶜ
- provide
has_distrib_neg
instances where applicable - prove versions of
mul_le_{left,right}
for other intervals - prove versions of the lemmas in
topology/unit_interval
withℝ
generalized to some arbitrary ordered semiring
@[protected, instance]
Equations
- set.Icc.has_zero = {zero := ⟨0, _⟩}
@[protected, instance]
Equations
- set.Icc.has_one = {one := ⟨1, _⟩}
@[simp]
@[simp]
@[simp, norm_cast]
@[simp, norm_cast]
like coe_nonneg
, but with the inequality in Icc (0:α) 1
.
like coe_le_one
, but with the inequality in Icc (0:α) 1
.
@[protected, instance]
Equations
- set.Icc.monoid_with_zero = function.injective.monoid_with_zero coe set.Icc.monoid_with_zero._proof_1 set.Icc.coe_zero set.Icc.coe_one set.Icc.coe_mul set.Icc.coe_pow
@[protected, instance]
Equations
- set.Icc.comm_monoid_with_zero = function.injective.comm_monoid_with_zero coe set.Icc.comm_monoid_with_zero._proof_1 set.Icc.comm_monoid_with_zero._proof_2 set.Icc.comm_monoid_with_zero._proof_3 set.Icc.comm_monoid_with_zero._proof_4 set.Icc.comm_monoid_with_zero._proof_5
@[protected, instance]
Equations
- set.Icc.cancel_monoid_with_zero = function.injective.cancel_monoid_with_zero coe set.Icc.cancel_monoid_with_zero._proof_1 set.Icc.cancel_monoid_with_zero._proof_2 set.Icc.cancel_monoid_with_zero._proof_3 set.Icc.cancel_monoid_with_zero._proof_4 set.Icc.cancel_monoid_with_zero._proof_5
@[protected, instance]
def
set.Icc.cancel_comm_monoid_with_zero
{α : Type u_1}
[ordered_comm_ring α]
[no_zero_divisors α] :
Equations
- set.Icc.cancel_comm_monoid_with_zero = function.injective.cancel_comm_monoid_with_zero coe set.Icc.cancel_comm_monoid_with_zero._proof_1 set.Icc.cancel_comm_monoid_with_zero._proof_2 set.Icc.cancel_comm_monoid_with_zero._proof_3 set.Icc.cancel_comm_monoid_with_zero._proof_4 set.Icc.cancel_comm_monoid_with_zero._proof_5
@[protected, instance]
Equations
- set.Ico.has_zero = {zero := ⟨0, _⟩}
@[simp, norm_cast]
@[simp]
@[simp, norm_cast]
theorem
set.Ico.coe_eq_zero
{α : Type u_1}
[ordered_semiring α]
[nontrivial α]
{x : ↥(set.Ico 0 1)} :
theorem
set.Ico.coe_ne_zero
{α : Type u_1}
[ordered_semiring α]
[nontrivial α]
{x : ↥(set.Ico 0 1)} :
theorem
set.Ico.nonneg
{α : Type u_1}
[ordered_semiring α]
[nontrivial α]
{t : ↥(set.Ico 0 1)} :
0 ≤ t
like coe_nonneg
, but with the inequality in Ico (0:α) 1
.
@[protected, instance]
Equations
- set.Ico.semigroup = function.injective.semigroup coe set.Ico.semigroup._proof_1 set.Ico.coe_mul
@[protected, instance]
Equations
- set.Ico.comm_semigroup = function.injective.comm_semigroup coe set.Ico.comm_semigroup._proof_1 set.Ico.comm_semigroup._proof_2
@[protected, instance]
Equations
- set.Ioc.has_one = {one := ⟨1, _⟩}
@[simp, norm_cast]
@[simp]
theorem
set.Ioc.mk_one
{α : Type u_1}
[strict_ordered_semiring α]
[nontrivial α]
(h : 1 ∈ set.Ioc 0 1) :
@[simp, norm_cast]
theorem
set.Ioc.coe_eq_one
{α : Type u_1}
[strict_ordered_semiring α]
[nontrivial α]
{x : ↥(set.Ioc 0 1)} :
theorem
set.Ioc.coe_ne_one
{α : Type u_1}
[strict_ordered_semiring α]
[nontrivial α]
{x : ↥(set.Ioc 0 1)} :
theorem
set.Ioc.le_one
{α : Type u_1}
[strict_ordered_semiring α]
[nontrivial α]
{t : ↥(set.Ioc 0 1)} :
t ≤ 1
like coe_le_one
, but with the inequality in Ioc (0:α) 1
.
@[protected, instance]
Equations
- set.Ioc.semigroup = function.injective.semigroup coe set.Ioc.semigroup._proof_1 set.Ioc.coe_mul
@[protected, instance]
Equations
- set.Ioc.monoid = function.injective.monoid coe set.Ioc.monoid._proof_1 set.Ioc.coe_one set.Ioc.coe_mul set.Ioc.coe_pow
@[protected, instance]
def
set.Ioc.comm_semigroup
{α : Type u_1}
[strict_ordered_comm_semiring α] :
comm_semigroup ↥(set.Ioc 0 1)
Equations
- set.Ioc.comm_semigroup = function.injective.comm_semigroup coe set.Ioc.comm_semigroup._proof_1 set.Ioc.comm_semigroup._proof_2
@[protected, instance]
def
set.Ioc.comm_monoid
{α : Type u_1}
[strict_ordered_comm_semiring α]
[nontrivial α] :
comm_monoid ↥(set.Ioc 0 1)
Equations
- set.Ioc.comm_monoid = function.injective.comm_monoid coe set.Ioc.comm_monoid._proof_1 set.Ioc.comm_monoid._proof_2 set.Ioc.comm_monoid._proof_3 set.Ioc.comm_monoid._proof_4
@[protected, instance]
def
set.Ioc.cancel_monoid
{α : Type u_1}
[strict_ordered_ring α]
[is_domain α] :
cancel_monoid ↥(set.Ioc 0 1)
Equations
- set.Ioc.cancel_monoid = {mul := monoid.mul set.Ioc.monoid, mul_assoc := _, mul_left_cancel := _, one := monoid.one set.Ioc.monoid, one_mul := _, mul_one := _, npow := monoid.npow set.Ioc.monoid, npow_zero' := _, npow_succ' := _, mul_right_cancel := _}
@[protected, instance]
def
set.Ioc.cancel_comm_monoid
{α : Type u_1}
[strict_ordered_comm_ring α]
[is_domain α] :
cancel_comm_monoid ↥(set.Ioc 0 1)
Equations
- set.Ioc.cancel_comm_monoid = {mul := cancel_monoid.mul set.Ioc.cancel_monoid, mul_assoc := _, mul_left_cancel := _, one := cancel_monoid.one set.Ioc.cancel_monoid, one_mul := _, mul_one := _, npow := cancel_monoid.npow set.Ioc.cancel_monoid, npow_zero' := _, npow_succ' := _, mul_comm := _}
@[protected, instance]
Equations
- set.Ioo.semigroup = function.injective.semigroup coe set.Ioo.semigroup._proof_1 set.Ioo.coe_mul
@[protected, instance]
def
set.Ioo.comm_semigroup
{α : Type u_1}
[strict_ordered_comm_semiring α] :
comm_semigroup ↥(set.Ioo 0 1)
Equations
- set.Ioo.comm_semigroup = function.injective.comm_semigroup coe set.Ioo.comm_semigroup._proof_1 set.Ioo.comm_semigroup._proof_2