Theorem: MvPolynomial.prime_rename_iff
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: symm
state_before: R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
⊢ Prime (↑(rename Subtype.val) p) ↔ Prime p

tactic: let eqv :=
  (sumAlgEquiv R (↥(sᶜ)) s).symm.trans
    (renameEquiv R <| (Equiv.sumComm (↥(sᶜ)) s).trans <| Equiv.Set.sumCompl s)
state_before: R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
⊢ Prime p ↔ Prime (↑(rename Subtype.val) p)

tactic: rw [← @prime_C_iff (MvPolynomial s R) (↥(sᶜ)) instCommRingMvPolynomialToCommSemiring p]
state_before: R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ Prime p ↔ Prime (↑(rename Subtype.val) p)

tactic: rw [@MulEquiv.prime_iff (MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R)) (MvPolynomial σ R) (_) (_)]
state_before: R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ Prime (↑C p) ↔ Prime (↑(rename Subtype.val) p)

tactic: rotate_left
state_before: R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ Prime (↑?e (↑C p)) ↔ Prime (↑(rename Subtype.val) p)

case e
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃* MvPolynomial σ R

R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ CommMonoidWithZero (MvPolynomial σ R)

tactic: exact eqv.toMulEquiv
state_before: case e
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃* MvPolynomial σ R

R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ CommMonoidWithZero (MvPolynomial σ R)

R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ Prime (↑?e (↑C p)) ↔ Prime (↑(rename Subtype.val) p)

tactic: convert Iff.rfl
state_before: R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ Prime (↑(AlgEquiv.toMulEquiv eqv) (↑C p)) ↔ Prime (↑(rename Subtype.val) p)

tactic: apply RingHom.congr_fun this p
state_before: case h.e'_2.h.e'_3
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
this : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C
⊢ ↑(rename Subtype.val) p = ↑(AlgEquiv.toMulEquiv eqv) (↑C p)

tactic: apply ringHom_ext
state_before: R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
⊢ ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C

tactic: intro
state_before: case hC
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
⊢ ∀ (r : R), ↑↑(rename Subtype.val) (↑C r) = ↑(RingHom.comp (↑↑eqv) C) (↑C r)

tactic: dsimp
state_before: case hC
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
r✝ : R
⊢ ↑↑(rename Subtype.val) (↑C r✝) = ↑(RingHom.comp (↑↑eqv) C) (↑C r✝)

tactic: erw [iterToSum_C_C, rename_C, rename_C]
state_before: case hC
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
r✝ : R
⊢ ↑(rename Subtype.val) (↑C r✝) =
    ↑(rename (↑(Equiv.Set.sumCompl s) ∘ Sum.swap)) (↑(AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s)) (↑C (↑C r✝)))

tactic: intro
state_before: case hX
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
⊢ ∀ (i : ↑s), ↑↑(rename Subtype.val) (X i) = ↑(RingHom.comp (↑↑eqv) C) (X i)

tactic: dsimp
state_before: case hX
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
i✝ : ↑s
⊢ ↑↑(rename Subtype.val) (X i✝) = ↑(RingHom.comp (↑↑eqv) C) (X i✝)

tactic: erw [iterToSum_C_X, rename_X, rename_X]
state_before: case hX
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
i✝ : ↑s
⊢ ↑(rename Subtype.val) (X i✝) =
    ↑(rename (↑(Equiv.Set.sumCompl s) ∘ Sum.swap)) (↑(AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s)) (↑C (X i✝)))

tactic: rfl
state_before: case hX
R : Type u
S : Type ?u.606815
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
s : Set σ
p : MvPolynomial (↑s) R
eqv : MvPolynomial (↑(sᶜ)) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=
  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑(sᶜ) ↑s))
    (renameEquiv R ((Equiv.sumComm ↑(sᶜ) ↑s).trans (Equiv.Set.sumCompl s)))
i✝ : ↑s
⊢ X ↑i✝ = X ((↑(Equiv.Set.sumCompl s) ∘ Sum.swap) (Sum.inr i✝))