awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hX : HasGaussianLaw X P
hY : HasGaussianLaw Y P
hXY : X ⟂ᵢ[P] Y
this_1 : IsProbabilityMeasure P
L : StrongDual ℝ (E × F)
this :
  (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x,
      @integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) =
    HAdd.hAdd (α := E × F) (β := E × F)
      ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)
      ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)
e_a :
  cexp
      ((↑((ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F) : (a : E) → ℝ)
                (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x)) :
            ℂ) *
          I -
        (↑(variance (mΩ := inst_1) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ)
                (Measure.map X P)) :
            ℂ) /
          2) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)) :
            ℂ) *
          I -
        (↑(variance (mΩ := inst_1) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ)
                (Measure.map X P)) :
            ℂ) /
          2)
⊢ charFunDual (mE := inst_1) (Measure.map X P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)) :
            ℂ) *
          I -
        (↑((((covarianceBilinDual (mE := inst_1) (Measure.map X P) : (a : StrongDual ℝ E) → StrongDual ℝ E →L[ℝ] ℝ)
                      (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) :
                    StrongDual ℝ E →L[ℝ] ℝ) :
                  (a : StrongDual ℝ E) → ℝ)
                (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F))) :
            ℂ) /
          2)
have e_a₁ : MemLp (m0 := inst_1) id 2 (Measure.map X P)
Tactic: rw [hX.isGaussian_map.charFunDual_eq, integral_complex_ofReal, integral_comp_id_comm,
        covarianceBilinDual_self_eq_variance]
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hX : HasGaussianLaw X P
hY : HasGaussianLaw Y P
hXY : X ⟂ᵢ[P] Y
this_1 : IsProbabilityMeasure P
L : StrongDual ℝ (E × F)
this :
  (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x,
      @integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) =
    HAdd.hAdd (α := E × F) (β := E × F)
      ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)
      ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)
e_a :
  cexp
      ((↑((ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F) : (a : E) → ℝ)
                (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x)) :
            ℂ) *
          I -
        (↑(variance (mΩ := inst_1) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ)
                (Measure.map X P)) :
            ℂ) /
          2) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)) :
            ℂ) *
          I -
        (↑(variance (mΩ := inst_1) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ)
                (Measure.map X P)) :
            ℂ) /
          2)
e_a₁ : MemLp (m0 := inst_1) id 2 (Measure.map X P)
⊢ charFunDual (mE := inst_1) (Measure.map X P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)) :
            ℂ) *
          I -
        (↑((((covarianceBilinDual (mE := inst_1) (Measure.map X P) : (a : StrongDual ℝ E) → StrongDual ℝ E →L[ℝ] ℝ)
                      (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) :
                    StrongDual ℝ E →L[ℝ] ℝ) :
                  (a : StrongDual ℝ E) → ℝ)
                (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F))) :
            ℂ) /
          2)
have e_a₂ : @Integrable _ _ _ _ inst_1 id (Measure.map X P)
Tactic: rw [hX.isGaussian_map.charFunDual_eq, integral_complex_ofReal, integral_comp_id_comm,
        covarianceBilinDual_self_eq_variance]
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hX : HasGaussianLaw X P
hY : HasGaussianLaw Y P
hXY : X ⟂ᵢ[P] Y
this_1 : IsProbabilityMeasure P
L : StrongDual ℝ (E × F)
this :
  (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x,
      @integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) =
    HAdd.hAdd (α := E × F) (β := E × F)
      ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)
      ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)
⊢ charFunDual (mE := inst_6) (Measure.map Y P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)) :
            ℂ) *
          I -
        (↑((((covarianceBilinDual (mE := inst_6) (Measure.map Y P) : (a : StrongDual ℝ F) → StrongDual ℝ F →L[ℝ] ℝ)
                      (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) :
                    StrongDual ℝ F →L[ℝ] ℝ) :
                  (a : StrongDual ℝ F) → ℝ)
                (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F))) :
            ℂ) /
          2)
have e_a : cexp
    ((↑((ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F) : (a : F) → ℝ)
              (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (x : F) ↦ x)) :
          ℂ) *
        I -
      (↑(variance (mΩ := inst_6) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ)
              (Measure.map Y P)) :
          ℂ) /
        2) =
  cexp
    ((↑((L : (a : E × F) → ℝ)
              ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)) :
          ℂ) *
        I -
      (↑(variance (mΩ := inst_6) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ)
              (Measure.map Y P)) :
          ℂ) /
        2)
