File: Mathlib/Analysis/BoxIntegral/Box/Basic.lean

full_name: BoxIntegral.Box.lower
code: /-- A nontrivial rectangular box in `ι → ℝ` with corners `lower` and `upper`. Represents the product
of half-open intervals `(lower i, upper i]`. -/
structure Box (ι : Type*) where
  /-- coordinates of the lower and upper corners of the box -/
  (lower upper : ι → ℝ)
  /-- Each lower coordinate is less than its upper coordinate: i.e., the box is non-empty -/
  lower_lt_upper : ∀ i, lower i < upper i
goal: ι → ℝ

full_name: BoxIntegral.Box
code: /-- A nontrivial rectangular box in `ι → ℝ` with corners `lower` and `upper`. Represents the product
of half-open intervals `(lower i, upper i]`. -/
structure Box (ι : Type*) where
  /-- coordinates of the lower and upper corners of the box -/
  (lower upper : ι → ℝ)
  /-- Each lower coordinate is less than its upper coordinate: i.e., the box is non-empty -/
  lower_lt_upper : ∀ i, lower i < upper i
goal: Type u_2

full_name: BoxIntegral.Box.lower_lt_upper
code: /-- A nontrivial rectangular box in `ι → ℝ` with corners `lower` and `upper`. Represents the product
of half-open intervals `(lower i, upper i]`. -/
structure Box (ι : Type*) where
  /-- coordinates of the lower and upper corners of the box -/
  (lower upper : ι → ℝ)
  /-- Each lower coordinate is less than its upper coordinate: i.e., the box is non-empty -/
  lower_lt_upper : ∀ i, lower i < upper i
goal: self.lower i < self.upper i

full_name: BoxIntegral.Box.upper
code: /-- A nontrivial rectangular box in `ι → ℝ` with corners `lower` and `upper`. Represents the product
of half-open intervals `(lower i, upper i]`. -/
structure Box (ι : Type*) where
  /-- coordinates of the lower and upper corners of the box -/
  (lower upper : ι → ℝ)
  /-- Each lower coordinate is less than its upper coordinate: i.e., the box is non-empty -/
  lower_lt_upper : ∀ i, lower i < upper i
goal: ι → ℝ

full_name: BoxIntegral.Box.instInhabited
code: instance : Inhabited (Box ι) 
goal: Inhabited (BoxIntegral.Box ι)

full_name: BoxIntegral.Box.lower_le_upper
code: theorem lower_le_upper : I.lower ≤ I.upper 
goal: I.lower ≤ I.upper

full_name: BoxIntegral.Box.lower_ne_upper
code: theorem lower_ne_upper (i) : I.lower i ≠ I.upper i 
goal: I.lower i ≠ I.upper i

full_name: BoxIntegral.Box.instMembershipForallReal
code: instance : Membership (ι → ℝ) (Box ι) 
goal: Membership (ι → ℝ) (BoxIntegral.Box ι)

full_name: BoxIntegral.Box.toSet
code: /-- The set of points in this box: this is the product of half-open intervals `(lower i, upper i]`,
where `lower` and `upper` are this box' corners. -/
@[coe]
def toSet (I : Box ι) : Set (ι → ℝ) 
goal: Set (ι → ℝ)

full_name: BoxIntegral.Box.instCoeTCSetForallReal
code: instance : CoeTC (Box ι) (Set <| ι → ℝ) 
goal: CoeTC (BoxIntegral.Box ι) (Set (ι → ℝ))

full_name: BoxIntegral.Box.mem_mk
code: @[simp]
theorem mem_mk {l u x : ι → ℝ} {H} : x ∈ mk l u H ↔ ∀ i, x i ∈ Ioc (l i) (u i) 
goal: x ∈ { lower := l, upper := u, lower_lt_upper := H } ↔ ∀ (i : ι), x i ∈ Set.Ioc (l i) (u i)

full_name: BoxIntegral.Box.mem_coe
code: @[simp, norm_cast]
theorem mem_coe : x ∈ (I : Set (ι → ℝ)) ↔ x ∈ I 
goal: x ∈ ↑I ↔ x ∈ I

full_name: BoxIntegral.Box.mem_def
code: theorem mem_def : x ∈ I ↔ ∀ i, x i ∈ Ioc (I.lower i) (I.upper i) 
goal: x ∈ I ↔ ∀ (i : ι), x i ∈ Set.Ioc (I.lower i) (I.upper i)

