l3lab/ntp-mathlib huggingface dataset:
/-- The integrals of thickened indicators of a closed set against a finite measure tend to the
measure of the closed set if the thickening radii tend to zero. -/
theorem tendsto_lintegral_thickenedIndicator_of_isClosed {Ω : Type*} [MeasurableSpace Ω]
    [PseudoEMetricSpace Ω] [OpensMeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] {F : Set Ω}
    (F_closed : IsClosed F) {δs : ℕ → ℝ} (δs_pos : ∀ n, 0 < δs n)
    (δs_lim : Tendsto δs atTop (𝓝 0)) :
    Tendsto (fun n ↦ lintegral μ fun ω ↦ (thickenedIndicator (δs_pos n) F ω : ℝ≥0∞)) atTop
      (𝓝 (μ F)) := by
  apply measure_of_cont_bdd_of_tendsto_indicator μ F_closed.measurableSet
    (fun n ↦ thickenedIndicator (δs_pos n) F) fun n ω ↦ thickenedIndicator_le_one (δs_pos n) F ω
  have key := thickenedIndicator_tendsto_indicator_closure δs_pos δs_lim F
  

Proof state:
Ω✝ : Type u_1
inst✝⁶ : TopologicalSpace Ω✝
inst✝⁵ : MeasurableSpace Ω✝
inst✝⁴ : OpensMeasurableSpace Ω✝
Ω : Type u_2
inst✝³ : MeasurableSpace Ω
inst✝² : PseudoEMetricSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
F : Set Ω
F_closed : IsClosed F
δs : ℕ → ℝ
δs_pos : ∀ (n : ℕ), 0 < δs n
δs_lim : Tendsto δs atTop (𝓝 0)
key : Tendsto (fun n => ⇑(thickenedIndicator (_ : 0 < δs n) F)) atTop (𝓝 (indicator (closure F) fun x => 1))
⊢ Tendsto (fun n ω => (thickenedIndicator (_ : 0 < δs n) F) ω) atTop (𝓝 (indicator F fun x => 1))

Next tactic:
rwa [F_closed.closure_eq] at key
lemma indicator_le_apprSeq (n : ℕ) :
    indicator F (fun _ ↦ 1) ≤ hF.apprSeq n := by
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
n : ℕ
⊢ (indicator F fun x => 1) ≤ ⇑(IsClosed.apprSeq hF n)

Next tactic:
intro x
lemma indicator_le_apprSeq (n : ℕ) :
    indicator F (fun _ ↦ 1) ≤ hF.apprSeq n := by
  intro x
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
n : ℕ
x : X
⊢ indicator F (fun x => 1) x ≤ (IsClosed.apprSeq hF n) x

Next tactic:
by_cases hxF : x ∈ F
lemma indicator_le_apprSeq (n : ℕ) :
    indicator F (fun _ ↦ 1) ≤ hF.apprSeq n := by
  intro x
  by_cases hxF : x ∈ F
  · 

Proof state:
case pos
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
n : ℕ
x : X
hxF : x ∈ F
⊢ indicator F (fun x => 1) x ≤ (IsClosed.apprSeq hF n) x

Next tactic:
simp only [hxF, indicator_of_mem, apprSeq_apply_eq_one hF n, le_refl]
lemma indicator_le_apprSeq (n : ℕ) :
    indicator F (fun _ ↦ 1) ≤ hF.apprSeq n := by
  intro x
  by_cases hxF : x ∈ F
  · simp only [hxF, indicator_of_mem, apprSeq_apply_eq_one hF n, le_refl]
  · 

Proof state:
case neg
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
n : ℕ
x : X
hxF : x ∉ F
⊢ indicator F (fun x => 1) x ≤ (IsClosed.apprSeq hF n) x

Next tactic:
simp only [hxF, not_false_eq_true, indicator_of_not_mem, zero_le]
/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ := by
  

Proof state:
X : Type u_1
inst✝³ : TopologicalSpace X
inst✝² : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
inst✝¹ : MeasurableSpace X
inst✝ : OpensMeasurableSpace X
μ : Measure X
n : ℕ
⊢ ↑↑μ F ≤ ∫⁻ (x : X), ↑((IsClosed.apprSeq hF n) x) ∂μ

Next tactic:
convert_to ∫⁻ x, (F.indicator (fun _ ↦ (1 : ℝ≥0∞))) x ∂μ ≤ ∫⁻ x, hF.apprSeq n x ∂μ
/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ := by
  convert_to ∫⁻ x, (F.indicator (fun _ ↦ (1 : ℝ≥0∞))) x ∂μ ≤ ∫⁻ x, hF.apprSeq n x ∂μ
  · 

Proof state:
case h.e'_3
X : Type u_1
inst✝³ : TopologicalSpace X
inst✝² : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
inst✝¹ : MeasurableSpace X
inst✝ : OpensMeasurableSpace X
μ : Measure X
n : ℕ
⊢ ↑↑μ F = ∫⁻ (x : X), indicator F (fun x => 1) x ∂μ

Next tactic:
rw [lintegral_indicator _ hF.measurableSet]
/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ := by
  convert_to ∫⁻ x, (F.indicator (fun _ ↦ (1 : ℝ≥0∞))) x ∂μ ≤ ∫⁻ x, hF.apprSeq n x ∂μ
  · rw [lintegral_indicator _ hF.measurableSet]
    

Proof state:
case h.e'_3
X : Type u_1
inst✝³ : TopologicalSpace X
inst✝² : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
inst✝¹ : MeasurableSpace X
inst✝ : OpensMeasurableSpace X
μ : Measure X
n : ℕ
⊢ ↑↑μ F = ∫⁻ (a : X) in F, 1 ∂μ

Next tactic:
simp only [lintegral_one, MeasurableSet.univ, Measure.restrict_apply, univ_inter]
/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ := by
  convert_to ∫⁻ x, (F.indicator (fun _ ↦ (1 : ℝ≥0∞))) x ∂μ ≤ ∫⁻ x, hF.apprSeq n x ∂μ
  · rw [lintegral_indicator _ hF.measurableSet]
    simp only [lintegral_one, MeasurableSet.univ, Measure.restrict_apply, univ_inter]
  · 

Proof state:
X : Type u_1
inst✝³ : TopologicalSpace X
inst✝² : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
inst✝¹ : MeasurableSpace X
inst✝ : OpensMeasurableSpace X
μ : Measure X
n : ℕ
⊢ ∫⁻ (x : X), indicator F (fun x => 1) x ∂μ ≤ ∫⁻ (x : X), ↑((IsClosed.apprSeq hF n) x) ∂μ

Next tactic:
apply lintegral_mono
/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ := by
  convert_to ∫⁻ x, (F.indicator (fun _ ↦ (1 : ℝ≥0∞))) x ∂μ ≤ ∫⁻ x, hF.apprSeq n x ∂μ
  · rw [lintegral_indicator _ hF.measurableSet]
    simp only [lintegral_one, MeasurableSet.univ, Measure.restrict_apply, univ_inter]
  · apply lintegral_mono
    

Proof state:
case hfg
X : Type u_1
inst✝³ : TopologicalSpace X
inst✝² : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
inst✝¹ : MeasurableSpace X
inst✝ : OpensMeasurableSpace X
μ : Measure X
n : ℕ
⊢ (fun a => indicator F (fun x => 1) a) ≤ fun a => ↑((IsClosed.apprSeq hF n) a)

Next tactic:
intro x
/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ := by
  convert_to ∫⁻ x, (F.indicator (fun _ ↦ (1 : ℝ≥0∞))) x ∂μ ≤ ∫⁻ x, hF.apprSeq n x ∂μ
  · rw [lintegral_indicator _ hF.measurableSet]
    simp only [lintegral_one, MeasurableSet.univ, Measure.restrict_apply, univ_inter]
  · apply lintegral_mono
    intro x
    

Proof state:
case hfg
X : Type u_1
inst✝³ : TopologicalSpace X
inst✝² : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
inst✝¹ : MeasurableSpace X
inst✝ : OpensMeasurableSpace X
μ : Measure X
n : ℕ
x : X
⊢ (fun a => indicator F (fun x => 1) a) x ≤ (fun a => ↑((IsClosed.apprSeq hF n) a)) x

Next tactic:
by_cases hxF : x ∈ F
/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ := by
  convert_to ∫⁻ x, (F.indicator (fun _ ↦ (1 : ℝ≥0∞))) x ∂μ ≤ ∫⁻ x, hF.apprSeq n x ∂μ
  · rw [lintegral_indicator _ hF.measurableSet]
    simp only [lintegral_one, MeasurableSet.univ, Measure.restrict_apply, univ_inter]
  · apply lintegral_mono
    intro x
    by_cases hxF : x ∈ F
    · 

Proof state:
case pos
X : Type u_1
inst✝³ : TopologicalSpace X
inst✝² : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
inst✝¹ : MeasurableSpace X
inst✝ : OpensMeasurableSpace X
μ : Measure X
n : ℕ
x : X
hxF : x ∈ F
⊢ (fun a => indicator F (fun x => 1) a) x ≤ (fun a => ↑((IsClosed.apprSeq hF n) a)) x

Next tactic:
simp only [hxF, indicator_of_mem, apprSeq_apply_eq_one hF n hxF, coe_one, le_refl]
/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ := by
  convert_to ∫⁻ x, (F.indicator (fun _ ↦ (1 : ℝ≥0∞))) x ∂μ ≤ ∫⁻ x, hF.apprSeq n x ∂μ
  · rw [lintegral_indicator _ hF.measurableSet]
    simp only [lintegral_one, MeasurableSet.univ, Measure.restrict_apply, univ_inter]
  · apply lintegral_mono
    intro x
    by_cases hxF : x ∈ F
    · simp only [hxF, indicator_of_mem, apprSeq_apply_eq_one hF n hxF, coe_one, le_refl]
    · 

Proof state:
case neg
X : Type u_1
inst✝³ : TopologicalSpace X
inst✝² : HasOuterApproxClosed X
F : Set X
hF : IsClosed F
inst✝¹ : MeasurableSpace X
inst✝ : OpensMeasurableSpace X
μ : Measure X
n : ℕ
x : X
hxF : x ∉ F
⊢ (fun a => indicator F (fun x => 1) a) x ≤ (fun a => ↑((IsClosed.apprSeq hF n) a)) x

Next tactic:
simp only [hxF, not_false_eq_true, indicator_of_not_mem, zero_le]
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
⊢ HasOuterApproxClosed X

Next tactic:
letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
⊢ HasOuterApproxClosed X

Next tactic:
refine ⟨fun F hF ↦ ?_⟩
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · 

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
⊢ ∃ fseq,
    (∀ (n : ℕ) (x : X), (fseq n) x ≤ 1) ∧
      (∀ (n : ℕ), ∀ x ∈ F, 1 ≤ (fseq n) x) ∧ Tendsto (fun n x => (fseq n) x) atTop (𝓝 (indicator F fun x => 1))

Next tactic:
use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
    

Proof state:
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
⊢ (∀ (n : ℕ) (x : X), (thickenedIndicator (_ : 0 < 1 / (↑n + 1)) F) x ≤ 1) ∧
    (∀ (n : ℕ), ∀ x ∈ F, 1 ≤ (thickenedIndicator (_ : 0 < 1 / (↑n + 1)) F) x) ∧
      Tendsto (fun n x => (thickenedIndicator (_ : 0 < 1 / (↑n + 1)) F) x) atTop (𝓝 (indicator F fun x => 1))

Next tactic:
refine ⟨?_, ⟨?_, ?_⟩⟩
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
    refine ⟨?_, ⟨?_, ?_⟩⟩
    · 

Proof state:
case h.refine_1
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
⊢ ∀ (n : ℕ) (x : X), (thickenedIndicator (_ : 0 < 1 / (↑n + 1)) F) x ≤ 1

Next tactic:
exact fun n x ↦ thickenedIndicator_le_one Nat.one_div_pos_of_nat F x
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
    refine ⟨?_, ⟨?_, ?_⟩⟩
    · exact fun n x ↦ thickenedIndicator_le_one Nat.one_div_pos_of_nat F x
    · 

Proof state:
case h.refine_2
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
⊢ ∀ (n : ℕ), ∀ x ∈ F, 1 ≤ (thickenedIndicator (_ : 0 < 1 / (↑n + 1)) F) x

Next tactic:
exact fun n x hxF ↦ one_le_thickenedIndicator_apply X Nat.one_div_pos_of_nat hxF
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
    refine ⟨?_, ⟨?_, ?_⟩⟩
    · exact fun n x ↦ thickenedIndicator_le_one Nat.one_div_pos_of_nat F x
    · exact fun n x hxF ↦ one_le_thickenedIndicator_apply X Nat.one_div_pos_of_nat hxF
    · 

Proof state:
case h.refine_3
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
⊢ Tendsto (fun n x => (thickenedIndicator (_ : 0 < 1 / (↑n + 1)) F) x) atTop (𝓝 (indicator F fun x => 1))

Next tactic:
have key := thickenedIndicator_tendsto_indicator_closure
                (δseq := fun (n : ℕ) ↦ (1 : ℝ) / (n + 1))
                (fun _ ↦ Nat.one_div_pos_of_nat) tendsto_one_div_add_atTop_nhds_0_nat F
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
    refine ⟨?_, ⟨?_, ?_⟩⟩
    · exact fun n x ↦ thickenedIndicator_le_one Nat.one_div_pos_of_nat F x
    · exact fun n x hxF ↦ one_le_thickenedIndicator_apply X Nat.one_div_pos_of_nat hxF
    · have key := thickenedIndicator_tendsto_indicator_closure
                (δseq := fun (n : ℕ) ↦ (1 : ℝ) / (n + 1))
                (fun _ ↦ Nat.one_div_pos_of_nat) tendsto_one_div_add_atTop_nhds_0_nat F
      

Proof state:
case h.refine_3
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
key : Tendsto (fun n => ⇑(thickenedIndicator (_ : 0 < 1 / (↑n + 1)) F)) atTop (𝓝 (indicator (closure F) fun x => 1))
⊢ Tendsto (fun n x => (thickenedIndicator (_ : 0 < 1 / (↑n + 1)) F) x) atTop (𝓝 (indicator F fun x => 1))

Next tactic:
rw [tendsto_pi_nhds] at *
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
    refine ⟨?_, ⟨?_, ?_⟩⟩
    · exact fun n x ↦ thickenedIndicator_le_one Nat.one_div_pos_of_nat F x
    · exact fun n x hxF ↦ one_le_thickenedIndicator_apply X Nat.one_div_pos_of_nat hxF
    · have key := thickenedIndicator_tendsto_indicator_closure
                (δseq := fun (n : ℕ) ↦ (1 : ℝ) / (n + 1))
                (fun _ ↦ Nat.one_div_pos_of_nat) tendsto_one_div_add_atTop_nhds_0_nat F
      rw [tendsto_pi_nhds] at *
      

Proof state:
case h.refine_3
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
key :
  ∀ (x : X),
    Tendsto (fun i => (thickenedIndicator (_ : 0 < 1 / (↑i + 1)) F) x) atTop (𝓝 (indicator (closure F) (fun x => 1) x))
⊢ ∀ (x : X), Tendsto (fun i => (thickenedIndicator (_ : 0 < 1 / (↑i + 1)) F) x) atTop (𝓝 (indicator F (fun x => 1) x))

