# mathlib3documentation

data.set.pointwise.interval

# (Pre)images of intervals #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

In this file we prove a bunch of trivial lemmas like “if we add a to all points of [b, c], then we get [a + b, a + c]”. For the functions x ↦ x ± a, x ↦ a ± x, and x ↦ -x we prove lemmas about preimages and images of all intervals. We also prove a few lemmas about images under x ↦ a * x, x ↦ x * a and x ↦ x⁻¹.

### Preimages under x ↦ a + x#

@[simp]
theorem set.preimage_const_add_Ici {α : Type u_1} (a b : α) :
(λ (x : α), a + x) ⁻¹' = set.Ici (b - a)
@[simp]
theorem set.preimage_const_add_Ioi {α : Type u_1} (a b : α) :
(λ (x : α), a + x) ⁻¹' = set.Ioi (b - a)
@[simp]
theorem set.preimage_const_add_Iic {α : Type u_1} (a b : α) :
(λ (x : α), a + x) ⁻¹' = set.Iic (b - a)
@[simp]
theorem set.preimage_const_add_Iio {α : Type u_1} (a b : α) :
(λ (x : α), a + x) ⁻¹' = set.Iio (b - a)
@[simp]
theorem set.preimage_const_add_Icc {α : Type u_1} (a b c : α) :
(λ (x : α), a + x) ⁻¹' c = set.Icc (b - a) (c - a)
@[simp]
theorem set.preimage_const_add_Ico {α : Type u_1} (a b c : α) :
(λ (x : α), a + x) ⁻¹' c = set.Ico (b - a) (c - a)
@[simp]
theorem set.preimage_const_add_Ioc {α : Type u_1} (a b c : α) :
(λ (x : α), a + x) ⁻¹' c = set.Ioc (b - a) (c - a)
@[simp]
theorem set.preimage_const_add_Ioo {α : Type u_1} (a b c : α) :
(λ (x : α), a + x) ⁻¹' c = set.Ioo (b - a) (c - a)

### Preimages under x ↦ x + a#

@[simp]
theorem set.preimage_add_const_Ici {α : Type u_1} (a b : α) :
(λ (x : α), x + a) ⁻¹' = set.Ici (b - a)
@[simp]
theorem set.preimage_add_const_Ioi {α : Type u_1} (a b : α) :
(λ (x : α), x + a) ⁻¹' = set.Ioi (b - a)
@[simp]
theorem set.preimage_add_const_Iic {α : Type u_1} (a b : α) :
(λ (x : α), x + a) ⁻¹' = set.Iic (b - a)
@[simp]
theorem set.preimage_add_const_Iio {α : Type u_1} (a b : α) :
(λ (x : α), x + a) ⁻¹' = set.Iio (b - a)
@[simp]
theorem set.preimage_add_const_Icc {α : Type u_1} (a b c : α) :
(λ (x : α), x + a) ⁻¹' c = set.Icc (b - a) (c - a)
@[simp]
theorem set.preimage_add_const_Ico {α : Type u_1} (a b c : α) :
(λ (x : α), x + a) ⁻¹' c = set.Ico (b - a) (c - a)
@[simp]
theorem set.preimage_add_const_Ioc {α : Type u_1} (a b c : α) :
(λ (x : α), x + a) ⁻¹' c = set.Ioc (b - a) (c - a)
@[simp]
theorem set.preimage_add_const_Ioo {α : Type u_1} (a b c : α) :
(λ (x : α), x + a) ⁻¹' c = set.Ioo (b - a) (c - a)

### Preimages under x ↦ -x#

@[simp]
theorem set.preimage_neg_Ici {α : Type u_1} (a : α) :
@[simp]
theorem set.preimage_neg_Iic {α : Type u_1} (a : α) :
@[simp]
theorem set.preimage_neg_Ioi {α : Type u_1} (a : α) :
@[simp]
theorem set.preimage_neg_Iio {α : Type u_1} (a : α) :
@[simp]
theorem set.preimage_neg_Icc {α : Type u_1} (a b : α) :
- b = set.Icc (-b) (-a)
@[simp]
theorem set.preimage_neg_Ico {α : Type u_1} (a b : α) :
- b = set.Ioc (-b) (-a)
@[simp]
theorem set.preimage_neg_Ioc {α : Type u_1} (a b : α) :
- b = set.Ico (-b) (-a)
@[simp]
theorem set.preimage_neg_Ioo {α : Type u_1} (a b : α) :
- b = set.Ioo (-b) (-a)