full_name: BoxIntegral.Box.mem_univ_Ioc
code: theorem mem_univ_Ioc {I : Box ι} : (x ∈ pi univ fun i ↦ Ioc (I.lower i) (I.upper i)) ↔ x ∈ I 
goal: (x ∈ Set.univ.pi fun i => Set.Ioc (I.lower i) (I.upper i)) ↔ x ∈ I

full_name: BoxIntegral.Box.coe_eq_pi
code: theorem coe_eq_pi : (I : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (I.lower i) (I.upper i) 
goal: ↑I = Set.univ.pi fun i => Set.Ioc (I.lower i) (I.upper i)

full_name: BoxIntegral.Box.upper_mem
code: @[simp]
theorem upper_mem : I.upper ∈ I 
goal: I.upper ∈ I

full_name: BoxIntegral.Box.exists_mem
code: theorem exists_mem : ∃ x, x ∈ I 
goal: ∃ x, x ∈ I

full_name: BoxIntegral.Box.nonempty_coe
code: theorem nonempty_coe : Set.Nonempty (I : Set (ι → ℝ)) 
goal: (↑I).Nonempty

full_name: BoxIntegral.Box.coe_ne_empty
code: @[simp]
theorem coe_ne_empty : (I : Set (ι → ℝ)) ≠ ∅ 
goal: ↑I ≠ ∅

full_name: BoxIntegral.Box.empty_ne_coe
code: @[simp]
theorem empty_ne_coe : ∅ ≠ (I : Set (ι → ℝ)) 
goal: ∅ ≠ ↑I

full_name: BoxIntegral.Box.instLE
code: instance : LE (Box ι) 
goal: LE (BoxIntegral.Box ι)

full_name: BoxIntegral.Box.le_def
code: theorem le_def : I ≤ J ↔ ∀ x ∈ I, x ∈ J 
goal: I ≤ J ↔ ∀ x ∈ I, x ∈ J

full_name: BoxIntegral.Box.le_TFAE
code: theorem le_TFAE : List.TFAE [I ≤ J, (I : Set (ι → ℝ)) ⊆ J,
    Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper] 
goal: [I ≤ J, ↑I ⊆ ↑J, Set.Icc I.lower I.upper ⊆ Set.Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper].TFAE

full_name: BoxIntegral.Box.coe_subset_coe
code: @[simp, norm_cast]
theorem coe_subset_coe : (I : Set (ι → ℝ)) ⊆ J ↔ I ≤ J 
goal: ↑I ⊆ ↑J ↔ I ≤ J

full_name: BoxIntegral.Box.le_iff_bounds
code: theorem le_iff_bounds : I ≤ J ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper 
goal: I ≤ J ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper

full_name: BoxIntegral.Box.injective_coe
code: theorem injective_coe : Injective ((↑) : Box ι → Set (ι → ℝ)) 
goal: Function.Injective BoxIntegral.Box.toSet

full_name: BoxIntegral.Box.coe_inj
code: @[simp, norm_cast]
theorem coe_inj : (I : Set (ι → ℝ)) = J ↔ I = J 
goal: ↑I = ↑J ↔ I = J

full_name: BoxIntegral.Box.ext
code: @[ext]
theorem ext (H : ∀ x, x ∈ I ↔ x ∈ J) : I = J 
goal: I = J

full_name: BoxIntegral.Box.ne_of_disjoint_coe
code: theorem ne_of_disjoint_coe (h : Disjoint (I : Set (ι → ℝ)) J) : I ≠ J 
goal: I ≠ J

full_name: BoxIntegral.Box.instPartialOrder
code: instance : PartialOrder (Box ι) 
goal: PartialOrder (BoxIntegral.Box ι)

full_name: BoxIntegral.Box.Icc
code: /-- Closed box corresponding to `I : BoxIntegral.Box ι`. -/
protected def Icc : Box ι ↪o Set (ι → ℝ) 
goal: BoxIntegral.Box ι ↪o Set (ι → ℝ)

full_name: BoxIntegral.Box.Icc_def
code: theorem Icc_def : Box.Icc I = Icc I.lower I.upper 
goal: BoxIntegral.Box.Icc I = Set.Icc I.lower I.upper

full_name: BoxIntegral.Box.upper_mem_Icc
code: @[simp]
theorem upper_mem_Icc (I : Box ι) : I.upper ∈ Box.Icc I 
goal: I.upper ∈ BoxIntegral.Box.Icc I

full_name: BoxIntegral.Box.lower_mem_Icc
code: @[simp]
theorem lower_mem_Icc (I : Box ι) : I.lower ∈ Box.Icc I 
goal: I.lower ∈ BoxIntegral.Box.Icc I

full_name: BoxIntegral.Box.isCompact_Icc
code: protected theorem isCompact_Icc (I : Box ι) : IsCompact (Box.Icc I) 
goal: IsCompact (BoxIntegral.Box.Icc I)

full_name: BoxIntegral.Box.Icc_eq_pi
code: theorem Icc_eq_pi : Box.Icc I = pi univ fun i ↦ Icc (I.lower i) (I.upper i) 
goal: BoxIntegral.Box.Icc I = Set.univ.pi fun i => Set.Icc (I.lower i) (I.upper i)

full_name: BoxIntegral.Box.le_iff_Icc
code: theorem le_iff_Icc : I ≤ J ↔ Box.Icc I ⊆ Box.Icc J 
goal: I ≤ J ↔ BoxIntegral.Box.Icc I ⊆ BoxIntegral.Box.Icc J

full_name: BoxIntegral.Box.antitone_lower
code: theorem antitone_lower : Antitone fun I : Box ι ↦ I.lower 
goal: Antitone fun I => I.lower

full_name: BoxIntegral.Box.monotone_upper
code: theorem monotone_upper : Monotone fun I : Box ι ↦ I.upper 
goal: Monotone fun I => I.upper

full_name: BoxIntegral.Box.coe_subset_Icc
code: theorem coe_subset_Icc : ↑I ⊆ Box.Icc I 
goal: ↑I ⊆ BoxIntegral.Box.Icc I

full_name: BoxIntegral.Box.instSup
code: /-- `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`. -/
instance : Sup (Box ι) 
goal: Sup (BoxIntegral.Box ι)

full_name: BoxIntegral.Box.instSemilatticeSup
code: instance : SemilatticeSup (Box ι) 
goal: SemilatticeSup (BoxIntegral.Box ι)

full_name: BoxIntegral.Box.withBotToSet
code: /-- The set underlying this box: `⊥` is mapped to `∅`. -/
@[coe]
def withBotToSet (o : WithBot (Box ι)) : Set (ι → ℝ) 
goal: Set (ι → ℝ)

full_name: BoxIntegral.Box.withBotCoe
code: instance withBotCoe : CoeTC (WithBot (Box ι)) (Set (ι → ℝ)) 
goal: CoeTC (WithBot (BoxIntegral.Box ι)) (Set (ι → ℝ))

full_name: BoxIntegral.Box.coe_bot
code: @[simp, norm_cast]
theorem coe_bot : ((⊥ : WithBot (Box ι)) : Set (ι → ℝ)) = ∅ 
goal: ↑⊥ = ∅

full_name: BoxIntegral.Box.coe_coe
code: @[simp, norm_cast]
theorem coe_coe : ((I : WithBot (Box ι)) : Set (ι → ℝ)) = I 
goal: ↑↑I = ↑I

full_name: BoxIntegral.Box.isSome_iff
code: theorem isSome_iff : ∀ {I : WithBot (Box ι)}, I.isSome ↔ (I : Set (ι → ℝ)).Nonempty
  
goal: Option.isSome I = true ↔ (↑I).Nonempty

full_name: BoxIntegral.Box.biUnion_coe_eq_coe
code: theorem biUnion_coe_eq_coe (I : WithBot (Box ι)) :
    ⋃ (J : Box ι) (_ : ↑J = I), (J : Set (ι → ℝ)) = I 
goal: ⋃ J, ⋃ (_ : ↑J = I), ↑J = ↑I

full_name: BoxIntegral.Box.withBotCoe_subset_iff
code: @[simp, norm_cast]
theorem withBotCoe_subset_iff {I J : WithBot (Box ι)} : (I : Set (ι → ℝ)) ⊆ J ↔ I ≤ J 
goal: ↑I ⊆ ↑J ↔ I ≤ J

full_name: BoxIntegral.Box.withBotCoe_inj
code: @[simp, norm_cast]
theorem withBotCoe_inj {I J : WithBot (Box ι)} : (I : Set (ι → ℝ)) = J ↔ I = J 
goal: ↑I = ↑J ↔ I = J

full_name: BoxIntegral.Box.mk'
code: /-- 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)}`.  -/
def mk' (l u : ι → ℝ) : WithBot (Box ι) 
goal: WithBot (BoxIntegral.Box ι)

full_name: BoxIntegral.Box.mk'_eq_bot
code: @[simp]
theorem mk'_eq_bot {l u : ι → ℝ} : mk' l u = ⊥ ↔ ∃ i, u i ≤ l i 
goal: BoxIntegral.Box.mk' l u = ⊥ ↔ ∃ i, u i ≤ l i

full_name: BoxIntegral.Box.mk'_eq_coe
code: @[simp]
theorem mk'_eq_coe {l u : ι → ℝ} : mk' l u = I ↔ l = I.lower ∧ u = I.upper 
goal: BoxIntegral.Box.mk' l u = ↑I ↔ l = I.lower ∧ u = I.upper

full_name: BoxIntegral.Box.coe_mk'
code: @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) 
goal: ↑(BoxIntegral.Box.mk' l u) = Set.univ.pi fun i => Set.Ioc (l i) (u i)

full_name: BoxIntegral.Box.WithBot.inf
code: instance WithBot.inf : Inf (WithBot (Box ι)) 
goal: Inf (WithBot (BoxIntegral.Box ι))

full_name: BoxIntegral.Box.coe_inf
code: @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J 
goal: ↑(I ⊓ J) = ↑I ∩ ↑J

full_name: BoxIntegral.Box.instLatticeWithBot
code: instance : Lattice (WithBot (Box ι)) 
goal: Lattice (WithBot (BoxIntegral.Box ι))

full_name: BoxIntegral.Box.disjoint_withBotCoe
code: @[simp, norm_cast]
theorem disjoint_withBotCoe {I J : WithBot (Box ι)} :
    Disjoint (I : Set (ι → ℝ)) J ↔ Disjoint I J 
goal: Disjoint ↑I ↑J ↔ Disjoint I J

full_name: BoxIntegral.Box.disjoint_coe
code: theorem disjoint_coe : Disjoint (I : WithBot (Box ι)) J ↔ Disjoint (I : Set (ι → ℝ)) J 
goal: Disjoint ↑I ↑J ↔ Disjoint ↑I ↑J

full_name: BoxIntegral.Box.not_disjoint_coe_iff_nonempty_inter
code: theorem not_disjoint_coe_iff_nonempty_inter :
    ¬Disjoint (I : WithBot (Box ι)) J ↔ (I ∩ J : Set (ι → ℝ)).Nonempty 
goal: ¬Disjoint ↑I ↑J ↔ (↑I ∩ ↑J).Nonempty

full_name: BoxIntegral.Box.face
code: /-- 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`. -/
@[simps (config := { simpRhs := true })]
def face {n} (I : Box (Fin (n + 1))) (i : Fin (n + 1)) : Box (Fin n) 
goal: BoxIntegral.Box (Fin n)

