awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (hypothesis)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
I : Box (Fin (n + 1))
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f ((Box.Icc : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ)) I)
Hd :
  ∀ (x : Fin (n + 1) → ℝ),
    Membership.mem (γ := Set (Fin (n + 1) → ℝ))
        ((Box.Ioo : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ)) I \ s : Set (Fin (n + 1) → ℝ)) x →
      HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    ((Box.Icc : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ)) I) volume
J : ℕ →o Box (Fin (n + 1))
hJ_sub :
  ∀ (n_1 : ℕ),
    Subset (α := Set (Fin (n + 1) → ℝ))
      ((Box.Icc : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ))
          ((J : (a : ℕ) → Box (Fin (n + 1))) n_1 : Box (Fin (n + 1))) :
        Set (Fin (n + 1) → ℝ))
      ((Box.Ioo : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ)) I : Set (Fin (n + 1) → ℝ))
hJl : Tendsto (α := ℕ) (Box.lower ∘ (⇑J : (a : ℕ) → Box (Fin (n + 1)))) atTop (𝓝 I.lower)
hJu : Tendsto (α := ℕ) (Box.upper ∘ (⇑J : (a : ℕ) → Box (Fin (n + 1)))) atTop (𝓝 I.upper)
hJ_sub' :
  ∀ (k : ℕ),
    Subset (α := Set (Fin (n + 1) → ℝ))
      ((Box.Icc : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ))
          ((J : (a : ℕ) → Box (Fin (n + 1))) k : Box (Fin (n + 1))) :
        Set (Fin (n + 1) → ℝ))
      ((Box.Icc : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ)) I : Set (Fin (n + 1) → ℝ))
hJ_le : ∀ (k : ℕ), (J : (a : ℕ) → Box (Fin (n + 1))) k ≤ I
⊢ Eq.{u + 1} (α := E)
    (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
      (Measure.restrict volume ((Box.Icc : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ)) I))
      fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (∑ i : Fin (n + 1),
      HSub.hSub (α := E)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume ((Box.Icc : (a : Box (Fin n)) → Set (Fin n → ℝ)) (I.face i))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (I.upper i) x) i)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume ((Box.Icc : (a : Box (Fin n)) → Set (Fin n → ℝ)) (I.face i))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (I.lower i) x) i))
have HcJ : ∀ (k : ℕ),
  ContinuousOn f
    ((Box.Icc : (a : Box (Fin (n + 1))) → Set (Fin (n + 1) → ℝ))
      ((J : (a : ℕ) → Box (Fin (n + 1))) k : Box (Fin (n + 1))))
