Orbiter 2022
Combinatorial Objects
object_in_projective_space_with_action.cpp
Go to the documentation of this file.
1// object_in_projective_space_with_action.cpp
2//
3// Anton Betten
4//
5// December 30, 2017
6//
7//
8//
9//
10//
11
12#include "orbiter.h"
13
14using namespace std;
15
16namespace orbiter {
17namespace layer5_applications {
18namespace projective_geometry {
19
20
21
23{
24 OwCF = NULL;
25 Aut_gens = NULL;
26 ago = 0;
27 nb_rows = nb_cols = 0;
28 canonical_labeling = NULL;
29 //null();
30}
31
33{
34 freeself();
35}
36
38{
39}
40
42{
45 }
46 null();
47}
48
51 long int ago,
53 int *canonical_labeling,
54 int verbose_level)
55{
56 int f_v = (verbose_level >= 1);
57
58 if (f_v) {
59 cout << "object_in_projective_space_with_action::init" << endl;
60 }
61
62 int nb_rows, nb_cols;
63
66 verbose_level);
67
68
76 OwCF->known_ago = ago; //Aut_gens->group_order_as_lint();
77 if (f_v) {
78 cout << "object_in_projective_space_with_action::init done" << endl;
79 }
80}
81
83{
84 cout << "object_in_projective_space_with_action" << endl;
85 cout << "nb_rows=" << nb_rows << endl;
86 cout << "nb_cols=" << nb_cols << endl;
87 cout << "ago=" << ago << endl;
88}
89
91 projective_space_with_action *PA, int max_TDO_depth, int verbose_level)
92{
93 int f_v = (verbose_level >= 1);
94
95 if (f_v) {
96 cout << "object_in_projective_space_with_action::report" << endl;
97 }
98
99 if (f_v) {
100 cout << "OwCF:" << endl;
101 OwCF->print(cout);
102 }
103 if (OwCF->type != t_PAC) {
104 OwCF->print(cout);
105 }
106
107
108
111
112
113 data_structures::bitvector *Canonical_form;
114
115 int nb_r, nb_c;
116
118 nb_r, nb_c,
119 verbose_level);
120
121#if 1
122 if (f_v) {
123 cout << "projective_space_object_classifier::latex_report before Nau.set_stabilizer_of_object" << endl;
124 }
125
128
130 NO->allocate(nb_r + nb_c, verbose_level);
131
133 OwCF,
134 PA->A,
135 TRUE /* f_compute_canonical_form */, Canonical_form,
136 NO,
137 verbose_level - 2);
138
139 if (f_v) {
140 cout << "projective_space_object_classifier::latex_report after Nau.set_stabilizer_of_object" << endl;
141 }
142
143 FREE_OBJECT(NO);
144
145 SG->group_order(go);
146#endif
147
148 //if (OiP->type != t_PAC) {
149
150 OwCF->print_tex(fp);
151 fp << endl;
152 fp << "\\bigskip" << endl;
153 fp << endl;
154 // }
155
156 if (OwCF->type == t_PAC) {
157 long int *Sets;
158 int nb_sets;
159 int set_size;
160 actions::action *A_on_spreads;
161 groups::schreier *Sch;
162
163 OwCF->get_packing_as_set_system(Sets, nb_sets, set_size, verbose_level);
164
165
166 A_on_spreads = PA->A_on_lines->create_induced_action_on_sets(nb_sets,
167 set_size, Sets,
168 verbose_level);
169
170
171 Sch = SG->orbits_on_points_schreier(A_on_spreads, verbose_level);
172
173 fp << "Orbits on spreads:\\\\" << endl;
175
176
177 FREE_OBJECT(Sch);
178 FREE_OBJECT(A_on_spreads);
179 FREE_lint(Sets);
180 }
181 //int_vec_print(fp, OiP->set, OiP->sz);
182 fp << "Group order " << go << "\\\\" << endl;
183
184 //fp << "Stabilizer:" << endl;
185 //SG->print_generators_tex(fp);
186
187
188
189
190#if 0
191 if (OiP->type == t_PTS) {
192 //long int *set;
193 //int sz;
194
195 OiP->print_tex(fp);
196
197
198 cout << "printing generators in restricted action:" << endl;
199 action *A_restricted;
200
201 A_restricted = SG->A->restricted_action(OiP->set, OiP->sz,
202 verbose_level);
204 fp, A_restricted);
205 FREE_OBJECT(A_restricted);
206 }
207#endif
208
209
210 fp << "Stabilizer:\\\\" << endl;
211 SG->print_generators_tex(fp);
212
213
214#if 0
215 //fp << "Stabilizer, all elements:\\\\" << endl;
216 //SG->print_elements_ost(fp);
217 //SG->print_elements_with_special_orthogonal_action_ost(fp);
218
219 {
220 action *A_conj;
221 sims *Base_group;
222
223 Base_group = SG->create_sims(verbose_level);
224
226 Base_group, FALSE /* f_ownership */,
227 verbose_level);
228
229 fp << "Generators in conjugation action on the group itself:\\\\" << endl;
230 SG->print_with_given_action(fp, A_conj);
231
232 fp << "Elements in conjugation action on the group itself:\\\\" << endl;
233 SG->print_elements_with_given_action(fp, A_conj);
234
235 string fname_gap;
236 char str[1000];
237
238 fname_gap.assign("class_");
239
240 sprintf(str, "%d", i);
241
242 fname_gap.append(str);
243 fname_gap.append(".gap");
244
245 SG->export_permutation_group_to_GAP(fname_gap.c_str(), verbose_level);
246 schreier *Sch;
247
248 Sch = SG->orbits_on_points_schreier(A_conj, verbose_level);
249
250 fp << "Orbits on itself by conjugation:\\\\" << endl;
252
253
254 FREE_OBJECT(Sch);
255 FREE_OBJECT(A_conj);
256 FREE_OBJECT(Base_group);
257 }
258#endif
259
260
264
265
267 Enc,
268 Inc,
269 Stack,
270 verbose_level);
271 FREE_OBJECT(Enc);
272#if 0
273 cout << "set ";
274 int_vec_print(cout, OiP->set, OiP->sz);
275 cout << " go=" << go << endl;
276
277
278
279 incidence_structure *Inc;
280 partitionstack *Stack;
281
282 int Sz[1];
283 int *Subsets[1];
284
285 Sz[0] = OiP->sz;
286 Subsets[0] = OiP->set;
287
288 cout << "computing decomposition:" << endl;
289 PA->P->decomposition(1 /* nb_subsets */, Sz, Subsets,
290 Inc,
291 Stack,
292 verbose_level);
293
294#if 0
295 cout << "the decomposition is:" << endl;
297 Stack->print_classes(cout);
298#endif
299
300
301
302
303#if 0
304 fp << "canonical form: ";
305 for (i = 0; i < canonical_form_len; i++) {
306 fp << (int)canonical_form[i];
307 if (i < canonical_form_len - 1) {
308 fp << ", ";
309 }
310 }
311 fp << "\\\\" << endl;
312#endif
313#endif
314
315
317 fp, TRUE /* f_enter_math */,
318 TRUE /* f_print_subscripts */, *Stack);
319
320#if 0
322 fp, TRUE /* f_enter_math */,
323 *Stack);
324#endif
325
326
327
328 int f_refine_prev, f_refine, h;
329 int f_print_subscripts = TRUE;
330
331 f_refine_prev = TRUE;
332 for (h = 0; h < max_TDO_depth; h++) {
333 if (EVEN(h)) {
334 f_refine = Inc->refine_column_partition_safe(
335 *Stack, verbose_level - 3);
336 }
337 else {
338 f_refine = Inc->refine_row_partition_safe(
339 *Stack, verbose_level - 3);
340 }
341
342 if (f_v) {
343 cout << "incidence_structure::compute_TDO_safe "
344 "h=" << h << " after refine" << endl;
345 }
346 if (EVEN(h)) {
347 //int f_list_incidences = FALSE;
349 fp, TRUE /* f_enter_math */,
350 f_print_subscripts, *Stack);
351 //get_and_print_col_decomposition_scheme(
352 //PStack, f_list_incidences, FALSE);
353 //PStack.print_classes_points_and_lines(cout);
354 }
355 else {
356 //int f_list_incidences = FALSE;
358 fp, TRUE /* f_enter_math */,
359 f_print_subscripts, *Stack);
360 //get_and_print_row_decomposition_scheme(
361 //PStack, f_list_incidences, FALSE);
362 //PStack.print_classes_points_and_lines(cout);
363 }
364
365 if (!f_refine_prev && !f_refine) {
366 break;
367 }
368 f_refine_prev = f_refine;
369 }
370
371 cout << "Classes of the partition:\\\\" << endl;
372 Stack->print_classes_tex(fp);
373
374
375
376 //OwCF->klein(verbose_level);
377
378#if 0
379 sims *Stab;
380 int *Elt;
381 int nb_trials;
382 int max_trials = 100;
383
384 Stab = SG->create_sims(verbose_level);
385 Elt = NEW_int(PA->A->elt_size_in_int);
386
387 for (h = 0; h < fixed_structure_order_list_sz; h++) {
388 if (Stab->find_element_of_given_order_int(Elt,
389 fixed_structure_order_list[h], nb_trials, max_trials,
390 verbose_level)) {
391 fp << "We found an element of order "
392 << fixed_structure_order_list[h] << ", which is:" << endl;
393 fp << "$$" << endl;
394 PA->A->element_print_latex(Elt, fp);
395 fp << "$$" << endl;
397 Elt, fp,
398 verbose_level);
399 }
400 else {
401 fp << "We could not find an element of order "
402 << fixed_structure_order_list[h] << "\\\\" << endl;
403 }
404 }
405
406 FREE_int(Elt);
407#endif
408
409 FREE_OBJECT(SG);
410
411 FREE_OBJECT(Stack);
412 FREE_OBJECT(Inc);
413
414}
415
416}}}
417
418
encoding of combinatorial object for use with nauty
compact storage of 0/1-data as bitvectors
data structure for set partitions following Jeffrey Leon
interface for various incidence geometries
Definition: geometry.h:1099
void get_and_print_row_tactical_decomposition_scheme_tex(std::ostream &ost, int f_enter_math, int f_print_subscripts, data_structures::partitionstack &PStack)
int refine_row_partition_safe(data_structures::partitionstack &PStack, int verbose_level)
void get_and_print_decomposition_schemes(data_structures::partitionstack &PStack)
void get_and_print_tactical_decomposition_scheme_tex(std::ostream &ost, int f_enter_math, data_structures::partitionstack &PStack)
int refine_column_partition_safe(data_structures::partitionstack &PStack, int verbose_level)
void get_and_print_column_tactical_decomposition_scheme_tex(std::ostream &ost, int f_enter_math, int f_print_subscripts, data_structures::partitionstack &PStack)
a combinatorial object for which a canonical form can be computed using Nauty
Definition: geometry.h:1487
void encode_incma_and_make_decomposition(combinatorics::encoded_combinatorial_object *&Enc, incidence_structure *&Inc, data_structures::partitionstack *&Stack, int verbose_level)
void encoding_size(int &nb_rows, int &nb_cols, int verbose_level)
void get_packing_as_set_system(long int *&Sets, int &nb_sets, int &set_size, 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
void element_print_latex(void *elt, std::ostream &ost)
Definition: action_cb.cpp:364
action * restricted_action(long int *points, int nb_points, int verbose_level)
action * create_induced_action_on_sets(int nb_sets, int set_size, long int *sets, int verbose_level)
action * create_induced_action_by_conjugation(groups::sims *Base_group, int f_ownership, int verbose_level)
Interface to the graph canonization software Nauty.
Definition: actions.h:1154
groups::strong_generators * set_stabilizer_of_object(geometry::object_with_canonical_form *OwCF, action *A_linear, int f_compute_canonical_form, data_structures::bitvector *&Canonical_form, data_structures::nauty_output *&NO, int verbose_level)
Schreier trees for orbits of groups on points.
Definition: groups.h:839
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void print_elements_with_given_action(std::ostream &ost, actions::action *A2)
schreier * orbits_on_points_schreier(actions::action *A_given, int verbose_level)
void export_permutation_group_to_GAP(std::string &fname, actions::action *A2, int verbose_level)
void print_with_given_action(std::ostream &ost, actions::action *A2)
void group_order(ring_theory::longinteger_object &go)
void report(std::ostream &fp, projective_space_with_action *PA, int max_TDO_depth, int verbose_level)
void init(geometry::object_with_canonical_form *OwCF, long int ago, groups::strong_generators *Aut_gens, int *canonical_labeling, int verbose_level)
projective space PG(n,q) with automorphism group PGGL(n+1,q)
#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 EVEN(x)
Definition: foundations.h:221
#define FREE_lint(p)
Definition: foundations.h:642
the orbiter library for the classification of combinatorial objects