Orbiter 2022
Combinatorial Objects
linear_group.cpp
Go to the documentation of this file.
1// linear_group.cpp
2//
3// Anton Betten
4// December 24, 2015
5
7#include "group_actions.h"
8
9using namespace std;
10
11
12
13namespace orbiter {
14namespace layer3_group_actions {
15namespace groups {
16
17
18
20{
21 description = NULL;
22 n = 0;
23 input_q = 0;
24 F = NULL;
26 // label
27 // label_tex
29 A_linear = NULL;
30 Mtx = NULL;
32 Strong_gens = NULL;
33 A2 = NULL;
35 q = 0;
37 nice_gens = NULL;
38 //null();
39}
40
41
42
43
45{
46 freeself();
47}
48
50{
51}
52
54{
55 null();
56}
57
59 linear_group_description *description,
60 int verbose_level)
61{
62 int f_v = (verbose_level >= 1);
63
64 if (f_v) {
65 cout << "linear_group::linear_group_init" << endl;
66 }
68 n = description->n;
69 F = description->F;
70 input_q = F->q;
72 if (f_v) {
73 cout << "linear_group::linear_group_init n=" << n << endl;
74 cout << "linear_group::linear_group_init q=" << input_q << endl;
75 cout << "linear_group::linear_group_init f_semilinear=" << f_semilinear << endl;
76 }
77
78
79 if (f_v) {
80 cout << "linear_group::linear_group_init initializing projective group" << endl;
81 }
82
83
84
86
87 if (f_v) {
88 cout << "linear_group::linear_group_init before "
89 "initial_strong_gens->init_linear_group_from_scratch" << endl;
90 }
91
94 F, n,
97 verbose_level - 3);
98
99 if (f_v) {
100 cout << "linear_group::linear_group_init after "
101 "initial_strong_gens->init_linear_group_from_scratch" << endl;
102 }
103
104
105 if (f_v) {
106 cout << "linear_group::linear_group_init initializing "
107 "initial_strong_gens done" << endl;
108 }
109 if (f_v) {
110 cout << "linear_group::linear_group_init degreee=" << A_linear->degree << endl;
111 cout << "linear_group::linear_group_init go=";
114 cout << go << endl;
115 }
116
117 label.assign(A_linear->label);
119
122
123 int f_OK = FALSE;
124
126 if (f_v) {
127 cout << "linear_group::linear_group_init "
128 "before init_PGL2q_OnConic" << endl;
129 }
130 init_PGL2q_OnConic(verbose_level);
131 if (f_v) {
132 cout << "linear_group::linear_group_init "
133 "after init_PGL2q_OnConic" << endl;
134 }
135 f_OK = TRUE;
136 }
138 if (f_v) {
139 cout << "linear_group::linear_group_init "
140 "before init_wedge_action" << endl;
141 }
142 init_wedge_action(verbose_level);
143 if (f_v) {
144 cout << "linear_group::linear_group_init "
145 "after init_wedge_action" << endl;
146 }
147 f_OK = TRUE;
148 }
150 if (f_v) {
151 cout << "linear_group::linear_group_init "
152 "before init_wedge_action_detached" << endl;
153 }
154 init_wedge_action_detached(verbose_level);
155 if (f_v) {
156 cout << "linear_group::linear_group_init "
157 "after init_wedge_action_detached" << endl;
158 }
159 f_OK = TRUE;
160 }
162 if (f_v) {
163 cout << "linear_group::linear_group_init "
164 "before init_monomial_group" << endl;
165 }
166 init_monomial_group(verbose_level);
167 if (f_v) {
168 cout << "linear_group::linear_group_init "
169 "after init_monomial_group" << endl;
170 }
171 f_OK = TRUE;
172 }
174 if (f_v) {
175 cout << "linear_group::linear_group_init "
176 "before init_diagonal_group" << endl;
177 }
178 init_diagonal_group(verbose_level);
179 if (f_v) {
180 cout << "linear_group::linear_group_init "
181 "after init_diagonal_group" << endl;
182 }
183 f_OK = TRUE;
184 }
186 if (f_v) {
187 cout << "linear_group::linear_group_init "
188 "before init_null_polarity_group" << endl;
189 }
190 init_null_polarity_group(verbose_level);
191 if (f_v) {
192 cout << "linear_group::linear_group_init "
193 "after init_null_polarity_group" << endl;
194 }
195 f_OK = TRUE;
196 }
198 if (f_v) {
199 cout << "linear_group::linear_group_init "
200 "before init_symplectic_group" << endl;
201 }
202 init_symplectic_group(verbose_level);
203 if (f_v) {
204 cout << "linear_group::linear_group_init "
205 "after init_symplectic_group" << endl;
206 }
207 f_OK = TRUE;
208 }
210 if (f_v) {
211 cout << "linear_group::linear_group_init "
212 "before init_borel_subgroup_upper" << endl;
213 }
214 init_borel_subgroup_upper(verbose_level);
215 if (f_v) {
216 cout << "linear_group::linear_group_init "
217 "after init_borel_subgroup_upper" << endl;
218 }
219 f_OK = TRUE;
220 }
222 cout << "linear_group::init borel_subgroup_lower "
223 "not yet implemented" << endl;
224 exit(1);
225 }
227 if (f_v) {
228 cout << "linear_group::linear_group_init "
229 "before init_singer_group" << endl;
230 }
232 description->singer_power, verbose_level);
233 if (f_v) {
234 cout << "linear_group::linear_group_init "
235 "after init_singer_group" << endl;
236 }
237 f_OK = TRUE;
238 }
240 if (f_v) {
241 cout << "linear_group::linear_group_init "
242 "before init_singer_group_and_frobenius" << endl;
243 }
245 description->singer_power, verbose_level);
246 if (f_v) {
247 cout << "linear_group::linear_group_init "
248 "after init_singer_group_and_frobenius" << endl;
249 }
250 f_OK = TRUE;
251 }
253 if (f_v) {
254 cout << "linear_group::linear_group_init "
255 "before init_identity_subgroup" << endl;
256 }
257 init_identity_subgroup(verbose_level);
258 if (f_v) {
259 cout << "linear_group::linear_group_init "
260 "after init_identity_subgroup" << endl;
261 }
262 f_OK = TRUE;
263 }
265 if (f_v) {
266 cout << "linear_group::linear_group_init "
267 "before init_subfield_structure_action" << endl;
268 }
270 description->s, verbose_level);
271 if (f_v) {
272 cout << "linear_group::linear_group_init "
273 "after init_subfield_structure_action" << endl;
274 }
275 f_OK = TRUE;
276 }
278 if (f_v) {
279 cout << "linear_group::linear_group_init "
280 "before init_orthogonal_group" << endl;
281 }
284 verbose_level);
285 if (f_v) {
286 cout << "linear_group::linear_group_init "
287 "after init_orthogonal_group" << endl;
288 }
289 f_OK = TRUE;
290 }
292 if (f_v) {
293 cout << "linear_group::linear_group_init "
294 "before init_subgroup_from_file" << endl;
295 }
299 verbose_level);
300 if (f_v) {
301 cout << "linear_group::linear_group_init "
302 "after init_subgroup_from_file" << endl;
303 }
304 f_OK = TRUE;
305 }
307 if (f_v) {
308 cout << "linear_group::linear_group_init "
309 "f_subgroup_by_generators" << endl;
310 }
311
312 int *gens;
313 int sz;
314
316
317 if (f_v) {
318 cout << "linear_group::linear_group_init "
319 "gens of size " << sz << ":" << endl;
320 Int_vec_print(cout, gens, sz);
321 cout << endl;
322 }
323
324
325 if (f_v) {
326 cout << "linear_group::linear_group_init "
327 "before init_subgroup_by_generators" << endl;
328 }
333 gens,
334 verbose_level - 1);
335 if (f_v) {
336 cout << "linear_group::linear_group_init "
337 "after init_subgroup_by_generators" << endl;
338 }
339 FREE_int(gens);
340 f_OK = TRUE;
341 }
342 if (description->f_Janko1) {
343 if (f_v) {
344 cout << "linear_group::linear_group_init "
345 "before init_subgroup_Janko1" << endl;
346 }
347 init_subgroup_Janko1(verbose_level);
348 if (f_v) {
349 cout << "linear_group::linear_group_init "
350 "after init_subgroup_Janko1" << endl;
351 }
352 f_OK = TRUE;
353 }
355 if (f_v) {
356 cout << "linear_group::linear_group_init "
357 "f_on_tensors" << endl;
358 }
360 long int *points;
361 int nb_points;
362 int i;
363
365 nb_points = W->degree_of_tensor_action;
366 points = NEW_lint(nb_points);
367 for (i = 0; i < nb_points; i++) {
368 points[i] = W->perm_offset_i[W->nb_factors] + i;
369 }
370
371 if (f_v) {
372 cout << "action::init_wreath_product_group_and_restrict "
373 "before A_wreath->restricted_action" << endl;
374 }
375 A2 = A_linear->restricted_action(points, nb_points,
376 verbose_level);
379 f_OK = TRUE;
382 if (f_v) {
383 cout << "action::init_wreath_product_group_and_restrict "
384 "after A_linear->restricted_action" << endl;
385 }
386 if (f_v) {
387 cout << "linear_group::linear_group_init "
388 "f_on_tensors done" << endl;
389 }
390
391 }
393 if (f_v) {
394 cout << "linear_group::linear_group_init f_on_rank_one_tensors" << endl;
395 }
397 long int *points;
398 int nb_points;
399 int i;
400
402 nb_points = W->nb_rank_one_tensors;
403 points = NEW_lint(nb_points);
404 for (i = 0; i < nb_points; i++) {
405 points[i] = W->perm_offset_i[W->nb_factors] + W->rank_one_tensors_in_PG[i];
406 }
407
408 if (f_v) {
409 cout << "linear_group::linear_group_init "
410 "before A_wreath->restricted_action" << endl;
411 }
412 A2 = A_linear->restricted_action(points, nb_points,
413 verbose_level);
416 f_OK = TRUE;
419 if (f_v) {
420 cout << "linear_group::linear_group_init "
421 "after A_linear->restricted_action" << endl;
422 }
423
424 if (f_v) {
425 cout << "linear_group::linear_group_init f_on_rank_one_tensors done" << endl;
426 }
427 }
428
431 geometry::grassmann *Grass;
432 //action *A3;
433
434 if (f_v) {
435 cout << "linear_group::linear_group_init creating induced action "
436 "on k-subspaces for k="
437 << description->on_k_subspaces_k << endl;
438 }
440
442
443
444 if (f_v) {
445 cout << "linear_group::linear_group_init before Grass->init" << endl;
446 }
447
448 Grass->init(n,
450 F, 0 /* verbose_level */);
451
452 if (f_v) {
453 cout << "linear_group::linear_group_init after Grass->init" << endl;
454 }
455
456
457 if (f_v) {
458 cout << "linear_group::linear_group_init before AG->init" << endl;
459 }
460
461 AG->init(*A_linear, Grass, verbose_level - 2);
462
463 if (f_v) {
464 cout << "linear_group::linear_group_init after AG->init" << endl;
465 }
466
467
469
470 if (f_v) {
471 cout << "linear_group::linear_group_init before A2->induced_action_on_grassmannian" << endl;
472 }
473
475 FALSE /* f_induce_action */, NULL /*sims *old_G */,
476 verbose_level - 2);
477
478 if (f_v) {
479 cout << "linear_group::linear_group_init after A2->induced_action_on_grassmannian" << endl;
480 }
481
482
484
487
488 if (f_v) {
489 cout << "linear_group::linear_group_init action A2 created: ";
490 A2->print_info();
491 }
492
493 //A2 = A3;
494 f_OK = TRUE;
495
496 char str1[1000];
497 char str2[1000];
498
499 sprintf(str1, "_OnGr_%d", description->on_k_subspaces_k);
500 sprintf(str2, " {\\rm Gr}_{%d,%d}(%d)",
502 label.append(str1);
503 label_tex.append(str2);
504
505
506 if (f_v) {
507 cout << "linear_group::linear_group_init creating induced "
508 "action on k-subspaces done" << endl;
509 }
510 }
512 if (f_v) {
513 cout << "linear_group::linear_group_init "
514 "restricted_action" << endl;
515 }
516 long int *points;
517 int nb_points;
518 actions::action *A3;
519
520 //Orbiter->Lint_vec.scan(description->restricted_action_text, points, nb_points);
522 if (f_v) {
523 cout << "linear_group::linear_group_init "
524 "computing restricted action on set of size " << nb_points << endl;
525 Lint_vec_print(cout, points, nb_points);
526 cout << endl;
527 }
528
529 A3 = A2->restricted_action(points, nb_points,
530 verbose_level);
531 A3->f_is_linear = TRUE;
532 f_OK = TRUE;
533 //sprintf(A2->prefix + strlen(A2->prefix), "_restr_%d", nb_points);
534 //sprintf(A2->label_latex + strlen(A2->label_latex),
535 // "{\\rm restr}(%d)", nb_points);
536 //Strong_gens = initial_strong_gens;
537
538 A2 = A3;
539 if (f_v) {
540 cout << "linear_group::linear_group_init "
541 "after restricted_action" << endl;
542 }
543 f_OK = TRUE;
544 }
545
546 if (!f_OK) {
547 if (f_v) {
548 cout << "linear_group::linear_group_init "
549 "!f_OK, A2 = A_linear" << endl;
550 }
551 A2 = A_linear;
553 q = input_q;
556 //sprintf(prefix, "PGL_%d_%d", n, input_q);
557 //sprintf(label_latex, "\\PGL(%d,%d)", n, input_q);
558 }
559
560
562 if (f_v) {
563 cout << "linear_group::linear_group_init f_export_magma" << endl;
564 }
565 Strong_gens->export_magma(A_linear, cout, verbose_level);
566 }
567
568 if (f_v) {
569 cout << "linear_group::linear_group_init done" << endl;
570 }
571}
572
573void linear_group::init_PGL2q_OnConic(int verbose_level)
574{
575 int f_v = (verbose_level >= 1);
576
577 if (f_v) {
578 cout << "linear_group::init_PGL2q_OnConic "
579 "initializing action of PGL(2,q) on conic" << endl;
580 }
581 if (!A_linear->f_has_sims) {
582 cout << "linear_group::init_PGL2q_OnConic "
583 "A_linear does not have sims, so we create it" << endl;
584 A_linear->create_sims(verbose_level);
585 }
587 cout << "linear_group::init_PGL2q_OnConic "
588 "A_linear does not have strong generators" << endl;
589 //A_linear->create_sims(verbose_level);
590 exit(1);
591 }
594 FALSE /* f_induce_action */, NULL,
595 verbose_level);
596
598 q = input_q;
599 Strong_gens = initial_strong_gens; //A_linear->Strong_gens;
601
602 if (f_v) {
603 cout << "linear_group::init_PGL2q_OnConic "
604 "vector_space_dimension=" << vector_space_dimension << endl;
605 }
606 if (f_v) {
607 cout << "linear_group::init_PGL2q_OnConic "
608 "created action of PGL2_on conic:" << endl;
609 A2->print_info();
610 }
611 char str1[1000];
612 char str2[1000];
613
614 sprintf(str1, "_OnConic_%d_%d", n, q);
615 sprintf(str2, "{\\rm OnConic}(%d,%d)", n, q);
616 label.append(str1);
617 label_tex.append(str2);
618 if (f_v) {
619 cout << "linear_group::init_PGL2q_OnConic "
620 "created group " << label << endl;
621 }
622}
623
624void linear_group::init_wedge_action(int verbose_level)
625{
626 int f_v = (verbose_level >= 1);
627
628 if (f_v) {
629 cout << "linear_group::init_wedge_action "
630 "initializing wedge action" << endl;
631 }
632#if 0
633 if (!A_linear->f_has_sims) {
634 cout << "linear_group::init_wedge_action "
635 "A_linear does not have sims, so we create it" << endl;
636 A_linear->create_sims(verbose_level);
637 }
638#endif
640 cout << "linear_group::init_wedge_action "
641 "A_linear does not have strong generators" << endl;
642 exit(1);
643 }
645 //action_on_wedge_product *AW;
646
647
648
649#if 0
650
651 if (f_v) {
652 cout << "linear_group::init_wedge_action "
653 "before induced_wedge_action:" << endl;
654 }
655 AW = NEW_OBJECT(action_on_wedge_product);
656
657 AW->init(*A_linear, verbose_level);
658#endif
659
660
661 if (f_v) {
662 cout << "linear_group::init_wedge_action "
663 "vector_space_dimension="
664 << vector_space_dimension << endl;
665 }
666
668
670 q = input_q;
671 Strong_gens = initial_strong_gens; //A_linear->Strong_gens;
673
674 if (f_v) {
675 cout << "linear_group::init_wedge_action "
676 "created wedge action:" << endl;
677 A2->print_info();
678 }
679 char str1[1000];
680 char str2[1000];
681
682 sprintf(str1, "_Wedge_%d_%d", n, q);
683 sprintf(str2, "{\\rm Wedge}(%d,%d)", n, q);
684 label.append(str1);
685 label_tex.append(str2);
686 if (f_v) {
687 cout << "linear_group::init_wedge_action "
688 "created group " << label << endl;
689 }
690}
691
693{
694 int f_v = (verbose_level >= 1);
695
696 if (f_v) {
697 cout << "linear_group::init_wedge_action_detached "
698 "initializing wedge action" << endl;
699 }
701 cout << "linear_group::init_wedge_action_detached "
702 "A_linear does not have strong generators" << endl;
703 exit(1);
704 }
706
707 if (f_v) {
708 cout << "linear_group::init_wedge_action_detached initializing projective group" << endl;
709 }
710
711
712 strong_generators *secondary_strong_gens;
713 //strong_generators *exterior_square_strong_gens;
714 data_structures_groups::vector_ge *secondary_nice_gens;
715 int n2;
716
718
719 n2 = Combi.binomial2(n);
720
721 secondary_strong_gens = NEW_OBJECT(strong_generators);
722 //exterior_square_strong_gens = NEW_OBJECT(strong_generators);
723
724 if (f_v) {
725 cout << "linear_group::init_wedge_action_detached before "
726 "initial_strong_gens->init_linear_group_from_scratch" << endl;
727 }
728
729 secondary_strong_gens->init_linear_group_from_scratch(
730 A2,
731 F, n2,
733 secondary_nice_gens,
734 verbose_level);
735
736 if (f_v) {
737 cout << "linear_group::init_wedge_action_detached after "
738 "initial_strong_gens->init_linear_group_from_scratch" << endl;
739 }
740
741
742
743 q = F->q;
744
746 Strong_gens->init(A2, verbose_level);
748 A2,
750 nice_gens,
751 verbose_level);
753
754 A_linear = A2; // override the original action!
755
757
758 if (f_v) {
759 cout << "linear_group::init_wedge_action_detached "
760 "nice generators are:" << endl;
761 nice_gens->print(cout);
762 }
763
764
765 if (f_v) {
766 cout << "linear_group::init_wedge_action_detached "
767 "created detached wedge action:" << endl;
768 A2->print_info();
769 }
770 char str1[1000];
771 char str2[1000];
772
773 sprintf(str1, "_Wedge_%d_%d_detached", n, q);
774 sprintf(str2, "{\\rm WedgeDetached}(%d,%d)", n, q);
775 label.append(str1);
776 label_tex.append(str2);
777 if (f_v) {
778 cout << "linear_group::init_wedge_action_detached "
779 "created group " << label << endl;
780 }
781}
782
784{
785 int f_v = (verbose_level >= 1);
786
787
788 if (f_v) {
789 cout << "linear_group::init_monomial_group "
790 "initializing monomial group" << endl;
791 }
792
794 q = input_q;
795
798 Mtx, verbose_level - 1);
800
801 A2 = A_linear;
802
803
804 char str1[1000];
805 char str2[1000];
806
807 sprintf(str1, "_Monomial_%d_%d", n, q);
808 sprintf(str2, "{\\rm Monomial}(%d,%d)", n, q);
809 label.append(str1);
810 label_tex.append(str2);
811
812 if (f_v) {
813 cout << "linear_group::init_monomial_group "
814 "created group " << label << endl;
815 }
816}
817
819{
820 int f_v = (verbose_level >= 1);
821
822
823 if (f_v) {
824 cout << "linear_group::init_diagonal_group "
825 "initializing monomial group" << endl;
826 }
827
829 q = input_q;
830
833 Mtx, verbose_level - 1);
835
836 A2 = A_linear;
837
838 char str1[1000];
839 char str2[1000];
840
841 sprintf(str1, "_Diagonal_%d_%d", n, q);
842 sprintf(str2, "{\\rm Diagonal}(%d,%d)", n, q);
843 label.append(str1);
844 label_tex.append(str2);
845
846 if (f_v) {
847 cout << "linear_group::init_diagonal_group "
848 "created group " << label << endl;
849 }
850}
851
852void linear_group::init_singer_group(int singer_power, int verbose_level)
853{
854 int f_v = (verbose_level >= 1);
855
856
857 if (f_v) {
858 cout << "linear_group::init_singer_group "
859 "initializing singer group" << endl;
860 }
861
863 q = input_q;
864
867 A_linear, Mtx, singer_power, nice_gens,
868 verbose_level - 1);
871
872
873 A2 = A_linear;
874
875 char str1[1000];
876 char str2[1000];
877
878 sprintf(str1, "_Singer_%d_%d_%d", n, q, singer_power);
879 sprintf(str2, "{\\rm Singer}(%d,%d,%d)", n, q, singer_power);
880 label.append(str1);
881 label_tex.append(str2);
882
883 if (f_v) {
884 cout << "linear_group::init_singer_group "
885 "created group " << label << endl;
886 }
887}
888
890 int singer_power, int verbose_level)
891{
892 int f_v = (verbose_level >= 1);
893
894
895 if (f_v) {
896 cout << "linear_group::init_singer_group_and_frobenius "
897 "initializing singer group" << endl;
898 }
899
901 q = input_q;
902
905 A_linear, Mtx, singer_power, nice_gens,
906 verbose_level - 1);
909
910
911 A2 = A_linear;
912
913 char str1[1000];
914 char str2[1000];
915
916 sprintf(str1, "_Singer_and_Frob%d_%d_%d", n, q, singer_power);
917 sprintf(str2, "{\\rm SingerFrob}(%d,%d,%d)", n, q, singer_power);
918 label.append(str1);
919 label_tex.append(str2);
920
921 if (f_v) {
922 cout << "linear_group::init_singer_group_and_frobenius "
923 "created group " << label << endl;
924 }
925}
926
928{
929 int f_v = (verbose_level >= 1);
930
931
932 if (f_v) {
933 cout << "linear_group::init_null_polarity_group "
934 "initializing null polarity group" << endl;
935 }
936
938 q = input_q;
939
942 A_linear, Mtx, verbose_level - 1);
944
945 A2 = A_linear;
946
947
948 char str1[1000];
949 char str2[1000];
950
951 sprintf(str1, "_NullPolarity_%d_%d", n, q);
952 sprintf(str2, "{\\rm NullPolarity}(%d,%d)", n, q);
953 label.append(str1);
954 label_tex.append(str2);
955
956 if (f_v) {
957 cout << "linear_group::init_null_polarity_group "
958 "created group " << label << endl;
959 }
960}
961
963{
964 int f_v = (verbose_level >= 1);
965
966
967 if (f_v) {
968 cout << "linear_group::init_borel_subgroup_upper "
969 "initializing borel subgroup of upper "
970 "triangular matrices" << endl;
971 }
972
974 q = input_q;
975
978 A_linear, Mtx, verbose_level - 1);
980
981 A2 = A_linear;
982
983
984 char str1[1000];
985 char str2[1000];
986
987 sprintf(str1, "_BorelUpper_%d_%d", n, q);
988 sprintf(str2, "{\\rm BorelUpper}(%d,%d)", n, q);
989 label.append(str1);
990 label_tex.append(str2);
991
992 if (f_v) {
993 cout << "linear_group::init_borel_subgroup_upper "
994 "created group " << label << endl;
995 }
996}
997
999{
1000 int f_v = (verbose_level >= 1);
1001
1002
1003 if (f_v) {
1004 cout << "linear_group::init_identity_subgroup "
1005 "initializing identify subgroup" << endl;
1006 }
1007
1009 q = input_q;
1010
1013 A_linear, Mtx, verbose_level - 1);
1015
1016 A2 = A_linear;
1017
1018 char str1[1000];
1019 char str2[1000];
1020
1021 sprintf(str1, "_Identity_%d_%d", n, q);
1022 sprintf(str2, "{\\rm Identity}(%d,%d)", n, q);
1023 label.append(str1);
1024 label_tex.append(str2);
1025
1026 if (f_v) {
1027 cout << "linear_group::init_identity_subgroup "
1028 "created group " << label << endl;
1029 }
1030}
1031
1033{
1034 int f_v = (verbose_level >= 1);
1035
1036
1037 if (f_v) {
1038 cout << "linear_group::init_symplectic_group "
1039 "initializing symplectic group" << endl;
1040 }
1041
1043 q = input_q;
1044
1047 A_linear, Mtx, verbose_level - 1);
1049
1050 A2 = A_linear;
1051
1052
1053 char str1[1000];
1054 char str2[1000];
1055
1056 sprintf(str1, "_Sp_%d_%d", n, q);
1057 sprintf(str2, "{\\rm Sp}(%d,%d)", n, q);
1058 label.append(str1);
1059 label_tex.append(str2);
1060
1061
1062 if (f_v) {
1063 cout << "linear_group::init_symplectic_group "
1064 "created group " << label << endl;
1065 }
1066}
1067
1069{
1070 int f_v = (verbose_level >= 1);
1071 //int f_vv = (verbose_level >= 2);
1072
1073 if (f_v) {
1074 cout << "linear_group::init_subfield_structure_action" << endl;
1075 cout << "s=" << s << endl;
1076 }
1077
1078 if (f_v) {
1079 cout << "linear_group::init_subfield_structure_action "
1080 "before field_reduction" << endl;
1081 }
1082
1084 q = input_q;
1085
1088 n, s, F, verbose_level - 1);
1089 //lift_generators_to_subfield_structure(A_linear,
1090 //P->n + 1, s, P->F, SGens, verbose_level - 1);
1092
1093 A2 = A_linear;
1094
1095 char str1[1000];
1096 char str2[1000];
1097
1098 sprintf(str1, "_Subfield_%d_%d_%d", n, q, s);
1099 sprintf(str2, "{\\rm SubfieldAction}(%d,%d,%d)", n, q, s);
1100 label.append(str1);
1101 label_tex.append(str2);
1102
1103 if (f_v) {
1104 cout << "linear_group::init_subfield_structure_action "
1105 "created group " << label << endl;
1106 }
1107
1108 if (f_v) {
1109 cout << "linear_group::init_subfield_structure_action "
1110 "done" << endl;
1111 }
1112}
1113
1114void linear_group::init_orthogonal_group(int epsilon, int verbose_level)
1115{
1116 int f_v = (verbose_level >= 1);
1117
1118
1119 if (f_v) {
1120 cout << "linear_group::init_orthogonal_group "
1121 "initializing orthogonal group" << endl;
1122 cout << "epsilon=" << epsilon << endl;
1123 }
1124
1126 q = input_q;
1127
1130 F, n,
1131 epsilon,
1132 f_semilinear,
1133 verbose_level - 1);
1135
1136 A2 = A_linear;
1137
1138 char str1[1000];
1139 char str2[1000];
1140
1141 if (EVEN(n)) {
1142 if (epsilon == 1) {
1143 sprintf(str1, "_Orthogonal_plus_%d_%d", n, q);
1144 sprintf(str2, "{\\rm O}^+(%d,%d)", n, q);
1145 label.append(str1);
1146 label_tex.append(str2);
1147 }
1148 else {
1149 sprintf(str1, "_Orthogonal_minus_%d_%d", n, q);
1150 sprintf(str2, "{\\rm O}^-(%d,%d)", n, q);
1151 label.append(str1);
1152 label_tex.append(str2);
1153 }
1154 }
1155 else {
1156 sprintf(str1, "_Orthogonal_%d_%d", n, q);
1157 sprintf(str2, "{\\rm O}(%d,%d)", n, q);
1158 label.append(str1);
1159 label_tex.append(str2);
1160 }
1161 if (f_v) {
1162 cout << "linear_group::init_orthogonal_group "
1163 "created group " << label << endl;
1164 }
1165}
1166
1167
1169 std::string &subgroup_fname, std::string &subgroup_label,
1170 int verbose_level)
1171{
1172 int f_v = (verbose_level >= 1);
1173 //int f_vv = (verbose_level >= 2);
1174
1175 if (f_v) {
1176 cout << "linear_group::init_subgroup_from_file" << endl;
1177 cout << "fname=" << subgroup_fname << endl;
1178 cout << "label=" << subgroup_label << endl;
1179 }
1180
1181
1183 q = input_q;
1184
1186 if (f_v) {
1187 cout << "linear_group::init_subgroup_from_file "
1188 "reading generators from file " << subgroup_fname << endl;
1189 }
1190
1192 subgroup_fname, verbose_level - 1);
1193
1194 if (f_v) {
1195 cout << "linear_group::init_subgroup_from_file "
1196 "read generators from file" << endl;
1197 }
1198
1200
1201 A2 = A_linear;
1202
1203
1204 char str1[1000];
1205 char str2[1000];
1206
1207 sprintf(str1, "_SubgroupFile_%d_%d", n, q);
1208 sprintf(str2, "{\\rm SubgroupFile}(%d,%d)", n, q);
1209 label.append(str1);
1210 label_tex.append(str2);
1211
1212
1213 if (f_v) {
1214 cout << "linear_group::init_subgroup_from_file "
1215 "created group " << label << endl;
1216 }
1217}
1218
1220 std::string &subgroup_label,
1221 std::string &subgroup_order_text,
1222 int nb_subgroup_generators,
1223 int *subgroup_generators_data,
1224 int verbose_level)
1225{
1226 int f_v = (verbose_level >= 1);
1227 //int f_vv = (verbose_level >= 2);
1228
1229 if (f_v) {
1230 cout << "linear_group::init_subgroup_by_generators" << endl;
1231 cout << "label=" << subgroup_label << endl;
1232 }
1233
1235 if (f_v) {
1236 cout << "linear_group::init_subgroup_by_generators before "
1237 "Strong_gens->init_subgroup_by_generators" << endl;
1238 }
1239
1241 nb_subgroup_generators, subgroup_generators_data,
1242 subgroup_order_text,
1243 nice_gens,
1244 verbose_level - 1);
1245
1247
1248 if (f_v) {
1249 cout << "linear_group::init_subgroup_by_generators after "
1250 "Strong_gens->init_subgroup_by_generators" << endl;
1251 }
1252
1254
1255
1257
1259
1260 if (f_v) {
1261 cout << "linear_group::init_subgroup_by_generators go = " << go << endl;
1262 }
1263
1264
1265
1266 A2 = A_linear;
1267
1268 stringstream str;
1270 int max_len = 80;
1271 int line_skip = 0;
1272
1273
1274 L.latexable_string(str, subgroup_label.c_str(), max_len, line_skip);
1275
1276
1277
1278 label.append("_Subgroup_");
1279 label.append(subgroup_label);
1280 label.append("_");
1281 label.append(subgroup_order_text);
1282
1283
1284 label_tex.append("{\\rm Subgroup ");
1285 label_tex.append(str.str());
1286 label_tex.append(" order ");
1287 label_tex.append(subgroup_order_text);
1288 label_tex.append("}");
1289
1290 if (f_v) {
1291 cout << "linear_group::init_subgroup_by_generators "
1292 "created group " << label << endl;
1293 }
1294}
1295
1297{
1298 int f_v = (verbose_level >= 1);
1299 //int f_vv = (verbose_level >= 2);
1300
1301 if (f_v) {
1302 cout << "linear_group::init_subgroup_Janko1" << endl;
1303 }
1304
1306 if (f_v) {
1307 cout << "linear_group::init_subgroup_Janko1 before "
1308 "Strong_gens->init_subgroup_by_generators" << endl;
1309 }
1310
1311 matrix_group *M;
1312
1314
1316 A_linear,
1317 M->GFq,
1318 verbose_level);
1319
1320 if (f_v) {
1321 cout << "linear_group::init_subgroup_Janko1 after "
1322 "Strong_gens->init_subgroup_by_generators" << endl;
1323 }
1324
1327
1328 A2 = A_linear;
1329
1330
1331 char str1[1000];
1332 char str2[1000];
1333
1334 sprintf(str1, "_Subgroup_Janko1");
1335 sprintf(str2, "{\\rm Subgroup Janko1}");
1336 label.append(str1);
1337 label_tex.append(str2);
1338
1339 if (f_v) {
1340 cout << "linear_group::init_subgroup_Janko1 "
1341 "created group " << label << endl;
1342 }
1343}
1344
1345void linear_group::report(std::ostream &ost,
1346 int f_sylow, int f_group_table,
1347 int f_conjugacy_classes_and_normalizers,
1348 graphics::layered_graph_draw_options *LG_Draw_options,
1349 int verbose_level)
1350{
1351 int f_v = (verbose_level >= 1);
1352 sims *H;
1353 actions::action *A;
1354
1355 A = A2;
1356 if (f_v) {
1357 cout << "linear_group::report creating report for group " << label << endl;
1358 }
1359
1360 //G = initial_strong_gens->create_sims(verbose_level);
1361 if (f_v) {
1362 cout << "linear_group::report before Strong_gens->create_sims" << endl;
1363 }
1364 H = Strong_gens->create_sims(0 /*verbose_level*/);
1365
1366 //cout << "group order G = " << G->group_order_int() << endl;
1367 cout << "group order H = " << H->group_order_lint() << endl;
1368
1369 int *Elt;
1371
1372 Elt = NEW_int(A->elt_size_in_int);
1373 H->group_order(go);
1374
1375
1376 {
1377
1378 //H->print_all_group_elements_tex(fp);
1379
1381 //sims *G;
1382 //sims *H;
1383
1384 //G = initial_strong_gens->create_sims(verbose_level);
1385 //H = Strong_gens->create_sims(verbose_level);
1386
1387
1388
1389 ost << "\\section*{The Group $" << label_tex << "$}" << endl;
1390
1391
1392 H->group_order(go);
1393
1394 ost << "\\noindent The order of the group $"
1395 << label_tex
1396 << "$ is " << go << "\\\\" << endl;
1397
1398
1399#if 0
1400 fp << "\\noindent The field ${\\mathbb F}_{"
1401 << F->q
1402 << "}$ :\\\\" << endl;
1403 if (f_v) {
1404 cout << "linear_group::report before F->cheat_sheet" << endl;
1405 }
1406 F->cheat_sheet(fp, verbose_level);
1407 if (f_v) {
1408 cout << "linear_group::report after F->cheat_sheet" << endl;
1409 }
1410#endif
1411
1412
1413
1414 ost << "\\noindent The group acts on a set of size "
1415 << A2->degree << "\\\\" << endl;
1416
1417#if 0
1418 if (A->degree < 1000) {
1419
1420 A->print_points(fp);
1421 }
1422#endif
1423
1424 //cout << "Order H = " << H->group_order_int() << "\\\\" << endl;
1425
1426 if (f_has_nice_gens) {
1427 ost << "Nice generators:\\\\" << endl;
1428 nice_gens->print_tex(ost);
1429 }
1430 else {
1431 }
1432
1433 cout << "Strong generators:\\\\" << endl;
1435
1436
1437 if (f_v) {
1438 cout << "linear_group::report before A2->report" << endl;
1439 }
1440
1441 A2->report(ost, TRUE /*f_sims*/, H,
1442 TRUE /* f_strong_gens */, Strong_gens,
1443 LG_Draw_options,
1444 verbose_level);
1445
1446 if (f_v) {
1447 cout << "linear_group::report after A2->report" << endl;
1448 }
1449
1450 if (f_v) {
1451 cout << "linear_group::report before A2->report_basic_orbits" << endl;
1452 }
1453
1454 A2->report_basic_orbits(ost);
1455
1456 if (f_v) {
1457 cout << "linear_group::report after A2->report_basic_orbits" << endl;
1458 }
1459
1460 if (f_group_table) {
1461 if (f_v) {
1462 cout << "linear_group::report f_group_table is true" << endl;
1463 }
1464
1465 int *Table;
1466 long int n;
1468 string fname_group_table;
1469 H->create_group_table(Table, n, verbose_level);
1470
1471 cout << "linear_group::report The group table is:" << endl;
1472 Int_matrix_print(Table, n, n);
1473
1474 fname_group_table.assign(label);
1475 fname_group_table.append("_group_table.csv");
1476 Fio.int_matrix_write_csv(fname_group_table, Table, n, n);
1477 cout << "Written file " << fname_group_table << " of size " << Fio.file_size(fname_group_table) << endl;
1478
1479 {
1481
1482 ost << "\\begin{sidewaystable}" << endl;
1483 ost << "$$" << endl;
1484 L.int_matrix_print_tex(ost, Table, n, n);
1485 ost << "$$" << endl;
1486 ost << "\\end{sidewaystable}" << endl;
1487
1489
1490 }
1491
1492 {
1493 string fname2;
1494 //int x_min = 0, y_min = 0;
1495 //int xmax = ONE_MILLION;
1496 //int ymax = ONE_MILLION;
1497
1498 //int f_embedded = TRUE;
1499 //int f_sideways = FALSE;
1500 int *labels;
1501
1502 char str[1000];
1503
1504 int i;
1505
1506 labels = NEW_int(2 * n);
1507
1508 for (i = 0; i < n; i++) {
1509 labels[i] = i;
1510 }
1511 if (n > 100) {
1512 for (i = 0; i < n; i++) {
1513 labels[n + i] = n + i % 100;
1514 }
1515 }
1516 else {
1517 for (i = 0; i < n; i++) {
1518 labels[n + i] = n + i;
1519 }
1520 }
1521
1522 fname2.assign(label);
1523 sprintf(str, "_group_table_order_%ld", n);
1524 fname2.append(str);
1525
1526 {
1528
1529 G.init(fname2, LG_Draw_options, verbose_level);
1530
1531#if 0
1532 mp_graphics G(fname2, x_min, y_min, xmax, ymax, f_embedded, f_sideways, verbose_level - 1);
1533 //G.setup(fname2, 0, 0, ONE_MILLION, ONE_MILLION, xmax, ymax, f_embedded, scale, line_width);
1534 G.out_xmin() = 0;
1535 G.out_ymin() = 0;
1536 G.out_xmax() = xmax;
1537 G.out_ymax() = ymax;
1538 //cout << "xmax/ymax = " << xmax << " / " << ymax << endl;
1539
1540 //G.tikz_global_scale = LG_Draw_options->scale;
1541 //G.tikz_global_line_width = LG_Draw_options->line_width;
1542#endif
1543
1544 G.header();
1545 G.begin_figure(1000 /* factor_1000*/);
1546
1547 int color_scale[] = {8,5,6,4,3,2,18,19, 7,9,10,11,12,13,14,15,16,17,20,21,22,23,24,25,1};
1548 int nb_colors = sizeof(color_scale) / sizeof(int);
1549
1551 FALSE /* f_row_grid */, FALSE /* f_col_grid */,
1552 Table /* Table */, n /* nb_colors */,
1553 n, n, //xmax, ymax,
1554 color_scale, nb_colors,
1555 TRUE /* f_has_labels */, labels);
1556
1557 G.finish(cout, TRUE);
1558 }
1559 FREE_int(labels);
1560
1561 }
1562
1563
1564 FREE_int(Table);
1565
1566
1567 }
1568
1569 if (f_sylow) {
1570
1571 if (f_v) {
1572 cout << "linear_group::report f_sylow is true" << endl;
1573 }
1574
1575 sylow_structure *Syl;
1576
1578 Syl->init(H, verbose_level);
1579 Syl->report(ost);
1580
1581 }
1582 else {
1583
1584 if (f_v) {
1585 cout << "linear_group::report f_sylow is false" << endl;
1586 }
1587
1588 }
1589
1590 if (f_conjugacy_classes_and_normalizers) {
1591
1592 if (f_v) {
1593 cout << "linear_group::report f_conjugacy_classes_and_normalizers is true" << endl;
1594 }
1595
1597 verbose_level);
1598
1599 if (f_v) {
1600 cout << "linear_group::report A2->report_conjugacy_classes_and_normalizers" << endl;
1601 }
1602 }
1603
1604 //L.foot(fp);
1605 }
1606
1607 FREE_int(Elt);
1608
1609}
1610
1611
1614 int f_sylow, int f_group_table, int f_classes,
1615 int verbose_level)
1616{
1617 int f_v = (verbose_level >= 1);
1618
1619
1620 if (f_v) {
1621 cout << "linear_group::create_latex_report" << endl;
1622 }
1623
1624 {
1625 string fname;
1626 string title;
1627 string author;
1628
1629 fname.assign(label);
1630 fname.append("_report.tex");
1631 title.assign("The group $");
1632 title.append(label_tex);
1633 title.append("$");
1634
1635 author.assign("");
1636
1637
1638 {
1639 ofstream ost(fname);
1641
1642 L.head(ost,
1643 FALSE /* f_book*/,
1644 TRUE /* f_title */,
1645 title.c_str(), author.c_str(),
1646 FALSE /* f_toc */,
1647 FALSE /* f_landscape */,
1648 TRUE /* f_12pt */,
1649 TRUE /* f_enlarged_page */,
1650 TRUE /* f_pagenumbers */,
1651 NULL /* extra_praeamble */);
1652
1653
1654 if (f_v) {
1655 cout << "linear_group::create_latex_report before report" << endl;
1656 }
1657 report(ost, f_sylow, f_group_table,
1658 f_classes,
1659 O,
1660 verbose_level);
1661 if (f_v) {
1662 cout << "linear_group::create_latex_report after report" << endl;
1663 }
1664
1665
1666 L.foot(ost);
1667
1668 }
1670
1671 cout << "written file " << fname << " of size "
1672 << Fio.file_size(fname) << endl;
1673 }
1674
1675
1676
1677
1678 if (f_v) {
1679 cout << "linear_group::create_latex_report done" << endl;
1680 }
1681}
1682
1683}}}
1684
1685
void cheat_sheet(std::ostream &f, int verbose_level)
to rank and unrank subspaces of a fixed dimension in F_q^n
Definition: geometry.h:892
void init(int n, int k, field_theory::finite_field *F, int verbose_level)
Definition: grassmann.cpp:70
options for drawing an object of type layered_graph
Definition: graphics.h:457
a general 2D graphical output interface (metapost, tikz, postscript)
Definition: graphics.h:545
void init(std::string &file_name, layered_graph_draw_options *Draw_options, int verbose_level)
Definition: mp_graphics.cpp:71
void draw_matrix_in_color(int f_row_grid, int f_col_grid, int *Table, int nb_colors, int m, int n, int *color_scale, int nb_colors_in_scale, int f_has_labels, int *labels)
void finish(std::ostream &ost, int verbose_level)
void int_matrix_write_csv(std::string &fname, int *M, int m, int n)
Definition: file_io.cpp:1300
void latexable_string(std::stringstream &str, const char *p, int max_len, int line_skip)
void int_matrix_print_tex(std::ostream &ost, int *p, int m, int n)
void head(std::ostream &ost, int f_book, int f_title, const char *title, const char *author, int f_toc, int f_landscape, int f_12pt, int f_enlarged_page, int f_pagenumbers, const char *extras_for_preamble)
void get_vector_from_label(std::string &label, int *&v, int &sz, int verbose_level)
void get_lint_vector_from_label(std::string &label, long int *&v, int &sz, int verbose_level)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
a permutation group in a fixed action.
Definition: actions.h:99
action * restricted_action(long int *points, int nb_points, int verbose_level)
action * induced_action_on_wedge_product(int verbose_level)
void report(std::ostream &ost, int f_sims, groups::sims *S, int f_strong_gens, groups::strong_generators *SG, graphics::layered_graph_draw_options *LG_Draw_options, int verbose_level)
Definition: action_io.cpp:22
groups::strong_generators * Strong_gens
Definition: actions.h:130
void induced_action_by_representation_on_conic(action *A_old, int f_induce_action, groups::sims *old_G, int verbose_level)
action * induced_action_on_grassmannian(int k, int verbose_level)
void report_conjugacy_classes_and_normalizers(std::ostream &ost, groups::sims *override_Sims, int verbose_level)
groups::matrix_group * get_matrix_group()
Definition: action.cpp:2986
description of a linear group from the command line
Definition: groups.h:158
void linear_group_init(linear_group_description *description, int verbose_level)
void create_latex_report(graphics::layered_graph_draw_options *O, int f_sylow, int f_group_table, int f_classes, int verbose_level)
void report(std::ostream &fp, int f_sylow, int f_group_table, int f_conjugacy_classes_and_normalizers, graphics::layered_graph_draw_options *LG_Draw_options, int verbose_level)
void init_singer_group_and_frobenius(int singer_power, int verbose_level)
data_structures_groups::vector_ge * nice_gens
Definition: groups.h:266
void init_singer_group(int singer_power, int verbose_level)
void init_subgroup_from_file(std::string &subgroup_fname, std::string &subgroup_label, int verbose_level)
void init_subgroup_by_generators(std::string &subgroup_label, std::string &subgroup_order_text, int nb_subgroup_generators, int *subgroup_generators_data, int verbose_level)
void init_orthogonal_group(int epsilon, int verbose_level)
void init_subfield_structure_action(int s, int verbose_level)
a matrix group over a finite field in projective, vector space or affine action
Definition: groups.h:318
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
void group_order(ring_theory::longinteger_object &go)
Definition: sims.cpp:951
void create_group_table(int *&Table, long int &n, int verbose_level)
void print_all_group_elements_tex(std::ostream &ost)
Definition: sims_io.cpp:474
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void generators_for_the_monomial_group(actions::action *A, matrix_group *Mtx, int verbose_level)
void Janko1(actions::action *A, field_theory::finite_field *F, int verbose_level)
void init_linear_group_from_scratch(actions::action *&A, field_theory::finite_field *F, int n, linear_group_description *Descr, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
void exterior_square(actions::action *A_detached, strong_generators *SG_original, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
void generators_for_the_orthogonal_group(actions::action *A, field_theory::finite_field *F, int n, int epsilon, int f_semilinear, int verbose_level)
void read_file(actions::action *A, std::string &fname, int verbose_level)
void export_magma(actions::action *A, std::ostream &ost, int verbose_level)
void generators_for_the_null_polarity_group(actions::action *A, matrix_group *Mtx, int verbose_level)
void generators_for_the_identity_subgroup(actions::action *A_linear, matrix_group *Mtx, int verbose_level)
void generators_for_the_singer_cycle(actions::action *A, matrix_group *Mtx, int power_of_singer, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
void generators_for_the_diagonal_group(actions::action *A, matrix_group *Mtx, int verbose_level)
void field_reduction(actions::action *Aq, int n, int s, field_theory::finite_field *Fq, int verbose_level)
void generators_for_the_singer_cycle_and_the_Frobenius(actions::action *A, matrix_group *Mtx, int power_of_singer, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
void init_subgroup_by_generators(actions::action *A, int nb_subgroup_gens, int *subgroup_gens, std::string &subgroup_order_text, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
void generators_for_the_borel_subgroup_upper(actions::action *A_linear, matrix_group *Mtx, int verbose_level)
void generators_for_symplectic_group(actions::action *A, matrix_group *Mtx, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
The Sylow structure of a finite group.
Definition: groups.h:2068
the wreath product group GL(d,q) wreath Sym(n)
Definition: groups.h:2093
induced action on the grassmannian (subspaces of a fixed dimension of a vectors space)
void init(actions::action &A, geometry::grassmann *G, int verbose_level)
#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 NEW_int(n)
Definition: foundations.h:625
#define Int_matrix_print(A, B, C)
Definition: foundations.h:707
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define EVEN(x)
Definition: foundations.h:221
#define NEW_lint(n)
Definition: foundations.h:628
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects
induced_actions::action_on_wedge_product * AW
induced_actions::action_by_representation * Rep