Theorem: FractionalIdeal.coeIdeal_span_singleton
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: ext y
state_before: R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x : R
⊢ ↑(Ideal.span {x}) = spanSingleton S (↑(algebraMap R P) x)

tactic: refine' (mem_coeIdeal S).trans (Iff.trans _ (mem_spanSingleton S).symm)
state_before: case a
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x : R
y : P
⊢ y ∈ ↑(Ideal.span {x}) ↔ y ∈ spanSingleton S (↑(algebraMap R P) x)

tactic: constructor
state_before: case a
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x : R
y : P
⊢ (∃ x', x' ∈ Ideal.span {x} ∧ ↑(algebraMap R P) x' = y) ↔ ∃ z, z • ↑(algebraMap R P) x = y

tactic: rintro ⟨y', hy', rfl⟩
state_before: case a.mp
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x : R
y : P
⊢ (∃ x', x' ∈ Ideal.span {x} ∧ ↑(algebraMap R P) x' = y) → ∃ z, z • ↑(algebraMap R P) x = y

tactic: obtain ⟨x', rfl⟩ := Submodule.mem_span_singleton.mp hy'
state_before: case a.mp.intro.intro
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x y' : R
hy' : y' ∈ Ideal.span {x}
⊢ ∃ z, z • ↑(algebraMap R P) x = ↑(algebraMap R P) y'

tactic: use x'
state_before: case a.mp.intro.intro.intro
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x x' : R
hy' : x' • x ∈ Ideal.span {x}
⊢ ∃ z, z • ↑(algebraMap R P) x = ↑(algebraMap R P) (x' • x)

tactic: rw [smul_eq_mul, RingHom.map_mul, Algebra.smul_def]
state_before: case a.mp.intro.intro.intro
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x x' : R
hy' : x' • x ∈ Ideal.span {x}
⊢ x' • ↑(algebraMap R P) x = ↑(algebraMap R P) (x' • x)

tactic: rintro ⟨y', rfl⟩
state_before: case a.mpr
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x : R
y : P
⊢ (∃ z, z • ↑(algebraMap R P) x = y) → ∃ x', x' ∈ Ideal.span {x} ∧ ↑(algebraMap R P) x' = y

tactic: refine' ⟨y' * x, Submodule.mem_span_singleton.mpr ⟨y', rfl⟩, _⟩
state_before: case a.mpr.intro
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x y' : R
⊢ ∃ x', x' ∈ Ideal.span {x} ∧ ↑(algebraMap R P) x' = y' • ↑(algebraMap R P) x

tactic: rw [RingHom.map_mul, Algebra.smul_def]
state_before: case a.mpr.intro
R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1339818
inst✝³ : CommRing R₁
K : Type ?u.1339824
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x y' : R
⊢ ↑(algebraMap R P) (y' * x) = y' • ↑(algebraMap R P) x