l3lab/ntp-mathlib huggingface dataset:
theorem IsIntegralClosure.isLocalization (hKL : Algebra.IsAlgebraic K L) :
    IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L := by
  haveI : IsDomain C :=
    (IsIntegralClosure.equiv A C L (integralClosure A L)).toMulEquiv.isDomain (integralClosure A L)
  haveI : NoZeroSMulDivisors A L := NoZeroSMulDivisors.trans A K L
  haveI : NoZeroSMulDivisors A C := IsIntegralClosure.noZeroSMulDivisors A L
  refine' ⟨_, fun z => _, fun {x y} h => ⟨1, _⟩⟩
  · rintro ⟨_, x, hx, rfl⟩
    

Proof state:
case refine'_1.mk.intro.intro
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing A
inst✝¹² : Field K
inst✝¹¹ : IsDomain A
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_4
inst✝⁸ : Field L
C : Type u_5
inst✝⁷ : CommRing C
inst✝⁶ : Algebra K L
inst✝⁵ : Algebra A L
inst✝⁴ : IsScalarTower A K L
inst✝³ : Algebra C L
inst✝² : IsIntegralClosure C A L
inst✝¹ : Algebra A C
inst✝ : IsScalarTower A C L
hKL : Algebra.IsAlgebraic K L
this✝¹ : IsDomain C
this✝ : NoZeroSMulDivisors A L
this : NoZeroSMulDivisors A C
x : A
hx : x ∈ ↑A⁰
⊢ IsUnit
    ((algebraMap C L)
      ↑{ val := (algebraMap A C) x, property := (_ : ∃ a ∈ ↑A⁰, (algebraMap A C) a = (algebraMap A C) x) })

Next tactic:
rw [isUnit_iff_ne_zero, map_ne_zero_iff _ (IsIntegralClosure.algebraMap_injective C A L),
      Subtype.coe_mk, map_ne_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective A C)]
theorem IsIntegralClosure.isLocalization (hKL : Algebra.IsAlgebraic K L) :
    IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L := by
  haveI : IsDomain C :=
    (IsIntegralClosure.equiv A C L (integralClosure A L)).toMulEquiv.isDomain (integralClosure A L)
  haveI : NoZeroSMulDivisors A L := NoZeroSMulDivisors.trans A K L
  haveI : NoZeroSMulDivisors A C := IsIntegralClosure.noZeroSMulDivisors A L
  refine' ⟨_, fun z => _, fun {x y} h => ⟨1, _⟩⟩
  · rintro ⟨_, x, hx, rfl⟩
    rw [isUnit_iff_ne_zero, map_ne_zero_iff _ (IsIntegralClosure.algebraMap_injective C A L),
      Subtype.coe_mk, map_ne_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective A C)]
    

Proof state:
case refine'_1.mk.intro.intro
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing A
inst✝¹² : Field K
inst✝¹¹ : IsDomain A
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_4
inst✝⁸ : Field L
C : Type u_5
inst✝⁷ : CommRing C
inst✝⁶ : Algebra K L
inst✝⁵ : Algebra A L
inst✝⁴ : IsScalarTower A K L
inst✝³ : Algebra C L
inst✝² : IsIntegralClosure C A L
inst✝¹ : Algebra A C
inst✝ : IsScalarTower A C L
hKL : Algebra.IsAlgebraic K L
this✝¹ : IsDomain C
this✝ : NoZeroSMulDivisors A L
this : NoZeroSMulDivisors A C
x : A
hx : x ∈ ↑A⁰
⊢ x ≠ 0

Next tactic:
exact mem_nonZeroDivisors_iff_ne_zero.mp hx
theorem IsIntegralClosure.isLocalization (hKL : Algebra.IsAlgebraic K L) :
    IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L := by
  haveI : IsDomain C :=
    (IsIntegralClosure.equiv A C L (integralClosure A L)).toMulEquiv.isDomain (integralClosure A L)
  haveI : NoZeroSMulDivisors A L := NoZeroSMulDivisors.trans A K L
  haveI : NoZeroSMulDivisors A C := IsIntegralClosure.noZeroSMulDivisors A L
  refine' ⟨_, fun z => _, fun {x y} h => ⟨1, _⟩⟩
  · rintro ⟨_, x, hx, rfl⟩
    rw [isUnit_iff_ne_zero, map_ne_zero_iff _ (IsIntegralClosure.algebraMap_injective C A L),
      Subtype.coe_mk, map_ne_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective A C)]
    exact mem_nonZeroDivisors_iff_ne_zero.mp hx
  · 

