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 #

structure BoxIntegral.Box (ι : 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].

  • lower : ι

    coordinates of the lower and upper corners of the box

  • upper : ι

    coordinates of the lower and upper corners of the box

  • lower_lt_upper (i : ι) : self.lower i < self.upper i

    Each lower coordinate is less than its upper coordinate: i.e., the box is non-empty

Instances For
    Equations
      theorem BoxIntegral.Box.lower_le_upper {ι : Type u_1} (I : Box ι) :
      theorem BoxIntegral.Box.lower_ne_upper {ι : Type u_1} (I : Box ι) (i : ι) :
      I.lower i I.upper i
      Equations
        def BoxIntegral.Box.toSet {ι : Type u_1} (I : 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.

        Equations
          Instances For
            instance BoxIntegral.Box.instCoeTCSetForallReal {ι : Type u_1} :
            CoeTC (Box ι) (Set (ι))
            Equations
              @[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 : Box ι) {x : ι} :
              x I x I
              theorem BoxIntegral.Box.mem_def {ι : Type u_1} (I : 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 : Box ι} :
              (x Set.univ.pi fun (i : ι) => Set.Ioc (I.lower i) (I.upper i)) x I
              theorem BoxIntegral.Box.coe_eq_pi {ι : Type u_1} (I : Box ι) :
              I = Set.univ.pi fun (i : ι) => Set.Ioc (I.lower i) (I.upper i)
              @[simp]
              theorem BoxIntegral.Box.upper_mem {ι : Type u_1} (I : Box ι) :
              theorem BoxIntegral.Box.exists_mem {ι : Type u_1} (I : Box ι) :
              ∃ (x : ι), x I
              theorem BoxIntegral.Box.nonempty_coe {ι : Type u_1} (I : Box ι) :
              (↑I).Nonempty
              @[simp]
              theorem BoxIntegral.Box.coe_ne_empty {ι : Type u_1} (I : Box ι) :
              I
              @[simp]
              theorem BoxIntegral.Box.empty_ne_coe {ι : Type u_1} (I : Box ι) :
              I
              instance BoxIntegral.Box.instLE {ι : Type u_1} :
              LE (Box ι)
              Equations
                theorem BoxIntegral.Box.le_def {ι : Type u_1} (I J : Box ι) :
                I J xI, x J
                theorem BoxIntegral.Box.le_TFAE {ι : Type u_1} (I J : Box ι) :
                @[simp]
                theorem BoxIntegral.Box.coe_subset_coe {ι : Type u_1} {I J : Box ι} :
                I J I J
                theorem BoxIntegral.Box.le_iff_bounds {ι : Type u_1} {I J : Box ι} :
                @[simp]
                theorem BoxIntegral.Box.coe_inj {ι : Type u_1} {I J : Box ι} :
                I = J I = J
                theorem BoxIntegral.Box.ext {ι : Type u_1} {I J : Box ι} (H : ∀ (x : ι), x I x J) :
                I = J
                theorem BoxIntegral.Box.ext_iff {ι : Type u_1} {I J : Box ι} :
                I = J ∀ (x : ι), x I x J
                theorem BoxIntegral.Box.ne_of_disjoint_coe {ι : Type u_1} {I J : Box ι} (h : Disjoint I J) :
                I J
                Equations
                  def BoxIntegral.Box.Icc {ι : Type u_1} :
                  Box ι ↪o Set (ι)

                  Closed box corresponding to I : BoxIntegral.Box ι.

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

                      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

                        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 (Box ι)) :
                        Set (ι)

                        The set underlying this box: is mapped to .

                        Equations
                          Instances For
                            instance BoxIntegral.Box.withBotCoe {ι : Type u_1} :
                            CoeTC (WithBot (Box ι)) (Set (ι))
                            Equations
                              @[simp]
                              theorem BoxIntegral.Box.coe_bot {ι : Type u_1} :
                              =
                              @[simp]
                              theorem BoxIntegral.Box.coe_coe {ι : Type u_1} {I : Box ι} :
                              I = I
                              theorem BoxIntegral.Box.biUnion_coe_eq_coe {ι : Type u_1} (I : WithBot (Box ι)) :
                              ⋃ (J : Box ι), ⋃ (_ : J = I), J = I
                              @[simp]
                              theorem BoxIntegral.Box.withBotCoe_subset_iff {ι : Type u_1} {I J : WithBot (Box ι)} :
                              I J I J
                              @[simp]
                              theorem BoxIntegral.Box.withBotCoe_inj {ι : Type u_1} {I J : WithBot (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
                                Instances For
                                  @[simp]
                                  theorem BoxIntegral.Box.mk'_eq_bot {ι : Type u_1} {l u : ι} :
                                  mk' l u = ∃ (i : ι), u i l i
                                  @[simp]
                                  theorem BoxIntegral.Box.mk'_eq_coe {ι : Type u_1} {I : Box ι} {l u : ι} :
                                  mk' l u = I l = I.lower u = I.upper
                                  @[simp]
                                  theorem BoxIntegral.Box.coe_mk' {ι : Type u_1} (l u : ι) :
                                  (mk' l u) = Set.univ.pi fun (i : ι) => Set.Ioc (l i) (u i)
                                  instance BoxIntegral.Box.WithBot.inf {ι : Type u_1} :
                                  Min (WithBot (Box ι))
                                  Equations
                                    @[simp]
                                    theorem BoxIntegral.Box.coe_inf {ι : Type u_1} (I J : WithBot (Box ι)) :
                                    (IJ) = I J
                                    Equations
                                      @[simp]
                                      theorem BoxIntegral.Box.disjoint_withBotCoe {ι : Type u_1} {I J : WithBot (Box ι)} :
                                      Disjoint I J Disjoint I J
                                      theorem BoxIntegral.Box.disjoint_coe {ι : Type u_1} {I J : Box ι} :
                                      Disjoint I J Disjoint I J
                                      theorem BoxIntegral.Box.not_disjoint_coe_iff_nonempty_inter {ι : Type u_1} {I J : Box ι} :
                                      ¬Disjoint I J (I J).Nonempty

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

                                      def BoxIntegral.Box.face {n : } (I : Box (Fin (n + 1))) (i : Fin (n + 1)) :
                                      Box (Fin n)

                                      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
                                        Instances For
                                          @[simp]
                                          theorem BoxIntegral.Box.face_upper {n : } (I : Box (Fin (n + 1))) (i : Fin (n + 1)) (a✝ : Fin n) :
                                          (I.face i).upper a✝ = I.upper (i.succAbove a✝)
                                          @[simp]
                                          theorem BoxIntegral.Box.face_lower {n : } (I : Box (Fin (n + 1))) (i : Fin (n + 1)) (a✝ : Fin n) :
                                          (I.face i).lower a✝ = I.lower (i.succAbove a✝)
                                          @[simp]
                                          theorem BoxIntegral.Box.face_mk {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 {n : } {I J : Box (Fin (n + 1))} (h : I J) (i : Fin (n + 1)) :
                                          I.face i J.face i
                                          theorem BoxIntegral.Box.monotone_face {n : } (i : Fin (n + 1)) :
                                          Monotone fun (I : Box (Fin (n + 1))) => I.face i
                                          theorem BoxIntegral.Box.mapsTo_insertNth_face_Icc {n : } (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : } (hx : x Set.Icc (I.lower i) (I.upper i)) :
                                          theorem BoxIntegral.Box.mapsTo_insertNth_face {n : } (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : } (hx : x Set.Ioc (I.lower i) (I.upper i)) :
                                          Set.MapsTo (i.insertNth x) (I.face i) I
                                          theorem BoxIntegral.Box.continuousOn_face_Icc {X : Type u_2} [TopologicalSpace X] {n : } {f : (Fin (n + 1))X} {I : Box (Fin (n + 1))} (h : ContinuousOn f (Box.Icc I)) {i : Fin (n + 1)} {x : } (hx : x Set.Icc (I.lower i) (I.upper i)) :

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

                                          def BoxIntegral.Box.Ioo {ι : Type u_1} :
                                          Box ι →o Set (ι)

                                          The interior of a box.

                                          Equations
                                            Instances For
                                              theorem BoxIntegral.Box.Ioo_subset_coe {ι : Type u_1} (I : Box ι) :
                                              Box.Ioo I I
                                              theorem BoxIntegral.Box.iUnion_Ioo_of_tendsto {ι : Type u_1} [Finite ι] {I : Box ι} {J : Box ι} (hJ : Monotone J) (hl : Filter.Tendsto (lower J) Filter.atTop (nhds I.lower)) (hu : Filter.Tendsto (upper J) Filter.atTop (nhds I.upper)) :
                                              ⋃ (n : ), Box.Ioo (J n) = Box.Ioo I
                                              def BoxIntegral.Box.distortion {ι : Type u_1} [Fintype ι] (I : Box ι) :

                                              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
                                                Instances For
                                                  theorem BoxIntegral.Box.distortion_eq_of_sub_eq_div {ι : Type u_1} [Fintype ι] {I J : 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 : Box ι) (i : ι) :
                                                  theorem BoxIntegral.Box.dist_le_distortion_mul {ι : Type u_1} [Fintype ι] (I : Box ι) (i : ι) :
                                                  dist I.lower I.upper I.distortion * (I.upper i - I.lower i)
                                                  theorem BoxIntegral.Box.diam_Icc_le_of_distortion_le {ι : Type u_1} [Fintype ι] (I : Box ι) (i : ι) {c : NNReal} (h : I.distortion c) :
                                                  Metric.diam (Box.Icc I) c * (I.upper i - I.lower i)