have hcube' : r.natAbs ^ 3 = A.norm.natAbs :=
  by
  rw [← Int.natAbs_pow]
  apply congr_arg
  simp only [hcube, Zsqrtd.norm_def, hA]
  ring
a b r : ℤ
hcoprime : IsCoprime a b
hcube : r ^ 3 = a ^ 2 + 3 * b ^ 2
A : ℤ√(-3) := { re := a, im := b }
hA : A = { re := a, im := b }
⊢ ∃ p q, a = p ^ 3 - 9 * p * q ^ 2 ∧ b = 3 * p ^ 2 * q - 3 * q ^ 3
a b r : ℤ
hcoprime : IsCoprime a b
hcube : r ^ 3 = a ^ 2 + 3 * b ^ 2
A : ℤ√(-3) := { re := a, im := b }
hA : A = { re := a, im := b }
hcube' : r.natAbs ^ 3 = A.norm.natAbs
⊢ ∃ p q, a = p ^ 3 - 9 * p * q ^ 2 ∧ b = 3 * p ^ 2 * q - 3 * q ^ 3