Documentation

Mathlib.Analysis.BoxIntegral.Box.Basic

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:

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 #

Equations
  • BoxIntegral.Box.instInhabitedBox = { default := { lower := 0, upper := 1, lower_lt_upper := } }
theorem BoxIntegral.Box.lower_le_upper {ι : Type u_1} (I : BoxIntegral.Box ι) :
I.lower I.upper
theorem BoxIntegral.Box.lower_ne_upper {ι : Type u_1} (I : BoxIntegral.Box ι) (i : ι) :
I.lower i I.upper i
Equations
  • BoxIntegral.Box.instMembershipForAllRealBox = { mem := fun (x : ι) (I : BoxIntegral.Box ι) => ∀ (i : ι), x i Set.Ioc (I.lower i) (I.upper i) }
def BoxIntegral.Box.toSet {ι : Type u_1} (I : BoxIntegral.Box ι) :
Set (ι)
Equations
Equations
  • BoxIntegral.Box.instCoeTCBoxSetForAllReal = { coe := BoxIntegral.Box.toSet }
@[simp]
theorem BoxIntegral.Box.mem_mk {ι : 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)
@[simp]
theorem BoxIntegral.Box.mem_coe {ι : Type u_1} (I : BoxIntegral.Box ι) {x : ι} :
x I x I
theorem BoxIntegral.Box.mem_def {ι : 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 {ι : Type u_1} {x : ι} {I : BoxIntegral.Box ι} :
(x Set.pi Set.univ fun (i : ι) => Set.Ioc (I.lower i) (I.upper i)) x I
theorem BoxIntegral.Box.coe_eq_pi {ι : Type u_1} (I : BoxIntegral.Box ι) :
I = Set.pi Set.univ fun (i : ι) => Set.Ioc (I.lower i) (I.upper i)
@[simp]
theorem BoxIntegral.Box.upper_mem {ι : Type u_1} (I : BoxIntegral.Box ι) :
I.upper I
theorem BoxIntegral.Box.exists_mem {ι : Type u_1} (I : BoxIntegral.Box ι) :
∃ (x : ι), x I
@[simp]
theorem BoxIntegral.Box.coe_ne_empty {ι : Type u_1} (I : BoxIntegral.Box ι) :
I
@[simp]
theorem BoxIntegral.Box.empty_ne_coe {ι : Type u_1} (I : BoxIntegral.Box ι) :
I
Equations
theorem BoxIntegral.Box.le_def {ι : Type u_1} (I : BoxIntegral.Box ι) (J : BoxIntegral.Box ι) :
I J xI, x J
theorem BoxIntegral.Box.le_TFAE {ι : Type u_1} (I : BoxIntegral.Box ι) (J : BoxIntegral.Box ι) :
List.TFAE [I J, I J, Set.Icc I.lower I.upper Set.Icc J.lower J.upper, J.lower I.lower I.upper J.upper]
@[simp]
theorem BoxIntegral.Box.coe_subset_coe {ι : Type u_1} {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} :
I J I J
theorem BoxIntegral.Box.le_iff_bounds {ι : Type u_1} {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} :
I J J.lower I.lower I.upper J.upper
theorem BoxIntegral.Box.injective_coe {ι : Type u_1} :
Function.Injective BoxIntegral.Box.toSet
@[simp]
theorem BoxIntegral.Box.coe_inj {ι : Type u_1} {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} :
I = J I = J
theorem BoxIntegral.Box.ext {ι : Type u_1} {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} (H : ∀ (x : ι), x I x J) :
I = J
theorem BoxIntegral.Box.ne_of_disjoint_coe {ι : Type u_1} {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} (h : Disjoint I J) :
I J
Equations
def BoxIntegral.Box.Icc {ι : Type u_1} :

Closed box corresponding to I : BoxIntegral.Box ι.

Equations
theorem BoxIntegral.Box.Icc_def {ι : Type u_1} {I : BoxIntegral.Box ι} :
BoxIntegral.Box.Icc I = Set.Icc I.lower I.upper
@[simp]
theorem BoxIntegral.Box.upper_mem_Icc {ι : Type u_1} (I : BoxIntegral.Box ι) :
I.upper BoxIntegral.Box.Icc I
@[simp]
theorem BoxIntegral.Box.lower_mem_Icc {ι : Type u_1} (I : BoxIntegral.Box ι) :
I.lower BoxIntegral.Box.Icc I
theorem BoxIntegral.Box.isCompact_Icc {ι : Type u_1} (I : BoxIntegral.Box ι) :
IsCompact (BoxIntegral.Box.Icc I)
theorem BoxIntegral.Box.Icc_eq_pi {ι : Type u_1} {I : BoxIntegral.Box ι} :
BoxIntegral.Box.Icc I = Set.pi Set.univ fun (i : ι) => Set.Icc (I.lower i) (I.upper i)
theorem BoxIntegral.Box.le_iff_Icc {ι : Type u_1} {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} :
I J BoxIntegral.Box.Icc I BoxIntegral.Box.Icc J
theorem BoxIntegral.Box.antitone_lower {ι : Type u_1} :
Antitone fun (I : BoxIntegral.Box ι) => I.lower
theorem BoxIntegral.Box.monotone_upper {ι : Type u_1} :
Monotone fun (I : BoxIntegral.Box ι) => I.upper
theorem BoxIntegral.Box.coe_subset_Icc {ι : Type u_1} {I : BoxIntegral.Box ι} :
I BoxIntegral.Box.Icc I

Supremum of two boxes #

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.

Equations
  • BoxIntegral.Box.instSupBox = { sup := fun (I J : BoxIntegral.Box ι) => { lower := I.lower J.lower, upper := I.upper J.upper, lower_lt_upper := } }
Equations
  • BoxIntegral.Box.instSemilatticeSupBox = let __src := inferInstance; let __src_1 := inferInstance; SemilatticeSup.mk

WithBot (Box ι) #

In this section we define coercion from WithBot (Box ι) to Set (ι → ℝ) by sending to .

def BoxIntegral.Box.withBotToSet {ι : Type u_1} (o : WithBot (BoxIntegral.Box ι)) :
Set (ι)
Equations
instance BoxIntegral.Box.withBotCoe {ι : Type u_1} :
CoeTC (WithBot (BoxIntegral.Box ι)) (Set (ι))
Equations
  • BoxIntegral.Box.withBotCoe = { coe := BoxIntegral.Box.withBotToSet }
@[simp]
theorem BoxIntegral.Box.coe_bot {ι : Type u_1} :
=
@[simp]
theorem BoxIntegral.Box.coe_coe {ι : Type u_1} {I : BoxIntegral.Box ι} :
I = I
theorem BoxIntegral.Box.biUnion_coe_eq_coe {ι : Type u_1} (I : WithBot (BoxIntegral.Box ι)) :
⋃ (J : BoxIntegral.Box ι), ⋃ (_ : J = I), J = I
@[simp]
theorem BoxIntegral.Box.withBotCoe_subset_iff {ι : Type u_1} {I : WithBot (BoxIntegral.Box ι)} {J : WithBot (BoxIntegral.Box ι)} :
I J I J
@[simp]
theorem BoxIntegral.Box.withBotCoe_inj {ι : Type u_1} {I : WithBot (BoxIntegral.Box ι)} {J : WithBot (BoxIntegral.Box ι)} :
I = J I = J
def BoxIntegral.Box.mk' {ι : Type u_1} (l : ι) (u : ι) :

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)}.

