Orbiter 2022
Combinatorial Objects
classify_trihedral_pairs.cpp
Go to the documentation of this file.
1// classify_trihedral_pairs.cpp
2//
3// Anton Betten
4//
5// October 9, 2017
6//
7//
8//
9//
10//
11
12#include "orbiter.h"
13
14using namespace std;
15
16namespace orbiter {
17namespace layer5_applications {
18namespace applications_in_algebraic_geometry {
19namespace cubic_surfaces_and_arcs {
20
21
22
23static void classify_trihedral_pairs_early_test_function_type1(long int *S, int len,
24 long int *candidates, int nb_candidates,
25 long int *good_candidates, int &nb_good_candidates,
26 void *data, int verbose_level);
27static void classify_trihedral_pairs_early_test_function_type2(long int *S, int len,
28 long int *candidates, int nb_candidates,
29 long int *good_candidates, int &nb_good_candidates,
30 void *data, int verbose_level);
31
32
33
35{
36 q = 0;
37 F = NULL;
38 Surf_A = NULL;
39 Surf = NULL;
40 gens_type1 = NULL;
41 gens_type2 = NULL;
42 Poset1 = NULL;
43 Poset2 = NULL;
46 Flag_orbits = NULL;
48 Trihedral_pairs = NULL;
49 null();
50}
51
53{
54 freeself();
55}
56
58{
59}
60
62{
63 if (gens_type1) {
65 }
66 if (gens_type2) {
68 }
69 if (Poset1) {
71 }
72 if (Poset2) {
74 }
77 }
80 }
81 if (Flag_orbits) {
83 }
84 if (Trihedral_pairs) {
86 }
87 null();
88}
89
92 int verbose_level)
93{
94 int f_v = (verbose_level >= 1);
95
96 if (f_v) {
97 cout << "classify_trihedral_pairs::init" << endl;
98 }
100 F = Surf_A->PA->F;
101 q = F->q;
102 A = Surf_A->A;
103 Surf = Surf_A->Surf;
104
105
106 if (f_v) {
107 cout << "classify_trihedral_pairs::init computing stabilizer "
108 "of three collinear points" << endl;
109 }
112 A,
113 A->G.matrix_grp, verbose_level - 1);
114
115 if (f_v) {
116 cout << "classify_trihedral_pairs::init computing stabilizer "
117 "of a triangle of points" << endl;
118 }
121 A->G.matrix_grp, verbose_level - 1);
122
124
127
128
129
130 if (f_v) {
131 cout << "The group 1 has order " ;
132 go1.print_not_scientific(cout);
133 cout << "\\\\" << endl;
134 cout << "generators:" << endl;
136
137 cout << "The group 2 has order " ;
138 go2.print_not_scientific(cout);
139 cout << "\\\\" << endl;
140 cout << "generators:" << endl;
142 }
143
144
145
146
147 if (f_v) {
148 cout << "classify_trihedral_pairs::init done" << endl;
149 }
150}
151
152
153
157 int verbose_level)
158{
159 int f_v = (verbose_level >= 1);
160
161 if (f_v) {
162 cout << "classify_trihedral_pairs::classify_orbits_on_trihedra" << endl;
163 }
164
165 if (f_v) {
166 cout << "classify_trihedral_pairs::classify_orbits_on_trihedra "
167 "computing orbits on 3-subsets of points (type 1):" << endl;
168 }
169
172 verbose_level);
173
175 classify_trihedral_pairs_early_test_function_type1,
176 this /* void *data */,
177 verbose_level);
178
179
181
183 3, /* target_depth */
184 Control1,
185 Poset1,
186 verbose_level - 1);
187
188 if (f_v) {
189 cout << "classify_trihedral_pairs::classify_orbits_on_trihedra "
190 "computing orbits on 3-subsets of points (type 1) done. "
191 "We found "
193 << " orbits on 3-subsets" << endl;
194 }
195
196 if (f_v) {
197 cout << "classify_trihedral_pairs::classify_orbits_on_trihedra "
198 "computing orbits on 3-subsets of points (type 2):" << endl;
199 }
200
203 verbose_level);
204
206 classify_trihedral_pairs_early_test_function_type2,
207 this /* void *data */,
208 verbose_level);
209
211
213 3, /* target_depth */
214 Control2,
215 Poset2,
216 verbose_level - 1);
217
218 if (f_v) {
219 cout << "classify_trihedral_pairs::classify_orbits_on_trihedra "
220 "computing orbits on 3-subsets of points (type 2) done. "
221 "We found "
223 << " orbits on 3-subsets" << endl;
224 }
225
226 if (f_v) {
227 cout << "classify_trihedral_pairs::classify_orbits_on_trihedra done" << endl;
228 }
229}
230
232{
233 cout << "classify_trihedral_pairs::report "
234 "before list_orbits_on_trihedra_type1" << endl;
236
237 cout << "classify_trihedral_pairs::report "
238 "before list_orbits_on_trihedra_type2" << endl;
240
241 cout << "classify_trihedral_pairs::report "
242 "before print_trihedral_pairs no stabs" << endl;
243
244 ost << "\\subsection*{Classification of Double Triplets in $\\PG(3," << q << ")$}" << endl;
246
247
248#if 0
249 cout << "classify_trihedral_pairs::report "
250 "before print_trihedral_pairs with stabs" << endl;
252 TRUE /* f_with_stabilizers */);
253#endif
254}
255
256
258{
259 cout << "classify_trihedral_pairs::report "
260 "before list_orbits_on_trihedra_type1" << endl;
262
263 cout << "classify_trihedral_pairs::report "
264 "before list_orbits_on_trihedra_type2" << endl;
266
267 cout << "classify_trihedral_pairs::report "
268 "before print_trihedral_pairs no stabs" << endl;
270 FALSE /* f_with_stabilizers */);
271
272#if 0
273 cout << "classify_trihedral_pairs::report "
274 "before print_trihedral_pairs with stabs" << endl;
276 TRUE /* f_with_stabilizers */);
277#endif
278}
279
280void classify_trihedral_pairs::list_orbits_on_trihedra_type1(std::ostream &ost, int f_detailed)
281{
282 int i, l;
283
285
286 //ost << "\\clearpage" << endl;
287 ost << "\\subsection*{Classification of Double Triplets of "
288 "type 1 in $\\PG(3," << q << ")$}" << endl;
289
290
291
292 {
295
296 ost << "The order of the group of type 1 is ";
297 go.print_not_scientific(ost);
298 ost << "\\\\" << endl;
299
300 ost << "\\bigskip" << endl;
301 }
302
303
304
307 Ol.create(0, __FILE__, __LINE__);
308
309 ost << "The group of type 1 has "
310 << l
311 << " orbits on double triplets of type 1 in "
312 "$\\PG(3," << q << ").$" << endl << endl;
313
314 if (f_detailed) {
315 for (i = 0; i < l; i++) {
317
319 3 /* level */,
320 i /* orbit_at_level */,
321 0 /* verbose_level */);
323 i /* node */,
324 3 /* level */,
325 ol);
326 D.add_in_place(Ol, ol);
327
328 ost << "$" << i << " / " << l << "$ $" << endl;
329 R->print_set_tex(ost);
330 ost << "$ orbit length $";
331 ol.print_not_scientific(ost);
332 ost << "$\\\\" << endl;
333
334 FREE_OBJECT(R);
335 }
336
337 ost << "The overall number of double triplets of type 1 "
338 "in $\\PG(3," << q << ")$ is: " << Ol << "\\\\" << endl;
339 }
340}
341
342void classify_trihedral_pairs::list_orbits_on_trihedra_type2(std::ostream &ost, int f_detailed)
343{
344 int i, l;
345
347
348 //ost << "\\clearpage" << endl;
349 ost << "\\subsection*{Classification of Double Triplets of "
350 "type 2 in $\\PG(3," << q << ")$}" << endl;
351
352
353
354 {
357
358 ost << "The order of the group of type 2 is ";
359 go.print_not_scientific(ost);
360 ost << "\\\\" << endl;
361
362 ost << "\\bigskip" << endl;
363 }
364
365
366
369 Ol.create(0, __FILE__, __LINE__);
370
371 ost << "The group of type 2 has "
372 << l
373 << " orbits on double triplets of type 2 "
374 "in $\\PG(3," << q << ").$" << endl << endl;
375
376
377 if (f_detailed) {
378 for (i = 0; i < l; i++) {
380
382 3 /* level */,
383 i /* orbit_at_level */,
384 0 /* verbose_level */);
386 i /* node */,
387 3 /* level */,
388 ol);
389 D.add_in_place(Ol, ol);
390
391 ost << "$" << i << " / " << l << "$ $" << endl;
392 R->print_set_tex(ost);
393 ost << "$ orbit length $";
394 ol.print_not_scientific(ost);
395 ost << "$\\\\" << endl;
396
397 FREE_OBJECT(R);
398 }
399
400 ost << "The overall number of double triplets of type 2 "
401 "in $\\PG(3," << q << ")$ is: " << Ol << "\\\\" << endl;
402 }
403}
404
406 long int *S, int len,
407 long int *candidates, int nb_candidates,
408 long int *good_candidates, int &nb_good_candidates,
409 int verbose_level)
410{
411 int f_v = (verbose_level >= 1);
412 int f_vv = (verbose_level >= 2);
413 int i, j;
414 long int a, rk; //, idx; //, f_bad, rk0, ;
415 long int Lines[9];
416 long int Lines2[9];
418
419 if (f_v) {
420 cout << "classify_trihedral_pairs::early_test_func_type1 "
421 "checking set ";
422 Lint_vec_print(cout, S, len);
423 cout << endl;
424 cout << "candidate set of size " << nb_candidates << ":" << endl;
425 Lint_vec_print(cout, candidates, nb_candidates);
426 cout << endl;
427 }
428 if (len > 2) {
429 cout << "classify_trihedral_pairs::early_test_func_type1 "
430 "len > 2" << endl;
431 exit(1);
432 }
433
434#if 0
435 rk0 = Surf->P->line_of_intersection_of_two_planes_in_three_
436 space_using_dual_coordinates(0, 1, 0 /* verbose_level */);
437 if (f_vv) {
438 cout << "surface_with_action::early_test_func_type1 "
439 "rk0 = " << rk0 << endl;
440 }
441#endif
442
443 for (i = 0; i < len; i++) {
444 Lines[i * 3 + 0] = Surf->P->line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates(S[i], 0, 0 /* verbose_level */);
445 Lines[i * 3 + 1] = Surf->P->line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates(S[i], 1, 0 /* verbose_level */);
446 Lines[i * 3 + 2] = Surf->P->line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates(S[i], 5, 0 /* verbose_level */);
447 }
448 if (f_vv) {
449 cout << "classify_trihedral_pairs::early_test_func_type1 Lines=" << endl;
450 Lint_matrix_print(Lines, len, 3);
451 }
452
453 nb_good_candidates = 0;
454 for (i = 0; i < nb_candidates; i++) {
455 a = candidates[i];
456
457 if (a == 0 || a == 1 || a == 5) {
458 continue;
459 }
460
461 if (f_vv) {
462 cout << "classify_trihedral_pairs::early_test_func_type1 "
463 "testing a=" << a << endl;
464 }
465
466 for (j = 0; j < len; j++) {
467 if (a == S[j]) {
468 break;
469 }
470 }
471 if (j < len) {
472 continue;
473 }
474
475 Lint_vec_copy(Lines, Lines2, len * 3);
476
478
479
480#if 0
481 if (rk == rk0) {
482 if (f_vv) {
483 cout << "intersects 0 in the bad line" << endl;
484 }
485 continue;
486 }
487#endif
488 Lines2[len * 3 + 0] = rk;
489
491#if 0
492 if (rk == rk0) {
493 if (f_vv) {
494 cout << "intersects 1 in the bad line" << endl;
495 }
496 continue;
497 }
498#endif
499 Lines2[len * 3 + 1] = rk;
500
502#if 0
503 if (rk == rk0) {
504 if (f_vv) {
505 cout << "intersects 5 in the bad line" << endl;
506 }
507 continue;
508 }
509#endif
510 Lines2[len * 3 + 2] = rk;
511
512 if (f_vv) {
513 cout << "classify_trihedral_pairs::early_test_func_type1 "
514 "Lines2=" << endl;
515 Lint_matrix_print(Lines2, len + 1, 3);
516 }
517
518
519 Sorting.lint_vec_heapsort(Lines2, (len + 1) * 3);
520
521 for (j = 1; j < (len + 1) * 3; j++) {
522 if (Lines2[j] == Lines2[j - 1]) {
523 if (f_vv) {
524 cout << "classify_trihedral_pairs::early_test_func_type1 "
525 "repeated line" << endl;
526 }
527 break;
528 }
529 }
530 if (j < (len + 1) * 3) {
531 continue;
532 }
533
534#if 0
535 int f_bad;
536 f_bad = FALSE;
537 if (len == 0) {
538 // nothing else to test
539 }
540 else if (len == 1) {
542 if (int_vec_search(Lines2, (len + 1) * 3, rk, idx)) {
543 f_bad = TRUE;
544 }
545 }
546 else if (len == 2) {
548 if (int_vec_search(Lines2, (len + 1) * 3, rk, idx)) {
549 f_bad = TRUE;
550 }
552 if (int_vec_search(Lines2, (len + 1) * 3, rk, idx)) {
553 f_bad = TRUE;
554 }
556 if (int_vec_search(Lines2, (len + 1) * 3, rk, idx)) {
557 f_bad = TRUE;
558 }
559 }
560#endif
561
562 good_candidates[nb_good_candidates++] = candidates[i];
563 } // next i
564 if (f_v) {
565 cout << "classify_trihedral_pairs::early_test_func_type1 "
566 "checking set ";
567 Lint_vec_print(cout, S, len);
568 cout << endl;
569 cout << "good_candidates set of size "
570 << nb_good_candidates << ":" << endl;
571 Lint_vec_print(cout, good_candidates, nb_good_candidates);
572 cout << endl;
573 }
574
575}
576
578 long int *candidates, int nb_candidates,
579 long int *good_candidates, int &nb_good_candidates,
580 int verbose_level)
581{
582 int f_v = (verbose_level >= 1);
583 int f_vv = (verbose_level >= 2);
584 int i, j;
585 long int a, rk;
586 long int Lines[9];
587 long int Lines2[9];
588 int M1[8];
589 //int M2[12];
590 //int M3[16];
591 //int base_cols[4];
593
594 if (f_v) {
595 cout << "classify_trihedral_pairs::early_test_func_type2 "
596 "checking set ";
597 Lint_vec_print(cout, S, len);
598 cout << endl;
599 cout << "candidate set of size " << nb_candidates << ":" << endl;
600 Lint_vec_print(cout, candidates, nb_candidates);
601 cout << endl;
602 }
603 if (len > 2) {
604 cout << "classify_trihedral_pairs::early_test_func_type2 "
605 "len > 2" << endl;
606 exit(1);
607 }
608
609 for (i = 0; i < len; i++) {
610 Lines[i * 3 + 0] = Surf->P->line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates(S[i], 0, 0 /* verbose_level */);
611 Lines[i * 3 + 1] = Surf->P->line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates(S[i], 1, 0 /* verbose_level */);
612 Lines[i * 3 + 2] = Surf->P->line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates(S[i], 2, 0 /* verbose_level */);
613 }
614 if (f_vv) {
615 cout << "classify_trihedral_pairs::early_test_func_type2 "
616 "Lines=" << endl;
617 Lint_matrix_print(Lines, len, 3);
618 }
619
620 if (len == 2) {
621 Surf->P->unrank_point(M1, S[0]);
622 Surf->P->unrank_point(M1 + 4, S[1]);
623 }
624
625 nb_good_candidates = 0;
626 for (i = 0; i < nb_candidates; i++) {
627 a = candidates[i];
628
629 if (a == 0 || a == 1 || a == 2) {
630 continue;
631 }
632
633
634 if (f_vv) {
635 cout << "classify_trihedral_pairs::early_test_func_type2 "
636 "testing a=" << a << endl;
637 }
638
639 for (j = 0; j < len; j++) {
640 if (a == S[j]) {
641 break;
642 }
643 }
644 if (j < len) {
645 continue;
646 }
647
648 Lint_vec_copy(Lines, Lines2, len * 3);
649
651 Lines2[len * 3 + 0] = rk;
653 Lines2[len * 3 + 1] = rk;
655 Lines2[len * 3 + 2] = rk;
656
657 if (f_vv) {
658 cout << "classify_trihedral_pairs::early_test_func_type1 "
659 "Lines2=" << endl;
660 Lint_matrix_print(Lines2, len + 1, 3);
661 }
662
663
664 Sorting.lint_vec_heapsort(Lines2, (len + 1) * 3);
665
666 for (j = 1; j < (len + 1) * 3; j++) {
667 if (Lines2[j] == Lines2[j - 1]) {
668 if (f_vv) {
669 cout << "classify_trihedral_pairs::early_test_func_type2 "
670 "repeated line" << endl;
671 }
672 break;
673 }
674 }
675 if (j < (len + 1) * 3) {
676 continue;
677 }
678
679#if 0
680 if (len == 2) {
681 int_vec_copy(M1, M2, 8);
682 Surf->P->unrank_point(M2 + 8, a);
683 rk = F->rank_of_rectangular_matrix_memory_given(M2, 3, 4,
684 M3, base_cols, 0 /* verbose_level */);
685 if (rk < 3) {
686 continue;
687 }
688 }
689#endif
690
691
692 good_candidates[nb_good_candidates++] = candidates[i];
693 } // next i
694
695}
696
698 int p1, int p2, int p3,
699 int &type, int *transporter, int verbose_level)
700{
701 int f_v = (verbose_level >= 1);
702 int M1[16];
703 int M2[16];
704 int M3[16 + 1]; // if semilinear
705 int base_cols[4];
706 int base_cols2[4];
707 int rk;
708 int size_complement;
709 int c1, c2, c3, c4, a, b, c, d, e, f, lambda, mu, det, det_inv;
711
712 if (f_v) {
713 cout << "classify_trihedral_pairs::identify_three_planes" << endl;
714 }
715 Surf->P->unrank_point(M1, p1);
716 Surf->P->unrank_point(M1 + 4, p2);
717 Surf->P->unrank_point(M1 + 8, p3);
718 Int_vec_copy(M1, M2, 12);
720 M3, base_cols, 0 /* verbose_level */);
721 Combi.set_complement(base_cols, rk, base_cols + rk, size_complement, 4);
722 if (f_v) {
723 cout << "classify_trihedral_pairs::identify_three_planes "
724 "rk=" << rk << endl;
725 }
726
727 if (rk == 2) {
728
729 c3 = base_cols[rk];
730 c4 = base_cols[rk + 1];
731
732 Int_vec_copy(M1, M2, 8);
734 base_cols2, 0 /* verbose_level */);
735
736
737 c1 = base_cols2[0];
738 c2 = base_cols2[1];
739 a = M1[c1];
740 b = M1[4 + c1];
741 c = M1[8 + c1];
742 d = M1[c2];
743 e = M1[4 + c2];
744 f = M1[8 + c2];
745 det = F->add(F->mult(a, e), F->negate(F->mult(b, d)));
746 det_inv = F->inverse(det);
747 lambda = F->mult(F->add(F->mult(e, c),
748 F->negate(F->mult(b, f))), det_inv);
749 mu = F->mult(F->add(F->mult(a, f),
750 F->negate(F->mult(d, c))), det_inv);
751
752 Int_vec_copy(M1, M2, 8);
755 Int_vec_zero(M2 + 8, 8);
756 M2[2 * 4 + c3] = 1;
757 M2[3 * 4 + c4] = 1;
758 type = 1;
759 }
760 else if (rk == 3) {
761 Int_vec_copy(M1, M2, 12);
762 Int_vec_zero(M2 + 12, 4);
763 M2[3 * 4 + base_cols[3]] = 1;
764 type = 2;
765 }
766 else {
767 cout << "classify_trihedral_pairs::identify_three_planes "
768 "the rank is not 2 or 3" << endl;
769 exit(1);
770 }
771 if (f_v) {
772 cout << "classify_trihedral_pairs::identify_three_planes "
773 "M2=" << endl;
774 Int_matrix_print(M2, 4, 4);
775 }
776 F->Linear_algebra->matrix_inverse(M2, M3, 4, 0 /* verbose_level */);
777 M3[16] = 0; // if semilinear
778 A->make_element(transporter, M3, 0 /* verbose_level */);
779
780 if (f_v) {
781 cout << "classify_trihedral_pairs::identify_three_planes "
782 "done" << endl;
783 }
784}
785
786
790 int verbose_level)
791{
792 int f_v = (verbose_level >= 1);
793
794 if (f_v) {
795 cout << "classify_trihedral_pairs::classify" << endl;
796 }
797
798 if (f_v) {
799 cout << "classify_trihedral_pairs::classify "
800 "before classify_orbits_on_trihedra" << endl;
801 }
802 classify_orbits_on_trihedra(Control1, Control2, verbose_level - 1);
803 if (f_v) {
804 cout << "classify_trihedral_pairs::classify "
805 "before after classify_orbits_on_trihedra" << endl;
806 }
807
811 if (f_v) {
812 cout << "nb_orbits_type1 = " << nb_orbits_type1 << endl;
813 cout << "nb_orbits_type2 = " << nb_orbits_type2 << endl;
814 cout << "nb_orbits_ordered_total = "
815 << nb_orbits_ordered_total << endl;
816 }
817
818 // downstep:
819 if (f_v) {
820 cout << "classify_trihedral_pairs::classify "
821 "before downstep" << endl;
822 }
823 downstep(verbose_level - 2);
824 if (f_v) {
825 cout << "classify_trihedral_pairs::classify "
826 "after downstep" << endl;
827 }
828
829
830 // upstep:
831 if (f_v) {
832 cout << "classify_trihedral_pairs::classify "
833 "before upstep" << endl;
834 }
835 upstep(verbose_level - 2);
836 if (f_v) {
837 cout << "classify_trihedral_pairs::classify "
838 "after upstep" << endl;
839 }
840
841 if (f_v) {
842 cout << "classify_trihedral_pairs::classify "
844 << " orbits of trihedral pairs" << endl;
845 }
846
847
848 if (f_v) {
849 cout << "classify_trihedral_pairs::classify done" << endl;
850 }
851}
852
854{
855 int f_v = (verbose_level >= 1);
856 int i;
857
858 if (f_v) {
859 cout << "classify_trihedral_pairs::downstep" << endl;
860 }
862 Flag_orbits->init(A, A, 2 /* nb_primary_orbits_lower */,
863 3 /* pt_representation_sz */,
864 nb_orbits_ordered_total /* nb_flag_orbits */,
865 1 /* upper_bound_for_number_of_traces */, // ToDo
866 NULL /* void (*func_to_free_received_trace)(void *trace_result, void *data, int verbose_level) */,
867 NULL /* void (*func_latex_report_trace)(std::ostream &ost, void *trace_result, void *data, int verbose_level)*/,
868 NULL /* void *free_received_trace_data */,
869 verbose_level);
870
871 if (f_v) {
872 cout << "classify_trihedral_pairs::downstep "
873 "initializing flag orbits type 1" << endl;
874 }
875 for (i = 0; i < nb_orbits_type1; i++) {
879
881 3 /* level */,
882 i /* orbit_at_level */,
883 0 /* verbose_level */);
884
886 i /* node */,
887 3 /* level */,
888 ol);
889
890 R->Strong_gens->group_order(go);
891
893 Flag_orbits, i /* flag_orbit_index */,
894 0 /* downstep_primary_orbit */,
895 i /* downstep_secondary_orbit */,
896 ol.as_int() /* downstep_orbit_len */,
897 FALSE /* f_long_orbit */,
898 R->data /* int *pt_representation */,
899 R->Strong_gens,
900 verbose_level - 2);
901 R->Strong_gens = NULL;
902 FREE_OBJECT(R);
903 if (f_v) {
904 cout << "flag orbit " << i << " / "
905 << nb_orbits_ordered_total << " is type 1 orbit "
906 << i << " / " << nb_orbits_type1
907 << " stab order " << go << endl;
908 }
909 }
910 if (f_v) {
911 cout << "classify_trihedral_pairs::downstep "
912 "initializing flag orbits type 2" << endl;
913 }
914 for (i = 0; i < nb_orbits_type2; i++) {
918
920 3 /* level */, i /* orbit_at_level */,
921 0 /* verbose_level */);
922
924 i /* node */, 3 /* level */, ol);
925
926 R->Strong_gens->group_order(go);
927
930 nb_orbits_type1 + i /* flag_orbit_index */,
931 1 /* downstep_primary_orbit */,
932 i /* downstep_secondary_orbit */,
933 ol.as_int() /* downstep_orbit_len */,
934 FALSE /* f_long_orbit */,
935 R->data /* int *pt_representation */,
936 R->Strong_gens,
937 verbose_level - 2);
938 R->Strong_gens = NULL;
939 FREE_OBJECT(R);
940 if (f_v) {
941 cout << "flag orbit " << nb_orbits_type1 + i
942 << " / " << nb_orbits_ordered_total
943 << " is type 2 orbit " << i << " / "
944 << nb_orbits_type2 << " stab order " << go << endl;
945 }
946 }
947 if (f_v) {
948 cout << "classify_trihedral_pairs::downstep "
949 "initializing flag orbits done" << endl;
950 }
951
952
953 if (f_v) {
954 cout << "classify_trihedral_pairs::downstep done" << endl;
955 }
956}
957
958void classify_trihedral_pairs::upstep(int verbose_level)
959{
960 int f_v = (verbose_level >= 1);
961
962 if (f_v) {
963 cout << "classify_trihedral_pairs::upstep" << endl;
964 }
965
966 int *f_processed;
967 int nb_processed, po, so, type, orb, f, f2;
968 long int Planes[] = {0,1,5, 0,1,2};
969 long int planes1[3];
970 long int planes2[3];
971 long int planes3[3];
972 long int planes4[3];
973 int *Elt1;
974 int *Elt2;
975 int *Elt3;
976
977 f_processed = NEW_int(nb_orbits_ordered_total);
979 nb_processed = 0;
980
981 Elt1 = NEW_int(A->elt_size_in_int);
982 Elt2 = NEW_int(A->elt_size_in_int);
983 Elt3 = NEW_int(A->elt_size_in_int);
984
986
988 A->group_order(go);
989
991 6, go, verbose_level);
992
993
994 for (f = 0; f < nb_orbits_ordered_total; f++) {
995
996 double progress;
997
998 if (f_processed[f]) {
999 continue;
1000 }
1001
1002 progress = ((double)nb_processed * 100. ) /
1003 (double) nb_orbits_ordered_total;
1004
1005 if (f_v) {
1006 cout << "Defining n e w orbit "
1008 << " from flag orbit " << f << " / "
1010 << " progress=" << progress << "%" << endl;
1011 }
1014
1015
1016
1019 Lint_vec_copy(Flag_orbits->Pt + f * 3, planes1, 3);
1020 if (f_v) {
1021 cout << "classify_trihedral_pairs::upstep initializing planes: ";
1022 Lint_vec_print(cout, planes1, 3);
1023 cout << endl;
1024 }
1025 identify_three_planes(planes1[0], planes1[1], planes1[2],
1026 type, Elt1 /* int *transporter */, 0 /*verbose_level*/);
1027
1028 if (f_v) {
1029 cout << "We found a transporter:" << endl;
1030 A->element_print_quick(Elt1, cout);
1031 }
1032
1033 Lint_vec_copy(Planes + po * 3, planes2, 3);
1034 A->map_a_set_and_reorder(planes2, planes3, 3,
1035 Elt1, 0 /* verbose_level */);
1036 if (type == 1) {
1038 planes3, 3 /* size */, 3 /* level */,
1039 planes4 /* int *canonical_set */, Elt2,
1040 0 /* verbose_level */);
1041 }
1042 else if (type == 2) {
1044 planes3, 3 /* size */, 3 /* level */,
1045 planes4 /* int *canonical_set */, Elt2,
1046 0 /* verbose_level */);
1047 }
1048 else {
1049 cout << "type must be either 1 or 2." << endl;
1050 exit(1);
1051 }
1052 A->element_mult(Elt1, Elt2, Elt3, 0);
1053
1054
1057
1059
1060 if (type - 1 == po && orb == so) {
1061 if (f_v) {
1062 cout << "We found an automorphism "
1063 "of the trihedral pair:" << endl;
1064 A->element_print_quick(Elt3, cout);
1065 cout << endl;
1066 }
1067
1068 S->add_single_generator(Elt3,
1069 2 /* group_index */, verbose_level - 2);
1070 }
1071 else {
1072 if (f_v) {
1073 cout << "We are identifying with po="
1074 << type - 1 << " so=" << orb << endl;
1075 }
1076 if (type == 1) {
1077 f2 = orb;
1078 }
1079 else {
1080 f2 = nb_orbits_type1 + orb;
1081 }
1082 if (f_v) {
1083 cout << "We are identifying with po=" << type - 1
1084 << " so=" << orb << ", which is "
1085 "flag orbit " << f2 << endl;
1086 }
1091 A->element_invert(Elt3,
1093 f_processed[f2] = TRUE;
1094 nb_processed++;
1095 }
1096 S->group_order(go);
1097 if (f_v) {
1098 cout << "the trihedral pair has a stabilizer of order "
1099 << go << endl;
1100 }
1101
1102 long int Rep[6];
1103
1104 Lint_vec_copy(Planes + po * 3, Rep, 3);
1105 Lint_vec_copy(planes1, Rep + 3, 3);
1109 S, Rep, NULL /* extra_data */, verbose_level);
1110
1111
1112 f_processed[f] = TRUE;
1113 nb_processed++;
1115 }
1116 if (nb_processed != nb_orbits_ordered_total) {
1117 cout << "nb_processed != nb_orbits_ordered_total" << endl;
1118 cout << "nb_processed = " << nb_processed << endl;
1119 cout << "nb_orbits_ordered_total = "
1120 << nb_orbits_ordered_total << endl;
1121 exit(1);
1122 }
1123
1125
1126 if (f_v) {
1127 cout << "We found " << Flag_orbits->nb_primary_orbits_upper
1128 << " orbits of trihedral pairs" << endl;
1129 }
1130
1131 FREE_int(Elt1);
1132 FREE_int(Elt2);
1133 FREE_int(Elt3);
1134 FREE_int(f_processed);
1135
1136 if (f_v) {
1137 cout << "classify_trihedral_pairs::upstep done" << endl;
1138 }
1139}
1140
1142{
1144}
1145
1147 int f_with_stabilizers)
1148{
1149 string title;
1150
1151 title.assign("Classification of Double Triplets");
1153 title, f_with_stabilizers,
1154 FALSE, NULL, NULL);
1155}
1156
1159 long int *planes6, int *transporter, int &orbit_index,
1160 int verbose_level)
1161{
1162 int f_v = (verbose_level >= 1);
1163 //int f_vv = (verbose_level >= 2);
1164
1165 if (f_v) {
1166 cout << "classify_trihedral_pairs::identify_trihedral_pair_and_get_stabilizer" << endl;
1167 }
1168
1169 if (f_v) {
1170 cout << "planes6: ";
1171 Lint_vec_print(cout, planes6, 6);
1172 cout << endl;
1173 }
1174
1175
1176 if (f_v) {
1177 cout << "classify_trihedral_pairs::identify_trihedral_pair_"
1178 "and_get_stabilizer before identify_trihedral_pair" << endl;
1179 }
1180 identify_trihedral_pair(planes6,
1181 transporter, orbit_index, verbose_level);
1182 if (f_v) {
1183 cout << "classify_trihedral_pairs::identify_trihedral_pair_"
1184 "and_get_stabilizer after identify_trihedral_pair" << endl;
1185 }
1186 if (f_v) {
1187 cout << "orbit_index=" << orbit_index << endl;
1188 }
1189
1192
1193
1194 if (f_v) {
1195 cout << "classify_trihedral_pairs::identify_trihedral_pair_"
1196 "and_get_stabilizer before gens->init_generators_for_"
1197 "the_conjugate_group_aGav" << endl;
1198 }
1200 Trihedral_pairs->Orbit[orbit_index].gens,
1201 transporter, verbose_level);
1202 if (f_v) {
1203 cout << "classify_trihedral_pairs::identify_trihedral_pair_"
1204 "and_get_stabilizer after gens->init_generators_for_"
1205 "the_conjugate_group_aGav" << endl;
1206 }
1207
1208
1209 if (f_v) {
1210 cout << "classify_trihedral_pairs::identify_trihedral_pair_and_get_stabilizer done" << endl;
1211 }
1212
1213 return gens;
1214}
1215
1216
1217
1219 int *transporter, int &orbit_index, int verbose_level)
1220{
1221 int f_v = (verbose_level >= 1);
1222 int f_vv = (verbose_level >= 2);
1223 int type, orb, f, f2;
1224 int *Elt1;
1225 int *Elt2;
1226 int *Elt3;
1227 int *Elt4;
1228 long int planes1[3];
1229 long int planes2[3];
1230
1231 if (f_v) {
1232 cout << "classify_trihedral_pairs::identify_trihedral_pair" << endl;
1233 }
1234 Elt1 = NEW_int(A->elt_size_in_int);
1235 Elt2 = NEW_int(A->elt_size_in_int);
1236 Elt3 = NEW_int(A->elt_size_in_int);
1237 Elt4 = NEW_int(A->elt_size_in_int);
1238
1239 if (f_v) {
1240 cout << "classify_trihedral_pairs::identify_trihedral_pair "
1241 "identifying the first trihedron" << endl;
1242 }
1243 identify_three_planes(planes6[0], planes6[1], planes6[2],
1244 type, Elt1 /* int *transporter */, 0 /*verbose_level*/);
1245
1246 if (f_vv) {
1247 cout << "Elt1=" << endl;
1248 A->element_print_quick(Elt1, cout);
1249 }
1250
1252 planes6 + 3, planes1, 3, Elt1,
1253 0 /* verbose_level */);
1254 if (type == 1) {
1256 planes1, 3 /* size */, 3 /* level */,
1257 planes2 /* int *canonical_set */, Elt2,
1258 0 /* verbose_level */);
1259 }
1260 else if (type == 2) {
1262 planes1, 3 /* size */, 3 /* level */,
1263 planes2 /* int *canonical_set */, Elt2,
1264 0 /* verbose_level */);
1265 }
1266 else {
1267 cout << "classify_trihedral_pairs::identify_trihedral_pair "
1268 "type must be either 1 or 2." << endl;
1269 exit(1);
1270 }
1271 A->element_mult(Elt1, Elt2, Elt3, 0);
1272
1273 if (type == 1) {
1274 f = orb;
1275 }
1276 else {
1277 f = nb_orbits_type1 + orb;
1278 }
1280 A->element_mult(Elt3,
1284 }
1285 else {
1286 f2 = -1;
1287 A->element_move(Elt3, Elt4, 0);
1289 }
1290 if (f_v) {
1291 cout << "classify_trihedral_pairs::identify_trihedral_pair "
1292 "type=" << type << " orb=" << orb << " f=" << f
1293 << " f2=" << f2 << " orbit_index=" << orbit_index << endl;
1294 }
1295 A->element_move(Elt4, transporter, 0);
1296 if (f_vv) {
1297 cout << "transporter=" << endl;
1298 A->element_print_quick(transporter, cout);
1299 }
1300
1301 FREE_int(Elt1);
1302 FREE_int(Elt2);
1303 FREE_int(Elt3);
1304 FREE_int(Elt4);
1305 if (f_v) {
1306 cout << "classify_trihedral_pairs::identify_trihedral_pair "
1307 "done" << endl;
1308 }
1309}
1310
1311// #############################################################################
1312// global functions:
1313// #############################################################################
1314
1315static void classify_trihedral_pairs_early_test_function_type1(long int *S, int len,
1316 long int *candidates, int nb_candidates,
1317 long int *good_candidates, int &nb_good_candidates,
1318 void *data, int verbose_level)
1319{
1321 int f_v = (verbose_level >= 1);
1322
1323 if (f_v) {
1324 cout << "classify_trihedral_pairs_early_test_function_type1 "
1325 "for set ";
1326 Lint_vec_print(cout, S, len);
1327 cout << endl;
1328 }
1329 CT->early_test_func_type1(S, len,
1330 candidates, nb_candidates,
1331 good_candidates, nb_good_candidates,
1332 verbose_level - 2);
1333 if (f_v) {
1334 cout << "classify_trihedral_pairs_early_test_function_type1 "
1335 "done" << endl;
1336 }
1337}
1338
1339static void classify_trihedral_pairs_early_test_function_type2(long int *S, int len,
1340 long int *candidates, int nb_candidates,
1341 long int *good_candidates, int &nb_good_candidates,
1342 void *data, int verbose_level)
1343{
1344 classify_trihedral_pairs *CT = (classify_trihedral_pairs *) data;
1345 int f_v = (verbose_level >= 1);
1346
1347 if (f_v) {
1348 cout << "classify_trihedral_pairs_early_test_function_type2 "
1349 "for set ";
1350 Lint_vec_print(cout, S, len);
1351 cout << endl;
1352 }
1353 CT->early_test_func_type2(S, len,
1354 candidates, nb_candidates,
1355 good_candidates, nb_good_candidates,
1356 verbose_level - 2);
1357 if (f_v) {
1358 cout << "classify_trihedral_pairs_early_test_function_type2 "
1359 "done" << endl;
1360 }
1361}
1362
1363}}}}
1364
void set_complement(int *subset, int subset_size, int *complement, int &size_complement, int universal_set_size)
a collection of functions related to sorted vectors
long int line_of_intersection_of_two_planes_in_three_space_using_dual_coordinates(long int plane1, long int plane2, int verbose_level)
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)
domain to compute with objects of type longinteger
Definition: ring_theory.h:240
void add_in_place(longinteger_object &a, longinteger_object &b)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
void create(long int i, const char *file, int line)
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
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 group_order(ring_theory::longinteger_object &go)
Definition: action.cpp:2223
void map_a_set_and_reorder(long int *set, long int *image_set, int n, int *Elt, int verbose_level)
Definition: action.cpp:698
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void add_single_generator(int *Elt, int group_index, int verbose_level)
void generators_for_stabilizer_of_three_collinear_points_in_PGL4(actions::action *A_PGL_4_q, matrix_group *Mtx, int verbose_level)
void init_generators_for_the_conjugate_group_aGav(strong_generators *SG, int *Elt_a, int verbose_level)
void generators_for_stabilizer_of_triangle_in_PGL4(actions::action *A_PGL_4_q, matrix_group *Mtx, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
a single step classification of combinatorial objects
Definition: classify.h:29
void print_latex(std::ostream &ost, std::string &title, int f_print_stabilizer_gens, int f_has_print_function, void(*print_function)(std::ostream &ost, int i, classification_step *Step, void *print_function_data), void *print_function_data)
void init(actions::action *A, actions::action *A2, int max_orbits, int representation_sz, ring_theory::longinteger_object &go, int verbose_level)
void init(flag_orbits *Flag_orbits, int flag_orbit_index, int downstep_primary_orbit, int downstep_secondary_orbit, int downstep_orbit_len, int f_long_orbit, long int *pt_representation, groups::strong_generators *Strong_gens, int verbose_level)
stores the set of flag orbits; related to the class classification_step
Definition: classify.h:75
void init(actions::action *A, actions::action *A2, int nb_primary_orbits_lower, int pt_representation_sz, int nb_flag_orbits, int upper_bound_for_number_of_traces, void(*func_to_free_received_trace)(void *trace_result, void *data, int verbose_level), void(*func_latex_report_trace)(std::ostream &ost, void *trace_result, void *data, int verbose_level), void *free_received_trace_data, int verbose_level)
Definition: flag_orbits.cpp:75
void init(classification_step *C, int orbit_index, groups::strong_generators *gens, long int *Rep, void *extra_data, int verbose_level)
Definition: orbit_node.cpp:41
to control the behavior of the poset classification algorithm
int trace_set(long int *set, int size, int level, long int *canonical_set, int *Elt_transporter, int verbose_level)
data_structures_groups::set_and_stabilizer * get_set_and_stabilizer(int level, int orbit_at_level, int verbose_level)
void orbit_length(int orbit_at_level, int level, ring_theory::longinteger_object &len)
void compute_orbits_on_subsets(int target_depth, poset_classification_control *PC_control, poset_with_group_action *Poset, int verbose_level)
void init_subset_lattice(actions::action *A, actions::action *A2, groups::strong_generators *Strong_gens, int verbose_level)
void add_testing_without_group(void(*func)(long int *S, int len, long int *candidates, int nb_candidates, long int *good_candidates, int &nb_good_candidates, void *data, int verbose_level), void *data, int verbose_level)
void early_test_func_type2(long int *S, int len, long int *candidates, int nb_candidates, long int *good_candidates, int &nb_good_candidates, int verbose_level)
void classify_orbits_on_trihedra(poset_classification::poset_classification_control *Control1, poset_classification::poset_classification_control *Control2, int verbose_level)
void early_test_func_type1(long int *S, int len, long int *candidates, int nb_candidates, long int *good_candidates, int &nb_good_candidates, int verbose_level)
groups::strong_generators * identify_trihedral_pair_and_get_stabilizer(long int *planes6, int *transporter, int &orbit_index, int verbose_level)
void classify(poset_classification::poset_classification_control *Control1, poset_classification::poset_classification_control *Control2, int verbose_level)
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define Lint_matrix_print(A, B, C)
Definition: foundations.h:708
#define FREE_int(p)
Definition: foundations.h:640
#define Int_vec_zero(A, B)
Definition: foundations.h:713
#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 TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
the orbiter library for the classification of combinatorial objects