Proof state:
case refine'_2
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing A
inst✝¹² : Field K
inst✝¹¹ : IsDomain A
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_4
inst✝⁸ : Field L
C : Type u_5
inst✝⁷ : CommRing C
inst✝⁶ : Algebra K L
inst✝⁵ : Algebra A L
inst✝⁴ : IsScalarTower A K L
inst✝³ : Algebra C L
inst✝² : IsIntegralClosure C A L
inst✝¹ : Algebra A C
inst✝ : IsScalarTower A C L
hKL : Algebra.IsAlgebraic K L
this✝¹ : IsDomain C
this✝ : NoZeroSMulDivisors A L
this : NoZeroSMulDivisors A C
z : L
⊢ ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1

Next tactic:
obtain ⟨m, hm⟩ :=
      IsIntegral.exists_multiple_integral_of_isLocalization A⁰ z (hKL z).isIntegral
theorem IsIntegralClosure.isLocalization (hKL : Algebra.IsAlgebraic K L) :
    IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L := by
  haveI : IsDomain C :=
    (IsIntegralClosure.equiv A C L (integralClosure A L)).toMulEquiv.isDomain (integralClosure A L)
  haveI : NoZeroSMulDivisors A L := NoZeroSMulDivisors.trans A K L
  haveI : NoZeroSMulDivisors A C := IsIntegralClosure.noZeroSMulDivisors A L
  refine' ⟨_, fun z => _, fun {x y} h => ⟨1, _⟩⟩
  · rintro ⟨_, x, hx, rfl⟩
    rw [isUnit_iff_ne_zero, map_ne_zero_iff _ (IsIntegralClosure.algebraMap_injective C A L),
      Subtype.coe_mk, map_ne_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective A C)]
    exact mem_nonZeroDivisors_iff_ne_zero.mp hx
  · obtain ⟨m, hm⟩ :=
      IsIntegral.exists_multiple_integral_of_isLocalization A⁰ z (hKL z).isIntegral
    

Proof state:
case refine'_2.intro
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing A
inst✝¹² : Field K
inst✝¹¹ : IsDomain A
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_4
inst✝⁸ : Field L
C : Type u_5
inst✝⁷ : CommRing C
inst✝⁶ : Algebra K L
inst✝⁵ : Algebra A L
inst✝⁴ : IsScalarTower A K L
inst✝³ : Algebra C L
inst✝² : IsIntegralClosure C A L
inst✝¹ : Algebra A C
inst✝ : IsScalarTower A C L
hKL : Algebra.IsAlgebraic K L
this✝¹ : IsDomain C
this✝ : NoZeroSMulDivisors A L
this : NoZeroSMulDivisors A C
z : L
m : ↥A⁰
hm : IsIntegral A (m • z)
⊢ ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1

Next tactic:
obtain ⟨x, hx⟩ : ∃ x, algebraMap C L x = m • z := IsIntegralClosure.isIntegral_iff.mp hm
theorem IsIntegralClosure.isLocalization (hKL : Algebra.IsAlgebraic K L) :
    IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L := by
  haveI : IsDomain C :=
    (IsIntegralClosure.equiv A C L (integralClosure A L)).toMulEquiv.isDomain (integralClosure A L)
  haveI : NoZeroSMulDivisors A L := NoZeroSMulDivisors.trans A K L
  haveI : NoZeroSMulDivisors A C := IsIntegralClosure.noZeroSMulDivisors A L
  refine' ⟨_, fun z => _, fun {x y} h => ⟨1, _⟩⟩
  · rintro ⟨_, x, hx, rfl⟩
    rw [isUnit_iff_ne_zero, map_ne_zero_iff _ (IsIntegralClosure.algebraMap_injective C A L),
      Subtype.coe_mk, map_ne_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective A C)]
    exact mem_nonZeroDivisors_iff_ne_zero.mp hx
  · obtain ⟨m, hm⟩ :=
      IsIntegral.exists_multiple_integral_of_isLocalization A⁰ z (hKL z).isIntegral
    obtain ⟨x, hx⟩ : ∃ x, algebraMap C L x = m • z := IsIntegralClosure.isIntegral_iff.mp hm
    

Proof state:
case refine'_2.intro.intro
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing A
inst✝¹² : Field K
inst✝¹¹ : IsDomain A
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_4
inst✝⁸ : Field L
C : Type u_5
inst✝⁷ : CommRing C
inst✝⁶ : Algebra K L
inst✝⁵ : Algebra A L
inst✝⁴ : IsScalarTower A K L
inst✝³ : Algebra C L
inst✝² : IsIntegralClosure C A L
inst✝¹ : Algebra A C
inst✝ : IsScalarTower A C L
hKL : Algebra.IsAlgebraic K L
this✝¹ : IsDomain C
this✝ : NoZeroSMulDivisors A L
this : NoZeroSMulDivisors A C
z : L
m : ↥A⁰
hm : IsIntegral A (m • z)
x : C
hx : (algebraMap C L) x = m • z
⊢ ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1

Next tactic:
refine' ⟨⟨x, algebraMap A C m, m, SetLike.coe_mem m, rfl⟩, _⟩
theorem IsIntegralClosure.isLocalization (hKL : Algebra.IsAlgebraic K L) :
    IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L := by
  haveI : IsDomain C :=
    (IsIntegralClosure.equiv A C L (integralClosure A L)).toMulEquiv.isDomain (integralClosure A L)
  haveI : NoZeroSMulDivisors A L := NoZeroSMulDivisors.trans A K L
  haveI : NoZeroSMulDivisors A C := IsIntegralClosure.noZeroSMulDivisors A L
  refine' ⟨_, fun z => _, fun {x y} h => ⟨1, _⟩⟩
  · rintro ⟨_, x, hx, rfl⟩
    rw [isUnit_iff_ne_zero, map_ne_zero_iff _ (IsIntegralClosure.algebraMap_injective C A L),
      Subtype.coe_mk, map_ne_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective A C)]
    exact mem_nonZeroDivisors_iff_ne_zero.mp hx
  · obtain ⟨m, hm⟩ :=
      IsIntegral.exists_multiple_integral_of_isLocalization A⁰ z (hKL z).isIntegral
    obtain ⟨x, hx⟩ : ∃ x, algebraMap C L x = m • z := IsIntegralClosure.isIntegral_iff.mp hm
    refine' ⟨⟨x, algebraMap A C m, m, SetLike.coe_mem m, rfl⟩, _⟩
    

Proof state:
case refine'_2.intro.intro
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing A
inst✝¹² : Field K
inst✝¹¹ : IsDomain A
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_4
inst✝⁸ : Field L
C : Type u_5
inst✝⁷ : CommRing C
inst✝⁶ : Algebra K L
inst✝⁵ : Algebra A L
inst✝⁴ : IsScalarTower A K L
inst✝³ : Algebra C L
inst✝² : IsIntegralClosure C A L
inst✝¹ : Algebra A C
inst✝ : IsScalarTower A C L
hKL : Algebra.IsAlgebraic K L
this✝¹ : IsDomain C
this✝ : NoZeroSMulDivisors A L
this : NoZeroSMulDivisors A C
z : L
m : ↥A⁰
hm : IsIntegral A (m • z)
x : C
hx : (algebraMap C L) x = m • z
⊢ z *
      (algebraMap C L)
        ↑(x, { val := (algebraMap A C) ↑m, property := (_ : ∃ a ∈ ↑A⁰, (algebraMap A C) a = (algebraMap A C) ↑m) }).2 =
    (algebraMap C L)
      (x, { val := (algebraMap A C) ↑m, property := (_ : ∃ a ∈ ↑A⁰, (algebraMap A C) a = (algebraMap A C) ↑m) }).1

Next tactic:
rw [Subtype.coe_mk, ← IsScalarTower.algebraMap_apply, hx, mul_comm, Submonoid.smul_def,
      smul_def]
theorem IsIntegralClosure.isLocalization (hKL : Algebra.IsAlgebraic K L) :
    IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L := by
  haveI : IsDomain C :=
    (IsIntegralClosure.equiv A C L (integralClosure A L)).toMulEquiv.isDomain (integralClosure A L)
  haveI : NoZeroSMulDivisors A L := NoZeroSMulDivisors.trans A K L
  haveI : NoZeroSMulDivisors A C := IsIntegralClosure.noZeroSMulDivisors A L
  refine' ⟨_, fun z => _, fun {x y} h => ⟨1, _⟩⟩
  · rintro ⟨_, x, hx, rfl⟩
    rw [isUnit_iff_ne_zero, map_ne_zero_iff _ (IsIntegralClosure.algebraMap_injective C A L),
      Subtype.coe_mk, map_ne_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective A C)]
    exact mem_nonZeroDivisors_iff_ne_zero.mp hx
  · obtain ⟨m, hm⟩ :=
      IsIntegral.exists_multiple_integral_of_isLocalization A⁰ z (hKL z).isIntegral
    obtain ⟨x, hx⟩ : ∃ x, algebraMap C L x = m • z := IsIntegralClosure.isIntegral_iff.mp hm
    refine' ⟨⟨x, algebraMap A C m, m, SetLike.coe_mem m, rfl⟩, _⟩
    rw [Subtype.coe_mk, ← IsScalarTower.algebraMap_apply, hx, mul_comm, Submonoid.smul_def,
      smul_def]
  · 

