l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem mk'_eq_zero_iff_eq_zero [Algebra R K] [IsFractionRing R K] {x : R} {y : nonZeroDivisors R} :
    mk' K x y = 0 ↔ x = 0 := by
  refine' ⟨fun hxy => _, fun h => by rw [h, mk'_zero]⟩
  · 

Proof state:
R : Type u_1
inst✝¹³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹² : CommRing S
inst✝¹¹ : Algebra R S
P : Type u_3
inst✝¹⁰ : CommRing P
A : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁷ : CommRing B
inst✝⁶ : IsDomain B
inst✝⁵ : Field K
L : Type u_7
inst✝⁴ : Field L
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
g : A →+* L
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : R
y : ↥(nonZeroDivisors R)
hxy : mk' K x y = 0
⊢ x = 0

Next tactic:
simp_rw [mk'_eq_zero_iff, mul_left_coe_nonZeroDivisors_eq_zero_iff] at hxy
@[simp]
theorem mk'_eq_zero_iff_eq_zero [Algebra R K] [IsFractionRing R K] {x : R} {y : nonZeroDivisors R} :
    mk' K x y = 0 ↔ x = 0 := by
  refine' ⟨fun hxy => _, fun h => by rw [h, mk'_zero]⟩
  · simp_rw [mk'_eq_zero_iff, mul_left_coe_nonZeroDivisors_eq_zero_iff] at hxy
    

Proof state:
R : Type u_1
inst✝¹³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹² : CommRing S
inst✝¹¹ : Algebra R S
P : Type u_3
inst✝¹⁰ : CommRing P
A : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁷ : CommRing B
inst✝⁶ : IsDomain B
inst✝⁵ : Field K
L : Type u_7
inst✝⁴ : Field L
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
g : A →+* L
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : R
y : ↥(nonZeroDivisors R)
hxy : ∃ m, x = 0
⊢ x = 0

Next tactic:
exact (exists_const _).mp hxy
theorem mk'_eq_one_iff_eq {x : A} {y : nonZeroDivisors A} : mk' K x y = 1 ↔ x = y := by
  

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
x : A
y : ↥(nonZeroDivisors A)
⊢ mk' K x y = 1 ↔ x = ↑y

Next tactic:
refine' ⟨_, fun hxy => by rw [hxy, mk'_self']⟩
theorem mk'_eq_one_iff_eq {x : A} {y : nonZeroDivisors A} : mk' K x y = 1 ↔ x = y := by
  refine' ⟨_, fun hxy => by 

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
x : A
y : ↥(nonZeroDivisors A)
hxy : x = ↑y
⊢ mk' K x y = 1

Next tactic:
rw [hxy, mk'_self']
theorem mk'_eq_one_iff_eq {x : A} {y : nonZeroDivisors A} : mk' K x y = 1 ↔ x = y := by
  refine' ⟨_, fun hxy => by rw [hxy, mk'_self']⟩
  · 

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
x : A
y : ↥(nonZeroDivisors A)
⊢ mk' K x y = 1 → x = ↑y

Next tactic:
intro hxy
theorem mk'_eq_one_iff_eq {x : A} {y : nonZeroDivisors A} : mk' K x y = 1 ↔ x = y := by
  refine' ⟨_, fun hxy => by rw [hxy, mk'_self']⟩
  · intro hxy
    

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
x : A
y : ↥(nonZeroDivisors A)
hxy : mk' K x y = 1
⊢ x = ↑y

Next tactic:
have hy : (algebraMap A K) ↑y ≠ (0 : K) :=
      IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors y.property
theorem mk'_eq_one_iff_eq {x : A} {y : nonZeroDivisors A} : mk' K x y = 1 ↔ x = y := by
  refine' ⟨_, fun hxy => by rw [hxy, mk'_self']⟩
  · intro hxy
    have hy : (algebraMap A K) ↑y ≠ (0 : K) :=
      IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors y.property
    

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
x : A
y : ↥(nonZeroDivisors A)
hxy : mk' K x y = 1
hy : (algebraMap A K) ↑y ≠ 0
⊢ x = ↑y

Next tactic:
rw [IsFractionRing.mk'_eq_div, div_eq_one_iff_eq hy] at hxy
theorem mk'_eq_one_iff_eq {x : A} {y : nonZeroDivisors A} : mk' K x y = 1 ↔ x = y := by
  refine' ⟨_, fun hxy => by rw [hxy, mk'_self']⟩
  · intro hxy
    have hy : (algebraMap A K) ↑y ≠ (0 : K) :=
      IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors y.property
    rw [IsFractionRing.mk'_eq_div, div_eq_one_iff_eq hy] at hxy
    

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
x : A
y : ↥(nonZeroDivisors A)
hxy : (algebraMap A K) x = (algebraMap A K) ↑y
hy : (algebraMap A K) ↑y ≠ 0
⊢ x = ↑y

Next tactic:
exact IsFractionRing.injective A K hxy
/-- Given an integral domain `A` with field of fractions `K`,
and an injective ring hom `g : A →+* L` where `L` is a field,
field hom induced from `K` to `L` maps `f x / f y` to `g x / g y` for all
`x : A, y ∈ NonZeroDivisors A`. -/
theorem lift_mk' (hg : Injective g) (x) (y : nonZeroDivisors A) : lift hg (mk' K x y) = g x / g y :=
  by 

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
hg : Injective ⇑g
x : A
y : ↥(nonZeroDivisors A)
⊢ (lift hg) (mk' K x y) = g x / g ↑y

Next tactic:
simp only [mk'_eq_div, map_div₀, lift_algebraMap]
/-- Given integral domains `A, B` and localization maps to their fields of fractions
`f : A →+* K, g : B →+* L`, an isomorphism `j : A ≃+* B` induces an isomorphism of
fields of fractions `K ≃+* L`. -/
noncomputable def fieldEquivOfRingEquiv [Algebra B L] [IsFractionRing B L] (h : A ≃+* B) :
    K ≃+* L :=
  ringEquivOfRingEquiv K L h
    (by
      

Proof state:
R : Type u_1
inst✝¹³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹² : CommRing S
inst✝¹¹ : Algebra R S
P : Type u_3
inst✝¹⁰ : CommRing P
A : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁷ : CommRing B
inst✝⁶ : IsDomain B
inst✝⁵ : Field K
L : Type u_7
inst✝⁴ : Field L
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
g : A →+* L
inst✝¹ : Algebra B L
inst✝ : IsFractionRing B L
h : A ≃+* B
⊢ Submonoid.map (RingEquiv.toMonoidHom h) (?m.416247 h) = ?m.416249 h

Next tactic:
ext b
/-- Given integral domains `A, B` and localization maps to their fields of fractions
`f : A →+* K, g : B →+* L`, an isomorphism `j : A ≃+* B` induces an isomorphism of
fields of fractions `K ≃+* L`. -/
noncomputable def fieldEquivOfRingEquiv [Algebra B L] [IsFractionRing B L] (h : A ≃+* B) :
    K ≃+* L :=
  ringEquivOfRingEquiv K L h
    (by
      ext b
      

Proof state:
case h
R : Type u_1
inst✝¹³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹² : CommRing S
inst✝¹¹ : Algebra R S
P : Type u_3
inst✝¹⁰ : CommRing P
A : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁷ : CommRing B
inst✝⁶ : IsDomain B
inst✝⁵ : Field K
L : Type u_7
inst✝⁴ : Field L
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
g : A →+* L
inst✝¹ : Algebra B L
inst✝ : IsFractionRing B L
h : A ≃+* B
b : B
⊢ b ∈ Submonoid.map (RingEquiv.toMonoidHom h) (?m.416247 h) ↔ b ∈ ?m.416249 h

Next tactic:
show b ∈ h.toEquiv '' _ ↔ _
/-- Given integral domains `A, B` and localization maps to their fields of fractions
`f : A →+* K, g : B →+* L`, an isomorphism `j : A ≃+* B` induces an isomorphism of
fields of fractions `K ≃+* L`. -/
noncomputable def fieldEquivOfRingEquiv [Algebra B L] [IsFractionRing B L] (h : A ≃+* B) :
    K ≃+* L :=
  ringEquivOfRingEquiv K L h
    (by
      ext b
      show b ∈ h.toEquiv '' _ ↔ _
      

Proof state:
case h
R : Type u_1
inst✝¹³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹² : CommRing S
inst✝¹¹ : Algebra R S
P : Type u_3
inst✝¹⁰ : CommRing P
A : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁷ : CommRing B
inst✝⁶ : IsDomain B
inst✝⁵ : Field K
L : Type u_7
inst✝⁴ : Field L
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
g : A →+* L
inst✝¹ : Algebra B L
inst✝ : IsFractionRing B L
h : A ≃+* B
b : B
⊢ b ∈ ⇑h.toEquiv '' ↑(?m.416247 h) ↔ b ∈ ?m.416249 h

Next tactic:
erw [h.toEquiv.image_eq_preimage, Set.preimage, Set.mem_setOf_eq,
        mem_nonZeroDivisors_iff_ne_zero, mem_nonZeroDivisors_iff_ne_zero]
/-- Given integral domains `A, B` and localization maps to their fields of fractions
`f : A →+* K, g : B →+* L`, an isomorphism `j : A ≃+* B` induces an isomorphism of
fields of fractions `K ≃+* L`. -/
noncomputable def fieldEquivOfRingEquiv [Algebra B L] [IsFractionRing B L] (h : A ≃+* B) :
    K ≃+* L :=
  ringEquivOfRingEquiv K L h
    (by
      ext b
      show b ∈ h.toEquiv '' _ ↔ _
      erw [h.toEquiv.image_eq_preimage, Set.preimage, Set.mem_setOf_eq,
        mem_nonZeroDivisors_iff_ne_zero, mem_nonZeroDivisors_iff_ne_zero]
      

Proof state:
case h
R : Type u_1
inst✝¹³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹² : CommRing S
inst✝¹¹ : Algebra R S
P : Type u_3
inst✝¹⁰ : CommRing P
A : Type u_4
inst✝⁹ : CommRing A
inst✝⁸ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁷ : CommRing B
inst✝⁶ : IsDomain B
inst✝⁵ : Field K
L : Type u_7
inst✝⁴ : Field L
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
g : A →+* L
inst✝¹ : Algebra B L
inst✝ : IsFractionRing B L
h : A ≃+* B
b : B
⊢ h.symm b ≠ 0 ↔ b ≠ 0

Next tactic:
exact h.symm.map_ne_zero_iff
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
⊢ IsFractionRing R S ↔ IsFractionRing P S

Next tactic:
delta IsFractionRing
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
⊢ IsLocalization (nonZeroDivisors R) S ↔ IsLocalization (nonZeroDivisors P) S

Next tactic:
convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  

Proof state:
case h.e'_2.h.e'_3
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
⊢ nonZeroDivisors P = Submonoid.map (RingEquiv.toMonoidHom h) (nonZeroDivisors R)

Next tactic:
ext x
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  

Proof state:
case h.e'_2.h.e'_3.h
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
⊢ x ∈ nonZeroDivisors P ↔ x ∈ Submonoid.map (RingEquiv.toMonoidHom h) (nonZeroDivisors R)

Next tactic:
erw [Submonoid.map_equiv_eq_comap_symm]
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  

Proof state:
case h.e'_2.h.e'_3.h
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
⊢ x ∈ nonZeroDivisors P ↔
    x ∈ Submonoid.comap (MulEquiv.toMonoidHom (MulEquiv.symm (RingEquiv.toMulEquiv h))) (nonZeroDivisors R)

Next tactic:
simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  

Proof state:
case h.e'_2.h.e'_3.h
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
⊢ x ∈ nonZeroDivisors P ↔ (MulEquiv.symm ↑h) x ∈ nonZeroDivisors R

Next tactic:
constructor
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  constructor
  · 

Proof state:
case h.e'_2.h.e'_3.h.mp
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
⊢ x ∈ nonZeroDivisors P → (MulEquiv.symm ↑h) x ∈ nonZeroDivisors R

Next tactic:
rintro hx z (hz : z * h.symm x = 0)
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  constructor
  · rintro hx z (hz : z * h.symm x = 0)
    

Proof state:
case h.e'_2.h.e'_3.h.mp
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
hx : x ∈ nonZeroDivisors P
z : R
hz : z * (RingEquiv.symm h) x = 0
⊢ z = 0

Next tactic:
rw [← h.map_eq_zero_iff]
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  constructor
  · rintro hx z (hz : z * h.symm x = 0)
    rw [← h.map_eq_zero_iff]
    

Proof state:
case h.e'_2.h.e'_3.h.mp
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
hx : x ∈ nonZeroDivisors P
z : R
hz : z * (RingEquiv.symm h) x = 0
⊢ h z = 0

Next tactic:
apply hx
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  constructor
  · rintro hx z (hz : z * h.symm x = 0)
    rw [← h.map_eq_zero_iff]
    apply hx
    

Proof state:
case h.e'_2.h.e'_3.h.mp.a
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
hx : x ∈ nonZeroDivisors P
z : R
hz : z * (RingEquiv.symm h) x = 0
⊢ h z * x = 0

Next tactic:
simpa only [h.map_zero, h.apply_symm_apply, h.map_mul] using congr_arg h hz
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  constructor
  · rintro hx z (hz : z * h.symm x = 0)
    rw [← h.map_eq_zero_iff]
    apply hx
    simpa only [h.map_zero, h.apply_symm_apply, h.map_mul] using congr_arg h hz
  · 

Proof state:
case h.e'_2.h.e'_3.h.mpr
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
⊢ (MulEquiv.symm ↑h) x ∈ nonZeroDivisors R → x ∈ nonZeroDivisors P

Next tactic:
rintro (hx : h.symm x ∈ _) z hz
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  constructor
  · rintro hx z (hz : z * h.symm x = 0)
    rw [← h.map_eq_zero_iff]
    apply hx
    simpa only [h.map_zero, h.apply_symm_apply, h.map_mul] using congr_arg h hz
  · rintro (hx : h.symm x ∈ _) z hz
    

Proof state:
case h.e'_2.h.e'_3.h.mpr
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
hx : (RingEquiv.symm h) x ∈ nonZeroDivisors R
z : P
hz : z * x = 0
⊢ z = 0

Next tactic:
rw [← h.symm.map_eq_zero_iff]
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  constructor
  · rintro hx z (hz : z * h.symm x = 0)
    rw [← h.map_eq_zero_iff]
    apply hx
    simpa only [h.map_zero, h.apply_symm_apply, h.map_mul] using congr_arg h hz
  · rintro (hx : h.symm x ∈ _) z hz
    rw [← h.symm.map_eq_zero_iff]
    

Proof state:
case h.e'_2.h.e'_3.h.mpr
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
hx : (RingEquiv.symm h) x ∈ nonZeroDivisors R
z : P
hz : z * x = 0
⊢ (RingEquiv.symm h) z = 0

Next tactic:
apply hx
theorem isFractionRing_iff_of_base_ringEquiv (h : R ≃+* P) :
    IsFractionRing R S ↔
      @IsFractionRing P _ S _ ((algebraMap R S).comp h.symm.toRingHom).toAlgebra := by
  delta IsFractionRing
  convert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h
  ext x
  erw [Submonoid.map_equiv_eq_comap_symm]
  simp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]
  constructor
  · rintro hx z (hz : z * h.symm x = 0)
    rw [← h.map_eq_zero_iff]
    apply hx
    simpa only [h.map_zero, h.apply_symm_apply, h.map_mul] using congr_arg h hz
  · rintro (hx : h.symm x ∈ _) z hz
    rw [← h.symm.map_eq_zero_iff]
    apply hx
    

Proof state:
case h.e'_2.h.e'_3.h.mpr.a
R : Type u_1
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type u_3
inst✝⁸ : CommRing P
A : Type u_4
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_5
B : Type u_6
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_7
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
h : R ≃+* P
x : P
hx : (RingEquiv.symm h) x ∈ nonZeroDivisors R
z : P
hz : z * x = 0
⊢ (RingEquiv.symm h) z * (RingEquiv.symm h) x = 0

Next tactic:
rw [← h.symm.map_mul, hz, h.symm.map_zero]