Tactic: rw [hY.isGaussian_map.charFunDual_eq, integral_complex_ofReal, integral_comp_id_comm,
        covarianceBilinDual_self_eq_variance]
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hX : HasGaussianLaw X P
hY : HasGaussianLaw Y P
hXY : X ⟂ᵢ[P] Y
this_1 : IsProbabilityMeasure P
L : StrongDual ℝ (E × F)
this :
  (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x,
      @integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) =
    HAdd.hAdd (α := E × F) (β := E × F)
      ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)
      ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)
e_a :
  cexp
      ((↑((ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F) : (a : F) → ℝ)
                (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (x : F) ↦ x)) :
            ℂ) *
          I -
        (↑(variance (mΩ := inst_6) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ)
                (Measure.map Y P)) :
            ℂ) /
          2) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)) :
            ℂ) *
          I -
        (↑(variance (mΩ := inst_6) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ)
                (Measure.map Y P)) :
            ℂ) /
          2)
⊢ charFunDual (mE := inst_6) (Measure.map Y P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)) :
            ℂ) *
          I -
        (↑((((covarianceBilinDual (mE := inst_6) (Measure.map Y P) : (a : StrongDual ℝ F) → StrongDual ℝ F →L[ℝ] ℝ)
                      (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) :
                    StrongDual ℝ F →L[ℝ] ℝ) :
                  (a : StrongDual ℝ F) → ℝ)
                (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F))) :
            ℂ) /
          2)
have e_a₁ : MemLp (m0 := inst_6) id 2 (Measure.map Y P)
Tactic: rw [hY.isGaussian_map.charFunDual_eq, integral_complex_ofReal, integral_comp_id_comm,
        covarianceBilinDual_self_eq_variance]
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hX : HasGaussianLaw X P
hY : HasGaussianLaw Y P
hXY : X ⟂ᵢ[P] Y
this_1 : IsProbabilityMeasure P
L : StrongDual ℝ (E × F)
this :
  (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x,
      @integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) =
    HAdd.hAdd (α := E × F) (β := E × F)
      ((inl ℝ E F : (a : E) → E × F) (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x) : E × F)
      ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)
e_a :
  cexp
      ((↑((ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F) : (a : F) → ℝ)
                (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (x : F) ↦ x)) :
            ℂ) *
          I -
        (↑(variance (mΩ := inst_6) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ)
                (Measure.map Y P)) :
            ℂ) /
          2) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)) :
            ℂ) *
          I -
        (↑(variance (mΩ := inst_6) (⇑(ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ)
                (Measure.map Y P)) :
            ℂ) /
          2)
e_a₁ : MemLp (m0 := inst_6) id 2 (Measure.map Y P)
⊢ charFunDual (mE := inst_6) (Measure.map Y P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                ((inr ℝ E F : (a : F) → E × F) (@integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y) : E × F)) :
            ℂ) *
          I -
        (↑((((covarianceBilinDual (mE := inst_6) (Measure.map Y P) : (a : StrongDual ℝ F) → StrongDual ℝ F →L[ℝ] ℝ)
                      (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) :
                    StrongDual ℝ F →L[ℝ] ℝ) :
                  (a : StrongDual ℝ F) → ℝ)
                (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F))) :
            ℂ) /
          2)
have e_a₂ : @Integrable _ _ _ _ inst_6 id (Measure.map Y P)
Tactic: rw [hY.isGaussian_map.charFunDual_eq, integral_complex_ofReal, integral_comp_id_comm,
        covarianceBilinDual_self_eq_variance]
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hX : HasGaussianLaw X P
hY : HasGaussianLaw Y P
hXY : X ⟂ᵢ[P] Y
this : IsProbabilityMeasure P
⊢ ∃ (m : E × F) (f : StrongDual ℝ (E × F) →L[ℝ] StrongDual ℝ (E × F) →L[ℝ] ℝ),
    f.toBilinForm.IsPosSemidef ∧
      ∀ (L : StrongDual ℝ (E × F)),
        charFunDual (mE := Prod.instMeasurableSpace) (Measure.map (fun (ω : Ω) ↦ (X ω, Y ω)) P) L =
          cexp
            ((↑((L : (a : E × F) → ℝ) m) : ℂ) * I -
              (↑((((f : (a : StrongDual ℝ (E × F)) → StrongDual ℝ (E × F) →L[ℝ] ℝ) L : StrongDual ℝ (E × F) →L[ℝ] ℝ) :
                        (a : StrongDual ℝ (E × F)) → ℝ)
                      L) :
                  ℂ) /
                2)
