Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Box intersected with the ordered simplex

Definition
LL_Decomp587l_domain

by sthubbar · Nov 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

For n∈Nn\in\mathbb Nn∈N and vectors ℓ,h∈Rn\ell,h\in\mathbb R^nℓ,h∈Rn, indexed by {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}, the set of x∈Rnx\in\mathbb R^nx∈Rn that are monotone, meaning xi≤xjx_i\le x_jxi​≤xj​ whenever i≤ji\le ji≤j, and satisfy ℓj≤xj≤hj\ell_j\le x_j\le h_jℓj​≤xj​≤hj​ for every jjj.

Definition code
import Mathlib

open Real Set MeasureTheory
open scoped Classical

namespace LL_Decomp587l

def domain {n : ℕ} (lo hi : Fin n → ℝ) : Set (Fin n → ℝ) :=
  {x | Monotone x ∧ ∀ j, lo j ≤ x j ∧ x j ≤ hi j}

end LL_Decomp587l
Read-back

What the Lean code literally says, in plain math · claude-haiku

Definition domain (namespace LL_Decomp587l, with open Real Set MeasureTheory and open scoped Classical).

For a natural number nnn and two families of real numbers lo,hi:Fin(n)→R\mathrm{lo}, \mathrm{hi} : \mathrm{Fin}(n) \to \mathbb{R}lo,hi:Fin(n)→R, the definition returns the subset of Rn\mathbb{R}^nRn

domain(lo,hi)={x=(x0,…,xn−1)∈Rn  :  x0≤x1≤⋯≤xn−1 and loj≤xj≤hij for every j}.\mathrm{domain}(\mathrm{lo}, \mathrm{hi}) = \left\{ x = (x_0, \dots, x_{n-1}) \in \mathbb{R}^n \;:\; x_0 \le x_1 \le \cdots \le x_{n-1} \text{ and } \mathrm{lo}_j \le x_j \le \mathrm{hi}_j \text{ for every } j \right\}.domain(lo,hi)={x=(x0​,…,xn−1​)∈Rn:x0​≤x1​≤⋯≤xn−1​ and loj​≤xj​≤hij​ for every j}.

So it is the set of non-decreasing tuples whose jjj-th coordinate lies in the closed interval [loj,hij][\mathrm{lo}_j, \mathrm{hi}_j][loj​,hij​]. The first condition is Monotone x, which for a function on the finite ordered type Fin n means xi≤xkx_i \le x_kxi​≤xk​ whenever i≤ki \le ki≤k.

Concerns. The set is a closed, bounded subset of Rn\mathbb{R}^nRn, so when it is nonempty it has finite Lebesgue measure. It is nonempty only when loj≤hij\mathrm{lo}_j \le \mathrm{hi}_jloj​≤hij​ for each jjj, and the monotone condition is compatible with the box. If the box is incompatible with monotonicity (for example hi0<lo1\mathrm{hi}_0 < \mathrm{lo}_1hi0​<lo1​), the set is empty and any integral over it is 000. The definition does not exclude coordinates equal to 000, so a consumer that divides by coordinates needs the box to avoid 000 separately; this file does not do that. The definition is not vacuous in general, but whether a particular choice of lo\mathrm{lo}lo and hi\mathrm{hi}hi gives a nonempty region, or one avoiding 000, is a property of the caller's data and is not checked here.

Human review
  • Endorsed by Shuze Chen · Nov 18, 2026

    Confirmed by the moderator at approval.

  • Endorsed by sthubbar · Nov 18, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me