-- Lean 4 proof step from Mathlib.NumberTheory.NumberField.CanonicalEmbedding.NormLeOne (goal)
Goal:
K : Type u_1
inst : Field K
inst_1 : NumberField K
rw :
  |(LinearMap.det : (a : (InfinitePlace K → ℝ) →ₗ[ℝ] InfinitePlace K → ℝ) → ℝ)
        (↑(↑(ContinuousLinearEquiv.symm (Basis.equivFunL (completeBasis K))) :
              (InfinitePlace K → ℝ) →L[ℝ] realSpace K) :
          (InfinitePlace K → ℝ) →ₗ[ℝ] InfinitePlace K → ℝ)| =
    (↑(finrank ℚ K) : ℝ) * regulator K
rw₁ :
  |Matrix.det.{0, u_1} (n := InfinitePlace K)
        ((LinearMap.toMatrix (completeBasis K) (completeBasis K) :
            (a : realSpace K →ₗ[ℝ] realSpace K) → Matrix (InfinitePlace K) (InfinitePlace K) ℝ)
          (↑(↑(ContinuousLinearEquiv.symm (Basis.equivFunL (completeBasis K))) :
                (InfinitePlace K → ℝ) →L[ℝ] realSpace K) :
            (InfinitePlace K → ℝ) →ₗ[ℝ] InfinitePlace K → ℝ))| =
    (↑(finrank ℚ K) : ℝ) * regulator K
rw₂ :
  |Matrix.det.{0, u_1} (n := InfinitePlace K)
        (Matrix.transpose
          ((LinearMap.toMatrix (completeBasis K) (completeBasis K) :
              (a : realSpace K →ₗ[ℝ] realSpace K) → Matrix (InfinitePlace K) (InfinitePlace K) ℝ)
            (↑(↑(ContinuousLinearEquiv.symm (Basis.equivFunL (completeBasis K))) :
                  (InfinitePlace K → ℝ) →L[ℝ] realSpace K) :
              (InfinitePlace K → ℝ) →ₗ[ℝ] InfinitePlace K → ℝ)))| =
    (↑(finrank ℚ K) : ℝ) * regulator K
rw₃ :
  |Matrix.det.{0, u_1} (n := InfinitePlace K)
        (Matrix.transpose
          ((LinearMap.toMatrix (completeBasis K) (completeBasis K) :
              (a : realSpace K →ₗ[ℝ] realSpace K) → Matrix (InfinitePlace K) (InfinitePlace K) ℝ)
            (↑(↑(ContinuousLinearEquiv.symm (Basis.equivFunL (completeBasis K))) :
                  (InfinitePlace K → ℝ) →L[ℝ] realSpace K) :
              (InfinitePlace K → ℝ) →ₗ[ℝ] InfinitePlace K → ℝ)))| =
    (↑(finrank ℚ K) : ℝ) * regOfFamily (fundSystem K)
rw₄ rw₅ rw₆ :
  Eq (α := ℝ)
    |Matrix.det.{0, u_1} (n := InfinitePlace K)
        (Matrix.transpose
          ((LinearMap.toMatrix (completeBasis K) (completeBasis K) :
              (a : realSpace K →ₗ[ℝ] realSpace K) → Matrix (InfinitePlace K) (InfinitePlace K) ℝ)
            (↑(↑(ContinuousLinearEquiv.symm (Basis.equivFunL (completeBasis K))) :
                  (InfinitePlace K → ℝ) →L[ℝ] realSpace K) :
              (InfinitePlace K → ℝ) →ₗ[ℝ] InfinitePlace K → ℝ)))|
    |Matrix.det (n := InfinitePlace K)
        ((Matrix.of : (a : InfinitePlace K → InfinitePlace K → ℝ) → Matrix (InfinitePlace K) (InfinitePlace K) ℝ)
            fun (i w : InfinitePlace K) ↦
            if h : i = w₀ then (↑w.mult : ℝ)
            else
              (↑w.mult : ℝ) *
                Real.log
                  ((w : (a : K) → ℝ)
                    ((algebraMap (𝓞 K) K : (a : 𝓞 K) → K)
                        (↑(fundSystem K
                              (((Equiv.symm equivFinRank : { w : InfinitePlace K // w ≠ w₀ } ≃ Fin (rank K)) :
                                  (a : { w : InfinitePlace K // w ≠ w₀ }) → Fin (rank K))
                                (Subtype.mk (p := fun (w : InfinitePlace K) ↦ w ≠ w₀) i h))) :
                          𝓞 K) :
                      K)) :
          Matrix (InfinitePlace K) (InfinitePlace K) ℝ)|
⊢ |ContinuousLinearMap.det (M := InfinitePlace K → ℝ)
        (↑(ContinuousLinearEquiv.symm (Basis.equivFunL (completeBasis K))) : (InfinitePlace K → ℝ) →L[ℝ] realSpace K)| =
    (↑(finrank ℚ K) : ℝ) * regulator K
have e_a : ∀ (w i : InfinitePlace K),
  Eq (α := ℝ)
    (Matrix.transpose
        ((LinearMap.toMatrix (completeBasis K) (completeBasis K) :
            (a : realSpace K →ₗ[ℝ] realSpace K) → Matrix (InfinitePlace K) (InfinitePlace K) ℝ)
          (↑(↑(ContinuousLinearEquiv.symm (Basis.equivFunL (completeBasis K))) :
                (InfinitePlace K → ℝ) →L[ℝ] realSpace K) :
            (InfinitePlace K → ℝ) →ₗ[ℝ] InfinitePlace K → ℝ))
        w i :
      ℝ)
    ((Matrix.of : (a : InfinitePlace K → InfinitePlace K → ℝ) → Matrix (InfinitePlace K) (InfinitePlace K) ℝ)
        (fun (i w : InfinitePlace K) ↦
          if h : i = w₀ then (↑w.mult : ℝ)
          else
            (↑w.mult : ℝ) *
              Real.log
                ((w : (a : K) → ℝ)
                  ((algebraMap (𝓞 K) K : (a : 𝓞 K) → K)
                      (↑(fundSystem K
                            (((Equiv.symm equivFinRank : { w : InfinitePlace K // w ≠ w₀ } ≃ Fin (rank K)) :
                                (a : { w : InfinitePlace K // w ≠ w₀ }) → Fin (rank K))
                              (Subtype.mk (p := fun (w : InfinitePlace K) ↦ w ≠ w₀) i h))) :
                        𝓞 K) :
                    K)))
        w i :
      ℝ)
Tactic: classical
  rw [ContinuousLinearMap.det, ← LinearMap.det_toMatrix (completeBasis K), ← Matrix.det_transpose,
    regulator_eq_regOfFamily_fundSystem, finrank_mul_regOfFamily_eq_det _ w₀ equivFinRank.symm]
  congr 2 with w i
  rw [Matrix.transpose_apply, LinearMap.toMatrix_apply, Matrix.of_apply, ← Basis.equivFunL_apply,
    ContinuousLinearMap.coe_coe, ContinuousLinearEquiv.coe_apply,
    (completeBasis K).equivFunL.apply_symm_apply]
  split_ifs with hw
  · rw [hw, completeBasis_apply_of_eq]
  · simp_rw [completeBasis_apply_of_ne K ⟨w, hw⟩, expMap_symm_apply, normAtAllPlaces_mixedEmbedding]