l3lab/ntp-mathlib huggingface dataset:
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    

Proof state:
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : ¬IsFiniteMeasure μ
h : ¬SigmaFinite (Measure.trim μ (_ : ⊥ ≤ m0))
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
rw [not_isFiniteMeasure_iff] at hμ_finite
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    

Proof state:
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : ↑↑μ Set.univ = ⊤
h : ¬SigmaFinite (Measure.trim μ (_ : ⊥ ≤ m0))
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
rw [condexp_of_not_sigmaFinite bot_le h]
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    

Proof state:
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : ↑↑μ Set.univ = ⊤
h : ¬SigmaFinite (Measure.trim μ (_ : ⊥ ≤ m0))
⊢ 0 = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    

Proof state:
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : ↑↑μ Set.univ = ⊤
h : ¬SigmaFinite (Measure.trim μ (_ : ⊥ ≤ m0))
⊢ 0 = fun x => 0

Next tactic:
rfl
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  

Proof state:
case pos
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
by_cases hf : Integrable f μ
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  

Proof state:
case pos
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : ¬Integrable f
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
swap
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · 

Proof state:
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : ¬Integrable f
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
rw [integral_undef hf, smul_zero, condexp_undef hf]
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; 

Proof state:
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : ¬Integrable f
⊢ 0 = fun x => 0

Next tactic:
rfl
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; rfl
  

Proof state:
case pos
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
have h_meas : StronglyMeasurable[⊥] (μ[f|⊥]) := stronglyMeasurable_condexp
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; rfl
  have h_meas : StronglyMeasurable[⊥] (μ[f|⊥]) := stronglyMeasurable_condexp
  

Proof state:
case pos
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
h_meas : StronglyMeasurable (μ[f|⊥])
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
obtain ⟨c, h_eq⟩ := stronglyMeasurable_bot_iff.mp h_meas
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; rfl
  have h_meas : StronglyMeasurable[⊥] (μ[f|⊥]) := stronglyMeasurable_condexp
  obtain ⟨c, h_eq⟩ := stronglyMeasurable_bot_iff.mp h_meas
  

Proof state:
case pos.intro
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
h_meas : StronglyMeasurable (μ[f|⊥])
c : F'
h_eq : μ[f|⊥] = fun x => c
⊢ μ[f|⊥] = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
rw [h_eq]
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; rfl
  have h_meas : StronglyMeasurable[⊥] (μ[f|⊥]) := stronglyMeasurable_condexp
  obtain ⟨c, h_eq⟩ := stronglyMeasurable_bot_iff.mp h_meas
  rw [h_eq]
  

Proof state:
case pos.intro
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
h_meas : StronglyMeasurable (μ[f|⊥])
c : F'
h_eq : μ[f|⊥] = fun x => c
⊢ (fun x => c) = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
have h_integral : ∫ x, (μ[f|⊥]) x ∂μ = ∫ x, f x ∂μ := integral_condexp bot_le hf
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; rfl
  have h_meas : StronglyMeasurable[⊥] (μ[f|⊥]) := stronglyMeasurable_condexp
  obtain ⟨c, h_eq⟩ := stronglyMeasurable_bot_iff.mp h_meas
  rw [h_eq]
  have h_integral : ∫ x, (μ[f|⊥]) x ∂μ = ∫ x, f x ∂μ := integral_condexp bot_le hf
  

Proof state:
case pos.intro
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
h_meas : StronglyMeasurable (μ[f|⊥])
c : F'
h_eq : μ[f|⊥] = fun x => c
h_integral : ∫ (x : α), (μ[f|⊥]) x ∂μ = ∫ (x : α), f x ∂μ
⊢ (fun x => c) = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
simp_rw [h_eq, integral_const] at h_integral
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; rfl
  have h_meas : StronglyMeasurable[⊥] (μ[f|⊥]) := stronglyMeasurable_condexp
  obtain ⟨c, h_eq⟩ := stronglyMeasurable_bot_iff.mp h_meas
  rw [h_eq]
  have h_integral : ∫ x, (μ[f|⊥]) x ∂μ = ∫ x, f x ∂μ := integral_condexp bot_le hf
  simp_rw [h_eq, integral_const] at h_integral
  

