-- Lean 4 proof step from Mathlib.RingTheory.Smooth.StandardSmoothOfFree (hypothesis)
Goal:
R_1 : Type u_1
S_1 : Type u_2
inst : CommRing R_1
inst_1 : CommRing S_1
inst_2 : Algebra R_1 S_1
R : Type u_1
S : Type u_2
inst_3 : CommRing R
inst_4 : CommRing S
inst_5 : Algebra R S
inst_6 : FinitePresentation R S
p : Ideal S
inst_7 : p.IsPrime
inst_8 : IsSmoothAt R p
h_1 : Smooth R S
κ : Type u_2
a : κ → S
b : Module.Basis κ (Localization.AtPrime p) Ω[Localization.AtPrime p⁄R]
hb :
  ∀ (i : κ),
    Eq (α := Ω[Localization.AtPrime p⁄R]) ((b : (a : κ) → Ω[Localization.AtPrime p⁄R]) i : Ω[Localization.AtPrime p⁄R])
      (Function.comp (β := Ω[S⁄R]) (⇑(map R R S (Localization.AtPrime p)) : (a : Ω[S⁄R]) → Ω[Localization.AtPrime p⁄R])
          (⇑(D R S) : (a : S) → Ω[S⁄R]) (a i) :
        Ω[Localization.AtPrime p⁄R])
e : (κ →₀ S) →ₗ[S] Ω[S⁄R] := Finsupp.linearCombination S fun (i : κ) ↦ (D R S : (a : S) → Ω[S⁄R]) (a i)
l₁ : (κ →₀ S) →ₗ[S] κ →₀ Localization.AtPrime p :=
  Finsupp.mapRange.linearMap (Algebra.linearMap S (Localization.AtPrime p))
l₂ : Ω[S⁄R] →ₗ[S] Ω[Localization.AtPrime p⁄R] := map R R S (Localization.AtPrime p)
eₚ : LinearMap (R := Localization.AtPrime p) (RingHom.id (Localization.AtPrime p)) (κ →₀ Localization.AtPrime p)
  Ω[Localization.AtPrime p⁄R] :=
  ((IsLocalizedModule.mapExtendScalars p.primeCompl l₁ l₂ (Localization.AtPrime p) :
        ((κ →₀ S) →ₗ[S] Ω[S⁄R]) →ₗ[S]
          LinearMap (R := Localization.AtPrime p) (RingHom.id (Localization.AtPrime p)) (κ →₀ Localization.AtPrime p)
            Ω[Localization.AtPrime p⁄R]) :
      (a : (κ →₀ S) →ₗ[S] Ω[S⁄R]) →
        (κ →₀ Localization.AtPrime p) →ₗ[Localization.AtPrime p] Ω[Localization.AtPrime p⁄R])
    e
this_1 : eₚ = (↑b.repr.symm : (κ →₀ Localization.AtPrime p) →ₗ[Localization.AtPrime p] Ω[Localization.AtPrime p⁄R])
heₚ :
  Function.Bijective (α := κ →₀ Localization.AtPrime p) (β := Ω[Localization.AtPrime p⁄R])
    (⇑eₚ : (a : κ →₀ Localization.AtPrime p) → Ω[Localization.AtPrime p⁄R])
this : Finite κ
g : S
hg : g ∉ p
h :
  Function.Bijective (α := LocalizedModule (Submonoid.powers g) (κ →₀ S)) (β :=
    LocalizedModule (Submonoid.powers g) Ω[S⁄R])
    (⇑((LocalizedModule.map (Submonoid.powers g) :
              (a : (κ →₀ S) →ₗ[S] Ω[S⁄R]) →
                LocalizedModule (Submonoid.powers g) (κ →₀ S) →ₗ[Localization (Submonoid.powers g)]
                  LocalizedModule (Submonoid.powers g) Ω[S⁄R])
            e :
          LinearMap (R := Localization (Submonoid.powers g)) (RingHom.id (Localization (Submonoid.powers g)))
            (LocalizedModule (Submonoid.powers g) (κ →₀ S)) (LocalizedModule (Submonoid.powers g) Ω[S⁄R])) :
      (a : LocalizedModule (Submonoid.powers g) (κ →₀ S)) → LocalizedModule (Submonoid.powers g) Ω[S⁄R])
l₁ₜ : (κ →₀ S) →ₗ[S] κ →₀ Localization.Away g := Finsupp.mapRange.linearMap (Algebra.linearMap S (Localization.Away g))
l₂ₜ : Ω[S⁄R] →ₗ[S] Ω[Localization.Away g⁄R] := map R R S (Localization.Away g)
⊢ ∃ f ∉ p, IsStandardSmooth.{u_1, u_2} R (Localization.Away f)
have h₁ : Function.Bijective (α := κ →₀ Localization.Away g) (β := Ω[Localization.Away g⁄R])
  (⇑((IsLocalizedModule.map (Submonoid.powers g) l₁ₜ l₂ₜ :
            (a : (κ →₀ S) →ₗ[S] Ω[S⁄R]) → (κ →₀ Localization.Away g) →ₗ[S] Ω[Localization.Away g⁄R])
          e :
        (κ →₀ Localization.Away g) →ₗ[S] Ω[Localization.Away g⁄R]) :
    (a : κ →₀ Localization.Away g) → Ω[Localization.Away g⁄R])
Tactic: rw [← IsLocalizedModule.map_bijective_iff_localizedModuleMap_bijective l₁ₜ l₂ₜ] at h
Cleared hypotheses: h