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:
- coercion to
Set (ι → ℝ)
andMembership (ι → ℝ) (BoxIntegral.Box ι)
as described above; PartialOrder
andSemilatticeSup
instances such thatI ≤ J
is equivalent to(I : Set (ι → ℝ)) ⊆ J
;Lattice
instances onWithBot (BoxIntegral.Box ι)
;BoxIntegral.Box.Icc
: the closed boxSet.Icc I.lower I.upper
; defined as a bundled monotone map fromBox ι
toSet (ι → ℝ)
;BoxIntegral.Box.face I i : Box (Fin n)
: a hyperface ofI : BoxIntegral.Box (Fin (n + 1))
;BoxIntegral.Box.distortion
: the maximal ratio of two lengths of edges of a box; defined as the supremum ofnndist I.lower I.upper / nndist (I.lower i) (I.upper i)
.
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 #
Equations
- BoxIntegral.Box.instMembershipForAllRealBox = { mem := fun (x : ι → ℝ) (I : BoxIntegral.Box ι) => ∀ (i : ι), x i ∈ Set.Ioc (I.lower i) (I.upper i) }
Instances For
Equations
- BoxIntegral.Box.instCoeTCBoxSetForAllReal = { coe := BoxIntegral.Box.toSet }
Equations
- BoxIntegral.Box.instLEBox = { le := fun (I J : BoxIntegral.Box ι) => ∀ ⦃x : ι → ℝ⦄, x ∈ I → x ∈ J }
Equations
- One or more equations did not get rendered due to their size.
Closed box corresponding to I : BoxIntegral.Box ι
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
WithBot (Box ι)
#
In this section we define coercion from WithBot (Box ι)
to Set (ι → ℝ)
by sending ⊥
to ∅
.
Equations
- ↑o = Option.elim o ∅ BoxIntegral.Box.toSet
Instances For
Equations
- BoxIntegral.Box.withBotCoe = { coe := BoxIntegral.Box.withBotToSet }
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
- BoxIntegral.Box.mk' l u = if h : ∀ (i : ι), l i < u i then ↑{ lower := l, upper := u, lower_lt_upper := h } else ⊥
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Face of a box in ℝⁿ⁺¹ = Fin (n + 1) → ℝ
: the box in ℝⁿ = Fin n → ℝ
with corners at
I.lower ∘ Fin.succAbove i
and I.upper ∘ Fin.succAbove i
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Covering of the interior of a box by a monotone sequence of smaller boxes #
The interior of a box.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
- BoxIntegral.Box.distortion I = Finset.sup Finset.univ fun (i : ι) => nndist I.lower I.upper / nndist (I.lower i) (I.upper i)