-- Mathlib/RingTheory/DedekindDomain/IntegralClosure.lean
theorem integralClosure_le_span_dualBasis [Algebra.IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    Subalgebra.toSubmodule (integralClosure A L) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b)

Proof state:
A : Type u_1
K : Type u_2
inst✝¹² : CommRing A
inst✝¹¹ : Field K
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_3
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra A L
inst✝⁵ : IsScalarTower A K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra.IsSeparable K L
ι : Type u_5
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
⊢ Subalgebra.toSubmodule (integralClosure A L) ≤ Submodule.span A (Set.range ⇑((traceForm K L).dualBasis ⋯ b))

Tactic:
refine le_trans ?_ (IsIntegralClosure.range_le_span_dualBasis (integralClosure A L) b hb_int)

Result:
A : Type u_1
K : Type u_2
inst✝¹² : CommRing A
inst✝¹¹ : Field K
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_3
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra A L
inst✝⁵ : IsScalarTower A K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra.IsSeparable K L
ι : Type u_5
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
⊢ Subalgebra.toSubmodule (integralClosure A L) ≤ LinearMap.range (↑A (Algebra.linearMap (↥(integralClosure A L)) L))

Proof state:
A : Type u_1
K : Type u_2
inst✝¹² : CommRing A
inst✝¹¹ : Field K
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_3
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra A L
inst✝⁵ : IsScalarTower A K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra.IsSeparable K L
ι : Type u_5
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
x : L
hx : x ∈ Subalgebra.toSubmodule (integralClosure A L)
⊢ x ∈ LinearMap.range (↑A (Algebra.linearMap (↥(integralClosure A L)) L))

Tactic:
exact ⟨⟨x, hx⟩, rfl⟩

Result:
no goals

Proof state:
A : Type u_1
K : Type u_2
inst✝¹² : CommRing A
inst✝¹¹ : Field K
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_3
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra A L
inst✝⁵ : IsScalarTower A K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra.IsSeparable K L
ι : Type u_5
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
⊢ Subalgebra.toSubmodule (integralClosure A L) ≤ LinearMap.range (↑A (Algebra.linearMap (↥(integralClosure A L)) L))

Tactic:
intro x hx

Result:
A : Type u_1
K : Type u_2
inst✝¹² : CommRing A
inst✝¹¹ : Field K
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_3
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra A L
inst✝⁵ : IsScalarTower A K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra.IsSeparable K L
ι : Type u_5
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
x : L
hx : x ∈ Subalgebra.toSubmodule (integralClosure A L)
⊢ x ∈ LinearMap.range (↑A (Algebra.linearMap (↥(integralClosure A L)) L))