Theorem: IsLocalization.isDedekindDomain
File: Mathlib/RingTheory/DedekindDomain/Dvr.lean

tactic: have h : ∀ y : M, IsUnit (algebraMap A (FractionRing A) y) := by
  rintro ⟨y, hy⟩
  exact IsUnit.mk0 _ (mt IsFractionRing.to_map_eq_zero_iff.mp (nonZeroDivisors.ne_zero (hM hy)))
state_before: R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
⊢ IsDedekindDomain Aₘ

tactic: letI : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (IsLocalization.lift h)
state_before: R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
⊢ IsDedekindDomain Aₘ

tactic: haveI : IsScalarTower A Aₘ (FractionRing A) :=
  IsScalarTower.of_algebraMap_eq fun x => (IsLocalization.lift_eq h x).symm
state_before: R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
⊢ IsDedekindDomain Aₘ

tactic: haveI : IsFractionRing Aₘ (FractionRing A) :=
  IsFractionRing.isFractionRing_of_isDomain_of_isLocalization M _ _
state_before: R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this : IsScalarTower A Aₘ (FractionRing A)
⊢ IsDedekindDomain Aₘ

tactic: refine' (isDedekindDomain_iff _ (FractionRing A)).mpr ⟨_, _, _⟩
state_before: R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
⊢ IsDedekindDomain Aₘ

tactic: rintro ⟨y, hy⟩
state_before: R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
⊢ ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)

tactic: exact IsUnit.mk0 _ (mt IsFractionRing.to_map_eq_zero_iff.mp (nonZeroDivisors.ne_zero (hM hy)))
state_before: case mk
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
y : A
hy : y ∈ M
⊢ IsUnit (↑(algebraMap A (FractionRing A)) ↑{ val := y, property := hy })

tactic: exact IsLocalization.isNoetherianRing M _ (by infer_instance)
state_before: case refine'_1
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
⊢ IsNoetherianRing Aₘ

tactic: infer_instance
state_before: R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
⊢ IsNoetherianRing A

tactic: exact IsDedekindDomain.dimensionLEOne.localization Aₘ hM
state_before: case refine'_2
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
⊢ Ring.DimensionLEOne Aₘ

tactic: intro x hx
state_before: case refine'_3
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
⊢ ∀ {x : FractionRing A}, IsIntegral Aₘ x → ∃ y, ↑(algebraMap Aₘ (FractionRing A)) y = x

tactic: obtain ⟨⟨y, y_mem⟩, hy⟩ := hx.exists_multiple_integral_of_isLocalization M _
state_before: case refine'_3
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
x : FractionRing A
hx : IsIntegral Aₘ x
⊢ ∃ y, ↑(algebraMap Aₘ (FractionRing A)) y = x

tactic: obtain ⟨z, hz⟩ := (isIntegrallyClosed_iff _).mp IsDedekindDomain.isIntegrallyClosed hy
state_before: case refine'_3.intro.mk
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
x : FractionRing A
hx : IsIntegral Aₘ x
y : A
y_mem : y ∈ M
hy : IsIntegral A ({ val := y, property := y_mem } • x)
⊢ ∃ y, ↑(algebraMap Aₘ (FractionRing A)) y = x

tactic: refine' ⟨IsLocalization.mk' Aₘ z ⟨y, y_mem⟩, (IsLocalization.lift_mk'_spec _ _ _ _).mpr _⟩
state_before: case refine'_3.intro.mk.intro
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
x : FractionRing A
hx : IsIntegral Aₘ x
y : A
y_mem : y ∈ M
hy : IsIntegral A ({ val := y, property := y_mem } • x)
z : A
hz : ↑(algebraMap A (FractionRing A)) z = { val := y, property := y_mem } • x
⊢ ∃ y, ↑(algebraMap Aₘ (FractionRing A)) y = x

tactic: rw [hz, ← Algebra.smul_def]
state_before: case refine'_3.intro.mk.intro
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
x : FractionRing A
hx : IsIntegral Aₘ x
y : A
y_mem : y ∈ M
hy : IsIntegral A ({ val := y, property := y_mem } • x)
z : A
hz : ↑(algebraMap A (FractionRing A)) z = { val := y, property := y_mem } • x
⊢ ↑(algebraMap A (FractionRing A)) z = ↑(algebraMap A (FractionRing A)) ↑{ val := y, property := y_mem } * x

tactic: rfl
state_before: case refine'_3.intro.mk.intro
R : Type ?u.6256
A : Type u_1
K : Type ?u.6262
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
inst✝⁵ : Field K
inst✝⁴ : IsDedekindDomain A
M : Submonoid A
hM : M ≤ A⁰
Aₘ : Type u_2
inst✝³ : CommRing Aₘ
inst✝² : IsDomain Aₘ
inst✝¹ : Algebra A Aₘ
inst✝ : IsLocalization M Aₘ
h : ∀ (y : { x // x ∈ M }), IsUnit (↑(algebraMap A (FractionRing A)) ↑y)
this✝¹ : Algebra Aₘ (FractionRing A) := RingHom.toAlgebra (lift h)
this✝ : IsScalarTower A Aₘ (FractionRing A)
this : IsFractionRing Aₘ (FractionRing A)
x : FractionRing A
hx : IsIntegral Aₘ x
y : A
y_mem : y ∈ M
hy : IsIntegral A ({ val := y, property := y_mem } • x)
z : A
hz : ↑(algebraMap A (FractionRing A)) z = { val := y, property := y_mem } • x
⊢ { val := y, property := y_mem } • x = ↑{ val := y, property := y_mem } • x