The areas / V18. Measure and integration
Mathlib.Analysis.BoxIntegral.Box.Basic
86 declarations and 2 deprecated aliases. Mathlib docs · Source
Rectangular boxes in ℝⁿ
In this file we define rectangular boxes in ℝⁿ. As usual, we represent ℝⁿ as the type of
functions ι → ℝ (usually ι = Fin n for some n). When we need to interpret a box [l, u] as a
set, we use the product {x | ∀ i, l i < x i ∧ x i ≤ u i} of half-open intervals (l i, u i]. We
exclude l i because this way boxes of a partition are disjoint as sets in ℝⁿ.
Currently, the only use cases for these constructions are the definitions of Riemann-style integrals (Riemann, Henstock-Kurzweil, McShane).
Main definitions
We use the same structure BoxIntegral.Box both for ambient boxes and for elements of a partition.
Each box is stored as two points lower upper : ι → ℝ and a proof of ∀ i, lower i < upper i. We
define instances Membership (ι → ℝ) (Box ι) and CoeTC (Box ι) (Set <| ι → ℝ) so that each box is
interpreted as the set {x | ∀ i, x i ∈ Set.Ioc (I.lower i) (I.upper i)}. This way boxes of a
partition are pairwise disjoint and their union is exactly the original box.
We require boxes to be nonempty, because this way coercion to sets is injective. The empty box can
be represented as ⊥ : WithBot (BoxIntegral.Box ι).
We define the following operations on boxes:
- coercion to
Set (ι → ℝ)andMembership (ι → ℝ) (BoxIntegral.Box ι)as described above; PartialOrderandSemilatticeSupinstances such thatI ≤ Jis equivalent to(I : Set (ι → ℝ)) ⊆ J;Latticeinstances onWithBot (BoxIntegral.Box ι);BoxIntegral.Box.Icc: the closed boxSet.Icc I.lower I.upper; defined as a bundled monotone map fromBox ιtoSet (ι → ℝ);BoxIntegral.Box.face I i : Box (Fin n): a hyperface ofI : BoxIntegral.Box (Fin (n + 1));BoxIntegral.Box.distortion: the maximal ratio of two lengths of edges of a box; defined as the supremum ofnnDist I.lower I.upper / nnDist (I.lower i) (I.upper i).
We also provide a convenience constructor BoxIntegral.Box.mk' (l u : ι → ℝ) : WithBot (Box ι)
that returns the box ⟨l, u, _⟩ if it is nonempty and ⊥ otherwise.
Tags
rectangular box
Rectangular box: definition and partial order
Supremum of two boxes
WithBot (Box ι)
In this section we define coercion from WithBot (Box ι) to Set (ι → ℝ) by sending ⊥ to ∅.
Hyperface of a box in ℝⁿ⁺¹ = Fin (n + 1) → ℝ
Covering of the interior of a box by a monotone sequence of smaller boxes
def BoxIntegral.Box.ctorIdx E1 #
{ι : Type u_2} → BoxIntegral.Box ι → ℕ
theorem BoxIntegral.Box.mk.inj E1 #
∀ {ι : Type u_2} {lower upper : ι → ℝ} {lower_lt_upper : ∀ (i : ι), lower i < upper i} {lower_1 upper_1 : ι → ℝ}
{lower_lt_upper_1 : ∀ (i : ι), lower_1 i < upper_1 i},
{ lower := lower, upper := upper, lower_lt_upper := lower_lt_upper } =
{ lower := lower_1, upper := upper_1, lower_lt_upper := lower_lt_upper_1 } →
lower = lower_1 ∧ upper = upper_1
theorem BoxIntegral.Box.mk.injEq E0 #
∀ {ι : Type u_2} (lower upper : ι → ℝ) (lower_lt_upper : ∀ (i : ι), lower i < upper i) (lower_1 upper_1 : ι → ℝ)
(lower_lt_upper_1 : ∀ (i : ι), lower_1 i < upper_1 i),
({ lower := lower, upper := upper, lower_lt_upper := lower_lt_upper } =
{ lower := lower_1, upper := upper_1, lower_lt_upper := lower_lt_upper_1 }) =
(lower = lower_1 ∧ upper = upper_1)
theorem BoxIntegral.Box.mk.congr_simp E1 #
∀ {ι : Type u_2} (lower lower_1 : ι → ℝ) (e_lower : lower = lower_1) (upper upper_1 : ι → ℝ) (e_upper : upper = upper_1)
(lower_lt_upper : ∀ (i : ι), lower i < upper i),
{ lower := lower, upper := upper, lower_lt_upper := lower_lt_upper } =
{ lower := lower_1, upper := upper_1, lower_lt_upper := ⋯ }
structure BoxIntegral.Box E3 #
Type u_2 → Type u_2
A nontrivial rectangular box in ι → ℝ with corners lower and upper. Represents the product
of half-open intervals (lower i, upper i].
ctor BoxIntegral.Box.mk E0 #
{ι : Type u_2} → (lower upper : ι → ℝ) → (∀ (i : ι), lower i < upper i) → BoxIntegral.Box ι
abbrev BoxIntegral.Box.upper E1 #
{ι : Type u_2} → BoxIntegral.Box ι → ι → ℝ
coordinates of the lower and upper corners of the box
abbrev BoxIntegral.Box.lower E1 #
{ι : Type u_2} → BoxIntegral.Box ι → ι → ℝ
coordinates of the lower and upper corners of the box
theorem BoxIntegral.Box.lower_lt_upper E0 #
∀ {ι : Type u_2} (self : BoxIntegral.Box ι) (i : ι), self.lower i < self.upper i
Each lower coordinate is less than its upper coordinate: i.e., the box is non-empty
instance BoxIntegral.Box.instInhabited E0 #
{ι : Type u_1} → Inhabited (BoxIntegral.Box ι)
theorem BoxIntegral.Box.lower_le_upper E1 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), I.lower ≤ I.upper
theorem BoxIntegral.Box.lower_ne_upper E1 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι) (i : ι), I.lower i ≠ I.upper i
instance BoxIntegral.Box.instMembershipForallReal E0 #
{ι : Type u_1} → Membership (ι → ℝ) (BoxIntegral.Box ι)
def BoxIntegral.Box.toSet E1 #
{ι : Type u_1} → BoxIntegral.Box ι → Set (ι → ℝ)
The set of points in this box: this is the product of half-open intervals (lower i, upper i],
where lower and upper are this box' corners.
instance BoxIntegral.Box.instCoeTCSetForallReal E0 #
{ι : Type u_1} → CoeTC (BoxIntegral.Box ι) (Set (ι → ℝ))
theorem BoxIntegral.Box.mem_mk E0 #
∀ {ι : Type u_1} {l u x : ι → ℝ} {H : ∀ (i : ι), l i < u i},
x ∈ { lower := l, upper := u, lower_lt_upper := H } ↔ ∀ (i : ι), x i ∈ Set.Ioc (l i) (u i)
theorem BoxIntegral.Box.mem_coe E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι) {x : ι → ℝ}, x ∈ ↑I ↔ x ∈ I
theorem BoxIntegral.Box.mem_def E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι) {x : ι → ℝ}, x ∈ I ↔ ∀ (i : ι), x i ∈ Set.Ioc (I.lower i) (I.upper i)
theorem BoxIntegral.Box.mem_univ_Ioc E0 #
∀ {ι : Type u_1} {x : ι → ℝ} {I : BoxIntegral.Box ι}, (x ∈ Set.univ.pi fun i ↦ Set.Ioc (I.lower i) (I.upper i)) ↔ x ∈ I
theorem BoxIntegral.Box.coe_eq_pi E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), ↑I = Set.univ.pi fun i ↦ Set.Ioc (I.lower i) (I.upper i)
theorem BoxIntegral.Box.upper_mem E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), I.upper ∈ I
theorem BoxIntegral.Box.exists_mem E1 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), ∃ x, x ∈ I
theorem BoxIntegral.Box.nonempty_coe E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), (↑I).Nonempty
theorem BoxIntegral.Box.coe_ne_empty E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), ↑I ≠ ∅
theorem BoxIntegral.Box.empty_ne_coe E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), ∅ ≠ ↑I
instance BoxIntegral.Box.instLE E0 #
{ι : Type u_1} → LE (BoxIntegral.Box ι)
theorem BoxIntegral.Box.le_def E0 #
∀ {ι : Type u_1} (I J : BoxIntegral.Box ι), I ≤ J ↔ ∀ x ∈ I, x ∈ J
theorem BoxIntegral.Box.le_tfae E1 #
∀ {ι : Type u_1} (I J : BoxIntegral.Box ι),
[I ≤ J, ↑I ⊆ ↑J, Set.Icc I.lower I.upper ⊆ Set.Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper].TFAE
theorem BoxIntegral.Box.coe_subset_coe E0 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, ↑I ⊆ ↑J ↔ I ≤ J
theorem BoxIntegral.Box.le_iff_bounds E1 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, I ≤ J ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper
theorem BoxIntegral.Box.injective_coe E0 #
∀ {ι : Type u_1}, Function.Injective BoxIntegral.Box.toSet
theorem BoxIntegral.Box.coe_inj E0 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, ↑I = ↑J ↔ I = J
theorem BoxIntegral.Box.ext E1 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, (∀ (x : ι → ℝ), x ∈ I ↔ x ∈ J) → I = J
theorem BoxIntegral.Box.ext_iff E0 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, I = J ↔ ∀ (x : ι → ℝ), x ∈ I ↔ x ∈ J
theorem BoxIntegral.Box.ne_of_disjoint_coe E0 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, Disjoint ↑I ↑J → I ≠ J
instance BoxIntegral.Box.instPartialOrder E0 #
{ι : Type u_1} → PartialOrder (BoxIntegral.Box ι)
def BoxIntegral.Box.Icc E3 #
{ι : Type u_1} → BoxIntegral.Box ι ↪o Set (ι → ℝ)
Closed box corresponding to I : BoxIntegral.Box ι.
theorem BoxIntegral.Box.Icc_def E0 #
∀ {ι : Type u_1} {I : BoxIntegral.Box ι}, BoxIntegral.Box.Icc I = Set.Icc I.lower I.upper
theorem BoxIntegral.Box.upper_mem_Icc E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), I.upper ∈ BoxIntegral.Box.Icc I
theorem BoxIntegral.Box.lower_mem_Icc E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), I.lower ∈ BoxIntegral.Box.Icc I
theorem BoxIntegral.Box.isCompact_Icc E1 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), IsCompact (BoxIntegral.Box.Icc I)
theorem BoxIntegral.Box.Icc_eq_pi E1 #
∀ {ι : Type u_1} {I : BoxIntegral.Box ι}, BoxIntegral.Box.Icc I = Set.univ.pi fun i ↦ Set.Icc (I.lower i) (I.upper i)
theorem BoxIntegral.Box.le_iff_Icc E1 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, I ≤ J ↔ BoxIntegral.Box.Icc I ⊆ BoxIntegral.Box.Icc J
theorem BoxIntegral.Box.antitone_lower E1 #
∀ {ι : Type u_1}, Antitone fun I ↦ I.lower
theorem BoxIntegral.Box.monotone_upper E1 #
∀ {ι : Type u_1}, Monotone fun I ↦ I.upper
theorem BoxIntegral.Box.coe_subset_Icc E0 #
∀ {ι : Type u_1} {I : BoxIntegral.Box ι}, ↑I ⊆ BoxIntegral.Box.Icc I
theorem BoxIntegral.Box.isBounded_Icc E1 #
∀ {ι : Type u_1} [Finite ι] (I : BoxIntegral.Box ι), Bornology.IsBounded (BoxIntegral.Box.Icc I)
theorem BoxIntegral.Box.isBounded E1 #
∀ {ι : Type u_1} [Finite ι] (I : BoxIntegral.Box ι), Bornology.IsBounded ↑I
instance BoxIntegral.Box.instSemilatticeSup E0 #
{ι : Type u_1} → SemilatticeSup (BoxIntegral.Box ι)
I ⊔ J is the least box that includes both I and J. Since ↑I ∪ ↑J is usually not a box,
↑(I ⊔ J) is larger than ↑I ∪ ↑J.
def BoxIntegral.Box.withBotToSet E1 #
{ι : Type u_1} → WithBot (BoxIntegral.Box ι) → Set (ι → ℝ)
The set underlying this box: ⊥ is mapped to ∅.
instance BoxIntegral.Box.withBotCoe E0 #
{ι : Type u_1} → CoeTC (WithBot (BoxIntegral.Box ι)) (Set (ι → ℝ))
theorem BoxIntegral.Box.coe_bot E0 #
∀ {ι : Type u_1}, ↑⊥ = ∅
theorem BoxIntegral.Box.coe_coe E0 #
∀ {ι : Type u_1} {I : BoxIntegral.Box ι}, ↑↑I = ↑I
theorem BoxIntegral.Box.isSome_iff E0 #
∀ {ι : Type u_1} {I : WithBot (BoxIntegral.Box ι)}, Option.isSome I = true ↔ (↑I).Nonempty
theorem BoxIntegral.Box.biUnion_coe_eq_coe E0 #
∀ {ι : Type u_1} (I : WithBot (BoxIntegral.Box ι)), ⋃ J, ⋃ (_ : ↑J = I), ↑J = ↑I
theorem BoxIntegral.Box.withBotCoe_subset_iff E0 #
∀ {ι : Type u_1} {I J : WithBot (BoxIntegral.Box ι)}, ↑I ⊆ ↑J ↔ I ≤ J
theorem BoxIntegral.Box.withBotCoe_inj E0 #
∀ {ι : Type u_1} {I J : WithBot (BoxIntegral.Box ι)}, ↑I = ↑J ↔ I = J
def BoxIntegral.Box.mk' E1 #
{ι : Type u_1} → (ι → ℝ) → (ι → ℝ) → WithBot (BoxIntegral.Box ι)
Make a WithBot (Box ι) from a pair of corners l u : ι → ℝ. If l i < u i for all i,
then the result is ⟨l, u, _⟩ : Box ι, otherwise it is ⊥. In any case, the result interpreted
as a set in ι → ℝ is the set {x : ι → ℝ | ∀ i, x i ∈ Ioc (l i) (u i)}.
theorem BoxIntegral.Box.mk'_eq_bot E0 #
∀ {ι : Type u_1} {l u : ι → ℝ}, BoxIntegral.Box.mk' l u = ⊥ ↔ ∃ i, u i ≤ l i
theorem BoxIntegral.Box.mk'_eq_coe E0 #
∀ {ι : Type u_1} {I : BoxIntegral.Box ι} {l u : ι → ℝ}, BoxIntegral.Box.mk' l u = ↑I ↔ l = I.lower ∧ u = I.upper
theorem BoxIntegral.Box.coe_mk' E0 #
∀ {ι : Type u_1} (l u : ι → ℝ), ↑(BoxIntegral.Box.mk' l u) = Set.univ.pi fun i ↦ Set.Ioc (l i) (u i)
instance BoxIntegral.Box.WithBot.inf E0 #
{ι : Type u_1} → Min (WithBot (BoxIntegral.Box ι))
theorem BoxIntegral.Box.coe_inf E0 #
∀ {ι : Type u_1} (I J : WithBot (BoxIntegral.Box ι)), ↑(I ⊓ J) = ↑I ∩ ↑J
instance BoxIntegral.Box.instLatticeWithBot E0 #
{ι : Type u_1} → Lattice (WithBot (BoxIntegral.Box ι))
theorem BoxIntegral.Box.disjoint_withBotCoe E0 #
∀ {ι : Type u_1} {I J : WithBot (BoxIntegral.Box ι)}, Disjoint ↑I ↑J ↔ Disjoint I J
theorem BoxIntegral.Box.disjoint_coe E0 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, Disjoint ↑I ↑J ↔ Disjoint ↑I ↑J
theorem BoxIntegral.Box.not_disjoint_coe_iff_nonempty_inter E1 #
∀ {ι : Type u_1} {I J : BoxIntegral.Box ι}, ¬Disjoint ↑I ↑J ↔ (↑I ∩ ↑J).Nonempty
def BoxIntegral.Box.face E1 #
{n : ℕ} → BoxIntegral.Box (Fin (n + 1)) → Fin (n + 1) → BoxIntegral.Box (Fin n)
Face of a box in ℝⁿ⁺¹ = Fin (n + 1) → ℝ: the box in ℝⁿ = Fin n → ℝ with corners at
I.lower ∘ Fin.succAbove i and I.upper ∘ Fin.succAbove i.
theorem BoxIntegral.Box.face_lower E0 #
∀ {n : ℕ} (I : BoxIntegral.Box (Fin (n + 1))) (i : Fin (n + 1)) (a : Fin n),
(I.face i).lower a = I.lower (i.succAbove a)
theorem BoxIntegral.Box.face_upper E0 #
∀ {n : ℕ} (I : BoxIntegral.Box (Fin (n + 1))) (i : Fin (n + 1)) (a : Fin n),
(I.face i).upper a = I.upper (i.succAbove a)
theorem BoxIntegral.Box.face_mk E0 #
∀ {n : ℕ} (l u : Fin (n + 1) → ℝ) (h : ∀ (i : Fin (n + 1)), l i < u i) (i : Fin (n + 1)),
{ lower := l, upper := u, lower_lt_upper := h }.face i =
{ lower := l ∘ i.succAbove, upper := u ∘ i.succAbove, lower_lt_upper := ⋯ }
theorem BoxIntegral.Box.face_mono E1 #
∀ {n : ℕ} {I J : BoxIntegral.Box (Fin (n + 1))}, I ≤ J → ∀ (i : Fin (n + 1)), I.face i ≤ J.face i
theorem BoxIntegral.Box.monotone_face E1 #
∀ {n : ℕ} (i : Fin (n + 1)), Monotone fun I ↦ I.face i
theorem BoxIntegral.Box.mapsTo_insertNth_face_Icc E1 #
∀ {n : ℕ} (I : BoxIntegral.Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ},
x ∈ Set.Icc (I.lower i) (I.upper i) →
Set.MapsTo (i.insertNth x) (BoxIntegral.Box.Icc (I.face i)) (BoxIntegral.Box.Icc I)
theorem BoxIntegral.Box.mapsTo_insertNth_face E1 #
∀ {n : ℕ} (I : BoxIntegral.Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ},
x ∈ Set.Ioc (I.lower i) (I.upper i) → Set.MapsTo (i.insertNth x) ↑(I.face i) ↑I
theorem BoxIntegral.Box.continuousOn_face_Icc E1 #
∀ {X : Type u_2} [inst : TopologicalSpace X] {n : ℕ} {f : (Fin (n + 1) → ℝ) → X} {I : BoxIntegral.Box (Fin (n + 1))},
ContinuousOn f (BoxIntegral.Box.Icc I) →
∀ {i : Fin (n + 1)} {x : ℝ},
x ∈ Set.Icc (I.lower i) (I.upper i) → ContinuousOn (f ∘ i.insertNth x) (BoxIntegral.Box.Icc (I.face i))
def BoxIntegral.Box.Ioo E1 #
{ι : Type u_1} → BoxIntegral.Box ι →o Set (ι → ℝ)
The interior of a box.
theorem BoxIntegral.Box.Ioo_subset_coe E0 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), BoxIntegral.Box.Ioo I ⊆ ↑I
theorem BoxIntegral.Box.Ioo_subset_Icc E1 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι), BoxIntegral.Box.Ioo I ⊆ BoxIntegral.Box.Icc I
theorem BoxIntegral.Box.iUnion_Ioo_of_tendsto E1 #
∀ {ι : Type u_1} [Finite ι] {I : BoxIntegral.Box ι} {J : ℕ → BoxIntegral.Box ι},
Monotone J →
Filter.Tendsto (BoxIntegral.Box.lower ∘ J) Filter.atTop (nhds I.lower) →
Filter.Tendsto (BoxIntegral.Box.upper ∘ J) Filter.atTop (nhds I.upper) →
⋃ n, BoxIntegral.Box.Ioo (J n) = BoxIntegral.Box.Ioo I
theorem BoxIntegral.Box.exists_seq_mono_tendsto E1 #
∀ {ι : Type u_1} (I : BoxIntegral.Box ι),
∃ J,
(∀ (n : ℕ), BoxIntegral.Box.Icc (J n) ⊆ BoxIntegral.Box.Ioo I) ∧
Filter.Tendsto (BoxIntegral.Box.lower ∘ ⇑J) Filter.atTop (nhds I.lower) ∧
Filter.Tendsto (BoxIntegral.Box.upper ∘ ⇑J) Filter.atTop (nhds I.upper)
def BoxIntegral.Box.distortion E3 #
{ι : Type u_1} → [Fintype ι] → BoxIntegral.Box ι → NNReal
The distortion of a box I is the maximum of the ratios of the lengths of its edges.
It is defined as the maximum of the ratios
nnDist I.lower I.upper / nnDist (I.lower i) (I.upper i).
theorem BoxIntegral.Box.distortion_eq_of_sub_eq_div E1 #
∀ {ι : Type u_1} [inst : Fintype ι] {I J : BoxIntegral.Box ι} {r : ℝ},
(∀ (i : ι), I.upper i - I.lower i = (J.upper i - J.lower i) / r) → I.distortion = J.distortion
theorem BoxIntegral.Box.nnDist_le_distortion_mul E1 #
∀ {ι : Type u_1} [inst : Fintype ι] (I : BoxIntegral.Box ι) (i : ι),
nnDist I.lower I.upper ≤ I.distortion * nnDist (I.lower i) (I.upper i)
theorem BoxIntegral.Box.dist_le_distortion_mul E1 #
∀ {ι : Type u_1} [inst : Fintype ι] (I : BoxIntegral.Box ι) (i : ι),
dist I.lower I.upper ≤ ↑I.distortion * (I.upper i - I.lower i)
theorem BoxIntegral.Box.diam_Icc_le_of_distortion_le E1 #
∀ {ι : Type u_1} [inst : Fintype ι] (I : BoxIntegral.Box ι) (i : ι) {c : NNReal},
I.distortion ≤ c → Metric.diam (BoxIntegral.Box.Icc I) ≤ ↑c * (I.upper i - I.lower i)
Deprecated aliases
| Name | New name | Since |
|---|---|---|
BoxIntegral.Box.le_TFAE | BoxIntegral.Box.le_tfae | 2026-10-27 |
BoxIntegral.Box.nndist_le_distortion_mul | BoxIntegral.Box.nnDist_le_distortion_mul | 2026-11-07 |