# mathlibdocumentation

analysis.box_integral.partition.split

# Split a box along one or more hyperplanes #

## Main definitions #

A hyperplane {x : ι → ℝ | x i = a} splits a rectangular box I : box_integral.box ι into two smaller boxes. If a ∉ Ioo (I.lower i, I.upper i), then one of these boxes is empty, so it is not a box in the sense of box_integral.box.

We introduce the following definitions.

• box_integral.box.split_lower I i a and box_integral.box.split_upper I i a are these boxes (as with_bot (box_integral.box ι));
• box_integral.prepartition.split I i a is the partition of I made of these two boxes (or of one box I if one of these boxes is empty);
• box_integral.prepartition.split_many I s, where s : finset (ι × ℝ) is a finite set of hyperplanes {x : ι → ℝ | x i = a} encoded as pairs (i, a), is the partition of I made by cutting it along all the hyperplanes in s.

## Main results #

The main result box_integral.prepartition.exists_Union_eq_diff says that any prepartition π of I admits a prepartition π' of I that covers exactly I \ π.Union. One of these prepartitions is available as box_integral.prepartition.compl.

## Tags #

rectangular box, partition, hyperplane

noncomputable def box_integral.box.split_lower {ι : Type u_1} (I : box_integral.box ι) (i : ι) (x : ) :

Given a box I and x ∈ (I.lower i, I.upper i), the hyperplane {y : ι → ℝ | y i = x} splits I into two boxes. box_integral.box.split_lower I i x is the box I ∩ {y | y i ≤ x} (if it is nonempty). As usual, we represent a box that may be empty as with_bot (box_integral.box ι).

