measure_theory.function.simple_func_denseMathlib.MeasureTheory.Function.SimpleFuncDense

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -121,7 +121,7 @@ theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N)
     split_ifs
     · rcases hk.eq_or_lt with (rfl | hk)
       exacts [le_rfl, (h k (Nat.lt_succ_iff.1 hk)).le]
-    · push_neg at h 
+    · push_neg at h
       rcases h with ⟨l, hlN, hxl⟩
       rcases hk.eq_or_lt with (rfl | hk)
       exacts [(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]
@@ -134,7 +134,7 @@ theorem tendsto_nearestPt {e : ℕ → α} {x : α} (hx : x ∈ closure (range e
   by
   refine' (at_top_basis.tendsto_iff nhds_basis_eball).2 fun ε hε => _
   rcases EMetric.mem_closure_iff.1 hx ε hε with ⟨_, ⟨N, rfl⟩, hN⟩
-  rw [edist_comm] at hN 
+  rw [edist_comm] at hN
   exact ⟨N, trivial, fun n hn => (edist_nearest_pt_le e x hn).trans_lt hN⟩
 #align measure_theory.simple_func.tendsto_nearest_pt MeasureTheory.SimpleFunc.tendsto_nearestPt
 -/
@@ -185,7 +185,7 @@ theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀
     Tendsto (fun n => approxOn f hf s y₀ h₀ n x) atTop (𝓝 <| f x) :=
   by
   haveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩
-  rw [← @Subtype.range_coe _ s, ← image_univ, ← (dense_range_dense_seq s).closure_eq] at hx 
+  rw [← @Subtype.range_coe _ s, ← image_univ, ← (dense_range_dense_seq s).closure_eq] at hx
   simp only [approx_on, coe_comp]
   refine' tendsto_nearest_pt (closure_minimal _ isClosed_closure hx)
   simp only [Nat.range_casesOn, closure_union, range_comp coe]
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2019 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov, Heather Macbeth
 -/
-import Mathbin.MeasureTheory.Function.SimpleFunc
+import MeasureTheory.Function.SimpleFunc
 
 #align_import measure_theory.function.simple_func_dense from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2019 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov, Heather Macbeth
-
-! This file was ported from Lean 3 source module measure_theory.function.simple_func_dense
-! leanprover-community/mathlib commit 4280f5f32e16755ec7985ce11e189b6cd6ff6735
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Function.SimpleFunc
 
+#align_import measure_theory.function.simple_func_dense from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
+
 /-!
 # Density of simple functions
 
Diff
@@ -49,7 +49,6 @@ noncomputable section
 
 namespace MeasureTheory
 
--- mathport name: «expr →ₛ »
 local infixr:25 " →ₛ " => SimpleFunc
 
 namespace SimpleFunc
@@ -97,11 +96,13 @@ theorem nearestPt_zero (e : ℕ → α) : nearestPt e 0 = const α (e 0) :=
 #align measure_theory.simple_func.nearest_pt_zero MeasureTheory.SimpleFunc.nearestPt_zero
 -/
 
+#print MeasureTheory.SimpleFunc.nearestPtInd_succ /-
 theorem nearestPtInd_succ (e : ℕ → α) (N : ℕ) (x : α) :
     nearestPtInd e (N + 1) x =
       if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else nearestPtInd e N x :=
   by simp only [nearest_pt_ind, coe_piecewise, Set.piecewise]; congr; simp
 #align measure_theory.simple_func.nearest_pt_ind_succ MeasureTheory.SimpleFunc.nearestPtInd_succ
+-/
 
 #print MeasureTheory.SimpleFunc.nearestPtInd_le /-
 theorem nearestPtInd_le (e : ℕ → α) (N : ℕ) (x : α) : nearestPtInd e N x ≤ N :=
@@ -113,6 +114,7 @@ theorem nearestPtInd_le (e : ℕ → α) (N : ℕ) (x : α) : nearestPtInd e N x
 #align measure_theory.simple_func.nearest_pt_ind_le MeasureTheory.SimpleFunc.nearestPtInd_le
 -/
 
+#print MeasureTheory.SimpleFunc.edist_nearestPt_le /-
 theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N) :
     edist (nearestPt e N x) x ≤ edist (e k) x :=
   by
@@ -127,6 +129,7 @@ theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N)
       rcases hk.eq_or_lt with (rfl | hk)
       exacts [(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]
 #align measure_theory.simple_func.edist_nearest_pt_le MeasureTheory.SimpleFunc.edist_nearestPt_le
+-/
 
 #print MeasureTheory.SimpleFunc.tendsto_nearestPt /-
 theorem tendsto_nearestPt {e : ℕ → α} {x : α} (hx : x ∈ closure (range e)) :
@@ -195,6 +198,7 @@ theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀
 #align measure_theory.simple_func.tendsto_approx_on MeasureTheory.SimpleFunc.tendsto_approxOn
 -/
 
+#print MeasureTheory.SimpleFunc.edist_approxOn_mono /-
 theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) {m n : ℕ} (h : m ≤ n) :
     edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist (approxOn f hf s y₀ h₀ m x) (f x) :=
@@ -202,12 +206,16 @@ theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y
   dsimp only [approx_on, coe_comp, (· ∘ ·)]
   exact edist_nearest_pt_le _ _ ((nearest_pt_ind_le _ _ _).trans h)
 #align measure_theory.simple_func.edist_approx_on_mono MeasureTheory.SimpleFunc.edist_approxOn_mono
+-/
 
+#print MeasureTheory.SimpleFunc.edist_approxOn_le /-
 theorem edist_approxOn_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) (n : ℕ) : edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist y₀ (f x) :=
   edist_approxOn_mono hf h₀ x (zero_le n)
 #align measure_theory.simple_func.edist_approx_on_le MeasureTheory.SimpleFunc.edist_approxOn_le
+-/
 
+#print MeasureTheory.SimpleFunc.edist_approxOn_y0_le /-
 theorem edist_approxOn_y0_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) (n : ℕ) :
     edist y₀ (approxOn f hf s y₀ h₀ n x) ≤ edist y₀ (f x) + edist y₀ (f x) :=
