Orbiter 2022
Combinatorial Objects
group_theoretic_activity.cpp
Go to the documentation of this file.
1/*
2 * group_theoretic_activity.cpp
3 *
4 * Created on: May 5, 2020
5 * Author: betten
6 */
7
8
9
10
11
12
13#include "orbiter.h"
14
15using namespace std;
16
17namespace orbiter {
18namespace layer5_applications {
19namespace apps_algebra {
20
21
23{
24 Descr = NULL;
25
26 AG = NULL;
27
28 A1 = NULL;
29 A2 = NULL;
30
31}
32
34{
35
36}
37
38
40 any_group *AG,
41 int verbose_level)
42{
43 int f_v = (verbose_level >= 1);
44
45 if (f_v) {
46 cout << "group_theoretic_activity::init_group" << endl;
47 }
48
51
52
53 A1 = AG->A_base;
54 A2 = AG->A;
55
56 if (f_v) {
57 cout << "group_theoretic_activity::init_group A1 = " << A1->label << endl;
58 cout << "group_theoretic_activity::init_group A2 = " << A2->label << endl;
59 }
60
61 if (f_v) {
62 cout << "group_theoretic_activity::init_group done" << endl;
63 }
64}
65
66
67
69{
70 int f_v = (verbose_level >= 1);
71
72 if (f_v) {
73 cout << "group_theoretic_activity::perform_activity" << endl;
74 }
75
76
77 if (Descr->f_multiply) {
78 multiply(verbose_level);
79 }
80
81 if (Descr->f_inverse) {
82 inverse(verbose_level);
83 }
84
86 raise_to_the_power(verbose_level);
87 }
88
90 AG->do_export_orbiter(A2, verbose_level);
91 }
92
93 if (Descr->f_export_gap) {
94 AG->do_export_gap(verbose_level);
95 }
96
97 if (Descr->f_export_magma) {
98 AG->do_export_magma(verbose_level);
99 }
100
103 }
104
106 AG->classes_based_on_normal_form(verbose_level);
107 }
108
109 if (Descr->f_classes) {
110 AG->classes(verbose_level);
111 }
112
113 if (Descr->f_group_table) {
114 AG->create_group_table(verbose_level);
115 }
116
117 if (Descr->f_normalizer) {
118 AG->normalizer(verbose_level);
119 }
120
123 Descr->element_description_text, verbose_level);
124 }
125
128 Descr->element_description_text, verbose_level);
129 }
134 verbose_level);
135 }
136
137
138
141 Descr->element_description_text, verbose_level);
142 }
143
144 if (Descr->f_find_subgroup) {
146 }
147
148
149
150
151
152 if (Descr->f_report) {
153
154 if (!orbiter_kernel_system::Orbiter->f_draw_options) {
155 cout << "for a report of the group, please use -draw_options" << endl;
156 exit(1);
157 }
158
160 orbiter_kernel_system::Orbiter->draw_options,
162 verbose_level);
163
164 }
165
166 if (Descr->f_print_elements) {
167 AG->print_elements(verbose_level);
168 }
169
171
173 verbose_level);
174 }
175
177
180 verbose_level);
181 }
182
185 }
186
192 TRUE, verbose_level);
193 }
199 FALSE, verbose_level);
200 }
202
203
208 verbose_level);
209 }
210
211
213 AG->find_singer_cycle(verbose_level);
214 }
217 }
218
223 verbose_level);
224
225 }
226
227 if (Descr->f_element_rank) {
228 AG->element_rank(Descr->element_rank_data, verbose_level);
229 }
230 if (Descr->f_element_unrank) {
231 AG->element_unrank(Descr->element_unrank_data, verbose_level);
232 }
235 }
238 }
239
240
241
247 verbose_level);
248 }
249
252 }
253
254 if (Descr->f_orbit_of) {
255 AG->orbit_of(Descr->orbit_of_point_idx, verbose_level);
256 }
257 else if (Descr->f_orbits_on_subsets) {
258
260
262 Control = Descr->Control;
263 }
264 else {
265 cout << "please use option -poset_classification_control" << endl;
266 exit(1);
267 //Control = NEW_OBJECT(poset_classification_control);
268 }
269
271
272 AG->orbits_on_subsets(Control, PC,
273 Descr->orbits_on_subsets_size, verbose_level);
274
275 FREE_OBJECT(PC);
276 }
277
278 // generic orbits on points or subspaces:
279
280 else if (Descr->f_orbits_on_points) {
281
282 if (f_v) {
283 cout << "group_theoretic_activity::perform_activity f_orbits_on_points" << endl;
284 }
285
286
288
289 if (f_v) {
290 cout << "group_theoretic_activity::perform_activity before AG->orbits_on_points" << endl;
291 }
292
293 AG->orbits_on_points(Orb, verbose_level);
294
295 if (f_v) {
296 cout << "group_theoretic_activity::perform_activity after AG->orbits_on_points" << endl;
297 }
298
299
300 if (Descr->f_stabilizer) {
301
302 int orbit_idx = 0;
303
304 if (f_v) {
305 cout << "group_theoretic_activity::perform_activity before Orb->stabilizer_of" << endl;
306 }
307 Orb->stabilizer_of(orbit_idx, verbose_level);
308 if (f_v) {
309 cout << "group_theoretic_activity::perform_activity after Orb->stabilizer_of" << endl;
310 }
311 }
312
314
316
317 if (f_v) {
318 cout << "group_theoretic_activity::perform_activity before Orb->stabilizer_of" << endl;
319 }
320 Orb->stabilizer_of(orbit_idx, verbose_level);
321 if (f_v) {
322 cout << "group_theoretic_activity::perform_activity after Orb->stabilizer_of" << endl;
323 }
324 }
325
326
327 if (Descr->f_report) {
328
329 Orb->create_latex_report(verbose_level);
330
331 }
332
333 if (Descr->f_export_trees) {
334 string fname_tree_mask;
335 int orbit_idx;
336
337 fname_tree_mask.assign(A2->label);
338 fname_tree_mask.append("_%d.layered_graph");
339
340 for (orbit_idx = 0; orbit_idx < Orb->Sch->nb_orbits; orbit_idx++) {
341 cout << "orbit " << orbit_idx << " / " << Orb->Sch->nb_orbits
342 << " before Sch->export_tree_as_layered_graph" << endl;
343 Orb->Sch->export_tree_as_layered_graph(0 /* orbit_no */,
344 fname_tree_mask,
345 verbose_level - 1);
346 }
347 }
348
349 FREE_OBJECT(Orb);
350
351 }
352 else if (Descr->f_orbits_on_subspaces) {
353
355 cout << "please use option -poset_classification_control descr -end" << endl;
356 exit(1);
357 }
358
360 }
363 }
364
365
366
367
368
369 // classification of:
370
371
372 // linear codes:
373
374
375 if (Descr->f_linear_codes) {
376
378 cout << "Please use option -poset_classification_control <descr> -end" << endl;
379 exit(1);
380 }
381
383 Descr->Control,
385 Descr->linear_codes_target_size, verbose_level);
386 }
387
388
389
390
391
392
393
394
395
396
397
398
399 // tensors:
400
401 else if (Descr->f_tensor_classify) {
403 cout << "please use option -poset_classification_control descr -end" << endl;
404 exit(1);
405 }
406
408
409 }
410 else if (Descr->f_tensor_permutations) {
411 AG->do_tensor_permutations(verbose_level);
412 }
413
414
415 else if (Descr->f_classify_ovoids) {
417 }
418
419
420
421 else if (Descr->f_orbits_on_polynomials) {
422
424
425
428 cout << "please use -draw_options ... -end" << endl;
429 exit(1);
430 }
431
432 if (!AG->f_linear_group) {
433 cout << "Descr->f_orbits_on_polynomials group must be linear" << endl;
434 exit(1);
435 }
436
438 AG->LG,
445 verbose_level);
446 }
447
449
451
452 if (!AG->f_linear_group) {
453 cout << "Descr->f_representation_on_polynomials group must be linear" << endl;
454 exit(1);
455 }
456
458 AG->LG,
460 verbose_level);
461 }
462
466 FALSE /* f_Fano */, FALSE /* f_arcs */, FALSE /* f_depth */, 0 /* depth */,
468 verbose_level);
469 }
470
471
472 if (f_v) {
473 cout << "group_theoretic_activity::perform_activity done" << endl;
474 }
475}
476
477
478
479
481{
482 int f_v = (verbose_level >= 1);
483
484 if (f_v) {
485 cout << "group_theoretic_activity::multiply" << endl;
486 }
487
489 Descr->multiply_b, verbose_level);
490
491 if (f_v) {
492 cout << "group_theoretic_activity::multiply done" << endl;
493 }
494}
495
497{
498 int f_v = (verbose_level >= 1);
499
500 if (f_v) {
501 cout << "group_theoretic_activity::inverse" << endl;
502 }
503
504 A1->inverse_based_on_text(Descr->inverse_a, verbose_level);
505
506 if (f_v) {
507 cout << "group_theoretic_activity::inverse done" << endl;
508 }
509}
510
512{
513 int f_v = (verbose_level >= 1);
514
515 if (f_v) {
516 cout << "group_theoretic_activity::raise_to_the_power" << endl;
517 }
518
521
522 if (f_v) {
523 cout << "group_theoretic_activity::raise_to_the_power done" << endl;
524 }
525}
526
527
528
529
530
531
532#if 0
533void group_theoretic_activity::search_subgroup(int verbose_level)
534{
535 int f_v = (verbose_level >= 1);
536
537 if (f_v) {
538 cout << "group_theoretic_activity::search_subgroup" << endl;
539 }
540 sims *H;
541
542 //G = LG->initial_strong_gens->create_sims(verbose_level);
543 H = LG->Strong_gens->create_sims(verbose_level);
544
545 //cout << "group order G = " << G->group_order_int() << endl;
546 cout << "group order H = " << H->group_order_lint() << endl;
547
548 int *Elt;
549 longinteger_object go;
550 int i, cnt;
551
552 Elt = NEW_int(A1->elt_size_in_int);
553 H->group_order(go);
554
555 cnt = 0;
556 for (i = 0; i < go.as_int(); i++) {
557 H->element_unrank_lint(i, Elt);
558
559 #if 0
560 cout << "Element " << setw(5) << i << " / "
561 << go.as_int() << ":" << endl;
562 A->element_print(Elt, cout);
563 cout << endl;
564 A->element_print_as_permutation(Elt, cout);
565 cout << endl;
566 #endif
567 if (Elt[7] == 0 && Elt[8] == 0 &&
568 Elt[11] == 0 && Elt[14] == 0 &&
569 Elt[12] == 0 && Elt[19] == 0 &&
570 Elt[22] == 0 && Elt[23] == 0) {
571 cout << "Element " << setw(5) << i << " / "
572 << go.as_int() << " = " << cnt << ":" << endl;
573 A2->element_print(Elt, cout);
574 cout << endl;
575 //A->element_print_as_permutation(Elt, cout);
576 //cout << endl;
577 cnt++;
578 }
579 }
580 cout << "we found " << cnt << " group elements of the special form" << endl;
581
582 FREE_int(Elt);
583 if (f_v) {
584 cout << "group_theoretic_activity::search_subgroup done" << endl;
585 }
586}
587#endif
588
589
591 int f_Fano, int f_arcs, int f_depth, int depth,
592 std::string &label,
593 int verbose_level)
594{
595 int f_v = (verbose_level >= 1);
596 long int *spread_elements_numeric; // do not free
597 actions::action *An;
598 actions::action *An1;
601 groups::matrix_group *M; // do not free
603
604 int f_semilinear = FALSE;
605 int n, k, q;
606
607 string stab_order;
609 int order_of_plane;
612
613 if (f_v) {
614 cout << "group_theoretic_activity::do_Andre_Bruck_Bose_construction" << endl;
615 }
616
617 An = A1;
618 An1 = A2;
620 M = An->get_matrix_group();
621 f_semilinear = An->is_semilinear_matrix_group();
622 n = An->matrix_group_dimension();
623 if (ODD(n)) {
624 cout << "group_theoretic_activity::do_Andre_Bruck_Bose_construction "
625 "dimension must be even" << endl;
626 exit(1);
627 }
628 k = n >> 1;
629 q = F->q;
630
631 if (f_v) {
632 cout << "group_theoretic_activity::do_Andre_Bruck_Bose_construction "
633 "n=" << n << " k=" << k << " q=" << q << endl;
634 }
635
636 order_of_plane = NT.i_power_j(q, k);
637
638
639 int sz;
640 //vector_ge *nice_gens;
641
642 spread_elements_numeric = K.Spread_representative(q, k, spread_no, sz);
643
644
645
646
647 An->stabilizer_of_spread_representative(q, k, spread_no,
648 gens, stab_order, verbose_level);
649
650 stab_go.create_from_base_10_string(stab_order);
651
652 if (f_v) {
653 cout << "Spread stabilizer has order " << stab_go << endl;
654 }
655
657
658 Andre->init(spread_elements_numeric, k, An, An1,
659 gens /*spread_stab_gens*/, stab_go, label, verbose_level);
660
661 Andre->create_latex_report(verbose_level);
662
663
664 if (f_Fano) {
665 char prefix[1000];
666 int nb_subplanes;
667
668 sprintf(prefix, "Fano_TP_%d_", spread_no);
669
670 Andre->classify_subplanes(prefix, verbose_level);
671
672 int target_depth;
673
674 if (f_depth) {
675 target_depth = depth;
676 }
677 else {
678 target_depth = 7;
679 }
680
681 nb_subplanes = Andre->arcs->nb_orbits_at_level(target_depth);
682
683 cout << "Translation plane " << q << "#" << spread_no << " has "
684 << nb_subplanes << " partial Fano subplanes "
685 "(up to isomorphism) at depth "
686 << target_depth << endl;
687 }
688 else if (f_arcs) {
689 char prefix[1000];
690 int nb;
691
692 int target_depth;
693
694 if (f_depth) {
695 target_depth = depth;
696 }
697 else {
698 target_depth = order_of_plane + 2;
699 // we are looking for hyperovals
700 }
701
702
703 sprintf(prefix, "Arcs_TP_%d_", spread_no);
704
705 Andre->classify_arcs(prefix, target_depth, verbose_level);
706
707
708 nb = Andre->arcs->nb_orbits_at_level(target_depth);
709
710 cout << "Translation plane " << q << "#" << spread_no << " has "
711 << nb << " Arcs of size " << target_depth
712 << " (up to isomorphism)" << endl;
713 }
714
715 FREE_OBJECT(Andre);
716 FREE_OBJECT(gens);
717 if (f_v) {
718 cout << "group_theoretic_activity::do_Andre_Bruck_Bose_construction done" << endl;
719 }
720}
721
722
723
724
725}}}
726
727
provides access to pre-computed combinatorial data in encoded form
long int * Spread_representative(int q, int k, int i, int &sz)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
void create_from_base_10_string(const char *str, int verbose_level)
a permutation group in a fixed action.
Definition: actions.h:99
void element_print(void *elt, std::ostream &ost)
Definition: action_cb.cpp:347
void inverse_based_on_text(std::string &data_A, int verbose_level)
Definition: action.cpp:3478
void raise_to_the_power_based_on_text(std::string &data_A, std::string &exponent_text, int verbose_level)
Definition: action.cpp:3575
field_theory::finite_field * matrix_group_finite_field()
Definition: action.cpp:2883
void stabilizer_of_spread_representative(int q, int k, int no, data_structures_groups::vector_ge *&gens, std::string &stab_order, int verbose_level)
Definition: action.cpp:2588
void multiply_based_on_text(std::string &data_A, std::string &data_B, int verbose_level)
Definition: action.cpp:3370
groups::matrix_group * get_matrix_group()
Definition: action.cpp:2986
a matrix group over a finite field in projective, vector space or affine action
Definition: groups.h:318
compute orbits of a group in a given action; allows file io
Definition: groups.h:492
void export_tree_as_layered_graph(int orbit_no, std::string &fname_mask, int verbose_level)
to control the behavior of the poset classification algorithm
void do_orbits_on_polynomials(groups::linear_group *LG, int degree_of_poly, int f_recognize, std::string &recognize_text, int f_draw_tree, int draw_tree_idx, graphics::layered_graph_draw_options *Opt, int verbose_level)
void representation_on_polynomials(groups::linear_group *LG, int degree_of_poly, int verbose_level)
a wrapper for linear_group and permutation_group_create
void orbit_of(int point_idx, int verbose_level)
Definition: any_group.cpp:1447
void do_tensor_classify(poset_classification::poset_classification_control *Control, int depth, int verbose_level)
void do_classify_ovoids(poset_classification::poset_classification_control *Control, apps_geometry::ovoid_classify_description *Ovoid_classify_description, int verbose_level)
void apply_elements_to_set_csv(std::string &fname1, std::string &fname2, std::string &set_text, int verbose_level)
Definition: any_group.cpp:937
void find_standard_generators(int order_a, int order_b, int order_ab, 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)
Definition: any_group.cpp:151
void element_rank(std::string &elt_data, int verbose_level)
Definition: any_group.cpp:1017
void element_unrank(std::string &rank_string, int verbose_level)
Definition: any_group.cpp:1074
void do_conjugacy_class_of_element(std::string &elt_label, std::string &elt_text, int verbose_level)
Definition: any_group.cpp:1778
void order_of_products_of_elements(std::string &Elements_text, int verbose_level)
Definition: any_group.cpp:768
void do_orbits_on_subspaces(group_theoretic_activity *GTA, poset_classification::poset_classification_control *Control, int depth, int verbose_level)
void save_elements_csv(std::string &fname, int verbose_level)
Definition: any_group.cpp:865
void do_canonical_image_GAP(std::string &input_set, int verbose_level)
Definition: any_group.cpp:313
void orbits_on_set_system_from_file(std::string &fname_csv, int number_of_columns, int first_column, int verbose_level)
Definition: any_group.cpp:1292
void centralizer(std::string &element_label, std::string &element_description_text, int verbose_level)
Definition: any_group.cpp:500
void conjugacy_class_of(std::string &rank_string, int verbose_level)
Definition: any_group.cpp:1131
void do_linear_codes(poset_classification::poset_classification_control *Control, int minimum_distance, int target_size, int verbose_level)
void do_orbits_on_group_elements_under_conjugation(std::string &fname_group_elements_coded, std::string &fname_transporter, int verbose_level)
Definition: any_group.cpp:1938
void normalizer_of_cyclic_subgroup(std::string &element_label, std::string &element_description_text, int verbose_level)
Definition: any_group.cpp:539
void do_reverse_isomorphism_exterior_square(int verbose_level)
Definition: any_group.cpp:1260
void do_export_orbiter(actions::action *A2, int verbose_level)
Definition: any_group.cpp:194
void multiply_elements_csv(std::string &fname1, std::string &fname2, std::string &fname3, int f_column_major_ordering, int verbose_level)
Definition: any_group.cpp:881
void orbits_on_subsets(poset_classification::poset_classification_control *Control, poset_classification::poset_classification *&PC, int subset_size, int verbose_level)
Definition: any_group.cpp:1567
void orbits_on_points(groups::orbits_on_something *&Orb, int verbose_level)
Definition: any_group.cpp:1532
void search_element_of_order(int order, int verbose_level)
void orbits_on_set_from_file(std::string &fname_csv, int verbose_level)
Definition: any_group.cpp:1397
void do_find_subgroups(int order_of_subgroup, int verbose_level)
Definition: any_group.cpp:578
void isomorphism_Klein_quadric(std::string &fname, int verbose_level)
void do_Andre_Bruck_Bose_construction(int spread_no, int f_Fano, int f_arcs, int f_depth, int depth, std::string &label, int verbose_level)
void init_group(group_theoretic_activity_description *Descr, any_group *AG, int verbose_level)
Andre / Bruck / Bose model of a translation plane.
Definition: spreads.h:579
poset_classification::poset_classification * arcs
Definition: spreads.h:611
void init(long int *spread_elements_numeric, int k, actions::action *An, actions::action *An1, data_structures_groups::vector_ge *spread_stab_gens, ring_theory::longinteger_object &spread_stab_go, std::string &label, int verbose_level)
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define ODD(x)
Definition: foundations.h:222
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects