Theorem: BoxIntegral.Box.subbox_induction_on'
File: Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean

tactic: by_contra hpI
state_before: ι : Type u_1
I✝ J : Box ι
p : Box ι → Prop
I : Box ι
H_ind : ∀ (J : Box ι), J ≤ I → (∀ (s : Set ι), p (splitCenterBox J s)) → p J
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
⊢ p I

tactic: replace H_ind := fun J hJ ↦ not_imp_not.2 (H_ind J hJ)
state_before: ι : Type u_1
I✝ J : Box ι
p : Box ι → Prop
I : Box ι
H_ind : ∀ (J : Box ι), J ≤ I → (∀ (s : Set ι), p (splitCenterBox J s)) → p J
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
⊢ False

tactic: simp only [exists_imp, not_forall] at H_ind
state_before: ι : Type u_1
I✝ J : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
H_ind : ∀ (J : Box ι), J ≤ I → ¬p J → ¬∀ (s : Set ι), p (splitCenterBox J s)
⊢ False

tactic: choose! s hs using H_ind
state_before: ι : Type u_1
I✝ J : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
H_ind : ∀ (J : Box ι), J ≤ I → ¬p J → ∃ x, ¬p (splitCenterBox J x)
⊢ False

tactic: set J : ℕ → Box ι := fun m ↦ ((fun J ↦ splitCenterBox J (s J))^[m]) I
state_before: ι : Type u_1
I✝ J : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
⊢ False

tactic: have J_succ : ∀ m, J (m + 1) = splitCenterBox (J m) (s <| J m) :=
  fun m ↦ iterate_succ_apply' _ _ _
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
⊢ False

tactic: have hJmono : Antitone J :=
  antitone_nat_of_succ_le fun n ↦ by simpa [J_succ] using splitCenterBox_le _ _
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
⊢ False

tactic: have hJle : ∀ m, J m ≤ I := fun m ↦ hJmono (zero_le m)
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
⊢ False

tactic: have hJp : ∀ m, ¬p (J m) :=
  fun m ↦ Nat.recOn m hpI fun m ↦ by simpa only [J_succ] using hs (J m) (hJle m)
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
⊢ False

tactic: have h0 : J 0 = I := rfl
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
⊢ False

tactic: clear_value J
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
⊢ False

tactic: clear hpI hs J_succ s
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
⊢ False

tactic: set z : ι → ℝ := ⨆ m, (J m).lower
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
⊢ False

tactic: have hzJ : ∀ m, z ∈ Box.Icc (J m) :=
  mem_iInter.1 (ciSup_mem_Inter_Icc_of_antitone_Icc
    ((@Box.Icc ι).monotone.comp_antitone hJmono) fun m ↦ (J m).lower_le_upper)
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
⊢ False

tactic: have hJl_mem : ∀ m, (J m).lower ∈ Box.Icc I := fun m ↦ le_iff_Icc.1 (hJle m) (J m).lower_mem_Icc
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
⊢ False

tactic: have hJu_mem : ∀ m, (J m).upper ∈ Box.Icc I := fun m ↦ le_iff_Icc.1 (hJle m) (J m).upper_mem_Icc
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
⊢ False

tactic: have hJlz : Tendsto (fun m ↦ (J m).lower) atTop (𝓝 z) :=
  tendsto_atTop_ciSup (antitone_lower.comp hJmono) ⟨I.upper, fun x ⟨m, hm⟩ ↦ hm ▸ (hJl_mem m).2⟩
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
⊢ False

tactic: have hJuz : Tendsto (fun m ↦ (J m).upper) atTop (𝓝 z) := by
  suffices Tendsto (fun m ↦ (J m).upper - (J m).lower) atTop (𝓝 0) by simpa using hJlz.add this
  refine' tendsto_pi_nhds.2 fun i ↦ _
  simpa [hJsub] using
    tendsto_const_nhds.div_atTop (tendsto_pow_atTop_atTop_of_one_lt _root_.one_lt_two)
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)
⊢ False

tactic: replace hJlz : Tendsto (fun m ↦ (J m).lower) atTop (𝓝[Icc I.lower I.upper] z)
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)
hJuz : Tendsto (fun m => (J m).upper) atTop (𝓝 z)
⊢ False

tactic: replace hJuz : Tendsto (fun m ↦ (J m).upper) atTop (𝓝[Icc I.lower I.upper] z)
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJuz : Tendsto (fun m => (J m).upper) atTop (𝓝 z)
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)
⊢ False

tactic: rcases H_nhds z (h0 ▸ hzJ 0) with ⟨U, hUz, hU⟩
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)
hJuz : Tendsto (fun m => (J m).upper) atTop (𝓝[Set.Icc I.lower I.upper] z)
⊢ False

tactic: rcases(tendsto_lift'.1 (hJlz.Icc hJuz) U hUz).exists with ⟨m, hUm⟩
state_before: case intro.intro
ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)
hJuz : Tendsto (fun m => (J m).upper) atTop (𝓝[Set.Icc I.lower I.upper] z)
U : Set (ι → ℝ)
hUz : U ∈ 𝓝[↑Box.Icc I] z
hU :
  ∀ (J : Box ι),
    J ≤ I →
      ∀ (m : ℕ),
        z ∈ ↑Box.Icc J → ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
⊢ False

tactic: exact hJp m (hU (J m) (hJle m) m (hzJ m) hUm (hJsub m))
state_before: case intro.intro.intro
ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)
hJuz : Tendsto (fun m => (J m).upper) atTop (𝓝[Set.Icc I.lower I.upper] z)
U : Set (ι → ℝ)
hUz : U ∈ 𝓝[↑Box.Icc I] z
hU :
  ∀ (J : Box ι),
    J ≤ I →
      ∀ (m : ℕ),
        z ∈ ↑Box.Icc J → ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
m : ℕ
hUm : Set.Icc (J m).lower (J m).upper ∈ 𝒫 U
⊢ False

tactic: simpa [J_succ] using splitCenterBox_le _ _
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
n : ℕ
⊢ J (n + 1) ≤ J n

tactic: simpa only [J_succ] using hs (J m) (hJle m)
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
m✝ m : ℕ
⊢ ¬p (J m) → ¬p (J (Nat.succ m))

tactic: intro m i
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
⊢ ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m

tactic: induction' m with m ihm
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
m : ℕ
i : ι
⊢ upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m

tactic: simp only [pow_succ', J_succ, upper_sub_lower_splitCenterBox, ihm, div_div]
state_before: case succ
ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
i : ι
m : ℕ
ihm : upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
⊢ upper (J (Nat.succ m)) i - lower (J (Nat.succ m)) i = (upper I i - lower I i) / 2 ^ Nat.succ m

tactic: simp [Nat.zero_eq]
state_before: case zero
ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
hpI : ¬p I
s : Box ι → Set ι
hs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))
J : ℕ → Box ι := fun m => ((fun J => splitCenterBox J (s J))^[m]) I
J_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
i : ι
⊢ upper (J Nat.zero) i - lower (J Nat.zero) i = (upper I i - lower I i) / 2 ^ Nat.zero

tactic: suffices Tendsto (fun m ↦ (J m).upper - (J m).lower) atTop (𝓝 0) by simpa using hJlz.add this
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)
⊢ Tendsto (fun m => (J m).upper) atTop (𝓝 z)

tactic: refine' tendsto_pi_nhds.2 fun i ↦ _
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)
⊢ Tendsto (fun m => (J m).upper - (J m).lower) atTop (𝓝 0)

tactic: simpa [hJsub] using
  tendsto_const_nhds.div_atTop (tendsto_pow_atTop_atTop_of_one_lt _root_.one_lt_two)
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)
i : ι
⊢ Tendsto (fun i_1 => ((J i_1).upper - (J i_1).lower) i) atTop (𝓝 (OfNat.ofNat 0 i))

tactic: simpa using hJlz.add this
state_before: ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)
this : Tendsto (fun m => (J m).upper - (J m).lower) atTop (𝓝 0)
⊢ Tendsto (fun m => (J m).upper) atTop (𝓝 z)

tactic: exact
  tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ hJlz (eventually_of_forall hJl_mem)
state_before: case hJlz
ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)
hJuz : Tendsto (fun m => (J m).upper) atTop (𝓝 z)
⊢ Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)

tactic: exact
  tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ hJuz (eventually_of_forall hJu_mem)
state_before: case hJuz
ι : Type u_1
I✝ J✝ : Box ι
p : Box ι → Prop
I : Box ι
H_nhds :
  ∀ (z : ι → ℝ),
    z ∈ ↑Box.Icc I →
      ∃ U,
        U ∈ 𝓝[↑Box.Icc I] z ∧
          ∀ (J : Box ι),
            J ≤ I →
              ∀ (m : ℕ),
                z ∈ ↑Box.Icc J →
                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J
J : ℕ → Box ι
hJmono : Antitone J
hJle : ∀ (m : ℕ), J m ≤ I
hJp : ∀ (m : ℕ), ¬p (J m)
hJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m
h0 : J 0 = I
z : ι → ℝ := ⨆ (m : ℕ), (J m).lower
hzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)
hJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I
hJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I
hJuz : Tendsto (fun m => (J m).upper) atTop (𝓝 z)
hJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)
⊢ Tendsto (fun m => (J m).upper) atTop (𝓝[Set.Icc I.lower I.upper] z)