Zulip Chat Archive

Stream: new members

Topic: Solve `x^n = 1` in Complex


White Chen (Sep 17 2024 at 10:03):

In lean 4, how to prove that x=e2πkinx=e^{\frac{2\pi k i}{n}}, if xn=1x^n=1 ?
I formailize this as follow:

import Mathlib
open Complex Polynomial

noncomputable def p := fun (n : ) => monomial n (1 : )

example {n : } : p n = 1
                   (p n).rootSet   = {x |  k  Finset.range n, x = exp (2*π*k*I / n)} := sorry

Edward van de Meent (Sep 17 2024 at 10:07):

i think the easiest way would be to first prove that x=e2πkinx=e^{\frac{2\pi ki}{n}} is a solution to the polynomial for all 0k<n0 \leq k < n and that these are all different, then show that there are at most nn solutions because that is the degree of the polynomial. from that you can conclude that the earlier solutions must be all of them

Johan Commelin (Sep 17 2024 at 11:38):

See also docs#Complex.isPrimitiveRoot_iff


Last updated: May 02 2025 at 03:31 UTC