Equations
  • BoxIntegral.Box.mk' l u = if h : ∀ (i : ι), l i < u i then { lower := l, upper := u, lower_lt_upper := h } else
@[simp]
theorem BoxIntegral.Box.mk'_eq_bot {ι : Type u_1} {l : ι} {u : ι} :
BoxIntegral.Box.mk' l u = ∃ (i : ι), u i l i
@[simp]
theorem BoxIntegral.Box.mk'_eq_coe {ι : Type u_1} {I : BoxIntegral.Box ι} {l : ι} {u : ι} :
BoxIntegral.Box.mk' l u = I l = I.lower u = I.upper
@[simp]
theorem BoxIntegral.Box.coe_mk' {ι : Type u_1} (l : ι) (u : ι) :
(BoxIntegral.Box.mk' l u) = Set.pi Set.univ fun (i : ι) => Set.Ioc (l i) (u i)
Equations
  • One or more equations did not get rendered due to their size.
@[simp]
theorem BoxIntegral.Box.coe_inf {ι : Type u_1} (I : WithBot (BoxIntegral.Box ι)) (J : WithBot (BoxIntegral.Box ι)) :
(I J) = I J
Equations
  • BoxIntegral.Box.instLatticeWithBotBox = let __src := WithBot.semilatticeSup; let __src_1 := BoxIntegral.Box.WithBot.inf; Lattice.mk
@[simp]
theorem BoxIntegral.Box.disjoint_coe {ι : Type u_1} {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} :
Disjoint I J Disjoint I J

Hyperface of a box in ℝⁿ⁺¹ = Fin (n + 1) → ℝ #

@[simp]
theorem BoxIntegral.Box.face_upper {n : } (I : BoxIntegral.Box (Fin (n + 1))) (i : Fin (n + 1)) :
∀ (a : Fin n), (BoxIntegral.Box.face I i).upper a = I.upper (Fin.succAbove i a)
@[simp]
theorem BoxIntegral.Box.face_lower {n : } (I : BoxIntegral.Box (Fin (n + 1))) (i : Fin (n + 1)) :
∀ (a : Fin n), (BoxIntegral.Box.face I i).lower a = I.lower (Fin.succAbove i a)
def BoxIntegral.Box.face {n : } (I : BoxIntegral.Box (Fin (n + 1))) (i : Fin (n + 1)) :

Face of a box in ℝⁿ⁺¹ = Fin (n + 1) → ℝ: the box in ℝⁿ = Fin n → ℝ with corners at I.lowerFin.succAbove i and I.upperFin.succAbove i.

Equations
@[simp]
theorem BoxIntegral.Box.face_mk {n : } (l : Fin (n + 1)) (u : Fin (n + 1)) (h : ∀ (i : Fin (n + 1)), l i < u i) (i : Fin (n + 1)) :
BoxIntegral.Box.face { lower := l, upper := u, lower_lt_upper := h } i = { lower := l Fin.succAbove i, upper := u Fin.succAbove i, lower_lt_upper := }
theorem BoxIntegral.Box.face_mono {n : } {I : BoxIntegral.Box (Fin (n + 1))} {J : BoxIntegral.Box (Fin (n + 1))} (h : I J) (i : Fin (n + 1)) :
theorem BoxIntegral.Box.monotone_face {n : } (i : Fin (n + 1)) :
theorem BoxIntegral.Box.mapsTo_insertNth_face_Icc {n : } (I : BoxIntegral.Box (Fin (n + 1))) {i : Fin (n + 1)} {x : } (hx : x Set.Icc (I.lower i) (I.upper i)) :
Set.MapsTo (Fin.insertNth i x) (BoxIntegral.Box.Icc (BoxIntegral.Box.face I i)) (BoxIntegral.Box.Icc I)
theorem BoxIntegral.Box.mapsTo_insertNth_face {n : } (I : BoxIntegral.Box (Fin (n + 1))) {i : Fin (n + 1)} {x : } (hx : x Set.Ioc (I.lower i) (I.upper i)) :
theorem BoxIntegral.Box.continuousOn_face_Icc {X : Type u_2} [TopologicalSpace X] {n : } {f : (Fin (n + 1))X} {I : BoxIntegral.Box (Fin (n + 1))} (h : ContinuousOn f (BoxIntegral.Box.Icc I)) {i : Fin (n + 1)} {x : } (hx : x Set.Icc (I.lower i) (I.upper i)) :
ContinuousOn (f Fin.insertNth i x) (BoxIntegral.Box.Icc (BoxIntegral.Box.face I i))

Covering of the interior of a box by a monotone sequence of smaller boxes #

def BoxIntegral.Box.Ioo {ι : Type u_1} :

The interior of a box.

Equations
  • BoxIntegral.Box.Ioo = { toFun := fun (I : BoxIntegral.Box ι) => Set.pi Set.univ fun (i : ι) => Set.Ioo (I.lower i) (I.upper i), monotone' := }
theorem BoxIntegral.Box.Ioo_subset_coe {ι : Type u_1} (I : BoxIntegral.Box ι) :
BoxIntegral.Box.Ioo I I
theorem BoxIntegral.Box.Ioo_subset_Icc {ι : Type u_1} (I : BoxIntegral.Box ι) :
BoxIntegral.Box.Ioo I BoxIntegral.Box.Icc I
theorem BoxIntegral.Box.iUnion_Ioo_of_tendsto {ι : Type u_1} [Finite ι] {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} (hJ : Monotone J) (hl : Filter.Tendsto (BoxIntegral.Box.lower J) Filter.atTop (nhds I.lower)) (hu : 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 {ι : Type u_1} (I : BoxIntegral.Box ι) :
∃ (J : →o BoxIntegral.Box ι), (∀ (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)

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).

Equations
theorem BoxIntegral.Box.distortion_eq_of_sub_eq_div {ι : Type u_1} [Fintype ι] {I : BoxIntegral.Box ι} {J : BoxIntegral.Box ι} {r : } (h : ∀ (i : ι), I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
theorem BoxIntegral.Box.nndist_le_distortion_mul {ι : Type u_1} [Fintype ι] (I : BoxIntegral.Box ι) (i : ι) :
nndist I.lower I.upper BoxIntegral.Box.distortion I * nndist (I.lower i) (I.upper i)
theorem BoxIntegral.Box.dist_le_distortion_mul {ι : Type u_1} [Fintype ι] (I : BoxIntegral.Box ι) (i : ι) :
dist I.lower I.upper (BoxIntegral.Box.distortion I) * (I.upper i - I.lower i)
theorem BoxIntegral.Box.diam_Icc_le_of_distortion_le {ι : Type u_1} [Fintype ι] (I : BoxIntegral.Box ι) (i : ι) {c : NNReal} (h : BoxIntegral.Box.distortion I c) :
Metric.diam (BoxIntegral.Box.Icc I) c * (I.upper i - I.lower i)