l3lab/ntp-mathlib huggingface dataset:
lemma map_equiv_traceDual [NoZeroSMulDivisors A B] (I : Submodule B (FractionRing B)) :
    (traceDual A (FractionRing A) I).map (FractionRing.algEquiv B L) =
      traceDual A K (I.map (FractionRing.algEquiv B L)) := by
  show Submodule.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap _ =
    traceDual A K (I.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap)
  rw [Submodule.map_equiv_eq_comap_symm, Submodule.map_equiv_eq_comap_symm]
  ext x
  simp only [AlgEquiv.toLinearEquiv_symm, AlgEquiv.toLinearEquiv_toLinearMap,
    traceDual, traceForm_apply, Submodule.mem_comap, AlgEquiv.toLinearMap_apply,
    Submodule.mem_mk, AddSubmonoid.mem_mk, AddSubsemigroup.mem_mk, Set.mem_setOf_eq]
  apply (FractionRing.algEquiv B L).forall_congr
  simp only [restrictScalars_mem, traceForm_apply, AlgEquiv.toEquiv_eq_coe,
    EquivLike.coe_coe, mem_comap, AlgEquiv.toLinearMap_apply, AlgEquiv.symm_apply_apply]
  refine fun {y} ↦ (forall_congr' $ fun hy ↦ ?_)
  rw [Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
    (FractionRing.algEquiv B L).toRingEquiv]
  swap
  · apply IsLocalization.ringHom_ext (M := A⁰); 

Proof state:
case h.he.h
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁹ : CommRing A
inst✝¹⁸ : Field K
inst✝¹⁷ : CommRing B
inst✝¹⁶ : Field L
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : Algebra B L
inst✝¹³ : Algebra A B
inst✝¹² : Algebra K L
inst✝¹¹ : Algebra A L
inst✝¹⁰ : IsScalarTower A K L
inst✝⁹ : IsScalarTower A B L
inst✝⁸ : IsDomain A
inst✝⁷ : IsDomain B
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : NoZeroSMulDivisors A B
I : Submodule B (FractionRing B)
x : L
y : FractionRing B
hy : y ∈ I
⊢ RingHom.comp (RingHom.comp (algebraMap K L) ↑(AlgEquiv.toRingEquiv (FractionRing.algEquiv A K)))
      (algebraMap A (FractionRing A)) =
    RingHom.comp
      (RingHom.comp (↑(AlgEquiv.toRingEquiv (FractionRing.algEquiv B L)))
        (algebraMap (FractionRing A) (FractionRing B)))
      (algebraMap A (FractionRing A))

Next tactic:
ext
lemma map_equiv_traceDual [NoZeroSMulDivisors A B] (I : Submodule B (FractionRing B)) :
    (traceDual A (FractionRing A) I).map (FractionRing.algEquiv B L) =
      traceDual A K (I.map (FractionRing.algEquiv B L)) := by
  show Submodule.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap _ =
    traceDual A K (I.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap)
  rw [Submodule.map_equiv_eq_comap_symm, Submodule.map_equiv_eq_comap_symm]
  ext x
  simp only [AlgEquiv.toLinearEquiv_symm, AlgEquiv.toLinearEquiv_toLinearMap,
    traceDual, traceForm_apply, Submodule.mem_comap, AlgEquiv.toLinearMap_apply,
    Submodule.mem_mk, AddSubmonoid.mem_mk, AddSubsemigroup.mem_mk, Set.mem_setOf_eq]
  apply (FractionRing.algEquiv B L).forall_congr
  simp only [restrictScalars_mem, traceForm_apply, AlgEquiv.toEquiv_eq_coe,
    EquivLike.coe_coe, mem_comap, AlgEquiv.toLinearMap_apply, AlgEquiv.symm_apply_apply]
  refine fun {y} ↦ (forall_congr' $ fun hy ↦ ?_)
  rw [Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
    (FractionRing.algEquiv B L).toRingEquiv]
  swap
  · apply IsLocalization.ringHom_ext (M := A⁰); ext
    

Proof state:
case h.he.h.a
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁹ : CommRing A
inst✝¹⁸ : Field K
inst✝¹⁷ : CommRing B
inst✝¹⁶ : Field L
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : Algebra B L
inst✝¹³ : Algebra A B
inst✝¹² : Algebra K L
inst✝¹¹ : Algebra A L
inst✝¹⁰ : IsScalarTower A K L
inst✝⁹ : IsScalarTower A B L
inst✝⁸ : IsDomain A
inst✝⁷ : IsDomain B
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : NoZeroSMulDivisors A B
I : Submodule B (FractionRing B)
x : L
y : FractionRing B
hy : y ∈ I
x✝ : A
⊢ (RingHom.comp (RingHom.comp (algebraMap K L) ↑(AlgEquiv.toRingEquiv (FractionRing.algEquiv A K)))
        (algebraMap A (FractionRing A)))
      x✝ =
    (RingHom.comp
        (RingHom.comp (↑(AlgEquiv.toRingEquiv (FractionRing.algEquiv B L)))
          (algebraMap (FractionRing A) (FractionRing B)))
        (algebraMap A (FractionRing A)))
      x✝

Next tactic:
simp only [AlgEquiv.toRingEquiv_eq_coe, AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_comp,
      RingHom.coe_coe, Function.comp_apply, AlgEquiv.commutes, ← IsScalarTower.algebraMap_apply]
lemma map_equiv_traceDual [NoZeroSMulDivisors A B] (I : Submodule B (FractionRing B)) :
    (traceDual A (FractionRing A) I).map (FractionRing.algEquiv B L) =
      traceDual A K (I.map (FractionRing.algEquiv B L)) := by
  show Submodule.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap _ =
    traceDual A K (I.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap)
  rw [Submodule.map_equiv_eq_comap_symm, Submodule.map_equiv_eq_comap_symm]
  ext x
  simp only [AlgEquiv.toLinearEquiv_symm, AlgEquiv.toLinearEquiv_toLinearMap,
    traceDual, traceForm_apply, Submodule.mem_comap, AlgEquiv.toLinearMap_apply,
    Submodule.mem_mk, AddSubmonoid.mem_mk, AddSubsemigroup.mem_mk, Set.mem_setOf_eq]
  apply (FractionRing.algEquiv B L).forall_congr
  simp only [restrictScalars_mem, traceForm_apply, AlgEquiv.toEquiv_eq_coe,
    EquivLike.coe_coe, mem_comap, AlgEquiv.toLinearMap_apply, AlgEquiv.symm_apply_apply]
  refine fun {y} ↦ (forall_congr' $ fun hy ↦ ?_)
  rw [Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
    (FractionRing.algEquiv B L).toRingEquiv]
  swap
  · apply IsLocalization.ringHom_ext (M := A⁰); ext
    simp only [AlgEquiv.toRingEquiv_eq_coe, AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_comp,
      RingHom.coe_coe, Function.comp_apply, AlgEquiv.commutes, ← IsScalarTower.algebraMap_apply]
    

Proof state:
case h.he.h.a
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁹ : CommRing A
inst✝¹⁸ : Field K
inst✝¹⁷ : CommRing B
inst✝¹⁶ : Field L
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : Algebra B L
inst✝¹³ : Algebra A B
inst✝¹² : Algebra K L
inst✝¹¹ : Algebra A L
inst✝¹⁰ : IsScalarTower A K L
inst✝⁹ : IsScalarTower A B L
inst✝⁸ : IsDomain A
inst✝⁷ : IsDomain B
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : NoZeroSMulDivisors A B
I : Submodule B (FractionRing B)
x : L
y : FractionRing B
hy : y ∈ I
x✝ : A
⊢ (algebraMap A L) x✝ = (FractionRing.algEquiv B L) ((algebraMap A (FractionRing B)) x✝)

Next tactic:
rw [IsScalarTower.algebraMap_apply A B (FractionRing B), AlgEquiv.commutes,
      ← IsScalarTower.algebraMap_apply]
lemma map_equiv_traceDual [NoZeroSMulDivisors A B] (I : Submodule B (FractionRing B)) :
    (traceDual A (FractionRing A) I).map (FractionRing.algEquiv B L) =
      traceDual A K (I.map (FractionRing.algEquiv B L)) := by
  show Submodule.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap _ =
    traceDual A K (I.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap)
  rw [Submodule.map_equiv_eq_comap_symm, Submodule.map_equiv_eq_comap_symm]
  ext x
  simp only [AlgEquiv.toLinearEquiv_symm, AlgEquiv.toLinearEquiv_toLinearMap,
    traceDual, traceForm_apply, Submodule.mem_comap, AlgEquiv.toLinearMap_apply,
    Submodule.mem_mk, AddSubmonoid.mem_mk, AddSubsemigroup.mem_mk, Set.mem_setOf_eq]
  apply (FractionRing.algEquiv B L).forall_congr
  simp only [restrictScalars_mem, traceForm_apply, AlgEquiv.toEquiv_eq_coe,
    EquivLike.coe_coe, mem_comap, AlgEquiv.toLinearMap_apply, AlgEquiv.symm_apply_apply]
  refine fun {y} ↦ (forall_congr' $ fun hy ↦ ?_)
  rw [Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
    (FractionRing.algEquiv B L).toRingEquiv]
  swap
  · apply IsLocalization.ringHom_ext (M := A⁰); ext
    simp only [AlgEquiv.toRingEquiv_eq_coe, AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_comp,
      RingHom.coe_coe, Function.comp_apply, AlgEquiv.commutes, ← IsScalarTower.algebraMap_apply]
    rw [IsScalarTower.algebraMap_apply A B (FractionRing B), AlgEquiv.commutes,
      ← IsScalarTower.algebraMap_apply]
  

Proof state:
case h
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁹ : CommRing A
inst✝¹⁸ : Field K
inst✝¹⁷ : CommRing B
inst✝¹⁶ : Field L
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : Algebra B L
inst✝¹³ : Algebra A B
inst✝¹² : Algebra K L
inst✝¹¹ : Algebra A L
inst✝¹⁰ : IsScalarTower A K L
inst✝⁹ : IsScalarTower A B L
inst✝⁸ : IsDomain A
inst✝⁷ : IsDomain B
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : NoZeroSMulDivisors A B
I : Submodule B (FractionRing B)
x : L
y : FractionRing B
hy : y ∈ I
⊢ (RingEquiv.symm (AlgEquiv.toRingEquiv (FractionRing.algEquiv A K)))
        ((Algebra.trace K L)
          ((AlgEquiv.toRingEquiv (FractionRing.algEquiv B L)) ((AlgEquiv.symm (FractionRing.algEquiv B L)) x * y))) ∈
      1 ↔
    (Algebra.trace K L) (x * (FractionRing.algEquiv B L) y) ∈ 1

Next tactic:
simp only [AlgEquiv.toRingEquiv_eq_coe, _root_.map_mul, AlgEquiv.coe_ringEquiv,
    AlgEquiv.apply_symm_apply]
lemma map_equiv_traceDual [NoZeroSMulDivisors A B] (I : Submodule B (FractionRing B)) :
    (traceDual A (FractionRing A) I).map (FractionRing.algEquiv B L) =
      traceDual A K (I.map (FractionRing.algEquiv B L)) := by
  show Submodule.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap _ =
    traceDual A K (I.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap)
  rw [Submodule.map_equiv_eq_comap_symm, Submodule.map_equiv_eq_comap_symm]
  ext x
  simp only [AlgEquiv.toLinearEquiv_symm, AlgEquiv.toLinearEquiv_toLinearMap,
    traceDual, traceForm_apply, Submodule.mem_comap, AlgEquiv.toLinearMap_apply,
    Submodule.mem_mk, AddSubmonoid.mem_mk, AddSubsemigroup.mem_mk, Set.mem_setOf_eq]
  apply (FractionRing.algEquiv B L).forall_congr
  simp only [restrictScalars_mem, traceForm_apply, AlgEquiv.toEquiv_eq_coe,
    EquivLike.coe_coe, mem_comap, AlgEquiv.toLinearMap_apply, AlgEquiv.symm_apply_apply]
  refine fun {y} ↦ (forall_congr' $ fun hy ↦ ?_)
  rw [Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
    (FractionRing.algEquiv B L).toRingEquiv]
  swap
  · apply IsLocalization.ringHom_ext (M := A⁰); ext
    simp only [AlgEquiv.toRingEquiv_eq_coe, AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_comp,
      RingHom.coe_coe, Function.comp_apply, AlgEquiv.commutes, ← IsScalarTower.algebraMap_apply]
    rw [IsScalarTower.algebraMap_apply A B (FractionRing B), AlgEquiv.commutes,
      ← IsScalarTower.algebraMap_apply]
  simp only [AlgEquiv.toRingEquiv_eq_coe, _root_.map_mul, AlgEquiv.coe_ringEquiv,
    AlgEquiv.apply_symm_apply]
  

Proof state:
case h
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁹ : CommRing A
inst✝¹⁸ : Field K
inst✝¹⁷ : CommRing B
inst✝¹⁶ : Field L
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : Algebra B L
inst✝¹³ : Algebra A B
inst✝¹² : Algebra K L
inst✝¹¹ : Algebra A L
inst✝¹⁰ : IsScalarTower A K L
inst✝⁹ : IsScalarTower A B L
inst✝⁸ : IsDomain A
inst✝⁷ : IsDomain B
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : NoZeroSMulDivisors A B
I : Submodule B (FractionRing B)
x : L
y : FractionRing B
hy : y ∈ I
⊢ (RingEquiv.symm ↑(FractionRing.algEquiv A K)) ((Algebra.trace K L) (x * (FractionRing.algEquiv B L) y)) ∈ 1 ↔
    (Algebra.trace K L) (x * (FractionRing.algEquiv B L) y) ∈ 1

Next tactic:
show (FractionRing.algEquiv A K).symm _ ∈ (algebraMap A (FractionRing A)).range ↔ _
lemma map_equiv_traceDual [NoZeroSMulDivisors A B] (I : Submodule B (FractionRing B)) :
    (traceDual A (FractionRing A) I).map (FractionRing.algEquiv B L) =
      traceDual A K (I.map (FractionRing.algEquiv B L)) := by
  show Submodule.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap _ =
    traceDual A K (I.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap)
  rw [Submodule.map_equiv_eq_comap_symm, Submodule.map_equiv_eq_comap_symm]
  ext x
  simp only [AlgEquiv.toLinearEquiv_symm, AlgEquiv.toLinearEquiv_toLinearMap,
    traceDual, traceForm_apply, Submodule.mem_comap, AlgEquiv.toLinearMap_apply,
    Submodule.mem_mk, AddSubmonoid.mem_mk, AddSubsemigroup.mem_mk, Set.mem_setOf_eq]
  apply (FractionRing.algEquiv B L).forall_congr
  simp only [restrictScalars_mem, traceForm_apply, AlgEquiv.toEquiv_eq_coe,
    EquivLike.coe_coe, mem_comap, AlgEquiv.toLinearMap_apply, AlgEquiv.symm_apply_apply]
  refine fun {y} ↦ (forall_congr' $ fun hy ↦ ?_)
  rw [Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
    (FractionRing.algEquiv B L).toRingEquiv]
  swap
  · apply IsLocalization.ringHom_ext (M := A⁰); ext
    simp only [AlgEquiv.toRingEquiv_eq_coe, AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_comp,
      RingHom.coe_coe, Function.comp_apply, AlgEquiv.commutes, ← IsScalarTower.algebraMap_apply]
    rw [IsScalarTower.algebraMap_apply A B (FractionRing B), AlgEquiv.commutes,
      ← IsScalarTower.algebraMap_apply]
  simp only [AlgEquiv.toRingEquiv_eq_coe, _root_.map_mul, AlgEquiv.coe_ringEquiv,
    AlgEquiv.apply_symm_apply]
  show (FractionRing.algEquiv A K).symm _ ∈ (algebraMap A (FractionRing A)).range ↔ _
  

Proof state:
case h
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁹ : CommRing A
inst✝¹⁸ : Field K
inst✝¹⁷ : CommRing B
inst✝¹⁶ : Field L
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : Algebra B L
inst✝¹³ : Algebra A B
inst✝¹² : Algebra K L
inst✝¹¹ : Algebra A L
inst✝¹⁰ : IsScalarTower A K L
inst✝⁹ : IsScalarTower A B L
inst✝⁸ : IsDomain A
inst✝⁷ : IsDomain B
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : NoZeroSMulDivisors A B
I : Submodule B (FractionRing B)
x : L
y : FractionRing B
hy : y ∈ I
⊢ (AlgEquiv.symm (FractionRing.algEquiv A K)) ((Algebra.trace K L) (x * (FractionRing.algEquiv B L) y)) ∈
      RingHom.range (algebraMap A (FractionRing A)) ↔
    (Algebra.trace K L) (x * (FractionRing.algEquiv B L) y) ∈ 1

Next tactic:
rw [← (FractionRing.algEquiv A K).symm.toAlgHom.comp_algebraMap, ← RingHom.map_range,
    AlgEquiv.toAlgHom_eq_coe, AlgEquiv.coe_ringHom_commutes, Subring.mem_map_equiv]
lemma map_equiv_traceDual [NoZeroSMulDivisors A B] (I : Submodule B (FractionRing B)) :
    (traceDual A (FractionRing A) I).map (FractionRing.algEquiv B L) =
      traceDual A K (I.map (FractionRing.algEquiv B L)) := by
  show Submodule.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap _ =
    traceDual A K (I.map (FractionRing.algEquiv B L).toLinearEquiv.toLinearMap)
  rw [Submodule.map_equiv_eq_comap_symm, Submodule.map_equiv_eq_comap_symm]
  ext x
  simp only [AlgEquiv.toLinearEquiv_symm, AlgEquiv.toLinearEquiv_toLinearMap,
    traceDual, traceForm_apply, Submodule.mem_comap, AlgEquiv.toLinearMap_apply,
    Submodule.mem_mk, AddSubmonoid.mem_mk, AddSubsemigroup.mem_mk, Set.mem_setOf_eq]
  apply (FractionRing.algEquiv B L).forall_congr
  simp only [restrictScalars_mem, traceForm_apply, AlgEquiv.toEquiv_eq_coe,
    EquivLike.coe_coe, mem_comap, AlgEquiv.toLinearMap_apply, AlgEquiv.symm_apply_apply]
  refine fun {y} ↦ (forall_congr' $ fun hy ↦ ?_)
  rw [Algebra.trace_eq_of_equiv_equiv (FractionRing.algEquiv A K).toRingEquiv
    (FractionRing.algEquiv B L).toRingEquiv]
  swap
  · apply IsLocalization.ringHom_ext (M := A⁰); ext
    simp only [AlgEquiv.toRingEquiv_eq_coe, AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_comp,
      RingHom.coe_coe, Function.comp_apply, AlgEquiv.commutes, ← IsScalarTower.algebraMap_apply]
    rw [IsScalarTower.algebraMap_apply A B (FractionRing B), AlgEquiv.commutes,
      ← IsScalarTower.algebraMap_apply]
  simp only [AlgEquiv.toRingEquiv_eq_coe, _root_.map_mul, AlgEquiv.coe_ringEquiv,
    AlgEquiv.apply_symm_apply]
  show (FractionRing.algEquiv A K).symm _ ∈ (algebraMap A (FractionRing A)).range ↔ _
  rw [← (FractionRing.algEquiv A K).symm.toAlgHom.comp_algebraMap, ← RingHom.map_range,
    AlgEquiv.toAlgHom_eq_coe, AlgEquiv.coe_ringHom_commutes, Subring.mem_map_equiv]
  

Proof state:
case h
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁹ : CommRing A
inst✝¹⁸ : Field K
inst✝¹⁷ : CommRing B
inst✝¹⁶ : Field L
inst✝¹⁵ : Algebra A K
inst✝¹⁴ : Algebra B L
inst✝¹³ : Algebra A B
inst✝¹² : Algebra K L
inst✝¹¹ : Algebra A L
inst✝¹⁰ : IsScalarTower A K L
inst✝⁹ : IsScalarTower A B L
inst✝⁸ : IsDomain A
inst✝⁷ : IsDomain B
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : NoZeroSMulDivisors A B
I : Submodule B (FractionRing B)
x : L
y : FractionRing B
hy : y ∈ I
⊢ (RingEquiv.symm ↑(AlgEquiv.symm (FractionRing.algEquiv A K)))
        ((AlgEquiv.symm (FractionRing.algEquiv A K)) ((Algebra.trace K L) (x * (FractionRing.algEquiv B L) y))) ∈
      RingHom.range (algebraMap A K) ↔
    (Algebra.trace K L) (x * (FractionRing.algEquiv B L) y) ∈ 1

Next tactic:
simp
/-- The dual of a non-zero fractional ideal is the dual of the submodule under the traceform. -/
noncomputable
def dual (I : FractionalIdeal B⁰ L) :
    FractionalIdeal B⁰ L :=
  if hI : I = 0 then 0 else
  ⟨Iᵛ, by
    

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type ?u.306665
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : IsIntegrallyClosed A
I : FractionalIdeal B⁰ L
hI : ¬I = 0
⊢ IsFractional B⁰ (↑I)ᵛ

Next tactic:
classical
    have ⟨s, b, hb⟩ := FiniteDimensional.exists_is_basis_integral A K L
    obtain ⟨x, hx, hx'⟩ := exists_ne_zero_mem_isInteger hI
    have ⟨y, hy⟩ := (IsIntegralClosure.isIntegral_iff (A := B)).mp
      (IsIntegral.algebraMap (B := L) (discr_isIntegral K hb))
    refine ⟨y * x, mem_nonZeroDivisors_iff_ne_zero.mpr (mul_ne_zero ?_ hx), fun z hz ↦ ?_⟩
    · rw [← (IsIntegralClosure.algebraMap_injective B A L).ne_iff, hy, RingHom.map_zero,
        ← (algebraMap K L).map_zero, (algebraMap K L).injective.ne_iff]
      exact discr_not_zero_of_basis K b
    · convert isIntegral_discr_mul_of_mem_traceDual I hb hx' hz using 1
      · ext w; exact (IsIntegralClosure.isIntegral_iff (A := B)).symm
      · rw [Algebra.smul_def, RingHom.map_mul, hy, ← Algebra.smul_def]
/-- The dual of a non-zero fractional ideal is the dual of the submodule under the traceform. -/
noncomputable
def dual (I : FractionalIdeal B⁰ L) :
    FractionalIdeal B⁰ L :=
  if hI : I = 0 then 0 else
  ⟨Iᵛ, by
    classical
    

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type ?u.306665
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : IsIntegrallyClosed A
I : FractionalIdeal B⁰ L
hI : ¬I = 0
⊢ IsFractional B⁰ (↑I)ᵛ

Next tactic:
have ⟨s, b, hb⟩ := FiniteDimensional.exists_is_basis_integral A K L
/-- The dual of a non-zero fractional ideal is the dual of the submodule under the traceform. -/
noncomputable
def dual (I : FractionalIdeal B⁰ L) :
    FractionalIdeal B⁰ L :=
  if hI : I = 0 then 0 else
  ⟨Iᵛ, by
    classical
    have ⟨s, b, hb⟩ := FiniteDimensional.exists_is_basis_integral A K L
    

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type ?u.306665
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : IsIntegrallyClosed A
I : FractionalIdeal B⁰ L
hI : ¬I = 0
s : Finset L
b : Basis { x // x ∈ s } K L
hb : ∀ (x : { x // x ∈ s }), IsIntegral A (b x)
⊢ IsFractional B⁰ (↑I)ᵛ

Next tactic:
obtain ⟨x, hx, hx'⟩ := exists_ne_zero_mem_isInteger hI
/-- The dual of a non-zero fractional ideal is the dual of the submodule under the traceform. -/
noncomputable
def dual (I : FractionalIdeal B⁰ L) :
    FractionalIdeal B⁰ L :=
  if hI : I = 0 then 0 else
  ⟨Iᵛ, by
    classical
    have ⟨s, b, hb⟩ := FiniteDimensional.exists_is_basis_integral A K L
    obtain ⟨x, hx, hx'⟩ := exists_ne_zero_mem_isInteger hI
    

Proof state:
case intro.intro
A : Type u_1
K : Type u_2
L : Type u
B : Type ?u.306665
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : IsIntegrallyClosed A
I : FractionalIdeal B⁰ L
hI : ¬I = 0
s : Finset L
b : Basis { x // x ∈ s } K L
hb : ∀ (x : { x // x ∈ s }), IsIntegral A (b x)
x : B
hx : x ≠ 0
hx' : (algebraMap B L) x ∈ I
⊢ IsFractional B⁰ (↑I)ᵛ

Next tactic:
have ⟨y, hy⟩ := (IsIntegralClosure.isIntegral_iff (A := B)).mp
      (IsIntegral.algebraMap (B := L) (discr_isIntegral K hb))
/-- The dual of a non-zero fractional ideal is the dual of the submodule under the traceform. -/
noncomputable
def dual (I : FractionalIdeal B⁰ L) :
    FractionalIdeal B⁰ L :=
  if hI : I = 0 then 0 else
  ⟨Iᵛ, by
    classical
    have ⟨s, b, hb⟩ := FiniteDimensional.exists_is_basis_integral A K L
    obtain ⟨x, hx, hx'⟩ := exists_ne_zero_mem_isInteger hI
    have ⟨y, hy⟩ := (IsIntegralClosure.isIntegral_iff (A := B)).mp
      (IsIntegral.algebraMap (B := L) (discr_isIntegral K hb))
    

Proof state:
case intro.intro
A : Type u_1
K : Type u_2
L : Type u
B : Type ?u.306665
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : IsIntegrallyClosed A
I : FractionalIdeal B⁰ L
hI : ¬I = 0
s : Finset L
b : Basis { x // x ∈ s } K L
hb : ∀ (x : { x // x ∈ s }), IsIntegral A (b x)
x : B
hx : x ≠ 0
hx' : (algebraMap B L) x ∈ I
y : B
hy : (algebraMap B L) y = (algebraMap K L) (discr K fun i => b i)
⊢ IsFractional B⁰ (↑I)ᵛ

Next tactic:
refine ⟨y * x, mem_nonZeroDivisors_iff_ne_zero.mpr (mul_ne_zero ?_ hx), fun z hz ↦ ?_⟩