File: Mathlib/MeasureTheory/Function/SimpleFuncDense.lean

full_name: MeasureTheory._aux_Mathlib_MeasureTheory_Function_SimpleFuncDense___unexpand_MeasureTheory_SimpleFunc_1
code: local infixr:25 " →ₛ " => SimpleFunc
goal: Lean.PrettyPrinter.Unexpander

full_name: MeasureTheory.«_aux_Mathlib_MeasureTheory_Function_SimpleFuncDense___macroRules_MeasureTheory_term_→ₛ__1»
code: local infixr:25 " →ₛ " => SimpleFunc
goal: Lean.Macro

full_name: MeasureTheory.SimpleFunc.nearestPtInd
code: /-- `nearestPtInd 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
`nearestPtInd e N x` returns the least of their indexes. -/
noncomputable def nearestPtInd (e : ℕ → α) : ℕ → α →ₛ ℕ
  
goal: ℕ → MeasureTheory.SimpleFunc α ℕ

full_name: MeasureTheory.SimpleFunc.nearestPt
code: /-- `nearestPt 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 `nearestPt e N x` returns the point with the
least possible index. -/
noncomputable def nearestPt (e : ℕ → α) (N : ℕ) : α →ₛ α 
goal: MeasureTheory.SimpleFunc α α

full_name: MeasureTheory.SimpleFunc.nearestPtInd_zero
code: @[simp]
theorem nearestPtInd_zero (e : ℕ → α) : nearestPtInd e 0 = const α 0 
goal: MeasureTheory.SimpleFunc.nearestPtInd e 0 = MeasureTheory.SimpleFunc.const α 0

full_name: MeasureTheory.SimpleFunc.nearestPt_zero
code: @[simp]
theorem nearestPt_zero (e : ℕ → α) : nearestPt e 0 = const α (e 0) 
goal: MeasureTheory.SimpleFunc.nearestPt e 0 = MeasureTheory.SimpleFunc.const α (e 0)

full_name: MeasureTheory.SimpleFunc.nearestPtInd_succ
code: 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 
goal: ↑(MeasureTheory.SimpleFunc.nearestPtInd e (N + 1)) x =
  if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(MeasureTheory.SimpleFunc.nearestPtInd e N) x

full_name: MeasureTheory.SimpleFunc.nearestPtInd_le
code: theorem nearestPtInd_le (e : ℕ → α) (N : ℕ) (x : α) : nearestPtInd e N x ≤ N 
goal: ↑(MeasureTheory.SimpleFunc.nearestPtInd e N) x ≤ N

full_name: MeasureTheory.SimpleFunc.edist_nearestPt_le
code: theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N) :
    edist (nearestPt e N x) x ≤ edist (e k) x 
goal: edist (↑(MeasureTheory.SimpleFunc.nearestPt e N) x) x ≤ edist (e k) x

full_name: MeasureTheory.SimpleFunc.tendsto_nearestPt
code: theorem tendsto_nearestPt {e : ℕ → α} {x : α} (hx : x ∈ closure (range e)) :
    Tendsto (fun N => nearestPt e N x) atTop (𝓝 x) 
goal: Filter.Tendsto (fun N => ↑(MeasureTheory.SimpleFunc.nearestPt e N) x) Filter.atTop (𝓝 x)

full_name: MeasureTheory.SimpleFunc.approxOn
code: /-- 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)
    [SeparableSpace s] (n : ℕ) : β →ₛ α 
goal: MeasureTheory.SimpleFunc β α

full_name: MeasureTheory.SimpleFunc.approxOn_zero
code: @[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₀ 
goal: ↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ 0) x = y₀

full_name: MeasureTheory.SimpleFunc.approxOn_mem
code: 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 
goal: ↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ n) x ∈ s

full_name: MeasureTheory.SimpleFunc.approxOn_comp
code: @[simp, nolint simpNF] -- Porting note: LHS doesn't simplify.
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 
goal: MeasureTheory.SimpleFunc.approxOn (f ∘ g) ⋯ s y₀ h₀ n = (MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ n).comp g hg

full_name: MeasureTheory.SimpleFunc.tendsto_approxOn
code: 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) 
goal: Filter.Tendsto (fun n => ↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ n) x) Filter.atTop (𝓝 (f x))

full_name: MeasureTheory.SimpleFunc.edist_approxOn_mono
code: 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) 
goal: edist (↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ n) x) (f x) ≤
  edist (↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ m) x) (f x)

full_name: MeasureTheory.SimpleFunc.edist_approxOn_le
code: 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) 
goal: edist (↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ n) x) (f x) ≤ edist y₀ (f x)

full_name: MeasureTheory.SimpleFunc.edist_approxOn_y0_le
code: 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) 
goal: edist y₀ (↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ n) x) ≤ edist y₀ (f x) + edist y₀ (f x)

full_name: HasCompactSupport.exists_simpleFunc_approx_of_prod
code: /-- 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) < ε 
goal: ∃ g, ∀ (x : X × Y), dist (f x) (↑g x) < ε

full_name: HasCompactSupport.measurable_of_prod
code: /-- 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 
goal: Measurable f