Proof state:
case refine'_3
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing A
inst✝¹² : Field K
inst✝¹¹ : IsDomain A
inst✝¹⁰ : Algebra A K
inst✝⁹ : IsFractionRing A K
L : Type u_4
inst✝⁸ : Field L
C : Type u_5
inst✝⁷ : CommRing C
inst✝⁶ : Algebra K L
inst✝⁵ : Algebra A L
inst✝⁴ : IsScalarTower A K L
inst✝³ : Algebra C L
inst✝² : IsIntegralClosure C A L
inst✝¹ : Algebra A C
inst✝ : IsScalarTower A C L
hKL : Algebra.IsAlgebraic K L
this✝¹ : IsDomain C
this✝ : NoZeroSMulDivisors A L
this : NoZeroSMulDivisors A C
x y : C
h : (algebraMap C L) x = (algebraMap C L) y
⊢ ↑1 * x = ↑1 * y

Next tactic:
simp only [IsIntegralClosure.algebraMap_injective C A L h]
theorem IsIntegralClosure.range_le_span_dualBasis [IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    LinearMap.range ((Algebra.linearMap C L).restrictScalars A) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b) := by
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : IsDomain A
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : IsFractionRing A K
L : Type u_4
inst✝¹³ : Field L
C : Type u_5
inst✝¹² : CommRing C
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : Algebra C L
inst✝⁷ : IsIntegralClosure C A L
inst✝⁶ : Algebra A C
inst✝⁵ : IsScalarTower A C L
inst✝⁴ : FiniteDimensional K L
inst✝³ : IsSeparable K L
ι : Type u_6
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
⊢ LinearMap.range (↑A (Algebra.linearMap C L)) ≤
    Submodule.span A (Set.range ⇑(BilinForm.dualBasis (traceForm K L) (_ : BilinForm.Nondegenerate (traceForm K L)) b))

Next tactic:
rw [← BilinForm.dualSubmodule_span_of_basis, ← BilinForm.le_flip_dualSubmodule,
    Submodule.span_le]
theorem IsIntegralClosure.range_le_span_dualBasis [IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    LinearMap.range ((Algebra.linearMap C L).restrictScalars A) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b) := by
  rw [← BilinForm.dualSubmodule_span_of_basis, ← BilinForm.le_flip_dualSubmodule,
    Submodule.span_le]
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : IsDomain A
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : IsFractionRing A K
L : Type u_4
inst✝¹³ : Field L
C : Type u_5
inst✝¹² : CommRing C
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : Algebra C L
inst✝⁷ : IsIntegralClosure C A L
inst✝⁶ : Algebra A C
inst✝⁵ : IsScalarTower A C L
inst✝⁴ : FiniteDimensional K L
inst✝³ : IsSeparable K L
ι : Type u_6
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
⊢ Set.range ⇑b ⊆
    ↑(BilinForm.dualSubmodule (BilinForm.flip (traceForm K L)) (LinearMap.range (↑A (Algebra.linearMap C L))))

Next tactic:
rintro _ ⟨i, rfl⟩ _ ⟨y, rfl⟩
theorem IsIntegralClosure.range_le_span_dualBasis [IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    LinearMap.range ((Algebra.linearMap C L).restrictScalars A) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b) := by
  rw [← BilinForm.dualSubmodule_span_of_basis, ← BilinForm.le_flip_dualSubmodule,
    Submodule.span_le]
  rintro _ ⟨i, rfl⟩ _ ⟨y, rfl⟩
  