Equations
@[simp]
theorem box_integral.box.coe_split_lower {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } :
(I.split_lower i x) = I {y : ι → | y i x}
theorem box_integral.box.split_lower_le {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } :
@[simp]
theorem box_integral.box.split_lower_eq_bot {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } :
@[simp]
theorem box_integral.box.split_lower_eq_self {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } :
I.split_lower i x = I I.upper i x
theorem box_integral.box.split_lower_def {ι : Type u_1} {I : box_integral.box ι} [decidable_eq ι] {i : ι} {x : } (h : x set.Ioo (I.lower i) (I.upper i)) (h' : (∀ (j : ι), I.lower j < x j) := _) :
I.split_lower i x = {lower := I.lower, upper := x, lower_lt_upper := h'}
noncomputable def box_integral.box.split_upper {ι : Type u_1} (I : box_integral.box ι) (i : ι) (x : ) :

Given a box I and x ∈ (I.lower i, I.upper i), the hyperplane {y : ι → ℝ | y i = x} splits I into two boxes. box_integral.box.split_upper I i x is the box I ∩ {y | x < y i} (if it is nonempty). As usual, we represent a box that may be empty as with_bot (box_integral.box ι).

Equations
@[simp]
theorem box_integral.box.coe_split_upper {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } :
(I.split_upper i x) = I {y : ι → | x < y i}
theorem box_integral.box.split_upper_le {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } :
@[simp]
theorem box_integral.box.split_upper_eq_bot {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } :
@[simp]
theorem box_integral.box.split_upper_eq_self {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } :
I.split_upper i x = I x I.lower i
theorem box_integral.box.split_upper_def {ι : Type u_1} {I : box_integral.box ι} [decidable_eq ι] {i : ι} {x : } (h : x set.Ioo (I.lower i) (I.upper i)) (h' : (∀ (j : ι), x j < I.upper j) := _) :
I.split_upper i x = {lower := x, upper := I.upper, lower_lt_upper := h'}
theorem box_integral.box.disjoint_split_lower_split_upper {ι : Type u_1} (I : box_integral.box ι) (i : ι) (x : ) :
theorem box_integral.box.split_lower_ne_split_upper {ι : Type u_1} (I : box_integral.box ι) (i : ι) (x : ) :
noncomputable def box_integral.prepartition.split {ι : Type u_1} (I : box_integral.box ι) (i : ι) (x : ) :

The partition of I : box ι into the boxes I ∩ {y | y ≤ x i} and I ∩ {y | x i < y}. One of these boxes can be empty, then this partition is just the single-box partition ⊤.

Equations
@[simp]
theorem box_integral.prepartition.mem_split_iff {ι : Type u_1} {I J : box_integral.box ι} {i : ι} {x : } :
theorem box_integral.prepartition.mem_split_iff' {ι : Type u_1} {I J : box_integral.box ι} {i : ι} {x : } :
J = I {y : ι → | y i x} J = I {y : ι → | x < y i}
@[simp]
theorem box_integral.prepartition.Union_split {ι : Type u_1} (I : box_integral.box ι) (i : ι) (x : ) :
theorem box_integral.prepartition.is_partition_split {ι : Type u_1} (I : box_integral.box ι) (i : ι) (x : ) :
theorem box_integral.prepartition.sum_split_boxes {ι : Type u_1} {M : Type u_2} (I : box_integral.box ι) (i : ι) (x : ) (f : → M) :
∑ (J : in .boxes, f J = option.elim (I.split_lower i x) 0 f + option.elim (I.split_upper i x) 0 f
theorem box_integral.prepartition.split_of_not_mem_Ioo {ι : Type u_1} {I : box_integral.box ι} {i : ι} {x : } (h : x set.Ioo (I.lower i) (I.upper i)) :

If x ∉ (I.lower i, I.upper i), then the hyperplane {y | y i = x} does not split I.

theorem box_integral.prepartition.coe_eq_of_mem_split_of_mem_le {ι : Type u_1} {I J : box_integral.box ι} {i : ι} {x : } {y : ι → } (h₁ : J ) (h₂ : y J) (h₃ : y i x) :
J = I {y : ι → | y i x}
theorem box_integral.prepartition.coe_eq_of_mem_split_of_lt_mem {ι : Type u_1} {I J : box_integral.box ι} {i : ι} {x : } {y : ι → } (h₁ : J ) (h₂ : y J) (h₃ : x < y i) :
J = I {y : ι → | x < y i}
@[simp]
theorem box_integral.prepartition.restrict_split {ι : Type u_1} {I J : box_integral.box ι} (h : I J) (i : ι) (x : ) :
theorem box_integral.prepartition.inf_split {ι : Type u_1} {I : box_integral.box ι} (i : ι) (x : ) :
«π» = «π».bUnion (λ (J : ,
noncomputable def box_integral.prepartition.split_many {ι : Type u_1} (I : box_integral.box ι) (s : finset × )) :

Split a box along many hyperplanes {y | y i = x}; each hyperplane is given by the pair (i x).

Equations
@[simp]
theorem box_integral.prepartition.split_many_empty {ι : Type u_1} (I : box_integral.box ι) :
@[simp]
theorem box_integral.prepartition.split_many_insert {ι : Type u_1} (I : box_integral.box ι) (s : finset × )) (p : ι × ) :
theorem box_integral.prepartition.split_many_le_split {ι : Type u_1} (I : box_integral.box ι) {s : finset × )} {p : ι × } (hp : p s) :
@[simp]
theorem box_integral.prepartition.Union_split_many {ι : Type u_1} (I : box_integral.box ι) (s : finset × )) :
theorem box_integral.prepartition.inf_split_many {ι : Type u_1} {I : box_integral.box ι} (s : finset × )) :
= «π».bUnion (λ (J : ,
theorem box_integral.prepartition.not_disjoint_imp_le_of_subset_of_mem_split_many {ι : Type u_1} {I J Js : box_integral.box ι} {s : finset × )} (H : ∀ (i : ι), {(i, J.lower i), (i, J.upper i)} s) (HJs : Js ) (Hn : ¬ Js) :
Js J

Let s : finset (ι × ℝ) be a set of hyperplanes {x : ι → ℝ | x i = r} in ι → ℝ encoded as pairs (i, r). Suppose that this set contains all faces of a box J. The hyperplanes of s split a box I into subboxes. Let Js be one of them. If J and Js have nonempty intersection, then Js is a subbox of J.

theorem box_integral.prepartition.eventually_not_disjoint_imp_le_of_mem_split_many {ι : Type u_1} [fintype ι] (s : finset ) :
∀ᶠ (t : finset × )) in filter.at_top, ∀ (I J : , J s∀ (J' : , ¬ J'J' J

Let s be a finite set of boxes in ℝⁿ = ι → ℝ. Then there exists a finite set t₀ of hyperplanes (namely, the set of all hyperfaces of boxes in s) such that for any t ⊇ t₀ and any box I in ℝⁿ the following holds. The hyperplanes from t split I into subboxes. Let J' be one of them, and let J be one of the boxes in s. If these boxes have a nonempty intersection, then J' ≤ J.

theorem box_integral.prepartition.eventually_split_many_inf_eq_filter {ι : Type u_1} {I : box_integral.box ι} [fintype ι]  :
∀ᶠ (t : finset × )) in filter.at_top, = (λ (J : , J «π».Union)
theorem box_integral.prepartition.exists_split_many_inf_eq_filter_of_finite {ι : Type u_1} {I : box_integral.box ι} [fintype ι] (s : set ) (hs : s.finite) :
∃ (t : finset × )), ∀ («π» : , «π» s = (λ (J : , J «π».Union)
theorem box_integral.prepartition.is_partition.exists_split_many_le {ι : Type u_1} [fintype ι] {I : box_integral.box ι} (h : «π».is_partition) :
∃ (s : finset × )),

If π is a partition of I, then there exists a finite set s of hyperplanes such that split_many I s ≤ π.

theorem box_integral.prepartition.exists_Union_eq_diff {ι : Type u_1} {I : box_integral.box ι} [fintype ι]  :
∃ (π' : , π'.Union = I \ «π».Union

For every prepartition π of I there exists a prepartition that covers exactly I \ π.Union.

noncomputable def box_integral.prepartition.compl {ι : Type u_1} {I : box_integral.box ι} [fintype ι]  :

If π is a prepartition of I, then π.compl is a prepartition of I such that π.compl.Union = I \ π.Union.

Equations
@[simp]
theorem box_integral.prepartition.Union_compl {ι : Type u_1} {I : box_integral.box ι} [fintype ι]  :
«π».compl.Union = I \ «π».Union
theorem box_integral.prepartition.compl_congr {ι : Type u_1} {I : box_integral.box ι} [fintype ι] {π₁ π₂ : box_integral.prepartition I} (h : π₁.Union = π₂.Union) :
π₁.compl = π₂.compl

Since the definition of box_integral.prepartition.compl uses Exists.some, the result depends only on π.Union.

theorem box_integral.prepartition.is_partition.compl_eq_bot {ι : Type u_1} {I : box_integral.box ι} [fintype ι] (h : «π».is_partition) :
«π».compl =
@[simp]
theorem box_integral.prepartition.compl_top {ι : Type u_1} {I : box_integral.box ι} [fintype ι] :