Proof state:
case pos.intro
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
h_meas : StronglyMeasurable (μ[f|⊥])
c : F'
h_eq : μ[f|⊥] = fun x => c
h_integral : ENNReal.toReal (↑↑μ Set.univ) • c = ∫ (x : α), f x ∂μ
⊢ (fun x => c) = fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
rw [← h_integral, ← smul_assoc, smul_eq_mul, inv_mul_cancel, one_smul]
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; rfl
  have h_meas : StronglyMeasurable[⊥] (μ[f|⊥]) := stronglyMeasurable_condexp
  obtain ⟨c, h_eq⟩ := stronglyMeasurable_bot_iff.mp h_meas
  rw [h_eq]
  have h_integral : ∫ x, (μ[f|⊥]) x ∂μ = ∫ x, f x ∂μ := integral_condexp bot_le hf
  simp_rw [h_eq, integral_const] at h_integral
  rw [← h_integral, ← smul_assoc, smul_eq_mul, inv_mul_cancel, one_smul]
  

Proof state:
case pos.intro
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
h_meas : StronglyMeasurable (μ[f|⊥])
c : F'
h_eq : μ[f|⊥] = fun x => c
h_integral : ENNReal.toReal (↑↑μ Set.univ) • c = ∫ (x : α), f x ∂μ
⊢ ENNReal.toReal (↑↑μ Set.univ) ≠ 0

Next tactic:
rw [Ne.def, ENNReal.toReal_eq_zero_iff, not_or]
theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  by_cases hμ_finite : IsFiniteMeasure μ
  swap
  · have h : ¬SigmaFinite (μ.trim bot_le) := by rwa [sigmaFinite_trim_bot_iff]
    rw [not_isFiniteMeasure_iff] at hμ_finite
    rw [condexp_of_not_sigmaFinite bot_le h]
    simp only [hμ_finite, ENNReal.top_toReal, inv_zero, zero_smul]
    rfl
  by_cases hf : Integrable f μ
  swap; · rw [integral_undef hf, smul_zero, condexp_undef hf]; rfl
  have h_meas : StronglyMeasurable[⊥] (μ[f|⊥]) := stronglyMeasurable_condexp
  obtain ⟨c, h_eq⟩ := stronglyMeasurable_bot_iff.mp h_meas
  rw [h_eq]
  have h_integral : ∫ x, (μ[f|⊥]) x ∂μ = ∫ x, f x ∂μ := integral_condexp bot_le hf
  simp_rw [h_eq, integral_const] at h_integral
  rw [← h_integral, ← smul_assoc, smul_eq_mul, inv_mul_cancel, one_smul]
  rw [Ne.def, ENNReal.toReal_eq_zero_iff, not_or]
  

Proof state:
case pos.intro
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
hμ : NeZero μ
f : α → F'
hμ_finite : IsFiniteMeasure μ
hf : Integrable f
h_meas : StronglyMeasurable (μ[f|⊥])
c : F'
h_eq : μ[f|⊥] = fun x => c
h_integral : ENNReal.toReal (↑↑μ Set.univ) • c = ∫ (x : α), f x ∂μ
⊢ ¬↑↑μ Set.univ = 0 ∧ ¬↑↑μ Set.univ = ⊤

