Orbiter 2022
Combinatorial Objects
semifield_level_two.cpp
Go to the documentation of this file.
1/*
2 * semifield_level_two.cpp
3 *
4 * Created on: Apr 17, 2019
5 * Author: betten
6 */
7
8
9
10
11#include "orbiter.h"
12
13using namespace std;
14
15namespace orbiter {
16namespace layer5_applications {
17namespace semifields {
18
19
20
22{
23 SC = NULL;
24 n = k = k2 = q = 0;
25
26 A = NULL;
27 A_PGLk = NULL;
28 M = NULL;
29 F = NULL;
30 C = NULL;
31 desired_pivots = NULL;
32
33
34 R = NULL;
35 nb_classes = 0;
36
37 Basis = NULL;
38 Mtx = NULL;
39 Mtx_Id = NULL;
40 Mtx_2 = NULL;
41 Elt = NULL;
42 Elt2 = NULL;
43
44 class_rep_rank = NULL;
51
53 flag_orbit_classes = NULL;
55 flag_orbit_length = NULL;
56
57 f_Fusion = NULL;
58 Fusion_idx = NULL;
59 Fusion_elt = NULL;
60
61 nb_orbits = 0;
63 So = NULL;
64 Fo = NULL;
65 Pt = NULL;
66 Go = NULL;
67 Stabilizer_gens = NULL;
68
69 E1 = E2 = E3 = E4 = NULL;
70 //Mnn = NULL;
71
72 Mtx1 = Mtx2 = Mtx3 = Mtx4 = Mtx5 = Mtx6 = NULL;
73 ELT1 = ELT2 = ELT3 = NULL;
74 M1 = NULL;
75 Basis1 = Basis2 = NULL;
76
77 R1 = R2 = NULL;
78
79 Candidates = NULL;
80 Nb_candidates = NULL;
81
82
83 //null();
84}
85
87{
88 int verbose_level = 1;
89 int f_v = (verbose_level >= 1);
90 int i;
91
92 if (f_v) {
93 cout << "semifield_level_two::~semifield_level_two" << endl;
94 }
95 if (R) {
97 }
98
99 if (desired_pivots) {
101 }
102
103 if (f_v) {
104 cout << "semifield_level_two::~semifield_level_two before Basis" << endl;
105 }
106
107
108
109
110 if (Basis) {
112 }
113 if (Mtx) {
114 FREE_int(Mtx);
115 }
116 if (Mtx_Id) {
118 }
119 if (Mtx_2) {
121 }
122 if (Elt) {
123 FREE_int(Elt);
124 }
125 if (Elt2) {
126 FREE_int(Elt2);
127 }
128
129
130
131 if (f_v) {
132 cout << "semifield_level_two::~semifield_level_two before class_rep_rank" << endl;
133 }
134
135
136
137 if (class_rep_rank) {
139 }
142 }
144 for (i = 0; i < nb_classes; i++) {
146 }
148 }
150 for (i = 0; i < nb_classes; i++) {
152 }
154 }
157 }
160 }
163 }
164
165
166 if (flag_orbit_classes) {
168 }
171 }
172 if (flag_orbit_length) {
174 }
175
176 if (f_v) {
177 cout << "semifield_level_two::~semifield_level_two before f_Fusion" << endl;
178 }
179
180 if (f_Fusion) {
182 }
183
184 if (f_v) {
185 cout << "semifield_level_two::~semifield_level_two before Fusion_idx" << endl;
186 }
187
188
189 if (Fusion_idx) {
191 }
192
193 if (f_v) {
194 cout << "semifield_level_two::~semifield_level_two before Fusion_elt" << endl;
195 }
196
197 if (Fusion_elt) {
198 for (i = 0; i < nb_flag_orbits; i++) {
199 if (Fusion_elt[i]) {
201 }
202 }
204 }
205
206 if (f_v) {
207 cout << "semifield_level_two::~semifield_level_two before defining_flag_orbit" << endl;
208 }
209
212 }
213
214 if (f_v) {
215 cout << "semifield_level_two::~semifield_level_two before So" << endl;
216 }
217
218 if (So) {
219 FREE_int(So);
220 }
221
222 if (f_v) {
223 cout << "semifield_level_two::~semifield_level_two before Fo" << endl;
224 }
225
226 if (Fo) {
227 FREE_int(Fo);
228 }
229
230 if (f_v) {
231 cout << "semifield_level_two::~semifield_level_two before Pt" << endl;
232 }
233
234
235 if (Pt) {
236 FREE_lint(Pt);
237 }
238
239 if (f_v) {
240 cout << "semifield_level_two::~semifield_level_two before Go" << endl;
241 }
242
243
244 if (Go) {
245 FREE_lint(Go);
246 }
247
248 if (f_v) {
249 cout << "semifield_level_two::~semifield_level_two before Stabilizer_gens" << endl;
250 }
251
252 if (Stabilizer_gens) {
254 }
255 if (E1) {
256 FREE_int(E1);
257 }
258 if (E2) {
259 FREE_int(E2);
260 }
261 if (E3) {
262 FREE_int(E3);
263 }
264 if (E4) {
265 FREE_int(E4);
266 }
267#if 0
268 if (Mnn) {
269 FREE_int(Mnn);
270 }
271#endif
272 if (Mtx1) {
273 FREE_int(Mtx1);
274 }
275 if (Mtx2) {
276 FREE_int(Mtx2);
277 }
278 if (Mtx3) {
279 FREE_int(Mtx3);
280 }
281 if (Mtx4) {
282 FREE_int(Mtx4);
283 }
284 if (Mtx5) {
285 FREE_int(Mtx5);
286 }
287 if (Mtx6) {
288 FREE_int(Mtx6);
289 }
290 if (ELT1) {
291 FREE_int(ELT1);
292 }
293 if (ELT2) {
294 FREE_int(ELT2);
295 }
296 if (ELT3) {
297 FREE_int(ELT3);
298 }
299 if (M1) {
300 FREE_int(M1);
301 }
302 if (Basis1) {
304 }
305 if (Basis2) {
307 }
308 if (R1) {
310 }
311 if (R2) {
313 }
314 if (Candidates) {
315 for (i = 0; i < nb_orbits; i++) {
317 }
319 }
320 if (Nb_candidates) {
322 }
323
324 if (f_v) {
325 cout << "semifield_level_two::~semifield_level_two done" << endl;
326 }
327
328 //freeself();
329}
330
332 int verbose_level)
333{
334 int f_v = (verbose_level >= 1);
335 //int f_vv = (verbose_level >= 2);
337
338 if (f_v) {
339 cout << "semifield_level_two::init" << endl;
340 }
342 k = SC->k;
343 n = 2 * k;
344 k2 = k * k;
345 F = SC->Mtx->GFq;
346 q = SC->q;
347
348 A = SC->A;
349
351
354
355 if (f_v) {
356 cout << "semifield_level_two::init "
357 "the order of GL(" << k << "," << q << ") "
358 "is " << Go << endl;
359 }
360
361 M = A_PGLk->G.matrix_grp;
362
363 if (f_v) {
364 cout << "semifield_level_two::init "
365 "before M->init_gl_classes M->n=" << M->n << endl;
366 }
367 M->init_gl_classes(0 /*verbose_level*/);
368 if (f_v) {
369 cout << "semifield_level_two::init "
370 "after M->init_gl_classes" << endl;
371 }
372 C = M->C;
373
374 Basis = NEW_int(k * k);
375 Mtx = NEW_int(k * k);
376 Mtx_Id = NEW_int(k * k);
377 Mtx_2 = NEW_int(k * k);
380
382
383
388
389 //Mnn = NEW_int(n * n);
390
391 Mtx1 = NEW_int(k2);
392 Mtx2 = NEW_int(k2);
393 Mtx3 = NEW_int(k2);
394 Mtx4 = NEW_int(k2);
395 Mtx5 = NEW_int(k2);
396 Mtx6 = NEW_int(k2);
397
401
402 M1 = NEW_int(n * n);
403 Basis1 = NEW_int(k * k);
404 Basis2 = NEW_int(k * k);
405
408
409 init_desired_pivots(verbose_level - 1);
410
411 if (f_v) {
412 cout << "semifield_starter::init done" << endl;
413 }
414}
415
416
418{
419 int f_v = (verbose_level >= 1);
420 int f_vv = (verbose_level >= 2);
421 int i;
422
423 if (f_v) {
424 cout << "semifield_level_two::init_desired_pivots" << endl;
425 }
427
428 for (i = 0; i < k; i++) {
429 if (i < 2) {
430 desired_pivots[i] = i * k;
431 }
432 else {
433 desired_pivots[i] = (k - 1 - (i - 2)) * k;
434 }
435 }
436 if (f_vv) {
437 cout << "semifield_level_two::init_desired_pivots "
438 "desired_pivots: ";
440 cout << endl;
441 }
442 if (f_v) {
443 cout << "semifield_level_two::init_desired_pivots done" << endl;
444 }
445}
446
448 int c, int verbose_level)
449// This function lists all elements in a conjugacy class
450{
451 int f_v = (verbose_level >= 1);
452 int f_vv = (verbose_level >= 2);
453 groups::strong_generators *Centralizer_gens;
454 groups::sims *G;
455 groups::sims *U;
458 int rk, cl, r;
459
460 if (f_v) {
461 cout << "semifield_starter::list_all_elements_in_conjugacy_class "
462 "c=" << c << endl;
463 }
464
465 Centralizer_gens = NEW_OBJECT(groups::strong_generators);
466
467 C->make_matrix_from_class_rep(Mtx, R + c, 0 /*verbose_level - 1 */);
468
470
471 Centralizer_gens->init_centralizer_of_matrix(
472 A_PGLk, Mtx, verbose_level - 2);
473
474 if (f_vv) {
475 cout << "creating sims:" << endl;
476 }
477 U = Centralizer_gens->create_sims(0 /* verbose_level */);
478 U->group_order(Co);
479
480 if (f_vv) {
481 cout << "Sims object for centralizer of order "
482 << Co << " has been created, transversal lengths are ";
484 }
485
486 G = A_PGLk->Sims;
487 G->group_order(Go);
488 D.integral_division_exact(Go, Co, Cl);
489
490 if (f_vv) {
491 cout << "Class " << c << " has length " << Cl << ":" << endl;
492 }
493 cl = Cl.as_int();
494
495 int *Ranks;
496
497 Ranks = NEW_int(cl);
498 for (rk = 0; rk < cl; rk++) {
499
500 if (f_v) {
501 cout << "element " << rk << " / " << cl << ":" << endl;
502 }
503
504 A_PGLk->coset_unrank(G, U, rk, E1, 0 /* verbose_level */);
505
507
508
509 A_PGLk->element_mult(E2, Elt, E3, 0);
510 A_PGLk->element_mult(E3, E1, E4, 0);
511 A_PGLk->element_print(E4, cout);
512
513 r = SC->matrix_rank(E4); // G->element_rank_int(E4);
514 if (f_v) {
515 cout << "Has rank " << r << endl;
516 }
517 Ranks[rk] = r;
518
519 if (f_v) {
520 cout << "Coset representative:" << endl;
521 A_PGLk->element_print(E1, cout);
522 cout << endl;
523 }
524 }
525
526 cout << "The elements of class " << c << " are: ";
527 Int_vec_print(cout, Ranks, cl);
528 cout << endl;
529
530 FREE_int(Ranks);
531 FREE_OBJECT(U);
532 FREE_OBJECT(Centralizer_gens);
533 if (f_v) {
534 cout << "semifield_level_two::list_all_elements_in_conjugacy_class done" << endl;
535 }
536}
537
538void semifield_level_two::compute_level_two(int nb_stages, int verbose_level)
539// nb_stages = 4 for everything
540{
541 int f_v = (verbose_level >= 1);
542
543 if (f_v) {
544 cout << "semifield_level_two::compute_level_two, nb_stages=" << nb_stages << endl;
545 }
546
547 if (nb_stages >= 1) {
548 if (f_v) {
549 cout << "semifield_level_two::compute_level_two "
550 "before downstep" << endl;
551 }
552 downstep(verbose_level - 1);
553 if (f_v) {
554 cout << "semifield_level_two::compute_level_two "
555 "after downstep, nb_flag_orbits=" << nb_flag_orbits << endl;
556 }
557 }
558
559
560 if (nb_stages >= 2) {
561 if (f_v) {
562 cout << "semifield_level_two::compute_level_two compute the stabilizers." << endl;
563 }
564
565
566
567 if (f_v) {
568 cout << "semifield_level_two::compute_level_two "
569 "before compute_stabilizers_downstep" << endl;
570 }
571 compute_stabilizers_downstep(verbose_level - 2);
572 if (f_v) {
573 cout << "semifield_level_two::compute_level_two "
574 "after compute_stabilizers_downstep" << endl;
575 }
576 }
577
578 if (nb_stages >= 3) {
579 if (f_v) {
580 cout << "semifield_level_two::compute_level_two "
581 "before upstep" << endl;
582 }
583 upstep(verbose_level - 1);
584 if (f_v) {
585 cout << "semifield_level_two::compute_level_two "
586 "after upstep, nb_orbits=" << nb_orbits << endl;
587 }
588 }
589
590 if (nb_stages >= 4) {
591 if (f_v) {
592 cout << "semifield_level_two::compute_level_two "
593 "before write_level_info_file" << endl;
594 }
595 write_level_info_file(verbose_level);
596 if (f_v) {
597 cout << "semifield_level_two::compute_level_two "
598 "after write_level_info_file" << endl;
599 }
600 }
601
602 if (f_v) {
603 cout << "semifield_level_two::compute_level_two done" << endl;
604 }
605}
606
607
608
609void semifield_level_two::downstep(int verbose_level)
610{
611 int f_v = (verbose_level >= 1);
612 int f_vv = (verbose_level >= 2);
613 int i, j, idx;
614
615 if (f_v) {
616 cout << "semifield_level_two::downstep" << endl;
617 }
618
619 if (f_v) {
620 cout << "semifield_level_two::downstep "
621 "before make_classes" << endl;
622 }
623
624
625 if (C == NULL) {
626 cout << "semifield_level_two::downstep "
627 "C == NULL" << endl;
628 exit(1);
629 }
631 TRUE /* f_no_eigenvalue_one */, 0 /*verbose_level - 1*/);
632
633 if (f_v) {
634 cout << "semifield_level_two::downstep after "
635 "C->make_classes nb_classes = " << nb_classes << endl;
636 }
637
638#if 0
639 if (f_write_class_reps) {
640
641 const char *fname = "Class_reps.tex";
642 C->report(fname, verbose_level);
643
644#if 0
645 const char *fname = "Class_reps.tex";
646 ofstream fp(fname);
647 int i;
648
649 latex_head_easy(fp);
650 fp << "\\section{Conjugacy Classes}" << endl;
651 for (i = 0; i < nb_classes; i++) {
652 fp << "Representative " << i << " / "
653 << nb_classes << endl;
655 }
656 latex_foot(fp);
657#endif
658 }
659#endif
660
661 if (f_v) {
662 cout << "semifield_level_two::downstep "
663 "after make_classes" << endl;
664 }
665
666
672
673 for (i = 0; i < nb_classes; i++) {
674
675 if (f_vv) {
676 cout << "semifield_level_two::downstep "
677 "class " << i << " / " << nb_classes << " :" << endl;
678 }
679
680 C->make_matrix_from_class_rep(Mtx, R + i, 0 /*verbose_level - 1 */);
681
682 if (f_vv) {
683 cout << "representative:" << endl;
685 }
686
689
690
692
694
696
699
700 if (FALSE) {
701 cout << "semifield_level_two::downstep "
702 "class " << i << " before identify_matrix" << endl;
703 }
706 verbose_level - 1);
707 if (f_vv) {
708 cout << "class_rep_plus_I_Basis[i]" << endl;
710 }
711
713 R, nb_classes, R2, 0 /* verbose_level */);
714 if (f_vv) {
715 cout << "R_i_plus_I_class_idx[i]="
716 << R_i_plus_I_class_idx[i] << endl;
717 }
718
720 class_rep_plus_I_Basis_inv[i], k, 0 /*verbose_level */);
721 if (f_vv) {
722 cout << "class_rep_plus_I_Basis_inv[i]" << endl;
724 }
725
726 if (f_vv) {
727
728 int f_elements_exponential = FALSE;
729 string symbol_for_print;
730
731
732 symbol_for_print.assign("\\alpha");
733
734 cout << "Representative R_i of class " << i
735 << " / " << nb_classes << " has rank "
736 << class_rep_rank[i] << " R_i + I has rank "
737 << class_rep_plus_I_rank[i] << " and belongs "
738 "to conjugacy class "
739 << R_i_plus_I_class_idx[i] << endl;
740#if 0
741 cout << "R_i:" << endl;
742 int_matrix_print(Elt, k, k);
743 cout << "R_i + I:" << endl;
744 int_matrix_print(Elt2, k, k);
745#endif
746 cout << "class_rep_plus_I_Basis_inv[i]:" << endl;
748 cout << "$$" << endl;
749 cout << "\\left[" << endl;
750 F->latex_matrix(cout, f_elements_exponential,
751 symbol_for_print,
753 cout << "\\right]" << endl;
754 cout << "$$" << endl;
755
756 }
757
759
760 }
761
762
763
768 nb_flag_orbits = 0;
769 for (i = 0; i < nb_classes; i++) {
770 if (R_i_plus_I_class_idx[i] < i) {
771 continue;
772 }
777 if (flag_orbit_classes[nb_flag_orbits * 2 + 0] ==
779 // R_i+I belongs to the conjugacy class of R_i:
780 idx = flag_orbit_classes[nb_flag_orbits * 2 + 0];
782 R[idx].class_length->as_int();
784 R[idx].class_length->as_int() >> 1;
785 }
786 else {
787 // R_i+I belongs to a different conjugacy class than R_i:
789 for (j = 0; j < 2; j++) {
790 idx = flag_orbit_classes[nb_flag_orbits * 2 + j];
792 R[idx].class_length->as_int();
793 }
794 idx = flag_orbit_classes[nb_flag_orbits * 2 + 0];
796 R[idx].class_length->as_int();
797 }
799 }
800
801
802
803 if (f_v) {
804 cout << "semifield_level_two::downstep done" << endl;
805 }
806}
807
808
810{
811 int f_v = (verbose_level >= 1);
812 int f_vv = (verbose_level >= 2);
813 //int f_vvv = (verbose_level >= 3);
814 int i, j, a, b;
815
816 if (f_v) {
817 cout << "semifield_level_two::compute_stabilizers_downstep, "
818 "verbose_level=" << verbose_level << endl;
819 }
820
822 for (i = 0; i < nb_flag_orbits; i++) {
823
824 if (f_vv) {
825 cout << "semifield_level_two::compute_stabilizers_downstep "
826 "down orbit " << i << " / " << nb_flag_orbits << endl;
827 }
828
829 a = flag_orbit_classes[i * 2 + 0];
830 b = flag_orbit_classes[i * 2 + 1];
831
832 C->make_matrix_from_class_rep(Mtx, R + a, 0 /*verbose_level - 1 */);
833
834 //A_PGLk->make_element(Elt, Mtx, 0);
835
836 if (f_vv) {
837 cout << "semifield_level_two::compute_stabilizers_downstep "
838 "down orbit " << i << " / " << nb_flag_orbits
839 << " before Flag_orbit_stabilizer[i].init_centralizer_of_matrix" << endl;
840 }
842 A_PGLk, Mtx, verbose_level - 3);
843
844 if (f_vv) {
845 cout << "semifield_level_two::compute_stabilizers_downstep "
846 "down orbit " << i << " / " << nb_flag_orbits
847 << " after Flag_orbit_stabilizer[i].init_centralizer_of_matrix" << endl;
848 }
849
850 if (FALSE) {
851 cout << "centralizer:" << endl;
853 }
854
855 if (a == b) {
856 if (f_vv) {
857 cout << "semifield_level_two::compute_stabilizers_downstep "
858 "down orbit " << i << " / " << nb_flag_orbits
859 << " a == b, extending Flag_orbit_stabilizer[i]" << endl;
860 }
861
863
865
867
868 C->identify_matrix(Mtx_2, R2, Basis, verbose_level - 3);
869
871
873 2 /* group_index */, verbose_level - 3);
874
876
877 if (f_vv) {
878 cout << "semifield_level_two::compute_stabilizers_downstep "
879 "down orbit " << i << " / " << nb_flag_orbits
880 << " a == b, extending Flag_orbit_stabilizer[i] done" << endl;
881 }
882
883 }
884 }
885
886 if (f_v) {
887 cout << "semifield_level_two::compute_stabilizers_downstep "
888 "We found " << nb_flag_orbits << " down orbits:" << endl;
889 for (i = 0; i < nb_flag_orbits; i++) {
891
893 for (j = 0; j < 2; j++) {
894 cout << flag_orbit_classes[i * 2 + j] << " ";
895 }
896 cout << " : nb of matrices = "
898 << " : length = " << flag_orbit_length[i]
899 << " stab order = " << go;
900 cout << endl;
901 }
902 cout << "i : class_to_flag_orbit" << endl;
903 for (i = 0; i < nb_classes; i++) {
904 cout << i << " : " << class_to_flag_orbit[i] << endl;
905 }
906 }
907 if (f_vv) {
908 cout << "Stabilizers of middle object:" << endl;
909 for (i = 0; i < nb_flag_orbits; i++) {
911
913 cout << "flag orbit " << i << " / " << nb_flag_orbits
914 << " has stabilizer order " << go << endl;
915 if (FALSE) {
917 }
918 }
919 }
920 if (f_v) {
921 cout << "semifield_level_two::compute_stabilizers_downstep "
922 "done" << endl;
923 }
924}
925
926
927void semifield_level_two::upstep(int verbose_level)
928{
929 int f_v = (verbose_level >= 1);
930 int f_vv = (verbose_level >= 2);
931 //int f_vvv = (verbose_level >= 3);
932 int f, coset, idx, i;
933 long int a, b;
934
935 if (f_v) {
936 cout << "semifield_level_two::upstep "
937 "nb_flag_orbits = " << nb_flag_orbits
938 << " verbose_level = " << verbose_level << endl;
939 }
940
945 for (i = 0; i < nb_flag_orbits; i++) {
946 f_Fusion[i] = FALSE;
947 Fusion_idx[i] = -1;
948 Fusion_elt[i] = NULL;
949 }
950
952 nb_orbits = 0;
953
954 if (f_vv) {
955 cout << "semifield_level_two::upstep "
956 " nb_flag_orbits = " << nb_flag_orbits << endl;
957 }
958
959 for (f = 0; f < nb_flag_orbits; f++) {
960
961 if (f_vv) {
962 cout << "semifield_level_two::upstep "
963 "working on flag orbit " << f << " / " << nb_flag_orbits << endl;
964 }
965
966 if (Fusion_idx[f] >= 0) {
967 continue;
968 }
969
971
972 idx = flag_orbit_classes[f * 2 + 0];
973 a = class_rep_rank[idx];
974 b = class_rep_plus_I_rank[idx];
975
976 defining_flag_orbit[nb_orbits] = f; // !!!
977 if (f_vv) {
978 cout << "working on new up orbit " << nb_orbits
979 << " copying stabilizer over idx=" << idx << endl;
980 }
981
982 if (f_vv) {
983 cout << "semifield_level_two::upstep "
984 "working on flag orbit " << f << " / " << nb_flag_orbits
985 << " before setup_stabilizer" << endl;
986 }
987
989 A,
991 verbose_level - 3);
992
993#if 0
994 setup_stabilizer(&Flag_orbit_stabilizer[f],
996 verbose_level - 3);
997#endif
998
999 // turns k x k matrices into n x n matrices
1000 // by repeating each matrix twice on the diagonal
1001
1002 if (f_vv) {
1003 cout << "semifield_level_two::upstep "
1004 "working on flag orbit " << f << " / " << nb_flag_orbits
1005 << " after setup_stabilizer" << endl;
1006 }
1007
1008
1009 if (f_vv) {
1010 cout << "semifield_level_two::upstep f=" << f << endl;
1011 }
1012
1013 int **Aut_gens;
1014 int nb_aut_gens;
1015 Aut_gens = NEW_pint(2);
1016 nb_aut_gens = 0;
1017
1018 for (coset = 0; coset < 2; coset++) {
1019
1020 int f_automorphism;
1021 int *Aut;
1022
1023 if (f_vv) {
1024 cout << "semifield_level_two::upstep "
1025 "f=" << f << " / " << nb_flag_orbits
1026 << " coset=" << coset << " / " << 2 << endl;
1027 }
1028 if (coset == 0) {
1029 if (f_vv) {
1030 cout << "semifield_level_two::upstep "
1031 "f=" << f << " / " << nb_flag_orbits
1032 << " coset=" << coset << " / " << 2 << " before trace(a, b)" << endl;
1033 }
1034 trace(f, coset, a, b,
1035 f_automorphism, Aut, verbose_level - 3);
1036 if (f_vv) {
1037 cout << "semifield_level_two::upstep "
1038 "f=" << f << " / " << nb_flag_orbits
1039 << " coset=" << coset << " / " << 2 << " after trace" << endl;
1040 }
1041 }
1042 else {
1043 if (f_vv) {
1044 cout << "semifield_level_two::upstep "
1045 "f=" << f << " / " << nb_flag_orbits
1046 << " coset=" << coset << " / " << 2 << " before trace(b, a)" << endl;
1047 }
1048 trace(f, coset, b, a,
1049 f_automorphism, Aut, verbose_level - 3);
1050 if (f_vv) {
1051 cout << "semifield_level_two::upstep "
1052 "f=" << f << " / " << nb_flag_orbits
1053 << " coset=" << coset << " / " << 2 << " after trace" << endl;
1054 }
1055 }
1056 if (f_automorphism) {
1057 if (f_vv) {
1058 cout << "semifield_level_two::upstep "
1059 "f=" << f << " / " << nb_flag_orbits
1060 << " coset=" << coset << " / " << 2 << " found automorphism" << endl;
1061 }
1062 Aut_gens[nb_aut_gens++] = Aut;
1063 }
1064 }
1065
1066 if (f_vv) {
1067 cout << "semifield_level_two::upstep After tracing, we found " << nb_aut_gens
1068 << " automorphisms" << endl;
1069 }
1070
1072
1073 if (f_vv) {
1074 cout << "semifield_level_two::upstep After tracing, "
1075 "creating coset reps" << endl;
1076 }
1078 coset_reps->init(A, verbose_level - 2);
1079 coset_reps->allocate(nb_aut_gens + 1, verbose_level - 2);
1080 A->element_one(coset_reps->ith(0), 0);
1081 for (i = 0; i < nb_aut_gens; i++) {
1082 A->element_move(Aut_gens[i], coset_reps->ith(i + 1), 0);
1083 FREE_int(Aut_gens[i]);
1084 }
1085 FREE_pint(Aut_gens);
1086
1087 if (f_vv) {
1088 cout << "semifield_level_two::upstep We are now extending the group by a factor "
1089 "of " << nb_aut_gens + 1 << ":" << endl;
1090 }
1091
1093 coset_reps, nb_aut_gens + 1, verbose_level - 3);
1094
1095 FREE_OBJECT(coset_reps);
1096
1097
1099
1101 if (f_vv) {
1102 cout << "semifield_level_two::upstep The new group order is " << go << endl;
1103 }
1104 if (FALSE) {
1105 cout << "semifield_level_two::upstep generators:" << endl;
1107 }
1108
1109
1110
1111 nb_orbits++;
1112 }
1113
1114 //Po = NEW_int(nb_orbits); // level two does not have Po[]
1115 So = NEW_int(nb_orbits);
1116 Fo = NEW_int(nb_orbits);
1119
1120
1121 for (i = 0; i < nb_orbits; i++) {
1123
1125
1126 f = defining_flag_orbit[i];
1127 idx = flag_orbit_classes[f * 2 + 0];
1128 a = class_rep_rank[idx];
1129 b = class_rep_plus_I_rank[idx];
1130 Fo[i] = f;
1131 So[i] = idx;
1132 Go[i] = go.as_lint();
1133 Pt[i] = a;
1134 }
1135
1136
1137
1138 if (f_v) {
1139 cout << "semifield_level_two::upstep We found "
1140 << nb_orbits << " orbits at level two" << endl;
1141 }
1142 if (f_vv) {
1143 cout << "i : defining_flag_orbit[i] : go" << endl;
1144 for (i = 0; i < nb_orbits; i++) {
1146 int *Mtx;
1147
1149 cout << i << " : " << defining_flag_orbit[i] << " : " << go << endl;
1150
1151 f = defining_flag_orbit[i];
1152
1153 idx = flag_orbit_classes[f * 2 + 0];
1154 a = class_rep_rank[idx];
1155 b = class_rep_plus_I_rank[idx];
1156
1157 Mtx = NEW_int(k2);
1158 SC->matrix_unrank(a, Mtx);
1159 cout << "semifield_level_two::upstep The representative of class " << idx
1160 << " is the following matrix of rank " << a << endl;
1162 cout << "semifield_level_two::upstep The stabilizer has order " << go << endl;
1163 if (FALSE) {
1164 cout << "The stabilizer is generated by the "
1165 "following matrices:" << endl;
1167 }
1168
1169
1170#if 0
1171 cout << "creating sims:" << endl;
1172 S = Stabilizer_gens[i].create_sims(0 /* verbose_level */);
1173 S->group_order(go1);
1174
1175 cout << "Sims object for group of order " << go1
1176 << " has been created, transversal lengths are ";
1177 S->print_transversal_lengths();
1178 cout << endl;
1179
1180 FREE_OBJECT(S);
1181#endif
1182
1183 FREE_int(Mtx);
1184 }
1185 }
1186
1187
1188 if (f_v) {
1189 cout << "semifield_level_two::upstep summary of "
1190 "fusion:" << endl;
1191 for (f = 0; f < nb_flag_orbits; f++) {
1192 if (f_Fusion[f]) {
1193 cout << "down orbit " << f << " is fused to down "
1194 "orbit " << Fusion_idx[f] << " under "
1195 "the element" << endl;
1196 if (FALSE) {
1197 cout << "Fusion element:" << endl;
1198 A->element_print(Fusion_elt[f], cout);
1199 }
1200 }
1201 else {
1202 cout << "down orbit " << f << " is associated "
1203 "to new orbit " << Fusion_idx[f] << endl;
1204 }
1205 }
1206 }
1207 if (f_v) {
1208 cout << "semifield_level_two::upstep done" << endl;
1209 }
1210}
1211
1212void semifield_level_two::trace(int f, int coset,
1213 long int a, long int b, int &f_automorphism, int *&Aut,
1214 int verbose_level)
1215// a and b are the ranks of two matrices whose span we consider.
1216{
1217 int f_v = (verbose_level >= 1);
1218 int f_vv = (verbose_level >= 2);
1219 int i, j;
1220 int idx1, idx2;
1221 int c1, c2;
1222 long int rk1, rk2;
1223 int d1, d2, d, cc1, cc2;
1224
1225 if (f_v) {
1226 cout << "semifield_level_two::trace a=" << a << " b=" << b << " f=" << f << endl;
1227 }
1228
1229 f_automorphism = FALSE;
1230
1231 c1 = flag_orbit_classes[f * 2 + 0];
1232 c2 = flag_orbit_classes[f * 2 + 1];
1233 rk1 = class_rep_rank[c1];
1234 rk2 = class_rep_plus_I_rank[c1];
1235 if (f_vv) {
1236 cout << "semifield_level_two::trace c1=" << c1 << " c2=" << c2
1237 << " rk1=" << rk1 << " rk2=" << rk2
1238 << " a=" << a << " b=" << b << endl;
1239 }
1240
1241
1242
1243 SC->matrix_unrank(a, Mtx1);
1244 SC->matrix_unrank(b, Mtx2);
1246
1247 Int_vec_zero(M1, n * n);
1248 for (i = 0; i < k; i++) {
1249 for (j = 0; j < k; j++) {
1250 M1[i * n + j] = Mtx1[i * k + j];
1251 }
1252 }
1253 for (i = k; i < n; i++) {
1254 M1[i * n + i] = 1;
1255 }
1256 if (f_vv) {
1257 cout << "semifield_level_two::trace transformation matrix Mtx1=" << endl;
1259 cout << "semifield_level_two::trace transformation matrix M1=" << endl;
1261 }
1262
1263 A->make_element(ELT1, M1, 0);
1264 if (f_vv) {
1265 cout << "semifield_level_two::trace ELT1=" << endl;
1266 A->print_quick(cout, ELT1);
1267 }
1268
1269 SC->A_on_S->compute_image_low_level(ELT1, Mtx1, Mtx4, 0 /* verbose_level */);
1270 SC->A_on_S->compute_image_low_level(ELT1, Mtx2, Mtx5, 0 /* verbose_level */);
1271 SC->A_on_S->compute_image_low_level(ELT1, Mtx3, Mtx6, 0 /* verbose_level */);
1272 //cout << "transformation matrix Mtx4=" << endl;
1273 //int_matrix_print(Mtx4, k, k);
1275 cout << "semifield_level_two::trace Mtx4 "
1276 "is not the identity matrix" << endl;
1277 exit(1);
1278 }
1279 if (f_vv) {
1280 cout << "semifield_level_two::trace after transform Mtx4=" << endl;
1282 cout << "semifield_level_two::trace after transform Mtx5=" << endl;
1284 cout << "semifield_level_two::trace after transform Mtx6=" << endl;
1286 }
1287
1288 if (f_v) {
1289 cout << "semifield_level_two::trace before identify_matrix Mtx5" << endl;
1290 }
1291 C->identify_matrix(Mtx5, R1, Basis1, verbose_level);
1292 if (f_v) {
1293 cout << "semifield_level_two::trace before identify_matrix Mtx6" << endl;
1294 }
1295 C->identify_matrix(Mtx6, R2, Basis2, verbose_level);
1296
1297 if (f_v) {
1298 cout << "semifield_level_two::trace before find_class_rep R1" << endl;
1299 }
1300 idx1 = C->find_class_rep(R, nb_classes, R1, 0 /* verbose_level */);
1301 if (f_v) {
1302 cout << "semifield_level_two::trace before find_class_rep R2" << endl;
1303 }
1304 idx2 = C->find_class_rep(R, nb_classes, R2, 0 /* verbose_level */);
1305
1306 if (f_vv) {
1307 cout << "semifield_level_two::trace f=" << f
1308 << " c1=" << c1 << " c2=" << c2 << " coset=" << coset
1309 << " rk1=" << rk1 << " rk2=" << rk2
1310 << " idx1 = " << idx1 << " idx2 = " << idx2 << endl;
1311 }
1312
1313
1314 if (idx1 == c1 || idx1 == c2) {
1315 if (f_vv) {
1316 cout << "semifield_level_two::trace automorphism" << endl;
1317 }
1318
1320 Basis1, ELT2, ELT3, 0 /* verbose_level */);
1321
1322 // check
1323 SC->A_on_S->compute_image_low_level(ELT3, Mtx1, Mtx4, 0 /* verbose_level */);
1324 SC->A_on_S->compute_image_low_level(ELT3, Mtx2, Mtx5, 0 /* verbose_level */);
1325 SC->A_on_S->compute_image_low_level(ELT3, Mtx3, Mtx6, 0 /* verbose_level */);
1326
1327 if (f_vv) {
1328 cout << "semifield_level_two::trace after transform (2) Mtx4=" << endl;
1330 cout << "semifield_level_two::trace after transform (2) Mtx5=" << endl;
1332 cout << "semifield_level_two::trace after transform (2) Mtx6=" << endl;
1334 }
1335
1336
1337 if (c1 != c2 && idx1 == c2) {
1338 if(f_vv) {
1339 cout << "semifield_level_two::trace multiplying Basis_inv to the right" << endl;
1340 }
1343 ELT2, ELT1, 0 /* verbose_level */);
1344 }
1345 else {
1346 A->element_move(ELT3, ELT1, 0);
1347 }
1348
1349
1350 // check
1351 SC->A_on_S->compute_image_low_level(ELT1, Mtx1, Mtx4, 0 /* verbose_level */);
1352 SC->A_on_S->compute_image_low_level(ELT1, Mtx2, Mtx5, 0 /* verbose_level */);
1353 SC->A_on_S->compute_image_low_level(ELT1, Mtx3, Mtx6, 0 /* verbose_level */);
1354
1355 if (f_vv) {
1356 cout << "semifield_level_two::trace after transform (3) Mtx4=" << endl;
1358 cout << "semifield_level_two::trace after transform (3) Mtx5=" << endl;
1360 cout << "semifield_level_two::trace after transform (3) Mtx6=" << endl;
1362 }
1363
1364
1365
1366
1367 if (f_vv) {
1368 A->element_print_quick(ELT1, cout);
1369 }
1370
1371
1372
1373
1374#if 0
1375 image1 = SF->AS->element_image_of(0, ELT1, 0 /* verbose_level */);
1376 image2 = SF->AS->element_image_of(a, ELT1, 0 /* verbose_level */);
1377 image3 = SF->AS->element_image_of(b, ELT1, 0 /* verbose_level */);
1378 if (f_v) {
1379 cout << "images: " << endl;
1380 cout << "0 -> " << image1 << endl;
1381 cout << a << " -> " << image2 << endl;
1382 cout << b << " -> " << image3 << endl;
1383 }
1384 int set1[3];
1385 int set2[3];
1386 set1[0] = 0;
1387 set1[1] = a;
1388 set1[2] = b;
1389 set2[0] = image1;
1390 set2[1] = image2;
1391 set2[2] = image3;
1392 int_vec_heapsort(set1, 3);
1393 int_vec_heapsort(set2, 3);
1394 if (int_vec_compare(set1, set2, 3)) {
1395 cout << "Error: The automorphism does not stabilize "
1396 "the subspace." << endl;
1397 exit(1);
1398 }
1399#endif
1400 f_automorphism = TRUE;
1401 Aut = NEW_int(A->elt_size_in_int);
1402 A->element_move(ELT1, Aut, 0);
1403
1404 }
1405 else {
1406 if (f_v) {
1407 cout << "semifield_level_two::trace Fusion" << endl;
1408 }
1410 ELT2, ELT3, 0 /* verbose_level */);
1411 A->element_move(ELT3, ELT1, 0);
1412
1413 d1 = class_to_flag_orbit[idx1];
1414 d2 = class_to_flag_orbit[idx2];
1415 if (d1 != d2) {
1416 cout << "d1 != d2" << endl;
1417 exit(1);
1418 }
1419 d = d1;
1420 cc1 = flag_orbit_classes[d * 2 + 0];
1421 cc2 = flag_orbit_classes[d * 2 + 1];
1422 if (cc1 != cc2 && idx1 == cc2) {
1423 if (f_vv) {
1424 cout << "semifield_level_two::trace "
1425 "multiplying Basis_inv to the right" << endl;
1426 }
1429 ELT2, ELT3,
1430 0 /* verbose_level */);
1431 A->element_move(ELT3, ELT1, 0);
1432 }
1433 else {
1434 }
1435 A->element_invert(ELT1, ELT3, 0);
1436 f_Fusion[d] = TRUE;
1437 Fusion_idx[d] = f;
1439 A->element_move(ELT3, Fusion_elt[d], 0);
1440 }
1441
1442 if (f_v) {
1443 cout << "semifield_level_two::trace done" << endl;
1444 }
1445}
1446
1448 int *ELT1, int *Mtx, int *ELT2, int *ELT3,
1449 int verbose_level)
1450// Creates the n x n matrix which is the 2 x 2 block matrix
1451// (A 0)
1452// (0 A)
1453// where A is Mtx.
1454// The resulting element is stored in ELT2.
1455// After this, ELT1 * ELT2 will be stored in ELT3
1456{
1457 int f_v = (verbose_level >= 1);
1458 int *M;
1459 int i, j, a;
1460
1461 if (f_v) {
1462 cout << "semifield_level_two::multiply_to_the_right" << endl;
1463 }
1464 //M = Mnn;
1465 M = NEW_int(n * n);
1466 Int_vec_zero(M, n * n);
1467 for (i = 0; i < k; i++) {
1468 for (j = 0; j < k; j++) {
1469 a = Mtx[i * k + j];
1470 M[i * n + j] = a;
1471 M[(k + i) * n + k + j] = a;
1472 }
1473 }
1474 A->make_element(ELT2, M, 0);
1475 A->element_mult(ELT1, ELT2, ELT3, 0);
1476
1477 FREE_int(M);
1478
1479 if (f_v) {
1480 cout << "semifield_level_two::multiply_to_the_right done" << endl;
1481 }
1482}
1483
1485 int orbit,
1486 long int *&Candidates, int &nb_candidates, int verbose_level)
1487{
1488 int f_v = (verbose_level >= 1);
1489 int *Mtx_A;
1490 int **Mtx_stack;
1491 int i;
1492 long int a;
1493 groups::sims *G;
1495 int alloc_length;
1496
1497
1498 if (f_v) {
1499 cout << "semifield_level_two::compute_candidates_at_level_two_case" << endl;
1500 }
1501 nb_candidates = 0;
1502 alloc_length = 1024;
1503 Candidates = NEW_lint(alloc_length);
1504
1505 Mtx_A = NEW_int(k * k);
1506 Mtx_stack = NEW_pint(2);
1507 for (i = 0; i < 2; i++) {
1508 Mtx_stack[i] = NEW_int(k * k);
1509 }
1510
1511 G = A_PGLk->Sims;
1512 G->group_order(go_PGL);
1513
1514 F->Linear_algebra->identity_matrix(Mtx_stack[0], k);
1515
1516 if (f_v) {
1517 cout << "semifield_level_two::compute_candidates_at_level_two_case "
1518 "Level 2, Looking at orbit " << orbit << " / "
1519 << nb_orbits << ":" << endl;
1520 }
1521
1522
1523 a = Pt[orbit];
1524
1525 if (FALSE) {
1526 cout << "semifield_level_two::compute_candidates_at_level_two_case "
1527 "a=" << a << endl;
1528 }
1529 SC->matrix_unrank(a, Mtx_stack[1]);
1530
1531 int nb_tested;
1532 int *Affine_k;
1533 int *Affine_2;
1534 int *Cnt;
1535 int *Mtx1, *Mtx2;
1536 int *B;
1537 int *base_cols;
1538 int N, N1, v[2], j, h, b1, b2;
1539 long int r;
1543
1544 N = NT.i_power_j(q, k);
1545 N1 = NT.i_power_j(q, 2);
1546
1547
1548 Affine_k = NEW_int(N * k);
1549 Affine_2 = NEW_int(N1 * 2);
1550 Cnt = NEW_int(k + 1);
1551 Mtx1 = NEW_int(k * k);
1552 Mtx2 = NEW_int(k * k);
1553 B = NEW_int(k2);
1554 base_cols = NEW_int(k);
1555
1556
1557 for (i = 0; i < N; i++) {
1558 Gg.AG_element_unrank(q, Affine_k + i * k, 1, k, i);
1559 }
1560 for (i = 0; i < N1; i++) {
1561 Gg.AG_element_unrank(q, Affine_2 + i * 2, 1, 2, i);
1562 }
1563 nb_tested = 0;
1564 Cnt[0] = 0;
1565 i = 0;
1566 while (i >= 0) {
1567 for (Cnt[i]++; Cnt[i] < N; Cnt[i]++) {
1568
1569#if 0
1570 // for debug purposes:
1571 if (i == 0) {
1572 if (Cnt[i] > 2) {
1573 continue;
1574 }
1575 }
1576#endif
1577
1578
1579 Int_vec_copy(Affine_k + Cnt[i] * k, Mtx1 + i * k, k);
1580 //AG_element_unrank(q, Mtx1 + i * k, 1, k, Cnt[i]);
1581 if (i < 2 && Mtx1[i * k + 0]) {
1582 continue;
1583 // we need zeroes in the first
1584 // two entries in the first column
1585 }
1586 Int_vec_copy(Mtx1, Mtx2, (i + 1) * k);
1588 Mtx2, i + 1, k, B, base_cols,
1589 0 /* verbose_level */) < i + 1) {
1590 continue; // rank is bad
1591 }
1592 // now rank is OK
1593 for (h = 1; h < N1; h++) {
1594 Int_vec_copy(Affine_2 + h * 2, v, 2);
1595 //AG_element_unrank(q, v, 1, 2, h);
1596
1597 // form the linear combination of
1598 // Mtx_stack and subtract from Mtx1:
1599 for (j = 0; j < (i + 1) * k; j++) {
1600 b1 = F->mult(Mtx_stack[0][j], v[0]);
1601 b2 = F->mult(Mtx_stack[1][j], v[1]);
1602 Mtx2[j] = F->add(Mtx1[j], F->negate(F->add(b1, b2)));
1603 }
1604#if 0
1605 cout << "semifield_level_two::compute_candidates_at_level_two_case "
1606 "testing linear combination ";
1607 int_vec_print(cout, v, 2);
1608 cout << endl;
1609 int_matrix_print(Mtx2, i + 1, k);
1610#endif
1612 Mtx2, i + 1, k, B, base_cols,
1613 0 /* verbose_level */) < i + 1) {
1614 break; // rank is bad
1615 }
1616 }
1617 if (h < N1) {
1618 // failed the test
1619 continue;
1620 }
1621 // we survived the tests:
1622 break;
1623 }
1624 if (Cnt[i] == N) {
1625 i--;
1626 }
1627 else {
1628 i++;
1629 Cnt[i] = 0;
1630 }
1631 nb_tested++;
1632 if ((nb_tested & ((1 << 17) - 1)) == 0) {
1633 cout << "semifield_level_two::compute_candidates_at_level_two_case "
1634 "orbit " << orbit << " / " << nb_orbits << " Cnt=";
1635 Int_vec_print(cout, Cnt, k);
1636 cout << " number tested = " << nb_tested
1637 << " Number of candidates = " << nb_candidates << endl;
1638 }
1639 if (i == k) {
1640#if 0
1641 if (!test_candidate(Mtx_stack, 2, Mtx1, verbose_level - 2)) {
1642 cout << "we survived the tests but "
1643 "test_candidate fails" << endl;
1644 int_matrix_print(Mtx1, k, k);
1645 exit(1);
1646 }
1647#endif
1648
1649 r = SC->matrix_rank(Mtx1);
1650 if (r < 0) {
1651 cout << "semifield_level_two::compute_candidates_at_level_two_case "
1652 "orbit r < 0" << endl;
1653 cout << "Mtx1:" << endl;
1655 exit(1);
1656 }
1658 Candidates, nb_candidates, alloc_length, r,
1659 0 /*verbose_level*/);
1660
1661
1662 i--;
1663 }
1664 } // while
1665
1666
1667 if (f_v) {
1668 cout << "semifield_level_two::compute_candidates_at_level_two_case "
1669 "Level 2: orbit " << orbit << " / " << nb_orbits
1670 << ": nb_tested = " << nb_tested << ", found "
1671 << nb_candidates << " candidates, sorting them now." << endl;
1672 }
1673 Sorting.lint_vec_heapsort(Candidates, nb_candidates);
1674
1675
1676
1677 FREE_int(Mtx_A);
1678 for (i = 0; i < 2; i++) {
1679 FREE_int(Mtx_stack[i]);
1680 }
1681 FREE_pint(Mtx_stack);
1682
1683 FREE_int(Affine_k);
1684 FREE_int(Affine_2);
1685 FREE_int(Cnt);
1686 FREE_int(Mtx1);
1687 FREE_int(Mtx2);
1688 FREE_int(B);
1689 FREE_int(base_cols);
1690 if (FALSE) {
1691 cout << "Level 2: orbit " << orbit << " / "
1692 << nb_orbits << ": found "
1693 << nb_candidates << " candidates:" << endl;
1694 //SC->print_set_of_matrices_numeric(Candidates, nb_candidates);
1695 }
1696 if (f_v) {
1697 cout << "semifield_level_two::compute_candidates_at_level_two_case "
1698 "done" << endl;
1699 }
1700}
1701
1702
1704 int verbose_level)
1705{
1706 int f_v = (verbose_level >= 1);
1707 int i;
1708
1709 if (f_v) {
1710 cout << "semifield_level_two::allocate_candidates_at_level_two" << endl;
1711 }
1714 for (i = 0; i < nb_orbits; i++) {
1715 Candidates[i] = NULL;
1716 }
1717 if (f_v) {
1718 cout << "semifield_level_two::allocate_candidates_at_level_two done" << endl;
1719 }
1720}
1721
1723 int orbit, int verbose_level)
1724{
1725 string fname;
1726 int f_v = (verbose_level >= 1);
1728
1730 if (Fio.file_size(fname) > 0) {
1731 if (f_v) {
1732 cout << "semifield_level_two::test_if_file_exists_candidates_at_level_two_case file "
1733 << fname << " exists" << endl;
1734 }
1735 return TRUE;
1736 }
1737 else {
1738 if (f_v) {
1739 cout << "semifield_level_two::test_if_file_exists_candidates_at_level_two_case file "
1740 << fname << " does not exist" << endl;
1741 }
1742 return FALSE;
1743 }
1744}
1745
1747 int orbit, int verbose_level)
1748{
1749 string fname;
1750 int f_v = (verbose_level >= 1);
1752
1754 if (Fio.file_size(fname) > 0) {
1755 if (f_v) {
1756 cout << "semifield_level_two::test_if_txt_file_exists_candidates_at_level_two_case file "
1757 << fname << " exists" << endl;
1758 }
1759 return TRUE;
1760 }
1761 else {
1762 if (f_v) {
1763 cout << "semifield_level_two::test_if_txt_file_exists_candidates_at_level_two_case file "
1764 << fname << " does not exist" << endl;
1765 }
1766 return FALSE;
1767 }
1768}
1769
1770
1772 int verbose_level)
1773{
1774 int f_v = (verbose_level >= 1);
1775 int orbit;
1777
1778 if (f_v) {
1779 cout << "semifield_level_two::find_all_candidates_at_level_two" << endl;
1780 }
1781 allocate_candidates_at_level_two(verbose_level);
1782 for (orbit = 0; orbit < nb_orbits; orbit++) {
1783
1784 if (f_v) {
1785 cout << "Level 2, looking at orbit " << orbit
1786 << " / " << nb_orbits << ":" << endl;
1787 }
1788
1789
1791 orbit, verbose_level)) {
1793 Candidates[orbit],
1794 Nb_candidates[orbit],
1795 orbit, verbose_level - 1);
1796 }
1798 orbit, verbose_level)) {
1800 Candidates[orbit],
1801 Nb_candidates[orbit],
1802 orbit, verbose_level - 1);
1803
1805 Candidates[orbit], Nb_candidates[orbit],
1806 orbit, verbose_level - 1);
1807 }
1808 else {
1809 if (f_v) {
1810 cout << "semifield_level_two::find_all_candidates_"
1811 "at_level_two Cannot find candidate file. "
1812 "before compute_candidates_at_level_two_case" << endl;
1813 }
1815 orbit,
1816 Candidates[orbit], Nb_candidates[orbit],
1817 verbose_level - 1);
1818 if (f_v) {
1819 cout << "semifield_level_two::find_all_candidates_"
1820 "at_two_three after compute_candidates_at_"
1821 "level_two_case" << endl;
1822 }
1823 if (f_v) {
1824 cout << "semifield_level_two::find_all_candidates_"
1825 "at_two_three before write_candidates_at_"
1826 "level_two_case" << endl;
1827 }
1829 Candidates[orbit], Nb_candidates[orbit],
1830 orbit, verbose_level - 1);
1831 if (f_v) {
1832 cout << "semifield_level_two::find_all_candidates_"
1833 "at_two_three after write_candidates_at_"
1834 "level_two_case" << endl;
1835 }
1836 }
1837
1838
1839 string fname_test;
1840
1842 fname_test, orbit, 0);
1843#if 0
1844 if (SC->f_level_two_prefix) {
1845 sprintf(fname_test, "%sC2_orbit%d_type%d_int8.bin",
1846 SC->level_two_prefix, orbit, (int) 0);
1847 }
1848 else {
1849 sprintf(fname_test, "C2_orbit%d_type%d_int8.bin",
1850 orbit, (int) 0);
1851 }
1852#endif
1853
1854 if (Fio.file_size(fname_test) >= 1) {
1855 cout << "Type files for orbit " << orbit
1856 << " exist" << endl;
1857 }
1858 else {
1859 cout << "Type files for orbit " << orbit
1860 << " do not exist" << endl;
1861 long int **Set;
1862 int *Set_sz;
1863 int Nb_sets;
1864 int window_bottom, window_size;
1865 int h;
1866
1867 window_bottom = k - 1;
1868 window_size = k - 2;
1870 Candidates[orbit],
1871 Nb_candidates[orbit],
1872 window_bottom, window_size,
1873 Set, Set_sz, Nb_sets,
1874 verbose_level);
1875
1876 for (h = 0; h < Nb_sets; h++) {
1877 string fname;
1878
1880 fname, orbit, h);
1881#if 0
1882 if (SC->f_level_two_prefix) {
1883 sprintf(fname, "%sC2_orbit%d_type%d_int8.bin",
1884 SC->level_two_prefix, orbit, h);
1885 }
1886 else {
1887 sprintf(fname, "C2_orbit%d_type%d_int8.bin",
1888 orbit, h);
1889 }
1890#endif
1891 Fio.write_set_to_file_as_int8(fname,
1892 Set[h], Set_sz[h],
1893 verbose_level);
1894 cout << "Written file " << fname << " of size "
1895 << Fio.file_size(fname) << endl;
1896 }
1897
1898 for (h = 0; h < Nb_sets; h++) {
1899 FREE_lint(Set[h]);
1900 }
1901 FREE_plint(Set);
1902 FREE_int(Set_sz);
1903 }
1904
1905
1906 } // next up_orbit
1907
1908 if (f_v) {
1909 cout << "semifield_level_two::find_all_candidates_at_level_two" << endl;
1910 cout << "orbit : Level 2 Nb_candidates" << endl;
1911 for (orbit = 0; orbit < nb_orbits; orbit++) {
1912 cout << orbit << " : "
1913 << Nb_candidates[orbit] << endl;
1914 }
1915 }
1916 if (f_v) {
1917 cout << "semifield_level_two::find_all_candidates_at_level_two done" << endl;
1918 }
1919}
1920
1922 long int *&Candidates, int &Nb_candidates, int orbit,
1923 int verbose_level)
1924{
1925 int f_v = (verbose_level >= 1);
1926 string fname;
1928
1929 if (f_v) {
1930 cout << "semifield_level_two::read_candidates_at_level_two_case" << endl;
1931 }
1933
1934 if (Fio.file_size(fname) > 0) {
1935 if (f_v) {
1936 cout << "Reading candidates from file "
1937 << fname << " of size "
1938 << Fio.file_size(fname) << endl;
1939 }
1940 //Fio.read_set_from_file_lint(fname,
1941 // Candidates, Nb_candidates, verbose_level);
1942 Fio.read_set_from_file_int8(fname,
1943 Candidates, Nb_candidates, verbose_level);
1944 if (f_v) {
1945 cout << "Reading candidates from file "
1946 << fname << " of size " << Fio.file_size(fname)
1947 << " done" << endl;
1948 cout << "We found " << Nb_candidates << " candidates" << endl;
1949 }
1950 }
1951 else {
1952 cout << "semifield_level_two::read_candidates_at_level_two_case file " << fname
1953 << " does not exist" << endl;
1954 exit(1);
1955 }
1956 if (f_v) {
1957 cout << "semifield_level_two::read_candidates_at_level_two_case done" << endl;
1958 }
1959}
1960
1962 long int *&Candidates, int &Nb_candidates, int orbit,
1963 int verbose_level)
1964{
1965 int f_v = (verbose_level >= 1);
1966 string fname;
1968
1969 if (f_v) {
1970 cout << "semifield_level_two::read_candidates_at_level_"
1971 "two_case_txt_file" << endl;
1972 }
1974
1975 if (Fio.file_size(fname) > 0) {
1976 if (f_v) {
1977 cout << "Reading candidates from file "
1978 << fname << " of size "
1979 << Fio.file_size(fname) << endl;
1980 }
1981 Fio.read_set_from_file_lint(fname,
1982 Candidates, Nb_candidates, verbose_level);
1983 //Fio.read_set_from_file_int8(fname,
1984 // Candidates, Nb_candidates, verbose_level);
1985 if (f_v) {
1986 cout << "Reading candidates from file "
1987 << fname << " of size " << Fio.file_size(fname)
1988 << " done" << endl;
1989 }
1990 }
1991 else {
1992 cout << "semifield_level_two::read_candidates_at_level_"
1993 "two_case_txt_file file " << fname
1994 << " does not exist" << endl;
1995 exit(1);
1996 }
1997 if (f_v) {
1998 cout << "semifield_level_two::read_candidates_at_level_"
1999 "two_case_txt_file done" << endl;
2000 }
2001}
2002
2003
2005 long int *Candidates, int Nb_candidates, int orbit,
2006 int verbose_level)
2007{
2008 int f_v = (verbose_level >= 1);
2009 string fname;
2011
2012 if (f_v) {
2013 cout << "semifield_level_two::write_candidates_"
2014 "at_level_two_case" << endl;
2015 }
2016
2018
2019 //Fio.write_set_to_file_lint(fname,
2020 // Candidates, Nb_candidates, 0 /*verbose_level*/);
2021 Fio.write_set_to_file_as_int8(fname,
2022 Candidates, Nb_candidates, 0 /*verbose_level*/);
2023
2024 if (f_v) {
2025 cout << "Written file " << fname << " of size "
2026 << Fio.file_size(fname) << endl;
2027 }
2028
2029 if (f_v) {
2030 cout << "semifield_level_two::write_candidates_"
2031 "at_level_two_case done" << endl;
2032 }
2033}
2034
2036 data_structures::set_of_sets_lint *&Candidates_by_type, int orbit,
2037 int verbose_level)
2038{
2039 int f_v = (verbose_level >= 1);
2040
2041 if (f_v) {
2042 cout << "semifield_level_two::read_candidates_at_level_"
2043 "two_by_type" << endl;
2044 }
2045
2046 Candidates_by_type = NEW_OBJECT(data_structures::set_of_sets_lint);
2047
2048 long int **Set;
2049 int *Set_sz;
2050 int Nb_sets;
2051 int /*window_bottom,*/ window_size;
2052 int h;
2055
2056 //window_bottom = k - 1;
2057 window_size = k - 2;
2058 Nb_sets = NT.i_power_j(q, window_size);
2059
2060 Set = NEW_plint(Nb_sets);
2061 Set_sz = NEW_int(Nb_sets);
2062 for (h = 0; h < Nb_sets; h++) {
2063 string fname;
2064
2066 fname, orbit, h);
2067#if 0
2068 if (SC->f_level_two_prefix) {
2069 sprintf(fname, "%sC2_orbit%d_type%d_int8.bin",
2070 SC->level_two_prefix, orbit, h);
2071 }
2072 else {
2073 sprintf(fname, "C2_orbit%d_type%d_int8.bin", orbit, h);
2074 }
2075#endif
2076 cout << "Reading file " << fname << " of size "
2077 << Fio.file_size(fname) << endl;
2078 if (Fio.file_size(fname) <= 0) {
2079 cout << "semifield_level_two::read_candidates_at_"
2080 "level_two_by_type file " << fname
2081 << " does not exist" << endl;
2082 exit(1);
2083 }
2084 Fio.read_set_from_file_int8(fname,
2085 Set[h], Set_sz[h],
2086 verbose_level);
2087 }
2088 int underlying_set_size = NT.i_power_j(q, k2);
2089
2090 if (f_v) {
2091 cout << "semifield_level_two::read_candidates_at_level_"
2092 "two_by_type initializing set_of_sets" << endl;
2093 }
2094
2095 Candidates_by_type->init(underlying_set_size,
2096 Nb_sets, Set, Set_sz, verbose_level);
2097
2098
2099 for (h = 0; h < Nb_sets; h++) {
2100 FREE_lint(Set[h]);
2101 }
2102 FREE_plint(Set);
2103 FREE_int(Set_sz);
2104
2105 if (f_v) {
2106 cout << "semifield_level_two::read_candidates_at_level_"
2107 "two_by_type done" << endl;
2108 }
2109}
2110
2112 int *basis, int *pivots, int verbose_level)
2113{
2114 int f_v = (verbose_level >= 1);
2115 //int f_vv = (verbose_level >= 2);
2116 //int f_vvv = (verbose_level >= 3);
2117 //int ext, idx;
2118 long int a;
2119
2120
2121 if (f_v) {
2122 cout << "semifield_level_two::get_basis_and_pivots"
2123 "pivots po=" << po << endl;
2124 }
2125
2127
2128#if 0
2129 ext = up_orbit_rep[po];
2130 idx = down_orbit_classes[ext * 2 + 0];
2131 a = class_rep_rank[idx];
2132#else
2133 a = Pt[po];
2134#endif
2135
2136
2137 SC->matrix_unrank(a, basis + k2);
2138
2139 pivots[0] = 0;
2140 pivots[1] = k;
2141
2142
2143 if (f_v) {
2144 cout << "semifield_level_two::get_basis_and_pivots"
2145 "pivots po=" << po << " done" << endl;
2146 }
2147}
2148
2150 ofstream &ost, int verbose_level)
2151{
2152 int f_v = (verbose_level >= 1);
2153 int i, j, ext, idx;
2154 long int a; //, b;
2155
2156
2157 if (f_v) {
2158 cout << "semifield_level_two::report" << endl;
2159 }
2160
2161 {
2162 //const char *fname = "Reps_lvl_2.tex";
2163 //ofstream fp(fname);
2164 //latex_interface L;
2165
2166 int *Mtx_Id;
2167 int *Mtx;
2168
2169 Mtx_Id = NEW_int(k2);
2170 Mtx = NEW_int(k2);
2171
2173
2174 if (f_v) {
2175 cout << "semifield_level_two::report "
2176 "before Conjugacy classes" << endl;
2177 }
2178
2179 ost << "\\section{Conjugacy classes without eigenvalue one}" << endl;
2180
2181 ost << "There are " << nb_classes << " conjugacy classes without eigenvalue one:\\\\" << endl;
2182
2183 ost << "\\begin{enumerate}[(1)]" << endl;
2184 for (i = 0; i < nb_classes; i++) {
2185 ost << "\\item" << endl;
2186
2187 int f_elements_exponential = FALSE;
2188 string symbol_for_print;
2189
2190 symbol_for_print.assign("\\alpha");
2191
2192
2193 a = class_rep_rank[i];
2194 //b = class_rep_plus_I_rank[i];
2195 if (f_v) {
2196 cout << "Representative of class " << i << " / " << nb_classes
2197 << " is matrix " << a << ":\\\\" << endl;
2198 }
2199 ost << "Representative of class " << i << " / " << nb_classes
2200 << " is matrix " << a << ":\\\\" << endl;
2201 SC->matrix_unrank(a, Mtx);
2202 ost << "$$" << endl;
2203 ost << "\\left[" << endl;
2204 F->latex_matrix(ost, f_elements_exponential,
2205 symbol_for_print, Mtx, k, k);
2206 ost << "\\right]";
2207 ost << "$$";
2208
2209#if 0
2210 int *class_rep_rank;
2215 strong_generators *Centralizer_gens;
2216 int *down_orbit_of_class;
2217#endif
2218
2219 ost << "$A+I$ belongs to class " << R_i_plus_I_class_idx[i] << "\\\\" << endl;
2220 ost << "flag\\_orbit\\_of\\_class = " << class_to_flag_orbit[i] << "\\\\" << endl;
2221
2222
2223
2224 //A_PGLk->make_element(Elt, Mtx, 0);
2225
2226 groups::strong_generators *Centralizer_gens;
2228
2229
2230 C->make_matrix_from_class_rep(Mtx, R + i, 0 /*verbose_level - 1 */);
2231
2232 Centralizer_gens = NEW_OBJECT(groups::strong_generators);
2233 Centralizer_gens->init_centralizer_of_matrix(
2234 A_PGLk, Mtx, verbose_level - 3);
2235 Centralizer_gens->group_order(go);
2236 ost << "Centralizer has order " << go << "\\\\" << endl;
2237 Centralizer_gens->print_generators_tex(ost);
2238 FREE_OBJECT(Centralizer_gens);
2239 }
2240 ost << "\\end{enumerate}" << endl;
2241 ost << endl;
2242
2243 if (f_v) {
2244 cout << "semifield_level_two::report before flag orbits" << endl;
2245 }
2246
2247
2248 ost << "\\section{Flag orbits at level 2}" << endl;
2249
2250 ost << "\\begin{enumerate}[(1)]" << endl;
2251
2252 for (i = 0; i < nb_flag_orbits; i++) {
2253
2254
2255 ost << "\\item" << endl;
2256 ost << i << " / " << nb_flag_orbits << ":\\\\" << endl;
2257 ost << "Classes: ";
2258 Int_vec_print(ost, flag_orbit_classes + i * 2, 2);
2259 ost << "\\\\" << endl;
2260 ost << "number\\_of\\_matrices = " << flag_orbit_number_of_matrices[i] << "\\\\" << endl;
2261 ost << "orbit\\_length = " << flag_orbit_length[i] << "\\\\" << endl;
2262 ost << "f\\_Fusion = " << f_Fusion[i] << "\\\\" << endl;
2263 ost << "Fusion\\_idx = " << Fusion_idx[i] << "\\\\" << endl;
2264 if (f_Fusion[i]) {
2265 ost << "Fusion\\_elt = \\\\" << endl;
2266 ost << "$$" << endl;
2268 ost << "$$" << endl;
2269 }
2272 ost << "Flag orbit stabilizer has order " << go << "\\\\" << endl;
2274
2275 }
2276
2277 ost << "\\end{enumerate}" << endl;
2278
2279 if (f_v) {
2280 cout << "semifield_level_two::report before Orbits at level 2" << endl;
2281 }
2282 ost << "\\section{Orbits at level 2}" << endl;
2283
2284 ost << "\\begin{enumerate}[(1)]" << endl;
2285 for (i = 0; i < nb_orbits; i++) {
2286
2287
2288 ost << "\\item" << endl;
2289
2291 //int *Elt1;
2292
2294 //cout << i << " : " << up_orbit_rep[i] << " : " << go << endl;
2295
2296#if 0
2297 ext = up_orbit_rep[i];
2298
2299 idx = down_orbit_classes[ext * 2 + 0];
2300 a = class_rep_rank[idx];
2301 b = class_rep_plus_I_rank[idx];
2302#else
2303 a = Pt[i];
2304#endif
2305
2306 //Elt1 = NEW_int(A_PGLk->elt_size_in_int);
2307 SC->matrix_unrank(a, Mtx);
2308 // A_PGLk->Sims->element_unrank_int(a, Elt1);
2309 //cout << "The representative of class " << idx
2310 //<< " is the following matrix of rank " << a << endl;
2311 //int_matrix_print(Mtx, k, k);
2312 //cout << "The stabilizer has order " << go << endl;
2313
2314 int f_elements_exponential = FALSE;
2315 string symbol_for_print;
2316
2317 symbol_for_print.assign("\\alpha");
2318
2319
2320 ext = defining_flag_orbit[i];
2321 idx = flag_orbit_classes[ext * 2 + 0];
2322 ost << "Representative " << i << " / " << nb_orbits
2323 << " classes " << idx << ","
2324 << flag_orbit_classes[ext * 2 + 1] << endl;
2325 ost << "\\{" << endl;
2326 for (j = 0; j < nb_flag_orbits; j++) {
2327 if (Fusion_idx[j] == i) {
2328 ost << j << ", ";
2329 }
2330 }
2331 ost << "\\}" << endl;
2332 ost << "$$" << endl;
2333 ost << "\\left\\{" << endl;
2334 ost << "\\left[" << endl;
2335 F->latex_matrix(ost, f_elements_exponential,
2336 symbol_for_print, Mtx_Id, k, k);
2337 ost << "\\right], \\;";
2338 ost << "\\left[" << endl;
2339 F->latex_matrix(ost, f_elements_exponential,
2340 symbol_for_print, Mtx, k, k);
2341 ost << "\\right]";
2342 ost << "\\right\\}" << endl;
2343 ost << "_{";
2344 ost << go << "}" << endl;
2345 ost << "$$" << endl;
2346
2348
2349 }
2350 ost << "\\end{enumerate}" << endl;
2351 ost << endl;
2352 if (f_v) {
2353 cout << "semifield_level_two::report "
2354 "after Orbits at level 2" << endl;
2355 }
2356
2357
2359 FREE_int(Mtx);
2360
2361 //L.foot(fp);
2362 }
2363 if (f_v) {
2364 cout << "semifield_level_two::report done" << endl;
2365 }
2366}
2367
2369{
2370 fname.assign(SC->level_two_prefix);
2371 fname.append("Level_2_info.csv");
2372 //sprintf(fname, "%sLevel_2_info.csv", SC->level_two_prefix);
2373}
2374
2375
2376
2378{
2379 int f_v = (verbose_level >= 1);
2381
2382 if (f_v) {
2383 cout << "semifield_level_two::write_level_info_file" << endl;
2384 }
2385 int i;
2386 int nb_vecs = 5;
2387 const char *column_label[] = {
2388 "Po",
2389 "So",
2390 "Fo",
2391 "Go",
2392 "Pt"
2393 };
2394 string fname;
2395
2397
2398 {
2399 ofstream f(fname);
2400 int j;
2401
2402 f << "Row";
2403 for (j = 0; j < nb_vecs; j++) {
2404 f << "," << column_label[j];
2405 }
2406 f << endl;
2407 for (i = 0; i < nb_orbits; i++) {
2408 f << i;
2409 f << "," << 0 /* Po[i]*/
2410 << "," << So[i]
2411 << "," << Fo[i]
2412 << "," << Go[i]
2413 << "," << Pt[i] << endl;
2414 }
2415 f << "END" << endl;
2416 }
2417
2418 cout << "Written file " << fname << " of size "
2419 << Fio.file_size(fname) << endl;
2420 if (f_v) {
2421 cout << "semifield_level_two::write_level_info_file done" << endl;
2422 }
2423}
2424
2425
2427{
2428 int f_v = (verbose_level >= 1);
2429 string fname;
2430 long int *M;
2431 int m, n, i;
2432 //int tmp;
2434
2435 if (f_v) {
2436 cout << "semifield_level_two::read_level_info_file" << endl;
2437 }
2439
2440 cout << "semifield_level_two::read_level_info_file " << fname << endl;
2441
2442 if (Fio.file_size(fname) <= 0) {
2443 cout << "semifield_lifting::read_level_info_file "
2444 "error trying to read the file " << fname << endl;
2445 exit(1);
2446 }
2447
2448 Fio.lint_matrix_read_csv(fname, M, m, n, 0 /* verbose_level */);
2449 // Row,Po,So,Mo,Go,Pt
2450
2451 nb_orbits = m;
2452
2453 //Po = NEW_int(m);
2454 So = NEW_int(m);
2455 Fo = NEW_int(m);
2456 Go = NEW_lint(m);
2457 Pt = NEW_lint(m);
2458
2459 for (i = 0; i < m; i++) {
2460 //Po[i] = M[i * n + 1];
2461 So[i] = M[i * n + 2];
2462 Fo[i] = M[i * n + 3];
2463 Go[i] = M[i * n + 4];
2464 Pt[i] = M[i * n + 5];
2465 }
2466
2467 FREE_lint(M);
2468
2469 if (f_v) {
2470 cout << "semifield_level_two::read_level_info_file done" << endl;
2471 }
2472}
2473
2474
2475
2476
2477
2478
2479}}}
2480
conjugacy class in GL(n,q) described using rational normal form
Definition: algebra.h:260
ring_theory::longinteger_object * class_length
Definition: algebra.h:264
void print_matrix_and_centralizer_order_latex(std::ostream &ost, gl_class_rep *R)
void make_classes(gl_class_rep *&R, int &nb_classes, int f_no_eigenvalue_one, int verbose_level)
Definition: gl_classes.cpp:471
void report(std::ostream &ost, int verbose_level)
void make_matrix_from_class_rep(int *Mtx, gl_class_rep *R, int verbose_level)
Definition: gl_classes.cpp:205
int find_class_rep(gl_class_rep *Reps, int nb_reps, gl_class_rep *R, int verbose_level)
void identify_matrix(int *Mtx, gl_class_rep *R, int *Basis, int verbose_level)
Definition: gl_classes.cpp:704
void init(long int underlying_set_size, int nb_sets, long int **Pts, int *Sz, int verbose_level)
a collection of functions related to sorted vectors
void lint_vec_append_and_reallocate_if_necessary(long int *&vec, int &used_length, int &alloc_length, long int a, int verbose_level)
Definition: sorting.cpp:441
void latex_matrix(std::ostream &f, int f_elements_exponential, std::string &symbol_for_print, int *M, int m, int n)
various functions related to geometries
Definition: geometry.h:721
void AG_element_unrank(int q, int *v, int stride, int len, long int a)
int rank_of_rectangular_matrix_memory_given(int *A, int m, int n, int *B, int *base_cols, int verbose_level)
void matrix_inverse(int *A, int *Ainv, int n, int verbose_level)
void write_set_to_file_as_int8(std::string &fname, long int *the_set, int set_size, int verbose_level)
Definition: file_io.cpp:2676
void read_set_from_file_lint(std::string &fname, long int *&the_set, int &set_size, int verbose_level)
Definition: file_io.cpp:2465
void lint_matrix_read_csv(std::string &fname, long int *&M, int &m, int &n, int verbose_level)
Definition: file_io.cpp:1558
void read_set_from_file_int8(std::string &fname, long int *&the_set, int &set_size, int verbose_level)
Definition: file_io.cpp:2586
domain to compute with objects of type longinteger
Definition: ring_theory.h:240
void integral_division_exact(longinteger_object &a, longinteger_object &b, longinteger_object &a_over_b)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
void element_print_latex(void *elt, std::ostream &ost)
Definition: action_cb.cpp:364
void coset_unrank(groups::sims *G, groups::sims *U, long int rank, int *Elt, int verbose_level)
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
void element_print(void *elt, std::ostream &ost)
Definition: action_cb.cpp:347
void print_quick(std::ostream &ost, void *elt)
Definition: action_cb.cpp:137
void element_mult(void *a, void *b, void *ab, int verbose_level)
Definition: action_cb.cpp:315
void element_invert(void *a, void *av, int verbose_level)
Definition: action_cb.cpp:322
void element_one(void *elt, int verbose_level)
Definition: action_cb.cpp:224
void make_element(int *Elt, int *data, int verbose_level)
Definition: action.cpp:1875
void element_move(void *a, void *b, int verbose_level)
Definition: action_cb.cpp:335
void group_order(ring_theory::longinteger_object &go)
Definition: action.cpp:2223
void init(actions::action *A, int verbose_level)
Definition: vector_ge.cpp:55
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
void group_order(ring_theory::longinteger_object &go)
Definition: sims.cpp:951
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void diagonally_repeat(actions::action *An, strong_generators *Sn, int verbose_level)
void add_single_generator(int *Elt, int group_index, int verbose_level)
void init_centralizer_of_matrix(actions::action *A, int *Mtx, int verbose_level)
void add_generators(data_structures_groups::vector_ge *coset_reps, int group_index, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
void compute_image_low_level(int *Elt, int *input, int *output, int verbose_level)
classification of semifields using poset classification
Definition: semifields.h:144
induced_actions::action_on_spread_set * A_on_S
Definition: semifields.h:174
void make_fname_candidates_at_level_two_orbit_txt(std::string &fname, int orbit)
void make_fname_candidates_at_level_two_orbit(std::string &fname, int orbit)
void candidates_classify_by_first_column(long int *Input_set, int input_set_sz, int window_bottom, int window_size, long int **&Set, int *&Set_sz, int &Nb_sets, int verbose_level)
void make_fname_candidates_at_level_two_orbit_by_type(std::string &fname, int orbit, int h)
void compute_candidates_at_level_two_case(int orbit, long int *&Candidates, int &nb_candidates, int verbose_level)
void trace(int f, int coset, long int a, long int b, int &f_automorphism, int *&Aut, int verbose_level)
void write_candidates_at_level_two_case(long int *Candidates, int Nb_candidates, int orbit, int verbose_level)
void read_candidates_at_level_two_case(long int *&Candidates, int &Nb_candidates, int orbit, int verbose_level)
int test_if_file_exists_candidates_at_level_two_case(int orbit, int verbose_level)
void read_candidates_at_level_two_by_type(data_structures::set_of_sets_lint *&Candidates_by_type, int orbit, int verbose_level)
int test_if_txt_file_exists_candidates_at_level_two_case(int orbit, int verbose_level)
void read_candidates_at_level_two_case_txt_file(long int *&Candidates, int &Nb_candidates, int orbit, int verbose_level)
void init(semifield_classify *SC, int verbose_level)
void multiply_to_the_right(int *ELT1, int *Mtx, int *ELT2, int *ELT3, int verbose_level)
void get_basis_and_pivots(int po, int *basis, int *pivots, int verbose_level)
#define FREE_OBJECTS(p)
Definition: foundations.h:652
#define NEW_plint(n)
Definition: foundations.h:629
#define FREE_int(p)
Definition: foundations.h:640
#define Int_vec_zero(A, B)
Definition: foundations.h:713
#define NEW_pint(n)
Definition: foundations.h:627
#define FREE_plint(p)
Definition: foundations.h:643
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define Int_matrix_print(A, B, C)
Definition: foundations.h:707
#define NEW_OBJECTS(type, n)
Definition: foundations.h:639
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
#define FREE_pint(p)
Definition: foundations.h:641
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects