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
- each box
J ∈ boxes
is a subbox ofI
; - the boxes are pairwise disjoint as sets in
ℝⁿ
.
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:
BoxIntegral.Prepartition.biUnion
: split each box of a partition into smaller boxes;BoxIntegral.Prepartition.restrict
: restrict a partition to a smaller box.
We also define a SemilatticeInf
structure on BoxIntegral.Prepartition I
for all
I : BoxIntegral.Box ι
.
Tags #
rectangular box, partition
A prepartition of I : BoxIntegral.Box ι
is a finite set of pairwise disjoint subboxes of
I
.
- boxes : Finset (BoxIntegral.Box ι)
- le_of_mem' : ∀ J ∈ self.boxes, J ≤ I
- pairwiseDisjoint : Set.Pairwise (↑self.boxes) (Disjoint on BoxIntegral.Box.toSet)
Instances For
Equations
- BoxIntegral.Prepartition.instMembershipBoxPrepartition = { mem := fun (J : BoxIntegral.Box ι) (π : BoxIntegral.Prepartition I) => J ∈ π.boxes }
The singleton prepartition {J}
, J ≤ I
.
Equations
- BoxIntegral.Prepartition.single I J h = { boxes := {J}, le_of_mem' := ⋯, pairwiseDisjoint := ⋯ }
Instances For
We say that π ≤ π'
if each box of π
is a subbox of some box of π'
.
Equations
- BoxIntegral.Prepartition.instLEPrepartition = { le := fun (π π' : BoxIntegral.Prepartition I) => ∀ ⦃I_1 : BoxIntegral.Box ι⦄, I_1 ∈ π → ∃ I' ∈ π', I_1 ≤ I' }
Equations
- BoxIntegral.Prepartition.partialOrder = PartialOrder.mk ⋯
Equations
- BoxIntegral.Prepartition.instOrderTopPrepartitionInstLEPrepartition = OrderTop.mk ⋯
Equations
- BoxIntegral.Prepartition.instOrderBotPrepartitionInstLEPrepartition = OrderBot.mk ⋯
An auxiliary lemma used to prove that the same point can't belong to more than
2 ^ Fintype.card ι
closed boxes of a prepartition.
The set of boxes of a prepartition that contain x
in their closures has cardinality
at most 2 ^ Fintype.card ι
.
Given a prepartition π : BoxIntegral.Prepartition I
, π.iUnion
is the part of I
covered by
the boxes of π
.
Equations
- BoxIntegral.Prepartition.iUnion π = ⋃ J ∈ π, ↑J
Instances For
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
- BoxIntegral.Prepartition.biUnion π πi = { boxes := Finset.biUnion π.boxes fun (J : BoxIntegral.Box ι) => (πi J).boxes, le_of_mem' := ⋯, pairwiseDisjoint := ⋯ }
Instances For
Given a box J ∈ π.biUnion πi
, returns the box J' ∈ π
such that J ∈ πi J'
.
For J ∉ π.biUnion πi
, returns I
.
Equations
- BoxIntegral.Prepartition.biUnionIndex π πi J = if hJ : J ∈ BoxIntegral.Prepartition.biUnion π πi then Exists.choose ⋯ else I
Instances For
Uniqueness property of BoxIntegral.Prepartition.biUnionIndex
.
Create a BoxIntegral.Prepartition
from a collection of possibly empty boxes by filtering out
the empty one if it exists.
Equations
- BoxIntegral.Prepartition.ofWithBot boxes le_of_mem pairwise_disjoint = { boxes := Finset.eraseNone boxes, le_of_mem' := ⋯, pairwiseDisjoint := ⋯ }
Instances For
Restrict a prepartition to a box.
Equations
- BoxIntegral.Prepartition.restrict π J = BoxIntegral.Prepartition.ofWithBot (Finset.image (fun (J' : BoxIntegral.Box ι) => ↑J ⊓ ↑J') π.boxes) ⋯ ⋯
Instances For
Restricting to a larger box does not change the set of boxes. We cannot claim equality of prepartitions because they have different types.
Equations
- One or more equations did not get rendered due to their size.
Equations
- BoxIntegral.Prepartition.instSemilatticeInfPrepartition = let __src := BoxIntegral.Prepartition.inf; let __src_1 := BoxIntegral.Prepartition.partialOrder; SemilatticeInf.mk ⋯ ⋯ ⋯
The prepartition with boxes {J ∈ π | p J}
.
Equations
- BoxIntegral.Prepartition.filter π p = { boxes := Finset.filter p π.boxes, le_of_mem' := ⋯, pairwiseDisjoint := ⋯ }
Instances For
Union of two disjoint prepartitions.
Equations
- BoxIntegral.Prepartition.disjUnion π₁ π₂ h = { boxes := π₁.boxes ∪ π₂.boxes, le_of_mem' := ⋯, pairwiseDisjoint := ⋯ }
Instances For
The distortion of a prepartition is the maximum of the distortions of the boxes of this prepartition.
Equations
- BoxIntegral.Prepartition.distortion π = Finset.sup π.boxes BoxIntegral.Box.distortion
Instances For
A prepartition π
of I
is a partition if the boxes of π
cover the whole I
.
Equations
- BoxIntegral.Prepartition.IsPartition π = ∀ x ∈ I, ∃ J ∈ π, x ∈ J