Orbiter 2022
Combinatorial Objects
sims_group_theory.cpp
Go to the documentation of this file.
1/*
2 * sims_group_theory.cpp
3 *
4 * Created on: Aug 24, 2019
5 * Author: betten
6 */
7
8
9
10
12#include "group_actions.h"
13
14
15using namespace std;
16
17
18namespace orbiter {
19namespace layer3_group_actions {
20namespace groups {
21
22
23void sims::random_element(int *elt, int verbose_level)
24// compute a random element among the group
25// elements represented by the chain
26// (chooses random cosets along the stabilizer chain)
27{
28 int f_v = (verbose_level >= 1);
29 int i;
31
32 if (f_v) {
33 cout << "sims::random_element" << endl;
34 cout << "sims::random_element orbit_len=";
35 Int_vec_print(cout, orbit_len, A->base_len());
36 cout << endl;
37 //cout << "transversals:" << endl;
38 //print_transversals();
39 }
40 for (i = 0; i < A->base_len(); i++) {
41 path[i] = Os.random_integer(orbit_len[i]);
42 }
43 if (f_v) {
44 cout << "sims::random_element" << endl;
45 cout << "path=";
46 Int_vec_print(cout, path, A->base_len());
47 cout << endl;
48 }
49 element_from_path(elt, verbose_level /*- 1 */);
50 if (f_v) {
51 cout << "sims::random_element done" << endl;
52 }
53}
54
56 int order, int verbose_level)
57{
58 int f_v = (verbose_level >=1);
59 int f_vv = (verbose_level >=2);
60 int o, n, cnt;
61
62 if (f_v) {
63 cout << "sims::random_element_of_order " << order << endl;
64 }
65 cnt = 0;
66 while (TRUE) {
67 cnt++;
68 random_element(elt, verbose_level - 1);
69 o = A->element_order(elt);
70 if ((o % order) == 0) {
71 break;
72 }
73 }
74 if (f_v) {
75 cout << "sims::random_element_of_order " << o
76 << " found with " << cnt << " trials" << endl;
77 }
78 if (f_vv) {
79 A->element_print_quick(elt, cout);
80 }
81 n = o / order;
82 if (f_v) {
83 cout << "sims::random_element_of_order we will raise to the "
84 << n << "-th power" << endl;
85 }
86 A->element_power_int_in_place(elt, n, 0);
87 if (f_vv) {
88 A->element_print_quick(elt, cout);
89 }
90}
91
94 int *orders, int nb, int verbose_level)
95{
96 int i;
97 int f_v = (verbose_level >=1);
98
99 if (f_v) {
100 cout << "sims::random_elements_of_order" << endl;
101 }
102
103 elts->init(A, verbose_level - 2);
104 elts->allocate(nb, verbose_level - 2);
105 for (i = 0; i < nb; i++) {
107 orders[i], verbose_level);
108 }
109 if (f_v) {
110 cout << "sims::random_elements_of_order done" << endl;
111 }
112}
113
116 int *tl, int verbose_level)
117{
118 transitive_extension_tolerant(O, SG, tl, FALSE, verbose_level);
119}
120
123 int *tl,
124 int f_tolerant, int verbose_level)
125{
126 int f_v = (verbose_level >= 1);
127 int f_vv = (verbose_level >= 2);
128 ring_theory::longinteger_object go, ol, ego, cur_ego, rgo, rem;
129 int orbit_len, j;
132
133 orbit_len = O.orbit_len[0];
134 if (f_v) {
135 cout << "sims::transitive_extension_tolerant "
136 "computing transitive extension" << endl;
137 cout << "f_tolerant=" << f_tolerant << endl;
138 }
139 group_order(go);
140 ol.create(orbit_len, __FILE__, __LINE__);
141 D.mult(go, ol, ego);
142 if (f_v) {
143 cout << "sims::transitive_extension_tolerant "
144 "group order " << go << ", orbit length "
145 << orbit_len << ", current group order " << ego << endl;
146 }
147 group_order(cur_ego);
148
149 //if (f_vv) {
150 //print(0);
151 //}
152 while (D.compare_unsigned(cur_ego, ego) != 0) {
153
154 // we do not enter the while loop if orbit_len is 1,
155 // hence the following makes sense:
156 // we want non trivial generators, hence we want j non zero.
157 if (D.compare_unsigned(cur_ego, ego) > 0) {
158 cout << "sims::transitive_extension_tolerant fatal: "
159 "group order overshoots target" << endl;
160 cout << "current group order = " << cur_ego << endl;
161 cout << "target group order = " << ego << endl;
162 if (f_tolerant) {
163 cout << "we are tolerant, so we return FALSE" << endl;
164 return FALSE;
165 }
166 cout << "we are not tolerant, so we exit" << endl;
167 exit(1);
168 }
169
170 while (TRUE) {
171 j = Os.random_integer(orbit_len);
172 if (j)
173 break;
174 }
175
176 O.coset_rep(j, 0 /* verbose_level */);
177
178 random_element(Elt2, verbose_level - 1);
179
180 A->element_mult(O.cosetrep, Elt2, Elt3, FALSE);
181
182 if (f_vv) {
183 cout << "sims::transitive_extension_tolerant "
184 "choosing random coset " << j << ", random element ";
185 Int_vec_print(cout, path, A->base_len());
186 cout << endl;
187 //A->element_print(Elt3, cout);
188 //cout << endl;
189 }
190
191 if (!strip_and_add(Elt3, Elt1 /* residue */, 0/*verbose_level - 1*/)) {
192 continue;
193 }
194
195
196 group_order(cur_ego);
197 if (f_v) {
198 cout << "sims::transitive_extension_tolerant "
199 "found an extension of order " << cur_ego
200 << " of " << ego
201 << " with " << gens.len
202 << " strong generators" << endl;
203 D.integral_division(ego, cur_ego, rgo, rem, 0);
204 cout << "remaining factor: " << rgo
205 << " remainder " << rem << endl;
206 }
207
208
209 }
210 if (f_v) {
211 cout << "sims::transitive_extension_tolerant "
212 "extracting strong generators" << endl;
213 }
214 extract_strong_generators_in_order(SG, tl, verbose_level - 2);
215 return TRUE;
216}
217
219 int *coset_reps, int nb_cosets,
221 int *tl,
222 int verbose_level)
223{
224 int f_v = (verbose_level >= 1);
225
226 if (f_v) {
227 cout << "sims::transitive_extension_using_coset_"
228 "representatives_extract_generators" << endl;
229 }
231 coset_reps, nb_cosets,
232 verbose_level);
233 extract_strong_generators_in_order(SG, tl, verbose_level - 2);
234 if (f_v) {
235 cout << "sims::transitive_extension_using_coset_"
236 "representatives_extract_generators done" << endl;
237 }
238}
239
240
242 int *coset_reps, int nb_cosets,
243 int verbose_level)
244{
245 int f_v = (verbose_level >= 1);
246 int f_vv = (verbose_level >= 2);
247 ring_theory::longinteger_object go, ol, ego, cur_ego, rgo, rem;
248 int orbit_len, j;
251
252 orbit_len = nb_cosets;
253 if (f_v) {
254 cout << "sims::transitive_extension_using_coset_"
255 "representatives computing transitive extension" << endl;
256 }
257 group_order(go);
258 ol.create(orbit_len, __FILE__, __LINE__);
259 D.mult(go, ol, ego);
260 if (f_v) {
261 cout << "sims::transitive_extension_using_coset_"
262 "representatives group order " << go
263 << ", orbit length " << orbit_len
264 << ", current group order " << ego << endl;
265 }
266 group_order(cur_ego);
267
268 //if (f_vv) {
269 //print(0);
270 //}
271 while (D.compare_unsigned(cur_ego, ego) != 0) {
272
273 // we do not enter the while loop if orbit_len is 1,
274 // hence the following makes sense:
275 // we want non trivial generators, hence we want j non zero.
276 if (D.compare_unsigned(cur_ego, ego) > 0) {
277 cout << "sims::transitive_extension_using_coset_"
278 "representatives fatal: group order "
279 "overshoots target" << endl;
280 cout << "current group order = " << cur_ego << endl;
281 cout << "target group order = " << ego << endl;
282 cout << "we are not tolerant, so we exit" << endl;
283 exit(1);
284 }
285
286 while (TRUE) {
287 j = Os.random_integer(orbit_len);
288 if (j) {
289 break;
290 }
291 }
292
293 random_element(Elt2, verbose_level - 1);
294
295 A->element_mult(coset_reps + j * A->elt_size_in_int,
296 Elt2, Elt3, 0);
297
298 if (f_vv) {
299 cout << "sims::transitive_extension_using_coset_"
300 "representatives choosing random coset "
301 << j << ", random element ";
302 Int_vec_print(cout, path, A->base_len());
303 cout << endl;
304 //A->element_print(Elt3, cout);
305 //cout << endl;
306 }
307
308 if (!strip_and_add(Elt3, Elt1 /* residue */,
309 0/*verbose_level - 1*/)) {
310 continue;
311 }
312
313
314 group_order(cur_ego);
315 if (f_v) {
316 cout << "sims::transitive_extension_using_coset_"
317 "representatives found an extension of order "
318 << cur_ego << " of " << ego
319 << " with " << gens.len << " strong generators" << endl;
320 D.integral_division(ego, cur_ego, rgo, rem, 0);
321 cout << "remaining factor: " << rgo
322 << " remainder " << rem << endl;
323 }
324
325
326 }
327 if (f_v) {
328 cout << "sims::transitive_extension_using_coset_"
329 "representatives done" << endl;
330 }
331}
332
334 int *Elt_gens, int nb_gens, int subgroup_index,
336 int *tl,
337 int verbose_level)
338{
339 int f_v = (verbose_level >= 1);
340 int f_vv = (verbose_level >= 2);
341 ring_theory::longinteger_object go, ol, ego, cur_ego, rgo, rem;
342 int j;
345
346 if (f_v) {
347 cout << "sims::transitive_extension_using_generators "
348 "computing transitive extension" << endl;
349 }
350 group_order(go);
351 ol.create(subgroup_index, __FILE__, __LINE__);
352 D.mult(go, ol, ego);
353 if (f_v) {
354 cout << "sims::transitive_extension_using_generators "
355 "group order " << go << ", subgroup_index "
356 << subgroup_index << ", current group order " << ego << endl;
357 }
358 group_order(cur_ego);
359
360 //if (f_vv) {
361 //print(0);
362 //}
363 while (D.compare_unsigned(cur_ego, ego) != 0) {
364
365 // we do not enter the while loop if orbit_len is 1,
366 // hence the following makes sense:
367 // we want non trivial generators, hence we want j non zero.
368 if (D.compare_unsigned(cur_ego, ego) > 0) {
369 cout << "sims::transitive_extension_using_generators "
370 "fatal: group order overshoots target" << endl;
371 cout << "current group order = " << cur_ego << endl;
372 cout << "target group order = " << ego << endl;
373 cout << "we are not tolerant, so we exit" << endl;
374 exit(1);
375 }
376
377 j = Os.random_integer(nb_gens);
378
379 random_element(Elt2, verbose_level - 1);
380
381 A->element_mult(Elt_gens + j * A->elt_size_in_int, Elt2, Elt3, 0);
382
383 if (f_vv) {
384 cout << "sims::transitive_extension_using_generators "
385 "choosing random coset " << j << ", random element ";
386 Int_vec_print(cout, path, A->base_len());
387 cout << endl;
388 //A->element_print(Elt3, cout);
389 //cout << endl;
390 }
391
392 if (!strip_and_add(Elt3, Elt1 /* residue */, verbose_level - 1)) {
393 continue;
394 }
395
396
397 group_order(cur_ego);
398 if (f_v) {
399 cout << "sims::transitive_extension_using_generators "
400 "found an extension of order " << cur_ego
401 << " of " << ego
402 << " with " << gens.len << " strong generators" << endl;
403 D.integral_division(ego, cur_ego, rgo, rem, 0);
404 cout << "remaining factor: " << rgo
405 << " remainder " << rem << endl;
406 }
407
408
409 }
410 if (f_v) {
411 cout << "sims::transitive_extension_using_generators "
412 "extracting strong generators" << endl;
413 }
414 extract_strong_generators_in_order(SG, tl, verbose_level - 2);
415 //return TRUE;
416}
417
418
420 sims &S, int pt, int verbose_level)
421// first computes the orbit of the point pt in action A2
422// under the generators
423// that are stored at present (using a temporary schreier object),
424// then sifts random schreier generators into S
425{
426 schreier O;
427 ring_theory::longinteger_object go, stab_order, cur_stab_order, rgo, rem;
428 int orbit_len, r, cnt = 0, image; // d
430 int *Elt;
431
432 int f_v = (verbose_level >= 1);
433 int f_vv = (verbose_level >= 2);
434 int f_vvv = (verbose_level >= 3);
435
436 if (f_v) {
437 cout << "sims::point_stabilizer_stabchain_with_action "
438 "computing stabilizer of point "
439 << pt << " in action " << A2->label
440 << " verbose_level=" << verbose_level << endl;
441 cout << "internal action: " << A->label << endl;
442 cout << "verbose_level=" << verbose_level << endl;
443 }
444
445 Elt = NEW_int(A->elt_size_in_int);
446 group_order(go);
447 if (f_v) {
448 cout << "sims::point_stabilizer_stabchain_with_action group order = " << go << endl;
449 }
450
451 O.init(A2, verbose_level - 2);
452
453 if (f_v) {
454 cout << "sims::point_stabilizer_stabchain_with_action before O.init_generators" << endl;
455 }
456 O.init_generators(gens, verbose_level - 2);
457 if (f_v) {
458 cout << "sims::point_stabilizer_stabchain_with_action after O.init_generators" << endl;
459 }
460
461 if (f_vvv && A2->degree < 150) {
464 int j;
465 for (j = 0; j < O.gens.len; j++) {
466 cout << "generator " << j << ":" << endl;
467 //A->element_print(gens.ith(j), cout);
468 //A->element_print_quick(gens.ith(j), cout);
470 cout << endl;
471 }
472 }
473
474 if (f_v) {
475 cout << "sims::point_stabilizer_stabchain_with_action "
476 "computing point orbit" << endl;
477 }
478 O.compute_point_orbit(pt, 0/*verbose_level - 1*/);
479 if (f_v) {
480 cout << "sims::point_stabilizer_stabchain_with_action "
481 "computing point orbit done" << endl;
482 }
483
484
485 orbit_len = O.orbit_len[0];
486 if (f_v) {
487 cout << "sims::point_stabilizer_stabchain_with_action "
488 "found orbit of length " << orbit_len << endl;
489 }
490
491 if (f_vvv && A2->degree < 150) {
492 O.print(cout);
493 }
494 D.integral_division_by_int(go, orbit_len, stab_order, r);
495 if (r != 0) {
496 cout << "sims::point_stabilizer_stabchain_with_action "
497 "orbit_len does not divide group order" << endl;
498 exit(1);
499 }
500 if (f_v) {
501 cout << "sims::point_stabilizer_stabchain_with_action "
502 "group_order = " << go << " orbit_len = "
503 << orbit_len << " target stab_order = "
504 << stab_order << endl;
505 }
506 if (stab_order.is_one()) {
507 if (f_v) {
508 cout << "sims::point_stabilizer_stabchain_with_action "
509 "stabilizer is trivial, finished" << endl;
510 }
511 S.init(A, verbose_level - 2);
512 S.init_trivial_group(verbose_level - 1);
513#if 0
514 for (i = 0; i < A->base_len; i++) {
515 tl[i] = 1;
516 }
517#endif
518 return;
519 }
520
521
523
524 //stab_gens.append(O.schreier_gen);
525
526 //sims S;
527 //int drop_out_level, image;
528 //int *p_schreier_gen;
529
530 if (f_v) {
531 cout << "sims::point_stabilizer_stabchain_with_action "
532 "before S.init" << endl;
533 }
534 S.init(A, verbose_level - 2);
535 if (f_v) {
536 cout << "sims::point_stabilizer_stabchain_with_action "
537 "before S.init_generators" << endl;
538 }
539 S.init_generators(stab_gens, verbose_level - 2);
540 if (f_v) {
541 cout << "sims::point_stabilizer_stabchain_with_action "
542 "after S.init_generators" << endl;
543 }
544 S.compute_base_orbits(verbose_level - 1);
545 if (FALSE) {
546 cout << "sims::point_stabilizer_stabchain_with_action "
547 "generators:" << endl;
548 S.gens.print(cout);
549 }
550
551 S.group_order(cur_stab_order);
552 if (f_vv) {
553 cout << "sims::point_stabilizer_stabchain_with_action "
554 "before the loop, stabilizer has order "
555 << cur_stab_order << " of " << stab_order << endl;
556 cout << "sims::point_stabilizer_stabchain_with_action "
557 "creating the stabilizer using random generators" << endl;
558 }
559
560 while (D.compare_unsigned(cur_stab_order, stab_order) != 0) {
561
562
563 if (f_vv) {
564 cout << "sims::point_stabilizer_stabchain_with_action "
565 "loop iteration " << cnt
566 << " cur_stab_order=" << cur_stab_order
567 << " stab_order=" << stab_order << endl;
568 }
569
570 if (cnt % 2 || nb_gen[0] == 0) {
571 if (f_vv) {
572 cout << "sims::point_stabilizer_stabchain_with_action "
573 "creating random generator no " << cnt + 1
574 << " using the Schreier vector" << endl;
575 }
576 //O.non_trivial_random_schreier_generator(A2, Elt, verbose_level - 1);
577 // A Betten 9/1/2019
578 // this may get stuck in a forever loop, therefore we do this:
579 O.random_schreier_generator(Elt, verbose_level - 1);
580 //p_schreier_gen = O.schreier_gen;
581 }
582 else {
583 if (f_vv) {
584 cout << "sims::point_stabilizer_stabchain_with_action "
585 "creating random generator no " << cnt + 1
586 << " using the Sims chain" << endl;
587 }
588 S.random_schreier_generator(Elt, verbose_level - 1);
589 //p_schreier_gen = Elt; //S.schreier_gen;
590 }
591 cnt++;
592 if (f_vv) {
593 cout << "sims::point_stabilizer_stabchain_with_action "
594 "random generator no " << cnt << endl;
595 A->element_print_quick(Elt, cout);
596 cout << endl;
597 cout << "sims::point_stabilizer_stabchain_with_action "
598 "random generator no " << cnt
599 << " as permutation in natural action:" << endl;
601 cout << endl;
602 cout << "sims::point_stabilizer_stabchain_with_action "
603 "random generator no " << cnt
604 << " as permutation in chosen action:" << endl;
605 A2->element_print_as_permutation(Elt, cout);
606 cout << endl;
607 }
608 image = A2->element_image_of(pt, Elt,
609 0 /* verbose_level */);
610 if (image != pt) {
611 cout << "sims::point_stabilizer_stabchain_with_action "
612 "image is not equal to pt" << endl;
613 cout << "pt=" << pt << endl;
614 cout << "image=" << image << endl;
615 exit(1);
616 }
617 if (f_vvv) {
618 A->element_print_quick(Elt, cout);
619 if (A2->degree < 150) {
620 A2->element_print_as_permutation(Elt, cout);
621 cout << endl;
622 }
623 }
624
625 if (f_vv) {
626 cout << "sims::point_stabilizer_stabchain_with_action "
627 "random generator no " << cnt
628 << " before strip_and_add" << endl;
629 }
630 if (!S.strip_and_add(Elt,
631 Elt1 /* residue */, verbose_level - 3)) {
632 if (f_vvv) {
633 cout << "sims::point_stabilizer_stabchain_with_action "
634 "strip_and_add returns FALSE" << endl;
635 }
636 //continue;
637 }
638 if (f_vv) {
639 cout << "sims::point_stabilizer_stabchain_with_action "
640 "random generator no " << cnt
641 << " before strip_and_add" << endl;
642 }
643
644 S.group_order(cur_stab_order);
645 if (f_vv) {
646 cout << "sims::point_stabilizer_stabchain_with_action "
647 "group order " << go << endl;
648 cout << "orbit length " << orbit_len << endl;
649 cout << "current stab_order = " << cur_stab_order
650 << " / " << stab_order
651 << " with " << S.gens.len
652 << " strong generators" << endl;
653 }
654
655 int cmp;
656
657 cmp = D.compare_unsigned(cur_stab_order, stab_order);
658 if (f_vv) {
659 cout << "sims::point_stabilizer_stabchain_with_action "
660 "compare yields " << cmp << endl;
661 }
662 if (cmp > 0) {
663 cout << "sims::point_stabilizer_stabchain_with_action "
664 "overshooting the target group order" << endl;
665 cout << "current stab_order = " << cur_stab_order
666 << " / " << stab_order << endl;
667 exit(1);
668 }
669 D.integral_division(stab_order, cur_stab_order, rgo, rem, 0);
670 if (f_vv) {
671 cout << "sims::point_stabilizer_stabchain_with_action "
672 "remaining factor: " << rgo
673 << " remainder " << rem << endl;
674 }
675
676 if (D.compare_unsigned(cur_stab_order, stab_order) == 1) {
677 cout << "sims::point_stabilizer_stabchain_with_action "
678 "group order " << go << endl;
679 cout << "orbit length " << orbit_len << endl;
680 cout << "current stab_order = " << cur_stab_order
681 << " / " << stab_order
682 << " with " << S.gens.len
683 << " strong generators" << endl;
684 D.integral_division(stab_order,
685 cur_stab_order, rgo, rem, 0);
686 cout << "remaining factor: " << rgo
687 << " remainder " << rem << endl;
688 cout << "the current stabilizer is:" << endl;
690 cout << "sims::point_stabilizer_stabchain_with_action "
691 "computing stabilizer of point " << pt
692 << " in action " << A2->label
693 << " verbose_level=" << verbose_level << endl;
694 cout << "internal action: " << A->label << endl;
695 cout << "The orbit of point " << pt << " is:" << endl;
696 O.print_and_list_orbits(cout);
697 //O.print_tables(cout, TRUE /* f_with_cosetrep */);
698 cout << "sims::point_stabilizer_stabchain_with_action "
699 "cur_stab_order > stab_order, error" << endl;
700 exit(1);
701 }
702
703 }
704 FREE_int(Elt);
705 if (f_v) {
706 cout << "sims::point_stabilizer_stabchain_with_action "
707 "found a stabilizer of order " << cur_stab_order
708 << " of " << stab_order
709 << " with " << S.gens.len
710 << " strong generators" << endl;
711 }
712}
713
715 int *tl, int pt, int verbose_level)
716// computes strong generating set for the stabilizer of point pt
717{
718 int f_v = (verbose_level >= 1);
719 sims S;
720
721 if (f_v) {
722 cout << "sims::point_stabilizer" << endl;
723 }
725 S, pt, verbose_level);
727 verbose_level - 2);
728 if (f_v) {
729 cout << "sims::point_stabilizer done" << endl;
730 }
731}
732
735 int *tl, int pt, int verbose_level)
736// computes strong generating set for
737// the stabilizer of point pt in action A2
738{
739 int f_v = (verbose_level >= 1);
740 //int f_vv = (verbose_level >= 2);
741 //int f_vvv = (verbose_level >= 3);
742
743 sims S;
744
745 if (f_v) {
746 cout << "sims::point_stabilizer_with_action "
747 "pt=" << pt << endl;
748 cout << "sims::point_stabilizer_with_action "
749 "action = " << A2->label << endl;
750 cout << "sims::point_stabilizer_with_action "
751 "internal action = " << A->label << endl;
752 }
753 if (f_v) {
754 cout << "sims::point_stabilizer_with_action "
755 "before point_stabilizer_stabchain_with_action" << endl;
756 }
757 point_stabilizer_stabchain_with_action(A2, S, pt, verbose_level);
758 if (f_v) {
759 cout << "sims::point_stabilizer_with_action "
760 "after point_stabilizer_stabchain_with_action" << endl;
761 }
762 if (f_v) {
763 cout << "sims::point_stabilizer_with_action "
764 "before extract_strong_generators_in_order" << endl;
765 }
766 S.extract_strong_generators_in_order(SG, tl, verbose_level - 2);
767 if (f_v) {
768 cout << "sims::point_stabilizer_with_action done" << endl;
769 }
770}
771
773 sims *old_G, int *Elt,
774 int f_overshooting_OK,
775 int verbose_level)
776// Elt * g * Elt^{-1} where g is in old_G
777{
778 int f_v = (verbose_level >= 1);
779 int f_vv = (verbose_level >= 4);
780 //int f_vvv = (verbose_level >= 3);
782 ring_theory::longinteger_object go, target_go, quo, rem;
783 int *Elt1, *Elt2, *Elt3, *Elt4, *Elt5;
784 int cnt, drop_out_level, image, f_added, c;
785
786 if (f_v) {
787 cout << "sims::conjugate "
788 "f_overshooting_OK=" << f_overshooting_OK << endl;
789 }
790 if (f_v) {
791 cout << "action = " << A->label << endl;
792 }
793 if (FALSE) {
794 cout << "transporter = " << endl;
795 A->print(cout, Elt);
796 }
797
798 Elt1 = NEW_int(A->elt_size_in_int);
799 Elt2 = NEW_int(A->elt_size_in_int);
800 Elt3 = NEW_int(A->elt_size_in_int);
801 Elt4 = NEW_int(A->elt_size_in_int);
802 Elt5 = NEW_int(A->elt_size_in_int);
803 init(A, verbose_level - 2);
804 init_trivial_group(verbose_level - 1);
805 group_order(go);
806 old_G->group_order(target_go);
807 A->invert(Elt, Elt2);
808 cnt = 0;
809 while (TRUE) {
810
811 if (f_vv) {
812 cout << "sims::conjugate iteration " << cnt << endl;
813 }
814 if (cnt > 500) {
815 cout << "sims::conjugate cnt > 1000, "
816 "something seems to be wrong" << endl;
817 exit(1);
818 }
819 if ((cnt % 2) == 0) {
820 if (f_vv) {
821 cout << "sims::conjugate choosing random schreier generator" << endl;
822 }
823 random_schreier_generator(Elt1, verbose_level - 3);
824 A->element_move(Elt1, A->Elt1, FALSE);
825 if (FALSE) {
826 cout << "sims::conjugate random element chosen:" << endl;
827 A->element_print(A->Elt1, cout);
828 cout << endl;
829 }
830 A->move(A->Elt1, Elt4);
831 }
832 else if ((cnt % 2) == 1){
833 if (f_vv) {
834 cout << "sims::conjugate choosing random element in the group "
835 "by which we extend" << endl;
836 }
837 old_G->random_element(A->Elt1, verbose_level - 1);
838 if (FALSE) {
839 cout << "sims::conjugate random element chosen, path = ";
840 Int_vec_print(cout, old_G->path, old_G->A->base_len());
841 cout << endl;
842 }
843 if (FALSE) {
844 A->element_print(A->Elt1, cout);
845 cout << endl;
846 }
847 A->mult(Elt, A->Elt1, Elt3);
848 A->mult(Elt3, Elt2, Elt4);
849 if (f_vv) {
850 cout << "sims::conjugate conjugated" << endl;
851 }
852 if (FALSE) {
853 A->element_print(Elt4, cout);
854 cout << endl;
855 }
856 }
857 if (strip(Elt4, A->Elt2, drop_out_level, image,
858 verbose_level - 3)) {
859 if (f_vv) {
860 cout << "sims::conjugate element strips through, "
861 "residue = " << endl;
862 if (FALSE) {
863 A->element_print_quick(A->Elt2, cout);
864 cout << endl;
865 }
866 }
867 f_added = FALSE;
868 }
869 else {
870 f_added = TRUE;
871 if (f_vv) {
872 cout << "sims::conjugate element needs to be inserted at level = "
873 << drop_out_level << " with image "
874 << image << endl;
875 if (FALSE) {
876 A->element_print(A->Elt2, cout);
877 cout << endl;
878 }
879 }
880 add_generator_at_level(A->Elt2, drop_out_level,
881 verbose_level - 3);
882 }
883
884 group_order(go);
885 if ((f_v && f_added) || f_vv) {
886 cout << "sims::conjugate current group order is " << go << endl;
887 }
888 if (f_vv) {
890 }
891 c = D.compare(target_go, go);
892 cnt++;
893 if (c == 0) {
894 if (f_v) {
895 cout << "sims::conjugate reached the full group after "
896 << cnt << " iterations" << endl;
897 }
898 break;
899 }
900 if (c < 0) {
901 if (TRUE) {
902 cout << "sims::conjugate overshooting the expected "
903 "group after " << cnt << " iterations" << endl;
904 cout << "current group order is " << go
905 << " target_go=" << target_go << endl;
906 }
907 if (f_overshooting_OK) {
908 break;
909 }
910 else {
911 exit(1);
912 }
913 }
914 }
915 FREE_int(Elt1);
916 FREE_int(Elt2);
917 FREE_int(Elt3);
918 FREE_int(Elt4);
919 FREE_int(Elt5);
920 if (f_v) {
921 cout << "sims::conjugate done" << endl;
922 }
923}
924
926 long int *set, int size, int verbose_level)
927{
928 int f_v = (verbose_level >= 1);
929 int f_vv = (verbose_level >= 2);
931 long int goi, i, ret;
932 int *Elt1;
933
934 if (f_v) {
935 cout << "sims::test_if_in_set_stabilizer "
936 "action = " << A->label << endl;
937 }
938 Elt1 = NEW_int(A->elt_size_in_int);
939 group_order(go);
940 goi = go.as_lint();
941 if (f_v) {
942 cout << "testing group of order " << goi << endl;
943 }
944 ret = TRUE;
945 for (i = 0; i < goi; i++) {
946 a.create(i, __FILE__, __LINE__);
947 element_unrank(a, Elt1);
949 size, set, verbose_level)) {
950 if (f_vv) {
951 cout << "element " << i
952 << " strips through, residue = " << endl;
953 }
954 }
955 else {
956 cout << "element " << i
957 << " does not stabilize the set" << endl;
958 A->element_print(Elt1, cout);
959 cout << endl;
960 ret = FALSE;
961 break;
962 }
963 }
964 FREE_int(Elt1);
965 return ret;
966}
967
968int sims::test_if_subgroup(sims *old_G, int verbose_level)
969{
970 int f_v = (verbose_level >= 1);
971 int f_vv = (verbose_level >= 2);
973 int goi, i, ret, drop_out_level, image;
974 int *Elt1, *Elt2;
975
976 if (f_v) {
977 cout << "sims::test_if_subgroup" << endl;
978 }
979 Elt1 = NEW_int(A->elt_size_in_int);
980 Elt2 = NEW_int(A->elt_size_in_int);
981 old_G->group_order(go);
982 goi = go.as_int();
983 if (f_v) {
984 cout << "testing group of order " << goi << endl;
985 }
986 ret = TRUE;
987 for (i = 0; i < goi; i++) {
988 a.create(i, __FILE__, __LINE__);
989 old_G->element_unrank(a, Elt1);
990 if (strip(Elt1, Elt2, drop_out_level, image,
991 verbose_level - 3)) {
992 a.create(i, __FILE__, __LINE__);
993 old_G->element_unrank(a, Elt1);
994 element_rank(b, Elt1);
995 if (f_vv) {
996 cout << "element " << i
997 << " strips through, rank " << b << endl;
998 }
999 }
1000 else {
1001 cout << "element " << i << " is not contained" << endl;
1002 old_G->element_unrank(a, Elt1);
1003 A->element_print(Elt1, cout);
1004 cout << endl;
1005 ret = FALSE;
1006 break;
1007 }
1008 }
1009 FREE_int(Elt1);
1010 FREE_int(Elt2);
1011 return ret;
1012}
1013
1015 int *Elt, int nb_fixpoints, actions::action *A_given, int verbose_level)
1016{
1017 int f_v = (verbose_level >= 1);
1019 long int i, order = 0;
1020 long int goi;
1021 int *cycle_type;
1022
1023 if (f_v) {
1024 cout << "sims::find_element_with_exactly_n_fixpoints_in_given_action" << endl;
1025 }
1026 cycle_type = NEW_int(A_given->degree);
1027 group_order(go);
1028 goi = go.as_lint();
1029 for (i = 0; i < goi; i++) {
1030 element_unrank_lint(i, Elt);
1031 order = A_given->element_order_and_cycle_type(Elt, cycle_type);
1032 if (cycle_type[0] == nb_fixpoints) {
1033 if (f_v) {
1034 cout << "sims::find_element_with_exactly_n_fixpoints_in_given_action "
1035 "found an element of order " << order
1036 << " and with exactly " << nb_fixpoints << " fixpoints" << endl;
1037 cout << "Elt=" << endl;
1038 A->element_print(Elt, cout);
1039 }
1040 break;
1041 }
1042 }
1043 if (i == goi) {
1044 cout << "sims::find_element_with_exactly_n_fixpoints_in_given_action "
1045 "could not find a suitable element" << endl;
1046 exit(1);
1047 }
1048 FREE_int(cycle_type);
1049 if (f_v) {
1050 cout << "sims::find_element_with_exactly_n_fixpoints_in_given_action done" << endl;
1051 }
1052 return order;
1053}
1054
1056 int *&Table, int &len, int &sz, int verbose_level)
1057{
1058 int f_v = (verbose_level >= 1);
1059 int *Elt;
1061 long int i;
1062
1063 if (f_v) {
1064 cout << "sims::table_of_group_elements_in_data_form" << endl;
1065 }
1066 Elt = NEW_int(A->elt_size_in_int);
1067 group_order(go);
1068 len = go.as_lint();
1069 sz = A->make_element_size;
1070 Table = NEW_int(len * sz);
1071 for (i = 0; i < len; i++) {
1072 element_unrank_lint(i, Elt);
1073 Int_vec_copy(Elt, Table + i * sz, sz);
1074 }
1075 FREE_int(Elt);
1076 if (f_v) {
1077 cout << "sims::table_of_group_elements_in_data_form done" << endl;
1078 }
1079}
1080
1082 int *perm, int verbose_level)
1083{
1084 int f_v = (verbose_level >= 1);
1086 long int goi, i, j;
1087 int *Elt1;
1088 int *Elt2;
1090
1091 Elt1 = NEW_int(A->elt_size_in_int);
1092 Elt2 = NEW_int(A->elt_size_in_int);
1093 group_order(go);
1094 goi = go.as_lint();
1095 for (i = 0; i < goi; i++) {
1096 element_unrank_lint(i, Elt1);
1097 A->mult(Elt1, Elt, Elt2);
1098 j = element_rank_lint(Elt2);
1099 perm[i] = j;
1100 }
1101 if (f_v) {
1102 cout << "sims::regular_representation of" << endl;
1103 A->print(cout, Elt);
1104 cout << endl;
1105 cout << "is:" << endl;
1106 Combi.perm_print(cout, perm, goi);
1107 cout << endl;
1108 }
1109 FREE_int(Elt1);
1110 FREE_int(Elt2);
1111}
1112
1114 int *element_ranks, int verbose_level)
1115{
1116 int f_v = (verbose_level >= 1);
1118 long int goi;
1119 long int i, j;
1120 int *Elt1;
1121
1122 subgroup->group_order(go);
1123 goi = go.as_lint();
1124 if (f_v) {
1125 cout << "sims::element_ranks_subgroup subgroup of order "
1126 << goi << endl;
1127 }
1128 Elt1 = NEW_int(A->elt_size_in_int);
1129 for (i = 0; i < goi; i++) {
1130 subgroup->element_unrank_lint(i, Elt1);
1131 j = element_rank_lint(Elt1);
1132 element_ranks[i] = j;
1133 }
1134 FREE_int(Elt1);
1135}
1136
1138 int *center_element_ranks, int &nb_elements,
1139 int verbose_level)
1140{
1141 int f_v = (verbose_level >= 1);
1144 long int goi, i, j, k, len;
1145 int *Elt1;
1146 int *Elt2;
1147 int *Elt3;
1148
1149 if (f_v) {
1150 cout << "sims::center" << endl;
1151 }
1152 len = gens.len;
1153 gens_inv.init(A, verbose_level - 2);
1154 gens_inv.allocate(len, verbose_level - 2);
1155 for (i = 0; i < len; i++) {
1156 A->invert(gens.ith(i), gens_inv.ith(i));
1157 }
1158 Elt1 = NEW_int(A->elt_size_in_int);
1159 Elt2 = NEW_int(A->elt_size_in_int);
1160 Elt3 = NEW_int(A->elt_size_in_int);
1161 nb_elements = 0;
1162 group_order(go);
1163 goi = go.as_lint();
1164 if (f_v) {
1165 cout << "sims::center computing the center "
1166 "of a group of order " << goi << endl;
1167 }
1168 for (i = 0; i < goi; i++) {
1169 element_unrank_lint(i, Elt1);
1170 for (j = 0; j < len; j++) {
1171 A->mult(gens_inv.ith(j), Elt1, Elt2);
1172 A->mult(Elt2, gens.ith(j), Elt3);
1173 k = element_rank_lint(Elt3);
1174 if (k != i)
1175 break;
1176 }
1177 if (j == len) {
1178 center_element_ranks[nb_elements++] = i;
1179 }
1180 }
1181 if (f_v) {
1182 cout << "sims::center center is of order "
1183 << nb_elements << ":" << endl;
1184 Int_vec_print(cout, center_element_ranks, nb_elements);
1185 cout << endl;
1186 }
1187 FREE_int(Elt1);
1188 FREE_int(Elt2);
1189 FREE_int(Elt3);
1190 if (f_v) {
1191 cout << "sims::center done" << endl;
1192 }
1193}
1194
1195void sims::all_cosets(int *subset, int size,
1196 long int *all_cosets, int verbose_level)
1197{
1198 int f_v = (verbose_level >= 1);
1200 long int goi, i, j, k, nb_cosets, cnt;
1201 int *Elt1;
1202 int *Elt2;
1203 int *Elt3;
1204 int *f_taken;
1205
1206 Elt1 = NEW_int(A->elt_size_in_int);
1207 Elt2 = NEW_int(A->elt_size_in_int);
1208 Elt3 = NEW_int(A->elt_size_in_int);
1209 group_order(go);
1210 goi = go.as_lint();
1211 if (f_v) {
1212 cout << "sims::all_cosets" << endl;
1213 cout << "action " << A->label << endl;
1214 cout << "subset of order " << size << endl;
1215 cout << "group of order " << goi << endl;
1216 }
1217 nb_cosets = goi / size;
1218 if (size * nb_cosets != goi) {
1219 cout << "sims::all_cosets size * nb_cosets != goi" << endl;
1220 }
1221 f_taken = NEW_int(goi);
1222 for (i = 0; i < goi; i++) {
1223 f_taken[i] = FALSE;
1224 }
1225 cnt = 0;
1226 for (i = 0; i < goi; i++) {
1227 if (f_taken[i])
1228 continue;
1229 element_unrank_lint(i, Elt1);
1230 for (j = 0; j < size; j++) {
1231 element_unrank_lint(subset[j], Elt2);
1232 A->mult(Elt2, Elt1, Elt3); // we need right cosets!!!
1233 k = element_rank_lint(Elt3);
1234 if (f_taken[k]) {
1235 cout << "sims::all_cosets error: f_taken[k]" << endl;
1236 exit(1);
1237 }
1238 all_cosets[cnt * size + j] = k;
1239 f_taken[k] = TRUE;
1240 }
1241 cnt++;
1242 }
1243 if (cnt != nb_cosets) {
1244 cout << "sims::all_cosets cnt != nb_cosets" << endl;
1245 exit(1);
1246 }
1247 if (f_v) {
1248 cout << "sims::all_cosets finished" << endl;
1250 all_cosets, nb_cosets, size, size, 2);
1251 cout << endl;
1252 }
1253 FREE_int(Elt1);
1254 FREE_int(Elt2);
1255 FREE_int(Elt3);
1256 FREE_int(f_taken);
1257}
1258
1259void sims::find_standard_generators_int(int ord_a, int ord_b,
1260 int ord_ab, int &a, int &b, int &nb_trials,
1261 int verbose_level)
1262{
1263 int f_v = (verbose_level >= 1);
1264 int nb_trials1, o;
1265 int *Elt1;
1266 int *Elt2;
1267 int *Elt3;
1268
1269 if (f_v) {
1270 cout << "sims::find_standard_generators_int "
1271 "ord_a=" << ord_a
1272 << " ord_b=" << ord_b
1273 << " ord_ab=" << ord_ab << endl;
1274 }
1275 Elt1 = NEW_int(A->elt_size_in_int);
1276 Elt2 = NEW_int(A->elt_size_in_int);
1277 Elt3 = NEW_int(A->elt_size_in_int);
1278 while (TRUE) {
1280 nb_trials1, verbose_level - 1);
1281 nb_trials += nb_trials1;
1283 nb_trials1, verbose_level - 1);
1284 nb_trials += nb_trials1;
1285 element_unrank_lint(a, Elt1);
1286 element_unrank_lint(b, Elt2);
1287 A->mult(Elt1, Elt2, Elt3);
1288 o = A->element_order(Elt3);
1289 if (o == ord_ab) {
1290 break;
1291 }
1292 }
1293
1294 FREE_int(Elt1);
1295 FREE_int(Elt2);
1296 FREE_int(Elt3);
1297 if (f_v) {
1298 cout << "sims::find_standard_generators_int "
1299 "found a=" << a << " b=" << b
1300 << " nb_trials=" << nb_trials << endl;
1301 }
1302}
1303
1305 int &nb_trials, int verbose_level)
1306{
1307 int f_v = (verbose_level >= 1);
1309 int o, d, goi;
1310 int *Elt1;
1311 long int a;
1312
1313 nb_trials = 0;
1314 group_order(go);
1315 goi = go.as_int();
1316 if (f_v) {
1317 cout << "sims::find_element_of_given_order_int" << endl;
1318 cout << "action " << A->label << endl;
1319 cout << "group of order " << goi << endl;
1320 cout << "looking for an element of order " << ord << endl;
1321 }
1322 Elt1 = NEW_int(A->elt_size_in_int);
1323 while (TRUE) {
1324 nb_trials++;
1325 if (f_v) {
1326 cout << "sims::find_element_of_given_order_int "
1327 "before random_element" << endl;
1328 }
1329 random_element(Elt1, 0 /*verbose_level - 1*/);
1330 if (f_v) {
1331 cout << "sims::find_element_of_given_order_int :"
1332 "after random_element" << endl;
1333 }
1334 o = A->element_order(Elt1);
1335 if (f_v) {
1336 cout << "sims::find_element_of_given_order_int "
1337 "random_element has order " << o << endl;
1338 }
1339 if (o % ord == 0) {
1340 if (f_v) {
1341 cout << "sims::find_element_of_given_order_int "
1342 "the order is divisible by " << ord
1343 << " which is good" << endl;
1344 }
1345 break;
1346 }
1347 }
1348 d = o / ord;
1349 if (f_v) {
1350 cout << "sims::find_element_of_given_order_int "
1351 "raising to the power " << d << endl;
1352 }
1353 A->element_power_int_in_place(Elt1, d, verbose_level - 1);
1354 if (f_v) {
1355 cout << "sims::find_element_of_given_order_int "
1356 "after raising to the power " << d << endl;
1357 }
1358 a = element_rank_lint(Elt1);
1359 FREE_int(Elt1);
1360 return a;
1361}
1362
1364 int ord, int &nb_trials, int max_trials,
1365 int verbose_level)
1366{
1367 int f_v = (verbose_level >= 1);
1368 int f_vv = (verbose_level >= 4);
1370 int o, d, goi;
1371 int *Elt1;
1372
1373 nb_trials = 0;
1374 group_order(go);
1375 goi = go.as_int();
1376 if (f_v) {
1377 cout << "sims::find_element_of_given_order_int" << endl;
1378 cout << "action " << A->label << endl;
1379 cout << "group of order " << goi << endl;
1380 cout << "looking for an element of order " << ord << endl;
1381 cout << "max_trials = " << max_trials << endl;
1382 }
1383 Elt1 = NEW_int(A->elt_size_in_int);
1384 o = 0;
1385 while (nb_trials < max_trials) {
1386 nb_trials++;
1387 if (f_vv) {
1388 cout << "sims::find_element_of_given_order_int "
1389 "before random_element" << endl;
1390 }
1391 random_element(Elt1, 0 /*verbose_level - 1*/);
1392 if (f_vv) {
1393 cout << "sims::find_element_of_given_order_int "
1394 "after random_element" << endl;
1395 }
1396 o = A->element_order(Elt1);
1397 if (f_vv) {
1398 cout << "sims::find_element_of_given_order_int "
1399 "random_element has order " << o << endl;
1400 }
1401 if (o % ord == 0) {
1402 if (f_vv) {
1403 cout << "sims::find_element_of_given_order_int "
1404 "the order is divisible by " << ord
1405 << " which is good" << endl;
1406 }
1407 break;
1408 }
1409 }
1410 if (nb_trials == max_trials) {
1411 FREE_int(Elt1);
1412 if (f_v) {
1413 cout << "sims::find_element_of_given_order_int "
1414 "unsuccessful" << endl;
1415 }
1416 return FALSE;
1417 }
1418 d = o / ord;
1419 if (f_v) {
1420 cout << "sims::find_element_of_given_order_int "
1421 "raising to the power " << d << endl;
1422 }
1423 A->element_power_int_in_place(Elt1, d, verbose_level - 1);
1424 if (f_v) {
1425 cout << "sims::find_element_of_given_order_int "
1426 "after raising to the power " << d << endl;
1427 }
1428 A->element_move(Elt1, Elt, 0);
1429 FREE_int(Elt1);
1430 if (f_v) {
1431 cout << "sims::find_element_of_given_order_int done" << endl;
1432 }
1433 return TRUE;
1434}
1435
1437 int *Elt, int &e, int &nb_trials,
1438 int verbose_level)
1439{
1440 int f_v = (verbose_level >= 1);
1442 int o;
1443
1444 nb_trials = 0;
1445 group_order(go);
1446 if (f_v) {
1447 cout << "sims::find_element_of_prime_power_order" << endl;
1448 cout << "action " << A->label << endl;
1449 cout << "group of order " << go << endl;
1450 cout << "prime " << p << endl;
1451 }
1452 while (TRUE) {
1453 nb_trials++;
1454 random_element(Elt, 0 /*verbose_level - 1*/);
1455 o = A->element_order(Elt);
1456 e = 0;
1457 while (o % p == 0) {
1458 e++;
1459 o = o / p;
1460 }
1461 if (e) {
1462 break;
1463 }
1464 }
1465 A->element_power_int_in_place(Elt, o, verbose_level - 1);
1466 if (f_v) {
1467 cout << "sims::find_element_of_prime_power_order done, "
1468 "e=" << e << " nb_trials=" << nb_trials << endl;
1469 }
1470}
1471
1472void sims::evaluate_word_int(int word_len,
1473 int *word, int *Elt, int verbose_level)
1474{
1475 int *Elt1;
1476 int *Elt2;
1477 long int i, j;
1478
1479
1480 Elt1 = NEW_int(A->elt_size_in_int);
1481 Elt2 = NEW_int(A->elt_size_in_int);
1482 A->one(Elt);
1483 for (i = 0; i < word_len; i++) {
1484 j = word[i];
1485 element_unrank_lint(j, Elt1);
1486 A->mult(Elt1, Elt, Elt2);
1487 A->move(Elt2, Elt);
1488 }
1489
1490 FREE_int(Elt1);
1491 FREE_int(Elt2);
1492}
1493
1494void sims::sylow_subgroup(int p, sims *P, int verbose_level)
1495{
1496 int f_v = (verbose_level >= 1);
1497 int *Elt1, *Elt2;
1499 ring_theory::longinteger_object go, go1, go_P, go_P1;
1500 int i, e, e1, c, nb_trials;
1501
1502 if (f_v) {
1503 cout << "sims::sylow_subgroup" << endl;
1504 }
1505 Elt1 = NEW_int(A->elt_size_in_int);
1506 Elt2 = NEW_int(A->elt_size_in_int);
1507
1508 group_order(go);
1509 if (f_v) {
1510 cout << "sims::sylow_subgroup the group has order "
1511 << go << endl;
1512 }
1513 e = D.multiplicity_of_p(go, go1, p);
1514 if (f_v) {
1515 cout << "sims::sylow_subgroup the prime "
1516 << p << " divides exactly " << e << " times" << endl;
1517 }
1518 go_P.create_power(p, e);
1519 if (f_v) {
1520 cout << "sims::sylow_subgroup trying to find a subgroup "
1521 "of order " << go_P << endl;
1522 }
1523
1524 P->init(A, verbose_level - 2);
1525 P->init_trivial_group(verbose_level - 1);
1526
1527 P->group_order(go_P1);
1528 while (TRUE) {
1529 c = D.compare(go_P1, go_P);
1530 if (c == 0) {
1531 break;
1532 }
1533 if (c > 0) {
1534 cout << "sims::sylow_subgroup "
1535 "overshooting the group order" << endl;
1536 exit(1);
1537 }
1538
1539
1541 nb_trials, 0 /* verbose_level */);
1542 for (i = 0; i < e1; i++) {
1543 if (P->is_normalizing(Elt1,
1544 0 /* verbose_level */)) {
1545 if (P->strip_and_add(Elt1, Elt2 /* residue */,
1546 0 /* verbose_level */)) {
1547 P->group_order(go_P1);
1548 if (f_v) {
1549 cout << "sims::sylow_subgroup "
1550 "increased the order of the "
1551 "subgroup to " << go_P1 << endl;
1552 }
1553 }
1554 break;
1555 }
1557 0 /* verbose_level */);
1558 }
1559 }
1560 if (f_v) {
1561 cout << "sims::sylow_subgroup found a " << p
1562 << "-Sylow subgroup of order " << go_P1 << endl;
1563 }
1564
1565 FREE_int(Elt1);
1566 FREE_int(Elt2);
1567 if (f_v) {
1568 cout << "sims::sylow_subgroup done" << endl;
1569 }
1570}
1571
1572int sims::is_normalizing(int *Elt, int verbose_level)
1573{
1574 int f_v = (verbose_level >= 1);
1575 int ret = FALSE;
1576 int i;
1577 int *Elt1;
1578 int *Elt2;
1579 int *Elt3;
1580 int *Elt4;
1581 int drop_out_level, image;
1582
1583 if (f_v) {
1584 cout << "sims::is_normalizing" << endl;
1585 }
1586 Elt1 = NEW_int(A->elt_size_in_int);
1587 Elt2 = NEW_int(A->elt_size_in_int);
1588 Elt3 = NEW_int(A->elt_size_in_int);
1589 Elt4 = NEW_int(A->elt_size_in_int);
1590
1591 for (i = 0; i < nb_gen[0]; i++) {
1592 A->element_invert(Elt, Elt1, 0);
1593 A->element_move(gens.ith(i), Elt2, 0);
1594 A->element_mult(Elt1, Elt2, Elt3, 0);
1595 A->element_mult(Elt3, Elt, Elt4, 0);
1596 if (!strip(Elt4, Elt3 /* residue */, drop_out_level,
1597 image, 0 /* verbose_level */)) {
1598 if (f_v) {
1599 cout << "sims::is_normalizing the element "
1600 "does not normalize generator "
1601 << i << " / " << nb_gen[0] << endl;
1602 }
1603 break;
1604 }
1605 }
1606 if (i == nb_gen[0]) {
1607 if (f_v) {
1608 cout << "sims::is_normalizing the element "
1609 "normalizes all " << nb_gen[0]
1610 << " generators" << endl;
1611 }
1612 ret = TRUE;
1613 }
1614 else {
1615 ret = FALSE;
1616 }
1617
1618 FREE_int(Elt1);
1619 FREE_int(Elt2);
1620 FREE_int(Elt3);
1621 FREE_int(Elt4);
1622 if (f_v) {
1623 cout << "sims::is_normalizing done" << endl;
1624 }
1625 return ret;
1626}
1627
1630 int *&Adj, long int &n, int verbose_level)
1631{
1632 int f_v = (verbose_level >= 1);
1633 int i, h, j;
1635 int *Elt1;
1636 int *Elt2;
1637
1638 if (f_v) {
1639 cout << "sims::create_Cayley_graph" << endl;
1640 }
1641 group_order(go);
1642 n = go.as_lint();
1643 if (f_v) {
1644 cout << "sims::create_Cayley_graph "
1645 "Computing the adjacency matrix of a graph with "
1646 << n << " vertices" << endl;
1647 }
1648 Elt1 = NEW_int(A->elt_size_in_int);
1649 Elt2 = NEW_int(A->elt_size_in_int);
1650 Adj = NEW_int(n * n);
1651 Int_vec_zero(Adj, n * n);
1652 for (i = 0; i < n; i++) {
1653 element_unrank_lint(i, Elt1);
1654 //cout << "i=" << i << endl;
1655 for (h = 0; h < gens->len; h++) {
1656 A->element_mult(Elt1, gens->ith(h), Elt2, 0);
1657#if 0
1658 cout << "i=" << i << " h=" << h << endl;
1659 cout << "Elt1=" << endl;
1660 A->element_print_quick(Elt1, cout);
1661 cout << "g_h=" << endl;
1662 A->element_print_quick(gens->ith(h), cout);
1663 cout << "Elt2=" << endl;
1664 A->element_print_quick(Elt2, cout);
1665#endif
1666 j = element_rank_lint(Elt2);
1667 Adj[i * n + j] = Adj[j * n + i] = 1;
1668#if 0
1669 if (i == 0) {
1670 cout << "edge " << i << " " << j << endl;
1671 }
1672#endif
1673 }
1674 }
1675
1676#if 0
1677 cout << "The adjacency matrix of a graph with "
1678 << n << " vertices has been computed" << endl;
1679 //int_matrix_print(Adj, goi, goi);
1680#endif
1681
1682 FREE_int(Elt1);
1683 FREE_int(Elt2);
1684
1685
1686 if (f_v) {
1687 cout << "sims::create_Cayley_graph done" << endl;
1688 }
1689}
1690
1691void sims::create_group_table(int *&Table, long int &n,
1692 int verbose_level)
1693{
1694 int f_v = (verbose_level >= 1);
1695 long int i, j, k;
1697 int *Elt1;
1698 int *Elt2;
1699 int *Elt3;
1700
1701 if (f_v) {
1702 cout << "sims::create_group_table" << endl;
1703 }
1704 group_order(go);
1705 n = go.as_int();
1706 if (f_v) {
1707 cout << "sims::create_group_table "
1708 "Computing the table of a group of order "
1709 << n << endl;
1710 }
1711 Elt1 = NEW_int(A->elt_size_in_int);
1712 Elt2 = NEW_int(A->elt_size_in_int);
1713 Elt3 = NEW_int(A->elt_size_in_int);
1714 Table = NEW_int(n * n);
1715 Int_vec_zero(Table, n * n);
1716 for (i = 0; i < n; i++) {
1717 element_unrank_lint(i, Elt1);
1718 //cout << "i=" << i << endl;
1719 for (j = 0; j < n; j++) {
1720 element_unrank_lint(j, Elt2);
1721 A->element_mult(Elt1, Elt2, Elt3, 0);
1722#if 0
1723 cout << "i=" << i << " j=" << j << endl;
1724 cout << "Elt_i=" << endl;
1725 A->element_print_quick(Elt1, cout);
1726 cout << "Elt_j=" << endl;
1727 A->element_print_quick(Elt2, cout);
1728 cout << "Elt3=" << endl;
1729 A->element_print_quick(Elt3, cout);
1730#endif
1731 k = element_rank_lint(Elt3);
1732 Table[i * n + j] = k;
1733 }
1734 }
1735
1736 FREE_int(Elt1);
1737 FREE_int(Elt2);
1738 FREE_int(Elt3);
1739
1740 if (f_v) {
1741 cout << "sims::create_group_table done" << endl;
1742 }
1743}
1744
1747 strong_generators *&SG, int &nb_classes,
1748 int *&class_size, int *&class_rep,
1749 int verbose_level)
1750{
1751 int f_v = (verbose_level >= 1);
1752 int i, f;
1753
1754 if (f_v) {
1755 cout << "sims::compute_conjugacy_classes" << endl;
1756 }
1757 Aconj = NEW_OBJECT(actions::action);
1758
1759 if (f_v) {
1760 cout << "sims::compute_conjugacy_classes "
1761 "before Aconj->induced_action_by_conjugation" << endl;
1762 }
1763
1765 this,
1766 FALSE /* f_ownership */,
1767 FALSE /* f_basis */,
1768 verbose_level - 1);
1769
1770 if (f_v) {
1771 cout << "sims::compute_conjugacy_classes after Aconj->induced_action_by_conjugation" << endl;
1772 }
1773
1774 ABC = Aconj->G.ABC;
1775
1776
1777 Sch = NEW_OBJECT(schreier);
1778
1779 Sch->init(Aconj, verbose_level - 2);
1780
1781
1783
1784 SG->init_from_sims(this, 0);
1785
1786
1787 Sch->init_generators(*SG->gens, verbose_level - 2);
1788
1789 if (f_v) {
1790 cout << "sims::compute_conjugacy_classes "
1791 "Computing conjugacy classes:" << endl;
1792 }
1793 Sch->compute_all_point_orbits(verbose_level);
1794
1795
1796 nb_classes = Sch->nb_orbits;
1797
1798 class_size = NEW_int(nb_classes);
1799 class_rep = NEW_int(nb_classes);
1800
1801 for (i = 0; i < nb_classes; i++) {
1802 class_size[i] = Sch->orbit_len[i];
1803 f = Sch->orbit_first[i];
1804 class_rep[i] = Sch->orbit[f];
1805 }
1806
1807 if (f_v) {
1808 cout << "class size : ";
1809 Int_vec_print(cout, class_size, nb_classes);
1810 cout << endl;
1811 cout << "class rep : ";
1812 Int_vec_print(cout, class_rep, nb_classes);
1813 cout << endl;
1814 }
1815
1816
1817 if (f_v) {
1818 cout << "sims::compute_conjugacy_classes done" << endl;
1819 }
1820
1821}
1822
1823void sims::compute_all_powers(int elt_idx, int n, int *power_elt,
1824 int verbose_level)
1825{
1826 int f_v = (verbose_level >= 1);
1827 int i, a;
1828 int *Elt1;
1829 int *Elt2;
1830 int *Elt3;
1831
1832 if (f_v) {
1833 cout << "sims::compute_all_powers" << endl;
1834 }
1835 Elt1 = NEW_int(A->elt_size_in_int);
1836 Elt2 = NEW_int(A->elt_size_in_int);
1837 Elt3 = NEW_int(A->elt_size_in_int);
1838 element_unrank_lint(elt_idx, Elt1);
1839 A->element_move(Elt1, Elt2, 0);
1840 power_elt[0] = elt_idx;
1841 for (i = 2; i <= n; i++) {
1842 A->element_mult(Elt1, Elt2, Elt3, 0);
1843 a = element_rank_lint(Elt3);
1844 power_elt[i - 1] = a;
1845 A->element_move(Elt3, Elt1, 0);
1846 }
1847
1848 FREE_int(Elt1);
1849 FREE_int(Elt2);
1850 FREE_int(Elt3);
1851
1852 if (f_v) {
1853 cout << "sims::create_group_table done" << endl;
1854 }
1855}
1856
1857long int sims::mult_by_rank(long int rk_a, long int rk_b, int verbose_level)
1858{
1859 int f_v = (verbose_level >= 1);
1860 long int rk_c;
1861
1862 if (f_v) {
1863 cout << "sims::mult_by_rank" << endl;
1864 }
1865 element_unrank_lint(rk_a, Elt1);
1866 element_unrank_lint(rk_b, Elt2);
1867 A->element_mult(Elt1, Elt2, Elt3, 0);
1868 rk_c = element_rank_lint(Elt3);
1869 return rk_c;
1870}
1871
1872long int sims::mult_by_rank(long int rk_a, long int rk_b)
1873{
1874 int rk_c;
1875
1876 rk_c = mult_by_rank(rk_a, rk_b, 0);
1877 return rk_c;
1878}
1879
1880long int sims::invert_by_rank(long int rk_a, int verbose_level)
1881{
1882 int f_v = (verbose_level >= 1);
1883 long int rk_b;
1884
1885 if (f_v) {
1886 cout << "sims::invert_by_rank" << endl;
1887 }
1888 element_unrank_lint(rk_a, Elt1);
1889 A->element_invert(Elt1, Elt2, 0);
1890 rk_b = element_rank_lint(Elt2);
1891 return rk_b;
1892}
1893
1894long int sims::conjugate_by_rank(long int rk_a, long int rk_b,
1895 int verbose_level)
1896// comutes b^{-1} * a * b
1897{
1898 int f_v = (verbose_level >= 1);
1899 long int rk_c;
1900
1901 if (f_v) {
1902 cout << "sims::conjugate_by_rank" << endl;
1903 }
1904 element_unrank_lint(rk_a, Elt1); // Elt1 = a
1905 element_unrank_lint(rk_b, Elt2); // Elt2 = b
1906 A->element_invert(Elt2, Elt3, 0); // Elt3 = b^{-1}
1907 A->element_mult(Elt3, Elt1, Elt4, 0);
1908 A->element_mult(Elt4, Elt2, Elt3, 0);
1909 rk_c = element_rank_lint(Elt3);
1910 return rk_c;
1911}
1912
1914 int *Elt_b, int *Elt_bv, int verbose_level)
1915// comutes b^{-1} * a * b
1916{
1917 int f_v = (verbose_level >= 1);
1918 long int rk_c;
1919
1920 if (f_v) {
1921 cout << "sims::conjugate_by_rank_b_bv_given" << endl;
1922 }
1923 element_unrank_lint(rk_a, Elt1); // Elt1 = a
1924 A->element_mult(Elt_bv, Elt1, Elt4, 0);
1925 A->element_mult(Elt4, Elt_b, Elt3, 0);
1926 rk_c = element_rank_lint(Elt3);
1927 return rk_c;
1928}
1929
1930#if 0
1931int sims::identify_group(char *path_t144,
1932 char *discreta_home, int verbose_level)
1933{
1934 int f_v = (verbose_level >= 1);
1935 int group_idx;
1936 int h, i, j, *Elt;
1937 longinteger_object go;
1938 const char *fname = "group_generators.txt";
1939
1940 if (f_v) {
1941 cout << "sims::identify_group" << endl;
1942 }
1943 group_order(go);
1944 {
1945 ofstream f(fname);
1946
1947 // generators start from one
1948
1949 f << gens.len << " " << A->degree << endl;
1950 for (h = 0; h < gens.len; h++) {
1951 Elt = gens.ith(h);
1952 for (i = 0; i < A->degree; i++) {
1953 j = A->element_image_of(i, Elt, 0);
1954 f << j + 1 << " ";
1955 }
1956 f << endl;
1957 }
1958 }
1959 if (f_v) {
1960 cout << "sims::identify_group written file "
1961 << fname << " of size " << file_size(fname) << endl;
1962 }
1963 char cmd[2000];
1964
1965 sprintf(cmd, "%s/t144.out -discreta_home %s "
1966 "group_generators.txt >log.tmp",
1967 path_t144, discreta_home);
1968
1969 if (f_v) {
1970 cout << "sims::identify_group calling '"
1971 << cmd << "'" << endl;
1972 }
1973
1974 system(cmd);
1975
1976 {
1977 ifstream f("result.txt");
1978 f >> group_idx;
1979 }
1980 if (f_v) {
1981 cout << "sims::identify_group: the group is "
1982 "isomorphic to group " << go << "#"
1983 << group_idx << endl;
1984 }
1985 return group_idx;
1986}
1987#endif
1988
1989
1991 int *Zuppos, int &nb_zuppos, int verbose_level)
1992{
1993 int f_v = (verbose_level >= 1);
1994 int goi;
1996 int rk, o, i, j;
1997 int *Elt1;
1998 int *Elt2;
1999 int *f_done;
2001
2002 if (f_v) {
2003 cout << "sims::zuppo_list" << endl;
2004 }
2005 group_order(go);
2006 cout << "go=" << go << endl;
2007 goi = go.as_int();
2008 Elt1 = NEW_int(A->elt_size_in_int);
2009 Elt2 = NEW_int(A->elt_size_in_int);
2010 f_done = NEW_int(goi);
2011 Int_vec_zero(f_done, goi);
2012 if (f_v) {
2013 cout << "sims::zuppo_list group of order " << goi << endl;
2014 }
2015 nb_zuppos = 0;
2016 for (rk = 0; rk < goi; rk++) {
2017 //cout << "element " << rk << " / " << goi << endl;
2018 if (f_done[rk]) {
2019 continue;
2020 }
2021 element_unrank_lint(rk, Elt1, 0 /*verbose_level*/);
2022 //cout << "element created" << endl;
2023 o = A->element_order(Elt1);
2024 //cout << "element order = " << o << endl;
2025 if (o == 1) {
2026 continue;
2027 }
2028 if (!NT.is_prime_power(o)) {
2029 continue;
2030 }
2031 if (f_v) {
2032 cout << "sims::zuppo_list element " << rk << " / " << goi << " has order "
2033 << o << " which is a prime power; "
2034 "nb_zuppos = " << nb_zuppos << endl;
2035 }
2036 Zuppos[nb_zuppos++] = rk;
2037 f_done[rk] = TRUE;
2038 for (i = 1; i < o; i++) {
2039 if (NT.gcd_lint(i, o) == 1) {
2040 A->element_move(Elt1, Elt2, 0);
2042 i, 0 /* verbose_level*/);
2043 j = element_rank_lint(Elt2);
2044 f_done[j] = TRUE;
2045 }
2046 }
2047 }
2048 if (f_v) {
2049 cout << "sims::zuppo_list We found " << nb_zuppos << " zuppo elements" << endl;
2050 }
2051 FREE_int(Elt1);
2052 FREE_int(Elt2);
2053 FREE_int(f_done);
2054 if (f_v) {
2055 cout << "sims::zuppo_list done" << endl;
2056 }
2057}
2058
2060 int *subgroup, int subgroup_sz, int *gens, int &nb_gens,
2061 int *cosets,
2062 int new_gen,
2063 int *group, int &group_sz,
2064 int verbose_level)
2065{
2066 int f_v = (verbose_level >= 1);
2067 int f_vv = (verbose_level >= 2);
2068 int i, j, k, c, idx, new_coset_rep, nb_cosets;
2070
2071 if (f_v) {
2072 cout << "sims::dimino new_gen = " << new_gen << endl;
2073 }
2074 Int_vec_copy(subgroup, group, subgroup_sz);
2075 Sorting.int_vec_heapsort(group, subgroup_sz);
2076 group_sz = subgroup_sz;
2077
2078 cosets[0] = 0;
2079 nb_cosets = 1;
2080 gens[nb_gens++] = new_gen;
2081 for (i = 0; i < nb_cosets; i++) {
2082 for (j = 0; j < nb_gens; j++) {
2083 if (f_vv) {
2084 cout << "sims::dimino coset rep " << i << " = " << cosets[i] << endl;
2085 cout << "sims::dimino generator " << j << " = " << gens[j] << endl;
2086 }
2087
2088 c = mult_by_rank(cosets[i], gens[j]);
2089 if (f_vv) {
2090 cout << "sims::dimino coset rep " << i << " times generator "
2091 << j << " is " << c << endl;
2092 }
2093 if (Sorting.int_vec_search(group, group_sz, c, idx)) {
2094 if (f_vv) {
2095 cout << "sims::dimino already there" << endl;
2096 }
2097 continue;
2098 }
2099 if (f_vv) {
2100 cout << "sims::dimino n e w coset rep" << endl;
2101 }
2102 new_coset_rep = c;
2103
2104 for (k = 0; k < subgroup_sz; k++) {
2105 c = mult_by_rank(subgroup[k], new_coset_rep);
2106 group[group_sz++] = c;
2107 }
2108 Sorting.int_vec_heapsort(group, group_sz);
2109 if (f_vv) {
2110 cout << "sims::dimino new group size = " << group_sz << endl;
2111 }
2112 cosets[nb_cosets++] = new_coset_rep;
2113 }
2114 }
2115 if (f_vv) {
2116 cout << "sims::dimino, the n e w group has order " << group_sz << endl;
2117 }
2118
2119 if (f_v) {
2120 cout << "sims::dimino done" << endl;
2121 }
2122}
2123
2124void sims::Cayley_graph(int *&Adj, int &sz,
2126 int verbose_level)
2127{
2128 int f_v = (verbose_level >= 1);
2129
2130 if (f_v) {
2131 cout << "sims::Cayley_graph" << endl;
2132 }
2133 int *Elt1, *Elt2;
2134 long int i, j;
2135 int h;
2136 int nb_S;
2137
2138
2139 nb_S = gens_S->len;
2140 sz = group_order_lint();
2141
2142 Elt1 = NEW_int(A->elt_size_in_int);
2143 Elt2 = NEW_int(A->elt_size_in_int);
2144 Adj = NEW_int(sz * sz);
2145
2146 Int_vec_zero(Adj, sz * sz);
2147
2148 if (f_v) {
2149 cout << "Computing the Cayley graph:" << endl;
2150 }
2151 for (i = 0; i < sz; i++) {
2152 element_unrank_lint(i, Elt1);
2153 //cout << "i=" << i << endl;
2154 for (h = 0; h < nb_S; h++) {
2155 A->element_mult(Elt1, gens_S->ith(h), Elt2, 0);
2156#if 0
2157 cout << "i=" << i << " h=" << h << endl;
2158 cout << "Elt1=" << endl;
2159 A->element_print_quick(Elt1, cout);
2160 cout << "g_h=" << endl;
2161 A->element_print_quick(gens->ith(h), cout);
2162 cout << "Elt2=" << endl;
2163 A->element_print_quick(Elt2, cout);
2164#endif
2165 j = element_rank_lint(Elt2);
2166 Adj[i * sz + j] = Adj[j * sz + i] = 1;
2167 if (i == 0) {
2168 if (f_v) {
2169 cout << "edge " << i << " " << j << endl;
2170 }
2171 }
2172 }
2173 }
2174 if (f_v) {
2175 cout << "sims::Cayley_graph done" << endl;
2176 }
2177
2178}
2179
2180
2181}}}
2182
2183
void matrix_print_width(std::ostream &ost, long int *p, int m, int n, int dim_n, int w)
Definition: lint_vec.cpp:159
a collection of functions related to sorted vectors
int int_vec_search(int *v, int len, int a, int &idx)
Definition: sorting.cpp:1094
domain to compute with objects of type longinteger
Definition: ring_theory.h:240
int compare(longinteger_object &a, longinteger_object &b)
int multiplicity_of_p(longinteger_object &a, longinteger_object &residue, int p)
void integral_division_by_int(longinteger_object &a, int b, longinteger_object &q, int &r)
void mult(longinteger_object &a, longinteger_object &b, longinteger_object &c)
void integral_division(longinteger_object &a, longinteger_object &b, longinteger_object &q, longinteger_object &r, int verbose_level)
int compare_unsigned(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)
a permutation group in a fixed action.
Definition: actions.h:99
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
void element_print(void *elt, std::ostream &ost)
Definition: action_cb.cpp:347
void 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 element_invert(void *a, void *av, int verbose_level)
Definition: action_cb.cpp:322
void element_power_int_in_place(int *Elt, int n, int verbose_level)
Definition: action.cpp:2000
int element_order_and_cycle_type(void *elt, int *cycle_type)
Definition: action.cpp:860
void element_move(void *a, void *b, int verbose_level)
Definition: action_cb.cpp:335
void induced_action_by_conjugation(groups::sims *old_G, groups::sims *Base_group, int f_ownership, int f_basis, int verbose_level)
int check_if_in_set_stabilizer(int *Elt, int size, long int *set, int verbose_level)
Definition: action.cpp:1364
void element_print_as_permutation(void *elt, std::ostream &ost)
Definition: action_cb.cpp:421
long int element_image_of(long int a, void *elt, int verbose_level)
Definition: action_cb.cpp:198
void print(std::ostream &ost, void *elt)
Definition: action_cb.cpp:131
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 compute_all_point_orbits(int verbose_level)
Definition: schreier.cpp:988
void random_schreier_generator(int *Elt, int verbose_level)
Definition: schreier.cpp:1709
void init_generators(data_structures_groups::vector_ge &generators, int verbose_level)
Definition: schreier.cpp:373
void compute_point_orbit(int pt, int verbose_level)
Definition: schreier.cpp:1256
data_structures_groups::vector_ge gens
Definition: groups.h:845
void init(actions::action *A, int verbose_level)
Definition: schreier.cpp:308
void coset_rep(int j, int verbose_level)
Definition: schreier.cpp:787
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
void point_stabilizer(data_structures_groups::vector_ge &SG, int *tl, int pt, int verbose_level)
void element_unrank(ring_theory::longinteger_object &a, int *elt, int verbose_level)
Definition: sims.cpp:1213
void conjugate(actions::action *A, sims *old_G, int *Elt, int f_overshooting_OK, int verbose_level)
void random_element(int *elt, int verbose_level)
void compute_all_powers(int elt_idx, int n, int *power_elt, int verbose_level)
void create_Cayley_graph(data_structures_groups::vector_ge *gens, int *&Adj, long int &n, int verbose_level)
void element_rank(ring_theory::longinteger_object &a, int *elt)
Definition: sims.cpp:1276
long int invert_by_rank(long int rk_a, int verbose_level)
void element_from_path(int *elt, int verbose_level)
Definition: sims.cpp:1108
void center(data_structures_groups::vector_ge &gens, int *center_element_ranks, int &nb_elements, int verbose_level)
long int conjugate_by_rank(long int rk_a, long int rk_b, int verbose_level)
int test_if_subgroup(sims *old_G, int verbose_level)
void init(actions::action *A, int verbose_level)
Definition: sims.cpp:289
void transitive_extension(schreier &O, data_structures_groups::vector_ge &SG, int *tl, int verbose_level)
void dimino(int *subgroup, int subgroup_sz, int *gens, int &nb_gens, int *cosets, int new_gen, int *group, int &group_sz, int verbose_level)
void transitive_extension_using_coset_representatives_extract_generators(int *coset_reps, int nb_cosets, data_structures_groups::vector_ge &SG, int *tl, int verbose_level)
void all_cosets(int *subset, int size, long int *all_cosets, int verbose_level)
void extract_strong_generators_in_order(data_structures_groups::vector_ge &SG, int *tl, int verbose_level)
Definition: sims.cpp:1704
long int mult_by_rank(long int rk_a, long int rk_b, int verbose_level)
void regular_representation(int *Elt, int *perm, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
Definition: sims.cpp:951
int is_normalizing(int *Elt, int verbose_level)
void init_trivial_group(int verbose_level)
Definition: sims.cpp:584
void create_group_table(int *&Table, long int &n, int verbose_level)
void find_standard_generators_int(int ord_a, int ord_b, int ord_ab, int &a, int &b, int &nb_trials, int verbose_level)
void zuppo_list(int *Zuppos, int &nb_zuppos, int verbose_level)
long int conjugate_by_rank_b_bv_given(long int rk_a, int *Elt_b, int *Elt_bv, int verbose_level)
void element_ranks_subgroup(sims *subgroup, int *element_ranks, int verbose_level)
void transitive_extension_using_generators(int *Elt_gens, int nb_gens, int subgroup_index, data_structures_groups::vector_ge &SG, int *tl, int verbose_level)
void evaluate_word_int(int word_len, int *word, int *Elt, int verbose_level)
void add_generator_at_level(int *elt, int lvl, int verbose_level)
Definition: sims_main.cpp:543
data_structures_groups::vector_ge gens
Definition: groups.h:1280
int transitive_extension_tolerant(schreier &O, data_structures_groups::vector_ge &SG, int *tl, int f_tolerant, int verbose_level)
void element_unrank_lint(long int rk, int *Elt, int verbose_level)
Definition: sims.cpp:1326
void random_schreier_generator(int *Elt, int verbose_level)
Definition: sims.cpp:1803
void random_element_of_order(int *elt, int order, int verbose_level)
data_structures_groups::vector_ge gens_inv
Definition: groups.h:1281
int strip(int *elt, int *residue, int &drop_out_level, int &image, int verbose_level)
Definition: sims_main.cpp:433
void Cayley_graph(int *&Adj, int &sz, data_structures_groups::vector_ge *gens_S, int verbose_level)
long int find_element_of_given_order_int(int ord, int &nb_trials, int verbose_level)
void init_generators(data_structures_groups::vector_ge &generators, int verbose_level)
Definition: sims.cpp:660
void compute_base_orbits(int verbose_level)
Definition: sims_main.cpp:25
void compute_conjugacy_classes(actions::action *&Aconj, induced_actions::action_by_conjugation *&ABC, schreier *&Sch, strong_generators *&SG, int &nb_classes, int *&class_size, int *&class_rep, int verbose_level)
void point_stabilizer_with_action(actions::action *A2, data_structures_groups::vector_ge &SG, int *tl, int pt, int verbose_level)
void sylow_subgroup(int p, sims *P, int verbose_level)
void table_of_group_elements_in_data_form(int *&Table, int &len, int &sz, int verbose_level)
int find_element_with_exactly_n_fixpoints_in_given_action(int *Elt, int nb_fixpoints, actions::action *A_given, int verbose_level)
void point_stabilizer_stabchain_with_action(actions::action *A2, sims &S, int pt, int verbose_level)
int test_if_in_set_stabilizer(actions::action *A, long int *set, int size, int verbose_level)
void random_elements_of_order(data_structures_groups::vector_ge *elts, int *orders, int nb, int verbose_level)
void transitive_extension_using_coset_representatives(int *coset_reps, int nb_cosets, int verbose_level)
void find_element_of_prime_power_order(int p, int *Elt, int &e, int &nb_trials, int verbose_level)
int strip_and_add(int *elt, int *residue, int verbose_level)
Definition: sims_main.cpp:379
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)
data_structures_groups::vector_ge * gens
Definition: groups.h:1708
a subgroup of a group using a list of elements
Definition: groups.h:2039
induced action by conjugation on the elements of a given group
#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 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 Int_vec_print(A, B, C)
Definition: foundations.h:685
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
const char * discreta_home
Definition: global.cpp:36
the orbiter library for the classification of combinatorial objects
induced_actions::action_by_conjugation * ABC