Orbiter 2022
Combinatorial Objects
compute_stabilizer.cpp
Go to the documentation of this file.
1/*
2 * compute_stabilizer.cpp
3 *
4 * Created on: Apr 24, 2021
5 * Author: betten
6 */
7
8
9
10
12#include "discreta/discreta.h"
15
16using namespace std;
17
18namespace orbiter {
19namespace layer4_classification {
20
21
22
24{
25
26 SubSt = NULL;
27
28
29 A_on_the_set = NULL;
30 // only used to print the induced action on the set
31 // of the set stabilizer
32
33 Stab = NULL;
34 //longinteger_object stab_order, new_stab_order;
38
39
40 Stab_orbits = NULL;
41
42
43
44
45
46
47 A_induced = NULL;
48 //longinteger_object induced_go, K_go;
49
51 transporter1 = NULL;
52 transporter2 = NULL;
53 T1 = NULL;
54 T1v = NULL;
55 T2 = NULL;
56
57 Kernel_original = NULL;
58 K = NULL; // kernel for building up Stab
59
60
61
62 Aut = NULL;
63 Aut_original = NULL;
64 //longinteger_object ago;
65 //longinteger_object ago1;
66 //longinteger_object target_go;
67
68
69 //U = NULL;
70
72 Canonical_forms = NULL;
74
77}
78
80{
81 //free1();
82
83 if (Stab) {
85 }
86 if (A_on_the_set) {
88 }
89
90
91 if (A_induced) {
93 }
94 if (Aut) {
96 }
97 if (Aut_original) {
99 }
100
105 FREE_int(T1);
106 FREE_int(T1v);
107 FREE_int(T2);
108 }
109
110#if 0
111 if (U) {
112 FREE_OBJECT(U);
113 }
114#endif
115
118 }
119 if (Canonical_forms) {
121 }
124 }
125
126}
127
128
131 long int *canonical_pts,
132 int verbose_level)
133// computes canonical_pts[] (lower part), Stab_orbits, Stab, A_on_the_set
134// and then calls restricted_action_on_interesting_points,
135// compute_canonical_form, compute_automorphism_group,
136// and then computes canonical_pts[] (upper part).
137{
138 int f_v = (verbose_level >= 1);
139
140 if (f_v) {
141 cout << "compute_stabilizer::init" << endl;
142 cout << "fname_out = " << SubSt->fname_case_out << endl;
143 cout << "SubSt->selected_orbit = " << SubSt->selected_orbit << endl;
144 cout << "nb_interesting_subsets = " << SubSt->nb_interesting_subsets << endl;
145 }
147
148 if (f_v) {
149 cout << "compute_stabilizer::init A=" << endl;
150 SubSt->SubC->A->print_info();
151 }
152
153 if (f_v) {
154 cout << "compute_stabilizer::init A2=" << endl;
155 SubSt->SubC->A2->print_info();
156 }
157
158
159 int size;
160
161 SubSt->SubC->PC->get_set(SubSt->SubC->substructure_size, SubSt->selected_orbit, canonical_pts, size);
162 if (f_v) {
163 cout << "compute_stabilizer::init canonical substructure: ";
164 Lint_vec_print(cout, canonical_pts, size);
165 cout << endl;
166 }
167
168
170
172
173
174 if (f_v) {
175 cout << "compute_stabilizer::init before Stab_orbits->init" << endl;
176 }
177
178 Stab_orbits->init(this, verbose_level);
179
180 if (f_v) {
181 cout << "compute_stabilizer::init after Stab_orbits->init" << endl;
182 }
183
184
185 if (f_v) {
186 cout << "compute_stabilizer::init before creating Stab" << endl;
187 }
188
189
191 Stab->init(SubSt->SubC->A, 0 /* verbose_level */);
192 Stab->init_trivial_group(0 /* verbose_level - 1*/);
193
194
195
196 if (f_v) {
197 cout << "compute_stabilizer::init before A2->restricted_action" << endl;
198 }
199 A_on_the_set = SubSt->SubC->A2->restricted_action(SubSt->Pts, SubSt->nb_pts, 0/*verbose_level*/);
200 if (f_v) {
201 cout << "compute_stabilizer::init after A2->restricted_action" << endl;
202 }
203
204
205
206
207
208
209
210
211
212 if (f_v) {
213 cout << "compute_stabilizer::init before restricted_action_on_interesting_points" << endl;
214 }
216 if (f_v) {
217 cout << "compute_stabilizer::init after restricted_action_on_interesting_points" << endl;
218 }
219
220
221
222 if (f_v) {
223 cout << "compute_stabilizer::init before compute_canonical_form" << endl;
224 }
225 compute_canonical_form(verbose_level);
226 if (f_v) {
227 cout << "compute_stabilizer::init after compute_canonical_form" << endl;
228 cout << "compute_stabilizer::init backtrack_nodes_first_time = " << backtrack_nodes_first_time << endl;
229 cout << "compute_stabilizer::init backtrack_nodes_total_in_loop = " << backtrack_nodes_total_in_loop << endl;
230 }
231
232#if 0
233 if (f_v) {
234 cout << "compute_stabilizer::init before init_U" << endl;
235 }
236
237 init_U(verbose_level);
238 if (f_v) {
239 cout << "compute_stabilizer::init after init_U" << endl;
240 }
241#endif
242
243
244 if (f_v) {
245 cout << "compute_stabilizer::init before compute_automorphism_group" << endl;
246 }
247 compute_automorphism_group(verbose_level);
248 if (f_v) {
249 cout << "compute_stabilizer::init after compute_automorphism_group" << endl;
250 cout << "compute_stabilizer::init backtrack_nodes_first_time = " << backtrack_nodes_first_time << endl;
251 cout << "compute_stabilizer::init backtrack_nodes_total_in_loop = " << backtrack_nodes_total_in_loop << endl;
252 }
253
254
255
256
257
258
259
260 int i;
261
262 for (i = 0; i < Stab_orbits->reduced_set_size; i++) {
263 canonical_pts[SubSt->SubC->substructure_size + i] =
265 }
266
267 if (f_v) {
268 cout << "compute_stabilizer::init input : ";
270 cout << endl;
271 cout << "compute_stabilizer::init canonical: ";
272 Lint_vec_print(cout, canonical_pts, SubSt->nb_pts);
273 cout << endl;
274 }
275
276 if (f_v) {
277 cout << "compute_stabilizer::init done" << endl;
278 }
279}
280
281
283{
284 int f_v = (verbose_level >= 1);
285 int cnt2;
287
288 if (f_v) {
289 cout << "compute_stabilizer::compute_automorphism_group" << endl;
290 }
291
293
294
295
296 for (cnt2 = 0; cnt2 < nb_interesting_subsets_rr; cnt2++) {
297
298
299 //if (U->is_minimal(cnt, 0 /* verbose_level */)) {
300 compute_automorphism_group_handle_case(cnt2, verbose_level);
301 //}
302
303 }
304
305 if (f_v) {
306 cout << "compute_stabilizer::compute_automorphism_group "
307 "nb_interesting_subsets_reduced = " << Stab_orbits->nb_interesting_subsets_reduced << endl;
308 cout << "compute_stabilizer::compute_automorphism_group "
309 "nb_times_orbit_count_does_not_match_up = " << nb_times_orbit_count_does_not_match_up << endl;
310 }
311
312
313
314 if (f_v) {
315 cout << "compute_stabilizer::compute_automorphism_group done" << endl;
316 }
317}
318
319
321{
322 int f_v = (verbose_level >= 1);
323 int f_vv = (verbose_level >= 2);
324 int cnt;
326
327
328 if (f_v) {
329 cout << "compute_stabilizer::compute_automorphism_group_handle_case STABILIZER loop "
330 << cnt2 << " / " << nb_interesting_subsets_rr << " stab_order=" << stab_order << endl;
331 }
332
333 cnt = interesting_subsets_rr[cnt2];
334
335
336 if (f_vv) {
337 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
338 "before Stab_orbits->map_reduced_set_and_do_orbit_counting" << endl;
339 }
343 verbose_level);
344 if (f_vv) {
345 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
346 "after Stab_orbits->map_reduced_set_and_do_orbit_counting" << endl;
347 }
348
349 if (f_v) {
351 cout << endl;
352 }
353
354
356 cout << "compute_automorphism_group_handle_case !Stab_orbits->check_orbit_count()" << endl;
357 exit(1);
358 }
359
360
361 if (f_vv) {
362 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
363 "before Stab_orbits->compute_local_labels" << endl;
364 }
368 verbose_level);
369 if (f_vv) {
370 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
371 "after Stab_orbits->compute_local_labels" << endl;
372 }
373 if (f_v) {
374 cout << "local labels:" << endl;
376 cout << endl;
377 }
378
379
380 groups::sims *Stab0 = NULL;
381
382 if (cnt2 == 0) {
383
384
385 if (f_vv) {
386 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
387 "before compute_canonical_set_and_group" << endl;
388 }
392 Stab_orbits->elt2 /*int *transporter*/, Stab0,
393 verbose_level);
394 if (f_vv) {
395 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
396 "after compute_canonical_set_and_group" << endl;
397 }
402 FALSE);
403
404 }
405 else {
406 if (f_vv) {
407 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
408 "before compute_canonical_set" << endl;
409 }
414 Stab_orbits->elt2 /*int *transporter*/,
415 verbose_level);
416 if (f_vv) {
417 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
418 "after compute_canonical_set" << endl;
419 }
421 }
422 if (f_v) {
423 cout << "canonical form:" << endl;
425 cout << endl;
426 }
427
428 int cmp;
429
431
432 if (cmp != 0) {
433 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
434 "the two canonical sets are not the same, error" << endl;
435 exit(1);
436 }
437
438 if (cnt2 == 0) {
439 if (f_vv) {
440 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
441 "before setup_stabilizer" << endl;
442 }
443 setup_stabilizer(Stab0, verbose_level);
444 if (f_vv) {
445 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
446 "after setup_stabilizer" << endl;
447 }
448 }
449 else {
450 if (f_vv) {
451 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
452 "before retrieve_automorphism" << endl;
453 }
454 retrieve_automorphism(verbose_level);
455 if (f_vv) {
456 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
457 "after retrieve_automorphism" << endl;
458 }
459
460
461 // new automorphism is now in new_automorphism
462
463
464 if (f_vv) {
465 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
466 "before add_automorphism" << endl;
467 }
468 add_automorphism(verbose_level);
469 if (f_vv) {
470 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
471 "after add_automorphism" << endl;
472 }
473
474
475 if (f_vv) {
476 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
477 "before update_stabilizer" << endl;
478 }
479 update_stabilizer(verbose_level);
480 if (f_vv) {
481 cout << "compute_stabilizer::compute_automorphism_group_handle_case "
482 "after update_stabilizer" << endl;
483 }
484
485
486 }
487
488 if (f_v) {
489 cout << "compute_stabilizer::compute_automorphism_group_handle_case done" << endl;
490 }
491}
492
494{
495 int f_v = (verbose_level >= 1);
496
497 if (f_v) {
498 cout << "compute_stabilizer::setup_stabilizer" << endl;
499 }
500
507
510
511 K->init(SubSt->SubC->A, 0 /* verbose_level */);
512 K->init_trivial_group(0 /*verbose_level - 1*/);
513
515 if (f_v) {
516 cout << "compute_stabilizer::setup_stabilizer kernel has order " << K_go << endl;
517 }
518
519 // conjugate the Kernel so that it is a subgroup of
520 // the stabilizer of the set Pts[] that we wanted to stabilize originally:
521 // remember that elt1 is the transporter that was computed in map_it() above
522
523 if (f_v) {
524 cout << "compute_stabilizer::setup_stabilizer before Kernel_original->conjugate" << endl;
525 }
528 FALSE, 0 /*verbose_level - 3*/);
529 if (f_v) {
530 cout << "compute_stabilizer::setup_stabilizer after Kernel_original->conjugate" << endl;
531 }
533 if (f_v) {
534 cout << "compute_stabilizer::setup_stabilizer after conjugation, kernel has order " << K_go << endl;
535 }
536
537 if (f_v) {
538 cout << "compute_stabilizer::setup_stabilizer adding kernel of order " << K_go
539 << " to the stabilizer (in action " << Stab->A->label << ")" << endl;
540 }
541 if (f_v) {
542 cout << "compute_stabilizer::setup_stabilizer before Stab->build_up_group_random_process" << endl;
543 }
545 K_go, FALSE, NULL, 0 /*verbose_level - 3*/);
546 if (f_v) {
547 cout << "compute_stabilizer::setup_stabilizer after Stab->build_up_group_random_process" << endl;
548 }
550
551 if (f_v) {
552 cout << "compute_stabilizer::setup_stabilizer kernel of action on the set has been added to stabilizer" << endl;
553 cout << "compute_stabilizer::setup_stabilizer current stabilizer order " << stab_order << endl;
554 }
555#if 0
556 if (!Stab->test_if_in_set_stabilizer(A, the_set, set_size, verbose_level)) {
557 cout << "set stabilizer does not stabilize" << endl;
558 exit(1);
559 }
560 if (f_v) {
561 cout << "set stabilizer of order " << stab_order << " is OK" << endl;
562 }
563#endif
564 // here we need the stabilizer of the set the_set[]
565 // and the kernel of the action has to go into Stab first.
566
567
570
571
572 // computes the stabilizer of reduced_set[] in the stabilizer
573 // of the k-subset and in the induced action:
574 if (f_v) {
575 cout << "compute_stabilizer::setup_stabilizer before A_induced.make_canonical" << endl;
576 cout << "verbose_level=" << verbose_level << endl;
577 cout << "before make_canonical: ";
579 cout << endl;
580 }
581
582
583 // Stab0 is the stabilizer of canonical_set1 in the induced action (A_induced)
584
585 Aut = Stab0;
586
588 if (f_v) {
589 cout << "compute_stabilizer::setup_stabilizer current stabilizer order " << ago << endl;
590 }
591 if (FALSE) {
592 cout << "transporter1:" << endl;
594 cout << endl;
595 }
596
597#if 0
598 if (f_v) {
599 cout << "testing stabilizer of canonical set" << endl;
600 if (!Aut.test_if_in_set_stabilizer(&A_induced, canonical_set1, reduced_set_size, verbose_level)) {
601 cout << "set stabilizer does not stabilize" << endl;
602 exit(1);
603 }
604 }
605#endif
606
608
609 if (FALSE) {
610 cout << "T1:" << endl;
611 SubSt->SubC->A->element_print(T1, cout);
612 cout << endl;
613 }
615
616 // T1 := elt1 * elt2
617 // moves the_set to the canonical set.
618
620 Aut_original->conjugate(SubSt->SubC->A /*Aut.A */, Aut, T1,
621 TRUE /* f_overshooting_OK */, 0 /*verbose_level - 3*/);
623 if (f_v) {
624 cout << "compute_stabilizer::setup_stabilizer after conjugation, group in action " << Aut_original->A->label << endl;
625 cout << "compute_stabilizer::setup_stabilizer automorphism group order before = " << ago << endl;
626 cout << "compute_stabilizer::setup_stabilizer automorphism group order after = " << ago1 << endl;
627 }
628
630
631 D.mult(K_go, ago, target_go);
632 if (f_v) {
633 cout << "compute_stabilizer::setup_stabilizer K_go=" << K_go << endl;
634 cout << "compute_stabilizer::setup_stabilizer ago=" << ago << endl;
635 cout << "compute_stabilizer::setup_stabilizer target_go=" << target_go << endl;
636 cout << "compute_stabilizer::setup_stabilizer adding automorphisms to set-stabilizer" << endl;
637 }
638 if (f_v) {
639 cout << "compute_stabilizer::setup_stabilizer before Stab->build_up_group_random_process in action ";
640 Stab->A->print_info();
641 cout << endl;
642 }
644 target_go, FALSE, NULL, 0 /*verbose_level - 3*/);
645 if (f_v) {
646 cout << "compute_stabilizer::setup_stabilizer after Stab->build_up_group_random_process" << endl;
647 }
649 if (f_v) {
650 cout << "compute_stabilizer::setup_stabilizer set stabilizer is added to stabilizer" << endl;
651 cout << "compute_stabilizer::setup_stabilizer current stabilizer order " << stab_order << endl;
652 }
653#if 0
654 if (!Stab->test_if_in_set_stabilizer(A, the_set, set_size, verbose_level)) {
655 cout << "set stabilizer does not stabilize" << endl;
656 exit(1);
657 }
658 if (f_v) {
659 cout << "set stabilizer of order " << stab_order << " is OK" << endl;
660 }
661#endif
662
663 //A->element_mult(elt1, transporter1, Elt1, FALSE);
664 //A->element_invert(Elt1, Elt1_inv, FALSE);
665
666 if (f_v) {
667 cout << "compute_stabilizer::setup_stabilizer done" << endl;
668 }
669
670}
671
673// computes A_induced, induced_go, K_go
674{
675 int f_v = (verbose_level >= 1);
676
677 if (f_v) {
678 cout << "compute_stabilizer::restricted_action_on_interesting_points" << endl;
679 }
680 // Compute the restricted action on the set of
681 // interesting points and call it A_induced :
682 // Determine the kernel
683
684
685 if (f_v) {
686 cout << "compute_stabilizer::restricted_action_on_interesting_points "
687 "interesting_points=" << endl;
688 Lint_vec_print(cout,
691 cout << endl;
692 }
693
694 if (f_v) {
695 cout << "compute_stabilizer::restricted_action_on_interesting_points "
696 "computing induced action by restriction" << endl;
697 }
698
702 0 /*verbose_level*/);
703 if (f_v) {
704 cout << "compute_stabilizer::restricted_action_on_interesting_points "
705 "after A2->restricted_action" << endl;
706 }
707 if (f_v) {
708 cout << "compute_stabilizer::restricted_action_on_interesting_points "
709 "before A_induced->group_order" << endl;
710 }
712 if (f_v) {
713 cout << "compute_stabilizer::restricted_action_on_interesting_points "
714 "induced_go = " << induced_go << endl;
715 cout << "compute_stabilizer::restricted_action_on_interesting_points "
716 "A_induced:" << endl;
718 }
719
720 if (f_v) {
721 cout << "compute_stabilizer::restricted_action_on_interesting_points "
722 "before A_induced->induced_action_override_sims" << endl;
723 }
726 0 /*verbose_level*/);
727 if (f_v) {
728 cout << "compute_stabilizer::restricted_action_on_interesting_points "
729 "after A_induced->induced_action_override_sims" << endl;
730 }
731
732 if (!A_induced->f_has_kernel) {
733 cout << "compute_stabilizer::restricted_action_on_interesting_points "
734 "A_induced does not have kernel" << endl;
735 exit(1);
736 }
738 if (f_v) {
739 cout << "compute_stabilizer::restricted_action_on_interesting_points "
740 "induced action by restriction: group order = " << induced_go << endl;
741 cout << "kernel group order = " << K_go << endl;
742 //cout << "strong generators for induced action:" << endl;
743 //A_induced.strong_generators->print_as_permutation(cout);
744 //cout << "strong generators for kernel:" << endl;
745 //A_induced.Kernel->gens.print_as_permutation(cout);
746 }
747
748
749
750 if (f_v) {
751 cout << "compute_stabilizer::restricted_action_on_interesting_points done" << endl;
752 }
753}
754
755
756
758{
759 int f_v = (verbose_level >= 1);
760 int cnt;
762
763 if (f_v) {
764 cout << "compute_stabilizer::compute_canonical_form" << endl;
765 }
766 // In the second step, we consider all possible images for the chosen k-subset
767 // and try to pick up coset representatives for the subgroup in the
768 // full set stabilizer:
769
770
773
774
778
779
780 for (cnt = 0; cnt < Stab_orbits->nb_interesting_subsets_reduced; cnt++) {
781
782 //if (U->is_minimal(cnt, 0 /* verbose_level */)) {
783 if (f_v) {
784 cout << "compute_stabilizer::compute_canonical_form case " << cnt << " / " << Stab_orbits->nb_interesting_subsets_reduced << endl;
785 }
786 compute_canonical_form_handle_case(cnt, verbose_level);
787 //}
788
789 }
790
791 if (f_v) {
792 cout << "compute_stabilizer::compute_canonical_form nb_interesting_subsets_reduced = " << Stab_orbits->nb_interesting_subsets_reduced << endl;
793 cout << "compute_stabilizer::compute_canonical_form nb_times_orbit_count_does_not_match_up = " << nb_times_orbit_count_does_not_match_up << endl;
794 }
795
796
797 if (f_v) {
798 cout << "Canonical forms:" << endl;
802 cout << endl;
803 }
804
806
807 for (cnt = 0; cnt < Stab_orbits->nb_interesting_subsets_reduced; cnt++) {
808 if (cnt == 0) {
813 }
814 else {
815 int cmp;
816
819
820 if (cmp > 0) {
825 }
826 else if (cmp == 0) {
828 }
829 }
830
831 }
832
833#if 1
834 if (f_v) {
835 cout << "canonical form : " << endl;
837 cout << "nb_interesting_subsets_rr = " << nb_interesting_subsets_rr << endl;
838 cout << "interesting_subsets_rr:" << endl;
840 cout << endl;
841 }
842#endif
843
844 if (f_v) {
845 cout << "compute_stabilizer::compute_canonical_form done" << endl;
846 }
847}
848
850{
851 int f_v = (verbose_level >= 1);
852 int f_vv = (verbose_level >= 2);
853
854 if (f_v) {
855 cout << "compute_stabilizer::compute_canonical_form_handle_case "
856 "STABILIZER loop " << cnt << " / " << Stab_orbits->nb_interesting_subsets_reduced
857 << " subset_idx=" << Stab_orbits->interesting_subsets_reduced[cnt] << endl;
858 }
859
860 if (f_vv) {
861 cout << "compute_stabilizer::compute_canonical_form_handle_case "
862 "before Stab_orbits->map_subset_and_compute_local_labels" << endl;
863 }
864 Stab_orbits->map_subset_and_compute_local_labels(cnt, verbose_level - 2);
865 if (f_vv) {
866 cout << "compute_stabilizer::compute_canonical_form_handle_case "
867 "after Stab_orbits->map_subset_and_compute_local_labels" << endl;
868 }
869
870 groups::sims *stab;
871
872 if (f_vv) {
873 cout << "compute_stabilizer::compute_canonical_form_handle_case before compute_canonical_set" << endl;
874 }
876 Stab_orbits->reduced_set1_new_labels /* input set */,
877 Stab_orbits->canonical_set1 /* output set */,
879 Stab_orbits->elt2 /* transporter */,
880 stab /* set stabilizer in the induced action */,
881 verbose_level - 2);
882 if (f_vv) {
883 cout << "compute_stabilizer::compute_canonical_form_handle_case after compute_canonical_set" << endl;
884 }
885 if (FALSE) {
886 cout << "canonical form:" << endl;
888 cout << endl;
889 }
890
894
898
902
903
904
905 if (f_v) {
906 cout << "compute_stabilizer::compute_canonical_form_handle_case "
907 "STABILIZER loop " << cnt << " / " << Stab_orbits->nb_interesting_subsets_reduced
908 << " subset_idx=" << Stab_orbits->interesting_subsets_reduced[cnt] << " done" << endl;
909 }
910
911}
912
913void compute_stabilizer::compute_canonical_set(long int *set_in, long int *set_out, int sz,
914 int *transporter, int verbose_level)
915// calls A_induced->make_canonical and computes a transporter.
916// does not compute the set stabilizer
917{
918 int f_v = (verbose_level >= 1);
919 //int f_v4 = (verbose_level >= 4);
920 int nb_nodes;
921
922 if (f_v) {
923 cout << "compute_stabilizer::compute_canonical_set" << endl;
924 }
925 if (f_v) {
926 cout << "compute_stabilizer::compute_canonical_set before A_induced->make_canonical" << endl;
927 }
928
929 groups::sims *my_Aut;
930
931 my_Aut = NEW_OBJECT(groups::sims);
932
934 sz, set_in,
935 set_out, transporter, nb_nodes,
936 TRUE, my_Aut,
937 0 /*verbose_level - 1*/);
938
939 FREE_OBJECT(my_Aut);
940
941 if (f_v) {
942 cout << "compute_stabilizer::compute_canonical_set after A_induced->make_canonical" << endl;
943 }
944 if (f_v) {
945 cout << "compute_stabilizer::compute_canonical_set done" << endl;
946 }
947}
948
950 long int *set_in, long int *set_out, int sz,
951 int *transporter, groups::sims *&stab, int verbose_level)
952// calls A_induced->make_canonical and computes a transporter and the set stabilizer
953{
954 int f_v = (verbose_level >= 1);
955 int nb_nodes;
956
957 if (f_v) {
958 cout << "compute_stabilizer::compute_canonical_set_and_group" << endl;
959 }
960 if (f_v) {
961 cout << "compute_stabilizer::compute_canonical_set_and_group before A_induced->make_canonical" << endl;
962 }
963
964
965 stab = NEW_OBJECT(groups::sims);
966
968 sz, set_in,
969 set_out, transporter, nb_nodes,
970 TRUE, stab,
971 0 /*verbose_level - 1*/);
972
973 if (f_v) {
974 cout << "compute_stabilizer::compute_canonical_set_and_group after A_induced->make_canonical" << endl;
975 }
976 if (f_v) {
977 cout << "compute_stabilizer::compute_canonical_set_and_group done" << endl;
978 }
979}
980
981#if 0
982void compute_stabilizer::init_U(int verbose_level)
983{
984 int f_v = (verbose_level >= 1);
985
986 if (f_v) {
987 cout << "compute_stabilizer::init_U before U->init" << endl;
988 }
989 U = NEW_OBJECT(union_find_on_k_subsets);
990
991 U->init(SubSt->SubC->A2, Stab,
994 verbose_level);
995
996
997 if (f_v) {
998 cout << "compute_stabilizer::init_U after U->init" << endl;
999 }
1000}
1001#endif
1002
1003
1004
1005
1007{
1008 int f_v = (verbose_level >= 1);
1010 int cmp;
1011
1014 if (cmp) {
1015
1016 if (f_v) {
1017 cout << "compute_stabilizer::update_stabilizer new stabilizer order is " << new_stab_order << endl;
1018 }
1020
1021
1022 groups::strong_generators *Strong_gens;
1023
1025 Strong_gens->init_from_sims(Stab, 0);
1026
1027 if (f_v) {
1028 Strong_gens->print_generators(cout);
1029 }
1030 FREE_OBJECT(Strong_gens);
1031
1032 //FREE_OBJECT(U);
1033
1034 //init_U(verbose_level);
1035 }
1036
1037#if 0
1038 cout << "stabilizer transversal length:" << endl;
1040 cout << endl;
1041 if (!Stab->test_if_in_set_stabilizer(A, the_set, set_size, verbose_level)) {
1042 cout << "set stabilizer does not stabilize" << endl;
1043 exit(1);
1044 }
1045#endif
1046}
1047
1048
1050{
1051 int f_v = (verbose_level >= 1);
1052 int f_v4 = (verbose_level >= 4);
1053 int drop_out_level, image, f_added;
1054
1055 //cout << "stabilizer transversal length:" << endl;
1056 //Stab->print_transversal_lengths();
1057 //cout << endl;
1058
1059 if (Stab->strip(Stab_orbits->new_automorphism, Stab_orbits->Elt4, drop_out_level, image, 0/*verbose_level - 3*/)) {
1060 if (f_v4) {
1061 cout << "compute_stabilizer::main_loop_handle_case element strips through" << endl;
1062 if (FALSE) {
1063 cout << "compute_stabilizer residue:" << endl;
1065 cout << endl;
1066 }
1067 }
1068 f_added = FALSE;
1069 //Stab->closure_group(2000, verbose_level - 1);
1070 }
1071 else {
1072 f_added = TRUE;
1073 if (f_v4) {
1074 cout << "compute_stabilizer::main_loop_handle_case element needs to be inserted at level = "
1075 << drop_out_level << " with image " << image << endl;
1076 if (FALSE) {
1078 cout << endl;
1079 }
1080 }
1081 if (!SubSt->SubC->A2->check_if_in_set_stabilizer(Stab_orbits->Elt4, SubSt->nb_pts, SubSt->Pts, 0/*verbose_level*/)) {
1082 cout << "compute_stabilizer::main_loop_handle_case residue does not stabilize original set" << endl;
1083 exit(1);
1084 }
1085 Stab->add_generator_at_level(Stab_orbits->Elt4, drop_out_level, 0/*verbose_level - 3*/);
1086 if (f_v) {
1087 cout << "compute_stabilizer::main_loop_handle_case calling closure_group" << endl;
1088 }
1089 Stab->closure_group(2000, 0 /*verbose_level - 1*/);
1090 }
1091}
1092
1094{
1095 int f_v = (verbose_level >= 1);
1096
1098 if (f_v) {
1099 cout << "compute_stabilizer::retrieve_automorphism found automorphism" << endl;
1100 }
1101 if (FALSE) {
1102 cout << "compute_stabilizer::retrieve_automorphism automorphism:" << endl;
1104 cout << endl;
1105 }
1107 SubSt->nb_pts, SubSt->Pts,
1108 verbose_level)) {
1109 cout << "compute_stabilizer::retrieve_automorphism does not stabilize original set" << endl;
1110 exit(1);
1111 }
1112 if (FALSE) {
1113 cout << "compute_stabilizer::retrieve_automorphism is in the set stabilizer" << endl;
1114 }
1115
1116 if (f_v) {
1117 cout << "the automorphism is: " << endl;
1119 cout << endl;
1120 cout << "the automorphism acts on the set as: " << endl;
1122 cout << endl;
1123 }
1124}
1125
1127{
1128 int f_v = (verbose_level >= 1);
1129 int f_v4 = (verbose_level >= 4);
1130 int nb_nodes;
1131
1132 if (f_v) {
1133 cout << "compute_stabilizer::make_canonical_second_set" << endl;
1134 }
1135 if (f_v) {
1136 cout << "compute_stabilizer::make_canonical_second_set before A_induced->make_canonical" << endl;
1137 }
1141 TRUE, Aut,
1142 0 /*verbose_level - 1*/);
1143 if (f_v) {
1144 cout << "compute_stabilizer::make_canonical_second_set after A_induced->make_canonical" << endl;
1145 }
1146
1148 if (f_v) {
1149 cout << "compute_stabilizer::make_canonical_second_set nb_nodes=" << nb_nodes << endl;
1150 }
1151 if (f_v4) {
1152 cout << "compute_stabilizer::make_canonical_second_set canonical set2: ";
1154 cout << endl;
1155 }
1156 if (FALSE) {
1157 cout << "compute_stabilizer::make_canonical_second_set transporter2:" << endl;
1159 cout << endl;
1161 cout << endl;
1162 }
1164 if (FALSE) {
1165 cout << "compute_stabilizer::make_canonical_second_set T2:" << endl;
1166 SubSt->SubC->A->element_print(T2, cout);
1167 cout << endl;
1168 //A_induced.element_print_as_permutation(transporter2, cout);
1169 //cout << endl;
1170 }
1171 if (f_v) {
1172 cout << "compute_stabilizer::make_canonical_second_set done" << endl;
1173 }
1174}
1175
1176
1177
1178
1179
1180void compute_stabilizer::report(std::ostream &ost)
1181{
1182 ost << "Input set of size " << SubSt->nb_pts << " : ";
1183 ost << "$";
1185 ost << "$";
1186 ost << "\\\\" << endl;
1187
1188 ost << "Level = " << SubSt->SubC->substructure_size << "\\\\" << endl;
1189 ost << "SubSt->selected_orbit = " << SubSt->selected_orbit << "\\\\" << endl;
1190 ost << "Nb_interesting_subsets = " << SubSt->nb_interesting_subsets << "\\\\" << endl;
1191
1192 ost << "interesting_subsets: ";
1193 //ost << "$";
1195 //ost << "$";
1196 ost << "\\\\" << endl;
1197
1198 ost << "Classification of small sets: ";
1199
1201
1202 SubSt->SubC->PC->report(ost, &Opt, 0 /* verbose_level */);
1203
1204}
1205
1207{
1208 int i;
1209
1210 for (i = 0; i < Stab_orbits->nb_interesting_subsets_reduced; i++) {
1211 cout << "STABILIZER loop " << i << " / " << Stab_orbits->nb_interesting_subsets_reduced
1212 << " subset_idx=" << Stab_orbits->interesting_subsets_reduced[i] << endl;
1213 cout << "input set: ";
1214 Lint_vec_print(cout,
1217 cout << endl;
1218 cout << "output set: ";
1219 Lint_vec_print(cout,
1222 cout << endl;
1223 cout << "transporter: ";
1224 Int_vec_print(cout,
1227 cout << endl;
1228
1229 }
1230}
1231
1232
1233
1234
1235
1236}}
void matrix_print(long int *p, int m, int n)
Definition: lint_vec.cpp:203
a collection of functions related to sorted vectors
int lint_vec_compare(long int *p, long int *q, int len)
Definition: sorting.cpp:2326
domain to compute with objects of type longinteger
Definition: ring_theory.h:240
void mult(longinteger_object &a, longinteger_object &b, longinteger_object &c)
int compare_unsigned(longinteger_object &a, longinteger_object &b)
action * restricted_action(long int *points, int nb_points, int verbose_level)
void element_print(void *elt, std::ostream &ost)
Definition: action_cb.cpp:347
void mult(void *a, void *b, void *ab)
Definition: action_cb.cpp:81
void element_mult(void *a, void *b, void *ab, int verbose_level)
Definition: action_cb.cpp:315
void make_canonical(int size, long int *set, long int *canonical_set, int *transporter, int &total_backtrack_nodes, int f_get_automorphism_group, groups::sims *Aut, int verbose_level)
Definition: backtrack.cpp:365
void element_invert(void *a, void *av, int verbose_level)
Definition: action_cb.cpp:322
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
int check_if_in_set_stabilizer(int *Elt, int size, long int *set, int verbose_level)
Definition: action.cpp:1364
void induced_action_override_sims(action &old_action, groups::sims *old_G, int verbose_level)
void element_print_as_permutation(void *elt, std::ostream &ost)
Definition: action_cb.cpp:421
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
void conjugate(actions::action *A, sims *old_G, int *Elt, int f_overshooting_OK, int verbose_level)
void init(actions::action *A, int verbose_level)
Definition: sims.cpp:289
void group_order(ring_theory::longinteger_object &go)
Definition: sims.cpp:951
void init_trivial_group(int verbose_level)
Definition: sims.cpp:584
int closure_group(int nb_times, int verbose_level)
Definition: sims_main.cpp:1353
void add_generator_at_level(int *elt, int lvl, int verbose_level)
Definition: sims_main.cpp:543
int strip(int *elt, int *residue, int &drop_out_level, int &image, int verbose_level)
Definition: sims_main.cpp:433
int test_if_in_set_stabilizer(actions::action *A, long int *set, int size, int verbose_level)
void build_up_group_random_process(sims *K, sims *old_G, ring_theory::longinteger_object &target_go, int f_override_choose_next_base_point, int(*choose_next_base_point_method)(actions::action *A, int *Elt, int verbose_level), int verbose_level)
Definition: sims_main.cpp:675
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void init_from_sims(groups::sims *S, int verbose_level)
void compute_canonical_set(long int *set_in, long int *set_out, int sz, int *transporter, int verbose_level)
ring_theory::longinteger_object induced_go
ring_theory::longinteger_object stab_order
void compute_automorphism_group_handle_case(int cnt2, int verbose_level)
void init(substructure_stats_and_selection *SubSt, long int *canonical_pts, int verbose_level)
ring_theory::longinteger_object new_stab_order
void compute_canonical_set_and_group(long int *set_in, long int *set_out, int sz, int *transporter, groups::sims *&stab, int verbose_level)
void compute_canonical_form_handle_case(int cnt, int verbose_level)
substructure_stats_and_selection * SubSt
void setup_stabilizer(groups::sims *Stab0, int verbose_level)
to control the behavior of the poset classification report function
void report(std::ostream &ost, poset_classification_report_options *Opt, int verbose_level)
orbits of the stabilizer of the substructure and orbit types
void compute_local_labels(long int *set_in, long int *set_out, int sz, int verbose_level)
void map_reduced_set_and_do_orbit_counting(int cnt, long int subset_idx, int *transporter, int verbose_level)
poset_classification::poset_classification * PC
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define FREE_int(p)
Definition: foundations.h:640
#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 TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
#define Lint_vec_print_fully(A, B, C)
Definition: foundations.h:688
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects