awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf :
  @Integrable _ _ _ _ mX f
    (Measure.map (α := { x : X // x ∈ s }) (Subtype.val (p := fun (x : X) ↦ x ∈ s))
      (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ))
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
⊢ AEStronglyMeasurable (m₀ := mX) f
    (Measure.map (α := { x : X // x ∈ s }) (Subtype.val (p := fun (x : X) ↦ x ∈ s))
      (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ))

Tactic:
exact Integrable.aestronglyMeasurable hf

Premises used: MeasureTheory.Integrable.aestronglyMeasurable
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf :
  @Integrable _ _ _ _ mX f
    (Measure.map (α := { x : X // x ∈ s }) (Subtype.val (p := fun (x : X) ↦ x ∈ s))
      (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ))
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
⊢ AEMeasurable (α := { x : X // x ∈ s }) (_m := Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
    (Subtype.val (p := fun (x : X) ↦ x ∈ s)) (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ)

Tactic:
Measurable.aemeasurable measurable_subtype_coe

Premises used: measurable_subtype_coe, Measurable.aemeasurable
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf :
  @Integrable _ _ _ _ mX f
    (Measure.map (α := { x : X // x ∈ s }) (Subtype.val (p := fun (x : X) ↦ x ∈ s))
      (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ))
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
⊢ AEMeasurable (α := { x : X // x ∈ s }) (_m := Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
    (Subtype.val (p := fun (x : X) ↦ x ∈ s)) (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ)

Tactic:
exact Measurable.aemeasurable measurable_subtype_coe

Premises used: measurable_subtype_coe, Measurable.aemeasurable
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf : Integrable f (μ.restrict s)
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
⊢ MeasurableSet s

Tactic:
Countable.measurableSet hs

Premises used: Set.Countable.measurableSet
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf : Integrable f (μ.restrict s)
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
⊢ MeasurableSet s

Tactic:
exact Countable.measurableSet hs

Premises used: Set.Countable.measurableSet
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf : IntegrableOn f s μ
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
⊢ @Integrable.{u_3, u_2} E _ _ _ (Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
    (fun (x : (↑s : Type u_2)) ↦ f (↑x : X)) (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ)

Tactic:
have hf' : Integrable (fun (x : s) ↦ f x) (Measure.comap Subtype.val μ) := by
    rw [IntegrableOn, ← map_comap_subtype_coe, integrable_map_measure] at hf
    · apply hf
    · exact Integrable.aestronglyMeasurable hf
    · exact Measurable.aemeasurable measurable_subtype_coe
    · exact Countable.measurableSet hs
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf : IntegrableOn f s μ
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
hf' :
  @Integrable.{u_3, u_2} E _ _ _ (Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
    (fun (x : (↑s : Type u_2)) ↦ f (↑x : X)) (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ)
rw :
  Eq.{u_3 + 1} (α := E)
    (∑' (x : (↑s : Type u_2)),
      Measure.real (α := (↑s : Type u_2)) (m := Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
          (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ) {x} •
        f (↑x : X))
    (∑' (x : (↑s : Type u_2)), μ.real {(↑x : X)} • f (↑x : X))
⊢ Eq.{u_3 + 1} (α := E) (∫ (x : X) in s, f x ∂μ) (∑' (x : (↑s : Type u_2)), μ.real {(↑x : X)} • f (↑x : X))

Tactic:
rw [← integral_subtype_comap hs.measurableSet, integral_countable hf']

Premises used: Set.Countable.measurableSet, MeasureTheory.integral_subtype_comap, MeasureTheory.integral_countable
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf : IntegrableOn f s μ
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
hf' :
  @Integrable.{u_3, u_2} E _ _ _ (Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
    (fun (x : (↑s : Type u_2)) ↦ f (↑x : X)) (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ)
e_f :
  ∀ (a : (↑s : Type u_2)),
    Measure.real (α := (↑s : Type u_2)) (m := Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
          (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ) {a} •
        f (↑a : X) =
      μ.real {(↑a : X)} • f (↑a : X)
⊢ Eq.{u_3 + 1} (α := E)
    (∑' (x : (↑s : Type u_2)),
      Measure.real (α := (↑s : Type u_2)) (m := Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
          (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ) {x} •
        f (↑x : X))
    (∑' (x : (↑s : Type u_2)), μ.real {(↑x : X)} • f (↑x : X))

Tactic:
congr 1 with a : 1
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf : IntegrableOn f s μ
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
hf' :
  @Integrable.{u_3, u_2} E _ _ _ (Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
    (fun (x : (↑s : Type u_2)) ↦ f (↑x : X)) (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ)
a : (↑s : Type u_2)
e_f :
  ENNReal.toReal
        ((μ : (a : Set X) → ℝ≥0∞) (image (α := { x : X // x ∈ s }) (Subtype.val (p := fun (x : X) ↦ x ∈ s)) {a})) •
      f (↑a : X) =
    μ.real {(↑a : X)} • f (↑a : X)
⊢ Measure.real (α := (↑s : Type u_2)) (m := Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
        (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ) {a} •
      f (↑a : X) =
    μ.real {(↑a : X)} • f (↑a : X)

Tactic:
rw [measureReal_def, Measure.comap_apply Subtype.val Subtype.coe_injective
    (fun s' hs' ↦ MeasurableSet.subtype_image (Countable.measurableSet hs) hs') _
    (MeasurableSet.singleton a)]

Premises used: MeasurableSet.singleton, Set.Countable.measurableSet, MeasureTheory.Measure.comap_apply, Subtype.coe_injective, MeasurableSet.subtype_image, MeasureTheory.measureReal_def, Subtype.val
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
f : X → E
s : Set X
hs : s.Countable
hf : IntegrableOn f s μ
hi : Countable.{max 1 (u_2 + 1)} { x : X // x ∈ s }
hf' :
  @Integrable.{u_3, u_2} E _ _ _ (Subtype.instMeasurableSpace (p := fun (x : X) ↦ x ∈ s))
    (fun (x : (↑s : Type u_2)) ↦ f (↑x : X)) (Measure.comap (Subtype.val (p := fun (x : X) ↦ x ∈ s)) μ)
a : (↑s : Type u_2)
⊢ ENNReal.toReal
        ((μ : (a : Set X) → ℝ≥0∞) (image (α := { x : X // x ∈ s }) (Subtype.val (p := fun (x : X) ↦ x ∈ s)) {a})) •
      f (↑a : X) =
    μ.real {(↑a : X)} • f (↑a : X)

Tactic:
simp [measureReal_def]

Premises used: MeasureTheory.measureReal_def
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
f : X → E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
s : Finset X
hf : IntegrableOn f (↑s : Set X) μ
rw :
  Eq.{u_3 + 1} (α := E) (∑' (x : (↑(↑s : Set X) : Type u_2)), μ.real {(↑x : X)} • f (↑x : X))
    (∑ x ∈ s, μ.real {x} • f x)
rw₁ rw₂ :
  Eq.{u_3 + 1} (α := E) (∑' (x : (↑(↑s : Set X) : Type u_2)), μ.real {(↑x : X)} • f (↑x : X))
    (∑' (x : (↑(↑s : Set X) : Type u_2)), μ.real {(↑x : X)} • f (↑x : X))
⊢ Eq.{u_3 + 1} (α := E) (∫ (x : X) in (↑s : Set X), f x ∂μ) (∑ x ∈ s, μ.real {x} • f x)

Tactic:
rw [setIntegral_countable _ s.countable_toSet hf, ← Finset.tsum_subtype']

Premises used: MeasureTheory.setIntegral_countable, Finset.countable_toSet, Finset.tsum_subtype'
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
f : X → E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
inst_4 : Fintype X
hf : Integrable f μ
rw : IntegrableOn f (↑Finset.univ : Set X) μ
⊢ Eq.{u_3 + 1} (α := E) (∫ (x : X), f x ∂μ) (∑ x : X, μ.real {x} • f x)

Tactic:
rw [← setIntegral_finset .univ, Finset.coe_univ, Measure.restrict_univ]

Premises used: Finset.univ, Finset.coe_univ, MeasureTheory.setIntegral_finset, MeasureTheory.Measure.restrict_univ
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
f : X → E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
μ : Measure X
inst_4 : Fintype X
hf : Integrable f μ
⊢ IntegrableOn f (↑Finset.univ : Set X) μ

Tactic:
simp [Finset.coe_univ, hf]

Premises used: Finset.coe_univ
-- Module: Mathlib.MeasureTheory.Integral.Bochner.SumMeasure
Goal:
X : Type u_2
E : Type u_3
mX : MeasurableSpace X
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : CompleteSpace E
inst_3 : MeasurableSingletonClass X
inst_4 : Fintype X
f : X → E
⊢ Eq.{u_3 + 1} (α := E) (@integral _ _ _ _ mX Measure.count fun (x : X) ↦ f x) (∑ a : X, f a)

Tactic:
simp [integral_fintype]

Premises used: MeasureTheory.integral_fintype
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
pos :
  ∀ (h : ∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞),
    ∃ (g : α → ℝ≥0),
      (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
        LowerSemicontinuous g ∧
          ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
            ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε
neg :
  ∀ (h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞),
    ∃ (g : α → ℝ≥0),
      (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
        LowerSemicontinuous g ∧
          ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
            ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε
⊢ ∃ (g : α → ℝ≥0),
    (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
      LowerSemicontinuous g ∧
        ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
          ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε

Tactic:
by_cases h : ∫⁻ x, f x ∂μ = ⊤
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
⊢ ∫⁻ (x : α), (↑((fun (x : α) ↦ c) x) : ℝ≥0∞) ∂μ ≤
    ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε

Tactic:
simp only [f, _root_.top_add, le_top, h]

Premises used: le_top, top_add
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
pos :
  ∀ (x : α),
    LE.le (α := ℝ≥0) ((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x : ℝ≥0) ((fun (x : α) ↦ c) x : ℝ≥0)
⊢ ∃ (g : α → ℝ≥0),
    (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
      LowerSemicontinuous g ∧
        ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
          ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε

Tactic:
refine
        ⟨fun _ => c, fun x => ?_, lowerSemicontinuous_const, by
          simp only [f, _root_.top_add, le_top, h]⟩
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
x : α
pos : s.indicator (Function.const α c) x ≤ c
⊢ LE.le (α := ℝ≥0) ((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x : ℝ≥0) ((fun (x : α) ↦ c) x : ℝ≥0)

Tactic:
simp only [SimpleFunc.coe_const, SimpleFunc.const_zero, SimpleFunc.coe_zero,
        Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise]

Premises used: MeasureTheory.SimpleFunc.coe_piecewise, MeasureTheory.SimpleFunc.coe_zero, MeasureTheory.SimpleFunc.const_zero, Set.piecewise_eq_indicator, MeasureTheory.SimpleFunc.coe_const
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
x : α
⊢ s.indicator (Function.const α c) x ≤ c

Tactic:
Set.indicator_le_self _ _ _

Premises used: Set.indicator_le_self
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
x : α
⊢ s.indicator (Function.const α c) x ≤ c

Tactic:
exact Set.indicator_le_self _ _ _

Premises used: Set.indicator_le_self
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
pos :
  ∀ (hc : c = 0),
    ∃ (g : α → ℝ≥0),
      (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
        LowerSemicontinuous g ∧
          ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
            ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε
neg :
  ∀ (hc : ¬c = 0),
    ∃ (g : α → ℝ≥0),
      (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
        LowerSemicontinuous g ∧
          ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
            ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε
⊢ ∃ (g : α → ℝ≥0),
    (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
      LowerSemicontinuous g ∧
        ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
          ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε

Tactic:
by_cases hc : c = 0
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
hc : c = 0
⊢ ∃ (g : α → ℝ≥0),
    (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
      LowerSemicontinuous g ∧
        ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
          ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε

Tactic:
⟨fun _ => 0, ?_, lowerSemicontinuous_const, ?_⟩

Premises used: And.intro, lowerSemicontinuous_const, Exists.intro, OfNat.ofNat
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
hc : c = 0
pos :
  ∀ (x : α),
    LE.le (α := ℝ≥0) ((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x : ℝ≥0)
      ((fun (x : α) ↦ (0 : ℝ≥0)) x : ℝ≥0)
pos₁ :
  ∫⁻ (x : α), (↑((fun (x : α) ↦ (0 : ℝ≥0)) x) : ℝ≥0∞) ∂μ ≤
    ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε
⊢ ∃ (g : α → ℝ≥0),
    (∀ (x : α), (piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x ≤ g x) ∧
      LowerSemicontinuous g ∧
        ∫⁻ (x : α), (↑(g x) : ℝ≥0∞) ∂μ ≤
          ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε

Tactic:
refine ⟨fun _ => 0, ?_, lowerSemicontinuous_const, ?_⟩
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
hc : c = 0
⊢ ∀ (x : α),
    LE.le (α := ℝ≥0) ((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x : ℝ≥0)
      ((fun (x : α) ↦ (0 : ℝ≥0)) x : ℝ≥0)

Tactic:
simp only [hc, Set.indicator_zero', Pi.zero_apply, SimpleFunc.const_zero, imp_true_iff,
          SimpleFunc.coe_zero, Set.piecewise_eq_indicator,
          SimpleFunc.coe_piecewise, le_zero_iff]

Premises used: le_zero_iff, MeasureTheory.SimpleFunc.coe_piecewise, MeasureTheory.SimpleFunc.coe_zero, Pi.zero_apply, Set.indicator_zero', imp_true_iff, MeasureTheory.SimpleFunc.const_zero, Set.piecewise_eq_indicator
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
hc : c = 0
⊢ ∀ (x : α),
    LE.le (α := ℝ≥0) ((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x : ℝ≥0)
      ((fun (x : α) ↦ (0 : ℝ≥0)) x : ℝ≥0)

Tactic:
classical
        simp only [hc, Set.indicator_zero', Pi.zero_apply, SimpleFunc.const_zero, imp_true_iff,
          SimpleFunc.coe_zero, Set.piecewise_eq_indicator,
          SimpleFunc.coe_piecewise, le_zero_iff]

Premises used: le_zero_iff, MeasureTheory.SimpleFunc.coe_piecewise, MeasureTheory.SimpleFunc.coe_zero, Pi.zero_apply, Set.indicator_zero', imp_true_iff, MeasureTheory.SimpleFunc.const_zero, Set.piecewise_eq_indicator
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
hc : c = 0
⊢ ∫⁻ (x : α), (↑((fun (x : α) ↦ (0 : ℝ≥0)) x) : ℝ≥0∞) ∂μ ≤
    ∫⁻ (x : α), (↑((piecewise s hs (const α c) (const α 0) : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ + ε

Tactic:
simp only [lintegral_const, zero_mul, zero_le, ENNReal.coe_zero]

Premises used: zero_le, MeasureTheory.lintegral_const, MulZeroClass.zero_mul, ENNReal.coe_zero
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
hc : ¬c = 0
⊢ Ne (α := ℝ≥0∞) ((μ : (a : Set α) → ℝ≥0∞) s : ℝ≥0∞) (∞ : ℝ≥0∞)

Tactic:
simpa [f, hs, hc, lt_top_iff_ne_top, SimpleFunc.coe_const,
        Function.const_apply, lintegral_const, ENNReal.coe_indicator, Set.univ_inter,
        ENNReal.coe_ne_top, MeasurableSet.univ, ENNReal.mul_eq_top, SimpleFunc.const_zero,
        lintegral_indicator, ENNReal.coe_eq_zero, Ne, not_false_iff,
        SimpleFunc.coe_zero, Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise,
        restrict_apply] using h

Premises used: Function.const_apply, MeasureTheory.lintegral_const, MeasureTheory.SimpleFunc.coe_piecewise, MeasureTheory.SimpleFunc.coe_zero, Ne, ENNReal.coe_eq_zero, lt_top_iff_ne_top, Set.univ_inter, ENNReal.mul_eq_top, MeasureTheory.lintegral_indicator, MeasureTheory.SimpleFunc.restrict_apply, MeasureTheory.SimpleFunc.const_zero, Set.piecewise_eq_indicator, not_false_iff, MeasureTheory.SimpleFunc.coe_const, MeasurableSet.univ, ENNReal.coe_indicator, ENNReal.coe_ne_top
-- Module: Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory
Goal:
α : Type u_1
inst : TopologicalSpace α
inst_1 : MeasurableSpace α
inst_2 : BorelSpace α
μ : Measure α
inst_3 : μ.WeaklyRegular
c : ℝ≥0
s : Set α
hs : MeasurableSet s
ε : ℝ≥0∞
ε0 : ε ≠ 0
f : α →ₛ ℝ≥0 := piecewise s hs (const α c) (const α 0)
h : ¬∫⁻ (x : α), (↑((f : (a : α) → ℝ≥0) x) : ℝ≥0∞) ∂μ = ∞
hc : ¬c = 0
⊢ Ne (α := ℝ≥0∞) ((μ : (a : Set α) → ℝ≥0∞) s : ℝ≥0∞) (∞ : ℝ≥0∞)

Tactic:
classical
      simpa [f, hs, hc, lt_top_iff_ne_top, SimpleFunc.coe_const,
        Function.const_apply, lintegral_const, ENNReal.coe_indicator, Set.univ_inter,
        ENNReal.coe_ne_top, MeasurableSet.univ, ENNReal.mul_eq_top, SimpleFunc.const_zero,
        lintegral_indicator, ENNReal.coe_eq_zero, Ne, not_false_iff,
        SimpleFunc.coe_zero, Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise,
        restrict_apply] using h

Premises used: Function.const_apply, MeasureTheory.lintegral_const, MeasureTheory.SimpleFunc.coe_piecewise, MeasureTheory.SimpleFunc.coe_zero, Ne, ENNReal.coe_eq_zero, lt_top_iff_ne_top, Set.univ_inter, ENNReal.mul_eq_top, MeasureTheory.lintegral_indicator, MeasureTheory.SimpleFunc.restrict_apply, MeasureTheory.SimpleFunc.const_zero, Set.piecewise_eq_indicator, not_false_iff, MeasureTheory.SimpleFunc.coe_const, MeasurableSet.univ, ENNReal.coe_indicator, ENNReal.coe_ne_top