analysis.box_integral.basicMathlib.Analysis.BoxIntegral.Basic

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -445,7 +445,7 @@ theorem BoxIntegral.HasIntegral.sum {α : Type _} {s : Finset α} {f : α → 
     HasIntegral I l (fun x => ∑ i in s, f i x) vol (∑ i in s, g i) :=
   by
   induction' s using Finset.induction_on with a s ha ihs; · simp [has_integral_zero]
-  simp only [Finset.sum_insert ha]; rw [Finset.forall_mem_insert] at h 
+  simp only [Finset.sum_insert ha]; rw [Finset.forall_mem_insert] at h
   exact h.1.add (ihs h.2)
 #align box_integral.has_integral_sum BoxIntegral.HasIntegral.sum
 -/
@@ -583,7 +583,7 @@ theorem dist_integralSum_integral_le_of_memBaseSet (h : Integrable I l f vol) (h
     (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) (hπp : π.IsPartition) :
     dist (integralSum f vol π) (integral I l f vol) ≤ ε :=
   by
-  rw [convergence_r, dif_pos h₀] at hπ 
+  rw [convergence_r, dif_pos h₀] at hπ
   exact (has_integral_iff.1 h.has_integral ε h₀).choose_spec.2 c _ hπ hπp
 #align box_integral.integrable.dist_integral_sum_integral_le_of_mem_base_set BoxIntegral.Integrable.dist_integralSum_integral_le_of_memBaseSet
 -/
@@ -619,7 +619,7 @@ theorem dist_integralSum_le_of_memBaseSet (h : Integrable I l f vol) (hpos₁ :
     h.dist_integral_sum_integral_le_of_mem_base_set hpos₁
       (h₁.union_compl_to_subordinate (fun _ _ => min_le_left _ _) hπU hπc₁)
       (is_partition_union_compl_to_subordinate _ _ _ _)
-  rw [HU] at hπU 
+  rw [HU] at hπU
   have H₂ :
     dist (integral_sum f vol (π₂.union_compl_to_subordinate π hπU r)) (integral I l f vol) ≤ ε₂ :=
     h.dist_integral_sum_integral_le_of_mem_base_set hpos₂
@@ -757,7 +757,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
   have hU' : π.Union = (π₀.bUnion_tagged πi).iUnion :=
     hU.trans (prepartition.Union_bUnion_partition _ hπip).symm
   have := h.dist_integral_sum_le_of_mem_base_set h0 δ'0 hπ this hU'
-  rw [integral_sum_bUnion_tagged] at this 
+  rw [integral_sum_bUnion_tagged] at this
   calc
     dist (integral_sum f vol π) (∑ J in π₀.boxes, integral J l f vol) ≤
         dist (integral_sum f vol π) (∑ J in π₀.boxes, integral_sum f vol (πi J)) +
@@ -831,7 +831,7 @@ def toBoxAdditive (h : Integrable I l f vol) : ι →ᵇᵃ[I] F
     where
   toFun J := integral J l f vol
   sum_partition_boxes' J hJ π hπ := by
-    replace hπ := hπ.Union_eq; rw [← prepartition.Union_top] at hπ 
+    replace hπ := hπ.Union_eq; rw [← prepartition.Union_top] at hπ
     rw [(h.to_subbox (WithTop.coe_le_coe.1 hJ)).sum_integral_congr hπ, prepartition.top_boxes,
       sum_singleton]
 #align box_integral.integrable.to_box_additive BoxIntegral.Integrable.toBoxAdditive
@@ -857,7 +857,7 @@ theorem integrable_of_continuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ 
     Integrable.{u, v, v} I l f μ.toBoxAdditive.toSMul :=
   by
   have huc := I.is_compact_Icc.uniform_continuous_on_of_continuous hc
-  rw [Metric.uniformContinuousOn_iff_le] at huc 
+  rw [Metric.uniformContinuousOn_iff_le] at huc
   refine' integrable_iff_cauchy_basis.2 fun ε ε0 => _
   rcases exists_pos_mul_lt ε0 (μ.to_box_additive I) with ⟨ε', ε0', hε⟩
   rcases huc ε' ε0' with ⟨δ, δ0 : 0 < δ, Hδ⟩
@@ -880,9 +880,9 @@ theorem integrable_of_continuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ 
     refine' (dist_triangle_left _ _ J.upper).trans (add_le_add (h₁.1 _ _ _) (h₂.1 _ _ _))
     · exact prepartition.bUnion_index_mem _ hJ
     · exact box.le_iff_Icc.1 (prepartition.le_bUnion_index _ hJ) J.upper_mem_Icc
-    · rw [_root_.inf_comm] at hJ 
+    · rw [_root_.inf_comm] at hJ
       exact prepartition.bUnion_index_mem _ hJ
-    · rw [_root_.inf_comm] at hJ 
+    · rw [_root_.inf_comm] at hJ
       exact box.le_iff_Icc.1 (prepartition.le_bUnion_index _ hJ) J.upper_mem_Icc
   refine' (norm_sum_le_of_le _ this).trans _
   rw [← Finset.sum_mul, μ.to_box_additive.sum_partition_boxes le_top (h₁p.inf h₂p)]
@@ -928,12 +928,12 @@ theorem BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l
     `J` in the `δ`-neighborhood of `x`. -/
   refine' ((l.has_basis_to_filter_Union_top _).tendsto_iffₓ Metric.nhds_basis_closedBall).2 _
   intro ε ε0
-  simp only [Subtype.exists'] at H₁ H₂ 
+  simp only [Subtype.exists'] at H₁ H₂
   choose! δ₁ Hδ₁ using H₁
   choose! δ₂ Hδ₂ using H₂
   have ε0' := half_pos ε0; have H0 : 0 < (2 ^ Fintype.card ι : ℝ) := pow_pos zero_lt_two _
   rcases hs.exists_pos_forall_sum_le (div_pos ε0' H0) with ⟨εs, hεs0, hεs⟩
-  simp only [le_div_iff' H0, mul_sum] at hεs 
+  simp only [le_div_iff' H0, mul_sum] at hεs
   rcases exists_pos_mul_lt ε0' (B I) with ⟨ε', ε'0, hεI⟩
   set δ : ℝ≥0 → ℝⁿ → Ioi (0 : ℝ) := fun c x => if x ∈ s then δ₁ c x (εs x) else (δ₂ c) x ε'
   refine' ⟨δ, fun c => l.r_cond_of_bRiemann_eq_ff hl, _⟩
@@ -951,7 +951,7 @@ theorem BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l
     have :
       ∀ J ∈ π.boxes.filter fun J => π.tag J ∈ s, dist (vol J (f <| π.tag J)) (g J) ≤ εs (π.tag J) :=
       by
-      intro J hJ; rw [Finset.mem_filter] at hJ ; cases' hJ with hJ hJs
+      intro J hJ; rw [Finset.mem_filter] at hJ; cases' hJ with hJ hJs
       refine'
         Hδ₁ c _ ⟨π.tag_mem_Icc _, hJs⟩ _ (hεs0 _) _ (π.le_of_mem' _ hJ) _ (hπδ.2 hlH J hJ) fun hD =>
           (Finset.le_sup hJ).trans (hπδ.3 hD)
@@ -971,7 +971,7 @@ theorem BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l
   have H₂ :
     ∀ J ∈ π.boxes.filter fun J => π.tag J ∉ s, dist (vol J (f <| π.tag J)) (g J) ≤ ε' * B J :=
     by
-    intro J hJ; rw [Finset.mem_filter] at hJ ; cases' hJ with hJ hJs
+    intro J hJ; rw [Finset.mem_filter] at hJ; cases' hJ with hJ hJs
     refine'
       Hδ₂ c _ ⟨π.tag_mem_Icc _, hJs⟩ _ ε'0 _ (π.le_of_mem' _ hJ) _ (fun hH => hπδ.2 hH J hJ)
         fun hD => (Finset.le_sup hJ).trans (hπδ.3 hD)
Diff
@@ -962,7 +962,7 @@ theorem BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l
     · rintro b -
       rw [← Nat.cast_two, ← Nat.cast_pow, ← nsmul_eq_mul]
       refine' nsmul_le_nsmul_left (hεs0 _).le _
-      refine' (Finset.card_le_of_subset _).trans ((hπδ.is_Henstock hlH).card_filter_tag_eq_le b)
+      refine' (Finset.card_le_card _).trans ((hπδ.is_Henstock hlH).card_filter_tag_eq_le b)
       exact filter_subset_filter _ (filter_subset _ _)
     · rw [Finset.coe_image, Set.image_subset_iff]
       exact fun J hJ => (Finset.mem_filter.1 hJ).2
Diff
@@ -961,7 +961,7 @@ theorem BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l
     refine' (sum_le_sum _).trans (hεs _ _)
     · rintro b -
       rw [← Nat.cast_two, ← Nat.cast_pow, ← nsmul_eq_mul]
-      refine' nsmul_le_nsmul (hεs0 _).le _
+      refine' nsmul_le_nsmul_left (hεs0 _).le _
       refine' (Finset.card_le_of_subset _).trans ((hπδ.is_Henstock hlH).card_filter_tag_eq_le b)
       exact filter_subset_filter _ (filter_subset _ _)
     · rw [Finset.coe_image, Set.image_subset_iff]
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Mathbin.Analysis.BoxIntegral.Partition.Filter
-import Mathbin.Analysis.BoxIntegral.Partition.Measure
-import Mathbin.Topology.UniformSpace.Compact
+import Analysis.BoxIntegral.Partition.Filter
+import Analysis.BoxIntegral.Partition.Measure
+import Topology.UniformSpace.Compact
 
 #align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"c20927220ef87bb4962ba08bf6da2ce3cf50a6dd"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module analysis.box_integral.basic
-! leanprover-community/mathlib commit c20927220ef87bb4962ba08bf6da2ce3cf50a6dd
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.BoxIntegral.Partition.Filter
 import Mathbin.Analysis.BoxIntegral.Partition.Measure
 import Mathbin.Topology.UniformSpace.Compact
 
+#align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"c20927220ef87bb4962ba08bf6da2ce3cf50a6dd"
+
 /-!
 # Integrals of Riemann, Henstock-Kurzweil, and McShane
 
Diff
@@ -72,7 +72,6 @@ variable {ι : Type u} {E : Type v} {F : Type w} [NormedAddCommGroup E] [NormedS
 
 open TaggedPrepartition
 
--- mathport name: «exprℝⁿ»
 local notation "ℝⁿ" => ι → ℝ
 
 /-!
@@ -122,12 +121,15 @@ theorem integralSum_inf_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[
 #align box_integral.integral_sum_inf_partition BoxIntegral.integralSum_inf_partition
 -/
 
+#print BoxIntegral.integralSum_fiberwise /-
 theorem integralSum_fiberwise {α} (g : Box ι → α) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
     (π : TaggedPrepartition I) :
     ∑ y in π.boxes.image g, integralSum f vol (π.filterₓ fun x => g x = y) = integralSum f vol π :=
   π.toPrepartition.sum_fiberwise g fun J => vol J (f <| π.Tag J)
 #align box_integral.integral_sum_fiberwise BoxIntegral.integralSum_fiberwise
+-/
 
+#print BoxIntegral.integralSum_sub_partitions /-
 theorem integralSum_sub_partitions (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
     {π₁ π₂ : TaggedPrepartition I} (h₁ : π₁.IsPartition) (h₂ : π₂.IsPartition) :
     integralSum f vol π₁ - integralSum f vol π₂ =
@@ -139,7 +141,9 @@ theorem integralSum_sub_partitions (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L
     integral_sum, integral_sum, Finset.sum_sub_distrib]
   simp only [inf_prepartition_to_prepartition, _root_.inf_comm]
 #align box_integral.integral_sum_sub_partitions BoxIntegral.integralSum_sub_partitions
+-/
 
+#print BoxIntegral.integralSum_disjUnion /-
 @[simp]
 theorem integralSum_disjUnion (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) {π₁ π₂ : TaggedPrepartition I}
     (h : Disjoint π₁.iUnion π₂.iUnion) :
@@ -151,18 +155,23 @@ theorem integralSum_disjUnion (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ]
   · rw [disj_union_tag_of_mem_left _ hJ]
   · rw [disj_union_tag_of_mem_right _ hJ]
 #align box_integral.integral_sum_disj_union BoxIntegral.integralSum_disjUnion
+-/
 
+#print BoxIntegral.integralSum_add /-
 @[simp]
 theorem integralSum_add (f g : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I) :
     integralSum (f + g) vol π = integralSum f vol π + integralSum g vol π := by
   simp only [integral_sum, Pi.add_apply, (vol _).map_add, Finset.sum_add_distrib]
 #align box_integral.integral_sum_add BoxIntegral.integralSum_add
+-/
 
+#print BoxIntegral.integralSum_neg /-
 @[simp]
 theorem integralSum_neg (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I) :
     integralSum (-f) vol π = -integralSum f vol π := by
   simp only [integral_sum, Pi.neg_apply, (vol _).map_neg, Finset.sum_neg_distrib]
 #align box_integral.integral_sum_neg BoxIntegral.integralSum_neg
+-/
 
 #print BoxIntegral.integralSum_smul /-
 @[simp]
@@ -216,6 +225,7 @@ theorem HasIntegral.tendsto (h : HasIntegral I l f vol y) :
 #align box_integral.has_integral.tendsto BoxIntegral.HasIntegral.tendsto
 -/
 
+#print BoxIntegral.hasIntegral_iff /-
 /-- The `ε`-`δ` definition of `box_integral.has_integral`. -/
 theorem hasIntegral_iff :
     HasIntegral I l f vol y ↔
@@ -226,7 +236,9 @@ theorem hasIntegral_iff :
   ((l.hasBasis_toFilteriUnion_top I).tendsto_iffₓ nhds_basis_closedBall).trans <| by
     simp [@forall_swap ℝ≥0 (tagged_prepartition I)]
 #align box_integral.has_integral_iff BoxIntegral.hasIntegral_iff
+-/
 
+#print BoxIntegral.HasIntegral.of_mul /-
 /-- Quite often it is more natural to prove an estimate of the form `a * ε`, not `ε` in the RHS of
 `box_integral.has_integral_iff`, so we provide this auxiliary lemma.  -/
 theorem BoxIntegral.HasIntegral.of_mul (a : ℝ)
@@ -244,6 +256,7 @@ theorem BoxIntegral.HasIntegral.of_mul (a : ℝ)
   rcases h ε' hε' with ⟨r, hr, H⟩
   exact ⟨r, hr, fun c π hπ hπp => (H c π hπ hπp).trans ha.le⟩
 #align box_integral.has_integral_of_mul BoxIntegral.HasIntegral.of_mul
+-/
 
 #print BoxIntegral.integrable_iff_cauchy /-
 theorem integrable_iff_cauchy [CompleteSpace F] :
@@ -252,6 +265,7 @@ theorem integrable_iff_cauchy [CompleteSpace F] :
 #align box_integral.integrable_iff_cauchy BoxIntegral.integrable_iff_cauchy
 -/
 
+#print BoxIntegral.integrable_iff_cauchy_basis /-
 /-- In a complete space, a function is integrable if and only if its integral sums form a Cauchy
 net. Here we restate this fact in terms of `∀ ε > 0, ∃ r, ...`. -/
 theorem integrable_iff_cauchy_basis [CompleteSpace F] :
@@ -275,11 +289,14 @@ theorem integrable_iff_cauchy_basis [CompleteSpace F] :
       ⟨fun H c₁ c₂ π₁ π₂ h₁ hU₁ h₂ hU₂ => H π₁ π₂ c₁ h₁ hU₁ c₂ h₂ hU₂,
         fun H π₁ π₂ c₁ h₁ hU₁ c₂ h₂ hU₂ => H c₁ c₂ π₁ π₂ h₁ hU₁ h₂ hU₂⟩
 #align box_integral.integrable_iff_cauchy_basis BoxIntegral.integrable_iff_cauchy_basis
+-/
 
+#print BoxIntegral.HasIntegral.mono /-
 theorem HasIntegral.mono {l₁ l₂ : IntegrationParams} (h : HasIntegral I l₁ f vol y) (hl : l₂ ≤ l₁) :
     HasIntegral I l₂ f vol y :=
   h.mono_left <| IntegrationParams.toFilteriUnion_mono _ hl _
 #align box_integral.has_integral.mono BoxIntegral.HasIntegral.mono
+-/
 
 #print BoxIntegral.Integrable.hasIntegral /-
 protected theorem Integrable.hasIntegral (h : Integrable I l f vol) :
@@ -288,9 +305,11 @@ protected theorem Integrable.hasIntegral (h : Integrable I l f vol) :
 #align box_integral.integrable.has_integral BoxIntegral.Integrable.hasIntegral
 -/
 
+#print BoxIntegral.Integrable.mono /-
 theorem Integrable.mono {l'} (h : Integrable I l f vol) (hle : l' ≤ l) : Integrable I l' f vol :=
   ⟨_, h.HasIntegral.mono hle⟩
 #align box_integral.integrable.mono BoxIntegral.Integrable.mono
+-/
 
 #print BoxIntegral.HasIntegral.unique /-
 theorem HasIntegral.unique (h : HasIntegral I l f vol y) (h' : HasIntegral I l f vol y') : y = y' :=
@@ -310,15 +329,19 @@ theorem HasIntegral.integral_eq (h : HasIntegral I l f vol y) : integral I l f v
 #align box_integral.has_integral.integral_eq BoxIntegral.HasIntegral.integral_eq
 -/
 
+#print BoxIntegral.HasIntegral.add /-
 theorem HasIntegral.add (h : HasIntegral I l f vol y) (h' : HasIntegral I l g vol y') :
     HasIntegral I l (f + g) vol (y + y') := by
   simpa only [has_integral, ← integral_sum_add] using h.add h'
 #align box_integral.has_integral.add BoxIntegral.HasIntegral.add
+-/
 
+#print BoxIntegral.Integrable.add /-
 theorem Integrable.add (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
     Integrable I l (f + g) vol :=
   (hf.HasIntegral.add hg.HasIntegral).Integrable
 #align box_integral.integrable.add BoxIntegral.Integrable.add
+-/
 
 #print BoxIntegral.integral_add /-
 theorem integral_add (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
@@ -327,22 +350,30 @@ theorem integral_add (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
 #align box_integral.integral_add BoxIntegral.integral_add
 -/
 
+#print BoxIntegral.HasIntegral.neg /-
 theorem HasIntegral.neg (hf : HasIntegral I l f vol y) : HasIntegral I l (-f) vol (-y) := by
   simpa only [has_integral, ← integral_sum_neg] using hf.neg
 #align box_integral.has_integral.neg BoxIntegral.HasIntegral.neg
+-/
 
+#print BoxIntegral.Integrable.neg /-
 theorem Integrable.neg (hf : Integrable I l f vol) : Integrable I l (-f) vol :=
   hf.HasIntegral.neg.Integrable
 #align box_integral.integrable.neg BoxIntegral.Integrable.neg
+-/
 
+#print BoxIntegral.Integrable.of_neg /-
 theorem Integrable.of_neg (hf : Integrable I l (-f) vol) : Integrable I l f vol :=
   neg_neg f ▸ hf.neg
 #align box_integral.integrable.of_neg BoxIntegral.Integrable.of_neg
+-/
 
+#print BoxIntegral.integrable_neg /-
 @[simp]
 theorem integrable_neg : Integrable I l (-f) vol ↔ Integrable I l f vol :=
   ⟨fun h => h.of_neg, fun h => h.neg⟩
 #align box_integral.integrable_neg BoxIntegral.integrable_neg
+-/
 
 #print BoxIntegral.integral_neg /-
 @[simp]
@@ -352,14 +383,18 @@ theorem integral_neg : integral I l (-f) vol = -integral I l f vol :=
 #align box_integral.integral_neg BoxIntegral.integral_neg
 -/
 
+#print BoxIntegral.HasIntegral.sub /-
 theorem HasIntegral.sub (h : HasIntegral I l f vol y) (h' : HasIntegral I l g vol y') :
     HasIntegral I l (f - g) vol (y - y') := by simpa only [sub_eq_add_neg] using h.add h'.neg
 #align box_integral.has_integral.sub BoxIntegral.HasIntegral.sub
+-/
 
+#print BoxIntegral.Integrable.sub /-
 theorem Integrable.sub (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
     Integrable I l (f - g) vol :=
   (hf.HasIntegral.sub hg.HasIntegral).Integrable
 #align box_integral.integrable.sub BoxIntegral.Integrable.sub
+-/
 
 #print BoxIntegral.integral_sub /-
 theorem integral_sub (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
@@ -368,16 +403,20 @@ theorem integral_sub (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
 #align box_integral.integral_sub BoxIntegral.integral_sub
 -/
 
+#print BoxIntegral.hasIntegral_const /-
 theorem hasIntegral_const (c : E) : HasIntegral I l (fun _ => c) vol (vol I c) :=
   tendsto_const_nhds.congr' <|
     (l.eventually_isPartition I).mono fun π hπ =>
       ((vol.map ⟨fun g : E →L[ℝ] F => g c, rfl, fun _ _ => rfl⟩).sum_partition_boxes le_top hπ).symm
 #align box_integral.has_integral_const BoxIntegral.hasIntegral_const
+-/
 
+#print BoxIntegral.integral_const /-
 @[simp]
 theorem integral_const (c : E) : integral I l (fun _ => c) vol = vol I c :=
   (hasIntegral_const c).integral_eq
 #align box_integral.integral_const BoxIntegral.integral_const
+-/
 
 #print BoxIntegral.integrable_const /-
 theorem integrable_const (c : E) : Integrable I l (fun _ => c) vol :=
@@ -385,13 +424,17 @@ theorem integrable_const (c : E) : Integrable I l (fun _ => c) vol :=
 #align box_integral.integrable_const BoxIntegral.integrable_const
 -/
 
+#print BoxIntegral.hasIntegral_zero /-
 theorem hasIntegral_zero : HasIntegral I l (fun _ => (0 : E)) vol 0 := by
   simpa only [← (vol I).map_zero] using has_integral_const (0 : E)
 #align box_integral.has_integral_zero BoxIntegral.hasIntegral_zero
+-/
 
+#print BoxIntegral.integrable_zero /-
 theorem integrable_zero : Integrable I l (fun _ => (0 : E)) vol :=
   ⟨0, hasIntegral_zero⟩
 #align box_integral.integrable_zero BoxIntegral.integrable_zero
+-/
 
 #print BoxIntegral.integral_zero /-
 theorem integral_zero : integral I l (fun _ => (0 : E)) vol = 0 :=
@@ -399,6 +442,7 @@ theorem integral_zero : integral I l (fun _ => (0 : E)) vol = 0 :=
 #align box_integral.integral_zero BoxIntegral.integral_zero
 -/
 
+#print BoxIntegral.HasIntegral.sum /-
 theorem BoxIntegral.HasIntegral.sum {α : Type _} {s : Finset α} {f : α → ℝⁿ → E} {g : α → F}
     (h : ∀ i ∈ s, HasIntegral I l (f i) vol (g i)) :
     HasIntegral I l (fun x => ∑ i in s, f i x) vol (∑ i in s, g i) :=
@@ -407,6 +451,7 @@ theorem BoxIntegral.HasIntegral.sum {α : Type _} {s : Finset α} {f : α → 
   simp only [Finset.sum_insert ha]; rw [Finset.forall_mem_insert] at h 
   exact h.1.add (ihs h.2)
 #align box_integral.has_integral_sum BoxIntegral.HasIntegral.sum
+-/
 
 #print BoxIntegral.HasIntegral.smul /-
 theorem HasIntegral.smul (hf : HasIntegral I l f vol y) (c : ℝ) :
@@ -422,10 +467,12 @@ theorem Integrable.smul (hf : Integrable I l f vol) (c : ℝ) : Integrable I l (
 #align box_integral.integrable.smul BoxIntegral.Integrable.smul
 -/
 
+#print BoxIntegral.Integrable.of_smul /-
 theorem Integrable.of_smul {c : ℝ} (hf : Integrable I l (c • f) vol) (hc : c ≠ 0) :
     Integrable I l f vol := by convert hf.smul c⁻¹; ext x;
   simp only [Pi.smul_apply, inv_smul_smul₀ hc]
 #align box_integral.integrable.of_smul BoxIntegral.Integrable.of_smul
+-/
 
 #print BoxIntegral.integral_smul /-
 @[simp]
@@ -441,6 +488,7 @@ theorem integral_smul (c : ℝ) : integral I l (fun x => c • f x) vol = c •
 
 open MeasureTheory
 
+#print BoxIntegral.integral_nonneg /-
 /-- The integral of a nonnegative function w.r.t. a volume generated by a locally-finite measure is
 nonnegative. -/
 theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (μ : Measure ℝⁿ)
@@ -451,7 +499,9 @@ theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (
     exact mul_nonneg ENNReal.toReal_nonneg (hg _ <| π.tag_mem_Icc _)
   · rw [integral, dif_neg hgi]
 #align box_integral.integral_nonneg BoxIntegral.integral_nonneg
+-/
 
+#print BoxIntegral.norm_integral_le_of_norm_le /-
 /-- If `‖f x‖ ≤ g x` on `[l, u]` and `g` is integrable, then the norm of the integral of `f` is less
 than or equal to the integral of `g`. -/
 theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc, ‖f x‖ ≤ g x) (μ : Measure ℝⁿ)
@@ -467,11 +517,14 @@ theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc,
   · rw [integral, dif_neg hfi, norm_zero]
     exact integral_nonneg (fun x hx => (norm_nonneg _).trans (hle x hx)) μ
 #align box_integral.norm_integral_le_of_norm_le BoxIntegral.norm_integral_le_of_norm_le
+-/
 
+#print BoxIntegral.norm_integral_le_of_le_const /-
 theorem norm_integral_le_of_le_const {c : ℝ} (hc : ∀ x ∈ I.Icc, ‖f x‖ ≤ c) (μ : Measure ℝⁿ)
     [IsLocallyFiniteMeasure μ] : ‖(integral I l f μ.toBoxAdditive.toSMul : E)‖ ≤ (μ I).toReal * c :=
   by simpa only [integral_const] using norm_integral_le_of_norm_le hc μ (integrable_const c)
 #align box_integral.norm_integral_le_of_le_const BoxIntegral.norm_integral_le_of_le_const
+-/
 
 /-!
 # Henstock-Sacks inequality and integrability on subboxes
@@ -504,6 +557,7 @@ The proof is mostly based on
 
 namespace Integrable
 
+#print BoxIntegral.Integrable.convergenceR /-
 /-- If `ε > 0`, then `box_integral.integrable.convergence_r` is a function `r : ℝ≥0 → ℝⁿ → (0, ∞)`
 such that for every `c : ℝ≥0`, for every tagged partition `π` subordinate to `r` (and satisfying
 additional distortion estimates if `box_integral.integration_params.bDistortion l = tt`), the
@@ -515,6 +569,7 @@ def convergenceR (h : Integrable I l f vol) (ε : ℝ) : ℝ≥0 → ℝⁿ →
   if hε : 0 < ε then (hasIntegral_iff.1 h.HasIntegral ε hε).some
   else fun _ _ => ⟨1, Set.mem_Ioi.2 zero_lt_one⟩
 #align box_integral.integrable.convergence_r BoxIntegral.Integrable.convergenceR
+-/
 
 variable {c c₁ c₂ : ℝ≥0} {ε ε₁ ε₂ : ℝ} {π₁ π₂ : TaggedPrepartition I}
 
@@ -526,6 +581,7 @@ theorem convergenceR_cond (h : Integrable I l f vol) (ε : ℝ) (c : ℝ≥0) :
 #align box_integral.integrable.convergence_r_cond BoxIntegral.Integrable.convergenceR_cond
 -/
 
+#print BoxIntegral.Integrable.dist_integralSum_integral_le_of_memBaseSet /-
 theorem dist_integralSum_integral_le_of_memBaseSet (h : Integrable I l f vol) (h₀ : 0 < ε)
     (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) (hπp : π.IsPartition) :
     dist (integralSum f vol π) (integral I l f vol) ≤ ε :=
@@ -533,7 +589,9 @@ theorem dist_integralSum_integral_le_of_memBaseSet (h : Integrable I l f vol) (h
   rw [convergence_r, dif_pos h₀] at hπ 
   exact (has_integral_iff.1 h.has_integral ε h₀).choose_spec.2 c _ hπ hπp
 #align box_integral.integrable.dist_integral_sum_integral_le_of_mem_base_set BoxIntegral.Integrable.dist_integralSum_integral_le_of_memBaseSet
+-/
 
+#print BoxIntegral.Integrable.dist_integralSum_le_of_memBaseSet /-
 /-- **Henstock-Sacks inequality**. Let `r₁ r₂ : ℝⁿ → (0, ∞)` be function such that for any tagged
 *partition* of `I` subordinate to `rₖ`, `k=1,2`, the integral sum of `f` over this partition differs
 from the integral of `f` by at most `εₖ`. Then for any two tagged *prepartition* `π₁ π₂` subordinate
@@ -572,7 +630,9 @@ theorem dist_integralSum_le_of_memBaseSet (h : Integrable I l f vol) (hpos₁ :
       (is_partition_union_compl_to_subordinate _ _ _ _)
   simpa [union_compl_to_subordinate] using (dist_triangle_right _ _ _).trans (add_le_add H₁ H₂)
 #align box_integral.integrable.dist_integral_sum_le_of_mem_base_set BoxIntegral.Integrable.dist_integralSum_le_of_memBaseSet
+-/
 
+#print BoxIntegral.Integrable.tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity /-
 /-- If `f` is integrable on `I` along `l`, then for two sufficiently fine tagged prepartitions
 (in the sense of the filter `box_integral.integration_params.to_filter l I`) such that they cover
 the same part of `I`, the integral sums of `f` over `π₁` and `π₂` are very close to each other.  -/
@@ -590,6 +650,7 @@ theorem tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity (h : Int
   rw [← add_halves ε]
   exact h.dist_integral_sum_le_of_mem_base_set ε0 ε0 h₁.some_spec h₂.some_spec hU
 #align box_integral.integrable.tendsto_integral_sum_to_filter_prod_self_inf_Union_eq_uniformity BoxIntegral.Integrable.tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity
+-/
 
 #print BoxIntegral.Integrable.cauchy_map_integralSum_toFilteriUnion /-
 /-- If `f` is integrable on a box `I` along `l`, then for any fixed subset `s` of `I` that can be
@@ -641,6 +702,7 @@ theorem tendsto_integralSum_toFilteriUnion_single (h : Integrable I l f vol) (hJ
 #align box_integral.integrable.tendsto_integral_sum_to_filter_Union_single BoxIntegral.Integrable.tendsto_integralSum_toFilteriUnion_single
 -/
 
+#print BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq /-
 /-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
 *partition* of `I` subordinate to `r`, the integral sum of `f` over this partition differs from the
 integral of `f` by at most `ε`. Then for any tagged *prepartition* `π` subordinate to `r`, the
@@ -707,7 +769,9 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
     _ ≤ ε + δ' + ∑ J in π₀.boxes, δ' := (add_le_add this (dist_sum_sum_le_of_le _ hπiδ'))
     _ = ε + δ := by field_simp [H0.ne']; ring
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq
+-/
 
+#print BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet /-
 /-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
 *partition* of `I` subordinate to `r`, the integral sum of `f` over this partition differs from the
 integral of `f` by at most `ε`. Then for any tagged *prepartition* `π` subordinate to `r`, the
@@ -726,6 +790,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet (h : Integrable I l f vol
     dist (integralSum f vol π) (∑ J in π.boxes, integral J l f vol) ≤ ε :=
   h.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq h0 hπ rfl
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet
+-/
 
 #print BoxIntegral.Integrable.tendsto_integralSum_sum_integral /-
 /-- Integral sum of `f` over a tagged prepartition `π` such that `π.Union = π₀.Union` tends to the
@@ -786,6 +851,7 @@ open MeasureTheory
 
 variable (l)
 
+#print BoxIntegral.integrable_of_continuousOn /-
 /-- A continuous function is box-integrable with respect to any locally finite measure.
 
 This is true for any volume with bounded variation. -/
@@ -825,9 +891,11 @@ theorem integrable_of_continuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ 
   rw [← Finset.sum_mul, μ.to_box_additive.sum_partition_boxes le_top (h₁p.inf h₂p)]
   exact hε.le
 #align box_integral.integrable_of_continuous_on BoxIntegral.integrable_of_continuousOn
+-/
 
 variable {l}
 
+#print BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO /-
 /-- This is an auxiliary lemma used to prove two statements at once. Use one of the next two
 lemmas instead. -/
 theorem BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l.bRiemann = false)
@@ -918,7 +986,9 @@ theorem BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l
   · rw [← mul_sum, B.sum_partition_boxes le_rfl hπp, mul_comm]
     exact hεI.le
 #align box_integral.has_integral_of_bRiemann_eq_ff_of_forall_is_o BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO
+-/
 
+#print BoxIntegral.HasIntegral.of_le_Henstock_of_forall_isLittleO /-
 /-- A function `f` has Henstock (or `⊥`) integral over `I` is equal to the value of a box-additive
 function `g` on `I` provided that `vol J (f x)` is sufficiently close to `g J` for sufficiently
 small boxes `J ∋ x`. This lemma is useful to prove, e.g., to prove the Divergence theorem for
@@ -963,7 +1033,9 @@ theorem BoxIntegral.HasIntegral.of_le_Henstock_of_forall_isLittleO (hl : l ≤ H
       B hB0 _ s hs (fun _ => A) H₁ <|
     by simpa only [A, true_imp_iff] using H₂
 #align box_integral.has_integral_of_le_Henstock_of_forall_is_o BoxIntegral.HasIntegral.of_le_Henstock_of_forall_isLittleO
+-/
 
+#print BoxIntegral.HasIntegral.mcShane_of_forall_isLittleO /-
 /-- Suppose that there exists a nonnegative box-additive function `B` with the following property.
 
 For every `c : ℝ≥0`, a point `x ∈ I.Icc`, and a positive `ε` there exists `δ > 0` such that for any
@@ -988,6 +1060,7 @@ theorem BoxIntegral.HasIntegral.mcShane_of_forall_isLittleO (B : ι →ᵇᵃ[I]
       (fun ⟨x, hx⟩ => hx.elim) fun c x hx => hx.2.elim) <|
     by simpa only [McShane, Bool.coe_sort_false, false_imp_iff, true_imp_iff, diff_empty] using H
 #align box_integral.has_integral_McShane_of_forall_is_o BoxIntegral.HasIntegral.mcShane_of_forall_isLittleO
+-/
 
 end BoxIntegral
 
Diff
@@ -105,7 +105,7 @@ theorem integralSum_biUnion_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E 
   by
   refine' (π.to_prepartition.sum_bUnion_boxes _ _).trans (sum_congr rfl fun J hJ => _)
   calc
-    (∑ J' in (πi J).boxes, vol J' (f (π.tag <| π.to_prepartition.bUnion_index πi J'))) =
+    ∑ J' in (πi J).boxes, vol J' (f (π.tag <| π.to_prepartition.bUnion_index πi J')) =
         ∑ J' in (πi J).boxes, vol J' (f (π.tag J)) :=
       sum_congr rfl fun J' hJ' => by rw [prepartition.bUnion_index_of_mem _ hJ hJ']
     _ = vol J (f (π.tag J)) :=
@@ -124,8 +124,7 @@ theorem integralSum_inf_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[
 
 theorem integralSum_fiberwise {α} (g : Box ι → α) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
     (π : TaggedPrepartition I) :
-    (∑ y in π.boxes.image g, integralSum f vol (π.filterₓ fun x => g x = y)) =
-      integralSum f vol π :=
+    ∑ y in π.boxes.image g, integralSum f vol (π.filterₓ fun x => g x = y) = integralSum f vol π :=
   π.toPrepartition.sum_fiberwise g fun J => vol J (f <| π.Tag J)
 #align box_integral.integral_sum_fiberwise BoxIntegral.integralSum_fiberwise
 
@@ -133,8 +132,8 @@ theorem integralSum_sub_partitions (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L
     {π₁ π₂ : TaggedPrepartition I} (h₁ : π₁.IsPartition) (h₂ : π₂.IsPartition) :
     integralSum f vol π₁ - integralSum f vol π₂ =
       ∑ J in (π₁.toPrepartition ⊓ π₂.toPrepartition).boxes,
-        vol J (f <| (π₁.infPrepartition π₂.toPrepartition).Tag J) -
-          vol J (f <| (π₂.infPrepartition π₁.toPrepartition).Tag J) :=
+        (vol J (f <| (π₁.infPrepartition π₂.toPrepartition).Tag J) -
+          vol J (f <| (π₂.infPrepartition π₁.toPrepartition).Tag J)) :=
   by
   rw [← integral_sum_inf_partition f vol π₁ h₂, ← integral_sum_inf_partition f vol π₂ h₁,
     integral_sum, integral_sum, Finset.sum_sub_distrib]
@@ -751,7 +750,7 @@ of `f` over the boxes of `π₁` is equal to the sum of integrals of `f` over th
 See also `box_integral.integrable.to_box_additive` for a bundled version. -/
 theorem sum_integral_congr (h : Integrable I l f vol) {π₁ π₂ : Prepartition I}
     (hU : π₁.iUnion = π₂.iUnion) :
-    (∑ J in π₁.boxes, integral J l f vol) = ∑ J in π₂.boxes, integral J l f vol :=
+    ∑ J in π₁.boxes, integral J l f vol = ∑ J in π₂.boxes, integral J l f vol :=
   by
   refine' tendsto_nhds_unique (h.tendsto_integral_sum_sum_integral π₁) _
   rw [l.to_filter_Union_congr _ hU]
Diff
@@ -111,7 +111,6 @@ theorem integralSum_biUnion_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E 
     _ = vol J (f (π.tag J)) :=
       (vol.map ⟨fun g : E →L[ℝ] F => g (f (π.tag J)), rfl, fun _ _ => rfl⟩).sum_partition_boxes
         le_top (hπi J hJ)
-    
 #align box_integral.integral_sum_bUnion_partition BoxIntegral.integralSum_biUnion_partition
 -/
 
@@ -708,7 +707,6 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
       dist_triangle _ _ _
     _ ≤ ε + δ' + ∑ J in π₀.boxes, δ' := (add_le_add this (dist_sum_sum_le_of_le _ hπiδ'))
     _ = ε + δ := by field_simp [H0.ne']; ring
-    
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq
 
 /-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module analysis.box_integral.basic
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit c20927220ef87bb4962ba08bf6da2ce3cf50a6dd
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Topology.UniformSpace.Compact
 /-!
 # Integrals of Riemann, Henstock-Kurzweil, and McShane
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we define the integral of a function over a box in `ℝⁿ. The same definition works for
 Riemann, Henstock-Kurzweil, and McShane integrals.
 
Diff
@@ -77,12 +77,15 @@ local notation "ℝⁿ" => ι → ℝ
 -/
 
 
+#print BoxIntegral.integralSum /-
 /-- The integral sum of `f : ℝⁿ → E` over a tagged prepartition `π` w.r.t. box-additive volume `vol`
 with codomain `E →L[ℝ] F` is the sum of `vol J (f (π.tag J))` over all boxes of `π`. -/
 def integralSum (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I) : F :=
   ∑ J in π.boxes, vol J (f (π.Tag J))
 #align box_integral.integral_sum BoxIntegral.integralSum
+-/
 
+#print BoxIntegral.integralSum_biUnionTagged /-
 theorem integralSum_biUnionTagged (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : Prepartition I)
     (πi : ∀ J, TaggedPrepartition J) :
     integralSum f vol (π.biUnionTagged πi) = ∑ J in π.boxes, integralSum f vol (πi J) :=
@@ -90,9 +93,11 @@ theorem integralSum_biUnionTagged (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[
   refine' (π.sum_bUnion_boxes _ _).trans (sum_congr rfl fun J hJ => sum_congr rfl fun J' hJ' => _)
   rw [π.tag_bUnion_tagged hJ hJ']
 #align box_integral.integral_sum_bUnion_tagged BoxIntegral.integralSum_biUnionTagged
+-/
 
-theorem integralSum_bUnion_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I)
-    (πi : ∀ J, Prepartition J) (hπi : ∀ J ∈ π, (πi J).IsPartition) :
+#print BoxIntegral.integralSum_biUnion_partition /-
+theorem integralSum_biUnion_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
+    (π : TaggedPrepartition I) (πi : ∀ J, Prepartition J) (hπi : ∀ J ∈ π, (πi J).IsPartition) :
     integralSum f vol (π.biUnionPrepartition πi) = integralSum f vol π :=
   by
   refine' (π.to_prepartition.sum_bUnion_boxes _ _).trans (sum_congr rfl fun J hJ => _)
@@ -104,13 +109,16 @@ theorem integralSum_bUnion_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E 
       (vol.map ⟨fun g : E →L[ℝ] F => g (f (π.tag J)), rfl, fun _ _ => rfl⟩).sum_partition_boxes
         le_top (hπi J hJ)
     
-#align box_integral.integral_sum_bUnion_partition BoxIntegral.integralSum_bUnion_partition
+#align box_integral.integral_sum_bUnion_partition BoxIntegral.integralSum_biUnion_partition
+-/
 
+#print BoxIntegral.integralSum_inf_partition /-
 theorem integralSum_inf_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I)
     {π' : Prepartition I} (h : π'.IsPartition) :
     integralSum f vol (π.infPrepartition π') = integralSum f vol π :=
-  integralSum_bUnion_partition f vol π _ fun J hJ => h.restrict (Prepartition.le_of_mem _ hJ)
+  integralSum_biUnion_partition f vol π _ fun J hJ => h.restrict (Prepartition.le_of_mem _ hJ)
 #align box_integral.integral_sum_inf_partition BoxIntegral.integralSum_inf_partition
+-/
 
 theorem integralSum_fiberwise {α} (g : Box ι → α) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
     (π : TaggedPrepartition I) :
@@ -155,11 +163,13 @@ theorem integralSum_neg (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (
   simp only [integral_sum, Pi.neg_apply, (vol _).map_neg, Finset.sum_neg_distrib]
 #align box_integral.integral_sum_neg BoxIntegral.integralSum_neg
 
+#print BoxIntegral.integralSum_smul /-
 @[simp]
 theorem integralSum_smul (c : ℝ) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I) :
     integralSum (c • f) vol π = c • integralSum f vol π := by
   simp only [integral_sum, Finset.smul_sum, Pi.smul_apply, ContinuousLinearMap.map_smul]
 #align box_integral.integral_sum_smul BoxIntegral.integralSum_smul
+-/
 
 variable [Fintype ι]
 
@@ -168,6 +178,7 @@ variable [Fintype ι]
 -/
 
 
+#print BoxIntegral.HasIntegral /-
 /-- The predicate `has_integral I l f vol y` says that `y` is the integral of `f` over `I` along `l`
 w.r.t. volume `vol`. This means that integral sums of `f` tend to `𝓝 y` along
 `box_integral.integration_params.to_filter_Union I ⊤`. -/
@@ -175,27 +186,34 @@ def HasIntegral (I : Box ι) (l : IntegrationParams) (f : ℝⁿ → E) (vol : 
     Prop :=
   Tendsto (integralSum f vol) (l.toFilteriUnion I ⊤) (𝓝 y)
 #align box_integral.has_integral BoxIntegral.HasIntegral
+-/
 
+#print BoxIntegral.Integrable /-
 /-- A function is integrable if there exists a vector that satisfies the `has_integral`
 predicate. -/
 def Integrable (I : Box ι) (l : IntegrationParams) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) :=
   ∃ y, HasIntegral I l f vol y
 #align box_integral.integrable BoxIntegral.Integrable
+-/
 
+#print BoxIntegral.integral /-
 /-- The integral of a function `f` over a box `I` along a filter `l` w.r.t. a volume `vol`.  Returns
 zero on non-integrable functions. -/
 def integral (I : Box ι) (l : IntegrationParams) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) :=
   if h : Integrable I l f vol then h.some else 0
 #align box_integral.integral BoxIntegral.integral
+-/
 
 variable {l : IntegrationParams} {f g : ℝⁿ → E} {vol : ι →ᵇᵃ E →L[ℝ] F} {y y' : F}
 
+#print BoxIntegral.HasIntegral.tendsto /-
 /-- Reinterpret `box_integral.has_integral` as `filter.tendsto`, e.g., dot-notation theorems
 that are shadowed in the `box_integral.has_integral` namespace. -/
 theorem HasIntegral.tendsto (h : HasIntegral I l f vol y) :
     Tendsto (integralSum f vol) (l.toFilteriUnion I ⊤) (𝓝 y) :=
   h
 #align box_integral.has_integral.tendsto BoxIntegral.HasIntegral.tendsto
+-/
 
 /-- The `ε`-`δ` definition of `box_integral.has_integral`. -/
 theorem hasIntegral_iff :
@@ -210,7 +228,7 @@ theorem hasIntegral_iff :
 
 /-- Quite often it is more natural to prove an estimate of the form `a * ε`, not `ε` in the RHS of
 `box_integral.has_integral_iff`, so we provide this auxiliary lemma.  -/
-theorem hasIntegralOfMul (a : ℝ)
+theorem BoxIntegral.HasIntegral.of_mul (a : ℝ)
     (h :
       ∀ ε : ℝ,
         0 < ε →
@@ -224,12 +242,14 @@ theorem hasIntegralOfMul (a : ℝ)
   rcases exists_pos_mul_lt hε a with ⟨ε', hε', ha⟩
   rcases h ε' hε' with ⟨r, hr, H⟩
   exact ⟨r, hr, fun c π hπ hπp => (H c π hπ hπp).trans ha.le⟩
-#align box_integral.has_integral_of_mul BoxIntegral.hasIntegralOfMul
+#align box_integral.has_integral_of_mul BoxIntegral.HasIntegral.of_mul
 
+#print BoxIntegral.integrable_iff_cauchy /-
 theorem integrable_iff_cauchy [CompleteSpace F] :
     Integrable I l f vol ↔ Cauchy ((l.toFilteriUnion I ⊤).map (integralSum f vol)) :=
   cauchy_map_iff_exists_tendsto.symm
 #align box_integral.integrable_iff_cauchy BoxIntegral.integrable_iff_cauchy
+-/
 
 /-- In a complete space, a function is integrable if and only if its integral sums form a Cauchy
 net. Here we restate this fact in terms of `∀ ε > 0, ∃ r, ...`. -/
@@ -260,26 +280,34 @@ theorem HasIntegral.mono {l₁ l₂ : IntegrationParams} (h : HasIntegral I l₁
   h.mono_left <| IntegrationParams.toFilteriUnion_mono _ hl _
 #align box_integral.has_integral.mono BoxIntegral.HasIntegral.mono
 
+#print BoxIntegral.Integrable.hasIntegral /-
 protected theorem Integrable.hasIntegral (h : Integrable I l f vol) :
     HasIntegral I l f vol (integral I l f vol) := by rw [integral, dif_pos h];
   exact Classical.choose_spec h
 #align box_integral.integrable.has_integral BoxIntegral.Integrable.hasIntegral
+-/
 
 theorem Integrable.mono {l'} (h : Integrable I l f vol) (hle : l' ≤ l) : Integrable I l' f vol :=
   ⟨_, h.HasIntegral.mono hle⟩
 #align box_integral.integrable.mono BoxIntegral.Integrable.mono
 
+#print BoxIntegral.HasIntegral.unique /-
 theorem HasIntegral.unique (h : HasIntegral I l f vol y) (h' : HasIntegral I l f vol y') : y = y' :=
   tendsto_nhds_unique h h'
 #align box_integral.has_integral.unique BoxIntegral.HasIntegral.unique
+-/
 
+#print BoxIntegral.HasIntegral.integrable /-
 theorem HasIntegral.integrable (h : HasIntegral I l f vol y) : Integrable I l f vol :=
   ⟨_, h⟩
 #align box_integral.has_integral.integrable BoxIntegral.HasIntegral.integrable
+-/
 
+#print BoxIntegral.HasIntegral.integral_eq /-
 theorem HasIntegral.integral_eq (h : HasIntegral I l f vol y) : integral I l f vol = y :=
   h.Integrable.HasIntegral.unique h
 #align box_integral.has_integral.integral_eq BoxIntegral.HasIntegral.integral_eq
+-/
 
 theorem HasIntegral.add (h : HasIntegral I l f vol y) (h' : HasIntegral I l g vol y') :
     HasIntegral I l (f + g) vol (y + y') := by
@@ -291,10 +319,12 @@ theorem Integrable.add (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
   (hf.HasIntegral.add hg.HasIntegral).Integrable
 #align box_integral.integrable.add BoxIntegral.Integrable.add
 
+#print BoxIntegral.integral_add /-
 theorem integral_add (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
     integral I l (f + g) vol = integral I l f vol + integral I l g vol :=
   (hf.HasIntegral.add hg.HasIntegral).integral_eq
 #align box_integral.integral_add BoxIntegral.integral_add
+-/
 
 theorem HasIntegral.neg (hf : HasIntegral I l f vol y) : HasIntegral I l (-f) vol (-y) := by
   simpa only [has_integral, ← integral_sum_neg] using hf.neg
@@ -304,20 +334,22 @@ theorem Integrable.neg (hf : Integrable I l f vol) : Integrable I l (-f) vol :=
   hf.HasIntegral.neg.Integrable
 #align box_integral.integrable.neg BoxIntegral.Integrable.neg
 
-theorem Integrable.ofNeg (hf : Integrable I l (-f) vol) : Integrable I l f vol :=
+theorem Integrable.of_neg (hf : Integrable I l (-f) vol) : Integrable I l f vol :=
   neg_neg f ▸ hf.neg
-#align box_integral.integrable.of_neg BoxIntegral.Integrable.ofNeg
+#align box_integral.integrable.of_neg BoxIntegral.Integrable.of_neg
 
 @[simp]
 theorem integrable_neg : Integrable I l (-f) vol ↔ Integrable I l f vol :=
   ⟨fun h => h.of_neg, fun h => h.neg⟩
 #align box_integral.integrable_neg BoxIntegral.integrable_neg
 
+#print BoxIntegral.integral_neg /-
 @[simp]
 theorem integral_neg : integral I l (-f) vol = -integral I l f vol :=
   if h : Integrable I l f vol then h.HasIntegral.neg.integral_eq
   else by rw [integral, integral, dif_neg h, dif_neg (mt integrable.of_neg h), neg_zero]
 #align box_integral.integral_neg BoxIntegral.integral_neg
+-/
 
 theorem HasIntegral.sub (h : HasIntegral I l f vol y) (h' : HasIntegral I l g vol y') :
     HasIntegral I l (f - g) vol (y - y') := by simpa only [sub_eq_add_neg] using h.add h'.neg
@@ -328,62 +360,73 @@ theorem Integrable.sub (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
   (hf.HasIntegral.sub hg.HasIntegral).Integrable
 #align box_integral.integrable.sub BoxIntegral.Integrable.sub
 
+#print BoxIntegral.integral_sub /-
 theorem integral_sub (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
     integral I l (f - g) vol = integral I l f vol - integral I l g vol :=
   (hf.HasIntegral.sub hg.HasIntegral).integral_eq
 #align box_integral.integral_sub BoxIntegral.integral_sub
+-/
 
-theorem hasIntegralConst (c : E) : HasIntegral I l (fun _ => c) vol (vol I c) :=
+theorem hasIntegral_const (c : E) : HasIntegral I l (fun _ => c) vol (vol I c) :=
   tendsto_const_nhds.congr' <|
     (l.eventually_isPartition I).mono fun π hπ =>
       ((vol.map ⟨fun g : E →L[ℝ] F => g c, rfl, fun _ _ => rfl⟩).sum_partition_boxes le_top hπ).symm
-#align box_integral.has_integral_const BoxIntegral.hasIntegralConst
+#align box_integral.has_integral_const BoxIntegral.hasIntegral_const
 
 @[simp]
 theorem integral_const (c : E) : integral I l (fun _ => c) vol = vol I c :=
-  (hasIntegralConst c).integral_eq
+  (hasIntegral_const c).integral_eq
 #align box_integral.integral_const BoxIntegral.integral_const
 
-theorem integrableConst (c : E) : Integrable I l (fun _ => c) vol :=
-  ⟨_, hasIntegralConst c⟩
-#align box_integral.integrable_const BoxIntegral.integrableConst
+#print BoxIntegral.integrable_const /-
+theorem integrable_const (c : E) : Integrable I l (fun _ => c) vol :=
+  ⟨_, hasIntegral_const c⟩
+#align box_integral.integrable_const BoxIntegral.integrable_const
+-/
 
-theorem hasIntegralZero : HasIntegral I l (fun _ => (0 : E)) vol 0 := by
+theorem hasIntegral_zero : HasIntegral I l (fun _ => (0 : E)) vol 0 := by
   simpa only [← (vol I).map_zero] using has_integral_const (0 : E)
-#align box_integral.has_integral_zero BoxIntegral.hasIntegralZero
+#align box_integral.has_integral_zero BoxIntegral.hasIntegral_zero
 
-theorem integrableZero : Integrable I l (fun _ => (0 : E)) vol :=
-  ⟨0, hasIntegralZero⟩
-#align box_integral.integrable_zero BoxIntegral.integrableZero
+theorem integrable_zero : Integrable I l (fun _ => (0 : E)) vol :=
+  ⟨0, hasIntegral_zero⟩
+#align box_integral.integrable_zero BoxIntegral.integrable_zero
 
+#print BoxIntegral.integral_zero /-
 theorem integral_zero : integral I l (fun _ => (0 : E)) vol = 0 :=
-  hasIntegralZero.integral_eq
+  hasIntegral_zero.integral_eq
 #align box_integral.integral_zero BoxIntegral.integral_zero
+-/
 
-theorem hasIntegralSum {α : Type _} {s : Finset α} {f : α → ℝⁿ → E} {g : α → F}
+theorem BoxIntegral.HasIntegral.sum {α : Type _} {s : Finset α} {f : α → ℝⁿ → E} {g : α → F}
     (h : ∀ i ∈ s, HasIntegral I l (f i) vol (g i)) :
     HasIntegral I l (fun x => ∑ i in s, f i x) vol (∑ i in s, g i) :=
   by
   induction' s using Finset.induction_on with a s ha ihs; · simp [has_integral_zero]
   simp only [Finset.sum_insert ha]; rw [Finset.forall_mem_insert] at h 
   exact h.1.add (ihs h.2)
-#align box_integral.has_integral_sum BoxIntegral.hasIntegralSum
+#align box_integral.has_integral_sum BoxIntegral.HasIntegral.sum
 
+#print BoxIntegral.HasIntegral.smul /-
 theorem HasIntegral.smul (hf : HasIntegral I l f vol y) (c : ℝ) :
     HasIntegral I l (c • f) vol (c • y) := by
   simpa only [has_integral, ← integral_sum_smul] using
     (tendsto_const_nhds : tendsto _ _ (𝓝 c)).smul hf
 #align box_integral.has_integral.smul BoxIntegral.HasIntegral.smul
+-/
 
+#print BoxIntegral.Integrable.smul /-
 theorem Integrable.smul (hf : Integrable I l f vol) (c : ℝ) : Integrable I l (c • f) vol :=
   (hf.HasIntegral.smul c).Integrable
 #align box_integral.integrable.smul BoxIntegral.Integrable.smul
+-/
 
-theorem Integrable.ofSmul {c : ℝ} (hf : Integrable I l (c • f) vol) (hc : c ≠ 0) :
+theorem Integrable.of_smul {c : ℝ} (hf : Integrable I l (c • f) vol) (hc : c ≠ 0) :
     Integrable I l f vol := by convert hf.smul c⁻¹; ext x;
   simp only [Pi.smul_apply, inv_smul_smul₀ hc]
-#align box_integral.integrable.of_smul BoxIntegral.Integrable.ofSmul
+#align box_integral.integrable.of_smul BoxIntegral.Integrable.of_smul
 
+#print BoxIntegral.integral_smul /-
 @[simp]
 theorem integral_smul (c : ℝ) : integral I l (fun x => c • f x) vol = c • integral I l f vol :=
   by
@@ -393,6 +436,7 @@ theorem integral_smul (c : ℝ) : integral I l (fun x => c • f x) vol = c •
   · have : ¬integrable I l (fun x => c • f x) vol := mt (fun h => h.of_smul hc) hf
     rw [integral, integral, dif_neg hf, dif_neg this, smul_zero]
 #align box_integral.integral_smul BoxIntegral.integral_smul
+-/
 
 open MeasureTheory
 
@@ -473,11 +517,13 @@ def convergenceR (h : Integrable I l f vol) (ε : ℝ) : ℝ≥0 → ℝⁿ →
 
 variable {c c₁ c₂ : ℝ≥0} {ε ε₁ ε₂ : ℝ} {π₁ π₂ : TaggedPrepartition I}
 
+#print BoxIntegral.Integrable.convergenceR_cond /-
 theorem convergenceR_cond (h : Integrable I l f vol) (ε : ℝ) (c : ℝ≥0) :
     l.RCond (h.convergenceR ε c) := by
   rw [convergence_r]; split_ifs with h₀
   exacts [(has_integral_iff.1 h.has_integral ε h₀).choose_spec.1 _, fun _ x => rfl]
 #align box_integral.integrable.convergence_r_cond BoxIntegral.Integrable.convergenceR_cond
+-/
 
 theorem dist_integralSum_integral_le_of_memBaseSet (h : Integrable I l f vol) (h₀ : 0 < ε)
     (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) (hπp : π.IsPartition) :
@@ -544,6 +590,7 @@ theorem tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity (h : Int
   exact h.dist_integral_sum_le_of_mem_base_set ε0 ε0 h₁.some_spec h₂.some_spec hU
 #align box_integral.integrable.tendsto_integral_sum_to_filter_prod_self_inf_Union_eq_uniformity BoxIntegral.Integrable.tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity
 
+#print BoxIntegral.Integrable.cauchy_map_integralSum_toFilteriUnion /-
 /-- If `f` is integrable on a box `I` along `l`, then for any fixed subset `s` of `I` that can be
 represented as a finite union of boxes, the integral sums of `f` over tagged prepartitions that
 cover exactly `s` form a Cauchy “sequence” along `l`. -/
@@ -556,9 +603,11 @@ theorem cauchy_map_integralSum_toFilteriUnion (h : Integrable I l f vol) (π₀
     h.tendsto_integral_sum_to_filter_prod_self_inf_Union_eq_uniformity.mono_left
       (inf_le_inf_left _ <| principal_mono.2 fun π h => h.1.trans h.2.symm)
 #align box_integral.integrable.cauchy_map_integral_sum_to_filter_Union BoxIntegral.Integrable.cauchy_map_integralSum_toFilteriUnion
+-/
 
 variable [CompleteSpace F]
 
+#print BoxIntegral.Integrable.to_subbox_aux /-
 theorem to_subbox_aux (h : Integrable I l f vol) (hJ : J ≤ I) :
     ∃ y : F,
       HasIntegral J l f vol y ∧
@@ -570,13 +619,17 @@ theorem to_subbox_aux (h : Integrable I l f vol) (hJ : J ≤ I) :
       fun y hy => ⟨_, hy⟩
   convert hy.comp (l.tendsto_embed_box_to_filter_Union_top hJ)
 #align box_integral.integrable.to_subbox_aux BoxIntegral.Integrable.to_subbox_aux
+-/
 
+#print BoxIntegral.Integrable.to_subbox /-
 -- faster than `exact` here
 /-- If `f` is integrable on a box `I`, then it is integrable on any subbox of `I`. -/
-theorem toSubbox (h : Integrable I l f vol) (hJ : J ≤ I) : Integrable J l f vol :=
+theorem to_subbox (h : Integrable I l f vol) (hJ : J ≤ I) : Integrable J l f vol :=
   (h.to_subbox_aux hJ).imp fun y => And.left
-#align box_integral.integrable.to_subbox BoxIntegral.Integrable.toSubbox
+#align box_integral.integrable.to_subbox BoxIntegral.Integrable.to_subbox
+-/
 
+#print BoxIntegral.Integrable.tendsto_integralSum_toFilteriUnion_single /-
 /-- If `f` is integrable on a box `I`, then integral sums of `f` over tagged prepartitions
 that cover exactly a subbox `J ≤ I` tend to the integral of `f` over `J` along `l`. -/
 theorem tendsto_integralSum_toFilteriUnion_single (h : Integrable I l f vol) (hJ : J ≤ I) :
@@ -585,6 +638,7 @@ theorem tendsto_integralSum_toFilteriUnion_single (h : Integrable I l f vol) (hJ
   let ⟨y, h₁, h₂⟩ := h.to_subbox_aux hJ
   h₁.integral_eq.symm ▸ h₂
 #align box_integral.integrable.tendsto_integral_sum_to_filter_Union_single BoxIntegral.Integrable.tendsto_integralSum_toFilteriUnion_single
+-/
 
 /-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
 *partition* of `I` subordinate to `r`, the integral sum of `f` over this partition differs from the
@@ -673,6 +727,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet (h : Integrable I l f vol
   h.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq h0 hπ rfl
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet
 
+#print BoxIntegral.Integrable.tendsto_integralSum_sum_integral /-
 /-- Integral sum of `f` over a tagged prepartition `π` such that `π.Union = π₀.Union` tends to the
 sum of integrals of `f` over the boxes of `π₀`. -/
 theorem tendsto_integralSum_sum_integral (h : Integrable I l f vol) (π₀ : Prepartition I) :
@@ -685,7 +740,9 @@ theorem tendsto_integralSum_sum_integral (h : Integrable I l f vol) (π₀ : Pre
   rintro π ⟨c, hc, hU⟩
   exact h.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq ε0 hc hU
 #align box_integral.integrable.tendsto_integral_sum_sum_integral BoxIntegral.Integrable.tendsto_integralSum_sum_integral
+-/
 
+#print BoxIntegral.Integrable.sum_integral_congr /-
 /-- If `f` is integrable on `I`, then `λ J, integral J l f vol` is box-additive on subboxes of `I`:
 if `π₁`, `π₂` are two prepartitions of `I` covering the same part of `I`, then the sum of integrals
 of `f` over the boxes of `π₁` is equal to the sum of integrals of `f` over the boxes of `π₂`.
@@ -699,7 +756,9 @@ theorem sum_integral_congr (h : Integrable I l f vol) {π₁ π₂ : Prepartitio
   rw [l.to_filter_Union_congr _ hU]
   exact h.tendsto_integral_sum_sum_integral π₂
 #align box_integral.integrable.sum_integral_congr BoxIntegral.Integrable.sum_integral_congr
+-/
 
+#print BoxIntegral.Integrable.toBoxAdditive /-
 /-- If `f` is integrable on `I`, then `λ J, integral J l f vol` is box-additive on subboxes of `I`:
 if `π₁`, `π₂` are two prepartitions of `I` covering the same part of `I`, then the sum of integrals
 of `f` over the boxes of `π₁` is equal to the sum of integrals of `f` over the boxes of `π₂`.
@@ -714,6 +773,7 @@ def toBoxAdditive (h : Integrable I l f vol) : ι →ᵇᵃ[I] F
     rw [(h.to_subbox (WithTop.coe_le_coe.1 hJ)).sum_integral_congr hπ, prepartition.top_boxes,
       sum_singleton]
 #align box_integral.integrable.to_box_additive BoxIntegral.Integrable.toBoxAdditive
+-/
 
 end Integrable
 
@@ -729,7 +789,7 @@ variable (l)
 /-- A continuous function is box-integrable with respect to any locally finite measure.
 
 This is true for any volume with bounded variation. -/
-theorem integrableOfContinuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ → E}
+theorem integrable_of_continuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ → E}
     (hc : ContinuousOn f I.Icc) (μ : Measure ℝⁿ) [IsLocallyFiniteMeasure μ] :
     Integrable.{u, v, v} I l f μ.toBoxAdditive.toSMul :=
   by
@@ -764,14 +824,14 @@ theorem integrableOfContinuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ →
   refine' (norm_sum_le_of_le _ this).trans _
   rw [← Finset.sum_mul, μ.to_box_additive.sum_partition_boxes le_top (h₁p.inf h₂p)]
   exact hε.le
-#align box_integral.integrable_of_continuous_on BoxIntegral.integrableOfContinuousOn
+#align box_integral.integrable_of_continuous_on BoxIntegral.integrable_of_continuousOn
 
 variable {l}
 
 /-- This is an auxiliary lemma used to prove two statements at once. Use one of the next two
 lemmas instead. -/
-theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι →ᵇᵃ[I] ℝ)
-    (hB0 : ∀ J, 0 ≤ B J) (g : ι →ᵇᵃ[I] F) (s : Set ℝⁿ) (hs : s.Countable)
+theorem BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l.bRiemann = false)
+    (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J) (g : ι →ᵇᵃ[I] F) (s : Set ℝⁿ) (hs : s.Countable)
     (hlH : s.Nonempty → l.bHenstock = true)
     (H₁ :
       ∀ (c : ℝ≥0),
@@ -857,7 +917,7 @@ theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι 
   · exact fun _ _ _ => mul_nonneg ε'0.le (hB0 _)
   · rw [← mul_sum, B.sum_partition_boxes le_rfl hπp, mul_comm]
     exact hεI.le
-#align box_integral.has_integral_of_bRiemann_eq_ff_of_forall_is_o BoxIntegral.hasIntegralOfBRiemannEqFfOfForallIsO
+#align box_integral.has_integral_of_bRiemann_eq_ff_of_forall_is_o BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO
 
 /-- A function `f` has Henstock (or `⊥`) integral over `I` is equal to the value of a box-additive
 function `g` on `I` provided that `vol J (f x)` is sufficiently close to `g J` for sufficiently
@@ -878,8 +938,8 @@ the distance between the term `vol J (f x)` of an integral sum corresponding to
 less than or equal to `ε` if `x ∈ s` and is less than or equal to `ε * B J` otherwise.
 
 Then `f` is integrable on `I along `l` with integral `g I`. -/
-theorem hasIntegralOfLeHenstockOfForallIsO (hl : l ≤ Henstock) (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J)
-    (g : ι →ᵇᵃ[I] F) (s : Set ℝⁿ) (hs : s.Countable)
+theorem BoxIntegral.HasIntegral.of_le_Henstock_of_forall_isLittleO (hl : l ≤ Henstock)
+    (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J) (g : ι →ᵇᵃ[I] F) (s : Set ℝⁿ) (hs : s.Countable)
     (H₁ :
       ∀ (c : ℝ≥0),
         ∀ x ∈ I.Icc ∩ s,
@@ -899,10 +959,10 @@ theorem hasIntegralOfLeHenstockOfForallIsO (hl : l ≤ Henstock) (B : ι →ᵇ
                     (l.bDistortion → J.distortion ≤ c) → dist (vol J (f x)) (g J) ≤ ε * B J) :
     HasIntegral I l f vol (g I) :=
   have A : l.bHenstock := hl.2.1.resolve_left (by decide)
-  hasIntegralOfBRiemannEqFfOfForallIsO (hl.1.resolve_right (by decide)) B hB0 _ s hs (fun _ => A)
-      H₁ <|
+  BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl.1.resolve_right (by decide))
+      B hB0 _ s hs (fun _ => A) H₁ <|
     by simpa only [A, true_imp_iff] using H₂
-#align box_integral.has_integral_of_le_Henstock_of_forall_is_o BoxIntegral.hasIntegralOfLeHenstockOfForallIsO
+#align box_integral.has_integral_of_le_Henstock_of_forall_is_o BoxIntegral.HasIntegral.of_le_Henstock_of_forall_isLittleO
 
 /-- Suppose that there exists a nonnegative box-additive function `B` with the following property.
 
@@ -916,17 +976,18 @@ the distance between the term `vol J (f x)` of an integral sum corresponding to
 less than or equal to `ε * B J`.
 
 Then `f` is McShane integrable on `I` with integral `g I`. -/
-theorem hasIntegralMcShaneOfForallIsO (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J) (g : ι →ᵇᵃ[I] F)
+theorem BoxIntegral.HasIntegral.mcShane_of_forall_isLittleO (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J)
+    (g : ι →ᵇᵃ[I] F)
     (H :
       ∀ (c : ℝ≥0),
         ∀ x ∈ I.Icc,
           ∀ ε > (0 : ℝ),
             ∃ δ > 0, ∀ J ≤ I, J.Icc ⊆ Metric.closedBall x δ → dist (vol J (f x)) (g J) ≤ ε * B J) :
     HasIntegral I McShane f vol (g I) :=
-  (hasIntegralOfBRiemannEqFfOfForallIsO rfl B hB0 g ∅ countable_empty (fun ⟨x, hx⟩ => hx.elim)
-      fun c x hx => hx.2.elim) <|
+  (BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO rfl B hB0 g ∅ countable_empty
+      (fun ⟨x, hx⟩ => hx.elim) fun c x hx => hx.2.elim) <|
     by simpa only [McShane, Bool.coe_sort_false, false_imp_iff, true_imp_iff, diff_empty] using H
-#align box_integral.has_integral_McShane_of_forall_is_o BoxIntegral.hasIntegralMcShaneOfForallIsO
+#align box_integral.has_integral_McShane_of_forall_is_o BoxIntegral.HasIntegral.mcShane_of_forall_isLittleO
 
 end BoxIntegral
 
Diff
@@ -399,7 +399,7 @@ open MeasureTheory
 /-- The integral of a nonnegative function w.r.t. a volume generated by a locally-finite measure is
 nonnegative. -/
 theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (μ : Measure ℝⁿ)
-    [LocallyFiniteMeasure μ] : 0 ≤ integral I l g μ.toBoxAdditive.toSMul :=
+    [IsLocallyFiniteMeasure μ] : 0 ≤ integral I l g μ.toBoxAdditive.toSMul :=
   by
   by_cases hgi : integrable I l g μ.to_box_additive.to_smul
   · refine' ge_of_tendsto' hgi.has_integral fun π => sum_nonneg fun J hJ => _
@@ -410,7 +410,7 @@ theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (
 /-- If `‖f x‖ ≤ g x` on `[l, u]` and `g` is integrable, then the norm of the integral of `f` is less
 than or equal to the integral of `g`. -/
 theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc, ‖f x‖ ≤ g x) (μ : Measure ℝⁿ)
-    [LocallyFiniteMeasure μ] (hg : Integrable I l g μ.toBoxAdditive.toSMul) :
+    [IsLocallyFiniteMeasure μ] (hg : Integrable I l g μ.toBoxAdditive.toSMul) :
     ‖(integral I l f μ.toBoxAdditive.toSMul : E)‖ ≤ integral I l g μ.toBoxAdditive.toSMul :=
   by
   by_cases hfi : Integrable.{u, v, v} I l f μ.to_box_additive.to_smul
@@ -424,7 +424,7 @@ theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc,
 #align box_integral.norm_integral_le_of_norm_le BoxIntegral.norm_integral_le_of_norm_le
 
 theorem norm_integral_le_of_le_const {c : ℝ} (hc : ∀ x ∈ I.Icc, ‖f x‖ ≤ c) (μ : Measure ℝⁿ)
-    [LocallyFiniteMeasure μ] : ‖(integral I l f μ.toBoxAdditive.toSMul : E)‖ ≤ (μ I).toReal * c :=
+    [IsLocallyFiniteMeasure μ] : ‖(integral I l f μ.toBoxAdditive.toSMul : E)‖ ≤ (μ I).toReal * c :=
   by simpa only [integral_const] using norm_integral_le_of_norm_le hc μ (integrable_const c)
 #align box_integral.norm_integral_le_of_le_const BoxIntegral.norm_integral_le_of_le_const
 
@@ -533,7 +533,7 @@ theorem tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity (h : Int
     Tendsto
       (fun π : TaggedPrepartition I × TaggedPrepartition I =>
         (integralSum f vol π.1, integralSum f vol π.2))
-      ((l.toFilter I ×ᶠ l.toFilter I) ⊓ 𝓟 { π | π.1.iUnion = π.2.iUnion }) (𝓤 F) :=
+      ((l.toFilter I ×ᶠ l.toFilter I) ⊓ 𝓟 {π | π.1.iUnion = π.2.iUnion}) (𝓤 F) :=
   by
   refine'
     (((l.has_basis_to_filter I).prod_self.inf_principal _).tendsto_iffₓ uniformity_basis_dist_le).2
@@ -730,7 +730,7 @@ variable (l)
 
 This is true for any volume with bounded variation. -/
 theorem integrableOfContinuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ → E}
-    (hc : ContinuousOn f I.Icc) (μ : Measure ℝⁿ) [LocallyFiniteMeasure μ] :
+    (hc : ContinuousOn f I.Icc) (μ : Measure ℝⁿ) [IsLocallyFiniteMeasure μ] :
     Integrable.{u, v, v} I l f μ.toBoxAdditive.toSMul :=
   by
   have huc := I.is_compact_Icc.uniform_continuous_on_of_continuous hc
Diff
@@ -365,7 +365,7 @@ theorem hasIntegralSum {α : Type _} {s : Finset α} {f : α → ℝⁿ → E} {
     HasIntegral I l (fun x => ∑ i in s, f i x) vol (∑ i in s, g i) :=
   by
   induction' s using Finset.induction_on with a s ha ihs; · simp [has_integral_zero]
-  simp only [Finset.sum_insert ha]; rw [Finset.forall_mem_insert] at h
+  simp only [Finset.sum_insert ha]; rw [Finset.forall_mem_insert] at h 
   exact h.1.add (ihs h.2)
 #align box_integral.has_integral_sum BoxIntegral.hasIntegralSum
 
@@ -476,14 +476,14 @@ variable {c c₁ c₂ : ℝ≥0} {ε ε₁ ε₂ : ℝ} {π₁ π₂ : TaggedPre
 theorem convergenceR_cond (h : Integrable I l f vol) (ε : ℝ) (c : ℝ≥0) :
     l.RCond (h.convergenceR ε c) := by
   rw [convergence_r]; split_ifs with h₀
-  exacts[(has_integral_iff.1 h.has_integral ε h₀).choose_spec.1 _, fun _ x => rfl]
+  exacts [(has_integral_iff.1 h.has_integral ε h₀).choose_spec.1 _, fun _ x => rfl]
 #align box_integral.integrable.convergence_r_cond BoxIntegral.Integrable.convergenceR_cond
 
 theorem dist_integralSum_integral_le_of_memBaseSet (h : Integrable I l f vol) (h₀ : 0 < ε)
     (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) (hπp : π.IsPartition) :
     dist (integralSum f vol π) (integral I l f vol) ≤ ε :=
   by
-  rw [convergence_r, dif_pos h₀] at hπ
+  rw [convergence_r, dif_pos h₀] at hπ 
   exact (has_integral_iff.1 h.has_integral ε h₀).choose_spec.2 c _ hπ hπp
 #align box_integral.integrable.dist_integral_sum_integral_le_of_mem_base_set BoxIntegral.Integrable.dist_integralSum_integral_le_of_memBaseSet
 
@@ -517,7 +517,7 @@ theorem dist_integralSum_le_of_memBaseSet (h : Integrable I l f vol) (hpos₁ :
     h.dist_integral_sum_integral_le_of_mem_base_set hpos₁
       (h₁.union_compl_to_subordinate (fun _ _ => min_le_left _ _) hπU hπc₁)
       (is_partition_union_compl_to_subordinate _ _ _ _)
-  rw [HU] at hπU
+  rw [HU] at hπU 
   have H₂ :
     dist (integral_sum f vol (π₂.union_compl_to_subordinate π hπU r)) (integral I l f vol) ≤ ε₂ :=
     h.dist_integral_sum_integral_le_of_mem_base_set hpos₂
@@ -643,14 +643,14 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
   have hU' : π.Union = (π₀.bUnion_tagged πi).iUnion :=
     hU.trans (prepartition.Union_bUnion_partition _ hπip).symm
   have := h.dist_integral_sum_le_of_mem_base_set h0 δ'0 hπ this hU'
-  rw [integral_sum_bUnion_tagged] at this
+  rw [integral_sum_bUnion_tagged] at this 
   calc
     dist (integral_sum f vol π) (∑ J in π₀.boxes, integral J l f vol) ≤
         dist (integral_sum f vol π) (∑ J in π₀.boxes, integral_sum f vol (πi J)) +
           dist (∑ J in π₀.boxes, integral_sum f vol (πi J)) (∑ J in π₀.boxes, integral J l f vol) :=
       dist_triangle _ _ _
     _ ≤ ε + δ' + ∑ J in π₀.boxes, δ' := (add_le_add this (dist_sum_sum_le_of_le _ hπiδ'))
-    _ = ε + δ := by field_simp [H0.ne'] ; ring
+    _ = ε + δ := by field_simp [H0.ne']; ring
     
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq
 
@@ -710,7 +710,7 @@ def toBoxAdditive (h : Integrable I l f vol) : ι →ᵇᵃ[I] F
     where
   toFun J := integral J l f vol
   sum_partition_boxes' J hJ π hπ := by
-    replace hπ := hπ.Union_eq; rw [← prepartition.Union_top] at hπ
+    replace hπ := hπ.Union_eq; rw [← prepartition.Union_top] at hπ 
     rw [(h.to_subbox (WithTop.coe_le_coe.1 hJ)).sum_integral_congr hπ, prepartition.top_boxes,
       sum_singleton]
 #align box_integral.integrable.to_box_additive BoxIntegral.Integrable.toBoxAdditive
@@ -734,7 +734,7 @@ theorem integrableOfContinuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ →
     Integrable.{u, v, v} I l f μ.toBoxAdditive.toSMul :=
   by
   have huc := I.is_compact_Icc.uniform_continuous_on_of_continuous hc
-  rw [Metric.uniformContinuousOn_iff_le] at huc
+  rw [Metric.uniformContinuousOn_iff_le] at huc 
   refine' integrable_iff_cauchy_basis.2 fun ε ε0 => _
   rcases exists_pos_mul_lt ε0 (μ.to_box_additive I) with ⟨ε', ε0', hε⟩
   rcases huc ε' ε0' with ⟨δ, δ0 : 0 < δ, Hδ⟩
@@ -757,9 +757,9 @@ theorem integrableOfContinuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ →
     refine' (dist_triangle_left _ _ J.upper).trans (add_le_add (h₁.1 _ _ _) (h₂.1 _ _ _))
     · exact prepartition.bUnion_index_mem _ hJ
     · exact box.le_iff_Icc.1 (prepartition.le_bUnion_index _ hJ) J.upper_mem_Icc
-    · rw [_root_.inf_comm] at hJ
+    · rw [_root_.inf_comm] at hJ 
       exact prepartition.bUnion_index_mem _ hJ
-    · rw [_root_.inf_comm] at hJ
+    · rw [_root_.inf_comm] at hJ 
       exact box.le_iff_Icc.1 (prepartition.le_bUnion_index _ hJ) J.upper_mem_Icc
   refine' (norm_sum_le_of_le _ this).trans _
   rw [← Finset.sum_mul, μ.to_box_additive.sum_partition_boxes le_top (h₁p.inf h₂p)]
@@ -803,12 +803,12 @@ theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι 
     `J` in the `δ`-neighborhood of `x`. -/
   refine' ((l.has_basis_to_filter_Union_top _).tendsto_iffₓ Metric.nhds_basis_closedBall).2 _
   intro ε ε0
-  simp only [Subtype.exists'] at H₁ H₂
+  simp only [Subtype.exists'] at H₁ H₂ 
   choose! δ₁ Hδ₁ using H₁
   choose! δ₂ Hδ₂ using H₂
   have ε0' := half_pos ε0; have H0 : 0 < (2 ^ Fintype.card ι : ℝ) := pow_pos zero_lt_two _
   rcases hs.exists_pos_forall_sum_le (div_pos ε0' H0) with ⟨εs, hεs0, hεs⟩
-  simp only [le_div_iff' H0, mul_sum] at hεs
+  simp only [le_div_iff' H0, mul_sum] at hεs 
   rcases exists_pos_mul_lt ε0' (B I) with ⟨ε', ε'0, hεI⟩
   set δ : ℝ≥0 → ℝⁿ → Ioi (0 : ℝ) := fun c x => if x ∈ s then δ₁ c x (εs x) else (δ₂ c) x ε'
   refine' ⟨δ, fun c => l.r_cond_of_bRiemann_eq_ff hl, _⟩
@@ -826,7 +826,7 @@ theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι 
     have :
       ∀ J ∈ π.boxes.filter fun J => π.tag J ∈ s, dist (vol J (f <| π.tag J)) (g J) ≤ εs (π.tag J) :=
       by
-      intro J hJ; rw [Finset.mem_filter] at hJ; cases' hJ with hJ hJs
+      intro J hJ; rw [Finset.mem_filter] at hJ ; cases' hJ with hJ hJs
       refine'
         Hδ₁ c _ ⟨π.tag_mem_Icc _, hJs⟩ _ (hεs0 _) _ (π.le_of_mem' _ hJ) _ (hπδ.2 hlH J hJ) fun hD =>
           (Finset.le_sup hJ).trans (hπδ.3 hD)
@@ -846,7 +846,7 @@ theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι 
   have H₂ :
     ∀ J ∈ π.boxes.filter fun J => π.tag J ∉ s, dist (vol J (f <| π.tag J)) (g J) ≤ ε' * B J :=
     by
-    intro J hJ; rw [Finset.mem_filter] at hJ; cases' hJ with hJ hJs
+    intro J hJ; rw [Finset.mem_filter] at hJ ; cases' hJ with hJ hJs
     refine'
       Hδ₂ c _ ⟨π.tag_mem_Icc _, hJs⟩ _ ε'0 _ (π.le_of_mem' _ hJ) _ (fun hH => hπδ.2 hH J hJ)
         fun hD => (Finset.le_sup hJ).trans (hπδ.3 hD)
Diff
@@ -54,7 +54,7 @@ integral
 -/
 
 
-open BigOperators Classical Topology NNReal Filter uniformity BoxIntegral
+open scoped BigOperators Classical Topology NNReal Filter uniformity BoxIntegral
 
 open Set Finset Function Filter Metric BoxIntegral.IntegrationParams
 
Diff
@@ -261,9 +261,7 @@ theorem HasIntegral.mono {l₁ l₂ : IntegrationParams} (h : HasIntegral I l₁
 #align box_integral.has_integral.mono BoxIntegral.HasIntegral.mono
 
 protected theorem Integrable.hasIntegral (h : Integrable I l f vol) :
-    HasIntegral I l f vol (integral I l f vol) :=
-  by
-  rw [integral, dif_pos h]
+    HasIntegral I l f vol (integral I l f vol) := by rw [integral, dif_pos h];
   exact Classical.choose_spec h
 #align box_integral.integrable.has_integral BoxIntegral.Integrable.hasIntegral
 
@@ -382,9 +380,7 @@ theorem Integrable.smul (hf : Integrable I l f vol) (c : ℝ) : Integrable I l (
 #align box_integral.integrable.smul BoxIntegral.Integrable.smul
 
 theorem Integrable.ofSmul {c : ℝ} (hf : Integrable I l (c • f) vol) (hc : c ≠ 0) :
-    Integrable I l f vol := by
-  convert hf.smul c⁻¹
-  ext x
+    Integrable I l f vol := by convert hf.smul c⁻¹; ext x;
   simp only [Pi.smul_apply, inv_smul_smul₀ hc]
 #align box_integral.integrable.of_smul BoxIntegral.Integrable.ofSmul
 
@@ -633,14 +629,10 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
     have hr : l.r_cond r := (h.convergence_r_cond _ C).min (HJi.convergence_r_cond _ C)
     have hJd : J.distortion ≤ C := le_trans (Finset.le_sup hJ) (le_max_left _ _)
     rcases l.exists_mem_base_set_is_partition J hJd r with ⟨πJ, hC, hp⟩
-    have hC₁ : l.mem_base_set J C (HJi.convergence_r δ' C) πJ :=
-      by
-      refine' hC.mono J le_rfl le_rfl fun x hx => _
-      exact min_le_right _ _
-    have hC₂ : l.mem_base_set J C (h.convergence_r δ' C) πJ :=
-      by
-      refine' hC.mono J le_rfl le_rfl fun x hx => _
-      exact min_le_left _ _
+    have hC₁ : l.mem_base_set J C (HJi.convergence_r δ' C) πJ := by
+      refine' hC.mono J le_rfl le_rfl fun x hx => _; exact min_le_right _ _
+    have hC₂ : l.mem_base_set J C (h.convergence_r δ' C) πJ := by
+      refine' hC.mono J le_rfl le_rfl fun x hx => _; exact min_le_left _ _
     exact ⟨πJ, hp, HJi.dist_integral_sum_integral_le_of_mem_base_set δ'0 hC₁ hp, hC₂⟩
   /- Now we combine these tagged partitions into a tagged prepartition of `I` that covers the
     same part of `I` as `π₀` and apply `box_integral.dist_integral_sum_le_of_mem_base_set` to
@@ -658,9 +650,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
           dist (∑ J in π₀.boxes, integral_sum f vol (πi J)) (∑ J in π₀.boxes, integral J l f vol) :=
       dist_triangle _ _ _
     _ ≤ ε + δ' + ∑ J in π₀.boxes, δ' := (add_le_add this (dist_sum_sum_le_of_le _ hπiδ'))
-    _ = ε + δ := by
-      field_simp [H0.ne']
-      ring
+    _ = ε + δ := by field_simp [H0.ne'] ; ring
     
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq
 
@@ -816,8 +806,7 @@ theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι 
   simp only [Subtype.exists'] at H₁ H₂
   choose! δ₁ Hδ₁ using H₁
   choose! δ₂ Hδ₂ using H₂
-  have ε0' := half_pos ε0
-  have H0 : 0 < (2 ^ Fintype.card ι : ℝ) := pow_pos zero_lt_two _
+  have ε0' := half_pos ε0; have H0 : 0 < (2 ^ Fintype.card ι : ℝ) := pow_pos zero_lt_two _
   rcases hs.exists_pos_forall_sum_le (div_pos ε0' H0) with ⟨εs, hεs0, hεs⟩
   simp only [le_div_iff' H0, mul_sum] at hεs
   rcases exists_pos_mul_lt ε0' (B I) with ⟨ε', ε'0, hεI⟩
@@ -830,22 +819,18 @@ theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι 
     sum_filter_add_sum_filter_not π.boxes fun J => π.tag J ∈ s, ←
     sum_filter_add_sum_filter_not π.boxes fun J => π.tag J ∈ s, ← add_halves ε]
   refine' dist_add_add_le_of_le _ _
-  · rcases s.eq_empty_or_nonempty with (rfl | hsne)
-    · simp [ε0'.le]
+  · rcases s.eq_empty_or_nonempty with (rfl | hsne); · simp [ε0'.le]
     /- For the boxes such that `π.tag J ∈ s`, we use the fact that at most `2 ^ #ι` boxes have the
         same tag. -/
     specialize hlH hsne
     have :
       ∀ J ∈ π.boxes.filter fun J => π.tag J ∈ s, dist (vol J (f <| π.tag J)) (g J) ≤ εs (π.tag J) :=
       by
-      intro J hJ
-      rw [Finset.mem_filter] at hJ
-      cases' hJ with hJ hJs
+      intro J hJ; rw [Finset.mem_filter] at hJ; cases' hJ with hJ hJs
       refine'
         Hδ₁ c _ ⟨π.tag_mem_Icc _, hJs⟩ _ (hεs0 _) _ (π.le_of_mem' _ hJ) _ (hπδ.2 hlH J hJ) fun hD =>
           (Finset.le_sup hJ).trans (hπδ.3 hD)
-      convert hπδ.1 J hJ
-      exact (dif_pos hJs).symm
+      convert hπδ.1 J hJ; exact (dif_pos hJs).symm
     refine' (dist_sum_sum_le_of_le _ this).trans _
     rw [sum_comp]
     refine' (sum_le_sum _).trans (hεs _ _)
@@ -861,14 +846,11 @@ theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι 
   have H₂ :
     ∀ J ∈ π.boxes.filter fun J => π.tag J ∉ s, dist (vol J (f <| π.tag J)) (g J) ≤ ε' * B J :=
     by
-    intro J hJ
-    rw [Finset.mem_filter] at hJ
-    cases' hJ with hJ hJs
+    intro J hJ; rw [Finset.mem_filter] at hJ; cases' hJ with hJ hJs
     refine'
       Hδ₂ c _ ⟨π.tag_mem_Icc _, hJs⟩ _ ε'0 _ (π.le_of_mem' _ hJ) _ (fun hH => hπδ.2 hH J hJ)
         fun hD => (Finset.le_sup hJ).trans (hπδ.3 hD)
-    convert hπδ.1 J hJ
-    exact (dif_neg hJs).symm
+    convert hπδ.1 J hJ; exact (dif_neg hJs).symm
   refine'
     (dist_sum_sum_le_of_le _ H₂).trans
       ((sum_le_sum_of_subset_of_nonneg (filter_subset _ _) _).trans _)
Diff
@@ -403,7 +403,7 @@ open MeasureTheory
 /-- The integral of a nonnegative function w.r.t. a volume generated by a locally-finite measure is
 nonnegative. -/
 theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (μ : Measure ℝⁿ)
-    [LocallyFiniteMeasure μ] : 0 ≤ integral I l g μ.toBoxAdditive.toSmul :=
+    [LocallyFiniteMeasure μ] : 0 ≤ integral I l g μ.toBoxAdditive.toSMul :=
   by
   by_cases hgi : integrable I l g μ.to_box_additive.to_smul
   · refine' ge_of_tendsto' hgi.has_integral fun π => sum_nonneg fun J hJ => _
@@ -414,8 +414,8 @@ theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (
 /-- If `‖f x‖ ≤ g x` on `[l, u]` and `g` is integrable, then the norm of the integral of `f` is less
 than or equal to the integral of `g`. -/
 theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc, ‖f x‖ ≤ g x) (μ : Measure ℝⁿ)
-    [LocallyFiniteMeasure μ] (hg : Integrable I l g μ.toBoxAdditive.toSmul) :
-    ‖(integral I l f μ.toBoxAdditive.toSmul : E)‖ ≤ integral I l g μ.toBoxAdditive.toSmul :=
+    [LocallyFiniteMeasure μ] (hg : Integrable I l g μ.toBoxAdditive.toSMul) :
+    ‖(integral I l f μ.toBoxAdditive.toSMul : E)‖ ≤ integral I l g μ.toBoxAdditive.toSMul :=
   by
   by_cases hfi : Integrable.{u, v, v} I l f μ.to_box_additive.to_smul
   · refine' le_of_tendsto_of_tendsto' hfi.has_integral.norm hg.has_integral fun π => _
@@ -428,7 +428,7 @@ theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc,
 #align box_integral.norm_integral_le_of_norm_le BoxIntegral.norm_integral_le_of_norm_le
 
 theorem norm_integral_le_of_le_const {c : ℝ} (hc : ∀ x ∈ I.Icc, ‖f x‖ ≤ c) (μ : Measure ℝⁿ)
-    [LocallyFiniteMeasure μ] : ‖(integral I l f μ.toBoxAdditive.toSmul : E)‖ ≤ (μ I).toReal * c :=
+    [LocallyFiniteMeasure μ] : ‖(integral I l f μ.toBoxAdditive.toSMul : E)‖ ≤ (μ I).toReal * c :=
   by simpa only [integral_const] using norm_integral_le_of_norm_le hc μ (integrable_const c)
 #align box_integral.norm_integral_le_of_le_const BoxIntegral.norm_integral_le_of_le_const
 
@@ -741,7 +741,7 @@ variable (l)
 This is true for any volume with bounded variation. -/
 theorem integrableOfContinuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ → E}
     (hc : ContinuousOn f I.Icc) (μ : Measure ℝⁿ) [LocallyFiniteMeasure μ] :
-    Integrable.{u, v, v} I l f μ.toBoxAdditive.toSmul :=
+    Integrable.{u, v, v} I l f μ.toBoxAdditive.toSMul :=
   by
   have huc := I.is_compact_Icc.uniform_continuous_on_of_continuous hc
   rw [Metric.uniformContinuousOn_iff_le] at huc
Diff
@@ -173,7 +173,7 @@ w.r.t. volume `vol`. This means that integral sums of `f` tend to `𝓝 y` along
 `box_integral.integration_params.to_filter_Union I ⊤`. -/
 def HasIntegral (I : Box ι) (l : IntegrationParams) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (y : F) :
     Prop :=
-  Tendsto (integralSum f vol) (l.toFilterUnion I ⊤) (𝓝 y)
+  Tendsto (integralSum f vol) (l.toFilteriUnion I ⊤) (𝓝 y)
 #align box_integral.has_integral BoxIntegral.HasIntegral
 
 /-- A function is integrable if there exists a vector that satisfies the `has_integral`
@@ -193,7 +193,7 @@ variable {l : IntegrationParams} {f g : ℝⁿ → E} {vol : ι →ᵇᵃ E →L
 /-- Reinterpret `box_integral.has_integral` as `filter.tendsto`, e.g., dot-notation theorems
 that are shadowed in the `box_integral.has_integral` namespace. -/
 theorem HasIntegral.tendsto (h : HasIntegral I l f vol y) :
-    Tendsto (integralSum f vol) (l.toFilterUnion I ⊤) (𝓝 y) :=
+    Tendsto (integralSum f vol) (l.toFilteriUnion I ⊤) (𝓝 y) :=
   h
 #align box_integral.has_integral.tendsto BoxIntegral.HasIntegral.tendsto
 
@@ -204,7 +204,7 @@ theorem hasIntegral_iff :
         ∃ r : ℝ≥0 → ℝⁿ → Ioi (0 : ℝ),
           (∀ c, l.RCond (r c)) ∧
             ∀ c π, l.MemBaseSet I c (r c) π → IsPartition π → dist (integralSum f vol π) y ≤ ε :=
-  ((l.hasBasis_toFilterUnion_top I).tendsto_iffₓ nhds_basis_closedBall).trans <| by
+  ((l.hasBasis_toFilteriUnion_top I).tendsto_iffₓ nhds_basis_closedBall).trans <| by
     simp [@forall_swap ℝ≥0 (tagged_prepartition I)]
 #align box_integral.has_integral_iff BoxIntegral.hasIntegral_iff
 
@@ -227,7 +227,7 @@ theorem hasIntegralOfMul (a : ℝ)
 #align box_integral.has_integral_of_mul BoxIntegral.hasIntegralOfMul
 
 theorem integrable_iff_cauchy [CompleteSpace F] :
-    Integrable I l f vol ↔ Cauchy ((l.toFilterUnion I ⊤).map (integralSum f vol)) :=
+    Integrable I l f vol ↔ Cauchy ((l.toFilteriUnion I ⊤).map (integralSum f vol)) :=
   cauchy_map_iff_exists_tendsto.symm
 #align box_integral.integrable_iff_cauchy BoxIntegral.integrable_iff_cauchy
 
@@ -257,7 +257,7 @@ theorem integrable_iff_cauchy_basis [CompleteSpace F] :
 
 theorem HasIntegral.mono {l₁ l₂ : IntegrationParams} (h : HasIntegral I l₁ f vol y) (hl : l₂ ≤ l₁) :
     HasIntegral I l₂ f vol y :=
-  h.mono_left <| IntegrationParams.toFilterUnion_mono _ hl _
+  h.mono_left <| IntegrationParams.toFilteriUnion_mono _ hl _
 #align box_integral.has_integral.mono BoxIntegral.HasIntegral.mono
 
 protected theorem Integrable.hasIntegral (h : Integrable I l f vol) :
@@ -551,22 +551,22 @@ theorem tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity (h : Int
 /-- If `f` is integrable on a box `I` along `l`, then for any fixed subset `s` of `I` that can be
 represented as a finite union of boxes, the integral sums of `f` over tagged prepartitions that
 cover exactly `s` form a Cauchy “sequence” along `l`. -/
-theorem cauchy_map_integralSum_toFilterUnion (h : Integrable I l f vol) (π₀ : Prepartition I) :
-    Cauchy ((l.toFilterUnion I π₀).map (integralSum f vol)) :=
+theorem cauchy_map_integralSum_toFilteriUnion (h : Integrable I l f vol) (π₀ : Prepartition I) :
+    Cauchy ((l.toFilteriUnion I π₀).map (integralSum f vol)) :=
   by
   refine' ⟨inferInstance, _⟩
   rw [prod_map_map_eq, ← to_filter_inf_Union_eq, ← prod_inf_prod, prod_principal_principal]
   exact
     h.tendsto_integral_sum_to_filter_prod_self_inf_Union_eq_uniformity.mono_left
       (inf_le_inf_left _ <| principal_mono.2 fun π h => h.1.trans h.2.symm)
-#align box_integral.integrable.cauchy_map_integral_sum_to_filter_Union BoxIntegral.Integrable.cauchy_map_integralSum_toFilterUnion
+#align box_integral.integrable.cauchy_map_integral_sum_to_filter_Union BoxIntegral.Integrable.cauchy_map_integralSum_toFilteriUnion
 
 variable [CompleteSpace F]
 
 theorem to_subbox_aux (h : Integrable I l f vol) (hJ : J ≤ I) :
     ∃ y : F,
       HasIntegral J l f vol y ∧
-        Tendsto (integralSum f vol) (l.toFilterUnion I (Prepartition.single I J hJ)) (𝓝 y) :=
+        Tendsto (integralSum f vol) (l.toFilteriUnion I (Prepartition.single I J hJ)) (𝓝 y) :=
   by
   refine'
     (cauchy_map_iff_exists_tendsto.1
@@ -583,12 +583,12 @@ theorem toSubbox (h : Integrable I l f vol) (hJ : J ≤ I) : Integrable J l f vo
 
 /-- If `f` is integrable on a box `I`, then integral sums of `f` over tagged prepartitions
 that cover exactly a subbox `J ≤ I` tend to the integral of `f` over `J` along `l`. -/
-theorem tendsto_integralSum_toFilterUnion_single (h : Integrable I l f vol) (hJ : J ≤ I) :
-    Tendsto (integralSum f vol) (l.toFilterUnion I (Prepartition.single I J hJ))
+theorem tendsto_integralSum_toFilteriUnion_single (h : Integrable I l f vol) (hJ : J ≤ I) :
+    Tendsto (integralSum f vol) (l.toFilteriUnion I (Prepartition.single I J hJ))
       (𝓝 <| integral J l f vol) :=
   let ⟨y, h₁, h₂⟩ := h.to_subbox_aux hJ
   h₁.integral_eq.symm ▸ h₂
-#align box_integral.integrable.tendsto_integral_sum_to_filter_Union_single BoxIntegral.Integrable.tendsto_integralSum_toFilterUnion_single
+#align box_integral.integrable.tendsto_integral_sum_to_filter_Union_single BoxIntegral.Integrable.tendsto_integralSum_toFilteriUnion_single
 
 /-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
 *partition* of `I` subordinate to `r`, the integral sum of `f` over this partition differs from the
@@ -686,7 +686,8 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet (h : Integrable I l f vol
 /-- Integral sum of `f` over a tagged prepartition `π` such that `π.Union = π₀.Union` tends to the
 sum of integrals of `f` over the boxes of `π₀`. -/
 theorem tendsto_integralSum_sum_integral (h : Integrable I l f vol) (π₀ : Prepartition I) :
-    Tendsto (integralSum f vol) (l.toFilterUnion I π₀) (𝓝 <| ∑ J in π₀.boxes, integral J l f vol) :=
+    Tendsto (integralSum f vol) (l.toFilteriUnion I π₀)
+      (𝓝 <| ∑ J in π₀.boxes, integral J l f vol) :=
   by
   refine' ((l.has_basis_to_filter_Union I π₀).tendsto_iffₓ nhds_basis_closed_ball).2 fun ε ε0 => _
   refine' ⟨h.convergence_r ε, h.convergence_r_cond ε, _⟩
@@ -895,7 +896,7 @@ the distance between the term `vol J (f x)` of an integral sum corresponding to
 less than or equal to `ε` if `x ∈ s` and is less than or equal to `ε * B J` otherwise.
 
 Then `f` is integrable on `I along `l` with integral `g I`. -/
-theorem hasIntegralOfLeHenstockOfForallIsO (hl : l ≤ henstock) (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J)
+theorem hasIntegralOfLeHenstockOfForallIsO (hl : l ≤ Henstock) (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J)
     (g : ι →ᵇᵃ[I] F) (s : Set ℝⁿ) (hs : s.Countable)
     (H₁ :
       ∀ (c : ℝ≥0),
@@ -939,7 +940,7 @@ theorem hasIntegralMcShaneOfForallIsO (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0
         ∀ x ∈ I.Icc,
           ∀ ε > (0 : ℝ),
             ∃ δ > 0, ∀ J ≤ I, J.Icc ⊆ Metric.closedBall x δ → dist (vol J (f x)) (g J) ≤ ε * B J) :
-    HasIntegral I mcShane f vol (g I) :=
+    HasIntegral I McShane f vol (g I) :=
   (hasIntegralOfBRiemannEqFfOfForallIsO rfl B hB0 g ∅ countable_empty (fun ⟨x, hx⟩ => hx.elim)
       fun c x hx => hx.2.elim) <|
     by simpa only [McShane, Bool.coe_sort_false, false_imp_iff, true_imp_iff, diff_empty] using H
Diff
@@ -83,17 +83,17 @@ def integralSum (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : Tagg
   ∑ J in π.boxes, vol J (f (π.Tag J))
 #align box_integral.integral_sum BoxIntegral.integralSum
 
-theorem integralSum_bUnionTagged (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : Prepartition I)
+theorem integralSum_biUnionTagged (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : Prepartition I)
     (πi : ∀ J, TaggedPrepartition J) :
-    integralSum f vol (π.bUnionTagged πi) = ∑ J in π.boxes, integralSum f vol (πi J) :=
+    integralSum f vol (π.biUnionTagged πi) = ∑ J in π.boxes, integralSum f vol (πi J) :=
   by
   refine' (π.sum_bUnion_boxes _ _).trans (sum_congr rfl fun J hJ => sum_congr rfl fun J' hJ' => _)
   rw [π.tag_bUnion_tagged hJ hJ']
-#align box_integral.integral_sum_bUnion_tagged BoxIntegral.integralSum_bUnionTagged
+#align box_integral.integral_sum_bUnion_tagged BoxIntegral.integralSum_biUnionTagged
 
 theorem integralSum_bUnion_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I)
     (πi : ∀ J, Prepartition J) (hπi : ∀ J ∈ π, (πi J).IsPartition) :
-    integralSum f vol (π.bUnionPrepartition πi) = integralSum f vol π :=
+    integralSum f vol (π.biUnionPrepartition πi) = integralSum f vol π :=
   by
   refine' (π.to_prepartition.sum_bUnion_boxes _ _).trans (sum_congr rfl fun J hJ => _)
   calc
@@ -533,7 +533,7 @@ theorem dist_integralSum_le_of_memBaseSet (h : Integrable I l f vol) (hpos₁ :
 /-- If `f` is integrable on `I` along `l`, then for two sufficiently fine tagged prepartitions
 (in the sense of the filter `box_integral.integration_params.to_filter l I`) such that they cover
 the same part of `I`, the integral sums of `f` over `π₁` and `π₂` are very close to each other.  -/
-theorem tendsto_integralSum_toFilter_prod_self_inf_union_eq_uniformity (h : Integrable I l f vol) :
+theorem tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity (h : Integrable I l f vol) :
     Tendsto
       (fun π : TaggedPrepartition I × TaggedPrepartition I =>
         (integralSum f vol π.1, integralSum f vol π.2))
@@ -546,7 +546,7 @@ theorem tendsto_integralSum_toFilter_prod_self_inf_union_eq_uniformity (h : Inte
   use h.convergence_r (ε / 2), h.convergence_r_cond (ε / 2); rintro ⟨π₁, π₂⟩ ⟨⟨h₁, h₂⟩, hU⟩
   rw [← add_halves ε]
   exact h.dist_integral_sum_le_of_mem_base_set ε0 ε0 h₁.some_spec h₂.some_spec hU
-#align box_integral.integrable.tendsto_integral_sum_to_filter_prod_self_inf_Union_eq_uniformity BoxIntegral.Integrable.tendsto_integralSum_toFilter_prod_self_inf_union_eq_uniformity
+#align box_integral.integrable.tendsto_integral_sum_to_filter_prod_self_inf_Union_eq_uniformity BoxIntegral.Integrable.tendsto_integralSum_toFilter_prod_self_inf_iUnion_eq_uniformity
 
 /-- If `f` is integrable on a box `I` along `l`, then for any fixed subset `s` of `I` that can be
 represented as a finite union of boxes, the integral sums of `f` over tagged prepartitions that
@@ -605,7 +605,7 @@ The actual statement
 - takes an extra argument `π₀ : prepartition I` and an assumption `π.Union = π₀.Union` instead of
   using `π.to_prepartition`.
 -/
-theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_union_eq (h : Integrable I l f vol)
+theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integrable I l f vol)
     (h0 : 0 < ε) (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) {π₀ : Prepartition I}
     (hU : π.iUnion = π₀.iUnion) :
     dist (integralSum f vol π) (∑ J in π₀.boxes, integral J l f vol) ≤ ε :=
@@ -662,7 +662,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_union_eq (h : Integrab
       field_simp [H0.ne']
       ring
     
-#align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_union_eq
+#align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq
 
 /-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
 *partition* of `I` subordinate to `r`, the integral sum of `f` over this partition differs from the
@@ -680,7 +680,7 @@ The actual statement
 theorem dist_integralSum_sum_integral_le_of_memBaseSet (h : Integrable I l f vol) (h0 : 0 < ε)
     (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) :
     dist (integralSum f vol π) (∑ J in π.boxes, integral J l f vol) ≤ ε :=
-  h.dist_integralSum_sum_integral_le_of_memBaseSet_of_union_eq h0 hπ rfl
+  h.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq h0 hπ rfl
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet
 
 /-- Integral sum of `f` over a tagged prepartition `π` such that `π.Union = π₀.Union` tends to the
Diff
@@ -133,7 +133,7 @@ theorem integralSum_sub_partitions (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L
 
 @[simp]
 theorem integralSum_disjUnion (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) {π₁ π₂ : TaggedPrepartition I}
-    (h : Disjoint π₁.unionᵢ π₂.unionᵢ) :
+    (h : Disjoint π₁.iUnion π₂.iUnion) :
     integralSum f vol (π₁.disjUnion π₂ h) = integralSum f vol π₁ + integralSum f vol π₂ :=
   by
   refine'
@@ -247,7 +247,7 @@ theorem integrable_iff_cauchy_basis [CompleteSpace F] :
   rw [integrable_iff_cauchy, cauchy_map_iff',
     (l.has_basis_to_filter_Union_top _).prod_self.tendsto_iffₓ uniformity_basis_dist_le]
   refine' forall₂_congr fun ε ε0 => exists_congr fun r => _
-  simp only [exists_prop, Prod.forall, Set.mem_unionᵢ, exists_imp, prod_mk_mem_set_prod_eq, and_imp,
+  simp only [exists_prop, Prod.forall, Set.mem_iUnion, exists_imp, prod_mk_mem_set_prod_eq, and_imp,
     mem_inter_iff, mem_set_of_eq]
   exact
     and_congr Iff.rfl
@@ -509,7 +509,7 @@ See also `box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_
 -/
 theorem dist_integralSum_le_of_memBaseSet (h : Integrable I l f vol) (hpos₁ : 0 < ε₁)
     (hpos₂ : 0 < ε₂) (h₁ : l.MemBaseSet I c₁ (h.convergenceR ε₁ c₁) π₁)
-    (h₂ : l.MemBaseSet I c₂ (h.convergenceR ε₂ c₂) π₂) (HU : π₁.unionᵢ = π₂.unionᵢ) :
+    (h₂ : l.MemBaseSet I c₂ (h.convergenceR ε₂ c₂) π₂) (HU : π₁.iUnion = π₂.iUnion) :
     dist (integralSum f vol π₁) (integralSum f vol π₂) ≤ ε₁ + ε₂ :=
   by
   rcases h₁.exists_common_compl h₂ HU with ⟨π, hπU, hπc₁, hπc₂⟩
@@ -537,7 +537,7 @@ theorem tendsto_integralSum_toFilter_prod_self_inf_union_eq_uniformity (h : Inte
     Tendsto
       (fun π : TaggedPrepartition I × TaggedPrepartition I =>
         (integralSum f vol π.1, integralSum f vol π.2))
-      ((l.toFilter I ×ᶠ l.toFilter I) ⊓ 𝓟 { π | π.1.unionᵢ = π.2.unionᵢ }) (𝓤 F) :=
+      ((l.toFilter I ×ᶠ l.toFilter I) ⊓ 𝓟 { π | π.1.iUnion = π.2.iUnion }) (𝓤 F) :=
   by
   refine'
     (((l.has_basis_to_filter I).prod_self.inf_principal _).tendsto_iffₓ uniformity_basis_dist_le).2
@@ -607,7 +607,7 @@ The actual statement
 -/
 theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_union_eq (h : Integrable I l f vol)
     (h0 : 0 < ε) (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) {π₀ : Prepartition I}
-    (hU : π.unionᵢ = π₀.unionᵢ) :
+    (hU : π.iUnion = π₀.iUnion) :
     dist (integralSum f vol π) (∑ J in π₀.boxes, integral J l f vol) ≤ ε :=
   by
   -- Let us prove that the distance is less than or equal to `ε + δ` for all positive `δ`.
@@ -648,7 +648,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_union_eq (h : Integrab
   choose! πi hπip hπiδ' hπiC
   have : l.mem_base_set I C (h.convergence_r δ' C) (π₀.bUnion_tagged πi) :=
     bUnion_tagged_mem_base_set hπiC hπip fun _ => le_max_right _ _
-  have hU' : π.Union = (π₀.bUnion_tagged πi).unionᵢ :=
+  have hU' : π.Union = (π₀.bUnion_tagged πi).iUnion :=
     hU.trans (prepartition.Union_bUnion_partition _ hπip).symm
   have := h.dist_integral_sum_le_of_mem_base_set h0 δ'0 hπ this hU'
   rw [integral_sum_bUnion_tagged] at this
@@ -690,7 +690,7 @@ theorem tendsto_integralSum_sum_integral (h : Integrable I l f vol) (π₀ : Pre
   by
   refine' ((l.has_basis_to_filter_Union I π₀).tendsto_iffₓ nhds_basis_closed_ball).2 fun ε ε0 => _
   refine' ⟨h.convergence_r ε, h.convergence_r_cond ε, _⟩
-  simp only [mem_inter_iff, Set.mem_unionᵢ, mem_set_of_eq]
+  simp only [mem_inter_iff, Set.mem_iUnion, mem_set_of_eq]
   rintro π ⟨c, hc, hU⟩
   exact h.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq ε0 hc hU
 #align box_integral.integrable.tendsto_integral_sum_sum_integral BoxIntegral.Integrable.tendsto_integralSum_sum_integral
@@ -701,7 +701,7 @@ of `f` over the boxes of `π₁` is equal to the sum of integrals of `f` over th
 
 See also `box_integral.integrable.to_box_additive` for a bundled version. -/
 theorem sum_integral_congr (h : Integrable I l f vol) {π₁ π₂ : Prepartition I}
-    (hU : π₁.unionᵢ = π₂.unionᵢ) :
+    (hU : π₁.iUnion = π₂.iUnion) :
     (∑ J in π₁.boxes, integral J l f vol) = ∑ J in π₂.boxes, integral J l f vol :=
   by
   refine' tendsto_nhds_unique (h.tendsto_integral_sum_sum_integral π₁) _
@@ -822,7 +822,7 @@ theorem hasIntegralOfBRiemannEqFfOfForallIsO (hl : l.bRiemann = false) (B : ι 
   rcases exists_pos_mul_lt ε0' (B I) with ⟨ε', ε'0, hεI⟩
   set δ : ℝ≥0 → ℝⁿ → Ioi (0 : ℝ) := fun c x => if x ∈ s then δ₁ c x (εs x) else (δ₂ c) x ε'
   refine' ⟨δ, fun c => l.r_cond_of_bRiemann_eq_ff hl, _⟩
-  simp only [Set.mem_unionᵢ, mem_inter_iff, mem_set_of_eq]
+  simp only [Set.mem_iUnion, mem_inter_iff, mem_set_of_eq]
   rintro π ⟨c, hπδ, hπp⟩
   -- Now we split the sum into two parts based on whether `π.tag J` belongs to `s` or not.
   rw [← g.sum_partition_boxes le_rfl hπp, mem_closed_ball, integral_sum, ←
Diff
@@ -403,7 +403,7 @@ open MeasureTheory
 /-- The integral of a nonnegative function w.r.t. a volume generated by a locally-finite measure is
 nonnegative. -/
 theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (μ : Measure ℝⁿ)
-    [IsLocallyFiniteMeasure μ] : 0 ≤ integral I l g μ.toBoxAdditive.toSmul :=
+    [LocallyFiniteMeasure μ] : 0 ≤ integral I l g μ.toBoxAdditive.toSmul :=
   by
   by_cases hgi : integrable I l g μ.to_box_additive.to_smul
   · refine' ge_of_tendsto' hgi.has_integral fun π => sum_nonneg fun J hJ => _
@@ -414,7 +414,7 @@ theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (
 /-- If `‖f x‖ ≤ g x` on `[l, u]` and `g` is integrable, then the norm of the integral of `f` is less
 than or equal to the integral of `g`. -/
 theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc, ‖f x‖ ≤ g x) (μ : Measure ℝⁿ)
-    [IsLocallyFiniteMeasure μ] (hg : Integrable I l g μ.toBoxAdditive.toSmul) :
+    [LocallyFiniteMeasure μ] (hg : Integrable I l g μ.toBoxAdditive.toSmul) :
     ‖(integral I l f μ.toBoxAdditive.toSmul : E)‖ ≤ integral I l g μ.toBoxAdditive.toSmul :=
   by
   by_cases hfi : Integrable.{u, v, v} I l f μ.to_box_additive.to_smul
@@ -428,7 +428,7 @@ theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc,
 #align box_integral.norm_integral_le_of_norm_le BoxIntegral.norm_integral_le_of_norm_le
 
 theorem norm_integral_le_of_le_const {c : ℝ} (hc : ∀ x ∈ I.Icc, ‖f x‖ ≤ c) (μ : Measure ℝⁿ)
-    [IsLocallyFiniteMeasure μ] : ‖(integral I l f μ.toBoxAdditive.toSmul : E)‖ ≤ (μ I).toReal * c :=
+    [LocallyFiniteMeasure μ] : ‖(integral I l f μ.toBoxAdditive.toSmul : E)‖ ≤ (μ I).toReal * c :=
   by simpa only [integral_const] using norm_integral_le_of_norm_le hc μ (integrable_const c)
 #align box_integral.norm_integral_le_of_le_const BoxIntegral.norm_integral_le_of_le_const
 
@@ -739,7 +739,7 @@ variable (l)
 
 This is true for any volume with bounded variation. -/
 theorem integrableOfContinuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ → E}
-    (hc : ContinuousOn f I.Icc) (μ : Measure ℝⁿ) [IsLocallyFiniteMeasure μ] :
+    (hc : ContinuousOn f I.Icc) (μ : Measure ℝⁿ) [LocallyFiniteMeasure μ] :
     Integrable.{u, v, v} I l f μ.toBoxAdditive.toSmul :=
   by
   have huc := I.is_compact_Icc.uniform_continuous_on_of_continuous hc
Diff
@@ -657,7 +657,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_union_eq (h : Integrab
         dist (integral_sum f vol π) (∑ J in π₀.boxes, integral_sum f vol (πi J)) +
           dist (∑ J in π₀.boxes, integral_sum f vol (πi J)) (∑ J in π₀.boxes, integral J l f vol) :=
       dist_triangle _ _ _
-    _ ≤ ε + δ' + ∑ J in π₀.boxes, δ' := add_le_add this (dist_sum_sum_le_of_le _ hπiδ')
+    _ ≤ ε + δ' + ∑ J in π₀.boxes, δ' := (add_le_add this (dist_sum_sum_le_of_le _ hπiδ'))
     _ = ε + δ := by
       field_simp [H0.ne']
       ring
Diff
@@ -407,7 +407,7 @@ theorem integral_nonneg {g : ℝⁿ → ℝ} (hg : ∀ x ∈ I.Icc, 0 ≤ g x) (
   by
   by_cases hgi : integrable I l g μ.to_box_additive.to_smul
   · refine' ge_of_tendsto' hgi.has_integral fun π => sum_nonneg fun J hJ => _
-    exact mul_nonneg Ennreal.toReal_nonneg (hg _ <| π.tag_mem_Icc _)
+    exact mul_nonneg ENNReal.toReal_nonneg (hg _ <| π.tag_mem_Icc _)
   · rw [integral, dif_neg hgi]
 #align box_integral.integral_nonneg BoxIntegral.integral_nonneg
 
@@ -421,8 +421,8 @@ theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ I.Icc,
   · refine' le_of_tendsto_of_tendsto' hfi.has_integral.norm hg.has_integral fun π => _
     refine' norm_sum_le_of_le _ fun J hJ => _
     simp only [box_additive_map.to_smul_apply, norm_smul, smul_eq_mul, Real.norm_eq_abs,
-      μ.to_box_additive_apply, abs_of_nonneg Ennreal.toReal_nonneg]
-    exact mul_le_mul_of_nonneg_left (hle _ <| π.tag_mem_Icc _) Ennreal.toReal_nonneg
+      μ.to_box_additive_apply, abs_of_nonneg ENNReal.toReal_nonneg]
+    exact mul_le_mul_of_nonneg_left (hle _ <| π.tag_mem_Icc _) ENNReal.toReal_nonneg
   · rw [integral, dif_neg hfi, norm_zero]
     exact integral_nonneg (fun x hx => (norm_nonneg _).trans (hle x hx)) μ
 #align box_integral.norm_integral_le_of_norm_le BoxIntegral.norm_integral_le_of_norm_le
@@ -758,7 +758,7 @@ theorem integrableOfContinuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ →
         μ.to_box_additive J * ε' :=
     by
     intro J hJ
-    have : 0 ≤ μ.to_box_additive J := Ennreal.toReal_nonneg
+    have : 0 ≤ μ.to_box_additive J := ENNReal.toReal_nonneg
     rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg this, ← dist_eq_norm]
     refine' mul_le_mul_of_nonneg_left _ this
     refine' Hδ _ (tagged_prepartition.tag_mem_Icc _ _) _ (tagged_prepartition.tag_mem_Icc _ _) _

Changes in mathlib4

mathlib3
mathlib4
chore: superfluous parentheses part 2 (#12131)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -603,7 +603,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
         dist (integralSum f vol π) (∑ J in π₀.boxes, integralSum f vol (πi J)) +
           dist (∑ J in π₀.boxes, integralSum f vol (πi J)) (∑ J in π₀.boxes, integral J l f vol) :=
       dist_triangle _ _ _
-    _ ≤ ε + δ' + ∑ _J in π₀.boxes, δ' := (add_le_add this (dist_sum_sum_le_of_le _ hπiδ'))
+    _ ≤ ε + δ' + ∑ _J in π₀.boxes, δ' := add_le_add this (dist_sum_sum_le_of_le _ hπiδ')
     _ = ε + δ := by field_simp [δ']; ring
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq
 
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -774,7 +774,7 @@ theorem HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l.bRiemann =
       exact fun J hJ => (Finset.mem_filter.1 hJ).2
   /- Now we deal with boxes such that `π.tag J ∉ s`.
     In this case the estimate is straightforward. -/
-  -- porting note: avoided strange elaboration issues by rewriting using `calc`
+  -- Porting note: avoided strange elaboration issues by rewriting using `calc`
   calc
     dist (∑ J in π.boxes.filter (¬tag π · ∈ s), vol J (f (tag π J)))
       (∑ J in π.boxes.filter (¬tag π · ∈ s), g J)
chore: prepare Lean version bump with explicit simp (#10999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -604,7 +604,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
           dist (∑ J in π₀.boxes, integralSum f vol (πi J)) (∑ J in π₀.boxes, integral J l f vol) :=
       dist_triangle _ _ _
     _ ≤ ε + δ' + ∑ _J in π₀.boxes, δ' := (add_le_add this (dist_sum_sum_le_of_le _ hπiδ'))
-    _ = ε + δ := by field_simp; ring
+    _ = ε + δ := by field_simp [δ']; ring
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq
 
 /-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
chore: replace Lean 3 syntax λ x, in doc comments (#10727)

Use Lean 4 syntax fun x ↦ instead, matching the style guide. This is close to exhaustive for doc comments; mathlib has about 460 remaining uses of λ (not all in Lean 3 syntax).

Diff
@@ -638,8 +638,8 @@ theorem tendsto_integralSum_sum_integral (h : Integrable I l f vol) (π₀ : Pre
   exact h.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq ε0 hc hU
 #align box_integral.integrable.tendsto_integral_sum_sum_integral BoxIntegral.Integrable.tendsto_integralSum_sum_integral
 
-/-- If `f` is integrable on `I`, then `λ J, integral J l f vol` is box-additive on subboxes of `I`:
-if `π₁`, `π₂` are two prepartitions of `I` covering the same part of `I`, then the sum of integrals
+/-- If `f` is integrable on `I`, then `fun J ↦ integral J l f vol` is box-additive on subboxes of
+`I`: if `π₁`, `π₂` are two prepartitions of `I` covering the same part of `I`, the sum of integrals
 of `f` over the boxes of `π₁` is equal to the sum of integrals of `f` over the boxes of `π₂`.
 
 See also `BoxIntegral.Integrable.toBoxAdditive` for a bundled version. -/
@@ -651,8 +651,8 @@ theorem sum_integral_congr (h : Integrable I l f vol) {π₁ π₂ : Prepartitio
   exact h.tendsto_integralSum_sum_integral π₂
 #align box_integral.integrable.sum_integral_congr BoxIntegral.Integrable.sum_integral_congr
 
-/-- If `f` is integrable on `I`, then `λ J, integral J l f vol` is box-additive on subboxes of `I`:
-if `π₁`, `π₂` are two prepartitions of `I` covering the same part of `I`, then the sum of integrals
+/-- If `f` is integrable on `I`, then `fun J ↦ integral J l f vol` is box-additive on subboxes of
+`I`: if `π₁`, `π₂` are two prepartitions of `I` covering the same part of `I`, the sum of integrals
 of `f` over the boxes of `π₁` is equal to the sum of integrals of `f` over the boxes of `π₂`.
 
 See also `BoxIntegral.Integrable.sum_integral_congr` for an unbundled version. -/
fix: shake the import tree (#9749)

cherry-picked from #9347

Co-Authored-By: @digama0

Diff
@@ -6,6 +6,7 @@ Authors: Yury Kudryashov
 import Mathlib.Analysis.BoxIntegral.Partition.Filter
 import Mathlib.Analysis.BoxIntegral.Partition.Measure
 import Mathlib.Topology.UniformSpace.Compact
+import Mathlib.Init.Data.Bool.Lemmas
 
 #align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
 
chore: Improve Finset lemma names (#8894)

Change a few lemma names that have historically bothered me.

  • Finset.card_le_of_subsetFinset.card_le_card
  • Multiset.card_le_of_leMultiset.card_le_card
  • Multiset.card_lt_of_ltMultiset.card_lt_card
  • Set.ncard_le_of_subsetSet.ncard_le_ncard
  • Finset.image_filterFinset.filter_image
  • CompleteLattice.finset_sup_compact_of_compactCompleteLattice.isCompactElement_finset_sup
Diff
@@ -767,7 +767,7 @@ theorem HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l.bRiemann =
     · rintro b -
       rw [← Nat.cast_two, ← Nat.cast_pow, ← nsmul_eq_mul]
       refine' nsmul_le_nsmul_left (hεs0 _).le _
-      refine' (Finset.card_le_of_subset _).trans ((hπδ.isHenstock hlH).card_filter_tag_eq_le b)
+      refine' (Finset.card_le_card _).trans ((hπδ.isHenstock hlH).card_filter_tag_eq_le b)
       exact filter_subset_filter _ (filter_subset _ _)
     · rw [Finset.coe_image, Set.image_subset_iff]
       exact fun J hJ => (Finset.mem_filter.1 hJ).2
chore: Rename pow monotonicity lemmas (#9095)

The names for lemmas about monotonicity of (a ^ ·) and (· ^ n) were a mess. This PR tidies up everything related by following the naming convention for (a * ·) and (· * b). Namely, (a ^ ·) is pow_right and (· ^ n) is pow_left in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.

Renames

Algebra.GroupPower.Order

  • pow_monopow_right_mono
  • pow_le_powpow_le_pow_right
  • pow_le_pow_of_le_leftpow_le_pow_left
  • pow_lt_pow_of_lt_leftpow_lt_pow_left
  • strictMonoOn_powpow_left_strictMonoOn
  • pow_strictMono_rightpow_right_strictMono
  • pow_lt_powpow_lt_pow_right
  • pow_lt_pow_iffpow_lt_pow_iff_right
  • pow_le_pow_iffpow_le_pow_iff_right
  • self_lt_powlt_self_pow
  • strictAnti_powpow_right_strictAnti
  • pow_lt_pow_iff_of_lt_onepow_lt_pow_iff_right_of_lt_one
  • pow_lt_pow_of_lt_onepow_lt_pow_right_of_lt_one
  • lt_of_pow_lt_powlt_of_pow_lt_pow_left
  • le_of_pow_le_powle_of_pow_le_pow_left
  • pow_lt_pow₀pow_lt_pow_right₀

Algebra.GroupPower.CovariantClass

  • pow_le_pow_of_le_left'pow_le_pow_left'
  • nsmul_le_nsmul_of_le_rightnsmul_le_nsmul_right
  • pow_lt_pow'pow_lt_pow_right'
  • nsmul_lt_nsmulnsmul_lt_nsmul_left
  • pow_strictMono_leftpow_right_strictMono'
  • nsmul_strictMono_rightnsmul_left_strictMono
  • StrictMono.pow_right'StrictMono.pow_const
  • StrictMono.nsmul_leftStrictMono.const_nsmul
  • pow_strictMono_right'pow_left_strictMono
  • nsmul_strictMono_leftnsmul_right_strictMono
  • Monotone.pow_rightMonotone.pow_const
  • Monotone.nsmul_leftMonotone.const_nsmul
  • lt_of_pow_lt_pow'lt_of_pow_lt_pow_left'
  • lt_of_nsmul_lt_nsmullt_of_nsmul_lt_nsmul_right
  • pow_le_pow'pow_le_pow_right'
  • nsmul_le_nsmulnsmul_le_nsmul_left
  • pow_le_pow_of_le_one'pow_le_pow_right_of_le_one'
  • nsmul_le_nsmul_of_nonposnsmul_le_nsmul_left_of_nonpos
  • le_of_pow_le_pow'le_of_pow_le_pow_left'
  • le_of_nsmul_le_nsmul'le_of_nsmul_le_nsmul_right'
  • pow_le_pow_iff'pow_le_pow_iff_right'
  • nsmul_le_nsmul_iffnsmul_le_nsmul_iff_left
  • pow_lt_pow_iff'pow_lt_pow_iff_right'
  • nsmul_lt_nsmul_iffnsmul_lt_nsmul_iff_left

Data.Nat.Pow

  • Nat.pow_lt_pow_of_lt_leftNat.pow_lt_pow_left
  • Nat.pow_le_iff_le_leftNat.pow_le_pow_iff_left
  • Nat.pow_lt_iff_lt_leftNat.pow_lt_pow_iff_left

Lemmas added

  • pow_le_pow_iff_left
  • pow_lt_pow_iff_left
  • pow_right_injective
  • pow_right_inj
  • Nat.pow_le_pow_left to have the correct name since Nat.pow_le_pow_of_le_left is in Std.
  • Nat.pow_le_pow_right to have the correct name since Nat.pow_le_pow_of_le_right is in Std.

Lemmas removed

  • self_le_pow was a duplicate of le_self_pow.
  • Nat.pow_lt_pow_of_lt_right is defeq to pow_lt_pow_right.
  • Nat.pow_right_strictMono is defeq to pow_right_strictMono.
  • Nat.pow_le_iff_le_right is defeq to pow_le_pow_iff_right.
  • Nat.pow_lt_iff_lt_right is defeq to pow_lt_pow_iff_right.

Other changes

  • A bunch of proofs have been golfed.
  • Some lemma assumptions have been turned from 0 < n or 1 ≤ n to n ≠ 0.
  • A few Nat lemmas have been protected.
  • One docstring has been fixed.
Diff
@@ -766,7 +766,7 @@ theorem HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l.bRiemann =
     refine' (sum_le_sum _).trans (hεs _ _)
     · rintro b -
       rw [← Nat.cast_two, ← Nat.cast_pow, ← nsmul_eq_mul]
-      refine' nsmul_le_nsmul (hεs0 _).le _
+      refine' nsmul_le_nsmul_left (hεs0 _).le _
       refine' (Finset.card_le_of_subset _).trans ((hπδ.isHenstock hlH).card_filter_tag_eq_le b)
       exact filter_subset_filter _ (filter_subset _ _)
     · rw [Finset.coe_image, Set.image_subset_iff]
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -712,8 +712,6 @@ theorem integrable_of_continuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ 
 
 variable {l}
 
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
 /-- This is an auxiliary lemma used to prove two statements at once. Use one of the next two
 lemmas instead. -/
 theorem HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l.bRiemann = false)
chore: update Mathlib for leanprover/std4#183 (#7982)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -819,8 +819,8 @@ theorem HasIntegral.of_le_Henstock_of_forall_isLittleO (hl : l ≤ Henstock) (B
       ∃ δ > 0, ∀ J ≤ I, Box.Icc J ⊆ Metric.closedBall x δ → x ∈ Box.Icc J →
         (l.bDistortion → J.distortion ≤ c) → dist (vol J (f x)) (g J) ≤ ε * B J) :
     HasIntegral I l f vol (g I) :=
-  have A : l.bHenstock := hl.2.1.resolve_left (by decide)
-  HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl.1.resolve_right (by decide)) B hB0 _ s hs
+  have A : l.bHenstock := Bool.eq_true_of_true_le hl.2.1
+  HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (Bool.eq_false_of_le_false hl.1) B hB0 _ s hs
     (fun _ => A) H₁ <| by simpa only [A, true_imp_iff] using H₂
 set_option linter.uppercaseLean3 false in
 #align box_integral.has_integral_of_le_Henstock_of_forall_is_o BoxIntegral.HasIntegral.of_le_Henstock_of_forall_isLittleO
field_simp: Use positivity as a discharger (#6312)

The main reasons is that having h : 0 < denom in the context should suffice for field_simp to do its job, without the need to manually pass h.ne or similar.

Quite a few have := … ≠ 0 could be dropped, and some field_simp calls no longer need explicit arguments; this is promising.

This does break some proofs where field_simp was not used as a closing tactic, and it now shuffles terms around a bit different. These were fixed. Using field_simp in the middle of a proof seems rather fragile anyways.

As a drive-by contribution, positivity now knows about π > 0.

fixes: #4835

Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -603,7 +603,7 @@ theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integra
           dist (∑ J in π₀.boxes, integralSum f vol (πi J)) (∑ J in π₀.boxes, integral J l f vol) :=
       dist_triangle _ _ _
     _ ≤ ε + δ' + ∑ _J in π₀.boxes, δ' := (add_le_add this (dist_sum_sum_le_of_le _ hπiδ'))
-    _ = ε + δ := by field_simp [H0.ne']; ring
+    _ = ε + δ := by field_simp; ring
 #align box_integral.integrable.dist_integral_sum_sum_integral_le_of_mem_base_set_of_Union_eq BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq
 
 /-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -336,7 +336,7 @@ theorem integral_zero : integral I l (fun _ => (0 : E)) vol = 0 :=
   hasIntegral_zero.integral_eq
 #align box_integral.integral_zero BoxIntegral.integral_zero
 
-theorem HasIntegral.sum {α : Type _} {s : Finset α} {f : α → ℝⁿ → E} {g : α → F}
+theorem HasIntegral.sum {α : Type*} {s : Finset α} {f : α → ℝⁿ → E} {g : α → F}
     (h : ∀ i ∈ s, HasIntegral I l (f i) vol (g i)) :
     HasIntegral I l (fun x => ∑ i in s, f i x) vol (∑ i in s, g i) := by
   induction' s using Finset.induction_on with a s ha ihs; · simp [hasIntegral_zero]
chore: regularize HPow.hPow porting notes (#6465)
Diff
@@ -712,7 +712,7 @@ theorem integrable_of_continuousOn [CompleteSpace E] {I : Box ι} {f : ℝⁿ 
 
 variable {l}
 
-local macro_rules | `($x ^ $y)   => `(HPow.hPow $x $y) -- Porting note: See Lean 4 issue #2220
+local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
 
 /-- This is an auxiliary lemma used to prove two statements at once. Use one of the next two
 lemmas instead. -/
chore: fix grammar mistakes (#6121)
Diff
@@ -457,7 +457,7 @@ theorem dist_integralSum_integral_le_of_memBaseSet (h : Integrable I l f vol) (h
   exact (hasIntegral_iff.1 h.hasIntegral ε h₀).choose_spec.2 c _ hπ hπp
 #align box_integral.integrable.dist_integral_sum_integral_le_of_mem_base_set BoxIntegral.Integrable.dist_integralSum_integral_le_of_memBaseSet
 
-/-- **Henstock-Sacks inequality**. Let `r₁ r₂ : ℝⁿ → (0, ∞)` be function such that for any tagged
+/-- **Henstock-Sacks inequality**. Let `r₁ r₂ : ℝⁿ → (0, ∞)` be a function such that for any tagged
 *partition* of `I` subordinate to `rₖ`, `k=1,2`, the integral sum of `f` over this partition differs
 from the integral of `f` by at most `εₖ`. Then for any two tagged *prepartition* `π₁ π₂` subordinate
 to `r₁` and `r₂` respectively and covering the same part of `I`, the integral sums of `f` over these
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module analysis.box_integral.basic
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.BoxIntegral.Partition.Filter
 import Mathlib.Analysis.BoxIntegral.Partition.Measure
 import Mathlib.Topology.UniformSpace.Compact
 
+#align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+
 /-!
 # Integrals of Riemann, Henstock-Kurzweil, and McShane
 
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -762,7 +762,7 @@ theorem HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l.bRiemann =
     specialize hlH hsne
     have : ∀ J ∈ π.boxes.filter fun J => π.tag J ∈ s,
         dist (vol J (f <| π.tag J)) (g J) ≤ εs (π.tag J) := fun J hJ ↦ by
-      rw [Finset.mem_filter] at hJ ; cases' hJ with hJ hJs
+      rw [Finset.mem_filter] at hJ; cases' hJ with hJ hJs
       refine' Hδ₁ c _ ⟨π.tag_mem_Icc _, hJs⟩ _ (hεs0 _) _ (π.le_of_mem' _ hJ) _
         (hπδ.2 hlH J hJ) fun hD => (Finset.le_sup hJ).trans (hπδ.3 hD)
       convert hπδ.1 J hJ using 3; exact (if_pos hJs).symm
fix: ∑' precedence (#5615)
  • Also remove most superfluous parentheses around big operators (, and variants).
  • roughly the used regex: ([^a-zA-Zα-ωΑ-Ω'𝓝ℳ₀𝕂ₛ)]) \(([∑∏][^()∑∏]*,[^()∑∏:]*)\) ([⊂⊆=<≤]) replaced by $1 $2 $3
Diff
@@ -647,7 +647,7 @@ of `f` over the boxes of `π₁` is equal to the sum of integrals of `f` over th
 See also `BoxIntegral.Integrable.toBoxAdditive` for a bundled version. -/
 theorem sum_integral_congr (h : Integrable I l f vol) {π₁ π₂ : Prepartition I}
     (hU : π₁.iUnion = π₂.iUnion) :
-    (∑ J in π₁.boxes, integral J l f vol) = ∑ J in π₂.boxes, integral J l f vol := by
+    ∑ J in π₁.boxes, integral J l f vol = ∑ J in π₂.boxes, integral J l f vol := by
   refine' tendsto_nhds_unique (h.tendsto_integralSum_sum_integral π₁) _
   rw [l.toFilteriUnion_congr _ hU]
   exact h.tendsto_integralSum_sum_integral π₂
chore: tidy various files (#5355)
Diff
@@ -438,7 +438,7 @@ such that for every `c : ℝ≥0`, for every tagged partition `π` subordinate t
 additional distortion estimates if `BoxIntegral.IntegrationParams.bDistortion l = true`), the
 corresponding integral sum is `ε`-close to the integral.
 
-If `box.integral.integration_params.bRiemann = true`, then `r c x` does not depend on `x`. If
+If `BoxIntegral.IntegrationParams.bRiemann = true`, then `r c x` does not depend on `x`. If
 `ε ≤ 0`, then we use `r c x = 1`.  -/
 def convergenceR (h : Integrable I l f vol) (ε : ℝ) : ℝ≥0 → ℝⁿ → Ioi (0 : ℝ) :=
   if hε : 0 < ε then (hasIntegral_iff.1 h.hasIntegral ε hε).choose
chore: fix backtick in docs (#5077)

I wrote a script to find lines that contain an odd number of backticks

Diff
@@ -15,7 +15,7 @@ import Mathlib.Topology.UniformSpace.Compact
 /-!
 # Integrals of Riemann, Henstock-Kurzweil, and McShane
 
-In this file we define the integral of a function over a box in `ℝⁿ. The same definition works for
+In this file we define the integral of a function over a box in `ℝⁿ`. The same definition works for
 Riemann, Henstock-Kurzweil, and McShane integrals.
 
 As usual, we represent `ℝⁿ` as the type of functions `ι → ℝ` for some finite type `ι`. A rectangular
@@ -812,7 +812,7 @@ box `J ≤ I` such that
 the distance between the term `vol J (f x)` of an integral sum corresponding to `J` and `g J` is
 less than or equal to `ε` if `x ∈ s` and is less than or equal to `ε * B J` otherwise.
 
-Then `f` is integrable on `I along `l` with integral `g I`. -/
+Then `f` is integrable on `I` along `l` with integral `g I`. -/
 theorem HasIntegral.of_le_Henstock_of_forall_isLittleO (hl : l ≤ Henstock) (B : ι →ᵇᵃ[I] ℝ)
     (hB0 : ∀ J, 0 ≤ B J) (g : ι →ᵇᵃ[I] F) (s : Set ℝⁿ) (hs : s.Countable)
     (H₁ : ∀ (c : ℝ≥0), ∀ x ∈ Box.Icc I ∩ s, ∀ ε > (0 : ℝ),
feat: port Analysis.BoxIntegral.Basic (#4695)

Co-authored-by: Alex J Best <alex.j.best@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Dependencies 12 + 966

967 files ported (98.8%)
435627 lines ported (98.7%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file