@@ -217,6 +225,7 @@ theorem edist_approxOn_y0_le {f : β → α} (hf : Measurable f) {s : Set α} {y
       edist_triangle_right _ _ _
     _ ≤ edist y₀ (f x) + edist y₀ (f x) := add_le_add_left (edist_approxOn_le hf h₀ x n) _
 #align measure_theory.simple_func.edist_approx_on_y0_le MeasureTheory.SimpleFunc.edist_approxOn_y0_le
+-/
 
 end SimpleFunc
 
Diff
@@ -216,7 +216,6 @@ theorem edist_approxOn_y0_le {f : β → α} (hf : Measurable f) {s : Set α} {y
         edist y₀ (f x) + edist (approxOn f hf s y₀ h₀ n x) (f x) :=
       edist_triangle_right _ _ _
     _ ≤ edist y₀ (f x) + edist y₀ (f x) := add_le_add_left (edist_approxOn_le hf h₀ x n) _
-    
 #align measure_theory.simple_func.edist_approx_on_y0_le MeasureTheory.SimpleFunc.edist_approxOn_y0_le
 
 end SimpleFunc
Diff
@@ -66,7 +66,7 @@ points `e 0`, ..., `e N`. If more than one point are at the same distance from `
 noncomputable def nearestPtInd (e : ℕ → α) : ℕ → α →ₛ ℕ
   | 0 => const α 0
   | N + 1 =>
-    piecewise (⋂ k ≤ N, { x | edist (e (N + 1)) x < edist (e k) x })
+    piecewise (⋂ k ≤ N, {x | edist (e (N + 1)) x < edist (e k) x})
       (MeasurableSet.iInter fun k =>
         MeasurableSet.iInter fun hk =>
           measurableSet_lt measurable_edist_right measurable_edist_right)
@@ -122,7 +122,7 @@ theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N)
     split_ifs
     · rcases hk.eq_or_lt with (rfl | hk)
       exacts [le_rfl, (h k (Nat.lt_succ_iff.1 hk)).le]
-    · push_neg  at h 
+    · push_neg at h 
       rcases h with ⟨l, hlN, hxl⟩
       rcases hk.eq_or_lt with (rfl | hk)
       exacts [(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]
Diff
@@ -100,7 +100,7 @@ theorem nearestPt_zero (e : ℕ → α) : nearestPt e 0 = const α (e 0) :=
 theorem nearestPtInd_succ (e : ℕ → α) (N : ℕ) (x : α) :
     nearestPtInd e (N + 1) x =
       if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else nearestPtInd e N x :=
-  by simp only [nearest_pt_ind, coe_piecewise, Set.piecewise]; congr ; simp
+  by simp only [nearest_pt_ind, coe_piecewise, Set.piecewise]; congr; simp
 #align measure_theory.simple_func.nearest_pt_ind_succ MeasureTheory.SimpleFunc.nearestPtInd_succ
 
 #print MeasureTheory.SimpleFunc.nearestPtInd_le /-
@@ -109,7 +109,7 @@ theorem nearestPtInd_le (e : ℕ → α) (N : ℕ) (x : α) : nearestPtInd e N x
   induction' N with N ihN; · simp
   simp only [nearest_pt_ind_succ]
   split_ifs
-  exacts[le_rfl, ihN.trans N.le_succ]
+  exacts [le_rfl, ihN.trans N.le_succ]
 #align measure_theory.simple_func.nearest_pt_ind_le MeasureTheory.SimpleFunc.nearestPtInd_le
 -/
 
@@ -121,11 +121,11 @@ theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N)
   · simp only [nearest_pt, nearest_pt_ind_succ, map_apply]
     split_ifs
     · rcases hk.eq_or_lt with (rfl | hk)
-      exacts[le_rfl, (h k (Nat.lt_succ_iff.1 hk)).le]
-    · push_neg  at h
+      exacts [le_rfl, (h k (Nat.lt_succ_iff.1 hk)).le]
+    · push_neg  at h 
       rcases h with ⟨l, hlN, hxl⟩
       rcases hk.eq_or_lt with (rfl | hk)
-      exacts[(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]
+      exacts [(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]
 #align measure_theory.simple_func.edist_nearest_pt_le MeasureTheory.SimpleFunc.edist_nearestPt_le
 
 #print MeasureTheory.SimpleFunc.tendsto_nearestPt /-
@@ -134,7 +134,7 @@ theorem tendsto_nearestPt {e : ℕ → α} {x : α} (hx : x ∈ closure (range e
   by
   refine' (at_top_basis.tendsto_iff nhds_basis_eball).2 fun ε hε => _
   rcases EMetric.mem_closure_iff.1 hx ε hε with ⟨_, ⟨N, rfl⟩, hN⟩
-  rw [edist_comm] at hN
+  rw [edist_comm] at hN 
   exact ⟨N, trivial, fun n hn => (edist_nearest_pt_le e x hn).trans_lt hN⟩
 #align measure_theory.simple_func.tendsto_nearest_pt MeasureTheory.SimpleFunc.tendsto_nearestPt
 -/
@@ -166,7 +166,7 @@ theorem approxOn_mem {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α
   haveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩
   suffices ∀ n, (Nat.casesOn n y₀ (coe ∘ dense_seq s) : α) ∈ s by apply this
   rintro (_ | n)
-  exacts[h₀, Subtype.mem _]
+  exacts [h₀, Subtype.mem _]
 #align measure_theory.simple_func.approx_on_mem MeasureTheory.SimpleFunc.approxOn_mem
 -/
 
@@ -185,7 +185,7 @@ theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀
     Tendsto (fun n => approxOn f hf s y₀ h₀ n x) atTop (𝓝 <| f x) :=
   by
   haveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩
-  rw [← @Subtype.range_coe _ s, ← image_univ, ← (dense_range_dense_seq s).closure_eq] at hx
+  rw [← @Subtype.range_coe _ s, ← image_univ, ← (dense_range_dense_seq s).closure_eq] at hx 
   simp only [approx_on, coe_comp]
   refine' tendsto_nearest_pt (closure_minimal _ isClosed_closure hx)
   simp only [Nat.range_casesOn, closure_union, range_comp coe]
Diff
@@ -41,7 +41,7 @@ by a sequence of simple functions.
 
 open Set Function Filter TopologicalSpace ENNReal Emetric Finset
 
-open Classical Topology ENNReal MeasureTheory BigOperators
+open scoped Classical Topology ENNReal MeasureTheory BigOperators
 
 variable {α β ι E F 𝕜 : Type _}
 
Diff
@@ -97,9 +97,6 @@ theorem nearestPt_zero (e : ℕ → α) : nearestPt e 0 = const α (e 0) :=
 #align measure_theory.simple_func.nearest_pt_zero MeasureTheory.SimpleFunc.nearestPt_zero
 -/
 
-/- warning: measure_theory.simple_func.nearest_pt_ind_succ -> MeasureTheory.SimpleFunc.nearestPtInd_succ is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.nearest_pt_ind_succ MeasureTheory.SimpleFunc.nearestPtInd_succₓ'. -/
 theorem nearestPtInd_succ (e : ℕ → α) (N : ℕ) (x : α) :
     nearestPtInd e (N + 1) x =
       if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else nearestPtInd e N x :=
@@ -116,12 +113,6 @@ theorem nearestPtInd_le (e : ℕ → α) (N : ℕ) (x : α) : nearestPtInd e N x
 #align measure_theory.simple_func.nearest_pt_ind_le MeasureTheory.SimpleFunc.nearestPtInd_le
 -/
 
-/- warning: measure_theory.simple_func.edist_nearest_pt_le -> MeasureTheory.SimpleFunc.edist_nearestPt_le is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] (e : Nat -> α) (x : α) {k : Nat} {N : Nat}, (LE.le.{0} Nat Nat.hasLe k N) -> (LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (coeFn.{succ u1, succ u1} (MeasureTheory.SimpleFunc.{u1, u1} α _inst_1 α) (fun (_x : MeasureTheory.SimpleFunc.{u1, u1} α _inst_1 α) => α -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u1, u1} α α _inst_1) (MeasureTheory.SimpleFunc.nearestPt.{u1} α _inst_1 _inst_2 _inst_3 e N) x) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e k) x))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] (e : Nat -> α) (x : α) {k : Nat} {N : Nat}, (LE.le.{0} Nat instLENat k N) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (MeasureTheory.SimpleFunc.toFun.{u1, u1} α _inst_1 α (MeasureTheory.SimpleFunc.nearestPt.{u1} α _inst_1 _inst_2 _inst_3 e N) x) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e k) x))
-Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_nearest_pt_le MeasureTheory.SimpleFunc.edist_nearestPt_leₓ'. -/
 theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N) :
     edist (nearestPt e N x) x ≤ edist (e k) x :=
   by
@@ -204,9 +195,6 @@ theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀
 #align measure_theory.simple_func.tendsto_approx_on MeasureTheory.SimpleFunc.tendsto_approxOn
 -/
 
-/- warning: measure_theory.simple_func.edist_approx_on_mono -> MeasureTheory.SimpleFunc.edist_approxOn_mono is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_mono MeasureTheory.SimpleFunc.edist_approxOn_monoₓ'. -/
 theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) {m n : ℕ} (h : m ≤ n) :
     edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist (approxOn f hf s y₀ h₀ m x) (f x) :=
@@ -215,17 +203,11 @@ theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y
   exact edist_nearest_pt_le _ _ ((nearest_pt_ind_le _ _ _).trans h)
 #align measure_theory.simple_func.edist_approx_on_mono MeasureTheory.SimpleFunc.edist_approxOn_mono
 
-/- warning: measure_theory.simple_func.edist_approx_on_le -> MeasureTheory.SimpleFunc.edist_approxOn_le is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_le MeasureTheory.SimpleFunc.edist_approxOn_leₓ'. -/
 theorem edist_approxOn_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) (n : ℕ) : edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist y₀ (f x) :=
   edist_approxOn_mono hf h₀ x (zero_le n)
 #align measure_theory.simple_func.edist_approx_on_le MeasureTheory.SimpleFunc.edist_approxOn_le
 
-/- warning: measure_theory.simple_func.edist_approx_on_y0_le -> MeasureTheory.SimpleFunc.edist_approxOn_y0_le is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_y0_le MeasureTheory.SimpleFunc.edist_approxOn_y0_leₓ'. -/
 theorem edist_approxOn_y0_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) (n : ℕ) :
     edist y₀ (approxOn f hf s y₀ h₀ n x) ≤ edist y₀ (f x) + edist y₀ (f x) :=
Diff
@@ -103,10 +103,7 @@ Case conversion may be inaccurate. Consider using '#align measure_theory.simple_
 theorem nearestPtInd_succ (e : ℕ → α) (N : ℕ) (x : α) :
     nearestPtInd e (N + 1) x =
       if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else nearestPtInd e N x :=
-  by
-  simp only [nearest_pt_ind, coe_piecewise, Set.piecewise]
-  congr
-  simp
+  by simp only [nearest_pt_ind, coe_piecewise, Set.piecewise]; congr ; simp
 #align measure_theory.simple_func.nearest_pt_ind_succ MeasureTheory.SimpleFunc.nearestPtInd_succ
 
 #print MeasureTheory.SimpleFunc.nearestPtInd_le /-
Diff
@@ -98,10 +98,7 @@ theorem nearestPt_zero (e : ℕ → α) : nearestPt e 0 = const α (e 0) :=
 -/
 
 /- warning: measure_theory.simple_func.nearest_pt_ind_succ -> MeasureTheory.SimpleFunc.nearestPtInd_succ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] (e : Nat -> α) (N : Nat) (x : α), Eq.{1} Nat (coeFn.{succ u1, succ u1} (MeasureTheory.SimpleFunc.{u1, 0} α _inst_1 Nat) (fun (_x : MeasureTheory.SimpleFunc.{u1, 0} α _inst_1 Nat) => α -> Nat) (MeasureTheory.SimpleFunc.instCoeFun.{u1, 0} α Nat _inst_1) (MeasureTheory.SimpleFunc.nearestPtInd.{u1} α _inst_1 _inst_2 _inst_3 e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) x) (ite.{1} Nat (forall (k : Nat), (LE.le.{0} Nat Nat.hasLe k N) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e k) x))) (Nat.decidableBallLe N (fun (k : Nat) (H : LE.le.{0} Nat Nat.hasLe k N) => LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e k) x)) (fun (n : Nat) (h : LE.le.{0} Nat Nat.hasLe n N) => WithTop.decidableLT.{0} NNReal (Preorder.toHasLt.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (SemilatticeSup.toPartialOrder.{0} NNReal (Lattice.toSemilatticeSup.{0} NNReal (LinearOrder.toLattice.{0} NNReal (ConditionallyCompleteLinearOrder.toLinearOrder.{0} NNReal (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} NNReal NNReal.conditionallyCompleteLinearOrderBot))))))) (fun (a : NNReal) (b : NNReal) => Real.decidableLT ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (HasLiftT.mk.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (CoeTCₓ.coe.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (coeBase.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (coeSubtype.{1} Real (fun (x : Real) => (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))) x))))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (HasLiftT.mk.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (CoeTCₓ.coe.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (coeBase.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (coeSubtype.{1} Real (fun (x : Real) => (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))) x))))) b)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e n) x))) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) (coeFn.{succ u1, succ u1} (MeasureTheory.SimpleFunc.{u1, 0} α _inst_1 Nat) (fun (_x : MeasureTheory.SimpleFunc.{u1, 0} α _inst_1 Nat) => α -> Nat) (MeasureTheory.SimpleFunc.instCoeFun.{u1, 0} α Nat _inst_1) (MeasureTheory.SimpleFunc.nearestPtInd.{u1} α _inst_1 _inst_2 _inst_3 e N) x))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] (e : Nat -> α) (N : Nat) (x : α), Eq.{1} Nat (MeasureTheory.SimpleFunc.toFun.{u1, 0} α _inst_1 Nat (MeasureTheory.SimpleFunc.nearestPtInd.{u1} α _inst_1 _inst_2 _inst_3 e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) x) (ite.{1} Nat (forall (k : Nat), (LE.le.{0} Nat instLENat k N) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e k) x))) (Nat.decidableBallLe N (fun (k : Nat) (H : LE.le.{0} Nat instLENat k N) => LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e k) x)) (fun (n : Nat) (h : LE.le.{0} Nat instLENat n N) => (fun (a : Nat) => Classical.propDecidable (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e a) x))) n)) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (MeasureTheory.SimpleFunc.toFun.{u1, 0} α _inst_1 Nat (MeasureTheory.SimpleFunc.nearestPtInd.{u1} α _inst_1 _inst_2 _inst_3 e N) x))
+<too large>
 Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.nearest_pt_ind_succ MeasureTheory.SimpleFunc.nearestPtInd_succₓ'. -/
 theorem nearestPtInd_succ (e : ℕ → α) (N : ℕ) (x : α) :
     nearestPtInd e (N + 1) x =
@@ -211,10 +208,7 @@ theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀
 -/
 
 /- warning: measure_theory.simple_func.edist_approx_on_mono -> MeasureTheory.SimpleFunc.edist_approxOn_mono is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Subtype.topologicalSpace.{u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) {m : Nat} {n : Nat}, (LE.le.{0} Nat Nat.hasLe m n) -> (LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) (fun (_x : MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) => β -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u2, u1} β α _inst_4) (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x) (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) (fun (_x : MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) => β -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u2, u1} β α _inst_4) (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 m) x) (f x)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (Set.Elem.{u1} α s) (instTopologicalSpaceSubtype.{u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) {m : Nat} {n : Nat}, (LE.le.{0} Nat instLENat m n) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (MeasureTheory.SimpleFunc.toFun.{u2, u1} β _inst_4 α (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x) (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (MeasureTheory.SimpleFunc.toFun.{u2, u1} β _inst_4 α (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 m) x) (f x)))
+<too large>
 Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_mono MeasureTheory.SimpleFunc.edist_approxOn_monoₓ'. -/
 theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) {m n : ℕ} (h : m ≤ n) :
@@ -225,10 +219,7 @@ theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y
 #align measure_theory.simple_func.edist_approx_on_mono MeasureTheory.SimpleFunc.edist_approxOn_mono
 
 /- warning: measure_theory.simple_func.edist_approx_on_le -> MeasureTheory.SimpleFunc.edist_approxOn_le is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Subtype.topologicalSpace.{u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) (n : Nat), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) (fun (_x : MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) => β -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u2, u1} β α _inst_4) (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x) (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) y₀ (f x))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (Set.Elem.{u1} α s) (instTopologicalSpaceSubtype.{u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (MeasureTheory.SimpleFunc.toFun.{u2, u1} β _inst_4 α (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x) (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) y₀ (f x))
+<too large>
 Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_le MeasureTheory.SimpleFunc.edist_approxOn_leₓ'. -/
 theorem edist_approxOn_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) (n : ℕ) : edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist y₀ (f x) :=
@@ -236,10 +227,7 @@ theorem edist_approxOn_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀
 #align measure_theory.simple_func.edist_approx_on_le MeasureTheory.SimpleFunc.edist_approxOn_le
 
 /- warning: measure_theory.simple_func.edist_approx_on_y0_le -> MeasureTheory.SimpleFunc.edist_approxOn_y0_le is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Subtype.topologicalSpace.{u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) (n : Nat), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) y₀ (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) (fun (_x : MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) => β -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u2, u1} β α _inst_4) (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x)) (HAdd.hAdd.{0, 0, 0} ENNReal ENNReal ENNReal (instHAdd.{0} ENNReal (Distrib.toHasAdd.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) y₀ (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) y₀ (f x)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (Set.Elem.{u1} α s) (instTopologicalSpaceSubtype.{u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) y₀ (MeasureTheory.SimpleFunc.toFun.{u2, u1} β _inst_4 α (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x)) (HAdd.hAdd.{0, 0, 0} ENNReal ENNReal ENNReal (instHAdd.{0} ENNReal (Distrib.toAdd.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)))))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) y₀ (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) y₀ (f x)))
+<too large>
 Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_y0_le MeasureTheory.SimpleFunc.edist_approxOn_y0_leₓ'. -/
 theorem edist_approxOn_y0_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) (n : ℕ) :
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov, Heather Macbeth
 
 ! This file was ported from Lean 3 source module measure_theory.function.simple_func_dense
-! leanprover-community/mathlib commit 7317149f12f55affbc900fc873d0d422485122b9
+! leanprover-community/mathlib commit 4280f5f32e16755ec7985ce11e189b6cd6ff6735
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.MeasureTheory.Function.SimpleFunc
 /-!
 # Density of simple functions
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Show that each Borel measurable function can be approximated pointwise
 by a sequence of simple functions.
 
Diff
@@ -56,6 +56,7 @@ namespace SimpleFunc
 
 variable [MeasurableSpace α] [PseudoEMetricSpace α] [OpensMeasurableSpace α]
 
+#print MeasureTheory.SimpleFunc.nearestPtInd /-
 /-- `nearest_pt_ind e N x` is the index `k` such that `e k` is the nearest point to `x` among the
 points `e 0`, ..., `e N`. If more than one point are at the same distance from `x`, then
 `nearest_pt_ind e N x` returns the least of their indexes. -/
@@ -68,24 +69,37 @@ noncomputable def nearestPtInd (e : ℕ → α) : ℕ → α →ₛ ℕ
           measurableSet_lt measurable_edist_right measurable_edist_right)
       (const α <| N + 1) (nearest_pt_ind N)
 #align measure_theory.simple_func.nearest_pt_ind MeasureTheory.SimpleFunc.nearestPtInd
+-/
 
+#print MeasureTheory.SimpleFunc.nearestPt /-
 /-- `nearest_pt e N x` is the nearest point to `x` among the points `e 0`, ..., `e N`. If more than
 one point are at the same distance from `x`, then `nearest_pt e N x` returns the point with the
 least possible index. -/
 noncomputable def nearestPt (e : ℕ → α) (N : ℕ) : α →ₛ α :=
   (nearestPtInd e N).map e
 #align measure_theory.simple_func.nearest_pt MeasureTheory.SimpleFunc.nearestPt
+-/
 
+#print MeasureTheory.SimpleFunc.nearestPtInd_zero /-
 @[simp]
 theorem nearestPtInd_zero (e : ℕ → α) : nearestPtInd e 0 = const α 0 :=
   rfl
 #align measure_theory.simple_func.nearest_pt_ind_zero MeasureTheory.SimpleFunc.nearestPtInd_zero
+-/
 
+#print MeasureTheory.SimpleFunc.nearestPt_zero /-
 @[simp]
 theorem nearestPt_zero (e : ℕ → α) : nearestPt e 0 = const α (e 0) :=
   rfl
 #align measure_theory.simple_func.nearest_pt_zero MeasureTheory.SimpleFunc.nearestPt_zero
+-/
 
+/- warning: measure_theory.simple_func.nearest_pt_ind_succ -> MeasureTheory.SimpleFunc.nearestPtInd_succ is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] (e : Nat -> α) (N : Nat) (x : α), Eq.{1} Nat (coeFn.{succ u1, succ u1} (MeasureTheory.SimpleFunc.{u1, 0} α _inst_1 Nat) (fun (_x : MeasureTheory.SimpleFunc.{u1, 0} α _inst_1 Nat) => α -> Nat) (MeasureTheory.SimpleFunc.instCoeFun.{u1, 0} α Nat _inst_1) (MeasureTheory.SimpleFunc.nearestPtInd.{u1} α _inst_1 _inst_2 _inst_3 e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) x) (ite.{1} Nat (forall (k : Nat), (LE.le.{0} Nat Nat.hasLe k N) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e k) x))) (Nat.decidableBallLe N (fun (k : Nat) (H : LE.le.{0} Nat Nat.hasLe k N) => LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e k) x)) (fun (n : Nat) (h : LE.le.{0} Nat Nat.hasLe n N) => WithTop.decidableLT.{0} NNReal (Preorder.toHasLt.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (SemilatticeSup.toPartialOrder.{0} NNReal (Lattice.toSemilatticeSup.{0} NNReal (LinearOrder.toLattice.{0} NNReal (ConditionallyCompleteLinearOrder.toLinearOrder.{0} NNReal (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} NNReal NNReal.conditionallyCompleteLinearOrderBot))))))) (fun (a : NNReal) (b : NNReal) => Real.decidableLT ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (HasLiftT.mk.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (CoeTCₓ.coe.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (coeBase.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (coeSubtype.{1} Real (fun (x : Real) => (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))) x))))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (HasLiftT.mk.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (CoeTCₓ.coe.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (coeBase.{1, 1} (Subtype.{1} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))) Real (coeSubtype.{1} Real (fun (x : Real) => (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Ici.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (ConditionallyCompleteLattice.toLattice.{0} Real (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} Real Real.conditionallyCompleteLinearOrder))))) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))) x))))) b)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e n) x))) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) N (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) (coeFn.{succ u1, succ u1} (MeasureTheory.SimpleFunc.{u1, 0} α _inst_1 Nat) (fun (_x : MeasureTheory.SimpleFunc.{u1, 0} α _inst_1 Nat) => α -> Nat) (MeasureTheory.SimpleFunc.instCoeFun.{u1, 0} α Nat _inst_1) (MeasureTheory.SimpleFunc.nearestPtInd.{u1} α _inst_1 _inst_2 _inst_3 e N) x))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] (e : Nat -> α) (N : Nat) (x : α), Eq.{1} Nat (MeasureTheory.SimpleFunc.toFun.{u1, 0} α _inst_1 Nat (MeasureTheory.SimpleFunc.nearestPtInd.{u1} α _inst_1 _inst_2 _inst_3 e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) x) (ite.{1} Nat (forall (k : Nat), (LE.le.{0} Nat instLENat k N) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e k) x))) (Nat.decidableBallLe N (fun (k : Nat) (H : LE.le.{0} Nat instLENat k N) => LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e k) x)) (fun (n : Nat) (h : LE.le.{0} Nat instLENat n N) => (fun (a : Nat) => Classical.propDecidable (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e a) x))) n)) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) N (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (MeasureTheory.SimpleFunc.toFun.{u1, 0} α _inst_1 Nat (MeasureTheory.SimpleFunc.nearestPtInd.{u1} α _inst_1 _inst_2 _inst_3 e N) x))
+Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.nearest_pt_ind_succ MeasureTheory.SimpleFunc.nearestPtInd_succₓ'. -/
 theorem nearestPtInd_succ (e : ℕ → α) (N : ℕ) (x : α) :
     nearestPtInd e (N + 1) x =
       if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else nearestPtInd e N x :=
@@ -95,6 +109,7 @@ theorem nearestPtInd_succ (e : ℕ → α) (N : ℕ) (x : α) :
   simp
 #align measure_theory.simple_func.nearest_pt_ind_succ MeasureTheory.SimpleFunc.nearestPtInd_succ
 
+#print MeasureTheory.SimpleFunc.nearestPtInd_le /-
 theorem nearestPtInd_le (e : ℕ → α) (N : ℕ) (x : α) : nearestPtInd e N x ≤ N :=
   by
   induction' N with N ihN; · simp
@@ -102,7 +117,14 @@ theorem nearestPtInd_le (e : ℕ → α) (N : ℕ) (x : α) : nearestPtInd e N x
   split_ifs
   exacts[le_rfl, ihN.trans N.le_succ]
 #align measure_theory.simple_func.nearest_pt_ind_le MeasureTheory.SimpleFunc.nearestPtInd_le
+-/
 
+/- warning: measure_theory.simple_func.edist_nearest_pt_le -> MeasureTheory.SimpleFunc.edist_nearestPt_le is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] (e : Nat -> α) (x : α) {k : Nat} {N : Nat}, (LE.le.{0} Nat Nat.hasLe k N) -> (LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (coeFn.{succ u1, succ u1} (MeasureTheory.SimpleFunc.{u1, u1} α _inst_1 α) (fun (_x : MeasureTheory.SimpleFunc.{u1, u1} α _inst_1 α) => α -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u1, u1} α α _inst_1) (MeasureTheory.SimpleFunc.nearestPt.{u1} α _inst_1 _inst_2 _inst_3 e N) x) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (e k) x))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] (e : Nat -> α) (x : α) {k : Nat} {N : Nat}, (LE.le.{0} Nat instLENat k N) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (MeasureTheory.SimpleFunc.toFun.{u1, u1} α _inst_1 α (MeasureTheory.SimpleFunc.nearestPt.{u1} α _inst_1 _inst_2 _inst_3 e N) x) x) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (e k) x))
+Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_nearest_pt_le MeasureTheory.SimpleFunc.edist_nearestPt_leₓ'. -/
 theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N) :
     edist (nearestPt e N x) x ≤ edist (e k) x :=
   by
@@ -118,6 +140,7 @@ theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N)
       exacts[(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]
 #align measure_theory.simple_func.edist_nearest_pt_le MeasureTheory.SimpleFunc.edist_nearestPt_le
 
+#print MeasureTheory.SimpleFunc.tendsto_nearestPt /-
 theorem tendsto_nearestPt {e : ℕ → α} {x : α} (hx : x ∈ closure (range e)) :
     Tendsto (fun N => nearestPt e N x) atTop (𝓝 x) :=
   by
@@ -126,9 +149,11 @@ theorem tendsto_nearestPt {e : ℕ → α} {x : α} (hx : x ∈ closure (range e
   rw [edist_comm] at hN
   exact ⟨N, trivial, fun n hn => (edist_nearest_pt_le e x hn).trans_lt hN⟩
 #align measure_theory.simple_func.tendsto_nearest_pt MeasureTheory.SimpleFunc.tendsto_nearestPt
+-/
 
 variable [MeasurableSpace β] {f : β → α}
 
+#print MeasureTheory.SimpleFunc.approxOn /-
 /-- Approximate a measurable function by a sequence of simple functions `F n` such that
 `F n x ∈ s`. -/
 noncomputable def approxOn (f : β → α) (hf : Measurable f) (s : Set α) (y₀ : α) (h₀ : y₀ ∈ s)
@@ -136,13 +161,17 @@ noncomputable def approxOn (f : β → α) (hf : Measurable f) (s : Set α) (y
   haveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩
   comp (nearest_pt (fun k => Nat.casesOn k y₀ (coe ∘ dense_seq s) : ℕ → α) n) f hf
 #align measure_theory.simple_func.approx_on MeasureTheory.SimpleFunc.approxOn
+-/
 
+#print MeasureTheory.SimpleFunc.approxOn_zero /-
 @[simp]
 theorem approxOn_zero {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) : approxOn f hf s y₀ h₀ 0 x = y₀ :=
   rfl
 #align measure_theory.simple_func.approx_on_zero MeasureTheory.SimpleFunc.approxOn_zero
+-/
 
+#print MeasureTheory.SimpleFunc.approxOn_mem /-
 theorem approxOn_mem {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (n : ℕ) (x : β) : approxOn f hf s y₀ h₀ n x ∈ s :=
   by
@@ -151,14 +180,18 @@ theorem approxOn_mem {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α
   rintro (_ | n)
   exacts[h₀, Subtype.mem _]
 #align measure_theory.simple_func.approx_on_mem MeasureTheory.SimpleFunc.approxOn_mem
+-/
 
+#print MeasureTheory.SimpleFunc.approxOn_comp /-
 @[simp]
 theorem approxOn_comp {γ : Type _} [MeasurableSpace γ] {f : β → α} (hf : Measurable f) {g : γ → β}
     (hg : Measurable g) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s) [SeparableSpace s] (n : ℕ) :
     approxOn (f ∘ g) (hf.comp hg) s y₀ h₀ n = (approxOn f hf s y₀ h₀ n).comp g hg :=
   rfl
 #align measure_theory.simple_func.approx_on_comp MeasureTheory.SimpleFunc.approxOn_comp
+-/
 
+#print MeasureTheory.SimpleFunc.tendsto_approxOn /-
 theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] {x : β} (hx : f x ∈ closure s) :
     Tendsto (fun n => approxOn f hf s y₀ h₀ n x) atTop (𝓝 <| f x) :=
@@ -172,7 +205,14 @@ theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀
     subset.trans (image_closure_subset_closure_image continuous_subtype_val)
       (subset_union_right _ _)
 #align measure_theory.simple_func.tendsto_approx_on MeasureTheory.SimpleFunc.tendsto_approxOn
+-/
 
+/- warning: measure_theory.simple_func.edist_approx_on_mono -> MeasureTheory.SimpleFunc.edist_approxOn_mono is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Subtype.topologicalSpace.{u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) {m : Nat} {n : Nat}, (LE.le.{0} Nat Nat.hasLe m n) -> (LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) (fun (_x : MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) => β -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u2, u1} β α _inst_4) (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x) (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) (fun (_x : MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) => β -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u2, u1} β α _inst_4) (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 m) x) (f x)))
+but is expected to have type
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (Set.Elem.{u1} α s) (instTopologicalSpaceSubtype.{u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) {m : Nat} {n : Nat}, (LE.le.{0} Nat instLENat m n) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (MeasureTheory.SimpleFunc.toFun.{u2, u1} β _inst_4 α (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x) (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (MeasureTheory.SimpleFunc.toFun.{u2, u1} β _inst_4 α (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 m) x) (f x)))
+Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_mono MeasureTheory.SimpleFunc.edist_approxOn_monoₓ'. -/
 theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) {m n : ℕ} (h : m ≤ n) :
     edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist (approxOn f hf s y₀ h₀ m x) (f x) :=
@@ -181,11 +221,23 @@ theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y
   exact edist_nearest_pt_le _ _ ((nearest_pt_ind_le _ _ _).trans h)
 #align measure_theory.simple_func.edist_approx_on_mono MeasureTheory.SimpleFunc.edist_approxOn_mono
 
+/- warning: measure_theory.simple_func.edist_approx_on_le -> MeasureTheory.SimpleFunc.edist_approxOn_le is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Subtype.topologicalSpace.{u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) (n : Nat), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) (fun (_x : MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) => β -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u2, u1} β α _inst_4) (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x) (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) y₀ (f x))
+but is expected to have type
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (Set.Elem.{u1} α s) (instTopologicalSpaceSubtype.{u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) (MeasureTheory.SimpleFunc.toFun.{u2, u1} β _inst_4 α (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x) (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) y₀ (f x))
+Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_le MeasureTheory.SimpleFunc.edist_approxOn_leₓ'. -/
 theorem edist_approxOn_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) (n : ℕ) : edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist y₀ (f x) :=
   edist_approxOn_mono hf h₀ x (zero_le n)
 #align measure_theory.simple_func.edist_approx_on_le MeasureTheory.SimpleFunc.edist_approxOn_le
 
+/- warning: measure_theory.simple_func.edist_approx_on_y0_le -> MeasureTheory.SimpleFunc.edist_approxOn_y0_le is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Subtype.topologicalSpace.{u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) (n : Nat), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) y₀ (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) (fun (_x : MeasureTheory.SimpleFunc.{u2, u1} β _inst_4 α) => β -> α) (MeasureTheory.SimpleFunc.instCoeFun.{u2, u1} β α _inst_4) (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x)) (HAdd.hAdd.{0, 0, 0} ENNReal ENNReal ENNReal (instHAdd.{0} ENNReal (Distrib.toHasAdd.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) y₀ (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_2) y₀ (f x)))
+but is expected to have type
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u1} α] [_inst_3 : OpensMeasurableSpace.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)) _inst_1] [_inst_4 : MeasurableSpace.{u2} β] {f : β -> α} (hf : Measurable.{u2, u1} β α _inst_4 _inst_1 f) {s : Set.{u1} α} {y₀ : α} (h₀ : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y₀ s) [_inst_5 : TopologicalSpace.SeparableSpace.{u1} (Set.Elem.{u1} α s) (instTopologicalSpaceSubtype.{u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_2)))] (x : β) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (OmegaCompletePartialOrder.toPartialOrder.{0} ENNReal (CompleteLattice.instOmegaCompletePartialOrder.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) y₀ (MeasureTheory.SimpleFunc.toFun.{u2, u1} β _inst_4 α (MeasureTheory.SimpleFunc.approxOn.{u1, u2} α β _inst_1 _inst_2 _inst_3 _inst_4 f hf s y₀ h₀ _inst_5 n) x)) (HAdd.hAdd.{0, 0, 0} ENNReal ENNReal ENNReal (instHAdd.{0} ENNReal (Distrib.toAdd.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)))))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) y₀ (f x)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_2) y₀ (f x)))
+Case conversion may be inaccurate. Consider using '#align measure_theory.simple_func.edist_approx_on_y0_le MeasureTheory.SimpleFunc.edist_approxOn_y0_leₓ'. -/
 theorem edist_approxOn_y0_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) (n : ℕ) :
     edist y₀ (approxOn f hf s y₀ h₀ n x) ≤ edist y₀ (f x) + edist y₀ (f x) :=
Diff
@@ -63,8 +63,8 @@ noncomputable def nearestPtInd (e : ℕ → α) : ℕ → α →ₛ ℕ
   | 0 => const α 0
   | N + 1 =>
     piecewise (⋂ k ≤ N, { x | edist (e (N + 1)) x < edist (e k) x })
-      (MeasurableSet.interᵢ fun k =>
-        MeasurableSet.interᵢ fun hk =>
+      (MeasurableSet.iInter fun k =>
+        MeasurableSet.iInter fun hk =>
           measurableSet_lt measurable_edist_right measurable_edist_right)
       (const α <| N + 1) (nearest_pt_ind N)
 #align measure_theory.simple_func.nearest_pt_ind MeasureTheory.SimpleFunc.nearestPtInd
Diff
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov, Heather Macbeth
 
 ! This file was ported from Lean 3 source module measure_theory.function.simple_func_dense
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 7317149f12f55affbc900fc873d0d422485122b9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.MeasureTheory.Integral.Lebesgue
+import Mathbin.MeasureTheory.Function.SimpleFunc
 
 /-!
 # Density of simple functions
Diff
@@ -54,7 +54,7 @@ namespace SimpleFunc
 /-! ### Pointwise approximation by simple functions -/
 
 
-variable [MeasurableSpace α] [PseudoEmetricSpace α] [OpensMeasurableSpace α]
+variable [MeasurableSpace α] [PseudoEMetricSpace α] [OpensMeasurableSpace α]
 
 /-- `nearest_pt_ind e N x` is the index `k` such that `e k` is the nearest point to `x` among the
 points `e 0`, ..., `e N`. If more than one point are at the same distance from `x`, then
@@ -122,7 +122,7 @@ theorem tendsto_nearestPt {e : ℕ → α} {x : α} (hx : x ∈ closure (range e
     Tendsto (fun N => nearestPt e N x) atTop (𝓝 x) :=
   by
   refine' (at_top_basis.tendsto_iff nhds_basis_eball).2 fun ε hε => _
-  rcases Emetric.mem_closure_iff.1 hx ε hε with ⟨_, ⟨N, rfl⟩, hN⟩
+  rcases EMetric.mem_closure_iff.1 hx ε hε with ⟨_, ⟨N, rfl⟩, hN⟩
   rw [edist_comm] at hN
   exact ⟨N, trivial, fun n hn => (edist_nearest_pt_le e x hn).trans_lt hN⟩
 #align measure_theory.simple_func.tendsto_nearest_pt MeasureTheory.SimpleFunc.tendsto_nearestPt
Diff
@@ -36,9 +36,9 @@ by a sequence of simple functions.
 -/
 
 
-open Set Function Filter TopologicalSpace Ennreal Emetric Finset
+open Set Function Filter TopologicalSpace ENNReal Emetric Finset
 
-open Classical Topology Ennreal MeasureTheory BigOperators
+open Classical Topology ENNReal MeasureTheory BigOperators
 
 variable {α β ι E F 𝕜 : Type _}
 

Changes in mathlib4

mathlib3
mathlib4
chore: remove mathport name: <expression> lines (#11928)

Quoting [@digama0](https://github.com/digama0):

These were actually never meant to go in the file, they are basically debugging information and only useful on significantly broken mathport files. You can safely remove all of them.

Diff
@@ -45,7 +45,6 @@ noncomputable section
 
 namespace MeasureTheory
 
--- mathport name: «expr →ₛ »
 local infixr:25 " →ₛ " => SimpleFunc
 
 namespace SimpleFunc
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -36,7 +36,8 @@ by a sequence of simple functions.
 
 open Set Function Filter TopologicalSpace ENNReal EMetric Finset
 
-open Classical Topology ENNReal MeasureTheory BigOperators
+open scoped Classical
+open Topology ENNReal MeasureTheory BigOperators
 
 variable {α β ι E F 𝕜 : Type*}
 
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
@@ -168,7 +168,7 @@ theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀
 theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
     [SeparableSpace s] (x : β) {m n : ℕ} (h : m ≤ n) :
     edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist (approxOn f hf s y₀ h₀ m x) (f x) := by
-  dsimp only [approxOn, coe_comp, Function.comp]
+  dsimp only [approxOn, coe_comp, Function.comp_def]
   exact edist_nearestPt_le _ _ ((nearestPtInd_le _ _ _).trans h)
 #align measure_theory.simple_func.edist_approx_on_mono MeasureTheory.SimpleFunc.edist_approxOn_mono
 
feat: Fubini for functions with compact support and non-sigma-finite measures (#8125)
Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov, Heather Macbeth
 -/
 import Mathlib.MeasureTheory.Function.SimpleFunc
+import Mathlib.MeasureTheory.Constructions.BorelSpace.Metrizable
 
 #align_import measure_theory.function.simple_func_dense from "leanprover-community/mathlib"@"7317149f12f55affbc900fc873d0d422485122b9"
 
@@ -190,3 +191,77 @@ theorem edist_approxOn_y0_le {f : β → α} (hf : Measurable f) {s : Set α} {y
 end SimpleFunc
 
 end MeasureTheory
+
+section CompactSupport
+
+variable {X Y α : Type*} [Zero α]
+    [TopologicalSpace X] [TopologicalSpace Y] [MeasurableSpace X] [MeasurableSpace Y]
+    [OpensMeasurableSpace X] [OpensMeasurableSpace Y]
+
+/-- A continuous function with compact support on a product space can be uniformly approximated by
+simple functions. The subtlety is that we do not assume that the spaces are separable, so the
+product of the Borel sigma algebras might not contain all open sets, but still it contains enough
+of them to approximate compactly supported continuous functions. -/
+lemma HasCompactSupport.exists_simpleFunc_approx_of_prod [PseudoMetricSpace α]
+    {f : X × Y → α} (hf : Continuous f) (h'f : HasCompactSupport f)
+    {ε : ℝ} (hε : 0 < ε) :
+    ∃ (g : SimpleFunc (X × Y) α), ∀ x, dist (f x) (g x) < ε := by
+  have M : ∀ (K : Set (X × Y)), IsCompact K →
+      ∃ (g : SimpleFunc (X × Y) α), ∃ (s : Set (X × Y)), MeasurableSet s ∧ K ⊆ s ∧
+      ∀ x ∈ s, dist (f x) (g x) < ε := by
+    intro K hK
+    apply IsCompact.induction_on
+      (p := fun t ↦ ∃ (g : SimpleFunc (X × Y) α), ∃ (s : Set (X × Y)), MeasurableSet s ∧ t ⊆ s ∧
+        ∀ x ∈ s, dist (f x) (g x) < ε) hK
+    · exact ⟨0, ∅, by simp⟩
+    · intro t t' htt' ⟨g, s, s_meas, ts, hg⟩
+      exact ⟨g, s, s_meas, htt'.trans ts, hg⟩
+    · intro t t' ⟨g, s, s_meas, ts, hg⟩ ⟨g', s', s'_meas, t's', hg'⟩
+      refine ⟨g.piecewise s s_meas g', s ∪ s', s_meas.union s'_meas,
+        union_subset_union ts t's', fun p hp ↦ ?_⟩
+      by_cases H : p ∈ s
+      · simpa [H, SimpleFunc.piecewise_apply] using hg p H
+      · simp only [SimpleFunc.piecewise_apply, H, ite_false]
+        apply hg'
+        simpa [H] using (mem_union _ _ _).1 hp
+    · rintro ⟨x, y⟩ -
+      obtain ⟨u, v, hu, xu, hv, yv, huv⟩ : ∃ u v, IsOpen u ∧ x ∈ u ∧ IsOpen v ∧ y ∈ v ∧
+        u ×ˢ v ⊆ {z | dist (f z) (f (x, y)) < ε} :=
+          mem_nhds_prod_iff'.1 <| Metric.continuousAt_iff'.1 hf.continuousAt ε hε
+      refine ⟨u ×ˢ v, nhdsWithin_le_nhds <| (hu.prod hv).mem_nhds (mk_mem_prod xu yv), ?_⟩
+      exact ⟨SimpleFunc.const _ (f (x, y)), u ×ˢ v, hu.measurableSet.prod hv.measurableSet,
+        Subset.rfl, fun z hz ↦ huv hz⟩
+  obtain ⟨g, s, s_meas, fs, hg⟩ : ∃ g s, MeasurableSet s ∧ tsupport f ⊆ s ∧
+    ∀ (x : X × Y), x ∈ s → dist (f x) (g x) < ε := M _ h'f
+  refine ⟨g.piecewise s s_meas 0, fun p ↦ ?_⟩
+  by_cases H : p ∈ s
+  · simpa [H, SimpleFunc.piecewise_apply] using hg p H
+  · have : f p = 0 := by
+      contrapose! H
+      rw [← Function.mem_support] at H
+      exact fs (subset_tsupport _ H)
+    simp [SimpleFunc.piecewise_apply, H, ite_false, this, hε]
+
+/-- A continuous function with compact support on a product space is measurable for the product
+sigma-algebra. The subtlety is that we do not assume that the spaces are separable, so the
+product of the Borel sigma algebras might not contain all open sets, but still it contains enough
+of them to approximate compactly supported continuous functions. -/
+lemma HasCompactSupport.measurable_of_prod
+    [TopologicalSpace α] [PseudoMetrizableSpace α] [MeasurableSpace α] [BorelSpace α]
+    {f : X × Y → α} (hf : Continuous f) (h'f : HasCompactSupport f) :
+    Measurable f := by
+  letI : PseudoMetricSpace α := TopologicalSpace.pseudoMetrizableSpacePseudoMetric α
+  obtain ⟨u, -, u_pos, u_lim⟩ : ∃ u, StrictAnti u ∧ (∀ (n : ℕ), 0 < u n) ∧ Tendsto u atTop (𝓝 0) :=
+    exists_seq_strictAnti_tendsto (0 : ℝ)
+  have : ∀ n, ∃ (g : SimpleFunc (X × Y) α), ∀ x, dist (f x) (g x) < u n :=
+    fun n ↦ h'f.exists_simpleFunc_approx_of_prod hf (u_pos n)
+  choose g hg using this
+  have A : ∀ x, Tendsto (fun n ↦ g n x) atTop (𝓝 (f x)) := by
+    intro x
+    rw [tendsto_iff_dist_tendsto_zero]
+    apply squeeze_zero (fun n ↦ dist_nonneg) (fun n ↦ ?_) u_lim
+    rw [dist_comm]
+    exact (hg n x).le
+  apply measurable_of_tendsto_metrizable (fun n ↦ (g n).measurable) (tendsto_pi_nhds.2 A)
+
+end CompactSupport
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
@@ -37,7 +37,7 @@ open Set Function Filter TopologicalSpace ENNReal EMetric Finset
 
 open Classical Topology ENNReal MeasureTheory BigOperators
 
-variable {α β ι E F 𝕜 : Type _}
+variable {α β ι E F 𝕜 : Type*}
 
 noncomputable section
 
@@ -145,7 +145,7 @@ theorem approxOn_mem {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α
 #align measure_theory.simple_func.approx_on_mem MeasureTheory.SimpleFunc.approxOn_mem
 
 @[simp, nolint simpNF] -- Porting note: LHS doesn't simplify.
-theorem approxOn_comp {γ : Type _} [MeasurableSpace γ] {f : β → α} (hf : Measurable f) {g : γ → β}
+theorem approxOn_comp {γ : Type*} [MeasurableSpace γ] {f : β → α} (hf : Measurable f) {g : γ → β}
     (hg : Measurable g) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s) [SeparableSpace s] (n : ℕ) :
     approxOn (f ∘ g) (hf.comp hg) s y₀ h₀ n = (approxOn f hf s y₀ h₀ n).comp g hg :=
   rfl
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,14 +2,11 @@
 Copyright (c) 2019 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Yury Kudryashov, Heather Macbeth
-
-! This file was ported from Lean 3 source module measure_theory.function.simple_func_dense
-! leanprover-community/mathlib commit 7317149f12f55affbc900fc873d0d422485122b9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.MeasureTheory.Function.SimpleFunc
 
+#align_import measure_theory.function.simple_func_dense from "leanprover-community/mathlib"@"7317149f12f55affbc900fc873d0d422485122b9"
+
 /-!
 # Density of simple functions
 
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -109,7 +109,7 @@ theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N)
     split_ifs with h
     · rcases hk.eq_or_lt with (rfl | hk)
       exacts [le_rfl, (h k (Nat.lt_succ_iff.1 hk)).le]
-    · push_neg  at h
+    · push_neg at h
       rcases h with ⟨l, hlN, hxl⟩
       rcases hk.eq_or_lt with (rfl | hk)
       exacts [(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]
feat: port MeasureTheory.Function.SimpleFuncDense (#4099)

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Chris Hughes <chrishughes24@gmail.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com>

Dependencies 10 + 634

635 files ported (98.4%)
285586 lines ported (98.2%)
Show graph

The unported dependencies are

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