full_name: BoxIntegral.Box.face_lower
code: /-- 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`. -/
@[simps (config := { simpRhs := true })]
def face {n} (I : Box (Fin (n + 1))) (i : Fin (n + 1)) : Box (Fin n) 
goal: ∀ (a : Fin n), (I.face i).lower a = I.lower (i.succAbove a)

full_name: BoxIntegral.Box.face_upper
code: /-- 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`. -/
@[simps (config := { simpRhs := true })]
def face {n} (I : Box (Fin (n + 1))) (i : Fin (n + 1)) : Box (Fin n) 
goal: ∀ (a : Fin n), (I.face i).upper a = I.upper (i.succAbove a)

full_name: BoxIntegral.Box.face_mk
code: @[simp]
theorem face_mk {n} (l u : Fin (n + 1) → ℝ) (h : ∀ i, l i < u i) (i : Fin (n + 1)) :
    face ⟨l, u, h⟩ i = ⟨l ∘ Fin.succAbove i, u ∘ Fin.succAbove i, fun _ ↦ h _⟩ 
goal: { lower := l, upper := u, lower_lt_upper := h }.face i =
  { lower := l ∘ i.succAbove, upper := u ∘ i.succAbove, lower_lt_upper := ⋯ }

full_name: BoxIntegral.Box.face_mono
code: @[mono]
theorem face_mono {n} {I J : Box (Fin (n + 1))} (h : I ≤ J) (i : Fin (n + 1)) :
    face I i ≤ face J i 