Tactic: have HcJ : ∀ k, ContinuousOn f (Box.Icc (J k)) := fun k => Hc.mono (hJ_sub' k)
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (goal)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
⊢ Eq.{u + 1} (α := E)
    (@integral _ _ _ _ MeasureSpace.toMeasurableSpace (Measure.restrict volume (Set.Icc a b))
      fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (∑ i : Fin (n + 1),
      HSub.hSub (α := E)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i))
have inl : ∀ (i : Fin (n + 1)) (hi : a i = b i),
  Eq.{u + 1} (α := E)
    (@integral _ _ _ _ MeasureSpace.toMeasurableSpace (Measure.restrict volume (Set.Icc a b))
      fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (∑ i : Fin (n + 1),
      HSub.hSub (α := E)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i))
Tactic: rcases em (∃ i, a i = b i) with (⟨i, hi⟩ | hne)
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (goal)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
i : Fin (n + 1)
hi : a i = b i
⊢ Eq.{u + 1} (α := E)
    (@integral _ _ _ _ MeasureSpace.toMeasurableSpace (Measure.restrict volume (Set.Icc a b))
      fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (∑ i : Fin (n + 1),
      HSub.hSub (α := E)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i))
have inl : Eq.{u + 1} (α := E)
  (@integral _ _ _ _ (MeasurableSpace.pi (X := fun (a : Fin (n + 1)) ↦ ℝ))
    (Measure.restrict (Measure.pi (α := fun (a : Fin (n + 1)) ↦ ℝ) fun (x : Fin (n + 1)) ↦ volume)
      (Set.pi (α := fun (a : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioc (a i) (b i)))
    fun (x : (i : Fin (n + 1)) → ℝ) ↦
    ∑ i : Fin (n + 1),
      (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
  (∑ i : Fin (n + 1),
    HSub.hSub (α := E)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
        f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
        f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i))
Tactic: rw [volume_pi, ← setIntegral_congr_set Measure.univ_pi_Ioc_ae_eq_Icc]
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (hypothesis)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
i : Fin (n + 1)
hi : a i = b i
⊢ Eq.{u + 1} (α := E)
    (@integral _ _ _ _ (MeasurableSpace.pi (X := fun (a : Fin (n + 1)) ↦ ℝ))
      (Measure.restrict (Measure.pi (α := fun (a : Fin (n + 1)) ↦ ℝ) fun (x : Fin (n + 1)) ↦ volume)
        (Set.pi (α := fun (a : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioc (a i) (b i)))
      fun (x : (i : Fin (n + 1)) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (∑ i : Fin (n + 1),
      HSub.hSub (α := E)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i))
have hi' : Set.Ioc (a i) (b i) = ∅
Tactic: have hi' : Ioc (a i) (b i) = ∅ := Ioc_eq_empty hi.not_lt
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (hypothesis)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
i : Fin (n + 1)
hi : a i = b i
hi' : Set.Ioc (a i) (b i) = ∅
⊢ Eq.{u + 1} (α := E)
    (@integral _ _ _ _ (MeasurableSpace.pi (X := fun (a : Fin (n + 1)) ↦ ℝ))
      (Measure.restrict (Measure.pi (α := fun (a : Fin (n + 1)) ↦ ℝ) fun (x : Fin (n + 1)) ↦ volume)
        (Set.pi (α := fun (a : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioc (a i) (b i)))
      fun (x : (i : Fin (n + 1)) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (∑ i : Fin (n + 1),
      HSub.hSub (α := E)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i))
have this : Eq (α := Set ((i : Fin (n + 1)) → ℝ))
  (Set.pi (α := fun (j : Fin (n + 1)) ↦ ℝ) Set.univ fun (j : Fin (n + 1)) ↦ Set.Ioc (a j) (b j)) ∅
Tactic: have : (pi Set.univ fun j => Ioc (a j) (b j)) = ∅ := univ_pi_eq_empty hi'
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (goal)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
i : Fin (n + 1)
hi : a i = b i
hi' : Set.Ioc (a i) (b i) = ∅
this :
  Eq (α := Set ((i : Fin (n + 1)) → ℝ))
    (Set.pi (α := fun (j : Fin (n + 1)) ↦ ℝ) Set.univ fun (j : Fin (n + 1)) ↦ Set.Ioc (a j) (b j)) ∅
⊢ Eq.{u + 1} (α := E)
    (@integral _ _ _ _ (MeasurableSpace.pi (X := fun (a : Fin (n + 1)) ↦ ℝ))
      (Measure.restrict (Measure.pi (α := fun (a : Fin (n + 1)) ↦ ℝ) fun (x : Fin (n + 1)) ↦ volume)
        (Set.pi (α := fun (a : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioc (a i) (b i)))
      fun (x : (i : Fin (n + 1)) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (∑ i : Fin (n + 1),
      HSub.hSub (α := E)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
          f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i))
have inl : ∀ (x : Fin (n + 1)),
  Membership.mem (γ := Finset (Fin (n + 1))) Finset.univ x →
    HSub.hSub (α := E)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ x.succAbove) (b ∘ x.succAbove))) fun (x_1 : Fin n → ℝ) ↦
          f (x.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b x) x_1) x)
        (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
          (Measure.restrict volume (Set.Icc (a ∘ x.succAbove) (b ∘ x.succAbove))) fun (x_1 : Fin n → ℝ) ↦
          f (x.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a x) x_1) x) =
      0
Tactic: rw [this, setIntegral_empty, sum_eq_zero]
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (goal)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
i : Fin (n + 1)
hi : a i = b i
hi' : Set.Ioc (a i) (b i) = ∅
this :
  Eq (α := Set ((i : Fin (n + 1)) → ℝ))
    (Set.pi (α := fun (j : Fin (n + 1)) ↦ ℝ) Set.univ fun (j : Fin (n + 1)) ↦ Set.Ioc (a j) (b j)) ∅
j : Fin (n + 1)
⊢ HSub.hSub (α := E)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b j) x) j)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a j) x) j) =
    0
have inl : HSub.hSub (α := E)
    (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
      (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
      f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
    (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
      (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
      f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i) =
  0
Tactic: rcases eq_or_ne i j with (rfl | hne)
Cleared hypotheses: j
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (goal)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
i : Fin (n + 1)
hi : a i = b i
hi' : Set.Ioc (a i) (b i) = ∅
this :
  Eq (α := Set ((i : Fin (n + 1)) → ℝ))
    (Set.pi (α := fun (j : Fin (n + 1)) ↦ ℝ) Set.univ fun (j : Fin (n + 1)) ↦ Set.Ioc (a j) (b j)) ∅
j : Fin (n + 1)
inl :
  HSub.hSub (α := E)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
        f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b i) x) i)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ i.succAbove) (b ∘ i.succAbove))) fun (x : Fin n → ℝ) ↦
        f (i.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a i) x) i) =
    0