Next tactic:
exact ⟨NeZero.ne _, measure_ne_top μ Set.univ⟩
theorem condexp_bot_ae_eq (f : α → F') :
    μ[f|⊥] =ᵐ[μ] fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  

Proof state:
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
f : α → F'
⊢ μ[f|⊥] =ᵐ[μ] fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
rcases eq_zero_or_neZero μ with rfl | hμ
theorem condexp_bot_ae_eq (f : α → F') :
    μ[f|⊥] =ᵐ[μ] fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  rcases eq_zero_or_neZero μ with rfl | hμ
  · 

Proof state:
case inl
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
f✝ g : α → F'
s : Set α
f : α → F'
⊢ 0[f|⊥] =ᵐ[0] fun x => (ENNReal.toReal (↑↑0 Set.univ))⁻¹ • ∫ (x : α), f x ∂0

Next tactic:
rw [ae_zero]
theorem condexp_bot_ae_eq (f : α → F') :
    μ[f|⊥] =ᵐ[μ] fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  rcases eq_zero_or_neZero μ with rfl | hμ
  · rw [ae_zero]; 

Proof state:
case inl
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
f✝ g : α → F'
s : Set α
f : α → F'
⊢ 0[f|⊥] =ᶠ[⊥] fun x => (ENNReal.toReal (↑↑0 Set.univ))⁻¹ • ∫ (x : α), f x ∂0

Next tactic:
exact eventually_bot
theorem condexp_bot_ae_eq (f : α → F') :
    μ[f|⊥] =ᵐ[μ] fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ := by
  rcases eq_zero_or_neZero μ with rfl | hμ
  · rw [ae_zero]; exact eventually_bot
  · 

Proof state:
case inr
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
f : α → F'
hμ : NeZero μ
⊢ μ[f|⊥] =ᵐ[μ] fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ

Next tactic:
exact eventually_of_forall <| congr_fun (condexp_bot' f)
theorem condexp_bot [IsProbabilityMeasure μ] (f : α → F') : μ[f|⊥] = fun _ => ∫ x, f x ∂μ := by
  

Proof state:
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace 𝕜 F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
inst✝ : IsProbabilityMeasure μ
f : α → F'
⊢ μ[f|⊥] = fun x => ∫ (x : α), f x ∂μ

Next tactic:
refine' (condexp_bot' f).trans _
theorem condexp_bot [IsProbabilityMeasure μ] (f : α → F') : μ[f|⊥] = fun _ => ∫ x, f x ∂μ := by
  refine' (condexp_bot' f).trans _; 

Proof state:
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup F'
inst✝³ : NormedSpace 𝕜 F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f✝ g : α → F'
s : Set α
inst✝ : IsProbabilityMeasure μ
f : α → F'
⊢ (fun x => (ENNReal.toReal (↑↑μ Set.univ))⁻¹ • ∫ (x : α), f x ∂μ) = fun x => ∫ (x : α), f x ∂μ

Next tactic:
rw [measure_univ, ENNReal.one_toReal, inv_one, one_smul]
theorem condexp_add (hf : Integrable f μ) (hg : Integrable g μ) :
    μ[f + g|m] =ᵐ[μ] μ[f|m] + μ[g|m] := by
  

Proof state:
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f g : α → F'
s : Set α
hf : Integrable f
hg : Integrable g
⊢ μ[f + g|m] =ᵐ[μ] μ[f|m] + μ[g|m]

Next tactic:
by_cases hm : m ≤ m0
theorem condexp_add (hf : Integrable f μ) (hg : Integrable g μ) :
    μ[f + g|m] =ᵐ[μ] μ[f|m] + μ[g|m] := by
  by_cases hm : m ≤ m0
  

Proof state:
case pos
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f g : α → F'
s : Set α
hf : Integrable f
hg : Integrable g
hm : m ≤ m0
⊢ μ[f + g|m] =ᵐ[μ] μ[f|m] + μ[g|m]
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f g : α → F'
s : Set α
hf : Integrable f
hg : Integrable g
hm : ¬m ≤ m0
⊢ μ[f + g|m] =ᵐ[μ] μ[f|m] + μ[g|m]

Next tactic:
swap
theorem condexp_add (hf : Integrable f μ) (hg : Integrable g μ) :
    μ[f + g|m] =ᵐ[μ] μ[f|m] + μ[g|m] := by
  by_cases hm : m ≤ m0
  swap; · 

Proof state:
case neg
α : Type u_1
F : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
f g : α → F'
s : Set α
hf : Integrable f
hg : Integrable g
hm : ¬m ≤ m0
⊢ μ[f + g|m] =ᵐ[μ] μ[f|m] + μ[g|m]

Next tactic:
simp_rw [condexp_of_not_le hm]