awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : TopologicalSpace X
inst_8 : OpensMeasurableSpace X
s : Set X
hs : MeasurableSet s
f : X → 𝕜 → 𝕜
bound : X → ℝ
a : A
inst_9 : SecondCountableTopologyEither.{u_1, u_2} X C((↑(spectrum 𝕜 a) : Type u_2), 𝕜)
hf : ContinuousOn (Function.uncurry f) (s ×ˢ spectrum 𝕜 a)
bound_ge : ∀ᵐ (x : X) ∂μ.restrict s, ∀ z ∈ spectrum 𝕜 a, ‖f x z‖ ≤ bound x
bound_int : HasFiniteIntegral bound (μ.restrict s)
ha : p a
⊢ HasFiniteIntegral.{u_1, u_2} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) (μ.restrict s)
have refine_2 : ∀ᵐ (x : X) ∂μ.restrict s, ContinuousOn (f x) (spectrum 𝕜 a)
Tactic: refine hasFiniteIntegral_mkD_restrict_of_bound f _ ?_ bound bound_int bound_ge
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
z : (↑(spectrum 𝕜 a) : Type u_2)
⊢ Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
    ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
have rw : Eq.{u_2 + 1} (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ)
  (∫ (x : X),
    (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 : (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜) z ∂μ)
Tactic: rw [integral_apply hf₂]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
z : (↑(spectrum 𝕜 a) : Type u_2)
⊢ Eq.{u_2 + 1} (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ)
    (∫ (x : X),
      (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 : (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜) z ∂μ)
have refine : Filter.EventuallyEq.{u_1, u_2} (β := 𝕜) (ae μ) (fun (x : X) ↦ f x (↑z : 𝕜)) fun (x : X) ↦
  (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 : (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜) z
Tactic: refine integral_congr_ae ?_
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
z : (↑(spectrum 𝕜 a) : Type u_2)
⊢ Filter.EventuallyEq.{u_1, u_2} (β := 𝕜) (ae μ) (fun (x : X) ↦ f x (↑z : 𝕜)) fun (x : X) ↦
    (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 : (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜) z
have h : ∀ (x : X) (cont_x : ContinuousOn (f x) (spectrum 𝕜 a)),
  f x (↑z : 𝕜) =
    (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 : (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜) z
Tactic: filter_upwards [hf₁] with x cont_x
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
z : (↑(spectrum 𝕜 a) : Type u_2)
x : X
cont_x : ContinuousOn (f x) (spectrum 𝕜 a)
⊢ f x (↑z : 𝕜) =
    (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 : (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜) z
have h : f x (↑z : 𝕜) = f x (↑z : 𝕜)
Tactic: rw [mkD_apply_of_continuousOn cont_x]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (hypothesis)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
⊢ cfc (p := p) (fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) a = ∫ (x : X), cfc (p := p) (f x) a ∂μ
have key₁ : ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
  Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
    ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
Tactic: have key₁ (z : spectrum 𝕜 a) :
      ∫ x, f x z ∂μ = (∫ x, mkD ((spectrum 𝕜 a).restrict (f x)) 0 ∂μ) z := by
    rw [integral_apply hf₂]
    refine integral_congr_ae ?_
    filter_upwards [hf₁] with x cont_x
    rw [mkD_apply_of_continuousOn cont_x]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
z : (↑(spectrum 𝕜 a) : Type u_2)
⊢ Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
    ((mkD ((spectrum 𝕜 a).restrict (π := fun (z : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
have rw : ContinuousOn (Y := 𝕜) (fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) (spectrum 𝕜 a)
Tactic: rw [mkD_apply_of_continuousOn]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
z : (↑(spectrum 𝕜 a) : Type u_2)
⊢ ContinuousOn (Y := 𝕜) (fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) (spectrum 𝕜 a)
have rw : Continuous[instTopologicalSpaceSubtype, PseudoMetricSpace.toUniformSpace.toTopologicalSpace]
  ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ)
Tactic: rw [continuousOn_iff_continuous_restrict]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
z : (↑(spectrum 𝕜 a) : Type u_2)
⊢ Continuous[instTopologicalSpaceSubtype, PseudoMetricSpace.toUniformSpace.toTopologicalSpace]
    ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ)
have refine : Continuous[instTopologicalSpaceSubtype, PseudoMetricSpace.toUniformSpace.toTopologicalSpace]
  (⇑(∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ) :
    (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
Tactic: refine continuous_congr key₁ |>.mpr ?_
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (hypothesis)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
⊢ cfc (p := p) (fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) a = ∫ (x : X), cfc (p := p) (f x) a ∂μ
have key₂ : ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
  Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
    ((mkD ((spectrum 𝕜 a).restrict (π := fun (z : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
Tactic: have key₂ (z : spectrum 𝕜 a) :
      ∫ x, f x z ∂μ = mkD ((spectrum 𝕜 a).restrict (fun z ↦ ∫ x, f x z ∂μ)) 0 z := by
    rw [mkD_apply_of_continuousOn]
    rw [continuousOn_iff_continuous_restrict]
    refine continuous_congr key₁ |>.mpr ?_
    exact map_continuous (∫ x, mkD ((spectrum 𝕜 a).restrict (f x)) 0 ∂μ)
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
key₂ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((mkD ((spectrum 𝕜 a).restrict (π := fun (z : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
⊢ cfc (p := p) (fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) a = ∫ (x : X), cfc (p := p) (f x) a ∂μ
have simp_rw : Eq.{u_3 + 1} (α := A)
  (((cfcL (p := p) ha : C((↑(spectrum 𝕜 a) : Type u_2), 𝕜) →L[𝕜] A) : (a : C((↑(spectrum 𝕜 a) : Type u_2), 𝕜)) → A)
      (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0) :
    A)
  (((cfcL (p := p) ha : C((↑(spectrum 𝕜 a) : Type u_2), 𝕜) →L[𝕜] A) : (a : C((↑(spectrum 𝕜 a) : Type u_2), 𝕜)) → A)
      (∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ) :
    A)
Tactic: simp_rw [cfc_eq_cfcL_mkD _ a, cfcL_integral a _ hf₂ ha]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
key₂ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((mkD ((spectrum 𝕜 a).restrict (π := fun (z : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
⊢ Eq.{u_3 + 1} (α := A)
    (((cfcL (p := p) ha : C((↑(spectrum 𝕜 a) : Type u_2), 𝕜) →L[𝕜] A) : (a : C((↑(spectrum 𝕜 a) : Type u_2), 𝕜)) → A)
        (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0) :
      A)
    (((cfcL (p := p) ha : C((↑(spectrum 𝕜 a) : Type u_2), 𝕜) →L[𝕜] A) : (a : C((↑(spectrum 𝕜 a) : Type u_2), 𝕜)) → A)
        (∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ) :
      A)
have h : Eq.{u_2 + 1} (α := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
  (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0)
  (∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ)
Tactic: congr
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
key₂ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((mkD ((spectrum 𝕜 a).restrict (π := fun (z : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
⊢ Eq.{u_2 + 1} (α := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0)
    (∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ)
have h : ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
  Eq (α := 𝕜)
    ((mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
    ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
Tactic: ext z
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
key₂ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((mkD ((spectrum 𝕜 a).restrict (π := fun (z : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
z : (↑(spectrum 𝕜 a) : Type u_2)
⊢ Eq (α := 𝕜)
    ((mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
    ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
have h : Eq (α := 𝕜)
  ((mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
        (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
      z :
    𝕜)
  (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
Tactic: rw [← key₁, key₂]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
f : X → 𝕜 → 𝕜
a : A
hf₁ : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
hf₂ :
  Integrable.{u_2, u_1} (ε := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
    (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
ha : p a
key₁ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
key₂ :
  ∀ (z : (↑(spectrum 𝕜 a) : Type u_2)),
    Eq (α := 𝕜) (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
      ((mkD ((spectrum 𝕜 a).restrict (π := fun (z : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
            (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
          z :
        𝕜)
z : (↑(spectrum 𝕜 a) : Type u_2)
h :
  Eq (α := 𝕜)
    ((mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
    (∫ (x : X), f x (↑z : 𝕜) ∂μ : 𝕜)
⊢ Eq (α := 𝕜)
    ((mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
    ((∫ (x : X), mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0 ∂μ :
          (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
        z :
      𝕜)
have h₁ : Eq (α := 𝕜)
  ((mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
        (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
      z :
    𝕜)
  ((mkD ((spectrum 𝕜 a).restrict (π := fun (z : 𝕜) ↦ 𝕜) fun (z : 𝕜) ↦ ∫ (x : X), f x z ∂μ) 0 :
        (a : (↑(spectrum 𝕜 a) : Type u_2)) → 𝕜)
      z :
    𝕜)
Tactic: rw [← key₁, key₂]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (hypothesis)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
inst_8 : TopologicalSpace X
inst_9 : OpensMeasurableSpace X
f : X → 𝕜 → 𝕜
bound : X → ℝ
a : A
inst_10 : SecondCountableTopologyEither.{u_1, u_2} X C((↑(spectrum 𝕜 a) : Type u_2), 𝕜)
hf : ContinuousOn (Function.uncurry f) (SProd.sprod (α := Set X) univ (spectrum 𝕜 a))
bound_ge : ∀ᵐ (x : X) ∂μ, ∀ z ∈ spectrum 𝕜 a, ‖f x z‖ ≤ bound x
bound_int : HasFiniteIntegral bound μ
ha : p a
⊢ cfc (p := p) (fun (r : 𝕜) ↦ ∫ (x : X), f x r ∂μ) a = ∫ (x : X), cfc (p := p) (f x) a ∂μ
have this : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
Tactic: have : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a) := .of_forall fun x ↦
    hf.comp (Continuous.prodMk_right x).continuousOn fun _ hz ↦ ⟨Set.mem_univ _, hz⟩
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral (goal)
Goal:
X : Type u_1
𝕜 : Type u_2
A : Type u_3
p : A → Prop
inst : RCLike 𝕜
inst_1 : MeasurableSpace X
μ : Measure X
inst_2 : NormedRing A
inst_3 : StarRing A
inst_4 : NormedAlgebra 𝕜 A
inst_5 : ContinuousFunctionalCalculus 𝕜 A p
inst_6 : CompleteSpace A
inst_7 : NormedSpace ℝ A
inst_8 : TopologicalSpace X
inst_9 : OpensMeasurableSpace X
f : X → 𝕜 → 𝕜
bound : X → ℝ
a : A
inst_10 : SecondCountableTopologyEither.{u_1, u_2} X C((↑(spectrum 𝕜 a) : Type u_2), 𝕜)
hf : ContinuousOn (Function.uncurry f) (SProd.sprod (α := Set X) univ (spectrum 𝕜 a))
bound_ge : ∀ᵐ (x : X) ∂μ, ∀ z ∈ spectrum 𝕜 a, ‖f x z‖ ≤ bound x
bound_int : HasFiniteIntegral bound μ
ha : p a
this : ∀ᵐ (x : X) ∂μ, ContinuousOn (f x) (spectrum 𝕜 a)
⊢ cfc (p := p) (fun (r : 𝕜) ↦ ∫ (x : X), f x r ∂μ) a = ∫ (x : X), cfc (p := p) (f x) a ∂μ
have refine_1 : AEStronglyMeasurable.{u_1, u_2} (β := C((↑(spectrum 𝕜 a) : Type u_2), 𝕜))
  (fun (x : X) ↦ mkD ((spectrum 𝕜 a).restrict (π := fun (a : 𝕜) ↦ 𝕜) (f x)) 0) μ
Tactic: refine cfc_integral' _ _ this ⟨?_, ?_⟩ ha