Theorem: _private.Mathlib.NumberTheory.FLT.Three.0.FermatLastTheoremForThreeGen.Solution.formula2
File: Mathlib/NumberTheory/FLT/Three.lean

Proof steps:
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ FermatLastTheoremForThreeGen.Solution.Y S ^ 3 +
      ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3 =
    ↑(FermatLastTheoremForThreeGen.Solution.u₅ S) *
      (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ ↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
          (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 +
        FermatLastTheoremForThreeGen.Solution.Y S ^ 3 +
      ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3 =
    0
tactic: rw [u₅_def, neg_mul, neg_mul, Units.val_neg, neg_mul, eq_neg_iff_add_eq_zero, add_assoc,
    add_comm (S.u₄ * S.Z ^ 3), ← add_assoc, add_comm (S.Y ^ 3)]
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ ↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
          (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 +
        FermatLastTheoremForThreeGen.Solution.Y S ^ 3 +
      ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3 =
    0
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ (↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
            (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 +
          FermatLastTheoremForThreeGen.Solution.Y S ^ 3 +
        ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3) *
      (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    0 * (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η)
tactic: apply mul_right_cancel₀ <| mul_ne_zero
    (mul_ne_zero hζ.zeta_sub_one_prime'.ne_zero S.u₂.isUnit.ne_zero) (Units.isUnit η).ne_zero
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ (↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
            (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 +
          FermatLastTheoremForThreeGen.Solution.Y S ^ 3 +
        ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3) *
      (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    0 * (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η)
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ ↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
            (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 *
          (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) +
        FermatLastTheoremForThreeGen.Solution.Y S ^ 3 * (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) +
      ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3 *
        (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    0
tactic: simp only [zero_mul, add_mul]
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ ↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
            (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 *
          (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) +
        FermatLastTheoremForThreeGen.Solution.Y S ^ 3 * (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) +
      ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3 *
        (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    0
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ ↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
            (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 *
          (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) +
        FermatLastTheoremForThreeGen.Solution.Y S ^ 3 * (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) +
      ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3 *
        (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    FermatLastTheoremForThreeGen.Solution.X S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₁ S) *
          λ ^ (3 * S.multiplicity - 2) +
        FermatLastTheoremForThreeGen.Solution.Y S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * λ * ↑η +
      FermatLastTheoremForThreeGen.Solution.Z S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₃ S) * λ * ↑η ^ 2
tactic: rw [← formula1 S]
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ ↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
            (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 *
          (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) +
        FermatLastTheoremForThreeGen.Solution.Y S ^ 3 * (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) +
      ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3 *
        (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    FermatLastTheoremForThreeGen.Solution.X S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₁ S) *
          λ ^ (3 * S.multiplicity - 2) +
        FermatLastTheoremForThreeGen.Solution.Y S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * λ * ↑η +
      FermatLastTheoremForThreeGen.Solution.Z S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₃ S) * λ * ↑η ^ 2
state_after: case refine_1
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ ↑(η ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹) *
        (λ ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3 *
      (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    FermatLastTheoremForThreeGen.Solution.X S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₁ S) *
      λ ^ (3 * S.multiplicity - 2)

case refine_2
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ FermatLastTheoremForThreeGen.Solution.Y S ^ 3 * (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    FermatLastTheoremForThreeGen.Solution.Y S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * λ * ↑η

case refine_3
K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
inst✝¹ : IsCyclotomicExtension {3} ℚ K
ζ : K
hζ : IsPrimitiveRoot ζ ↑3
S : Solution hζ
S' : Solution' hζ
inst✝ : DecidableRel fun a b => a ∣ b
⊢ ↑(FermatLastTheoremForThreeGen.Solution.u₄ S) * FermatLastTheoremForThreeGen.Solution.Z S ^ 3 *
      (λ * ↑(FermatLastTheoremForThreeGen.Solution.u₂ S) * ↑η) =
    FermatLastTheoremForThreeGen.Solution.Z S ^ 3 * ↑(FermatLastTheoremForThreeGen.Solution.u₃ S) * λ * ↑η ^ 2
tactic: congrm ?_ + ?_ + ?_