Theorem: IsLocalization.mem_map_algebraMap_iff
File: Mathlib/RingTheory/Localization/Ideal.lean

tactic: constructor
state_before: R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z : S
⊢ z ∈ Ideal.map (algebraMap R S) I ↔ ∃ x, z * ↑(algebraMap R S) ↑x.snd = ↑(algebraMap R S) ↑x.fst

tactic: change _ → z ∈ map_ideal M S I
state_before: case mp
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z : S
⊢ z ∈ Ideal.map (algebraMap R S) I → ∃ x, z * ↑(algebraMap R S) ↑x.snd = ↑(algebraMap R S) ↑x.fst

tactic: refine' fun h => Ideal.mem_sInf.1 h fun z hz => _
state_before: case mp
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z : S
⊢ z ∈ Ideal.map (algebraMap R S) I → z ∈ IsLocalization.map_ideal M S I

tactic: obtain ⟨y, hy⟩ := hz
state_before: case mp
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z✝ : S
h : z✝ ∈ Ideal.map (algebraMap R S) I
z : S
hz : z ∈ ↑(algebraMap R S) '' ↑I
⊢ z ∈ ↑(IsLocalization.map_ideal M S I)

tactic: let Z : { x // x ∈ I } := ⟨y, hy.left⟩
state_before: case mp.intro
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z✝ : S
h : z✝ ∈ Ideal.map (algebraMap R S) I
z : S
y : R
hy : y ∈ ↑I ∧ ↑(algebraMap R S) y = z
⊢ z ∈ ↑(IsLocalization.map_ideal M S I)

tactic: use ⟨Z, 1⟩
state_before: case mp.intro
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z✝ : S
h : z✝ ∈ Ideal.map (algebraMap R S) I
z : S
y : R
hy : y ∈ ↑I ∧ ↑(algebraMap R S) y = z
Z : { x // x ∈ I } := { val := y, property := (_ : y ∈ ↑I) }
⊢ z ∈ ↑(IsLocalization.map_ideal M S I)

tactic: simp [hy.right]
state_before: case mp.intro
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z✝ : S
h : z✝ ∈ Ideal.map (algebraMap R S) I
z : S
y : R
hy : y ∈ ↑I ∧ ↑(algebraMap R S) y = z
Z : { x // x ∈ I } := { val := y, property := (_ : y ∈ ↑I) }
⊢ z * ↑(algebraMap R S) ↑(Z, 1).snd = ↑(algebraMap R S) ↑(Z, 1).fst

tactic: rintro ⟨⟨a, s⟩, h⟩
state_before: case mpr
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z : S
⊢ (∃ x, z * ↑(algebraMap R S) ↑x.snd = ↑(algebraMap R S) ↑x.fst) → z ∈ Ideal.map (algebraMap R S) I

tactic: rw [← Ideal.unit_mul_mem_iff_mem _ (map_units S s), mul_comm]
state_before: case mpr.intro.mk
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z : S
a : { x // x ∈ I }
s : { x // x ∈ M }
h : z * ↑(algebraMap R S) ↑(a, s).snd = ↑(algebraMap R S) ↑(a, s).fst
⊢ z ∈ Ideal.map (algebraMap R S) I

tactic: exact h.symm ▸ Ideal.mem_map_of_mem _ a.2
state_before: case mpr.intro.mk
R : Type u_1
inst✝³ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝² : CommSemiring S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
I : Ideal R
z : S
a : { x // x ∈ I }
s : { x // x ∈ M }
h : z * ↑(algebraMap R S) ↑(a, s).snd = ↑(algebraMap R S) ↑(a, s).fst
⊢ z * ↑(algebraMap R S) ↑s ∈ Ideal.map (algebraMap R S) I