Next tactic:
intro x
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
    refine ⟨?_, ⟨?_, ?_⟩⟩
    · exact fun n x ↦ thickenedIndicator_le_one Nat.one_div_pos_of_nat F x
    · exact fun n x hxF ↦ one_le_thickenedIndicator_apply X Nat.one_div_pos_of_nat hxF
    · have key := thickenedIndicator_tendsto_indicator_closure
                (δseq := fun (n : ℕ) ↦ (1 : ℝ) / (n + 1))
                (fun _ ↦ Nat.one_div_pos_of_nat) tendsto_one_div_add_atTop_nhds_0_nat F
      rw [tendsto_pi_nhds] at *
      intro x
      

Proof state:
case h.refine_3
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
key :
  ∀ (x : X),
    Tendsto (fun i => (thickenedIndicator (_ : 0 < 1 / (↑i + 1)) F) x) atTop (𝓝 (indicator (closure F) (fun x => 1) x))
x : X
⊢ Tendsto (fun i => (thickenedIndicator (_ : 0 < 1 / (↑i + 1)) F) x) atTop (𝓝 (indicator F (fun x => 1) x))

Next tactic:
nth_rw 2 [← IsClosed.closure_eq hF]
noncomputable instance (X : Type*) [TopologicalSpace X]
    [TopologicalSpace.PseudoMetrizableSpace X] : HasOuterApproxClosed X := by
  letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
  refine ⟨fun F hF ↦ ?_⟩
  · use fun n ↦ thickenedIndicator (δ := (1 : ℝ) / (n + 1)) Nat.one_div_pos_of_nat F
    refine ⟨?_, ⟨?_, ?_⟩⟩
    · exact fun n x ↦ thickenedIndicator_le_one Nat.one_div_pos_of_nat F x
    · exact fun n x hxF ↦ one_le_thickenedIndicator_apply X Nat.one_div_pos_of_nat hxF
    · have key := thickenedIndicator_tendsto_indicator_closure
                (δseq := fun (n : ℕ) ↦ (1 : ℝ) / (n + 1))
                (fun _ ↦ Nat.one_div_pos_of_nat) tendsto_one_div_add_atTop_nhds_0_nat F
      rw [tendsto_pi_nhds] at *
      intro x
      nth_rw 2 [← IsClosed.closure_eq hF]
      

Proof state:
case h.refine_3
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace.PseudoMetrizableSpace X
this : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X
F : Set X
hF : IsClosed F
key :
  ∀ (x : X),
    Tendsto (fun i => (thickenedIndicator (_ : 0 < 1 / (↑i + 1)) F) x) atTop (𝓝 (indicator (closure F) (fun x => 1) x))
x : X
⊢ Tendsto (fun i => (thickenedIndicator (_ : 0 < 1 / (↑i + 1)) F) x) atTop (𝓝 (indicator (closure F) (fun x => 1) x))

Next tactic:
exact key x
/-- Two finite measures give equal values to all closed sets if the integrals of all bounded
continuous functions with respect to the two measures agree. -/
theorem measure_isClosed_eq_of_forall_lintegral_eq_of_isFiniteMeasure {Ω : Type*}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [HasOuterApproxClosed Ω]
    [OpensMeasurableSpace Ω] {μ ν : Measure Ω} [IsFiniteMeasure μ]
    (h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ x, f x ∂μ = ∫⁻ x, f x ∂ν) {F : Set Ω} (F_closed : IsClosed F) :
    μ F = ν F := by
  

Proof state:
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
inst✝³ : TopologicalSpace Ω
inst✝² : HasOuterApproxClosed Ω
inst✝¹ : OpensMeasurableSpace Ω
μ ν : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ (x : Ω), ↑(f x) ∂μ = ∫⁻ (x : Ω), ↑(f x) ∂ν
F : Set Ω
F_closed : IsClosed F
⊢ ↑↑μ F = ↑↑ν F