Proof state:
case intro.intro
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : IsDomain A
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : IsFractionRing A K
L : Type u_4
inst✝¹³ : Field L
C : Type u_5
inst✝¹² : CommRing C
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : Algebra C L
inst✝⁷ : IsIntegralClosure C A L
inst✝⁶ : Algebra A C
inst✝⁵ : IsScalarTower A C L
inst✝⁴ : FiniteDimensional K L
inst✝³ : IsSeparable K L
ι : Type u_6
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
i : ι
y : C
⊢ BilinForm.bilin (BilinForm.flip (traceForm K L)) (b i) ((↑A (Algebra.linearMap C L)) y) ∈ 1

Next tactic:
simp only [LinearMap.coe_restrictScalars, linearMap_apply, BilinForm.flip_apply, traceForm_apply]
theorem IsIntegralClosure.range_le_span_dualBasis [IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    LinearMap.range ((Algebra.linearMap C L).restrictScalars A) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b) := by
  rw [← BilinForm.dualSubmodule_span_of_basis, ← BilinForm.le_flip_dualSubmodule,
    Submodule.span_le]
  rintro _ ⟨i, rfl⟩ _ ⟨y, rfl⟩
  simp only [LinearMap.coe_restrictScalars, linearMap_apply, BilinForm.flip_apply, traceForm_apply]
  

Proof state:
case intro.intro
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : IsDomain A
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : IsFractionRing A K
L : Type u_4
inst✝¹³ : Field L
C : Type u_5
inst✝¹² : CommRing C
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : Algebra C L
inst✝⁷ : IsIntegralClosure C A L
inst✝⁶ : Algebra A C
inst✝⁵ : IsScalarTower A C L
inst✝⁴ : FiniteDimensional K L
inst✝³ : IsSeparable K L
ι : Type u_6
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
i : ι
y : C
⊢ (trace K L) ((algebraMap C L) y * b i) ∈ 1

Next tactic:
refine IsIntegrallyClosed.isIntegral_iff.mp ?_
theorem IsIntegralClosure.range_le_span_dualBasis [IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    LinearMap.range ((Algebra.linearMap C L).restrictScalars A) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b) := by
  rw [← BilinForm.dualSubmodule_span_of_basis, ← BilinForm.le_flip_dualSubmodule,
    Submodule.span_le]
  rintro _ ⟨i, rfl⟩ _ ⟨y, rfl⟩
  simp only [LinearMap.coe_restrictScalars, linearMap_apply, BilinForm.flip_apply, traceForm_apply]
  refine IsIntegrallyClosed.isIntegral_iff.mp ?_
  

Proof state:
case intro.intro
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : IsDomain A
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : IsFractionRing A K
L : Type u_4
inst✝¹³ : Field L
C : Type u_5
inst✝¹² : CommRing C
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : Algebra C L
inst✝⁷ : IsIntegralClosure C A L
inst✝⁶ : Algebra A C
inst✝⁵ : IsScalarTower A C L
inst✝⁴ : FiniteDimensional K L
inst✝³ : IsSeparable K L
ι : Type u_6
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
b : Basis ι K L
hb_int : ∀ (i : ι), IsIntegral A (b i)
inst✝ : IsIntegrallyClosed A
i : ι
y : C
⊢ IsIntegral A ((trace K L) ((algebraMap C L) y * b i))

Next tactic:
exact isIntegral_trace ((IsIntegralClosure.isIntegral A L y).algebraMap.mul (hb_int i))
theorem integralClosure_le_span_dualBasis [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) := by
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : IsDomain A
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : IsFractionRing A K
L : Type u_4
inst✝¹³ : Field L
C : Type u_5
inst✝¹² : CommRing C
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : Algebra C L
inst✝⁷ : IsIntegralClosure C A L
inst✝⁶ : Algebra A C
inst✝⁵ : IsScalarTower A C L
inst✝⁴ : FiniteDimensional K L
inst✝³ : IsSeparable K L
ι : Type u_6
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 ⇑(BilinForm.dualBasis (traceForm K L) (_ : BilinForm.Nondegenerate (traceForm K L)) b))

Next tactic:
refine' le_trans _ (IsIntegralClosure.range_le_span_dualBasis (integralClosure A L) b hb_int)
theorem integralClosure_le_span_dualBasis [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) := by
  refine' le_trans _ (IsIntegralClosure.range_le_span_dualBasis (integralClosure A L) b hb_int)
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : IsDomain A
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : IsFractionRing A K
L : Type u_4
inst✝¹³ : Field L
C : Type u_5
inst✝¹² : CommRing C
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : Algebra C L
inst✝⁷ : IsIntegralClosure C A L
inst✝⁶ : Algebra A C
inst✝⁵ : IsScalarTower A C L
inst✝⁴ : FiniteDimensional K L
inst✝³ : IsSeparable K L
ι : Type u_6
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))