have refine : ∀ (L : StrongDual ℝ (E × F)),
  charFunDual (mE := Prod.instMeasurableSpace) (Measure.map (fun (ω : Ω) ↦ (X ω, Y ω)) P) L =
    cexp
      ((↑((L : (a : E × F) → ℝ)
                (@integral _ _ _ _ inst_1 (Measure.map X P) fun (x : E) ↦ x,
                  @integral _ _ _ _ inst_6 (Measure.map Y P) fun (y : F) ↦ y)) :
            ℂ) *
          I -
        (↑((((diagonalStrongDualProd (covarianceBilinDual (mE := inst_1) (Measure.map X P))
                          (covarianceBilinDual (mE := inst_6) (Measure.map Y P)) :
                        (a : StrongDual ℝ (E × F)) → StrongDual ℝ (E × F) →L[ℝ] ℝ)
                      L :
                    StrongDual ℝ (E × F) →L[ℝ] ℝ) :
                  (a : StrongDual ℝ (E × F)) → ℝ)
                L) :
            ℂ) /
          2)
Tactic: classical
    refine ⟨(∫ x, x ∂P.map X, ∫ y, y ∂P.map Y),
      .diagonalStrongDualProd (covarianceBilinDual (P.map X)) (covarianceBilinDual (P.map Y)),
      isPosSemidef_diagonalStrongDualProd isPosSemidef_covarianceBilinDual
        isPosSemidef_covarianceBilinDual, fun L ↦ ?_⟩
    rw [(indepFun_iff_charFunDual_prod (by fun_prop) (by fun_prop)).1 hXY]
    have : (∫ x, x ∂Measure.map X P, ∫ y, y ∂Measure.map Y P) =
        ContinuousLinearMap.inl ℝ E F (∫ x, x ∂Measure.map X P) +
        ContinuousLinearMap.inr ℝ E F (∫ y, y ∂Measure.map Y P) := by simp
    simp only [this, map_add, ofReal_add, add_mul, diagonalStrongDualProd_apply, add_div,
      add_sub_add_comm, exp_add]
    congr
    · rw [hX.isGaussian_map.charFunDual_eq, integral_complex_ofReal, integral_comp_id_comm,
        covarianceBilinDual_self_eq_variance]
      · simp
      · exact hX.isGaussian_map.memLp_two_id
      · exact hX.isGaussian_map.integrable_id
    · rw [hY.isGaussian_map.charFunDual_eq, integral_complex_ofReal, integral_comp_id_comm,
        covarianceBilinDual_self_eq_variance]
      · simp
      · exact hY.isGaussian_map.memLp_two_id
      · exact hY.isGaussian_map.integrable_id
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (hypothesis)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hXY : HasGaussianLaw (E := E × F) (fun (ω : Ω) ↦ (X ω, Y ω)) P
h : ∀ (L₁ : StrongDual ℝ E) (L₂ : StrongDual ℝ F), cov[(⇑L₁ : (a : E) → ℝ) ∘ X, (⇑L₂ : (a : F) → ℝ) ∘ Y; P] = 0
⊢ X ⟂ᵢ[P] Y
have this : IsProbabilityMeasure P
Tactic: have := hXY.isProbabilityMeasure
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hXY : HasGaussianLaw (E := E × F) (fun (ω : Ω) ↦ (X ω, Y ω)) P
h : ∀ (L₁ : StrongDual ℝ E) (L₂ : StrongDual ℝ F), cov[(⇑L₁ : (a : E) → ℝ) ∘ X, (⇑L₂ : (a : F) → ℝ) ∘ Y; P] = 0
this : IsProbabilityMeasure P
⊢ X ⟂ᵢ[P] Y
have rw : ∀ (L : StrongDual ℝ (E × F)),
  charFunDual (mE := Prod.instMeasurableSpace) (Measure.map (fun (ω : Ω) ↦ (X ω, Y ω)) P) L =
    charFunDual (mE := inst_1) (Measure.map X P) (comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) *
      charFunDual (mE := inst_6) (Measure.map Y P) (comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F))
Tactic: rw [indepFun_iff_charFunDual_prod hXY.fst.aemeasurable hXY.snd.aemeasurable]
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hXY : HasGaussianLaw (E := E × F) (fun (ω : Ω) ↦ (X ω, Y ω)) P
h : ∀ (L₁ : StrongDual ℝ E) (L₂ : StrongDual ℝ F), cov[(⇑L₁ : (a : E) → ℝ) ∘ X, (⇑L₂ : (a : F) → ℝ) ∘ Y; P] = 0
this : IsProbabilityMeasure P
L : StrongDual ℝ (E × F)
⊢ (Function.comp (β := E × F) (⇑L : (a : E × F) → ℝ) fun (ω : Ω) ↦ (X ω, Y ω)) =
    HAdd.hAdd (α := Ω → ℝ) ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ) ∘ X)
      ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ) ∘ Y)
