awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
Goal:
R : Type u_1
S : Type u_2
inst : CommRing R
inst_1 : CommRing S
inst_2 : Algebra R S
inst_3 : FinitePresentation R S
p : Ideal S
inst_4 : p.IsPrime
inst_5 : IsSmoothAt R p
this_1 :
  ∀ (R : Type u_1) {S : Type u_2} [inst : CommRing R] [inst_6 : CommRing S] [inst_7 : Algebra R S]
    [FinitePresentation R S] (p : Ideal S) [inst_9 : p.IsPrime] [IsSmoothAt R p] (h : Smooth R S),
    ∃ f ∉ p, IsStandardSmooth.{u_1, u_2} R (Localization.Away f)
h : ¬Smooth R S
g : S
hg : g ∉ p
hsm : Smooth.{u_2, u_1} R (Localization.Away g)
h_1 :
  Ideal.IsPrime (α := Localization.Away g)
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p)
g' : Localization.Away g
hg' : g' ∉ Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p
hstd : IsStandardSmooth.{u_1, u_2} R (Localization.Away g')
this : IsLocalization.Away (g * (IsLocalization.Away.sec g g').1) (Localization.Away g')
e : Localization.Away (g * (IsLocalization.Away.sec g g').1) ≃ₐ[S] Localization.Away g' :=
  Localization.algEquiv (Submonoid.powers (g * (IsLocalization.Away.sec g g').1)) (Localization.Away g')
⊢ g * (IsLocalization.Away.sec g g').1 ∉ p

Tactic:
Ideal.IsPrime.mul_notMem ‹_› hg fun hmem ↦ hg' ?_

Premises used: Ideal.IsPrime.mul_notMem
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
Goal:
R : Type u_1
S : Type u_2
inst : CommRing R
inst_1 : CommRing S
inst_2 : Algebra R S
inst_3 : FinitePresentation R S
p : Ideal S
inst_4 : p.IsPrime
inst_5 : IsSmoothAt R p
this_1 :
  ∀ (R : Type u_1) {S : Type u_2} [inst : CommRing R] [inst_6 : CommRing S] [inst_7 : Algebra R S]
    [FinitePresentation R S] (p : Ideal S) [inst_9 : p.IsPrime] [IsSmoothAt R p] (h : Smooth R S),
    ∃ f ∉ p, IsStandardSmooth.{u_1, u_2} R (Localization.Away f)
h : ¬Smooth R S
g : S
hg : g ∉ p
hsm : Smooth.{u_2, u_1} R (Localization.Away g)
h_1 :
  Ideal.IsPrime (α := Localization.Away g)
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p)
g' : Localization.Away g
hg' : g' ∉ Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p
hstd : IsStandardSmooth.{u_1, u_2} R (Localization.Away g')
this : IsLocalization.Away (g * (IsLocalization.Away.sec g g').1) (Localization.Away g')
e : Localization.Away (g * (IsLocalization.Away.sec g g').1) ≃ₐ[S] Localization.Away g' :=
  Localization.algEquiv (Submonoid.powers (g * (IsLocalization.Away.sec g g').1)) (Localization.Away g')
inr :
  ∀ (hmem : (IsLocalization.Away.sec g g').1 ∈ p),
    Membership.mem (γ := Ideal (Localization.Away g))
      (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p) g'
⊢ g * (IsLocalization.Away.sec g g').1 ∉ p

Tactic:
refine Ideal.IsPrime.mul_notMem ‹_› hg fun hmem ↦ hg' ?_

Premises used: Ideal.IsPrime.mul_notMem
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
Goal:
R : Type u_1
S : Type u_2
inst : CommRing R
inst_1 : CommRing S
inst_2 : Algebra R S
inst_3 : FinitePresentation R S
p : Ideal S
inst_4 : p.IsPrime
inst_5 : IsSmoothAt R p
this_1 :
  ∀ (R : Type u_1) {S : Type u_2} [inst : CommRing R] [inst_6 : CommRing S] [inst_7 : Algebra R S]
    [FinitePresentation R S] (p : Ideal S) [inst_9 : p.IsPrime] [IsSmoothAt R p] (h : Smooth R S),
    ∃ f ∉ p, IsStandardSmooth.{u_1, u_2} R (Localization.Away f)
h : ¬Smooth R S
g : S
hg : g ∉ p
hsm : Smooth.{u_2, u_1} R (Localization.Away g)
h_1 :
  Ideal.IsPrime (α := Localization.Away g)
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p)
g' : Localization.Away g
hg' : g' ∉ Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p
hstd : IsStandardSmooth.{u_1, u_2} R (Localization.Away g')
this : IsLocalization.Away (g * (IsLocalization.Away.sec g g').1) (Localization.Away g')
e : Localization.Away (g * (IsLocalization.Away.sec g g').1) ≃ₐ[S] Localization.Away g' :=
  Localization.algEquiv (Submonoid.powers (g * (IsLocalization.Away.sec g g').1)) (Localization.Away g')
hmem : (IsLocalization.Away.sec g g').1 ∈ p
inr :
  Membership.mem (α := Localization.Away g) (γ := Ideal (Localization.Away g))
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p)
    ((algebraMap S (Localization.Away g) : (a : S) → Localization.Away g) (IsLocalization.Away.sec g g').1 :
      Localization.Away g)
⊢ Membership.mem (γ := Ideal (Localization.Away g))
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p) g'

Tactic:
rw [Ideal.mem_iff_of_associated (IsLocalization.Away.associated_sec_fst g g').symm]

Premises used: Ideal.mem_iff_of_associated, Associated.symm, IsLocalization.Away.associated_sec_fst
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
Goal:
R : Type u_1
S : Type u_2
inst : CommRing R
inst_1 : CommRing S
inst_2 : Algebra R S
inst_3 : FinitePresentation R S
p : Ideal S
inst_4 : p.IsPrime
inst_5 : IsSmoothAt R p
this_1 :
  ∀ (R : Type u_1) {S : Type u_2} [inst : CommRing R] [inst_6 : CommRing S] [inst_7 : Algebra R S]
    [FinitePresentation R S] (p : Ideal S) [inst_9 : p.IsPrime] [IsSmoothAt R p] (h : Smooth R S),
    ∃ f ∉ p, IsStandardSmooth.{u_1, u_2} R (Localization.Away f)
h : ¬Smooth R S
g : S
hg : g ∉ p
hsm : Smooth.{u_2, u_1} R (Localization.Away g)
h_1 :
  Ideal.IsPrime (α := Localization.Away g)
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p)
g' : Localization.Away g
hg' : g' ∉ Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p
hstd : IsStandardSmooth.{u_1, u_2} R (Localization.Away g')
this : IsLocalization.Away (g * (IsLocalization.Away.sec g g').1) (Localization.Away g')
e : Localization.Away (g * (IsLocalization.Away.sec g g').1) ≃ₐ[S] Localization.Away g' :=
  Localization.algEquiv (Submonoid.powers (g * (IsLocalization.Away.sec g g').1)) (Localization.Away g')
hmem : (IsLocalization.Away.sec g g').1 ∈ p
⊢ Membership.mem (α := Localization.Away g) (γ := Ideal (Localization.Away g))
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p)
    ((algebraMap S (Localization.Away g) : (a : S) → Localization.Away g) (IsLocalization.Away.sec g g').1 :
      Localization.Away g)

Tactic:
Ideal.mem_map_of_mem (algebraMap S (Localization.Away g)) hmem

Premises used: Algebra.algebraMap, Ideal.mem_map_of_mem, Set.Mem, Localization.Away
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
Goal:
R : Type u_1
S : Type u_2
inst : CommRing R
inst_1 : CommRing S
inst_2 : Algebra R S
inst_3 : FinitePresentation R S
p : Ideal S
inst_4 : p.IsPrime
inst_5 : IsSmoothAt R p
this_1 :
  ∀ (R : Type u_1) {S : Type u_2} [inst : CommRing R] [inst_6 : CommRing S] [inst_7 : Algebra R S]
    [FinitePresentation R S] (p : Ideal S) [inst_9 : p.IsPrime] [IsSmoothAt R p] (h : Smooth R S),
    ∃ f ∉ p, IsStandardSmooth.{u_1, u_2} R (Localization.Away f)
h : ¬Smooth R S
g : S
hg : g ∉ p
hsm : Smooth.{u_2, u_1} R (Localization.Away g)
h_1 :
  Ideal.IsPrime (α := Localization.Away g)
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p)
g' : Localization.Away g
hg' : g' ∉ Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p
hstd : IsStandardSmooth.{u_1, u_2} R (Localization.Away g')
this : IsLocalization.Away (g * (IsLocalization.Away.sec g g').1) (Localization.Away g')
e : Localization.Away (g * (IsLocalization.Away.sec g g').1) ≃ₐ[S] Localization.Away g' :=
  Localization.algEquiv (Submonoid.powers (g * (IsLocalization.Away.sec g g').1)) (Localization.Away g')
hmem : (IsLocalization.Away.sec g g').1 ∈ p
⊢ Membership.mem (α := Localization.Away g) (γ := Ideal (Localization.Away g))
    (Ideal.map (F := S →+* Localization.Away g) (algebraMap S (Localization.Away g)) p)
    ((algebraMap S (Localization.Away g) : (a : S) → Localization.Away g) (IsLocalization.Away.sec g g').1 :
      Localization.Away g)

Tactic:
exact Ideal.mem_map_of_mem (algebraMap S (Localization.Away g)) hmem

Premises used: Algebra.algebraMap, Ideal.mem_map_of_mem, Localization.Away
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
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 : Smooth R S
obtain :
  ∀ (κ : 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])),
    ∃ f ∉ p, IsStandardSmooth.{u_1, u_2} R (Localization.Away f)
⊢ ∃ f ∉ p, IsStandardSmooth.{u_1, u_2} R (Localization.Away f)

Tactic:
obtain ⟨κ, a, b, hb⟩ := Module.exists_basis_of_span_of_flat _
    (span_range_map_derivation_of_isLocalization R _ (Localization.AtPrime p) p.primeCompl)

Premises used: Module.exists_basis_of_span_of_flat, Localization.AtPrime, KaehlerDifferential.span_range_map_derivation_of_isLocalization, Ideal.primeCompl
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
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 : 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
h₁ :
  ∀ (i : κ),
    Eq (α := Ω[Localization.AtPrime p⁄R])
      ((eₚ ∘ₗ Finsupp.lsingle i : (a : Localization.AtPrime p) → Ω[Localization.AtPrime p⁄R]) 1)
      (((↑b.repr.symm : (κ →₀ Localization.AtPrime p) →ₗ[Localization.AtPrime p] Ω[Localization.AtPrime p⁄R]) ∘ₗ
            Finsupp.lsingle i :
          (a : Localization.AtPrime p) → Ω[Localization.AtPrime p⁄R])
        1)
⊢ eₚ = (↑b.repr.symm : (κ →₀ Localization.AtPrime p) →ₗ[Localization.AtPrime p] Ω[Localization.AtPrime p⁄R])

Tactic:
ext i
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
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 : 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
i : κ
⊢ Eq (α := Ω[Localization.AtPrime p⁄R])
    ((eₚ ∘ₗ Finsupp.lsingle i : (a : Localization.AtPrime p) → Ω[Localization.AtPrime p⁄R]) 1 :
      Ω[Localization.AtPrime p⁄R])
    ((((IsLocalizedModule.map p.primeCompl l₁ l₂ :
                (a : (κ →₀ S) →ₗ[S] Ω[S⁄R]) → (κ →₀ Localization.AtPrime p) →ₗ[S] Ω[Localization.AtPrime p⁄R])
              e :
            (κ →₀ Localization.AtPrime p) →ₗ[S] Ω[Localization.AtPrime p⁄R]) :
          (a : κ →₀ Localization.AtPrime p) → Ω[Localization.AtPrime p⁄R])
        ((l₁ : (a : κ →₀ S) → κ →₀ Localization.AtPrime p) (Finsupp.single i 1)) :
      Ω[Localization.AtPrime p⁄R])

Tactic:
simp [eₚ, -IsLocalizedModule.map_apply, l₁]

Premises used: IsLocalizedModule.map_apply
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
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 : 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
i : κ
⊢ Eq (α := Ω[Localization.AtPrime p⁄R])
    ((((IsLocalizedModule.map p.primeCompl l₁ l₂ :
                (a : (κ →₀ S) →ₗ[S] Ω[S⁄R]) → (κ →₀ Localization.AtPrime p) →ₗ[S] Ω[Localization.AtPrime p⁄R])
              e :
            (κ →₀ Localization.AtPrime p) →ₗ[S] Ω[Localization.AtPrime p⁄R]) :
          (a : κ →₀ Localization.AtPrime p) → Ω[Localization.AtPrime p⁄R])
        ((l₁ : (a : κ →₀ S) → κ →₀ Localization.AtPrime p) (Finsupp.single i 1)) :
      Ω[Localization.AtPrime p⁄R])
    (((↑b.repr.symm : (κ →₀ Localization.AtPrime p) →ₗ[Localization.AtPrime p] Ω[Localization.AtPrime p⁄R]) ∘ₗ
            Finsupp.lsingle i :
          (a : Localization.AtPrime p) → Ω[Localization.AtPrime p⁄R])
        1 :
      Ω[Localization.AtPrime p⁄R])

Tactic:
simp [l₂, e, hb]
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
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 : 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
⊢ eₚ = (↑b.repr.symm : (κ →₀ Localization.AtPrime p) →ₗ[Localization.AtPrime p] Ω[Localization.AtPrime p⁄R])

Tactic:
have : eₚ = b.repr.symm := by
    ext i
    trans IsLocalizedModule.map p.primeCompl l₁ l₂ e <| l₁ <| Finsupp.single i 1
    · simp [eₚ, -IsLocalizedModule.map_apply, l₁]
    · simp [l₂, e, hb]
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
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 : 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 : eₚ = (↑b.repr.symm : (κ →₀ Localization.AtPrime p) →ₗ[Localization.AtPrime p] Ω[Localization.AtPrime p⁄R])
⊢ Function.Bijective (α := κ →₀ Localization.AtPrime p) (β := Ω[Localization.AtPrime p⁄R])
    (⇑eₚ : (a : κ →₀ Localization.AtPrime p) → Ω[Localization.AtPrime p⁄R])

Tactic:
have heₚ : Function.Bijective eₚ := this ▸ b.repr.symm.bijective
-- Module: Mathlib.RingTheory.Smooth.StandardSmoothOfFree
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 : 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 : 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])
⊢ Finite κ

Tactic:
have : Finite κ := Module.Finite.finite_basis b