### Preimages under x ↦ x - a#

@[simp]
theorem set.preimage_sub_const_Ici {α : Type u_1} (a b : α) :
(λ (x : α), x - a) ⁻¹' = set.Ici (b + a)
@[simp]
theorem set.preimage_sub_const_Ioi {α : Type u_1} (a b : α) :
(λ (x : α), x - a) ⁻¹' = set.Ioi (b + a)
@[simp]
theorem set.preimage_sub_const_Iic {α : Type u_1} (a b : α) :
(λ (x : α), x - a) ⁻¹' = set.Iic (b + a)
@[simp]
theorem set.preimage_sub_const_Iio {α : Type u_1} (a b : α) :
(λ (x : α), x - a) ⁻¹' = set.Iio (b + a)
@[simp]
theorem set.preimage_sub_const_Icc {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) ⁻¹' c = set.Icc (b + a) (c + a)
@[simp]
theorem set.preimage_sub_const_Ico {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) ⁻¹' c = set.Ico (b + a) (c + a)
@[simp]
theorem set.preimage_sub_const_Ioc {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) ⁻¹' c = set.Ioc (b + a) (c + a)
@[simp]
theorem set.preimage_sub_const_Ioo {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) ⁻¹' c = set.Ioo (b + a) (c + a)

### Preimages under x ↦ a - x#

@[simp]
theorem set.preimage_const_sub_Ici {α : Type u_1} (a b : α) :
(λ (x : α), a - x) ⁻¹' = set.Iic (a - b)
@[simp]
theorem set.preimage_const_sub_Iic {α : Type u_1} (a b : α) :
(λ (x : α), a - x) ⁻¹' = set.Ici (a - b)
@[simp]
theorem set.preimage_const_sub_Ioi {α : Type u_1} (a b : α) :
(λ (x : α), a - x) ⁻¹' = set.Iio (a - b)
@[simp]
theorem set.preimage_const_sub_Iio {α : Type u_1} (a b : α) :
(λ (x : α), a - x) ⁻¹' = set.Ioi (a - b)
@[simp]
theorem set.preimage_const_sub_Icc {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) ⁻¹' c = set.Icc (a - c) (a - b)
@[simp]
theorem set.preimage_const_sub_Ico {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) ⁻¹' c = set.Ioc (a - c) (a - b)
@[simp]
theorem set.preimage_const_sub_Ioc {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) ⁻¹' c = set.Ico (a - c) (a - b)
@[simp]
theorem set.preimage_const_sub_Ioo {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) ⁻¹' c = set.Ioo (a - c) (a - b)

### Images under x ↦ a + x#

@[simp]
theorem set.image_const_add_Iic {α : Type u_1} (a b : α) :
(λ (x : α), a + x) '' = set.Iic (a + b)
@[simp]
theorem set.image_const_add_Iio {α : Type u_1} (a b : α) :
(λ (x : α), a + x) '' = set.Iio (a + b)

### Images under x ↦ x + a#

@[simp]
theorem set.image_add_const_Iic {α : Type u_1} (a b : α) :
(λ (x : α), x + a) '' = set.Iic (b + a)
@[simp]
theorem set.image_add_const_Iio {α : Type u_1} (a b : α) :
(λ (x : α), x + a) '' = set.Iio (b + a)

### Images under x ↦ -x#

theorem set.image_neg_Ici {α : Type u_1} (a : α) :
= set.Iic (-a)
theorem set.image_neg_Iic {α : Type u_1} (a : α) :
= set.Ici (-a)
theorem set.image_neg_Ioi {α : Type u_1} (a : α) :
= set.Iio (-a)
theorem set.image_neg_Iio {α : Type u_1} (a : α) :
= set.Ioi (-a)
theorem set.image_neg_Icc {α : Type u_1} (a b : α) :
= set.Icc (-b) (-a)
theorem set.image_neg_Ico {α : Type u_1} (a b : α) :
= set.Ioc (-b) (-a)
theorem set.image_neg_Ioc {α : Type u_1} (a b : α) :
= set.Ico (-b) (-a)
theorem set.image_neg_Ioo {α : Type u_1} (a b : α) :
= set.Ioo (-b) (-a)

### Images under x ↦ a - x#