have h₁ : ∀ (x : Ω),
  Function.comp (β := E × F) (⇑L : (a : E × F) → ℝ) (fun (ω : Ω) ↦ (X ω, Y ω)) x =
    HAdd.hAdd (α := Ω → ℝ) (β := Ω → ℝ) ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ) ∘ X)
      ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ) ∘ Y) x
Tactic: ext
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (hypothesis)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hXY : HasGaussianLaw (E := E × F) (fun (ω : Ω) ↦ (X ω, Y ω)) P
h : ∀ (L₁ : StrongDual ℝ E) (L₂ : StrongDual ℝ F), cov[(⇑L₁ : (a : E) → ℝ) ∘ X, (⇑L₂ : (a : F) → ℝ) ∘ Y; P] = 0
this : IsProbabilityMeasure P
L : StrongDual ℝ (E × F)
⊢ charFunDual (mE := Prod.instMeasurableSpace) (Measure.map (fun (ω : Ω) ↦ (X ω, Y ω)) P) L =
    charFunDual (mE := inst_1) (Measure.map X P) (comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) *
      charFunDual (mE := inst_6) (Measure.map Y P) (comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F))
have this₁ : (Function.comp (β := E × F) (⇑L : (a : E × F) → ℝ) fun (ω : Ω) ↦ (X ω, Y ω)) =
  HAdd.hAdd (α := Ω → ℝ) ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ) ∘ X)
    ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ) ∘ Y)
Tactic: have : L ∘ (fun ω ↦ (X ω, Y ω)) = (L ∘L (.inl ℝ E F)) ∘ X + (L ∘L (.inr ℝ E F)) ∘ Y := by
    ext; simp [-coe_comp', ← comp_inl_add_comp_inr]
-- Lean 4 proof step from Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence (goal)
Goal:
Ω : Type u_1
mΩ : MeasurableSpace Ω
P : Measure Ω
E : Type u_2
F : Type u_3
inst : NormedAddCommGroup E
inst_1 : MeasurableSpace E
inst_2 : CompleteSpace E
inst_3 : BorelSpace E
inst_4 : SecondCountableTopology E
inst_5 : NormedAddCommGroup F
inst_6 : MeasurableSpace F
inst_7 : CompleteSpace F
inst_8 : BorelSpace F
inst_9 : SecondCountableTopology F
inst_10 : NormedSpace ℝ E
inst_11 : NormedSpace ℝ F
X : Ω → E
Y : Ω → F
hXY : HasGaussianLaw (E := E × F) (fun (ω : Ω) ↦ (X ω, Y ω)) P
h : ∀ (L₁ : StrongDual ℝ E) (L₂ : StrongDual ℝ F), cov[(⇑L₁ : (a : E) → ℝ) ∘ X, (⇑L₂ : (a : F) → ℝ) ∘ Y; P] = 0
this_1 : IsProbabilityMeasure P
L : StrongDual ℝ (E × F)
this :
  (Function.comp (β := E × F) (⇑L : (a : E × F) → ℝ) fun (ω : Ω) ↦ (X ω, Y ω)) =
    HAdd.hAdd (α := Ω → ℝ) ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ) ∘ X)
      ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ) ∘ Y)
⊢ charFunDual (mE := Prod.instMeasurableSpace) (Measure.map (fun (ω : Ω) ↦ (X ω, Y ω)) P) L =
    charFunDual (mE := inst_1) (Measure.map X P) (comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) *
      charFunDual (mE := inst_6) (Measure.map Y P) (comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F))
have rw : cexp
    ((↑(∫ (x : Ω),
              HAdd.hAdd (α := Ω → ℝ) (β := Ω → ℝ) ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ) ∘ X)
                ((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ) ∘ Y) x ∂P) :
          ℂ) *
        I -
      (↑(Var[(⇑(comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ) ∘ X; P] +
              Var[(⇑(comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ) ∘ Y; P]) :
          ℂ) /
        2) =
  cexp
    ((↑(∫ (a : Ω),
              HAdd.hAdd (α := ℝ) (((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ) ∘ X) a)
                (((⇑(comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ) ∘ Y) a) ∂P) :
          ℂ) *
        I -
      (↑(Var[(⇑(comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) : (a : E) → ℝ) ∘ X; P] +
              Var[(⇑(comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) : (a : F) → ℝ) ∘ Y; P]) :
          ℂ) /
        2)
Tactic: rw [hXY.charFunDual_map_eq, hXY.fst.charFunDual_map_eq, hXY.snd.charFunDual_map_eq, ← exp_add,
    sub_add_sub_comm, ← add_mul, ← ofReal_add, ← integral_add, ← add_div, ← ofReal_add, this,
    variance_add, h, mul_zero, add_zero]