goal: I.face i ≤ J.face i

full_name: BoxIntegral.Box.monotone_face
code: theorem monotone_face {n} (i : Fin (n + 1)) : Monotone fun I ↦ face I i 
goal: Monotone fun I => I.face i

full_name: BoxIntegral.Box.mapsTo_insertNth_face_Icc
code: theorem mapsTo_insertNth_face_Icc {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
    (hx : x ∈ Icc (I.lower i) (I.upper i)) :
    MapsTo (i.insertNth x) (Box.Icc (I.face i)) (Box.Icc I) 
goal: Set.MapsTo (i.insertNth x) (BoxIntegral.Box.Icc (I.face i)) (BoxIntegral.Box.Icc I)

full_name: BoxIntegral.Box.mapsTo_insertNth_face
code: theorem mapsTo_insertNth_face {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
    (hx : x ∈ Ioc (I.lower i) (I.upper i)) :
    MapsTo (i.insertNth x) (I.face i : Set (_ → _)) (I : Set (_ → _)) 
goal: Set.MapsTo (i.insertNth x) ↑(I.face i) ↑I

full_name: BoxIntegral.Box.continuousOn_face_Icc
code: theorem continuousOn_face_Icc {X} [TopologicalSpace X] {n} {f : (Fin (n + 1) → ℝ) → X}
    {I : Box (Fin (n + 1))} (h : ContinuousOn f (Box.Icc I)) {i : Fin (n + 1)} {x : ℝ}
    (hx : x ∈ Icc (I.lower i) (I.upper i)) :
    ContinuousOn (f ∘ i.insertNth x) (Box.Icc (I.face i)) 
goal: ContinuousOn (f ∘ i.insertNth x) (BoxIntegral.Box.Icc (I.face i))

full_name: BoxIntegral.Box.Ioo
code: /-- The interior of a box. -/
protected def Ioo : Box ι →o Set (ι → ℝ) 
goal: BoxIntegral.Box ι →o Set (ι → ℝ)

full_name: BoxIntegral.Box.Ioo_subset_coe
code: theorem Ioo_subset_coe (I : Box ι) : Box.Ioo I ⊆ I 
goal: BoxIntegral.Box.Ioo I ⊆ ↑I

full_name: BoxIntegral.Box.Ioo_subset_Icc
code: protected theorem Ioo_subset_Icc (I : Box ι) : Box.Ioo I ⊆ Box.Icc I 
goal: BoxIntegral.Box.Ioo I ⊆ BoxIntegral.Box.Icc I

full_name: BoxIntegral.Box.iUnion_Ioo_of_tendsto
code: theorem iUnion_Ioo_of_tendsto [Finite ι] {I : Box ι} {J : ℕ → Box ι} (hJ : Monotone J)
    (hl : Tendsto (lower ∘ J) atTop (𝓝 I.lower)) (hu : Tendsto (upper ∘ J) atTop (𝓝 I.upper)) :
    ⋃ n, Box.Ioo (J n) = Box.Ioo I 
goal: ⋃ n, BoxIntegral.Box.Ioo (J n) = BoxIntegral.Box.Ioo I

full_name: BoxIntegral.Box.exists_seq_mono_tendsto
code: theorem exists_seq_mono_tendsto (I : Box ι) :
    ∃ J : ℕ →o Box ι,
      (∀ n, Box.Icc (J n) ⊆ Box.Ioo I) ∧
        Tendsto (lower ∘ J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ J) atTop (𝓝 I.upper) 
goal: ∃ J,
  (∀ (n : ℕ), BoxIntegral.Box.Icc (J n) ⊆ BoxIntegral.Box.Ioo I) ∧
    Filter.Tendsto (BoxIntegral.Box.lower ∘ ⇑J) Filter.atTop (𝓝 I.lower) ∧
      Filter.Tendsto (BoxIntegral.Box.upper ∘ ⇑J) Filter.atTop (𝓝 I.upper)

full_name: BoxIntegral.Box.distortion
code: /-- 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)`. -/
def distortion (I : Box ι) : ℝ≥0 
goal: ℝ≥0

full_name: BoxIntegral.Box.distortion_eq_of_sub_eq_div
code: theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
    (h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
    distortion I = distortion J 
goal: I.distortion = J.distortion

full_name: BoxIntegral.Box.nndist_le_distortion_mul
code: theorem nndist_le_distortion_mul (I : Box ι) (i : ι) :
    nndist I.lower I.upper ≤ I.distortion * nndist (I.lower i) (I.upper i) 
goal: nndist I.lower I.upper ≤ I.distortion * nndist (I.lower i) (I.upper i)

full_name: BoxIntegral.Box.dist_le_distortion_mul
code: theorem dist_le_distortion_mul (I : Box ι) (i : ι) :
    dist I.lower I.upper ≤ I.distortion * (I.upper i - I.lower i) 
goal: dist I.lower I.upper ≤ ↑I.distortion * (I.upper i - I.lower i)

full_name: BoxIntegral.Box.diam_Icc_le_of_distortion_le
code: theorem diam_Icc_le_of_distortion_le (I : Box ι) (i : ι) {c : ℝ≥0} (h : I.distortion ≤ c) :
    diam (Box.Icc I) ≤ c * (I.upper i - I.lower i) 
goal: Metric.diam (BoxIntegral.Box.Icc I) ≤ ↑c * (I.upper i - I.lower i)