Next tactic:
have ν_finite : IsFiniteMeasure ν := by
    constructor
    have whole := h 1
    simp only [BoundedContinuousFunction.coe_one, Pi.one_apply, coe_one, lintegral_const, one_mul]
      at whole
    simpa [← whole] using IsFiniteMeasure.measure_univ_lt_top
/-- Two finite measures give equal values to all closed sets if the integrals of all bounded
continuous functions with respect to the two measures agree. -/
theorem measure_isClosed_eq_of_forall_lintegral_eq_of_isFiniteMeasure {Ω : Type*}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [HasOuterApproxClosed Ω]
    [OpensMeasurableSpace Ω] {μ ν : Measure Ω} [IsFiniteMeasure μ]
    (h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ x, f x ∂μ = ∫⁻ x, f x ∂ν) {F : Set Ω} (F_closed : IsClosed F) :
    μ F = ν F := by
  have ν_finite : IsFiniteMeasure ν := by
    

Proof state:
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
inst✝³ : TopologicalSpace Ω
inst✝² : HasOuterApproxClosed Ω
inst✝¹ : OpensMeasurableSpace Ω
μ ν : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ (x : Ω), ↑(f x) ∂μ = ∫⁻ (x : Ω), ↑(f x) ∂ν
F : Set Ω
F_closed : IsClosed F
⊢ IsFiniteMeasure ν

Next tactic:
constructor
/-- Two finite measures give equal values to all closed sets if the integrals of all bounded
continuous functions with respect to the two measures agree. -/
theorem measure_isClosed_eq_of_forall_lintegral_eq_of_isFiniteMeasure {Ω : Type*}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [HasOuterApproxClosed Ω]
    [OpensMeasurableSpace Ω] {μ ν : Measure Ω} [IsFiniteMeasure μ]
    (h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ x, f x ∂μ = ∫⁻ x, f x ∂ν) {F : Set Ω} (F_closed : IsClosed F) :
    μ F = ν F := by
  have ν_finite : IsFiniteMeasure ν := by
    constructor
    

Proof state:
case measure_univ_lt_top
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
inst✝³ : TopologicalSpace Ω
inst✝² : HasOuterApproxClosed Ω
inst✝¹ : OpensMeasurableSpace Ω
μ ν : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ (x : Ω), ↑(f x) ∂μ = ∫⁻ (x : Ω), ↑(f x) ∂ν
F : Set Ω
F_closed : IsClosed F
⊢ ↑↑ν univ < ⊤

Next tactic:
have whole := h 1
/-- Two finite measures give equal values to all closed sets if the integrals of all bounded
continuous functions with respect to the two measures agree. -/
theorem measure_isClosed_eq_of_forall_lintegral_eq_of_isFiniteMeasure {Ω : Type*}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [HasOuterApproxClosed Ω]
    [OpensMeasurableSpace Ω] {μ ν : Measure Ω} [IsFiniteMeasure μ]
    (h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ x, f x ∂μ = ∫⁻ x, f x ∂ν) {F : Set Ω} (F_closed : IsClosed F) :
    μ F = ν F := by
  have ν_finite : IsFiniteMeasure ν := by
    constructor
    have whole := h 1
    

Proof state:
case measure_univ_lt_top
Ω : Type u_1
inst✝⁴ : MeasurableSpace Ω
inst✝³ : TopologicalSpace Ω
inst✝² : HasOuterApproxClosed Ω
inst✝¹ : OpensMeasurableSpace Ω
μ ν : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ (x : Ω), ↑(f x) ∂μ = ∫⁻ (x : Ω), ↑(f x) ∂ν
F : Set Ω
F_closed : IsClosed F
whole : ∫⁻ (x : Ω), ↑(1 x) ∂μ = ∫⁻ (x : Ω), ↑(1 x) ∂ν
⊢ ↑↑ν univ < ⊤

Next tactic:
simp only [BoundedContinuousFunction.coe_one, Pi.one_apply, coe_one, lintegral_const, one_mul]
      at whole