Next tactic:
intro x hx
theorem integralClosure_le_span_dualBasis [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) := by
  refine' le_trans _ (IsIntegralClosure.range_le_span_dualBasis (integralClosure A L) b hb_int)
  intro x hx
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁹ : CommRing R
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : IsDomain A
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : IsFractionRing A K
L : Type u_4
inst✝¹³ : Field L
C : Type u_5
inst✝¹² : CommRing C
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : Algebra C L
inst✝⁷ : IsIntegralClosure C A L
inst✝⁶ : Algebra A C
inst✝⁵ : IsScalarTower A C L
inst✝⁴ : FiniteDimensional K L
inst✝³ : IsSeparable K L
ι : Type u_6
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))

Next tactic:
exact ⟨⟨x, hx⟩, rfl⟩
/-- Send a set of `x`s in a finite extension `L` of the fraction field of `R`
to `(y : R) • x ∈ integralClosure R L`. -/
theorem exists_integral_multiples (s : Finset L) :
    ∃ (y : _) (_ : y ≠ (0 : A)), ∀ x ∈ s, IsIntegral A (y • x) := by
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing A
inst✝¹³ : Field K
inst✝¹² : IsDomain A
inst✝¹¹ : Algebra A K
inst✝¹⁰ : IsFractionRing A K
L : Type u_4
inst✝⁹ : Field L
C : Type u_5
inst✝⁸ : CommRing C
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra A L
inst✝⁵ : IsScalarTower A K L
inst✝⁴ : Algebra C L
inst✝³ : IsIntegralClosure C A L
inst✝² : Algebra A C
inst✝¹ : IsScalarTower A C L
inst✝ : FiniteDimensional K L
s : Finset L
⊢ ∃ y, ∃ (_ : y ≠ 0), ∀ x ∈ s, IsIntegral A (y • x)

Next tactic:
haveI := Classical.decEq L
/-- Send a set of `x`s in a finite extension `L` of the fraction field of `R`
to `(y : R) • x ∈ integralClosure R L`. -/
theorem exists_integral_multiples (s : Finset L) :
    ∃ (y : _) (_ : y ≠ (0 : A)), ∀ x ∈ s, IsIntegral A (y • x) := by
  haveI := Classical.decEq L
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing A
inst✝¹³ : Field K
inst✝¹² : IsDomain A
inst✝¹¹ : Algebra A K
inst✝¹⁰ : IsFractionRing A K
L : Type u_4
inst✝⁹ : Field L
C : Type u_5
inst✝⁸ : CommRing C
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra A L
inst✝⁵ : IsScalarTower A K L
inst✝⁴ : Algebra C L
inst✝³ : IsIntegralClosure C A L
inst✝² : Algebra A C
inst✝¹ : IsScalarTower A C L
inst✝ : FiniteDimensional K L
s : Finset L
this : DecidableEq L
⊢ ∃ y, ∃ (_ : y ≠ 0), ∀ x ∈ s, IsIntegral A (y • x)

Next tactic:
refine' s.induction _ _
/-- Send a set of `x`s in a finite extension `L` of the fraction field of `R`
to `(y : R) • x ∈ integralClosure R L`. -/
theorem exists_integral_multiples (s : Finset L) :
    ∃ (y : _) (_ : y ≠ (0 : A)), ∀ x ∈ s, IsIntegral A (y • x) := by
  haveI := Classical.decEq L
  refine' s.induction _ _
  · 

Proof state:
case refine'_1
R : Type u_1
A : Type u_2
K : Type u_3
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing A
inst✝¹³ : Field K
inst✝¹² : IsDomain A
inst✝¹¹ : Algebra A K
inst✝¹⁰ : IsFractionRing A K
L : Type u_4
inst✝⁹ : Field L
C : Type u_5
inst✝⁸ : CommRing C
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra A L
inst✝⁵ : IsScalarTower A K L
inst✝⁴ : Algebra C L
inst✝³ : IsIntegralClosure C A L
inst✝² : Algebra A C
inst✝¹ : IsScalarTower A C L
inst✝ : FiniteDimensional K L
s : Finset L
this : DecidableEq L
⊢ ∃ y, ∃ (_ : y ≠ 0), ∀ x ∈ ∅, IsIntegral A (y • x)

Next tactic:
use 1, one_ne_zero