-- 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_1) (Measure.map X P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) *
      charFunDual (mE := inst_6) (Measure.map Y P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ E F)) =
    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)
have simp : charFunDual (mE := inst_1) (Measure.map X P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inl ℝ E F)) *
    charFunDual (mE := inst_6) (Measure.map Y P) (ContinuousLinearMap.comp (σ₁₂ := RingHom.id ℝ) L (inr ℝ 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) *
    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)
Tactic: simp only [this, map_add, ofReal_add, add_mul, diagonalStrongDualProd_apply, add_div,
      add_sub_add_comm, exp_add]