Theorem: ClassGroup.mk_eq_one_iff
File: Mathlib/RingTheory/ClassGroup.lean

tactic: rw [← (ClassGroup.equiv K).injective.eq_iff]
state_before: R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
⊢ ↑mk I = 1 ↔ Submodule.IsPrincipal ↑↑I

tactic: simp only [equiv_mk, canonicalEquiv_self, RingEquiv.coe_mulEquiv_refl, QuotientGroup.mk'_apply,
  _root_.map_one, QuotientGroup.eq_one_iff, MonoidHom.mem_range, ext_iff, coe_toPrincipalIdeal,
  coe_mapEquiv, MulEquiv.refl_apply]
state_before: R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
⊢ ↑(equiv K) (↑mk I) = ↑(equiv K) 1 ↔ Submodule.IsPrincipal ↑↑I

tactic: refine ⟨fun ⟨x, hx⟩ => ⟨⟨x, by rw [← hx, coe_spanSingleton]⟩⟩, ?_⟩
state_before: R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
⊢ (∃ x, spanSingleton R⁰ ↑x = ↑I) ↔ Submodule.IsPrincipal ↑↑I

tactic: intro hI
state_before: R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
⊢ Submodule.IsPrincipal ↑↑I → ∃ x, spanSingleton R⁰ ↑x = ↑I

tactic: obtain ⟨x, hx⟩ := @Submodule.IsPrincipal.principal _ _ _ _ _ _ hI
state_before: R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
⊢ ∃ x, spanSingleton R⁰ ↑x = ↑I

tactic: have hx' : (I : FractionalIdeal R⁰ K) = spanSingleton R⁰ x := by
  apply Subtype.coe_injective
  simp only [val_eq_coe, hx, coe_spanSingleton]
state_before: case intro
R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
x : K
hx : ↑↑I = Submodule.span R {x}
⊢ ∃ x, spanSingleton R⁰ ↑x = ↑I

tactic: refine ⟨Units.mk0 x ?_, ?_⟩
state_before: case intro
R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
x : K
hx : ↑↑I = Submodule.span R {x}
hx' : ↑I = spanSingleton R⁰ x
⊢ ∃ x, spanSingleton R⁰ ↑x = ↑I

tactic: rw [← hx, coe_spanSingleton]
state_before: R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
x✝ : ∃ x, spanSingleton R⁰ ↑x = ↑I
x : Kˣ
hx : spanSingleton R⁰ ↑x = ↑I
⊢ ↑↑I = Submodule.span R {↑x}

tactic: apply Subtype.coe_injective
state_before: R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
x : K
hx : ↑↑I = Submodule.span R {x}
⊢ ↑I = spanSingleton R⁰ x

tactic: simp only [val_eq_coe, hx, coe_spanSingleton]
state_before: case a
R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
x : K
hx : ↑↑I = Submodule.span R {x}
⊢ (fun a => ↑a) ↑I = (fun a => ↑a) (spanSingleton R⁰ x)

tactic: intro x_eq
state_before: case intro.refine_1
R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
x : K
hx : ↑↑I = Submodule.span R {x}
hx' : ↑I = spanSingleton R⁰ x
⊢ x ≠ 0

tactic: apply Units.ne_zero I
state_before: case intro.refine_1
R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
x : K
hx : ↑↑I = Submodule.span R {x}
hx' : ↑I = spanSingleton R⁰ x
x_eq : x = 0
⊢ False

tactic: simp [hx', x_eq]
state_before: case intro.refine_1
R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
x : K
hx : ↑↑I = Submodule.span R {x}
hx' : ↑I = spanSingleton R⁰ x
x_eq : x = 0
⊢ ↑I = 0

tactic: simp [hx']
state_before: case intro.refine_2
R : Type u_2
K : Type u_1
L : Type ?u.1775691
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : (FractionalIdeal R⁰ K)ˣ
hI : Submodule.IsPrincipal ↑↑I
x : K
hx : ↑↑I = Submodule.span R {x}
hx' : ↑I = spanSingleton R⁰ x
⊢ spanSingleton R⁰ ↑(Units.mk0 x (_ : x = 0 → False)) = ↑I