@[simp]
theorem set.image_const_sub_Ici {α : Type u_1} (a b : α) :
(λ (x : α), a - x) '' = set.Iic (a - b)
@[simp]
theorem set.image_const_sub_Iic {α : Type u_1} (a b : α) :
(λ (x : α), a - x) '' = set.Ici (a - b)
@[simp]
theorem set.image_const_sub_Ioi {α : Type u_1} (a b : α) :
(λ (x : α), a - x) '' = set.Iio (a - b)
@[simp]
theorem set.image_const_sub_Iio {α : Type u_1} (a b : α) :
(λ (x : α), a - x) '' = set.Ioi (a - b)
@[simp]
theorem set.image_const_sub_Icc {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) '' c = set.Icc (a - c) (a - b)
@[simp]
theorem set.image_const_sub_Ico {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) '' c = set.Ioc (a - c) (a - b)
@[simp]
theorem set.image_const_sub_Ioc {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) '' c = set.Ico (a - c) (a - b)
@[simp]
theorem set.image_const_sub_Ioo {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) '' c = set.Ioo (a - c) (a - b)

### Images under x ↦ x - a#

@[simp]
theorem set.image_sub_const_Ici {α : Type u_1} (a b : α) :
(λ (x : α), x - a) '' = set.Ici (b - a)
@[simp]
theorem set.image_sub_const_Iic {α : Type u_1} (a b : α) :
(λ (x : α), x - a) '' = set.Iic (b - a)
@[simp]
theorem set.image_sub_const_Ioi {α : Type u_1} (a b : α) :
(λ (x : α), x - a) '' = set.Ioi (b - a)
@[simp]
theorem set.image_sub_const_Iio {α : Type u_1} (a b : α) :
(λ (x : α), x - a) '' = set.Iio (b - a)
@[simp]
theorem set.image_sub_const_Icc {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) '' c = set.Icc (b - a) (c - a)
@[simp]
theorem set.image_sub_const_Ico {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) '' c = set.Ico (b - a) (c - a)
@[simp]
theorem set.image_sub_const_Ioc {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) '' c = set.Ioc (b - a) (c - a)
@[simp]
theorem set.image_sub_const_Ioo {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) '' c = set.Ioo (b - a) (c - a)

### Bijections #

theorem set.Iic_add_bij {α : Type u_1} (a b : α) :
set.bij_on (λ (_x : α), _x + a) (set.Iic b) (set.Iic (b + a))
theorem set.Iio_add_bij {α : Type u_1} (a b : α) :
set.bij_on (λ (_x : α), _x + a) (set.Iio b) (set.Iio (b + a))
@[simp]
theorem set.preimage_const_add_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), a + x) ⁻¹' c = set.uIcc (b - a) (c - a)
@[simp]
theorem set.preimage_add_const_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), x + a) ⁻¹' c = set.uIcc (b - a) (c - a)
@[simp]
theorem set.preimage_neg_uIcc {α : Type u_1} (a b : α) :
- b = set.uIcc (-a) (-b)
@[simp]
theorem set.preimage_sub_const_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) ⁻¹' c = set.uIcc (b + a) (c + a)
@[simp]
theorem set.preimage_const_sub_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) ⁻¹' c = set.uIcc (a - b) (a - c)
@[simp]
theorem set.image_const_add_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), a + x) '' c = set.uIcc (a + b) (a + c)
@[simp]
theorem set.image_add_const_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), x + a) '' c = set.uIcc (b + a) (c + a)
@[simp]
theorem set.image_const_sub_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), a - x) '' c = set.uIcc (a - b) (a - c)
@[simp]
theorem set.image_sub_const_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), x - a) '' c = set.uIcc (b - a) (c - a)
theorem set.image_neg_uIcc {α : Type u_1} (a b : α) :
= set.uIcc (-a) (-b)
theorem set.abs_sub_le_of_uIcc_subset_uIcc {α : Type u_1} {a b c d : α} (h : d b) :
|d - c| |b - a|

If [c, d] is a subinterval of [a, b], then the distance between c and d is less than or equal to that of a and b

theorem set.abs_sub_left_of_mem_uIcc {α : Type u_1} {a b c : α} (h : c b) :
|c - a| |b - a|

If c ∈ [a, b], then the distance between a and c is less than or equal to that of a and b

