Split a box along one or more hyperplanes #
Main definitions #
A hyperplane {x : ι → ℝ | x i = a}
splits a rectangular box I : BoxIntegral.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 BoxIntegral.Box
.
We introduce the following definitions.
BoxIntegral.Box.splitLower I i a
andBoxIntegral.Box.splitUpper I i a
are these boxes (asWithBot (BoxIntegral.Box ι)
);BoxIntegral.Prepartition.split I i a
is the partition ofI
made of these two boxes (or of one boxI
if one of these boxes is empty);BoxIntegral.Prepartition.splitMany I s
, wheres : Finset (ι × ℝ)
is a finite set of hyperplanes{x : ι → ℝ | x i = a}
encoded as pairs(i, a)
, is the partition ofI
made by cutting it along all the hyperplanes ins
.
Main results #
The main result BoxIntegral.Prepartition.exists_iUnion_eq_diff
says that any prepartition π
of
I
admits a prepartition π'
of I
that covers exactly I \ π.iUnion
. One of these prepartitions
is available as BoxIntegral.Prepartition.compl
.
Tags #
rectangular box, partition, hyperplane
Given a box I
and x ∈ (I.lower i, I.upper i)
, the hyperplane {y : ι → ℝ | y i = x}
splits
I
into two boxes. BoxIntegral.Box.splitLower 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
WithBot (BoxIntegral.Box ι)
.
Equations
- BoxIntegral.Box.splitLower I i x = BoxIntegral.Box.mk' I.lower (Function.update I.upper i (min x (I.upper i)))
Instances For
Given a box I
and x ∈ (I.lower i, I.upper i)
, the hyperplane {y : ι → ℝ | y i = x}
splits
I
into two boxes. BoxIntegral.Box.splitUpper 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
WithBot (BoxIntegral.Box ι)
.
Equations
- BoxIntegral.Box.splitUpper I i x = BoxIntegral.Box.mk' (Function.update I.lower i (max x (I.lower i))) I.upper
Instances For
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
Instances For
If x ∉ (I.lower i, I.upper i)
, then the hyperplane {y | y i = x}
does not split I
.
Split a box along many hyperplanes {y | y i = x}
; each hyperplane is given by the pair
(i x)
.
Equations
- BoxIntegral.Prepartition.splitMany I s = Finset.inf s fun (p : ι × ℝ) => BoxIntegral.Prepartition.split I p.1 p.2
Instances For
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
.
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
.
If π
is a partition of I
, then there exists a finite set s
of hyperplanes such that
splitMany I s ≤ π
.
For every prepartition π
of I
there exists a prepartition that covers exactly
I \ π.iUnion
.
If π
is a prepartition of I
, then π.compl
is a prepartition of I
such that π.compl.iUnion = I \ π.iUnion
.
Equations
Instances For
Since the definition of BoxIntegral.Prepartition.compl
uses Exists.choose
,
the result depends only on π.iUnion
.