Orbiter 2022
Combinatorial Objects
semifield_lifting.cpp
Go to the documentation of this file.
1/*
2 * semifield_lifting.cpp
3 *
4 * Created on: Apr 17, 2019
5 * Author: betten
6 */
7
8
9
10
11
12
13#include "orbiter.h"
14
15using namespace std;
16
17namespace orbiter {
18namespace layer5_applications {
19namespace semifields {
20
21
22
24{
25 SC = NULL;
26 L2 = NULL;
27 Prev = NULL;
28
29 n = k = k2 = 0;
30
31 cur_level = 0;
33
35 //prefix = NULL;
36
38 Candidates = NULL;
39 Nb_candidates = NULL;
40
41 Downstep_nodes = NULL;
43 flag_orbit_first = NULL;
44 flag_orbit_len = NULL;
45 Flag_orbits = NULL;
46 Gr = NULL;
47
48 nb_orbits = 0;
49 Po = NULL;
50 So = NULL;
51 Mo = NULL;
52 Go = NULL;
53 Pt = NULL;
54 Stabilizer_gens = NULL;
55
56 Matrix0 = Matrix1 = Matrix2 = NULL;
57 window_in = NULL;
58
59 ELT1 = ELT2 = ELT3 = NULL;
60 basis_tmp = NULL;
61 base_cols = NULL;
62 M1 = NULL;
63 Basis = NULL;
64 R1 = NULL;
65
66}
67
69{
70 if (flag_orbit_first) {
72 }
73 if (flag_orbit_len) {
75 }
76 if (Gr) {
78 }
79 if (Matrix0) {
81 }
82 if (Matrix1) {
84 }
85 if (Matrix2) {
87 }
88 if (window_in) {
90 }
91 if (ELT1) {
93 }
94 if (ELT2) {
96 }
97 if (ELT3) {
99 }
100
101 if (M1) {
102 FREE_int(M1);
103 }
104 if (Basis) {
106 }
107 if (basis_tmp) {
109 }
110 if (base_cols) {
112 }
113 if (R1) {
115 }
116}
117
120 int f_prefix, std::string &prefix,
121 int verbose_level)
122{
123 int f_v = (verbose_level >= 1);
124 int level = 3;
125
126 if (f_v) {
127 cout << "semifield_lifting::init_level_three" << endl;
128 }
130 SC = L2->SC;
131 n = SC->n;
132 k = SC->k;
133 k2 = SC->k2;
134 cur_level = 3;
139
141 Gr->init(level, level - 1, SC->Mtx->GFq, 0/*verbose_level - 10*/);
142
143 Matrix0 = NEW_int(k2);
144 Matrix1 = NEW_int(k2);
145 Matrix2 = NEW_int(k2);
147
149
150 A = SC->A;
151
155
156
157 M1 = NEW_int(n * n);
158 Basis = NEW_int(k * k);
159 basis_tmp = NEW_int(k * k2);
161
163
164 if (f_v) {
165 cout << "semifield_lifting::init_level_three done" << endl;
166 }
167}
168
169
170void semifield_lifting::report(ostream &ost, int verbose_level)
171{
172 int f_v = (verbose_level >= 1);
173 int i; //, j, ext, idx;
174 //long int a; //, b;
175
176
177 if (f_v) {
178 cout << "semifield_lifting::report" << endl;
179 }
180
181 {
182 //const char *fname = "Reps_lvl_2.tex";
183 //ofstream fp(fname);
184 //latex_interface L;
185
186
187 int *Mtx_Id;
188 int *Mtx1;
189 int *Mtx2;
190
191 Mtx_Id = NEW_int(k2);
192 Mtx1 = NEW_int(k2);
193 Mtx2 = NEW_int(k2);
194
196
197
198 if (f_v) {
199 cout << "semifield_lifting::report before flag orbits" << endl;
200 }
201
202 ost << endl;
203 ost << "\\bigskip" << endl;
204 ost << endl;
205
206
207
208 ost << "\\section{Flag orbits at level 3}" << endl;
209
210 ost << endl;
211
212 ost << "$$" << endl;
213 ost << "\\begin{array}{|r|r|r|}" << endl;
214 ost << "\\hline" << endl;
215 ost << "\\mbox{L2 Orbit} & \\mbox{Cand} & \\mbox{Flag orbits} \\\\" << endl;
216 ost << "\\hline" << endl;
217 ost << "\\hline" << endl;
218 for (i = 0; i < prev_level_nb_orbits; i++) {
219 ost << i << " & " << L2->Nb_candidates[i] << " & "
220 << Downstep_nodes[i].Sch->nb_orbits << "\\\\" << endl;
221 }
222 ost << "\\hline" << endl;
223 ost << "\\end{array}" << endl;
224 ost << "$$" << endl;
225
226 ost << endl;
227 ost << "\\bigskip" << endl;
228 ost << endl;
229
230
231 ost << endl;
232 ost << "There are " << nb_flag_orbits << " flag orbits at level 3" << endl;
233 ost << endl;
234 ost << "\\bigskip" << endl;
235 ost << endl;
236
237 ost << "\\begin{enumerate}[(1)]" << endl;
238
239 for (i = 0; i < nb_flag_orbits; i++) {
240
241
242 ost << "\\item" << endl;
243 ost << i << " / " << nb_flag_orbits << ":\\\\" << endl;
244
245
246 ost << "po=" << Flag_orbits[i].downstep_primary_orbit << ", ";
247 ost << "so=" << Flag_orbits[i].downstep_secondary_orbit << ", ";
248 ost << "pt=" << Flag_orbits[i].pt << ", ";
249 ost << "ol=" << Flag_orbits[i].downstep_orbit_len << "\\\\" << endl;
250
251 if (!Flag_orbits[i].f_fusion_node) {
252 ost << "Defining node for orbit " << Flag_orbits[i].upstep_orbit << endl;
253 //ost << "Flag orbit stabilizer has order " << Flag_orbits[i].gens->group_order_as_lint() << "\\\\" << endl;
254 //Flag_orbits[i].gens->print_generators_tex(ost);
255 }
256 else {
257 ost << "Fusion node for orbit " << Flag_orbits[i].fusion_with << endl;
258 }
259
260
261#if 0
262 int downstep_primary_orbit;
263 int downstep_secondary_orbit;
264 int pt_local;
265 long int pt;
266 int downstep_orbit_len;
267 int f_long_orbit;
268 int upstep_orbit; // if !f_fusion_node
269 int f_fusion_node;
270 int fusion_with;
271 int *fusion_elt;
272
273 longinteger_object go;
274 strong_generators *gens;
275#endif
276
277 }
278
279 ost << "\\end{enumerate}" << endl;
280
281 if (f_v) {
282 cout << "semifield_lifting::report before Orbits at level 3" << endl;
283 }
284 ost << "\\section{Orbits at level 3}" << endl;
285
286 ost << endl;
287 ost << "There are " << nb_orbits << " orbits at level 3" << endl;
288 ost << endl;
289 ost << "\\bigskip" << endl;
290 ost << endl;
291
292
293 ost << "\\begin{enumerate}[(1)]" << endl;
294 for (i = 0; i < nb_orbits; i++) {
295
296
297 ost << "\\item" << endl;
299 int po;
300
302
303 po = Po[i];
304 ost << "go=" << go << ", ";
305 ost << "po=" << Po[i] << ", ";
306 ost << "so=" << So[i] << ", ";
307 ost << "mo=" << Mo[i] << ", ";
308 ost << "go=" << Go[i] << ", ";
309 ost << "pt=" << Pt[i] << "\\\\" << endl;
310
311 SC->matrix_unrank(Pt[i], Mtx2);
312
313 int f_elements_exponential = FALSE;
314
315 SC->matrix_unrank(L2->Pt[po], Mtx1);
316
317
318 string symbol_for_print;
319
320 symbol_for_print.assign("\\alpha");
321
322 ost << "$$" << endl;
323 ost << "\\left\\{" << endl;
324 ost << "\\left[" << endl;
325 SC->Mtx->GFq->latex_matrix(ost, f_elements_exponential,
326 symbol_for_print, Mtx_Id, k, k);
327 ost << "\\right]";
328 ost << ",";
329 ost << "\\left[" << endl;
330 SC->Mtx->GFq->latex_matrix(ost, f_elements_exponential,
331 symbol_for_print, Mtx1, k, k);
332 ost << "\\right]";
333 ost << ",";
334 ost << "\\left[" << endl;
335 SC->Mtx->GFq->latex_matrix(ost, f_elements_exponential,
336 symbol_for_print, Mtx2, k, k);
337 ost << "\\right]";
338 ost << "\\right\\}" << endl;
339 ost << "_{";
340 ost << go << "}" << endl;
341 ost << "$$" << endl;
342
344
345 }
346 ost << "\\end{enumerate}" << endl;
347 ost << endl;
348 if (f_v) {
349 cout << "semifield_lifting::report "
350 "after Orbits at level 3" << endl;
351 }
352
353
354 FREE_int(Mtx_Id);
355 FREE_int(Mtx1);
356 FREE_int(Mtx2);
357 }
358 if (f_v) {
359 cout << "semifield_lifting::report done" << endl;
360 }
361}
362
363
365{
366 int f_v = (verbose_level >= 1);
367
368 if (f_v) {
369 cout << "semifield_lifting::recover_level_three_downstep" << endl;
370 }
371 if (f_v) {
372 cout << "semifield_lifting::recover_level_three_downstep "
373 "before downstep" << endl;
374 }
375
376 downstep(2, verbose_level);
377
378 if (f_v) {
379 cout << "semifield_lifting::recover_level_three_downstep "
380 "after downstep" << endl;
381 }
382
383
384 if (f_v) {
385 cout << "semifield_lifting::recover_level_three_downstep "
386 "after downstep" << endl;
387 }
388
389
390 if (f_v) {
391 cout << "semifield_lifting::recover_level_three_downstep done" << endl;
392 }
393}
394
396 int f_read_flag_orbits, int verbose_level)
397{
398 int f_v = (verbose_level >= 1);
399
400 if (f_v) {
401 cout << "semifield_lifting::recover_level_three_from_file" << endl;
402 }
403
404#if 0
405 if (f_v) {
406 cout << "semifield_lifting::recover_level_three_from_file "
407 "before find_all_candidates" << endl;
408 }
409
410 find_all_candidates(2, verbose_level);
411
412 if (f_v) {
413 cout << "semifield_lifting::recover_level_three_from_file "
414 "after find_all_candidates" << endl;
415 }
416#endif
417
418
419 if (f_read_flag_orbits) {
420
421 if (f_v) {
422 cout << "semifield_lifting::recover_level_three_from_file "
423 "before read_flag_orbits" << endl;
424 }
425 read_flag_orbits(verbose_level);
426 if (f_v) {
427 cout << "semifield_lifting::recover_level_three_from_file "
428 "after read_flag_orbits" << endl;
429 }
430 }
431
432 if (f_v) {
433 cout << "semifield_lifting::recover_level_three_from_file "
434 "before read_level_info_file" << endl;
435 }
436 read_level_info_file(verbose_level);
437 if (f_v) {
438 cout << "semifield_lifting::recover_level_three_from_file "
439 "after read_level_info_file" << endl;
440 }
441
442 if (f_v) {
443 cout << "semifield_lifting::recover_level_three_from_file "
444 "before read_stabilizers" << endl;
445 }
446 read_stabilizers(verbose_level);
447 if (f_v) {
448 cout << "semifield_lifting::recover_level_three_from_file "
449 "after read_stabilizers" << endl;
450 }
451
452
453
454 if (f_v) {
455 cout << "semifield_lifting::recover_level_three_from_file" << endl;
456 }
457}
458
460{
461 int f_v = (verbose_level >= 1);
462
463 if (f_v) {
464 cout << "semifield_lifting::compute_level_three" << endl;
465 }
466
467 if (f_v) {
468 cout << "semifield_lifting::compute_level_three "
469 "before level_two_down" << endl;
470 }
471
472 level_two_down(verbose_level - 2);
473
474 if (f_v) {
475 cout << "semifield_lifting::compute_level_three "
476 "after level_two_down" << endl;
477 }
478 if (f_v) {
479 int orbit;
480 cout << "semifield_lifting::level_two_down done, "
481 "we found the following candidate sets:" << endl;
482 cout << "Orbit : # candidates : # orbits" << endl;
483 for (orbit = 0; orbit < prev_level_nb_orbits; orbit++) {
484 cout << orbit << " : " << L2->Nb_candidates[orbit]
485 << " : " << Downstep_nodes[orbit].Sch->nb_orbits << endl;
486 }
487 }
488
489 if (f_v) {
490 cout << "semifield_lifting::compute_level_three "
491 "before level_two_flag_orbits" << endl;
492 }
493
494 level_two_flag_orbits(verbose_level - 1);
495
496 if (f_v) {
497 cout << "semifield_lifting::compute_level_three "
498 "after level_two_flag_orbits, nb_flag_orbits=" << nb_flag_orbits << endl;
499 }
500
501 if (f_v) {
502 cout << "semifield_lifting::compute_level_three "
503 "before level_two_upstep" << endl;
504 }
505
506 level_two_upstep(verbose_level - 1);
507
508 if (f_v) {
509 cout << "semifield_lifting::compute_level_three "
510 "after level_two_upstep, nb_orbits=" << nb_orbits << endl;
511 }
512 if (f_v) {
513 int i;
514 for (i = 0; i < nb_orbits; i++) {
515 cout << i;
516 cout << "," << Stabilizer_gens[i].group_order_as_lint() << ","
517 << Po[i] << "," << So[i] << "," << Mo[i] << "," << Pt[i] << endl;
518 }
519 }
520
521 if (f_v) {
522 cout << "semifield_lifting::compute_level_three "
523 "before save_flag_orbits" << endl;
524 }
525
526 save_flag_orbits(verbose_level);
527
528 if (f_v) {
529 cout << "semifield_lifting::compute_level_three "
530 "after save_flag_orbits" << endl;
531 }
532
533 if (f_v) {
534 cout << "semifield_lifting::compute_level_three "
535 "before save_stabilizers" << endl;
536 }
537 save_stabilizers(verbose_level);
538 if (f_v) {
539 cout << "semifield_lifting::compute_level_three "
540 "after save_stabilizers" << endl;
541 }
542
543
544 if (f_v) {
545 cout << "semifield_lifting::compute_level_three "
546 "done" << endl;
547 }
548}
549
551{
552 int f_v = (verbose_level >= 1);
553
554 if (f_v) {
555 cout << "semifield_lifting::level_two_down" << endl;
556 }
557 if (f_v) {
558 cout << "semifield_lifting::level_two_down "
559 "before downstep(2)" << endl;
560 }
561
562
563
564 downstep(2, verbose_level);
565
566#if 0
567 int Level_two_nb_orbits;
568 long int **Level_two_Candidates;
569 int *Level_two_Nb_candidates;
570
571 Level_two_nb_orbits = L2->nb_orbits;
572 Level_two_Candidates = L2->Candidates;
573 Level_two_Nb_candidates = L2->Nb_candidates;
574
575 //int **Candidates;
576 // candidates for the generator matrix,
577 // [nb_orbits]
578 //int *Nb_candidates;
579 // [nb_orbits]
580#endif
581
582
583 if (f_v) {
584 cout << "semifield_lifting::level_two_down "
585 "after downstep(2)" << endl;
586 }
587 if (f_v) {
588 int orbit;
589 cout << "semifield_lifting::level_two_down done, "
590 "we found the following candidate sets:" << endl;
591 cout << "Orbit : # candidates : # orbits" << endl;
592 for (orbit = 0; orbit < prev_level_nb_orbits; orbit++) {
593 cout << orbit << " : " << L2->Nb_candidates[orbit]
594 << " : " << Downstep_nodes[orbit].Sch->nb_orbits << endl;
595 }
596 }
597 if (f_v) {
598 cout << "semifield_lifting::level_two_down done" << endl;
599 }
600}
601
603{
604 int f_v = (verbose_level >= 1);
605
606 if (f_v) {
607 cout << "semifield_lifting::level_two_flag_orbits" << endl;
608 }
609
610 compute_flag_orbits(2 /* level */, verbose_level);
611
612 if (f_v) {
613 cout << "semifield_lifting::level_two_flag_orbits done" << endl;
614 }
615}
616
618{
619 int f_v = (verbose_level >= 1);
620
621 if (f_v) {
622 cout << "semifield_lifting::level_two_upstep" << endl;
623 }
624 upstep(3 /* level */,
625#if 0
626 Level_two_nb_orbits /* old_nb_orbits */,
627 Stabilizer_gens /* old_stabilizer_gens */,
628 Level_two_down /* Down */,
629 Level_two_middle /* M */,
630 level_two_nb_middle_nodes /* nb_middle_nodes */,
631 Level_three_po /* Po */,
632 Level_three_so /* So */,
633 Level_three_mo /* Mo */,
634 Level_three_pt /* Pt */,
635 Level_three_stabilizer_gens /* stabilizer_gens */,
636 Level_three_nb_orbits /* new_nb_orbits */,
637#endif
638 verbose_level);
639
640
641 if (f_v) {
642 cout << "semifield_lifting::level_two_upstep done" << endl;
643 }
644}
645
647 int level,
648 int verbose_level)
649{
650 int f_v = (verbose_level >= 1);
651 //int f_vv = (verbose_level >= 2);
652
653 if (f_v) {
654 cout << "semifield_lifting::downstep "
655 "level = " << level << endl;
656 }
657 int orbit;
658
659
660 if (f_v) {
661 cout << "semifield_lifting::downstep "
662 "level = " << level << " before find_all_candidates" << endl;
663 }
664 find_all_candidates(level, verbose_level);
665
666
667 if (f_v) {
668 int i;
669
670 cout << "semifield_lifting::downstep "
671 "level = " << level << " after find_all_candidates" << endl;
672 cout << "i : Nb_candidates[i]" << endl;
673 for (i = 0; i < prev_level_nb_orbits; i++) {
674 cout << i << " : " << Nb_candidates[i] << endl;
675 }
676 cout << endl;
677 }
678
679
680 if (f_v) {
681 cout << "semifield_lifting::downstep "
682 "level = " << level
683 << " before processing all primary orbits" << endl;
684 }
687
688 int first_flag_orbit = 0;
689
690 for (orbit = 0; orbit < prev_level_nb_orbits; orbit++) {
691 if (f_v) {
692 cout << "semifield_lifting::downstep "
693 "processing orbit " << orbit << " / "
694 << prev_level_nb_orbits << endl;
695 }
696
697 Downstep_nodes[orbit].init(this, level, orbit,
698 Candidates[orbit], Nb_candidates[orbit], first_flag_orbit,
699 verbose_level - 2);
700
701 first_flag_orbit += Downstep_nodes[orbit].Sch->nb_orbits;
702
703 if (f_v) {
704 cout << "semifield_lifting::downstep "
705 "level = " << level
706 << " orbit " << orbit << " / "
707 << prev_level_nb_orbits << " : we found "
708 << Downstep_nodes[orbit].Sch->nb_orbits << " orbits" << endl;
709 }
710
711 //cout << "semifield_starter::downstep processing "
712 //"orbit " << orbit << " / " << nb_orbits_at_level << " done" << endl;
713 }
714 if (f_v) {
715 cout << "semifield_lifting::downstep "
716 "level = " << level
717 << " after processing all primary orbits" << endl;
718 }
719
720 if (f_v) {
721 cout << "semifield_lifting::downstep level " << level << endl;
722 cout << "orbit : candidates : number of down orbits" << endl;
723 for (orbit = 0; orbit < prev_level_nb_orbits; orbit++) {
724 cout << orbit << " : " << Nb_candidates[orbit]
725 << " : " << Downstep_nodes[orbit].Sch->nb_orbits << endl;
726 }
727 }
728 if (f_v) {
729 int *Nb_orbits;
730 Nb_orbits = NEW_int(prev_level_nb_orbits);
731 for (orbit = 0; orbit < prev_level_nb_orbits; orbit++) {
732 Nb_orbits[orbit] = Downstep_nodes[orbit].Sch->nb_orbits;
733 }
735
736 C.init(Nb_orbits, prev_level_nb_orbits, FALSE, 0);
737 cout << "semifield_lifting::downstep "
738 "level " << level << " distribution of orbit lengths: ";
739 C.print(TRUE /* f_backwards */);
740 FREE_int(Nb_orbits);
741 }
742 if (f_v) {
743 cout << "semifield_lifting::downstep done" << endl;
744 }
745}
746
747
749 int level,
750 int verbose_level)
751{
752 int f_v = (verbose_level >= 1);
753 //int f_vv = (verbose_level >= 2);
754 //int f_vvv = (verbose_level >= 3);
755 //int f_v4 = (verbose_level >= 4);
756 int po;
757 int so, f, pt_local, len;
758 long int pt;
760 int *Mtx1;
761
762 if (f_v) {
763 cout << "semifield_lifting::compute_flag_orbits "
764 "level = " << level
765 << " verbose_level = " << level
766 << endl;
767 }
768
769 //int nb_flag_orbits;
770
771 //semifield_flag_orbit_node *Flag_orbits;
772
773
774
775 //Elt1 = NEW_int(A_PGLk->elt_size_in_int);
776 Mtx1 = NEW_int(k2);
777
780
781 nb_flag_orbits = 0;
782 for (po = 0; po < prev_level_nb_orbits; po++) {
783
786
787 if (flag_orbit_first[po] != Downstep_nodes[po].first_flag_orbit) {
788 cout << "semifield_lifting::compute_flag_orbits "
789 "flag_orbit_first[po] != Downstep_nodes[po].first_flag_orbit" << endl;
790 exit(1);
791 }
792 //Downstep_nodes[po].first_flag_orbit = nb_flag_orbits;
794 }
795
796 if (f_v && prev_level_nb_orbits < 100) {
797 cout << "semifield_lifting::compute_flag_orbits "
798 "done with downstep at level " << level << ":" << endl;
799 cout << "orbit : number of orbits" << endl;
800 for (po = 0; po < prev_level_nb_orbits; po++) {
801 cout << po << " : " << Downstep_nodes[po].Sch->nb_orbits << endl;
802 }
803 }
804 if (f_v) {
805 cout << "nb_flag_orbits = " << nb_flag_orbits << endl;
806 }
807
808 if (f_v) {
809 cout << "allocating flag orbit nodes" << endl;
810 }
812
813
814 if (f_v) {
815 cout << "looping over all " << prev_level_nb_orbits
816 << " primary orbits" << endl;
817 }
818 for (po = 0, f = 0; po < prev_level_nb_orbits; po++) {
821 int go_prev_int;
822
823
824 L2->Stabilizer_gens[po].group_order(go_prev);
825 go_prev_int = go_prev.as_int();
826
827 S = Downstep_nodes[po].Sch;
828
829 if (f_v) {
830 cout << "semifield_lifting::compute_flag_orbits "
831 "at level " << level << ": orbit = " << po
832 << " / " << prev_level_nb_orbits
833 << " stabilizer order " << go_prev
834 << " nb_secondary_orbits = " << S->nb_orbits
835 << " flag orbit f = " << f << " / " << nb_flag_orbits
836 << endl;
837 }
838
839 for (so = 0; so < S->nb_orbits; so++, f++) {
840
841 groups::sims *Stab;
842 int r;
843 int f_long_orbit;
844
845 pt_local = S->orbit[S->orbit_first[so]];
846 pt = Downstep_nodes[po].Candidates[pt_local];
847 len = S->orbit_len[so];
848 if (len == go_prev_int) {
849 f_long_orbit = TRUE;
850 }
851 else {
852 f_long_orbit = FALSE;
853 }
854 Flag_orbits[f].init(po, so,
855 pt_local, pt, len, f_long_orbit,
856 0 /*verbose_level*/);
857
858 D.integral_division_by_int(go_prev, len, Flag_orbits[f].go, r);
859 if ((f % 100) == 0) {
860 cout << "flag orbit " << f << " / " << nb_flag_orbits
861 << " po = " << po << " / "
863 << " so = " << so
864 << " / " << S->nb_orbits
865 << " pt_local=" << pt_local
866 << " / " << Downstep_nodes[po].nb_candidates
867 << " pt=" << pt
868 << " len=" << len
869 << " computing stabilizer of order "
870 << Flag_orbits[f].go << " f_long_orbit="
871 << f_long_orbit << endl;
872 SC->matrix_unrank(pt, Mtx1);
873 cout << "element " << pt << " is" << endl;
874 Int_matrix_print(Mtx1, k, k);
875 }
876
877 if (!f_long_orbit) {
878 if (FALSE/*M[j].go.is_one()*/) {
881 }
882 else {
883 S->point_stabilizer(SC->A, go_prev,
884 Stab, so /* orbit_no */, 0 /* verbose_level */);
885
886 //if (f_vvv) {
887 //cout << "orbit=" << orbit << " orbit=" << i
888 // << " computing strong generators" << endl;
889 //}
891 Flag_orbits[f].gens->init_from_sims(Stab, 0 /* verbose_level */);
892
893
894 FREE_OBJECT(Stab);
895 if ((f % 100) == 0) {
897
899 cout << "The flag orbit stabilizer has order " << go << endl;
900 }
901 }
902 }
903 else {
904 Flag_orbits[f].gens = NULL;
905 }
906 }
907 if (f_v) {
908 cout << "semifield_lifting::compute_flag_orbits "
909 "at level " << level << ": orbit = " << po
910 << " / " << prev_level_nb_orbits
911 << " stabilizer order " << go_prev
912 << " nb_secondary_orbits = " << S->nb_orbits
913 << " done" << endl;
914 }
915 }
916
917 if (f != nb_flag_orbits) {
918 cout << "semifield_lifting::compute_flag_orbits "
919 "f != nb_flag_orbits" << endl;
920 exit(1);
921 }
922
923
924 if (f_v) {
925 cout << "semifield_lifting::compute_flag_orbits "
926 "level " << level << " computing the distribution "
927 "of stabilizer orders" << endl;
928 int i;
929 long int *Go;
931 for (i = 0; i < nb_flag_orbits; i++) {
933 //Go[i] = M[i].gens->group_order_as_int();
934 //cout << i << " : " << Go[i] << endl;
935 }
937
939 cout << "semifield_lifting::compute_flag_orbits "
940 "level " << level << " distribution of "
941 "stabilizer orders of flag orbits is: ";
942 C.print(TRUE /* f_backwards */);
943 FREE_lint(Go);
944 }
945
946
947 FREE_int(Mtx1);
948 if (f_v) {
949 cout << "semifield_lifting::compute_flag_orbits "
950 "level " << level << " done" << endl;
951 }
952}
953
955 int level,
956 int verbose_level)
957// level is the level that we want to classify
958{
959 int f_v = (verbose_level >= 1);
960 int f_vv = (verbose_level >= 2);
961 //int f_vvv = (verbose_level >= 4);
962
963 if (f_v) {
964 cout << "semifield_lifting::upstep" << endl;
965 }
966
967 if (level != 3) {
968 cout << "semifield_lifting::upstep level != 3" << endl;
969 exit(1);
970 }
971 if (cur_level != 3) {
972 cout << "semifield_lifting::upstep cur_level != 3" << endl;
973 exit(1);
974 }
975 int f;
976 int *transporter;
977 int *Mtx;
978 //int *pivots;
979 int *base_change_matrix;
980 int *changed_space;
981 //int *changed_space_after_trace;
982 long int *set;
983 int i, N, h, po, so; //, pt_local;
984 long int pt;
985 //int trace_po, trace_so;
987 int /*fo,*/ class_idx;
988
989 transporter = NEW_int(SC->A->elt_size_in_int);
990
991 Mtx = NEW_int(level * k2);
992 //pivots = NEW_int(level);
993 base_change_matrix = NEW_int(level * level);
994 changed_space = NEW_int(level * k2);
995 //changed_space_after_trace = NEW_int(level * k2);
996 set = NEW_lint(level);
997
998 N = Combi.generalized_binomial(level, level - 1, SC->Mtx->GFq->q);
999
1000
1007
1008 nb_orbits = 0;
1009 for (f = 0; f < nb_flag_orbits; f++) {
1010
1011 if (f_v) {
1012 cout << "Level " << level << ": flag orbit "
1013 << f << " / " << nb_flag_orbits << endl;
1014 }
1015
1016 if (Flag_orbits[f].f_fusion_node) {
1017 if (f_v) {
1018 cout << "Level " << level << ": skipping flag orbit "
1019 << f << " / " << nb_flag_orbits
1020 << " as it is a fusion node" << endl;
1021 }
1022 continue;
1023 }
1024
1026
1028
1031 //pt_local = Flag_orbits[f].pt_local;
1032 pt = Flag_orbits[f].pt;
1033
1034 Po[nb_orbits] = po;
1035 So[nb_orbits] = so;
1036 Mo[nb_orbits] = f;
1037 Go[nb_orbits] = 0;
1038 Pt[nb_orbits] = pt;
1039
1040 if (f_v) {
1041 cout << "semifield_lifting::upstep Level "
1042 << level << " flag orbit " << f << " / "
1043 << nb_flag_orbits << ", before SC->matrix_unrank, pt = " << pt << endl;
1044 }
1045
1046 // level two stuff:
1047 //fo = L2->Fo[po];
1048 class_idx = L2->So[po];
1049 SC->matrix_unrank(L2->class_rep_rank[class_idx], Mtx + 1 * k2);
1050
1051
1052
1053 //get_pivots(level - 1, po, Mtx, pivots, verbose_level - 3);
1054 //int_vec_copy(SC->desired_pivots, pivots, level);
1055 SC->matrix_unrank(pt, Mtx + (level - 1) * k2);
1056
1057 if (f_v) {
1058 cout << "semifield_lifting::upstep Level "
1059 << level << " flag orbit " << f << " / "
1060 << nb_flag_orbits << endl;
1061 }
1062 if (f_vv) {
1063 cout << "Mtx=" << endl;
1064 Int_matrix_print(Mtx, level, k2);
1065 }
1066
1067
1068
1069 int **Aut;
1070
1071 Aut = NEW_pint(N);
1072
1074 level, f, po, so, N,
1075 transporter, Mtx, //pivots,
1076 base_change_matrix, changed_space,
1077 //changed_space_after_trace,
1078 set,
1079 Aut,
1080 verbose_level - 1);
1081
1082
1083 int nb_aut_gens;
1084
1085 nb_aut_gens = 0;
1086 for (h = 0; h < N; h++) {
1087 if (Aut[h]) {
1088 nb_aut_gens++;
1089 }
1090 }
1091
1092 if (Flag_orbits[f].f_long_orbit) {
1094 SC->A, 0 /* verbose_level */);
1095 }
1096 else {
1098 }
1099
1101
1103 coset_reps->init(SC->A, verbose_level - 2);
1104 coset_reps->allocate(nb_aut_gens, verbose_level - 2);
1105 i = 0;
1106 for (h = 0; h < N; h++) {
1107 if (Aut[h]) {
1108 SC->A->element_move(Aut[h], coset_reps->ith(i), 0);
1109 i++;
1110 }
1111 }
1112
1113
1114 for (h = 0; h < N; h++) {
1115 if (Aut[h]) {
1116 FREE_int(Aut[h]);
1117 }
1118 }
1119 FREE_pint(Aut);
1120
1121 if (f_v) {
1122 cout << "Level " << level << " orbit " << nb_orbits
1123 << " flag orbit " << f << " = " << po << " / " << so
1124 << " We are now extending the group by a factor of "
1125 << nb_aut_gens << ":" << endl;
1126 }
1127
1129 coset_reps, nb_aut_gens,
1130 0 /*verbose_level - 1*/);
1131
1132 FREE_OBJECT(coset_reps);
1133
1135
1137 Go[nb_orbits] = go.as_lint();
1138 if (f_v) {
1139 cout << "Level " << level << " orbit " << nb_orbits
1140 << " The new group order is " << go << endl;
1141 }
1142 if (f_v && ((f & ((1 << 10) - 1)) == 0)) {
1143 cout << "Level " << level << ": flag orbit " << f << " / "
1144 << nb_flag_orbits << " is linked to new orbit "
1145 << Flag_orbits[f].upstep_orbit << endl;
1146 }
1147
1148
1149
1150 nb_orbits++;
1151 }
1152
1153
1154 if (f_v) {
1155 cout << "semifield_lifting::upstep "
1156 "newly computed level " << level
1157 << " distribution of stabilizer orders: ";
1159 }
1160 if (f_v) {
1161 cout << "Level " << level << ", done with upstep, "
1162 "we found " << nb_orbits << " orbits" << endl;
1163 }
1164
1165
1166
1167 if (f_v) {
1168 cout << "Level " << level << ", done with upstep, "
1169 "we found " << nb_orbits << " orbits, "
1170 "saving information" << endl;
1171 }
1172
1173 write_level_info_file(verbose_level);
1174
1175
1176 FREE_int(transporter);
1177 FREE_int(Mtx);
1178 //FREE_int(pivots);
1179 FREE_int(base_change_matrix);
1180 FREE_int(changed_space);
1181 //FREE_int(changed_space_after_trace);
1182 FREE_lint(set);
1183
1184 if (f_v) {
1185 cout << "semifield_lifting::upstep "
1186 "level " << level << " done" << endl;
1187 }
1188}
1189
1190
1191
1193 int level, int f, int po, int so, int N,
1194 int *transporter, int *Mtx, //int *pivots,
1195 int *base_change_matrix,
1196 int *changed_space,
1197 //int *changed_space_after_trace,
1198 long int *set,
1199 int **Aut,
1200 int verbose_level)
1201// level is the level that we want to classify
1202{
1203 int f_v = (verbose_level >= 1);
1204 int f_vv = (verbose_level >= 2);
1205 int f_vvv = (verbose_level >= 3);
1206 int i;
1207 long int h;
1208 int trace_po, trace_so;
1209
1210 if (f_v) {
1211 cout << "semifield_lifting::upstep_loop_over_down_set" << endl;
1212 cout << "semifield_lifting::upstep_loop_over_down_set Mtx:" << endl;
1213 Int_matrix_print(Mtx, level, k2);
1214 }
1215
1216
1217 for (h = 0; h < N; h++) {
1218
1219 if (f_vv) {
1220 cout << "Level " << level << ": flag orbit "
1221 << f << " / " << nb_flag_orbits
1222 << " coset " << h << " / " << N << endl;
1223 }
1224 if (f_vvv) {
1225 cout << "semifield_lifting::upstep_loop_over_down_set "
1226 "before Gr->unrank_lint_here_and_extend_basis" << endl;
1227 }
1228
1230 base_change_matrix, h,
1231 0 /*verbose_level*/);
1232 if (f_vvv) {
1233 cout << "semifield_lifting::upstep_loop_over_down_set "
1234 "base_change_matrix=" << endl;
1235 Int_matrix_print(base_change_matrix, level, level);
1236 }
1237 if (f_vvv) {
1238 cout << "semifield_lifting::upstep_loop_over_down_set "
1239 "Mtx:" << endl;
1240 Int_matrix_print(Mtx, level, k2);
1241 }
1242 if (f_vvv) {
1243 cout << "semifield_lifting::upstep_loop_over_down_set "
1244 "before SC->F->mult_matrix_matrix" << endl;
1245 }
1246 SC->Mtx->GFq->Linear_algebra->mult_matrix_matrix(base_change_matrix,
1247 Mtx, changed_space, level, level, k2,
1248 0 /* verbose_level */);
1249 if (f_vvv) {
1250 cout << "Mtx:" << endl;
1251 Int_matrix_print(Mtx, level, k2);
1252 cout << "changed_space:" << endl;
1253 Int_matrix_print(changed_space, level, k2);
1254 }
1255 for (i = 0; i < level; i++) {
1256 if (f_vvv) {
1257 cout << "i=" << i << " / " << level << endl;
1258 Int_matrix_print(changed_space + i * k2, k, k);
1259 }
1260 set[i] = SC->matrix_rank(changed_space + i * k2);
1261 }
1262 if (f_vvv) {
1263 cout << "Level " << level << ": flag orbit "
1264 << f << " / " << nb_flag_orbits
1265 << " coset " << h << " / " << N << " set: ";
1266 Lint_vec_print(cout, set, level);
1267 cout << " before trace_very_general" << endl;
1268 }
1269
1271 changed_space,
1272 level,
1273 //changed_space_after_trace,
1274 transporter,
1275 trace_po, trace_so,
1276 verbose_level - 3);
1277
1278 if (f_vv) {
1279 cout << "Level " << level << ": flag orbit "
1280 << f << " / " << nb_flag_orbits
1281 << " coset " << h << " / " << N << " after trace_very_general "
1282 << " trace_po = " << trace_po
1283 << " trace_so = " << trace_so << endl;
1284 }
1285
1286 if (trace_po == po && trace_so == so) {
1287 if (f_vv) {
1288 cout << "Level " << level
1289 << ", we found an automorphism" << endl;
1290 }
1291 Aut[h] = NEW_int(SC->A->elt_size_in_int);
1292 SC->A->element_move(transporter, Aut[h], 0);
1293 //test_automorphism(Aut[h], level,
1294 // changed_space, verbose_level - 3);
1295 }
1296 else {
1297 Aut[h] = NULL;
1298 int mo;
1299
1300 mo = Downstep_nodes[trace_po].first_flag_orbit + trace_so;
1301
1302 if (f_vv) {
1303 cout << "Level " << level << ": flag orbit "
1304 << f << " / " << nb_flag_orbits
1305 << " coset " << h << " / " << N << " we will install a "
1306 "fusion node from " << mo << "=" << trace_po
1307 << "/" << trace_so << " to " << f
1308 << "=" << po << "/" << so << endl;
1309 }
1310 // install a fusion node:
1311
1312 if (Flag_orbits[mo].fusion_elt) {
1313 FREE_int(Flag_orbits[mo].fusion_elt);
1314 }
1316 Flag_orbits[mo].fusion_with = f;
1319 transporter,
1320 Flag_orbits[mo].fusion_elt, 0);
1321
1322 }
1323 }
1324
1325
1326 if (f_v) {
1327 cout << "semifield_lifting::upstep_loop_over_down_set done" << endl;
1328 }
1329
1330}
1331
1333 int level,
1334 int verbose_level)
1335{
1336 int f_v = (verbose_level >= 1);
1337
1338 if (f_v) {
1339 cout << "semifield_lifting::find_all_candidates = " << level << endl;
1340 }
1341
1342 if (level == 2 && cur_level == 3) {
1343 if (f_v) {
1344 cout << "semifield_lifting::find_all_candidates "
1345 "before find_all_candidates_at_level_two" << endl;
1346 }
1347 L2->find_all_candidates_at_level_two(verbose_level);
1351
1352 }
1353 else {
1354 cout << "semifield_lifting::find_all_candidates "
1355 "level = " << level << " nyi" << endl;
1356 exit(1);
1357 }
1358
1359#if 0
1360 else if (level == 3) {
1361 if (f_v) {
1362 cout << "semifield_lifting::find_all_candidates "
1363 "before find_all_candidates_at_level_three" << endl;
1364 }
1365 find_all_candidates_at_level_three(verbose_level);
1366 Nb_candidates = Level_three_Nb_candidates;
1367 }
1368 else if (level == 4) {
1369 if (f_v) {
1370 cout << "semifield_lifting::find_all_candidates "
1371 "before find_all_candidates_at_level_four" << endl;
1372 }
1373 find_all_candidates_at_level_four(
1374 Level_four_Candidates, Level_four_Nb_candidates,
1375 verbose_level);
1376 Nb_candidates = Level_four_Nb_candidates;
1377 }
1378#endif
1379
1380 if (f_v) {
1382
1384 cout << "semifield_lifting::find_all_candidates "
1385 "level " << level
1386 << " distribution of number of candidates: ";
1387 C.print(TRUE /* f_backwards */);
1388 }
1389
1390 if (f_v) {
1391 cout << "semifield_lifting::find_all_candidates "
1392 "level " << level << " done" << endl;
1393 }
1394}
1395
1396
1398 int po3, int *basis,
1399 int verbose_level)
1400{
1401 int f_v = (verbose_level >= 1);
1402 int f_vv = (verbose_level >= 2);
1403 //int f_vvv = (verbose_level >= 3);
1404 int po, so, mo;
1405 long int pt;
1406 long int a;
1407
1408 if (f_v) {
1409 cout << "semifield_lifting::get_basis "
1410 "po3 = " << po3 << endl;
1411 }
1412
1414
1415 po = Po[po3];
1416 so = So[po3];
1417 mo = Mo[po3];
1418 pt = Pt[po3];
1419
1420 if (f_vv) {
1421 cout << "po=" << po << " so=" << so << " mo=" << mo
1422 << " pt=" << pt << endl;
1423 }
1424
1425#if 0
1426 ext = L2->up_orbit_rep[po];
1427 idx = L2->down_orbit_classes[ext * 2 + 0];
1428 a = L2->class_rep_rank[idx];
1429#else
1430 a = L2->Pt[po];
1431#endif
1432
1433 SC->matrix_unrank(a, basis + 1 * k2);
1434
1435 SC->matrix_unrank(pt, basis + 2 * k2);
1436
1437#if 0
1438 pivots[0] = 0;
1439 pivots[1] = k;
1440 for (i = k - 1; i >= 2; i--) { // for (i = 2; i < k; i++)
1441 if (basis[2 * k2 + i * k + 0]) {
1442 pivots[2] = i * k;
1443 break;
1444 }
1445 }
1446 if (i == k) {
1447 cout << "Could not find pivot element" << endl;
1448 exit(1);
1449 }
1450 if (f_vv) {
1451 cout << "semifield_lifting::get_basis_and_pivots "
1452 "Basis:" << endl;
1453 int_matrix_print(basis, 3, k2);
1454 cout << "semifield_lifting::get_basis_and_pivots "
1455 "pivots: ";
1456 int_vec_print(cout, pivots, 3);
1457 cout << endl;
1458 }
1459#endif
1460
1461 if (f_v) {
1462 cout << "semifield_lifting::get_basis_and_pivots "
1463 "po=" << po << " done" << endl;
1464 }
1465}
1466
1467
1468
1470 int level, int orbit_idx,
1471 int verbose_level)
1472{
1473 int f_v = (verbose_level >= 1);
1474
1475 if (f_v) {
1476 cout << "semifield_lifting::get_stabilizer_generators "
1477 "level = " << level << " orbit_idx=" << orbit_idx << endl;
1478 }
1479
1480 if (level == 2 && cur_level == 3) {
1481 if (f_v) {
1482 cout << "semifield_lifting::get_stabilizer_generators "
1483 "before find_all_candidates_at_level_two" << endl;
1484 }
1485 if (orbit_idx >= L2->nb_orbits) {
1486 cout << "semifield_lifting::get_stabilizer_generators "
1487 "orbit_idx >= L2->nb_orbits" << endl;
1488 exit(1);
1489 }
1490 return &L2->Stabilizer_gens[orbit_idx];
1491 }
1492 cout << "semifield_lifting::get_stabilizer_generators "
1493 "level not yet implemented" << endl;
1494 exit(1);
1495}
1496
1498 int *input_basis, int basis_sz, int *transporter,
1499 int &trace_po,
1500 int verbose_level)
1501{
1502 int f_v = (verbose_level >= 1);
1503 int f_vv = (verbose_level >= 2);
1504 //int trace_po;
1505 int trace_so;
1506 int *Elt1;
1507 //int *basis_tmp;
1508 int ret;
1509
1510
1511 if (f_v) {
1512 cout << "semifield_lifting::trace_to_level_three" << endl;
1513 }
1514 Elt1 = NEW_int(SC->A->elt_size_in_int);
1515 //basis_tmp = NEW_int(basis_sz * k2);
1516
1517 if (f_v) {
1518 cout << "semifield_lifting::trace_to_level_three "
1519 "before trace_very_general" << endl;
1520 }
1522 input_basis, basis_sz, /*basis_tmp,*/ transporter,
1523 trace_po, trace_so,
1524 verbose_level);
1525 if (f_v) {
1526 cout << "semifield_lifting::trace_to_level_three "
1527 "after trace_very_general "
1528 "trace_po=" << trace_po
1529 << " trace_so=" << trace_so << endl;
1530 }
1531
1532 if (f_vv) {
1533 cout << "semifield_lifting::trace_to_level_three "
1534 "reduced basis=" << endl;
1535 Int_matrix_print(input_basis, basis_sz, k2);
1536 cout << "Which is:" << endl;
1537 SC->basis_print(input_basis, basis_sz);
1538 }
1539
1540 if (f_v) {
1541 cout << "semifield_lifting::trace_to_level_three "
1542 "before trace_step_up" << endl;
1543 }
1544 ret = trace_step_up(
1545 trace_po, trace_so,
1546 input_basis, basis_sz, basis_tmp,
1547 transporter, Elt1,
1548 verbose_level);
1549 if (f_v) {
1550 cout << "semifield_lifting::trace_to_level_three "
1551 "after trace_step_up" << endl;
1552 }
1553 if (ret == FALSE) {
1554 cout << "semifield_lifting::trace_to_level_three "
1555 "trace_step_up return FALSE" << endl;
1556
1557 }
1558
1559 FREE_int(Elt1);
1560 //FREE_int(basis_tmp);
1561
1562 if (f_v) {
1563 cout << "semifield_lifting::trace_to_level_three "
1564 "done" << endl;
1565 }
1566 return ret;
1567}
1568
1570 int &po, int &so,
1571 int *changed_basis, int basis_sz, int *basis_tmp,
1572 int *transporter, int *ELT3,
1573 int verbose_level)
1574{
1575 int f_v = (verbose_level >= 1);
1576 int f_vv = (verbose_level >= 1);
1577 int fo, f0;
1578 int i, j;
1579 int ret = TRUE;
1580
1581 if (f_v) {
1582 cout << "semifield_lifting::trace_step_up po=" << po << " so=" << so << endl;
1583 cout << "semifield_lifting::trace_step_up "
1584 "Downstep_nodes[po].first_flag_orbit="
1585 << Downstep_nodes[po].first_flag_orbit << endl;
1586 }
1587 fo = Downstep_nodes[po].first_flag_orbit + so;
1588 if (f_vv) {
1589 cout << "semifield_lifting::trace_step_up "
1590 "fo = " << fo << endl;
1591 }
1592 if (Flag_orbits[fo].f_fusion_node) {
1593 if (f_vv) {
1594 cout << "semifield_lifting::trace_step_up "
1595 "fusion node" << endl;
1596 }
1597 f0 = Flag_orbits[fo].fusion_with;
1598 SC->A->element_mult(transporter,
1599 Flag_orbits[fo].fusion_elt,
1600 ELT3,
1601 0 /* verbose_level */);
1602 SC->A->element_move(ELT3, transporter, 0);
1604 changed_basis, basis_tmp,
1605 0, basis_sz, verbose_level);
1606 if (f_vv) {
1607 cout << "semifield_lifting::trace_step_up "
1608 "after fusion:" << endl;
1609 Int_matrix_print(changed_basis, basis_sz, k2);
1610 cout << "Which is:" << endl;
1611 SC->basis_print(changed_basis, basis_sz);
1612 }
1613
1614 }
1615 else {
1616 f0 = fo;
1617 }
1618 if (f_vv) {
1619 cout << "semifield_lifting::trace_step_up "
1620 "f0 = " << f0 << endl;
1621 }
1622 po = Flag_orbits[f0].upstep_orbit;
1623 if (f_vv) {
1624 cout << "semifield_lifting::trace_step_up "
1625 "po = " << po << endl;
1626 }
1627 if (po == -1) {
1628 cout << "semifield_lifting::trace_step_up "
1629 "po == -1" << endl;
1630 exit(1);
1631 }
1632
1633#if 0
1634 int *pivots;
1635
1636 pivots = NEW_int(cur_level);
1637 get_pivots(3 /* level */,
1638 Flag_orbits[f0].upstep_orbit,
1639 pivots, changed_basis, verbose_level);
1640
1641 if (f_vv) {
1642 cout << "semifield_lifting::trace_step_up "
1643 "pivots=";
1644 int_vec_print(cout, pivots, 3);
1645 cout << endl;
1646 }
1647#endif
1648
1649
1650 if (f_vv) {
1651 cout << "semifield_lifting::trace_step_up "
1652 "before Gauss_int_with_given_pivots" << endl;
1653 Int_matrix_print(changed_basis, basis_sz, k2);
1654 }
1656 changed_basis,
1657 FALSE /* f_special */,
1658 TRUE /* f_complete */,
1660 3 /* nb_pivots */,
1661 3, //basis_sz m
1662 k2 /* n */,
1663 verbose_level)) {
1664 if (f_vv) {
1665 cout << "semifield_lifting::trace_step_up "
1666 "Gauss_int_with_given_pivots returns FALSE, "
1667 "pivot cannot be found" << endl;
1668 Int_matrix_print(changed_basis, basis_sz, k2);
1669 }
1670 ret = FALSE;
1671 }
1672 else {
1673 if (f_vv) {
1674 cout << "semifield_lifting::trace_step_up "
1675 "after Gauss_int_with_given_pivots:" << endl;
1676 Int_matrix_print(changed_basis, basis_sz, k2);
1677 }
1678 for (i = 0; i < 3; i++) {
1679 for (j = 3; j < basis_sz; j++) {
1680 SC->Mtx->GFq->Linear_algebra->Gauss_step(changed_basis + i * k2,
1681 changed_basis + j * k2, k2,
1682 SC->desired_pivots[i], 0 /*verbose_level*/);
1683 }
1684 }
1685 if (f_vv) {
1686 cout << "semifield_lifting::trace_step_up "
1687 "after reducing:" << endl;
1688 Int_matrix_print(changed_basis, basis_sz, k2);
1689 SC->basis_print(changed_basis, basis_sz);
1690 }
1691 }
1692
1693 //FREE_int(pivots);
1694 if (f_v) {
1695 cout << "semifield_lifting::trace_step_up done" << endl;
1696 }
1697 return ret;
1698}
1699
1700
1701
1703 int *input_basis, int basis_sz,
1704 int *transporter,
1705 int &trace_po, int &trace_so,
1706 int verbose_level)
1707// input basis is input_basis of size basis_sz x k2
1708// there is a check if input_basis defines a semifield
1709{
1710 int f_v = (verbose_level >= 1);
1711 int f_vv = (verbose_level >= 2);
1712 int f_vvv = (verbose_level >= 3);
1713 int i, j;
1714 actions::action *A;
1716
1717 if (f_v) {
1718 cout << "semifield_lifting::trace_very_general" << endl;
1719 }
1720 if (cur_level != 3) {
1721 cout << "semifield_lifting::trace_very_general cur_level != 3" << endl;
1722 exit(1);
1723 }
1724 A = SC->A;
1725 F = SC->Mtx->GFq;
1726 if (f_vv) {
1727 cout << "semifield_lifting::trace_very_general "
1728 "input basis:" << endl;
1729 SC->basis_print(input_basis, basis_sz);
1730 }
1731 if (!SC->test_partial_semifield(input_basis,
1732 basis_sz, 0 /* verbose_level */)) {
1733 cout << "does not satisfy the partial semifield condition" << endl;
1734 exit(1);
1735 }
1736
1737 if (f_v) {
1738 cout << "semifield_lifting::trace_very_general "
1739 "before trace_to_level_two" << endl;
1740 }
1742 input_basis, basis_sz,
1743 /*basis_after_trace,*/ transporter,
1744 trace_po,
1745 verbose_level);
1746 if (f_v) {
1747 cout << "semifield_lifting::trace_very_general "
1748 "after trace_to_level_two" << endl;
1749 cout << "trace_po=" << trace_po << endl;
1750 }
1751
1752
1753 // Step 2 almost finished.
1754 // Next we need to compute the reduced coset representatives
1755 // for the remaining elements
1756 // w.r.t. the basis and the pivots in base_col
1757
1758 if (f_vv) {
1759 cout << "semifield_lifting::trace_very_general "
1760 "we will now compute the reduced coset reps:" << endl;
1761 }
1762
1763 base_cols[0] = 0;
1764 base_cols[1] = k;
1765 if (f_vvv) {
1766 cout << "semifield_lifting::trace_very_general base_cols=";
1767 Int_vec_print(cout, base_cols, 2);
1768 cout << endl;
1769 }
1770 for (i = 0; i < 2; i++) {
1771 for (j = 2; j < basis_sz; j++) {
1772 F->Linear_algebra->Gauss_step(input_basis + i * k2,
1773 input_basis + j * k2, k2, base_cols[i],
1774 0 /*verbose_level*/);
1775 }
1776 }
1777 if (f_vv) {
1778 cout << "semifield_lifting::trace_very_general "
1779 "reduced basis=" << endl;
1780 Int_matrix_print(input_basis, basis_sz, k2);
1781 cout << "Which is:" << endl;
1782 SC->basis_print(input_basis, basis_sz);
1783 }
1784 if (!SC->test_partial_semifield(input_basis,
1785 basis_sz, 0 /* verbose_level */)) {
1786 cout << "does not satisfy the partial "
1787 "semifield condition" << endl;
1788 exit(1);
1789 }
1790
1791 // Step 3:
1792 // Locate the third matrix, compute its rank,
1793 // and find the rank in the candidates array to compute the local point.
1794 // Then find the point in the schreier structure
1795 // and compute a coset representative.
1796 // This coset representative stabilizes the subspace which is
1797 // generated by the first two vectors, so when applying the mapping,
1798 // we can skip the first two vectors.
1799
1800 long int a;
1801 int a_local, pos;
1802
1803 a = SC->matrix_rank(input_basis + 2 * k2);
1804 if (f_vv) {
1805 cout << "semifield_lifting::trace_very_general "
1806 "rank of row 2: a = " << a << endl;
1807 }
1808
1809 a_local = Downstep_nodes[trace_po].find_point(a);
1810 if (f_vv) {
1811 cout << "semifield_lifting::trace_very_general "
1812 "a_local = " << a_local << endl;
1813 }
1814
1815 pos = Downstep_nodes[trace_po].Sch->orbit_inv[a_local];
1816 trace_so = Downstep_nodes[trace_po].Sch->orbit_number(a_local);
1817 // Level_two_down[trace_po].Sch->orbit_no[pos];
1818
1819 if (f_vv) {
1820 cout << "semifield_lifting::trace_very_general "
1821 "trace_so = " << trace_so << endl;
1822 }
1823
1824 Downstep_nodes[trace_po].Sch->coset_rep_inv(pos, 0 /* verbose_level */);
1825 A->element_mult(transporter,
1826 Downstep_nodes[trace_po].Sch->cosetrep,
1827 ELT3,
1828 0 /* verbose_level */);
1829 A->element_move(ELT3, transporter, 0);
1830 // apply cosetrep to base elements 2,...,basis_sz - 1:
1832 Downstep_nodes[trace_po].Sch->cosetrep,
1833 input_basis, basis_tmp,
1834 2, basis_sz, verbose_level);
1835 if (f_vv) {
1836 cout << "semifield_lifting::trace_very_general "
1837 "after transforming with cosetrep from "
1838 "secondary orbit (4):" << endl;
1839 SC->basis_print(input_basis, basis_sz);
1840 }
1841 base_cols[0] = 0;
1842 base_cols[1] = k;
1843 if (f_vv) {
1844 cout << "semifield_lifting::trace_very_general "
1845 "base_cols=";
1846 Int_vec_print(cout, base_cols, 2);
1847 cout << endl;
1848 }
1849 for (i = 0; i < 2; i++) {
1850 for (j = 2; j < basis_sz; j++) {
1851 F->Linear_algebra->Gauss_step(input_basis + i * k2,
1852 input_basis + j * k2, k2,
1853 base_cols[i],
1854 0 /*verbose_level*/);
1855 }
1856 }
1857 if (f_vv) {
1858 cout << "semifield_lifting::trace_very_general "
1859 "reduced basis(2)=" << endl;
1860 Int_matrix_print(input_basis, basis_sz, k2);
1861 cout << "Which is:" << endl;
1862 SC->basis_print(input_basis, basis_sz);
1863 }
1864
1865#if 0
1866 if (!test_partial_semifield(input_basis,
1867 basis_sz, 0 /* verbose_level */)) {
1868 cout << "does not satisfy the partial semifield condition" << endl;
1869 exit(1);
1870 }
1871#endif
1872
1873 if (f_v) {
1874 cout << "semifield_lifting::trace_very_general done" << endl;
1875 }
1876
1877}
1878
1879
1881 int *input_basis, int basis_sz,
1882 int *transporter,
1883 int &trace_po,
1884 int verbose_level)
1885// input basis is input_basis of size basis_sz x k2
1886// there is a check if input_basis defines a semifield
1887{
1888 int f_v = (verbose_level >= 1);
1889 int f_vv = (verbose_level >= 2);
1890 int f_vvv = (verbose_level >= 3);
1891 int i, j, idx, d, d0, c0, c1;
1892 actions::action *A;
1894
1895 if (f_v) {
1896 cout << "semifield_lifting::trace_very_general" << endl;
1897 }
1898 if (cur_level != 3) {
1899 cout << "semifield_lifting::trace_very_general cur_level != 3" << endl;
1900 exit(1);
1901 }
1902 A = SC->A;
1903 F = SC->Mtx->GFq;
1904 if (f_vv) {
1905 cout << "semifield_lifting::trace_very_general "
1906 "input basis:" << endl;
1907 SC->basis_print(input_basis, basis_sz);
1908 }
1909 if (!SC->test_partial_semifield(input_basis,
1910 basis_sz, 0 /* verbose_level */)) {
1911 cout << "does not satisfy the partial semifield condition" << endl;
1912 exit(1);
1913 }
1914
1915
1916
1917
1918 // Step 1:
1919 // trace the first matrix (which becomes the identity matrix):
1920
1921 // create the n x n matrix which is a 2 x 2 block matrix
1922 // (A 0)
1923 // (0 I)
1924 // where A is input_basis
1925 // the resulting matrix will be put in transporter
1926 Int_vec_zero(M1, n * n);
1927 for (i = 0; i < k; i++) {
1928 for (j = 0; j < k; j++) {
1929 M1[i * n + j] = input_basis[i * k + j];
1930 }
1931 }
1932 for (i = k; i < n; i++) {
1933 M1[i * n + i] = 1;
1934 }
1935 A->make_element(transporter, M1, 0);
1936
1937 if (f_vvv) {
1938 cout << "transformation matrix transporter=" << endl;
1939 Int_matrix_print(transporter, n, n);
1940 cout << "transformation matrix M1=" << endl;
1942 }
1943
1944 // apply transporter to elements 0,...,basis_sz - 1 of input_basis
1945 SC->apply_element_and_copy_back(transporter,
1946 input_basis, basis_tmp,
1947 0, basis_sz, verbose_level);
1948 if (f_v) {
1949 cout << "semifield_lifting::trace_very_general "
1950 "after transform (1):" << endl;
1951 SC->basis_print(input_basis, basis_sz);
1952 }
1953 if (!F->Linear_algebra->is_identity_matrix(input_basis, k)) {
1954 cout << "semifield_lifting::trace_very_general "
1955 "basis_tmp is not the identity matrix" << endl;
1956 exit(1);
1957 }
1958
1959 // Now the first matrix has been transformed to the identity matrix.
1960 // The other matrices have been transformed as well.
1961
1962
1963 // Step 2:
1964 // Trace the second matrix using rational normal forms.
1965 // Do adjustment to get the right coset representative.
1966 // Apply fusion element if necessary
1967
1969 input_basis + 1 * k2,
1970 R1,
1971 Basis,
1972 0 /* verbose_level */);
1973
1974 idx = L2->C->find_class_rep(L2->R,
1975 L2->nb_classes, R1,
1976 0 /* verbose_level */);
1977 // idx is the conjugacy class, which leads to the flag orbit
1978
1979 d = L2->class_to_flag_orbit[idx];
1980
1981 // d is the flag orbit associated to the conjugacy class.
1982
1983
1984 if (f_vv) {
1985 cout << "semifield_lifting::trace_very_general "
1986 "the second matrix belongs to conjugacy class "
1987 << idx << " which is in down orbit " << d << endl;
1988 }
1989
1990 L2->multiply_to_the_right(transporter,
1991 Basis, ELT2, ELT3,
1992 0 /* verbose_level */);
1993
1994 // Applies the matrix diag(Basis, Basis) from the right to transporter
1995 // and puts the result into ELT3.
1996 // ELT2 = diag(Basis, Basis).
1997
1998
1999 A->element_move(ELT3, transporter, 0);
2000
2001 // apply ELT2 (i.e., Basis)
2002 // to input_basis elements 1, .., basis_sz - 1
2004 input_basis, basis_tmp,
2005 1, basis_sz, verbose_level);
2006 if (f_vv) {
2007 cout << "semifield_lifting::trace_very_general "
2008 "after transform (2):" << endl;
2009 SC->basis_print(input_basis, basis_sz);
2010 }
2011
2012 // now the second matrix is the flag orbit representative.
2013 // The other matrices have been transformed.
2014 //
2015
2016
2017 c0 = L2->flag_orbit_classes[d * 2 + 0];
2018 c1 = L2->flag_orbit_classes[d * 2 + 1];
2019
2020 // { c0, c1 } is the two conjugacy classes
2021 // associated with flag orbit d (possibly c0 = c1).
2022 // At least one of them has to equal idx.
2023 // If it is the second, we have to apply one more transformation.
2024
2025 if (c0 != idx && c1 == idx) {
2026
2027 // if the conjugacy class is the second element in the orbit,
2028 // we need to apply class_rep_plus_I_Basis_inv[c0]:
2029
2030 if (f_vv) {
2031 cout << "Adjusting" << endl;
2032 }
2033 L2->multiply_to_the_right(transporter,
2035 ELT2, ELT3,
2036 0 /* verbose_level */);
2037 A->element_move(ELT3, transporter, 0);
2038
2039 // apply ELT2 to the basis elements 1,...,basis_sz - 1:
2041 input_basis, basis_tmp,
2042 1, basis_sz, verbose_level);
2043 if (f_vvv) {
2044 cout << "semifield_lifting::trace_very_general "
2045 "after transform because of adjustment:" << endl;
2046 SC->basis_print(input_basis, basis_sz);
2047 }
2048 // subtract the first matrix (the identity) off the second matrix
2049 // so that the second matrix has a zero in the top left position.
2050 for (i = 0; i < k2; i++) {
2051 input_basis[1 * k2 + i] = F->add(
2052 input_basis[1 * k2 + i],
2053 F->negate(input_basis[i]));
2054 }
2055 if (f_vvv) {
2056 cout << "semifield_lifting::trace_very_general "
2057 "after subtracting the identity:" << endl;
2058 SC->basis_print(input_basis, basis_sz);
2059 }
2060 }
2061 else {
2062 if (f_vv) {
2063 cout << "No adjustment needed" << endl;
2064 }
2065 }
2066
2067 if (L2->f_Fusion[d]) {
2068 if (f_vv) {
2069 cout << "Applying fusion element" << endl;
2070 }
2071 if (L2->Fusion_elt[d] == NULL) {
2072 cout << "Fusion_elt[d] == NULL" << endl;
2073 exit(1);
2074 }
2075 d0 = L2->Fusion_idx[d];
2076 A->element_mult(transporter, L2->Fusion_elt[d], ELT3, 0);
2077 //multiply_to_the_right(transporter, Fusion_elt[d],
2078 //ELT2, ELT3, 0 /* verbose_level */);
2079 A->element_move(ELT3, transporter, 0);
2080
2081 // apply Fusion_elt[d] to the basis elements 0,1,...,basis_sz - 1
2083 L2->Fusion_elt[d],
2084 input_basis, basis_tmp,
2085 0, basis_sz,
2086 verbose_level);
2087 if (f_vvv) {
2088 cout << "semifield_lifting::trace_very_general "
2089 "after transform (3):" << endl;
2090 SC->basis_print(input_basis, basis_sz);
2091 }
2092 if (input_basis[0] == 0) {
2093 // add the second matrix to the first:
2094 for (j = 0; j < k2; j++) {
2095 input_basis[j] = F->add(
2096 input_basis[j], input_basis[k2 + j]);
2097 }
2098 }
2099 // now, input_basis[0] != 0
2100 if (input_basis[0] == 0) {
2101 cout << "input_basis[0] == 0" << endl;
2102 exit(1);
2103 }
2104 if (input_basis[0] != 1) {
2105 int lambda;
2106
2107 lambda = F->inverse(input_basis[0]);
2108 for (j = 0; j < k2; j++) {
2109 input_basis[j] = F->mult(input_basis[j], lambda);
2110 }
2111 }
2112 if (input_basis[0] != 1) {
2113
2114 cout << "input_basis[0] != 1" << endl;
2115 exit(1);
2116 }
2117 if (input_basis[k2]) {
2118 int lambda;
2119 lambda = F->negate(input_basis[k2]);
2120 for (j = 0; j < k2; j++) {
2121 input_basis[k2 + j] = F->add(
2122 input_basis[k2 + j],
2123 F->mult(input_basis[j], lambda));
2124 }
2125 }
2126 if (input_basis[k]) {
2127 int lambda;
2128 lambda = F->negate(input_basis[k]);
2129 for (j = 0; j < k2; j++) {
2130 input_basis[j] = F->add(
2131 input_basis[j],
2132 F->mult(input_basis[k2 + j], lambda));
2133 }
2134 }
2135 if (input_basis[k]) {
2136 cout << "input_basis[k] (should be zero by now)" << endl;
2137 exit(1);
2138 }
2139 if (f_vvv) {
2140 cout << "semifield_lifting::trace_very_general "
2141 "after gauss elimination:" << endl;
2142 SC->basis_print(input_basis, basis_sz);
2143 }
2144 }
2145 else {
2146 if (f_vv) {
2147 cout << "No fusion" << endl;
2148 }
2149 d0 = d;
2150 }
2151 if (f_vv) {
2152 cout << "semifield_lifting::trace_very_general "
2153 "d0 = " << d0 << endl;
2154 }
2155 if (L2->Fusion_elt[d0]) {
2156 cout << "Fusion_elt[d0]" << endl;
2157 exit(1);
2158 }
2159
2160
2161
2162 trace_po = L2->Fusion_idx[d0];
2163
2164 // trace_po = the level 2 orbit associated with the flag orbit d0
2165
2166
2167 if (f_vv) {
2168 cout << "semifield_lifting::trace_very_general "
2169 "trace_po = " << trace_po << endl;
2170 }
2171
2172
2173
2174
2175
2176 if (f_v) {
2177 cout << "semifield_lifting::trace_very_general done" << endl;
2178 }
2179}
2180
2181
2183 int orbit_r, int orbit_m,
2184 int f_out_path, std::string &out_path,
2185 int verbose_level)
2186{
2187 int f_v = (verbose_level >= 1);
2188 //int f_vv = FALSE; //(verbose_level >= 2);
2189
2190 if (f_v) {
2191 cout << "semifield_lifting::deep_search "
2192 "orbit_r=" << orbit_r
2193 << " orbit_m=" << orbit_m << endl;
2194 }
2195
2196
2197 L2->allocate_candidates_at_level_two(verbose_level);
2198
2199 if (f_v) {
2200 cout << "semifield_lifting::deep_search "
2201 "before read_level_info_file" << endl;
2202 }
2203 read_level_info_file(verbose_level);
2204 if (f_v) {
2205 cout << "semifield_lifting::deep_search "
2206 "after read_level_info_file" << endl;
2207 }
2208
2209 if (f_v) {
2210 cout << "semifield_lifting::deep_search "
2211 "before deep_search_at_level_three" << endl;
2212 }
2213
2214 int nb_sol;
2215
2216 deep_search_at_level_three(orbit_r, orbit_m,
2217 f_out_path, out_path,
2218 nb_sol,
2219 verbose_level);
2220 if (f_v) {
2221 cout << "semifield_lifting::deep_search "
2222 "after deep_search_at_level_three "
2223 "nb_sol=" << nb_sol << endl;
2224 }
2225
2226 if (f_v) {
2227 cout << "semifield_lifting::deep_search "
2228 " orbit_r=" << orbit_r
2229 << " orbit_m=" << orbit_m << " done" << endl;
2230 }
2231
2232}
2233
2235 int orbit_r, int orbit_m,
2236 int f_out_path, std::string &out_path,
2237 int &nb_sol,
2238 int verbose_level)
2239{
2240 int f_v = (verbose_level >= 1);
2241 int orbit;
2242 int *Basis;
2243 //int *pivots;
2244 int i;
2245 string fname;
2247
2248 if (f_v) {
2249 cout << "semifield_lifting::deep_search_at_level_three" << endl;
2250 }
2251
2252 nb_sol = 0;
2254 f_out_path, out_path, orbit_r, orbit_m);
2255
2256
2257 {
2258 ofstream fp(fname);
2259
2260
2261 Basis = NEW_int(k * k2);
2262 //pivots = NEW_int(k2);
2263
2264
2265 if (f_v) {
2266 cout << "semifield_lifting::deep_search_at_level_three "
2267 "Level_three_nb_orbits = " << nb_orbits << endl;
2268 }
2269
2270 for (orbit = 0; orbit < nb_orbits; orbit++) {
2271
2272 if ((orbit % orbit_m) != orbit_r) {
2273 continue;
2274 }
2275
2276 cout << "semifield_lifting::deep_search_at_level_three orbit "
2277 << orbit << " / " << nb_orbits << ":" << endl;
2278
2279 for (i = 0; i < 3; i++) {
2280 cout << "matrix " << i << ":" << endl;
2281 Int_matrix_print(Basis + i * k2, k, k);
2282 }
2283 cout << "pivots: ";
2284 Int_vec_print(cout, SC->desired_pivots, 3);
2285 cout << endl;
2286
2287
2288 if (k == 6) {
2290 Basis, SC->desired_pivots, fp, nb_sol, verbose_level);
2291 }
2292#if 0
2293 else if (k == 5) {
2294 deep_search_at_level_three_orbit_depth2(orbit,
2295 Basis, pivots, fp, verbose_level);
2296 }
2297#endif
2298
2299 }
2300 }
2301 cout << "Written file " << fname << " of size "
2302 << Fio.file_size(fname) << endl;
2303
2304
2306 f_out_path, out_path, orbit_r, orbit_m);
2307 {
2308 ofstream fp(fname);
2309 fp << "Case " << orbit_r << " mod " << orbit_m
2310 << " is done" << endl;
2311 }
2312 cout << "Written file " << fname << " of size "
2313 << Fio.file_size(fname) << endl;
2314
2315
2316 FREE_int(Basis);
2317 //FREE_int(pivots);
2318 if (f_v) {
2319 cout << "semifield_lifting::deep_search_at_level_three "
2320 "done" << endl;
2321 }
2322}
2323
2325{
2326 //long int *Go;
2327 //int i;
2328#if 0
2330 for (i = 0; i < nb_orbits; i++) {
2332 }
2333#endif
2335
2336 C.init_lint(Go, nb_orbits, FALSE, 0);
2337 cout << "distribution of stabilizer orders at level " << cur_level << " : ";
2338 C.print(TRUE /* f_backwards */);
2339 //FREE_lint(Go);
2340}
2341
2343 int orbit, int *Basis, int *pivots,
2344 ofstream &fp,
2345 int &nb_sol,
2346 int verbose_level)
2347// deep search for levels three to six
2348// this function is called from
2349// semifield_starter::deep_search_at_level_three
2350// in semifield_starter_level_three.cpp
2351{
2352 int f_v = (verbose_level >= 1);
2353 int f_vv = (verbose_level >= 2);
2354 int f_v3 = (verbose_level >= 3);
2355 int f_v4 = FALSE; //(verbose_level >= 3);
2356 int po;
2357 long int a1, a2, a3;
2358 int cur_pivot_row;
2359 int u;
2360 data_structures::set_of_sets_lint *C3; // Level two candidates sorted by type
2361 data_structures::set_of_sets_lint *C4; // those that are compatible with A_3
2362 data_structures::set_of_sets_lint *C5; // those that are compatible with A_4
2363 data_structures::set_of_sets_lint *C6; // those that are compatible with A_5
2364
2365
2366 if (f_v) {
2367 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2368 << orbit << " / " << nb_orbits << endl;
2369 }
2370
2371 cur_pivot_row = pivots[2] / k;
2372 if (f_vv) {
2373 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2374 "cur_pivot_row = " << cur_pivot_row << endl;
2375 }
2376
2377 if (cur_pivot_row != k - 1) {
2378 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2379 "cur_pivot_row != k - 1" << endl;
2380
2381 fp << "start orbit " << orbit << endl;
2382 fp << "finish orbit " << orbit << " " << nb_sol << endl;
2383
2384 if (f_v) {
2385 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2386 << orbit << " / " << nb_orbits
2387 << " skipped because pivot is not in the last row, "
2388 "nb_sol = " << nb_sol << endl;
2389 }
2390
2391 return;
2392 //exit(1);
2393 }
2394
2395
2396 fp << "start orbit " << orbit << endl;
2397
2398 level_three_get_a1_a2_a3(orbit, a1, a2, a3, verbose_level);
2399
2400 po = Po[orbit];
2401
2402
2403
2404
2405 if (f_v) {
2406 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2407 << orbit << " / " << nb_orbits
2408 << " reading candidates by type, po = " << po << endl;
2409 }
2410 L2->read_candidates_at_level_two_by_type(C3, po, verbose_level - 2);
2411 // semifield_starter_level_two.cpp
2412 // reads the files "C2_orbit%d_type%d_int4.bin"
2413 // this function allocates C3
2414
2418
2419 long int underlying_set_size;
2420 int max_l = 0;
2421 long int *Tmp1;
2422 long int *Tmp2;
2424
2425 underlying_set_size = NT.i_power_j(SC->q, k2);
2426
2427 C4->init_simple(underlying_set_size, NT.i_power_j(SC->q, k - 3),
2428 0 /*verbose_level - 2*/);
2429 C5->init_simple(underlying_set_size, NT.i_power_j(SC->q, k - 4),
2430 0 /*verbose_level - 2*/);
2431 C6->init_simple(underlying_set_size, NT.i_power_j(SC->q, k - 5),
2432 0 /*verbose_level - 2*/);
2433
2434 for (u = 0; u < C3->nb_sets; u++) {
2435 max_l = MAXIMUM(max_l, C3->Set_size[u]);
2436 }
2437 Tmp1 = NEW_lint(max_l);
2438 Tmp2 = NEW_lint(max_l);
2439
2440
2441 for (u = 0; u < C4->nb_sets; u++) {
2442 C4->init_set(u, C3->Sets[2 * u], C3->Set_size[2 * u],
2443 0 /*verbose_level*/);
2444 }
2445 for (u = 0; u < C5->nb_sets; u++) {
2446 C5->init_set(u, C4->Sets[2 * u], C4->Set_size[2 * u],
2447 0 /*verbose_level*/);
2448 }
2449 for (u = 0; u < C6->nb_sets; u++) {
2450 C6->init_set(u, C5->Sets[2 * u], C5->Set_size[2 * u],
2451 0 /*verbose_level*/);
2452 }
2453
2454
2455 if (f_vv) {
2456 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2457 "computing candidates C4" << endl;
2458 }
2459
2460 candidate_testing(orbit,
2461 Basis + 2 * k2, k - 1, k - 2,
2462 C3, C4,
2463 Tmp1, Tmp2,
2464 verbose_level - 1);
2465 // in deep_search.cpp
2466
2467 if (f_vv) {
2468 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2469 "computing candidates C4 done" << endl;
2470 }
2471
2472
2473
2474 int c4;
2475 long int a4;
2476 long int A4;
2477 int nb_sol0;
2478
2479
2480 for (c4 = 0; c4 < C4->Set_size[1]; c4++) {
2481
2482
2483
2484 nb_sol0 = nb_sol;
2485
2486 a4 = C4->Sets[1][c4];
2487 SC->matrix_unrank(a4, Basis + 3 * k2);
2488
2489 // put the pivot element:
2490 Basis[3 * k2 + (k - 2) * k + 0] = 1;
2491
2492 A4 = SC->matrix_rank(Basis + 3 * k2);
2493
2494 if (f_v3) {
2495 cout << "Level 3, orbit " << orbit << " / "
2496 << nb_orbits << " level 4 case "
2497 << c4 << " / " << C4->Set_size[1] << " is matrix" << endl;
2498 Int_matrix_print(Basis + 3 * k2, k, k);
2499 }
2500
2501 pivots[3] = (k - 2) * k;
2502
2503
2504
2505
2506 if (f_v4) {
2507 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2508 "computing candidates C5" << endl;
2509 }
2510
2511 if (!candidate_testing(orbit,
2512 Basis + 3 * k2, k - 2, k - 3,
2513 C4, C5,
2514 Tmp1, Tmp2,
2515 0 /*verbose_level - 1*/)) {
2516 goto done4;
2517 }
2518
2519 if (f_v4) {
2520 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2521 "computing candidates C5 done" << endl;
2522 }
2523
2524
2525 int c5;
2526 long int a5;
2527 long int A5;
2528 for (c5 = 0; c5 < C5->Set_size[1]; c5++) {
2529
2530
2531 a5 = C5->Sets[1][c5];
2532 SC->matrix_unrank(a5, Basis + 4 * k2);
2533
2534 // put the pivot element:
2535 Basis[4 * k2 + (k - 3) * k + 0] = 1;
2536
2537 A5 = SC->matrix_rank(Basis + 4 * k2);
2538
2539 if (f_v3) {
2540 cout << "Level 3, orbit " << orbit << " / "
2541 << nb_orbits << " level 4 case "
2542 << c4 << " / " << C4->Set_size[1] << " level 5 case "
2543 << c5 << " / " << C5->Set_size[1]
2544 << " is matrix" << endl;
2545 Int_matrix_print(Basis + 4 * k2, k, k);
2546 }
2547
2548 pivots[4] = (k - 3) * k;
2549
2550
2551
2552 if (f_v4) {
2553 cout << "semifield_lifting::deep_search_at_level_"
2554 "three_orbit computing candidates C6" << endl;
2555 }
2556
2557 if (!candidate_testing(orbit,
2558 Basis + 4 * k2, k - 3, k - 4,
2559 C5, C6,
2560 Tmp1, Tmp2,
2561 0 /*verbose_level - 1*/)) {
2562 continue;
2563 }
2564
2565 if (f_v4) {
2566 cout << "semifield_lifting::deep_search_at_level_"
2567 "three_orbit computing candidates C6 done" << endl;
2568 }
2569
2570 int c6;
2571 long int a6;
2572 long int A6;
2573 for (c6 = 0; c6 < C6->Set_size[1]; c6++) {
2574
2575
2576 a6 = C6->Sets[1][c6];
2577 SC->matrix_unrank(a6, Basis + 5 * k2);
2578
2579 // put the pivot element:
2580 Basis[5 * k2 + (k - 4) * k + 0] = 1;
2581
2582 A6 = SC->matrix_rank(Basis + 5 * k2);
2583
2584 fp << "SOL " << orbit << " " << c4 << " " << c5 << " "
2585 << c6 << " " << a1 << " " << a2 << " " << a3
2586 << " " << A4 << " " << A5 << " " << A6 << endl;
2587 cout << "SEMIFIELD " << nb_sol << " : " << a1 << ", "
2588 << a2 << ", " << a3 << ", " << A4 << ", "
2589 << A5 << ", " << A6 << endl;
2590
2591#if 0
2592 long int A[6];
2593
2594 A[0] = a1;
2595 A[1] = a2;
2596 A[2] = a3;
2597 A[3] = A4;
2598 A[4] = A5;
2599 A[5] = A6;
2600#endif
2601 //compute_automorphism_group(6, 3, orbit, A, verbose_level);
2602 nb_sol++;
2603
2604 }
2605
2606
2607
2608 } // next c5
2609
2610
2611done4:
2612
2613 if (f_v && ((c4 % 1000) == 0)) {
2614 cout << "Level 3, orbit " << orbit << " / "
2615 << nb_orbits << ", L4 case " << c4
2616 << " / " << C4->Set_size[1] << " done, "
2617 "yields nb_sol = " << nb_sol - nb_sol0
2618 << " solutions, nb_sol = " << nb_sol << endl;
2619 }
2620
2621 } // next c4
2622
2623
2624
2625
2626 fp << "finish orbit " << orbit << " " << nb_sol << endl;
2627
2628
2629
2630
2631
2632 FREE_OBJECT(C3);
2633 FREE_OBJECT(C4);
2634 FREE_OBJECT(C5);
2635 FREE_OBJECT(C6);
2636
2637 FREE_lint(Tmp1);
2638 FREE_lint(Tmp2);
2639
2640
2642
2643 if (f_v) {
2644 cout << "semifield_lifting::deep_search_at_level_three_orbit "
2645 << orbit << " / " << nb_orbits << " done, "
2646 "nb_sol = " << nb_sol << endl;
2647 }
2648}
2649
2651 int orbit,
2652 int *last_mtx, int window_bottom, int window_size,
2655 long int *Tmp1, long int *Tmp2,
2656 int verbose_level)
2657{
2658 int f_v = (verbose_level >= 1);
2659 int u, v, w;
2660 int h, l;
2661 int Nb_sets_new;
2662 int /*window_bottom_new,*/ window_size_new;
2663 //int pivot_row;
2664 long int last_mtx_numeric;
2668
2669 if (f_v) {
2670 cout << "semifield_lifting::candidate_testing" << endl;
2671 }
2672
2673 last_mtx_numeric = SC->matrix_rank_without_first_column(last_mtx);
2674
2675
2676 //pivot_row = window_bottom;
2677
2678 //window_bottom_new = pivot_row - 1;
2679 window_size_new = window_size - 1;
2680
2681 Nb_sets_new = NT.i_power_j(SC->q, window_size_new);
2682
2683
2684 for (u = 1; u < Nb_sets_new; u++) {
2685
2686
2687 v = 2 * u;
2688 w = v + 1;
2689 l = C_in->Set_size[v];
2690 Gg.AG_element_unrank(SC->q, window_in, 1, window_size, v);
2691 if (f_v) {
2692 cout << "Level 3, Orbit " << orbit << " / "
2693 << nb_orbits << ": testing "
2694 << u << " / " << Nb_sets_new << " v=" << v
2695 << " w=" << w << " testing " << l
2696 << " points, pattern: ";
2697 Int_vec_print(cout, window_in, window_size);
2698 cout << endl;
2699 }
2700
2701
2702 int set_sz;
2703
2704 for (h = 0; h < l; h++) {
2705 Tmp1[h] = C_in->Sets[v][h] ^ last_mtx_numeric;
2706 }
2707
2708 Sorting.lint_vec_heapsort(Tmp1, l);
2709
2711 Tmp1, l,
2712 C_in->Sets[w], C_in->Set_size[w],
2713 Tmp2, set_sz);
2714
2715 for (h = 0; h < set_sz; h++) {
2716 Tmp2[h] ^= last_mtx_numeric;
2717 }
2718 Sorting.lint_vec_heapsort(Tmp2, set_sz);
2719 for (h = 0; h < set_sz; h++) {
2720 C_out->Sets[u][h] = Tmp2[h];
2721 }
2722 C_out->Set_size[u] = set_sz;
2723
2724 if (u && C_out->Set_size[u] == 0) {
2725 return FALSE;
2726 }
2727
2728 } // next u
2729
2730
2731
2732 if (f_v) {
2733 cout << "semifield_lifting::candidate_testing "
2734 "done" << endl;
2735 }
2736 return TRUE;
2737}
2738
2740 int po3, long int &a1, long int &a2, long int &a3,
2741 int verbose_level)
2742{
2743 int f_v = (verbose_level >= 1);
2744 int po; // so, mo;
2745 long int pt, a;
2746 //int ext, idx;
2747 int *basis;
2748
2749 if (f_v) {
2750 cout << "semifield_lifting::level_three_get_a1_a2_a3 "
2751 "po3 = " << po3 << endl;
2752 }
2753 po = Po[po3];
2754 //so = So[po3];
2755 //mo = Mo[po3];
2756 pt = Pt[po3];
2757
2758
2759#if 0
2760 ext = L2->up_orbit_rep[po];
2761 idx = L2->down_orbit_classes[ext * 2 + 0];
2762 a = L2->class_rep_rank[idx];
2763#else
2764 a = L2->Pt[po];
2765#endif
2766
2767 basis = NEW_int(k2);
2768
2770
2771 a1 = SC->matrix_rank(basis);
2772
2773 FREE_int(basis);
2774
2775 a2 = a;
2776 a3 = pt;
2777 if (f_v) {
2778 cout << "semifield_lifting::level_three_get_a1_a2_a3 "
2779 " a1 = " << a1
2780 << " a2 = " << a2
2781 << " a3 = " << a3
2782 << endl;
2783 }
2784}
2785
2786
2788 int verbose_level)
2789{
2790 int f_v = (verbose_level >= 1);
2792
2793 if (f_v) {
2794 cout << "semifield_lifting::write_level_info_file "
2795 "level=" << cur_level << endl;
2796 }
2797 int i;
2798 int nb_vecs = 5;
2799 const char *column_label[] = {
2800 "Po",
2801 "So",
2802 "Mo",
2803 "Go",
2804 "Pt"
2805 };
2806 string fname;
2807
2809
2810 {
2811 ofstream f(fname);
2812 int j;
2813
2814 f << "Row";
2815 for (j = 0; j < nb_vecs; j++) {
2816 f << "," << column_label[j];
2817 }
2818 f << endl;
2819 for (i = 0; i < nb_orbits; i++) {
2820 f << i;
2821 f << "," << Po[i]
2822 << "," << So[i]
2823 << "," << Mo[i]
2824 << "," << Go[i]
2825 << "," << Pt[i]
2826 << endl;
2827 }
2828 f << "END" << endl;
2829 }
2830
2831 cout << "Written file " << fname << " of size"
2832 << Fio.file_size(fname) << endl;
2833 if (f_v) {
2834 cout << "semifield_lifting::write_level_info_file done" << endl;
2835 }
2836
2837}
2838
2839
2841{
2842 int f_v = (verbose_level >= 1);
2843 string fname;
2844 long int *M;
2845 int m, n, i;
2847
2848 if (f_v) {
2849 cout << "semifield_lifting::read_level_info_file" << endl;
2850 }
2852
2853 cout << "semifield_lifting::read_level_info_file " << fname << endl;
2854
2855 if (Fio.file_size(fname) <= 0) {
2856 cout << "semifield_lifting::read_level_info_file "
2857 "error trying to read the file " << fname << endl;
2858 exit(1);
2859 }
2860
2861 Fio.lint_matrix_read_csv(fname, M, m, n, 0 /* verbose_level */);
2862 // Row,Po,So,Mo,Go,Pt
2863
2864 nb_orbits = m;
2865
2866 Po = NEW_int(m);
2867 So = NEW_int(m);
2868 Mo = NEW_int(m);
2869 Go = NEW_lint(m);
2870 Pt = NEW_lint(m);
2871
2872
2873 for (i = 0; i < m; i++) {
2874 Po[i] = M[i * n + 1];
2875 So[i] = M[i * n + 2];
2876 Mo[i] = M[i * n + 3];
2877 Go[i] = M[i * n + 4];
2878 Pt[i] = M[i * n + 5];
2879 }
2880
2881 FREE_lint(M);
2882
2883 if (f_v) {
2884 cout << "semifield_lifting::read_level_info_file done" << endl;
2885 }
2886}
2887
2889{
2890 int f_v = (verbose_level >= 1);
2891 //int f_vv = FALSE; //(verbose_level >= 2);
2892
2893 if (f_v) {
2894 cout << "semifield_lifting::save_flag_orbits "
2895 "cur_level = " << cur_level << endl;
2896 }
2897 string fname;
2898 int i;
2900
2902 {
2903 ofstream fp(fname, ios::binary);
2904
2905 fp.write((char *) &nb_flag_orbits, sizeof(int));
2906 for (i = 0; i < nb_flag_orbits; i++) {
2907 Flag_orbits[i].write_to_file_binary(this, fp, verbose_level - 1);
2908 }
2909 }
2910 cout << "Written file " << fname << " of size "
2911 << Fio.file_size(fname) << endl;
2912 if (f_v) {
2913 cout << "semifield_lifting::save_flag_orbits "
2914 "cur_level = " << cur_level << " done" << endl;
2915 }
2916}
2917
2919{
2920 int f_v = (verbose_level >= 1);
2921 //int f_vv = FALSE; //(verbose_level >= 2);
2922
2923 if (f_v) {
2924 cout << "semifield_lifting::read_flag_orbits "
2925 "cur_level = " << cur_level
2926 << endl;
2927 }
2928 string fname;
2929 int i;
2931
2932
2934
2935 if (Fio.file_size(fname) <= 0) {
2936 cout << "semifield_lifting::read_flag_orbits "
2937 "file " << fname << " does not exist" << endl;
2938 exit(1);
2939 }
2940 if (f_v) {
2941 cout << "semifield_lifting::read_flag_orbits "
2942 "reading file " << fname << endl;
2943 }
2944
2945 {
2946 ifstream fp(fname, ios::binary);
2947
2948 fp.read((char *) &nb_flag_orbits, sizeof(int));
2950
2951 for (i = 0; i < nb_flag_orbits; i++) {
2952 if ((i & ((1 << 15) - 1)) == 0) {
2953 cout << "semifield_lifting::read_flag_orbits "
2954 << i << " / " << nb_flag_orbits << endl;
2955 }
2957 0 /* verbose_level */);
2958 }
2959 }
2960 cout << "semifield_lifting::read_flag_orbits "
2961 "Read file " << fname << " of size "
2962 << Fio.file_size(fname) << endl;
2963
2964
2965 if (f_v) {
2966 cout << "semifield_lifting::read_flag_orbits "
2967 "cur_level = " << cur_level << " done, "
2968 "nb_flag_orbits=" << nb_flag_orbits << endl;
2969 }
2970}
2971
2972
2973
2975{
2976 int f_v = (verbose_level >= 1);
2977 //int f_vv = FALSE; //(verbose_level >= 2);
2978
2979 if (f_v) {
2980 cout << "semifield_lifting::save_stabilizers "
2981 "cur_level = " << cur_level << endl;
2982 }
2983 string fname;
2984 int i;
2986
2988 {
2989 ofstream fp(fname, ios::binary);
2990
2991 fp.write((char *) &nb_orbits, sizeof(int));
2992 for (i = 0; i < nb_orbits; i++) {
2993 Stabilizer_gens[i].write_to_file_binary(fp, verbose_level - 1);
2994 }
2995 }
2996 cout << "Written file " << fname << " of size "
2997 << Fio.file_size(fname) << endl;
2998 if (f_v) {
2999 cout << "semifield_lifting::save_stabilizers "
3000 "cur_level = " << cur_level << " done" << endl;
3001 }
3002}
3003
3005{
3006 int f_v = (verbose_level >= 1);
3007 //int f_vv = FALSE; //(verbose_level >= 2);
3008
3009 if (f_v) {
3010 cout << "semifield_lifting::read_stabilizers "
3011 "cur_level = " << cur_level << endl;
3012 }
3013 string fname;
3014 int i;
3016
3017
3019
3020 if (Fio.file_size(fname) <= 0) {
3021 cout << "semifield_lifting::read_stabilizers "
3022 "file " << fname << " does not exist" << endl;
3023 exit(1);
3024 }
3025 if (f_v) {
3026 cout << "semifield_lifting::read_stabilizers "
3027 "reading file " << fname << endl;
3028 }
3029
3030 {
3031 ifstream fp(fname, ios::binary);
3032
3033 fp.read((char *) &nb_orbits, sizeof(int));
3035
3036 for (i = 0; i < nb_orbits; i++) {
3037 if ((i & ((1 << 15) - 1)) == 0) {
3038 cout << "semifield_starter::read_stabilizers "
3039 << i << " / " << nb_orbits << endl;
3040 }
3042 0 /* verbose_level */);
3043 }
3044 }
3045 cout << "semifield_lifting::read_stabilizers "
3046 "Read file " << fname << " of size "
3047 << Fio.file_size(fname) << endl;
3048
3049
3050 if (f_v) {
3051 cout << "semifield_lifting::read_stabilizers "
3052 "cur_level = " << cur_level << " done" << endl;
3053 }
3054}
3055
3057 int level, int orbit_idx)
3058{
3059 char str[1000];
3060
3061 sprintf(str, "L%d_orbit%d_schreier.csv", level, orbit_idx);
3062 if (f_prefix) {
3063 fname.assign(prefix);
3064 fname.append(str);
3065 }
3066 else {
3067 fname.assign(str);
3068 }
3069}
3070
3072{
3073 char str[1000];
3074
3075 sprintf(str, "L%d_info.csv", cur_level);
3076 if (f_prefix) {
3077 fname.assign(prefix);
3078 fname.append(str);
3079 }
3080 else {
3081 fname.assign(str);
3082 }
3083}
3084
3086{
3087 char str[1000];
3088
3089 sprintf(str, "L%d_flag_orbits.bin", cur_level);
3090 if (f_prefix) {
3091 fname.assign(prefix);
3092 fname.append(str);
3093 }
3094 else {
3095 fname.assign(str);
3096 }
3097}
3098
3100{
3101 char str[1000];
3102
3103 sprintf(str, "L%d_flag_stabilizers.bin", cur_level);
3104 if (f_prefix) {
3105 fname.assign(prefix);
3106 fname.append(str);
3107 }
3108 else {
3109 fname.assign(str);
3110 }
3111}
3112
3114 int f_out_path, std::string &out_path,
3115 int orbit_r, int orbit_m)
3116{
3117 char str[1000];
3118
3119 sprintf(str, "deep_slice%d_%d_sol.txt", orbit_r, orbit_m);
3120 if (f_out_path) {
3121 fname.assign(out_path);
3122 fname.append(str);
3123 }
3124 else {
3125 fname.assign(str);
3126 }
3127}
3128
3130 int f_out_path, std::string &out_path,
3131 int orbit_r, int orbit_m)
3132{
3133 char str[1000];
3134
3135 sprintf(str, "deep_slice%d_%d_suc.txt", orbit_r, orbit_m);
3136 if (f_out_path) {
3137 fname.assign(out_path);
3138 fname.append(str);
3139 }
3140 else {
3141 fname.assign(str);
3142 }
3143}
3144
3145
3146
3147
3148}}}
conjugacy class in GL(n,q) described using rational normal form
Definition: algebra.h:260
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_simple(long int underlying_set_size, int nb_sets, int verbose_level)
void init_set(int idx_of_set, long int *set, int sz, int verbose_level)
a collection of functions related to sorted vectors
void lint_vec_intersect_sorted_vectors(long int *v1, int len1, long int *v2, int len2, long int *v3, int &len3)
Definition: sorting.cpp:800
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:72
void init_lint(long int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:123
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)
to rank and unrank subspaces of a fixed dimension in F_q^n
Definition: geometry.h:892
void init(int n, int k, field_theory::finite_field *F, int verbose_level)
Definition: grassmann.cpp:70
void unrank_lint_here_and_extend_basis(int *Mtx, long int rk, int verbose_level)
Definition: grassmann.cpp:946
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
void Gauss_step(int *v1, int *v2, int len, int idx, int verbose_level)
int Gauss_int_with_given_pivots(int *A, int f_special, int f_complete, int *pivots, int nb_pivots, int m, int n, int verbose_level)
void lint_matrix_read_csv(std::string &fname, long int *&M, int &m, int &n, int verbose_level)
Definition: file_io.cpp:1558
domain to compute with objects of type longinteger
Definition: ring_theory.h:240
void integral_division_by_int(longinteger_object &a, int b, longinteger_object &q, int &r)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
a permutation group in a fixed action.
Definition: actions.h:99
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 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 init(actions::action *A, int verbose_level)
Definition: vector_ge.cpp:55
Schreier trees for orbits of groups on points.
Definition: groups.h:839
void point_stabilizer(actions::action *default_action, ring_theory::longinteger_object &go, groups::sims *&Stab, int orbit_no, int verbose_level)
Definition: schreier.cpp:2388
void coset_rep_inv(int j, int verbose_level)
Definition: schreier.cpp:864
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void init_trivial_group(actions::action *A, int verbose_level)
void init_copy(strong_generators *S, int verbose_level)
void read_from_file_binary(actions::action *A, std::ifstream &fp, int verbose_level)
void write_to_file_binary(std::ofstream &fp, int verbose_level)
void init_from_sims(groups::sims *S, 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)
int test_partial_semifield(int *Basis, int n, int verbose_level)
void apply_element_and_copy_back(int *Elt, int *basis_in, int *basis_out, int first, int last_plus_one, int verbose_level)
auxiliary class for classifying semifields
Definition: semifields.h:734
void init(semifield_lifting *SL, int level, int orbit_number, long int *Candidates, int nb_candidates, int first_flag_orbit, int verbose_level)
void read_from_file_binary(semifield_lifting *SL, std::ifstream &fp, int verbose_level)
void write_to_file_binary(semifield_lifting *SL, std::ofstream &fp, int verbose_level)
void init(int downstep_primary_orbit, int downstep_secondary_orbit, int pt_local, long int pt, int downstep_orbit_len, int f_long_orbit, int verbose_level)
The first and second steps in classifying semifields.
Definition: semifields.h:290
void read_candidates_at_level_two_by_type(data_structures::set_of_sets_lint *&Candidates_by_type, int orbit, int verbose_level)
void multiply_to_the_right(int *ELT1, int *Mtx, int *ELT2, int *ELT3, int verbose_level)
int trace_step_up(int &po, int &so, int *changed_basis, int basis_sz, int *basis_tmp, int *transporter, int *ELT3, int verbose_level)
void make_file_name_schreier(std::string &fname, int level, int orbit_idx)
void trace_to_level_two(int *input_basis, int basis_sz, int *transporter, int &trace_po, int verbose_level)
void get_basis(int po3, int *basis, int verbose_level)
void upstep_loop_over_down_set(int level, int f, int po, int so, int N, int *transporter, int *Mtx, int *base_change_matrix, int *changed_space, long int *set, int **Aut, int verbose_level)
void level_three_get_a1_a2_a3(int po3, long int &a1, long int &a2, long int &a3, int verbose_level)
int candidate_testing(int orbit, int *last_mtx, int window_bottom, int window_size, data_structures::set_of_sets_lint *C_in, data_structures::set_of_sets_lint *C_out, long int *Tmp1, long int *Tmp2, int verbose_level)
int trace_to_level_three(int *input_basis, int basis_sz, int *transporter, int &trace_po, int verbose_level)
void trace_very_general(int *input_basis, int basis_sz, int *transporter, int &trace_po, int &trace_so, int verbose_level)
void deep_search_at_level_three(int orbit_r, int orbit_m, int f_out_path, std::string &out_path, int &nb_sol, int verbose_level)
groups::strong_generators * get_stabilizer_generators(int level, int orbit_idx, int verbose_level)
void init_level_three(semifield_level_two *L2, int f_prefix, std::string &prefix, int verbose_level)
void make_fname_deep_search_slice_success(std::string &fname, int f_out_path, std::string &out_path, int orbit_r, int orbit_m)
void recover_level_three_from_file(int f_read_flag_orbits, int verbose_level)
void deep_search_at_level_three_orbit(int orbit, int *Basis, int *pivots, std::ofstream &fp, int &nb_sol, int verbose_level)
void make_fname_deep_search_slice_solutions(std::string &fname, int f_out_path, std::string &out_path, int orbit_r, int orbit_m)
void deep_search(int orbit_r, int orbit_m, int f_out_path, std::string &out_path, int verbose_level)
#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 NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#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 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
#define MAXIMUM(x, y)
Definition: foundations.h:217
the orbiter library for the classification of combinatorial objects