theorem set.abs_sub_right_of_mem_uIcc {α : Type u_1} {a b c : α} (h : c b) :
|b - c| |b - a|

If x ∈ [a, b], then the distance between c and b is less than or equal to that of a and b

### Multiplication and inverse in a field #

@[simp]
theorem set.preimage_mul_const_Iio {α : Type u_1} (a : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) ⁻¹' = set.Iio (a / c)
@[simp]
theorem set.preimage_mul_const_Ioi {α : Type u_1} (a : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) ⁻¹' = set.Ioi (a / c)
@[simp]
theorem set.preimage_mul_const_Iic {α : Type u_1} (a : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) ⁻¹' = set.Iic (a / c)
@[simp]
theorem set.preimage_mul_const_Ici {α : Type u_1} (a : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) ⁻¹' = set.Ici (a / c)
@[simp]
theorem set.preimage_mul_const_Ioo {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) ⁻¹' b = set.Ioo (a / c) (b / c)
@[simp]
theorem set.preimage_mul_const_Ioc {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) ⁻¹' b = set.Ioc (a / c) (b / c)
@[simp]
theorem set.preimage_mul_const_Ico {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) ⁻¹' b = set.Ico (a / c) (b / c)
@[simp]
theorem set.preimage_mul_const_Icc {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) ⁻¹' b = set.Icc (a / c) (b / c)
@[simp]
theorem set.preimage_mul_const_Iio_of_neg {α : Type u_1} (a : α) {c : α} (h : c < 0) :
(λ (x : α), x * c) ⁻¹' = set.Ioi (a / c)
@[simp]
theorem set.preimage_mul_const_Ioi_of_neg {α : Type u_1} (a : α) {c : α} (h : c < 0) :
(λ (x : α), x * c) ⁻¹' = set.Iio (a / c)
@[simp]
theorem set.preimage_mul_const_Iic_of_neg {α : Type u_1} (a : α) {c : α} (h : c < 0) :
(λ (x : α), x * c) ⁻¹' = set.Ici (a / c)
@[simp]
theorem set.preimage_mul_const_Ici_of_neg {α : Type u_1} (a : α) {c : α} (h : c < 0) :
(λ (x : α), x * c) ⁻¹' = set.Iic (a / c)
@[simp]
theorem set.preimage_mul_const_Ioo_of_neg {α : Type u_1} (a b : α) {c : α} (h : c < 0) :
(λ (x : α), x * c) ⁻¹' b = set.Ioo (b / c) (a / c)
@[simp]
theorem set.preimage_mul_const_Ioc_of_neg {α : Type u_1} (a b : α) {c : α} (h : c < 0) :
(λ (x : α), x * c) ⁻¹' b = set.Ico (b / c) (a / c)
@[simp]
theorem set.preimage_mul_const_Ico_of_neg {α : Type u_1} (a b : α) {c : α} (h : c < 0) :
(λ (x : α), x * c) ⁻¹' b = set.Ioc (b / c) (a / c)
@[simp]
theorem set.preimage_mul_const_Icc_of_neg {α : Type u_1} (a b : α) {c : α} (h : c < 0) :
(λ (x : α), x * c) ⁻¹' b = set.Icc (b / c) (a / c)
@[simp]
theorem set.preimage_const_mul_Iio {α : Type u_1} (a : α) {c : α} (h : 0 < c) :
= set.Iio (a / c)
@[simp]
theorem set.preimage_const_mul_Ioi {α : Type u_1} (a : α) {c : α} (h : 0 < c) :
= set.Ioi (a / c)
@[simp]
theorem set.preimage_const_mul_Iic {α : Type u_1} (a : α) {c : α} (h : 0 < c) :
= set.Iic (a / c)
@[simp]
theorem set.preimage_const_mul_Ici {α : Type u_1} (a : α) {c : α} (h : 0 < c) :
= set.Ici (a / c)
@[simp]
theorem set.preimage_const_mul_Ioo {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
⁻¹' b = set.Ioo (a / c) (b / c)
@[simp]
theorem set.preimage_const_mul_Ioc {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
⁻¹' b = set.Ioc (a / c) (b / c)
@[simp]
theorem set.preimage_const_mul_Ico {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
⁻¹' b = set.Ico (a / c) (b / c)
@[simp]
theorem set.preimage_const_mul_Icc {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
⁻¹' b = set.Icc (a / c) (b / c)
@[simp]
theorem set.preimage_const_mul_Iio_of_neg {α : Type u_1} (a : α) {c : α} (h : c < 0) :
= set.Ioi (a / c)
@[simp]
theorem set.preimage_const_mul_Ioi_of_neg {α : Type u_1} (a : α) {c : α} (h : c < 0) :
= set.Iio (a / c)
@[simp]
theorem set.preimage_const_mul_Iic_of_neg {α : Type u_1} (a : α) {c : α} (h : c < 0) :
= set.Ici (a / c)
@[simp]
theorem set.preimage_const_mul_Ici_of_neg {α : Type u_1} (a : α) {c : α} (h : c < 0) :
= set.Iic (a / c)
@[simp]
theorem set.preimage_const_mul_Ioo_of_neg {α : Type u_1} (a b : α) {c : α} (h : c < 0) :
⁻¹' b = set.Ioo (b / c) (a / c)
@[simp]
theorem set.preimage_const_mul_Ioc_of_neg {α : Type u_1} (a b : α) {c : α} (h : c < 0) :
⁻¹' b = set.Ico (b / c) (a / c)
@[simp]
theorem set.preimage_const_mul_Ico_of_neg {α : Type u_1} (a b : α) {c : α} (h : c < 0) :
⁻¹' b = set.Ioc (b / c) (a / c)
@[simp]
theorem set.preimage_const_mul_Icc_of_neg {α : Type u_1} (a b : α) {c : α} (h : c < 0) :
⁻¹' b = set.Icc (b / c) (a / c)
@[simp]
theorem set.preimage_mul_const_uIcc {α : Type u_1} {a : α} (ha : a 0) (b c : α) :
(λ (x : α), x * a) ⁻¹' c = set.uIcc (b / a) (c / a)
@[simp]
theorem set.preimage_const_mul_uIcc {α : Type u_1} {a : α} (ha : a 0) (b c : α) :
(λ (x : α), a * x) ⁻¹' c = set.uIcc (b / a) (c / a)
@[simp]
theorem set.preimage_div_const_uIcc {α : Type u_1} {a : α} (ha : a 0) (b c : α) :
(λ (x : α), x / a) ⁻¹' c = set.uIcc (b * a) (c * a)
@[simp]
theorem set.image_mul_const_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), x * a) '' c = set.uIcc (b * a) (c * a)
@[simp]
theorem set.image_const_mul_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), a * x) '' c = set.uIcc (a * b) (a * c)
@[simp]
theorem set.image_div_const_uIcc {α : Type u_1} (a b c : α) :
(λ (x : α), x / a) '' c = set.uIcc (b / a) (c / a)
theorem set.image_mul_right_Icc' {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) '' b = set.Icc (a * c) (b * c)
theorem set.image_mul_right_Icc {α : Type u_1} {a b c : α} (hab : a b) (hc : 0 c) :
(λ (x : α), x * c) '' b = set.Icc (a * c) (b * c)
theorem set.image_mul_left_Icc' {α : Type u_1} {a : α} (h : 0 < a) (b c : α) :
'' c = set.Icc (a * b) (a * c)
theorem set.image_mul_left_Icc {α : Type u_1} {a b c : α} (ha : 0 a) (hbc : b c) :
'' c = set.Icc (a * b) (a * c)
theorem set.image_mul_right_Ioo {α : Type u_1} (a b : α) {c : α} (h : 0 < c) :
(λ (x : α), x * c) '' b = set.Ioo (a * c) (b * c)
theorem set.image_mul_left_Ioo {α : Type u_1} {a : α} (h : 0 < a) (b c : α) :
'' c = set.Ioo (a * b) (a * c)
theorem set.inv_Ioo_0_left {α : Type u_1} {a : α} (ha : 0 < a) :

The (pre)image under inv of Ioo 0 a is Ioi a⁻¹.

theorem set.inv_Ioi {α : Type u_1} {a : α} (ha : 0 < a) :
theorem set.image_const_mul_Ioi_zero {k : Type u_1} {x : k} (hx : 0 < x) :
(λ (y : k), x * y) '' =

### Images under x ↦ a * x + b#

@[simp]
theorem set.image_affine_Icc' {α : Type u_1} {a : α} (h : 0 < a) (b c d : α) :
(λ (x : α), a * x + b) '' d = set.Icc (a * c + b) (a * d + b)