⊢ HSub.hSub (α := E)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b j) x) j)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a j) x) j) =
    0
have inl₁ : ∀ (hne : i ≠ j),
  HSub.hSub (α := E)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b j) x) j)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a j) x) j) =
    0
Tactic: rcases eq_or_ne i j with (rfl | hne)
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (goal)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
i : Fin (n + 1)
hi : a i = b i
hi' : Set.Ioc (a i) (b i) = ∅
this :
  Eq (α := Set ((i : Fin (n + 1)) → ℝ))
    (Set.pi (α := fun (j : Fin (n + 1)) ↦ ℝ) Set.univ fun (j : Fin (n + 1)) ↦ Set.Ioc (a j) (b j)) ∅
j : Fin (n + 1)
hne : i ≠ j
⊢ HSub.hSub (α := E)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b j) x) j)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a j) x) j) =
    0
have inl : ∀ (i : Fin n) (hi : a (j.succAbove i) = b (j.succAbove i)) (hi' : Set.Ioc (a (j.succAbove i)) (b (j.succAbove i)) = ∅)
  (hne : j.succAbove i ≠ j),
  HSub.hSub (α := E)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (b j) x) j)
      (@integral _ _ _ _ MeasureSpace.toMeasurableSpace
        (Measure.restrict volume (Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove))) fun (x : Fin n → ℝ) ↦
        f (j.insertNth (α := fun (a : Fin (n + 1)) ↦ ℝ) (a j) x) j) =
    0
Tactic: rcases Fin.exists_succAbove_eq hne with ⟨i, rfl⟩
Cleared hypotheses: i, hi, hi', hne
-- Lean 4 proof step from Mathlib.MeasureTheory.Integral.DivergenceTheorem (goal)
Goal:
E : Type u
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
n : ℕ
a b : Fin (n + 1) → ℝ
hle : a ≤ b
f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E
f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E
s : Set (Fin (n + 1) → ℝ)
hs : s.Countable
Hc : ContinuousOn f (Set.Icc a b)
Hd :
  ∀ x ∈ (Set.pi (α := fun (i : Fin (n + 1)) ↦ ℝ) Set.univ fun (i : Fin (n + 1)) ↦ Set.Ioo (a i) (b i)) \ s,
    HasFDerivAt (𝕜 := ℝ) f (f' x) x
Hi :
  IntegrableOn.{0, u} (ε := E) (mα := MeasureSpace.toMeasurableSpace)
    (fun (x : Fin (n + 1) → ℝ) ↦
      ∑ i : Fin (n + 1),
        (f' x : (a : Fin (n + 1) → ℝ) → Fin (n + 1) → E) (Pi.single (M := fun (a : Fin (n + 1)) ↦ ℝ) i 1) i)
    (Set.Icc a b) volume
this :
  Eq (α := Set ((i : Fin (n + 1)) → ℝ))
    (Set.pi (α := fun (j : Fin (n + 1)) ↦ ℝ) Set.univ fun (j : Fin (n + 1)) ↦ Set.Ioc (a j) (b j)) ∅
j : Fin (n + 1)
i : Fin n
hi : a (j.succAbove i) = b (j.succAbove i)
hi' : Set.Ioc (a (j.succAbove i)) (b (j.succAbove i)) = ∅
hne : j.succAbove i ≠ j
⊢ Set.Icc (a ∘ j.succAbove) (b ∘ j.succAbove) =ᶠ[ae (F := Measure (Fin n → ℝ)) volume] ∅
have rw : ENNReal.ofReal ((b ∘ j.succAbove) i - (a ∘ j.succAbove) i) = 0
Tactic: rw [ae_eq_empty, Real.volume_Icc_pi, prod_eq_zero (Finset.mem_univ i)]