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

full_name: BoxIntegral.Box.splitCenterBox
code: /-- For a box `I`, the hyperplanes passing through its center split `I` into `2 ^ card ι` boxes.
`BoxIntegral.Box.splitCenterBox I s` is one of these boxes. See also
`BoxIntegral.Partition.splitCenter` for the corresponding `BoxIntegral.Partition`. -/
def splitCenterBox (I : Box ι) (s : Set ι) : Box ι 
goal: BoxIntegral.Box ι

full_name: BoxIntegral.Box.mem_splitCenterBox
code: theorem mem_splitCenterBox {s : Set ι} {y : ι → ℝ} :
    y ∈ I.splitCenterBox s ↔ y ∈ I ∧ ∀ i, (I.lower i + I.upper i) / 2 < y i ↔ i ∈ s 
goal: y ∈ I.splitCenterBox s ↔ y ∈ I ∧ ∀ (i : ι), (I.lower i + I.upper i) / 2 < y i ↔ i ∈ s

full_name: BoxIntegral.Box.splitCenterBox_le
code: theorem splitCenterBox_le (I : Box ι) (s : Set ι) : I.splitCenterBox s ≤ I 
goal: I.splitCenterBox s ≤ I

full_name: BoxIntegral.Box.disjoint_splitCenterBox
code: theorem disjoint_splitCenterBox (I : Box ι) {s t : Set ι} (h : s ≠ t) :
    Disjoint (I.splitCenterBox s : Set (ι → ℝ)) (I.splitCenterBox t) 
goal: Disjoint ↑(I.splitCenterBox s) ↑(I.splitCenterBox t)

full_name: BoxIntegral.Box.injective_splitCenterBox
code: theorem injective_splitCenterBox (I : Box ι) : Injective I.splitCenterBox 
goal: Function.Injective I.splitCenterBox

full_name: BoxIntegral.Box.exists_mem_splitCenterBox
code: @[simp]
theorem exists_mem_splitCenterBox {I : Box ι} {x : ι → ℝ} : (∃ s, x ∈ I.splitCenterBox s) ↔ x ∈ I 
goal: (∃ s, x ∈ I.splitCenterBox s) ↔ x ∈ I

full_name: BoxIntegral.Box.splitCenterBoxEmb
code: /-- `BoxIntegral.Box.splitCenterBox` bundled as a `Function.Embedding`. -/
@[simps]
def splitCenterBoxEmb (I : Box ι) : Set ι ↪ Box ι 
goal: Set ι ↪ BoxIntegral.Box ι

full_name: BoxIntegral.Box.splitCenterBoxEmb_apply
code: /-- `BoxIntegral.Box.splitCenterBox` bundled as a `Function.Embedding`. -/
@[simps]
def splitCenterBoxEmb (I : Box ι) : Set ι ↪ Box ι 
goal: I.splitCenterBoxEmb s = I.splitCenterBox s

full_name: BoxIntegral.Box.iUnion_coe_splitCenterBox
code: @[simp]
theorem iUnion_coe_splitCenterBox (I : Box ι) : ⋃ s, (I.splitCenterBox s : Set (ι → ℝ)) = I 
goal: ⋃ s, ↑(I.splitCenterBox s) = ↑I

full_name: BoxIntegral.Box.upper_sub_lower_splitCenterBox
code: @[simp]
theorem upper_sub_lower_splitCenterBox (I : Box ι) (s : Set ι) (i : ι) :
    (I.splitCenterBox s).upper i - (I.splitCenterBox s).lower i = (I.upper i - I.lower i) / 2 
goal: (I.splitCenterBox s).upper i - (I.splitCenterBox s).lower i = (I.upper i - I.lower i) / 2

full_name: BoxIntegral.Box.subbox_induction_on'
code: /-- Let `p` be a predicate on `Box ι`, let `I` be a box. Suppose that the following two properties
hold true.

* `H_ind` : Consider a smaller box `J ≤ I`. The hyperplanes passing through the center of `J` split
  it into `2 ^ n` boxes. If `p` holds true on each of these boxes, then it true on `J`.

* `H_nhds` : For each `z` in the closed box `I.Icc` there exists a neighborhood `U` of `z` within
  `I.Icc` such that for every box `J ≤ I` such that `z ∈ J.Icc ⊆ U`, if `J` is homothetic to `I`
  with a coefficient of the form `1 / 2 ^ m`, then `p` is true on `J`.

Then `p I` is true. See also `BoxIntegral.Box.subbox_induction_on` for a version using
`BoxIntegral.Prepartition.splitCenter` instead of `BoxIntegral.Box.splitCenterBox`.

The proof still works if we assume `H_ind` only for subboxes `J ≤ I` that are homothetic to `I` with
a coefficient of the form `2⁻ᵐ` but we do not need this generalization yet. -/
@[elab_as_elim]
theorem subbox_induction_on' {p : Box ι → Prop} (I : Box ι)
    (H_ind : ∀ J ≤ I, (∀ s, p (splitCenterBox J s)) → p J)
    (H_nhds : ∀ z ∈ Box.Icc I, ∃ U ∈ 𝓝[Box.Icc I] z, ∀ J ≤ I, ∀ (m : ℕ), z ∈ Box.Icc J →
      Box.Icc J ⊆ U → (∀ i, J.upper i - J.lower i = (I.upper i - I.lower i) / 2 ^ m) → p J) :
    p I 
goal: p I