let n, ni be non empty Element of NAT ; :: thesis: ( ni < n & ni divides n implies ex f being FinSequence of the carrier of (Polynom-Ring F_Complex ) ex p being Polynomial of F_Complex st
( p = Product f & dom f = Seg n & ( for i being non empty Element of NAT st i in Seg n holds
( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) ) & unital_poly F_Complex ,n = ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' p ) )

assume that
A1: ni < n and
A2: ni divides n ; :: thesis: ex f being FinSequence of the carrier of (Polynom-Ring F_Complex ) ex p being Polynomial of F_Complex st
( p = Product f & dom f = Seg n & ( for i being non empty Element of NAT st i in Seg n holds
( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) ) & unital_poly F_Complex ,n = ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' p )

set cPRFC = the carrier of (Polynom-Ring F_Complex );
set cMGFC = the carrier of (MultGroup F_Complex );
defpred S1[ set , set ] means ex d being non empty Nat st
( $1 = d & ( ( not d divides n or d divides ni or d = n ) implies $2 = <%(1_ F_Complex )%> ) & ( d divides n & not d divides ni & d <> n implies $2 = cyclotomic_poly d ) );
A3: now
let i be Nat; :: thesis: ( i in Seg n implies ex x being Element of the carrier of (Polynom-Ring F_Complex ) st S1[x,b2] )
assume A4: i in Seg n ; :: thesis: ex x being Element of the carrier of (Polynom-Ring F_Complex ) st S1[x,b2]
then A5: not i is empty by FINSEQ_1:3;
per cases ( not i divides n or i divides ni or i = n or ( i divides n & not i divides ni & i <> n ) ) ;
suppose A6: ( not i divides n or i divides ni or i = n ) ; :: thesis: ex x being Element of the carrier of (Polynom-Ring F_Complex ) st S1[x,b2]
end;
suppose A7: ( i divides n & not i divides ni & i <> n ) ; :: thesis: ex x being Element of the carrier of (Polynom-Ring F_Complex ) st S1[x,b2]
reconsider i' = i as non empty Element of NAT by A4, FINSEQ_1:3;
cyclotomic_poly i' is Element of the carrier of (Polynom-Ring F_Complex ) by POLYNOM3:def 12;
hence ex x being Element of the carrier of (Polynom-Ring F_Complex ) st S1[i,x] by A7; :: thesis: verum
end;
end;
end;
consider f being FinSequence of the carrier of (Polynom-Ring F_Complex ) such that
A8: dom f = Seg n and
A9: for i being Nat st i in Seg n holds
S1[i,f . i] from FINSEQ_1:sch 5(A3);
A10: now
let i be non empty Element of NAT ; :: thesis: ( i in Seg n implies ( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) )
assume i in Seg n ; :: thesis: ( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) )
then ex d being non empty Nat st
( i = d & ( ( not d divides n or d divides ni or d = n ) implies f . i = <%(1_ F_Complex )%> ) & ( d divides n & not d divides ni & d <> n implies f . i = cyclotomic_poly d ) ) by A9;
hence ( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) ; :: thesis: verum
end;
take f ; :: thesis: ex p being Polynomial of F_Complex st
( p = Product f & dom f = Seg n & ( for i being non empty Element of NAT st i in Seg n holds
( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) ) & unital_poly F_Complex ,n = ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' p )

set rbp = { y where y is Element of the carrier of (MultGroup F_Complex ) : ( ord y divides n & not ord y divides ni & ord y <> n ) } ;
A11: { y where y is Element of the carrier of (MultGroup F_Complex ) : ( ord y divides n & not ord y divides ni & ord y <> n ) } c= n -roots_of_1
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in { y where y is Element of the carrier of (MultGroup F_Complex ) : ( ord y divides n & not ord y divides ni & ord y <> n ) } or x in n -roots_of_1 )
assume x in { y where y is Element of the carrier of (MultGroup F_Complex ) : ( ord y divides n & not ord y divides ni & ord y <> n ) } ; :: thesis: x in n -roots_of_1
then ex y being Element of the carrier of (MultGroup F_Complex ) st
( x = y & ord y divides n & not ord y divides ni & ord y <> n ) ;
hence x in n -roots_of_1 by Th37; :: thesis: verum
end;
A12: ni -roots_of_1 c= n -roots_of_1 by A2, Th31;
A13: n -roots_of_1 c= the carrier of (MultGroup F_Complex ) by Th35;
reconsider rbp = { y where y is Element of the carrier of (MultGroup F_Complex ) : ( ord y divides n & not ord y divides ni & ord y <> n ) } as finite Subset of F_Complex by A11, XBOOLE_1:1;
set bp = rbp,1 -bag ;
Product f = poly_with_roots (rbp,1 -bag ) by A8, A10, Th57;
then reconsider p = Product f as Polynomial of F_Complex ;
take p ; :: thesis: ( p = Product f & dom f = Seg n & ( for i being non empty Element of NAT st i in Seg n holds
( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) ) & unital_poly F_Complex ,n = ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' p )

thus p = Product f ; :: thesis: ( dom f = Seg n & ( for i being non empty Element of NAT st i in Seg n holds
( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) ) & unital_poly F_Complex ,n = ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' p )

thus dom f = Seg n by A8; :: thesis: ( ( for i being non empty Element of NAT st i in Seg n holds
( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) ) & unital_poly F_Complex ,n = ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' p )

thus for i being non empty Element of NAT st i in Seg n holds
( ( ( not i divides n or i divides ni or i = n ) implies f . i = <%(1_ F_Complex )%> ) & ( i divides n & not i divides ni & i <> n implies f . i = cyclotomic_poly i ) ) by A10; :: thesis: unital_poly F_Complex ,n = ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' p
set b = (n -roots_of_1 ),1 -bag ;
set bi = (ni -roots_of_1 ),1 -bag ;
consider rbn being non empty finite Subset of F_Complex such that
A14: rbn = { y where y is Element of the carrier of (MultGroup F_Complex ) : ord y = n } and
A15: cyclotomic_poly n = poly_with_roots (rbn,1 -bag ) by Def5;
set bn = rbn,1 -bag ;
set rbibn = (ni -roots_of_1 ) \/ rbn;
reconsider rbibn = (ni -roots_of_1 ) \/ rbn as finite Subset of F_Complex ;
set bibn = rbibn,1 -bag ;
ni -roots_of_1 misses rbn
proof
assume (ni -roots_of_1 ) /\ rbn <> {} ; :: according to XBOOLE_0:def 7 :: thesis: contradiction
then consider x being set such that
A16: x in (ni -roots_of_1 ) /\ rbn by XBOOLE_0:def 1;
A17: ( x in ni -roots_of_1 & x in rbn ) by A16, XBOOLE_0:def 4;
then consider y being Element of the carrier of (MultGroup F_Complex ) such that
A18: x = y and
A19: ord y divides ni by Th39;
consider y1 being Element of the carrier of (MultGroup F_Complex ) such that
A20: x = y1 and
A21: ord y1 = n by A14, A17;
thus contradiction by A1, A18, A19, A20, A21, NAT_D:7; :: thesis: verum
end;
then A22: ((ni -roots_of_1 ),1 -bag ) + (rbn,1 -bag ) = ((ni -roots_of_1 ) \/ rbn),1 -bag by UPROOTS:12;
A23: unital_poly F_Complex ,ni = poly_with_roots ((ni -roots_of_1 ),1 -bag ) by Th50;
now
let x be set ; :: thesis: ( ( x in n -roots_of_1 implies x in rbibn \/ rbp ) & ( x in rbibn \/ rbp implies b1 in n -roots_of_1 ) )
hereby :: thesis: ( x in rbibn \/ rbp implies b1 in n -roots_of_1 )
assume A24: x in n -roots_of_1 ; :: thesis: x in rbibn \/ rbp
then reconsider y = x as Element of the carrier of (MultGroup F_Complex ) by A13;
A25: ord y divides n by A24, Th37;
per cases ( ord y = n or ( ord y <> n & not ord y divides ni ) or ( ord y <> n & ord y divides ni ) ) ;
suppose ord y = n ; :: thesis: x in rbibn \/ rbp
then y in rbn by A14;
then y in rbibn by XBOOLE_0:def 3;
hence x in rbibn \/ rbp by XBOOLE_0:def 3; :: thesis: verum
end;
suppose ( ord y <> n & not ord y divides ni ) ; :: thesis: x in rbibn \/ rbp
then y in rbp by A25;
hence x in rbibn \/ rbp by XBOOLE_0:def 3; :: thesis: verum
end;
suppose ( ord y <> n & ord y divides ni ) ; :: thesis: x in rbibn \/ rbp
end;
end;
end;
assume x in rbibn \/ rbp ; :: thesis: b1 in n -roots_of_1
then A26: ( x in rbibn or x in rbp ) by XBOOLE_0:def 3;
per cases ( x in ni -roots_of_1 or x in rbn or x in rbp ) by A26, XBOOLE_0:def 3;
suppose x in rbn ; :: thesis: b1 in n -roots_of_1
then consider y being Element of the carrier of (MultGroup F_Complex ) such that
A27: ( x = y & ord y = n ) by A14;
thus x in n -roots_of_1 by A27, Th37; :: thesis: verum
end;
suppose x in rbp ; :: thesis: b1 in n -roots_of_1
then consider y being Element of the carrier of (MultGroup F_Complex ) such that
A28: ( x = y & ord y divides n & not ord y divides ni & ord y <> n ) ;
thus x in n -roots_of_1 by A28, Th37; :: thesis: verum
end;
end;
end;
then A29: n -roots_of_1 = rbibn \/ rbp by TARSKI:2;
rbibn misses rbp
proof
assume rbibn /\ rbp <> {} ; :: according to XBOOLE_0:def 7 :: thesis: contradiction
then consider x being set such that
A30: x in rbibn /\ rbp by XBOOLE_0:def 1;
A31: ( x in rbibn & x in rbp ) by A30, XBOOLE_0:def 4;
then consider y being Element of the carrier of (MultGroup F_Complex ) such that
A32: x = y and
A33: ( ord y divides n & not ord y divides ni & ord y <> n ) ;
per cases ( x in ni -roots_of_1 or x in rbn ) by A31, XBOOLE_0:def 3;
end;
end;
then A34: (n -roots_of_1 ),1 -bag = (rbibn,1 -bag ) + (rbp,1 -bag ) by A29, UPROOTS:12;
unital_poly F_Complex ,n = poly_with_roots ((n -roots_of_1 ),1 -bag ) by Th50
.= (poly_with_roots (rbibn,1 -bag )) *' (poly_with_roots (rbp,1 -bag )) by A34, UPROOTS:66
.= ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' (poly_with_roots (rbp,1 -bag )) by A15, A22, A23, UPROOTS:66 ;
hence unital_poly F_Complex ,n = ((unital_poly F_Complex ,ni) *' (cyclotomic_poly n)) *' p by A8, A10, Th57; :: thesis: verum