Documentation

Mathlib.Analysis.BoxIntegral.Partition.Basic

Partitions of rectangular boxes in ℝⁿ #

In this file we define (pre)partitions of rectangular boxes in ℝⁿ. A partition of a box I in ℝⁿ (see BoxIntegral.Prepartition and BoxIntegral.Prepartition.IsPartition) is a finite set of pairwise disjoint boxes such that their union is exactly I. We use boxes : Finset (Box ι) to store the set of boxes.

Many lemmas about box integrals deal with pairwise disjoint collections of subboxes, so we define a structure BoxIntegral.Prepartition (I : BoxIntegral.Box ι) that stores a collection of boxes such that

Then we define a predicate BoxIntegral.Prepartition.IsPartition; π.IsPartition means that the boxes of π actually cover the whole I. We also define some operations on prepartitions:

We also define a SemilatticeInf structure on BoxIntegral.Prepartition I for all I : BoxIntegral.Box ι.

Tags #

rectangular box, partition

structure BoxIntegral.Prepartition {ι : Type u_1} (I : Box ι) :
Type u_1

A prepartition of I : BoxIntegral.Box ι is a finite set of pairwise disjoint subboxes of I.

Instances For
    @[instance_reducible]
    Equations
    @[simp]
    theorem BoxIntegral.Prepartition.mem_boxes {ι : Type u_1} {I J : Box ι} (π : Prepartition I) :
    J ∈ π.boxes ↔ J ∈ π
    @[simp]
    theorem BoxIntegral.Prepartition.mem_mk {ι : Type u_1} {I J : Box ι} {s : Finset (Box ι)} {h₁ : ∀ J ∈ s, J ≤ I} {h₂ : (↑s).Pairwise (Function.onFun Disjoint Box.toSet)} :
    J ∈ { boxes := s, le_of_mem' := h₁, pairwiseDisjoint := h₂ } ↔ J ∈ s
    theorem BoxIntegral.Prepartition.disjoint_coe_of_mem {ι : Type u_1} {I J₁ J₂ : Box ι} (π : Prepartition I) (h₁ : J₁ ∈ π) (h₂ : J₂ ∈ π) (h : J₁ ≠ J₂) :
    Disjoint ↑J₁ ↑J₂
    theorem BoxIntegral.Prepartition.eq_of_mem_of_mem {ι : Type u_1} {I J₁ J₂ : Box ι} (π : Prepartition I) {x : ι → ℝ} (h₁ : J₁ ∈ π) (h₂ : J₂ ∈ π) (hx₁ : x ∈ J₁) (hx₂ : x ∈ J₂) :
    J₁ = J₂
    theorem BoxIntegral.Prepartition.eq_of_le_of_le {ι : Type u_1} {I J J₁ J₂ : Box ι} (π : Prepartition I) (h₁ : J₁ ∈ π) (h₂ : J₂ ∈ π) (hle₁ : J ≤ J₁) (hle₂ : J ≤ J₂) :
    J₁ = J₂
    theorem BoxIntegral.Prepartition.eq_of_le {ι : Type u_1} {I J₁ J₂ : Box ι} (π : Prepartition I) (h₁ : J₁ ∈ π) (h₂ : J₂ ∈ π) (hle : J₁ ≤ J₂) :
    J₁ = J₂
    theorem BoxIntegral.Prepartition.le_of_mem {ι : Type u_1} {I J : Box ι} (π : Prepartition I) (hJ : J ∈ π) :
    J ≤ I
    theorem BoxIntegral.Prepartition.lower_le_lower {ι : Type u_1} {I J : Box ι} (π : Prepartition I) (hJ : J ∈ π) :
    theorem BoxIntegral.Prepartition.upper_le_upper {ι : Type u_1} {I J : Box ι} (π : Prepartition I) (hJ : J ∈ π) :
    theorem BoxIntegral.Prepartition.ext {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h : ∀ (J : Box ι), J ∈ π₁ ↔ J ∈ π₂) :
    π₁ = π₂
    theorem BoxIntegral.Prepartition.ext_iff {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} :
    π₁ = π₂ ↔ ∀ (J : Box ι), J ∈ π₁ ↔ J ∈ π₂
    def BoxIntegral.Prepartition.single {ι : Type u_1} (I J : Box ι) (h : J ≤ I) :

    The singleton prepartition {J}, J ≤ I.

    Equations
    Instances For
      @[simp]
      theorem BoxIntegral.Prepartition.single_boxes {ι : Type u_1} (I J : Box ι) (h : J ≤ I) :
      (single I J h).boxes = {J}
      @[simp]
      theorem BoxIntegral.Prepartition.mem_single {ι : Type u_1} {I J J' : Box ι} (h : J ≤ I) :
      J' ∈ single I J h ↔ J' = J
      @[instance_reducible]
      instance BoxIntegral.Prepartition.instLE {ι : Type u_1} {I : Box ι} :

      We say that π ≤ π' if each box of π is a subbox of some box of π'.

      Equations
      @[instance_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[instance_reducible]
      Equations
      @[instance_reducible]
      Equations
      @[instance_reducible]
      Equations
      theorem BoxIntegral.Prepartition.le_def {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} :
      π₁ ≤ π₂ ↔ ∀ J ∈ π₁, ∃ J' ∈ π₂, J ≤ J'
      @[simp]
      theorem BoxIntegral.Prepartition.mem_top {ι : Type u_1} {I J : Box ι} :
      J ∈ ⊤ ↔ J = I
      @[simp]
      theorem BoxIntegral.Prepartition.top_boxes {ι : Type u_1} {I : Box ι} :
      @[simp]
      theorem BoxIntegral.Prepartition.notMem_bot {ι : Type u_1} {I J : Box ι} :
      J ∉ ⊥
      @[simp]
      theorem BoxIntegral.Prepartition.injOn_setOf_mem_Icc_setOf_lower_eq {ι : Type u_1} {I : Box ι} (π : Prepartition I) (x : ι → ℝ) :
      Set.InjOn (fun (J : Box ι) => {i : ι | J.lower i = x i}) {J : Box ι | J ∈ π ∧ x ∈ Box.Icc J}

      An auxiliary lemma used to prove that the same point can't belong to more than 2 ^ Fintype.card ι closed boxes of a prepartition.

      theorem BoxIntegral.Prepartition.card_filter_mem_Icc_le {ι : Type u_1} {I : Box ι} (π : Prepartition I) [Fintype ι] (x : ι → ℝ) :
      {J ∈ π.boxes | x ∈ Box.Icc J}.card ≤ 2 ^ Fintype.card ι

      The set of boxes of a prepartition that contain x in their closures has cardinality at most 2 ^ Fintype.card ι.

      def BoxIntegral.Prepartition.iUnion {ι : Type u_1} {I : Box ι} (π : Prepartition I) :
      Set (ι → ℝ)

      Given a prepartition π : BoxIntegral.Prepartition I, π.iUnion is the part of I covered by the boxes of π.

      Equations
      Instances For
        theorem BoxIntegral.Prepartition.iUnion_def {ι : Type u_1} {I : Box ι} (π : Prepartition I) :
        π.iUnion = ⋃ J ∈ π, ↑J
        theorem BoxIntegral.Prepartition.iUnion_def' {ι : Type u_1} {I : Box ι} (π : Prepartition I) :
        π.iUnion = ⋃ J ∈ π.boxes, ↑J
        @[simp]
        theorem BoxIntegral.Prepartition.mem_iUnion {ι : Type u_1} {I : Box ι} (π : Prepartition I) {x : ι → ℝ} :
        x ∈ π.iUnion ↔ ∃ J ∈ π, x ∈ J
        @[simp]
        theorem BoxIntegral.Prepartition.iUnion_single {ι : Type u_1} {I J : Box ι} (h : J ≤ I) :
        (single I J h).iUnion = ↑J
        @[simp]
        theorem BoxIntegral.Prepartition.iUnion_top {ι : Type u_1} {I : Box ι} :
        ⊤.iUnion = ↑I
        @[simp]
        theorem BoxIntegral.Prepartition.iUnion_eq_empty {ι : Type u_1} {I : Box ι} {π₁ : Prepartition I} :
        π₁.iUnion = ∅ ↔ π₁ = ⊥
        @[simp]
        theorem BoxIntegral.Prepartition.subset_iUnion {ι : Type u_1} {I J : Box ι} (π : Prepartition I) (h : J ∈ π) :
        ↑J ⊆ π.iUnion
        theorem BoxIntegral.Prepartition.iUnion_subset {ι : Type u_1} {I : Box ι} (π : Prepartition I) :
        π.iUnion ⊆ ↑I
        theorem BoxIntegral.Prepartition.iUnion_mono {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h : π₁ ≤ π₂) :
        π₁.iUnion ⊆ π₂.iUnion
        theorem BoxIntegral.Prepartition.disjoint_boxes_of_disjoint_iUnion {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h : Disjoint π₁.iUnion π₂.iUnion) :
        Disjoint π₁.boxes π₂.boxes
        theorem BoxIntegral.Prepartition.le_iff_nonempty_imp_le_and_iUnion_subset {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} :
        π₁ ≤ π₂ ↔ (∀ J ∈ π₁, ∀ J' ∈ π₂, (↑J ∩ ↑J').Nonempty → J ≤ J') ∧ π₁.iUnion ⊆ π₂.iUnion
        theorem BoxIntegral.Prepartition.eq_of_boxes_subset_iUnion_superset {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h₁ : π₁.boxes ⊆ π₂.boxes) (h₂ : π₂.iUnion ⊆ π₁.iUnion) :
        π₁ = π₂
        noncomputable def BoxIntegral.Prepartition.biUnion {ι : Type u_1} {I : Box ι} (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) :

        Given a prepartition π of a box I and a collection of prepartitions πi J of all boxes J ∈ π, returns the prepartition of I into the union of the boxes of all πi J.

        Though we only use the values of πi on the boxes of π, we require πi to be a globally defined function.

        Equations
        Instances For
          @[simp]
          theorem BoxIntegral.Prepartition.biUnion_boxes {ι : Type u_1} {I : Box ι} (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) :
          (π.biUnion πi).boxes = π.boxes.biUnion fun (J : Box ι) => (πi J).boxes
          @[simp]
          theorem BoxIntegral.Prepartition.mem_biUnion {ι : Type u_1} {I J : Box ι} (π : Prepartition I) {πi : (J : Box ι) → Prepartition J} :
          J ∈ π.biUnion πi ↔ ∃ J' ∈ π, J ∈ πi J'
          theorem BoxIntegral.Prepartition.biUnion_le {ι : Type u_1} {I : Box ι} (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) :
          π.biUnion πi ≤ π
          @[simp]
          theorem BoxIntegral.Prepartition.biUnion_top {ι : Type u_1} {I : Box ι} (π : Prepartition I) :
          (π.biUnion fun (x : Box ι) => ⊤) = π
          theorem BoxIntegral.Prepartition.biUnion_congr {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} {πi₁ πi₂ : (J : Box ι) → Prepartition J} (h : π₁ = π₂) (hi : ∀ J ∈ π₁, πi₁ J = πi₂ J) :
          π₁.biUnion πi₁ = π₂.biUnion πi₂
          theorem BoxIntegral.Prepartition.biUnion_congr_of_le {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} {πi₁ πi₂ : (J : Box ι) → Prepartition J} (h : π₁ = π₂) (hi : ∀ J ≤ I, πi₁ J = πi₂ J) :
          π₁.biUnion πi₁ = π₂.biUnion πi₂
          @[simp]
          theorem BoxIntegral.Prepartition.iUnion_biUnion {ι : Type u_1} {I : Box ι} (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) :
          (π.biUnion πi).iUnion = ⋃ J ∈ π, (πi J).iUnion
          @[simp]
          theorem BoxIntegral.Prepartition.sum_biUnion_boxes {ι : Type u_1} {I : Box ι} {M : Type u_2} [AddCommMonoid M] (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) (f : Box ι → M) :
          ∑ J ∈ π.boxes.biUnion fun (J : Box ι) => (πi J).boxes, f J = ∑ J ∈ π.boxes, ∑ J' ∈ (πi J).boxes, f J'
          noncomputable def BoxIntegral.Prepartition.biUnionIndex {ι : Type u_1} {I : Box ι} (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) (J : Box ι) :
          Box ι

          Given a box J ∈ π.biUnion πi, returns the box J' ∈ π such that J ∈ πi J'. For J ∉ π.biUnion πi, returns I.

          Equations
          Instances For
            theorem BoxIntegral.Prepartition.biUnionIndex_mem {ι : Type u_1} {I J : Box ι} (π : Prepartition I) {πi : (J : Box ι) → Prepartition J} (hJ : J ∈ π.biUnion πi) :
            π.biUnionIndex πi J ∈ π
            theorem BoxIntegral.Prepartition.biUnionIndex_le {ι : Type u_1} {I : Box ι} (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) (J : Box ι) :
            π.biUnionIndex πi J ≤ I
            theorem BoxIntegral.Prepartition.mem_biUnionIndex {ι : Type u_1} {I J : Box ι} (π : Prepartition I) {πi : (J : Box ι) → Prepartition J} (hJ : J ∈ π.biUnion πi) :
            J ∈ πi (π.biUnionIndex πi J)
            theorem BoxIntegral.Prepartition.le_biUnionIndex {ι : Type u_1} {I J : Box ι} (π : Prepartition I) {πi : (J : Box ι) → Prepartition J} (hJ : J ∈ π.biUnion πi) :
            J ≤ π.biUnionIndex πi J
            theorem BoxIntegral.Prepartition.biUnionIndex_of_mem {ι : Type u_1} {I J : Box ι} (π : Prepartition I) {πi : (J : Box ι) → Prepartition J} (hJ : J ∈ π) {J' : Box ι} (hJ' : J' ∈ πi J) :
            π.biUnionIndex πi J' = J

            Uniqueness property of BoxIntegral.Prepartition.biUnionIndex.

            theorem BoxIntegral.Prepartition.biUnion_assoc {ι : Type u_1} {I : Box ι} (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) (πi' : Box ι → (J : Box ι) → Prepartition J) :
            (π.biUnion fun (J : Box ι) => (πi J).biUnion (πi' J)) = (π.biUnion πi).biUnion fun (J : Box ι) => πi' (π.biUnionIndex πi J) J
            def BoxIntegral.Prepartition.ofWithBot {ι : Type u_1} {I : Box ι} (boxes : Finset (WithBot (Box ι))) (le_of_mem : ∀ J ∈ boxes, J ≤ ↑I) (pairwise_disjoint : (↑boxes).Pairwise Disjoint) :

            Create a BoxIntegral.Prepartition from a collection of possibly empty boxes by filtering out the empty one if it exists.

            Equations
            Instances For
              @[simp]
              theorem BoxIntegral.Prepartition.mem_ofWithBot {ι : Type u_1} {I J : Box ι} {boxes : Finset (WithBot (Box ι))} {h₁ : ∀ J ∈ boxes, J ≤ ↑I} {h₂ : (↑boxes).Pairwise Disjoint} :
              J ∈ ofWithBot boxes h₁ h₂ ↔ ↑J ∈ boxes
              @[simp]
              theorem BoxIntegral.Prepartition.iUnion_ofWithBot {ι : Type u_1} {I : Box ι} (boxes : Finset (WithBot (Box ι))) (le_of_mem : ∀ J ∈ boxes, J ≤ ↑I) (pairwise_disjoint : (↑boxes).Pairwise Disjoint) :
              (ofWithBot boxes le_of_mem pairwise_disjoint).iUnion = ⋃ J ∈ boxes, ↑J
              theorem BoxIntegral.Prepartition.ofWithBot_le {ι : Type u_1} {I : Box ι} (π : Prepartition I) {boxes : Finset (WithBot (Box ι))} {le_of_mem : ∀ J ∈ boxes, J ≤ ↑I} {pairwise_disjoint : (↑boxes).Pairwise Disjoint} (H : ∀ J ∈ boxes, J ≠ ⊥ → ∃ J' ∈ π, J ≤ ↑J') :
              ofWithBot boxes le_of_mem pairwise_disjoint ≤ π
              theorem BoxIntegral.Prepartition.le_ofWithBot {ι : Type u_1} {I : Box ι} (π : Prepartition I) {boxes : Finset (WithBot (Box ι))} {le_of_mem : ∀ J ∈ boxes, J ≤ ↑I} {pairwise_disjoint : (↑boxes).Pairwise Disjoint} (H : ∀ J ∈ π, ∃ J' ∈ boxes, ↑J ≤ J') :
              π ≤ ofWithBot boxes le_of_mem pairwise_disjoint
              theorem BoxIntegral.Prepartition.ofWithBot_mono {ι : Type u_1} {I : Box ι} {boxes₁ : Finset (WithBot (Box ι))} {le_of_mem₁ : ∀ J ∈ boxes₁, J ≤ ↑I} {pairwise_disjoint₁ : (↑boxes₁).Pairwise Disjoint} {boxes₂ : Finset (WithBot (Box ι))} {le_of_mem₂ : ∀ J ∈ boxes₂, J ≤ ↑I} {pairwise_disjoint₂ : (↑boxes₂).Pairwise Disjoint} (H : ∀ J ∈ boxes₁, J ≠ ⊥ → ∃ J' ∈ boxes₂, J ≤ J') :
              ofWithBot boxes₁ le_of_mem₁ pairwise_disjoint₁ ≤ ofWithBot boxes₂ le_of_mem₂ pairwise_disjoint₂
              theorem BoxIntegral.Prepartition.sum_ofWithBot {ι : Type u_1} {I : Box ι} {M : Type u_2} [AddCommMonoid M] (boxes : Finset (WithBot (Box ι))) (le_of_mem : ∀ J ∈ boxes, J ≤ ↑I) (pairwise_disjoint : (↑boxes).Pairwise Disjoint) (f : Box ι → M) :
              ∑ J ∈ (ofWithBot boxes le_of_mem pairwise_disjoint).boxes, f J = ∑ J ∈ boxes, Option.elim' 0 f J
              noncomputable def BoxIntegral.Prepartition.restrict {ι : Type u_1} {I : Box ι} (π : Prepartition I) (J : Box ι) :

              Restrict a prepartition to a box.

              Equations
              Instances For
                @[simp]
                theorem BoxIntegral.Prepartition.mem_restrict {ι : Type u_1} {I J J₁ : Box ι} (π : Prepartition I) :
                J₁ ∈ π.restrict J ↔ ∃ J' ∈ π, ↑J₁ = ↑J ⊓ ↑J'
                theorem BoxIntegral.Prepartition.mem_restrict' {ι : Type u_1} {I J J₁ : Box ι} (π : Prepartition I) :
                J₁ ∈ π.restrict J ↔ ∃ J' ∈ π, ↑J₁ = ↑J ∩ ↑J'
                theorem BoxIntegral.Prepartition.restrict_mono {ι : Type u_1} {I J : Box ι} {π₁ π₂ : Prepartition I} (Hle : π₁ ≤ π₂) :
                π₁.restrict J ≤ π₂.restrict J
                theorem BoxIntegral.Prepartition.monotone_restrict {ι : Type u_1} {I J : Box ι} :
                Monotone fun (π : Prepartition I) => π.restrict J
                theorem BoxIntegral.Prepartition.restrict_boxes_of_le {ι : Type u_1} {I J : Box ι} (π : Prepartition I) (h : I ≤ J) :
                (π.restrict J).boxes = π.boxes

                Restricting to a larger box does not change the set of boxes. We cannot claim equality of prepartitions because they have different types.

                @[simp]
                theorem BoxIntegral.Prepartition.restrict_self {ι : Type u_1} {I : Box ι} (π : Prepartition I) :
                π.restrict I = π
                @[simp]
                theorem BoxIntegral.Prepartition.iUnion_restrict {ι : Type u_1} {I J : Box ι} (π : Prepartition I) :
                (π.restrict J).iUnion = ↑J ∩ π.iUnion
                @[simp]
                theorem BoxIntegral.Prepartition.restrict_biUnion {ι : Type u_1} {I J : Box ι} (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) (hJ : J ∈ π) :
                (π.biUnion πi).restrict J = πi J
                theorem BoxIntegral.Prepartition.biUnion_le_iff {ι : Type u_1} {I : Box ι} (π : Prepartition I) {πi : (J : Box ι) → Prepartition J} {π' : Prepartition I} :
                π.biUnion πi ≤ π' ↔ ∀ J ∈ π, πi J ≤ π'.restrict J
                theorem BoxIntegral.Prepartition.le_biUnion_iff {ι : Type u_1} {I : Box ι} (π : Prepartition I) {πi : (J : Box ι) → Prepartition J} {π' : Prepartition I} :
                π' ≤ π.biUnion πi ↔ π' ≤ π ∧ ∀ J ∈ π, π'.restrict J ≤ πi J
                @[instance_reducible]
                noncomputable instance BoxIntegral.Prepartition.instSemilatticeInf {ι : Type u_1} {I : Box ι} :
                Equations
                • One or more equations did not get rendered due to their size.
                theorem BoxIntegral.Prepartition.inf_def {ι : Type u_1} {I : Box ι} (π₁ π₂ : Prepartition I) :
                π₁ ⊓ π₂ = π₁.biUnion fun (J : Box ι) => π₂.restrict J
                @[simp]
                theorem BoxIntegral.Prepartition.mem_inf {ι : Type u_1} {I J : Box ι} {π₁ π₂ : Prepartition I} :
                J ∈ π₁ ⊓ π₂ ↔ ∃ J₁ ∈ π₁, ∃ J₂ ∈ π₂, ↑J = ↑J₁ ⊓ ↑J₂
                @[simp]
                theorem BoxIntegral.Prepartition.iUnion_inf {ι : Type u_1} {I : Box ι} (π₁ π₂ : Prepartition I) :
                (π₁ ⊓ π₂).iUnion = π₁.iUnion ∩ π₂.iUnion
                noncomputable def BoxIntegral.Prepartition.filter {ι : Type u_1} {I : Box ι} (π : Prepartition I) (p : Box ι → Prop) :

                The prepartition with boxes {J ∈ π | p J}.

                Equations
                • π.filter p = { boxes := {J ∈ π.boxes | p J}, le_of_mem' := ⋯, pairwiseDisjoint := ⋯ }
                Instances For
                  @[simp]
                  theorem BoxIntegral.Prepartition.filter_boxes {ι : Type u_1} {I : Box ι} (π : Prepartition I) (p : Box ι → Prop) :
                  (π.filter p).boxes = {J ∈ π.boxes | p J}
                  @[simp]
                  theorem BoxIntegral.Prepartition.mem_filter {ι : Type u_1} {I J : Box ι} (π : Prepartition I) {p : Box ι → Prop} :
                  J ∈ π.filter p ↔ J ∈ π ∧ p J
                  theorem BoxIntegral.Prepartition.filter_le {ι : Type u_1} {I : Box ι} (π : Prepartition I) (p : Box ι → Prop) :
                  π.filter p ≤ π
                  theorem BoxIntegral.Prepartition.filter_of_true {ι : Type u_1} {I : Box ι} (π : Prepartition I) {p : Box ι → Prop} (hp : ∀ J ∈ π, p J) :
                  π.filter p = π
                  @[simp]
                  theorem BoxIntegral.Prepartition.filter_true {ι : Type u_1} {I : Box ι} (π : Prepartition I) :
                  (π.filter fun (x : Box ι) => True) = π
                  @[simp]
                  theorem BoxIntegral.Prepartition.iUnion_filter_not {ι : Type u_1} {I : Box ι} (π : Prepartition I) (p : Box ι → Prop) :
                  (π.filter fun (J : Box ι) => ¬p J).iUnion = π.iUnion \ (π.filter p).iUnion
                  theorem BoxIntegral.Prepartition.sum_fiberwise {ι : Type u_1} {I : Box ι} {α : Type u_2} {M : Type u_3} [AddCommMonoid M] (π : Prepartition I) (f : Box ι → α) (g : Box ι → M) :
                  ∑ y ∈ Finset.image f π.boxes, ∑ J ∈ (π.filter fun (J : Box ι) => f J = y).boxes, g J = ∑ J ∈ π.boxes, g J
                  noncomputable def BoxIntegral.Prepartition.disjUnion {ι : Type u_1} {I : Box ι} (π₁ π₂ : Prepartition I) (h : Disjoint π₁.iUnion π₂.iUnion) :

                  Union of two disjoint prepartitions.

                  Equations
                  Instances For
                    @[simp]
                    theorem BoxIntegral.Prepartition.disjUnion_boxes {ι : Type u_1} {I : Box ι} (π₁ π₂ : Prepartition I) (h : Disjoint π₁.iUnion π₂.iUnion) :
                    (π₁.disjUnion π₂ h).boxes = π₁.boxes ∪ π₂.boxes
                    @[simp]
                    theorem BoxIntegral.Prepartition.mem_disjUnion {ι : Type u_1} {I J : Box ι} {π₁ π₂ : Prepartition I} (H : Disjoint π₁.iUnion π₂.iUnion) :
                    J ∈ π₁.disjUnion π₂ H ↔ J ∈ π₁ ∨ J ∈ π₂
                    @[simp]
                    theorem BoxIntegral.Prepartition.iUnion_disjUnion {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h : Disjoint π₁.iUnion π₂.iUnion) :
                    (π₁.disjUnion π₂ h).iUnion = π₁.iUnion ∪ π₂.iUnion
                    @[simp]
                    theorem BoxIntegral.Prepartition.sum_disj_union_boxes {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} {M : Type u_2} [AddCommMonoid M] (h : Disjoint π₁.iUnion π₂.iUnion) (f : Box ι → M) :
                    ∑ J ∈ π₁.boxes ∪ π₂.boxes, f J = ∑ J ∈ π₁.boxes, f J + ∑ J ∈ π₂.boxes, f J
                    noncomputable def BoxIntegral.Prepartition.distortion {ι : Type u_1} {I : Box ι} (π : Prepartition I) [Fintype ι] :

                    The distortion of a prepartition is the maximum of the distortions of the boxes of this prepartition.

                    Equations
                    Instances For
                      theorem BoxIntegral.Prepartition.distortion_le_of_mem {ι : Type u_1} {I J : Box ι} (π : Prepartition I) [Fintype ι] (h : J ∈ π) :
                      theorem BoxIntegral.Prepartition.distortion_le_iff {ι : Type u_1} {I : Box ι} (π : Prepartition I) [Fintype ι] {c : NNReal} :
                      π.distortion ≤ c ↔ ∀ J ∈ π, J.distortion ≤ c
                      theorem BoxIntegral.Prepartition.distortion_biUnion {ι : Type u_1} {I : Box ι} [Fintype ι] (π : Prepartition I) (πi : (J : Box ι) → Prepartition J) :
                      (π.biUnion πi).distortion = π.boxes.sup fun (J : Box ι) => (πi J).distortion
                      @[simp]
                      theorem BoxIntegral.Prepartition.distortion_disjUnion {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} [Fintype ι] (h : Disjoint π₁.iUnion π₂.iUnion) :
                      (π₁.disjUnion π₂ h).distortion = max π₁.distortion π₂.distortion
                      theorem BoxIntegral.Prepartition.distortion_of_const {ι : Type u_1} {I : Box ι} (π : Prepartition I) [Fintype ι] {c : NNReal} (h₁ : π.boxes.Nonempty) (h₂ : ∀ J ∈ π, J.distortion = c) :
                      @[simp]

                      A prepartition π of I is a partition if the boxes of π cover the whole I.

                      Equations
                      Instances For
                        @[simp]
                        theorem BoxIntegral.Prepartition.isPartition_single_iff {ι : Type u_1} {I J : Box ι} (h : J ≤ I) :
                        (single I J h).IsPartition ↔ J = I
                        theorem BoxIntegral.Prepartition.IsPartition.iUnion_eq {ι : Type u_1} {I : Box ι} {π : Prepartition I} (h : π.IsPartition) :
                        π.iUnion = ↑I
                        theorem BoxIntegral.Prepartition.IsPartition.iUnion_subset {ι : Type u_1} {I : Box ι} {π : Prepartition I} (h : π.IsPartition) (π₁ : Prepartition I) :
                        π₁.iUnion ⊆ π.iUnion
                        theorem BoxIntegral.Prepartition.IsPartition.existsUnique {ι : Type u_1} {I : Box ι} {π : Prepartition I} {x : ι → ℝ} (h : π.IsPartition) (hx : x ∈ I) :
                        ∃! J : Box ι, J ∈ π ∧ x ∈ J
                        theorem BoxIntegral.Prepartition.IsPartition.eq_of_boxes_subset {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h₁ : π₁.IsPartition) (h₂ : π₁.boxes ⊆ π₂.boxes) :
                        π₁ = π₂
                        theorem BoxIntegral.Prepartition.IsPartition.le_iff {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h : π₂.IsPartition) :
                        π₁ ≤ π₂ ↔ ∀ J ∈ π₁, ∀ J' ∈ π₂, (↑J ∩ ↑J').Nonempty → J ≤ J'
                        theorem BoxIntegral.Prepartition.IsPartition.biUnion {ι : Type u_1} {I : Box ι} {π : Prepartition I} {πi : (J : Box ι) → Prepartition J} (h : π.IsPartition) (hi : ∀ J ∈ π, (πi J).IsPartition) :
                        theorem BoxIntegral.Prepartition.IsPartition.restrict {ι : Type u_1} {I J : Box ι} {π : Prepartition I} (h : π.IsPartition) (hJ : J ≤ I) :
                        theorem BoxIntegral.Prepartition.IsPartition.inf {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h₁ : π₁.IsPartition) (h₂ : π₂.IsPartition) :
                        (π₁ ⊓ π₂).IsPartition
                        theorem BoxIntegral.Prepartition.iUnion_biUnion_partition {ι : Type u_1} {I : Box ι} (π : Prepartition I) {πi : (J : Box ι) → Prepartition J} (h : ∀ J ∈ π, (πi J).IsPartition) :
                        (π.biUnion πi).iUnion = π.iUnion
                        theorem BoxIntegral.Prepartition.isPartitionDisjUnionOfEqDiff {ι : Type u_1} {I : Box ι} {π₁ π₂ : Prepartition I} (h : π₂.iUnion = ↑I \ π₁.iUnion) :
                        (π₁.disjUnion π₂ ⋯).IsPartition