Theorem: isIntegrallyClosed_iff
File: Mathlib/RingTheory/IntegrallyClosed.lean

tactic: let e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ _ _
state_before: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ IsIntegrallyClosed R ↔ ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x

tactic: constructor
state_before: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
⊢ IsIntegrallyClosed R ↔ ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x

tactic: rintro ⟨cl⟩
state_before: case mp
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
⊢ IsIntegrallyClosed R → ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x

tactic: refine' fun hx => _
state_before: case mp.mk
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
cl : ∀ {x : FractionRing R}, IsIntegral R x → ∃ y, ↑(algebraMap R (FractionRing R)) y = x
⊢ ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x

tactic: obtain ⟨y, hy⟩ := cl ((isIntegral_algEquiv e).mpr hx)
state_before: case mp.mk
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
cl : ∀ {x : FractionRing R}, IsIntegral R x → ∃ y, ↑(algebraMap R (FractionRing R)) y = x
x✝ : K
hx : IsIntegral R x✝
⊢ ∃ y, ↑(algebraMap R K) y = x✝

tactic: exact ⟨y, e.algebraMap_eq_apply.mp hy⟩
state_before: case mp.mk.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
cl : ∀ {x : FractionRing R}, IsIntegral R x → ∃ y, ↑(algebraMap R (FractionRing R)) y = x
x✝ : K
hx : IsIntegral R x✝
y : R
hy : ↑(algebraMap R (FractionRing R)) y = ↑e x✝
⊢ ∃ y, ↑(algebraMap R K) y = x✝

tactic: rintro cl
state_before: case mpr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
⊢ (∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x) → IsIntegrallyClosed R

tactic: refine' ⟨fun hx => _⟩
state_before: case mpr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
cl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x
⊢ IsIntegrallyClosed R

tactic: obtain ⟨y, hy⟩ := cl ((isIntegral_algEquiv e.symm).mpr hx)
state_before: case mpr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
cl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x
x✝ : FractionRing R
hx : IsIntegral R x✝
⊢ ∃ y, ↑(algebraMap R (FractionRing R)) y = x✝

tactic: exact ⟨y, e.symm.algebraMap_eq_apply.mp hy⟩
state_before: case mpr.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)
cl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x
x✝ : FractionRing R
hx : IsIntegral R x✝
y : R
hy : ↑(algebraMap R K) y = ↑(AlgEquiv.symm e) x✝
⊢ ∃ y, ↑(algebraMap R (FractionRing R)) y = x✝