17namespace layer1_foundations {
18namespace field_theory {
64 int f_v = (verbose_level >= 1);
67 cout <<
"nth_roots::init n=" <<
n << endl;
81 cout <<
"nth_roots::init order of q mod n is m=" <<
m << endl;
96 cout <<
"nth_roots::init n = " <<
n << endl;
97 cout <<
"nth_roots::init m = " <<
m << endl;
98 cout <<
"nth_roots::init field_degree = " <<
field_degree << endl;
99 cout <<
"nth_roots::init Qm1 = " << *
Qm1 << endl;
103 cout <<
"nth_roots::init n does not divide Qm1" << endl;
108 cout <<
"nth_roots::init Index = " << *
Index << endl;
113 cout <<
"nth_roots::init q - 1 does not divide Qm1" << endl;
118 cout <<
"nth_roots::init Subfield_Index = " << *
Subfield_Index << endl;
147 cout <<
"nth_roots::init creating unipoly_domain Fq modulo M" << endl;
157 cout <<
"nth_roots::init extension field created" << endl;
163 cout <<
"nth_roots::init before R.compute_nth_roots_as_polynomials" << endl;
167 cout <<
"nth_roots::init after R.compute_nth_roots_as_polynomials" << endl;
176 cout <<
"nth_roots::init the n-th roots are:" << endl;
177 for (i = 0; i <
n; i++) {
178 cout <<
"\\beta^" << i <<
" &=& ";
182 cout <<
"\\\\" << endl;
191 cout <<
"nth_roots::init the (q-1)-th roots are:" << endl;
192 for (i = 0; i <
F->
q - 1; i++) {
193 cout <<
"\\gamma^" << i <<
" &=& ";
197 cout <<
"\\\\" << endl;
205 cout <<
"nth_roots::init before Cyc->init" << endl;
209 cout <<
"nth_roots::init after Cyc->init" << endl;
213 cout <<
"nth_roots::init q-cyclotomic sets mod n:" << endl;
224 cout <<
"nth_roots::init creating polynomial "
241 cout <<
"nth_roots::init irreducible polynomials" << endl;
258 cout <<
"nth_roots::init Index" << endl;
265 cout <<
"nth_roots::init before compute_subfield" << endl;
273 cout <<
"nth_roots::init after compute_subfield" << endl;
278 cout <<
"nth_roots::init subfield_basis=" << endl;
303 for (j = 0; j <= degree; j++) {
315 input_vector, coefficients, 0 );
324 cout << a <<
" * Z^" << j;
340 for (j = 0; j <= degree; j++) {
348 input_vector, coefficients, 0 );
370 cout <<
"nth_roots::init done" << endl;
377 int f_v = (verbose_level >= 1);
380 cout <<
"nth_roots::compute_subfield subfield_degree=" <<
subfield_degree << endl;
385 int rk, kernel_m, kernel_n;
387 int p, e, q1, subgroup_index;
396 cout <<
"nth_roots::compute_subfield p=" << p << endl;
397 cout <<
"nth_roots::compute_subfield e=" << e << endl;
398 cout <<
"nth_roots::compute_subfield subfield_degree=" <<
subfield_degree << endl;
406 subgroup_index = (
Cyc->
qm - 1) / (q1 - 1);
408 cout <<
"nth_roots::compute_subfield "
410 << subgroup_index << endl;
416 cout <<
"nth_roots::compute_subfield before F->compute_powers" << endl;
424 for (i = 0; i <
n; i++) {
425 cout <<
"\\beta^" << i <<
" = ";
432 for (i = 0; i < e; i++) {
437 j = i * subgroup_index;
446 cout << i <<
" : " << j <<
" : " << jj <<
" : ";
459 for (i = 0; i < e; i++) {
461 field_basis[j * e + i] = a;
465 cout <<
"nth_roots::compute_subfield field_basis=" << endl;
474 cout <<
"nth_roots::compute_subfield M=" << endl;
479 cout <<
"nth_roots::compute_subfield before Fp->Linear_algebra->Gauss_simple" << endl;
488 cout <<
"nth_roots::compute_subfield after Gauss=" << endl;
491 cout <<
"rk=" << rk << endl;
494 cout <<
"nth_roots::compute_subfield fatal: rk != subfield_degree" << endl;
495 cout <<
"rk=" << rk << endl;
500 cout <<
"nth_roots::compute_subfield before Fp->Linear_algebra->matrix_get_kernel" << endl;
504 kernel_m, kernel_n, K,
508 cout <<
"nth_roots::compute_subfield kernel_m=" << kernel_m << endl;
509 cout <<
"nth_roots::compute_subfield kernel_n=" << kernel_n << endl;
512 cout <<
"nth_roots::compute_subfield kernel_n != 1" << endl;
516 cout <<
"nth_roots::compute_subfield K[e1] == 0" << endl;
527 cout <<
"nth_roots::compute_subfield the relation is " << endl;
538 cout <<
"nth_roots::compute_subfield "
541 <<
" : " << a <<
" = ";
555 cout <<
"nth_roots::compute_subfield done" << endl;
562 int f_v = (verbose_level >= 1);
569 cout <<
"nth_roots::report" << endl;
572 label.assign(
"\\alpha");
578 ost <<
"\\noindent Let $\\alpha$ be a primitive element of GF$(" << *
Qm <<
")$. " << endl;
579 ost <<
"Let $\\beta$ be a primitive $" <<
n <<
"$-th root in GF$(" << *
Qm <<
")$, " << endl;
580 ost <<
"so $\\beta=\\alpha^{" << *
Index <<
"}.$ \\\\" << endl;
582 for (i = 0; i <
n; i++) {
583 ost <<
"$\\beta^{" << i <<
"} = ";
587 ost <<
"$\\\\" << endl;
591 ost <<
"\\bigskip" << endl << endl;
596 ost <<
"\\noindent Let $\\gamma$ be a primitive $" <<
F->
q - 1 <<
"$-th root in GF$(" << *
Qm <<
")$, " << endl;
597 ost <<
"so $\\gamma=\\alpha^{" << *
Subfield_Index <<
"}.$ \\\\" << endl;
598 for (i = 0; i <
F->
q - 1; i++) {
599 ost <<
"$\\gamma^{" << i <<
"} = ";
603 ost <<
"$\\\\" << endl;
607 ost <<
"\\bigskip" << endl << endl;
609 ost <<
"\\noindent The $q$-cyclotomic set for $q=" <<
F->
q <<
"$ are:" << endl << endl;
614 ost <<
"\\bigskip" << endl << endl;
616 ost <<
"Subfield basis, a basis for GF$(" <<
F->
q <<
")$ inside GF$(" << *
Qm <<
")$:" << endl;
619 ost <<
"\\left[" << endl;
621 ost <<
"\\right]" << endl;
624 ost <<
"\\bigskip" << endl << endl;
626 ost <<
"The irreducible polynomials associated with the $" <<
n <<
"$-th roots over GF$(" <<
F->
q <<
")$ are:" << endl << endl;
628 ost <<
"\\bigskip" << endl << endl;
630 ost <<
"{\\renewcommand{\\arraystretch}{1.5}" << endl;
632 ost <<
"\\begin{array}{|r|r|l|l|l|}" << endl;
633 ost <<
"\\hline" << endl;
634 ost <<
"i & r_i & {\\rm Cyc}(r_i) & m_{\\beta^{r_i}}(X) & m_{\\beta^{r_i}}(X) \\\\" << endl;
635 ost <<
"\\hline" << endl;
655 ost <<
"\\\\" << endl;
656 ost <<
"\\hline" << endl;
658 ost <<
"\\end{array}" << endl;
659 ost <<
"$$}" << endl;
660 ost <<
"\\clearpage" << endl;
various functions related to coding theory
void print_polynomial_tight(std::ostream &ost, ring_theory::unipoly_domain &Fq, int degree, ring_theory::unipoly_object *coeffs)
void finite_field_init(int q, int f_without_tables, int verbose_level)
linear_algebra::linear_algebra * Linear_algebra
ring_theory::longinteger_object * Qm1
number_theory::cyclotomic_sets * Cyc
ring_theory::unipoly_object * Fq_Elements
ring_theory::unipoly_object Min_poly
ring_theory::longinteger_object * Index
ring_theory::unipoly_domain * FX
void report(std::ostream &ost, int verbose_level)
ring_theory::unipoly_domain * Fq
ring_theory::unipoly_object * Beta
ring_theory::longinteger_object * Subfield_Index
ring_theory::unipoly_object ** generator
ring_theory::longinteger_object * Qm
void init(finite_field *F, int n, int verbose_level)
void compute_subfield(int subfield_degree, int *&field_basis, int verbose_level)
ring_theory::unipoly_object * generator_Fq
ring_theory::unipoly_domain * FpX
various functions related to geometries
void AG_element_unrank(int q, int *v, int stride, int len, long int a)
long int AG_element_rank(int q, int *v, int stride, int len)
provides access to pre-computed combinatorial data in encoded form
void get_primitive_polynomial(std::string &poly, int p, int e, int verbose_level)
int Gauss_simple(int *A, int m, int n, int *base_cols, int verbose_level)
void matrix_get_kernel(int *M, int m, int n, int *base_cols, int nb_base_cols, int &kernel_m, int &kernel_n, int *kernel, int verbose_level)
void get_coefficients_in_linear_combination(int k, int n, int *basis_of_subspace, int *input_vector, int *coefficients, int verbose_level)
cyclotomic sets for cyclic codes
void print_latex(std::ostream &ost)
void init(field_theory::finite_field *F, int n, int verbose_level)
data_structures::set_of_sets * S
basic number theoretic functions
int i_power_j(int i, int j)
long int order_mod_p(long int a, long int p)
interface to create latex output files
void int_matrix_print_tex(std::ostream &ost, int *p, int m, int n)
domain to compute with objects of type longinteger
void integral_division_by_int(longinteger_object &a, int b, longinteger_object &q, int &r)
void create_qnm1(longinteger_object &a, int q, int n)
void create_q_to_the_n(longinteger_object &a, int q, int n)
a class to represent arbitrary precision integers
global functions related to ring theory
void create_irreducible_polynomial(field_theory::finite_field *F, unipoly_domain *Fq, unipoly_object *&Beta, int n, long int *cyclotomic_set, int cylotomic_set_size, unipoly_object *&generator, int verbose_level)
void compute_nth_roots_as_polynomials(field_theory::finite_field *F, unipoly_domain *FpX, unipoly_domain *Fq, unipoly_object *&Beta, int n1, int n2, int verbose_level)
void compute_powers(field_theory::finite_field *F, unipoly_domain *Fq, int n, int start_idx, unipoly_object *&Beta, int verbose_level)
domain of polynomials in one variable over a finite field
void delete_object(unipoly_object &p)
void create_object_of_degree_with_coefficients(unipoly_object &p, int d, int *coeff)
void print_object_tight(unipoly_object p, std::ostream &ost)
void init_variable_name(std::string &label)
int & s_i(unipoly_object p, int i)
void create_object_by_rank(unipoly_object &p, long int rk, const char *file, int line, int verbose_level)
void create_object_by_rank_string(unipoly_object &p, std::string &rk, int verbose_level)
void init_basic(field_theory::finite_field *F, int verbose_level)
void print_object(unipoly_object p, std::ostream &ost)
void init_factorring(field_theory::finite_field *F, unipoly_object m, int verbose_level)
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
#define Int_vec_print_integer_matrix_width(A, B, C, D, E, F)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects