Orbiter 2022
Combinatorial Objects
surface_study.cpp
Go to the documentation of this file.
1/*
2 * surface_study.cpp
3 *
4 * Created on: Nov 6, 2019
5 * Author: anton
6 *
7 * originally created on September 12, 2016
8 */
9
10
11
12
13#include "orbiter.h"
14
15using namespace std;
16
17
18namespace orbiter {
19namespace layer5_applications {
20namespace applications_in_algebraic_geometry {
21namespace cubic_surfaces_in_general {
22
23
24
25static void move_point_set(actions::action *A2,
27 long int *Pts, int nb_pts,
28 int *Elt,
30 int verbose_level);
31static void matrix_entry_print(long int *p,
32 int m, int n, int i, int j, int val,
33 std::string &output, void *data);
34
35
36
37void surface_study::init(field_theory::finite_field *F, int nb, int verbose_level)
38{
39 int f_v = (verbose_level >= 1);
40
41 if (f_v) {
42 cout << "surface_study::init" << endl;
43 }
44 q = F->q;
45 cout << "q=" << q << endl;
46 cout << "nb=" << nb << endl;
47
48
49 int i;
52
53
54 char str_q[1000];
55 char str_nb[1000];
56
57 sprintf(str_q, "%d", q);
58 sprintf(str_nb, "%d", nb);
59
60 prefix.assign("surface_q");
61 prefix.append(str_q);
62 prefix.append("_nb");
63 prefix.append(str_nb);
64
65
66
67
69
70 if (f_v) {
71 cout << "surface_study::init initializing surface" << endl;
72 }
73 Surf->init(F, verbose_level);
74 if (f_v) {
75 cout << "surface_study::init initializing surface done" << endl;
76 }
77
79 cout << "surface_study::init nb_lines_PG_3 = " << nb_lines_PG_3 << endl;
80
81
82
83 if (NT.is_prime(q)) {
85 }
86 else {
88 }
89
90 cout << "creating linear group" << endl;
92
94
96 F, 4,
97 TRUE /*f_projective*/,
98 FALSE /* f_general*/,
99 FALSE /* f_affine */,
100 f_semilinear, FALSE /* f_special */,
101 nice_gens,
102 0 /*verbose_level*/);
103
104 S = A->Strong_gens->create_sims(verbose_level - 2);
105 FREE_OBJECT(nice_gens);
106 cout << "creating linear group done" << endl;
107
108 cout << "creating action on lines" << endl;
109 A2 = A->induced_action_on_grassmannian(2, verbose_level);
110 cout << "creating action on lines done" << endl;
111
112 coeff = NEW_int(20);
113
114 //nb_reps = cubic_surface_nb_reps(q);
116 // rep is the vector of 20 coefficients
117
118 //six = cubic_surface_single_six(q, nb);
121
123
124 cout << "The lines are: ";
125 Lint_vec_print(cout, Lines, 27);
126 cout << endl;
127
128
129 cout << "q=" << q << " nb=" << nb; // << " six=";
130 //int_vec_print(cout, six, 6);
131 cout << " coeff=";
132 Int_vec_print(cout, rep, 20);
133 cout << endl;
134
135 cout << "stab_gens for a group of order " << stab_order << ":" << endl;
136 for (i = 0; i < nb_gens; i++) {
138 cout << endl;
139 }
140
142
143
144 SaS->init(A, A2, verbose_level);
145
146 SaS->init_data(Lines, 27, verbose_level);
147
151 verbose_level);
152
153
154 if (q == 11) {
155
156
157 cout << "q=11:" << endl;
158
159
160 //int *Elt;
161 int data1[] = {3,6,7,4,9,7,4,7,8,2,4,8,7,5,4,6};
162 int data2[] = {5,0,0,0,10,10,10,0,0,10,0,0,2,4,3,4};
163 int data3[] = { 3, 0, 0, 0, 0, 9, 0, 0, 0, 0, 3, 0, 0, 0, 0, 7};
164 int data4[] = { 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 0, 3, 7, 2, 3};
165
166
167 cout << "applying first transformation:" << endl;
168 SaS->apply_to_self_element_raw(data1, verbose_level);
169
170 cout << "applying second transformation:" << endl;
171 SaS->apply_to_self_inverse_element_raw(data2, verbose_level);
172
173 cout << "applying third transformation:" << endl;
174 SaS->apply_to_self_element_raw(data3, verbose_level);
175
176 cout << "applying fourth transformation:" << endl;
177 SaS->apply_to_self_element_raw(data4, verbose_level);
178
179
180 //equation: W^3 + 10X^2W + 10Y^2W + 10Z^2W + 7XYZ
181 // a=4, b=1, \alpha=10, \beta=7
182
183 }
184
185 if (q == 13 && nb == 0) {
186
187 cout << "q=13, nb=0:" << endl;
188
189 //int *Elt;
190 int data1[] = { 6,4,2,10,1,7,9,6,8,6,9,10,8,1,8,6};
191 int data2[] = { 1,0,0,0,0,1,0,0,0,0,4,0,2,6,7,3};
192 int data3[] = { 12,0,0,0,0,12,0,0,0,0,12,0,5,0,10,8};
193
194
195 cout << "applying first transformation:" << endl;
196 SaS->apply_to_self_element_raw(data1, verbose_level);
197
198 cout << "applying second transformation:" << endl;
199 SaS->apply_to_self_element_raw(data2, verbose_level);
200
201 cout << "applying third transformation:" << endl;
202 SaS->apply_to_self_element_raw(data3, verbose_level);
203
204 }
205
206 if (q == 13 && nb == 1) {
207
208 cout << "q=13, nb=1:" << endl;
209
210 //int *Elt;
211 int data1[] = {2, 9, 3, 7, 10, 8, 12, 4, 10, 1, 11, 10, 3, 10, 12, 5 };
212 int data2[] = {6, 0, 0, 0, 0, 6, 0, 0, 8, 8, 8, 0, 9, 6, 8, 8};
213 int data3[] = { 6, 0, 0, 0, 0, 3, 0, 0, 0, 0, 12, 0, 0, 0, 0, 11};
214 int data4[] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 12, 0, 11, 12, 9, 6};
215
216#if 1
217 cout << "applying first transformation:" << endl;
218 SaS->apply_to_self_element_raw(data1, verbose_level);
219
220 cout << "applying second transformation:" << endl;
221 SaS->apply_to_self_inverse_element_raw(data2, verbose_level);
222
223 cout << "applying third transformation:" << endl;
224 SaS->apply_to_self_element_raw(data3, verbose_level);
225
226 cout << "applying fourth transformation:" << endl;
227 SaS->apply_to_self_element_raw(data4, verbose_level);
228
229 //equation: W^3 + 12X^2W + 12Y^2W + 12Z^2W + XYZ
230#endif
231 }
232
233
234 if (q == 17 && nb == 0) {
235
236 cout << "q=17, nb=0:" << endl;
237
238 //int *Elt;
239 int data1[] = {9, 3, 13, 5, 11, 1, 1, 0, 11, 1, 6, 15, 16, 14, 5, 4};
240 int data2[] = {16, 0, 0, 0, 0, 15, 0, 0, 14, 14, 14, 0, 8, 7, 9, 8};
241 int data3[] = { 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 8, 0, 0, 4, 0, 1};
242 int data4[] = { 0, 6, 0, 0, 6, 0, 0, 0, 0, 0, 11, 0, 1, 4, 0, 6};
243
244
245 cout << "applying first transformation:" << endl;
246 SaS->apply_to_self_element_raw(data1, verbose_level);
247
248 cout << "applying second transformation:" << endl;
249 SaS->apply_to_self_inverse_element_raw(data2, verbose_level);
250
251 cout << "applying third transformation:" << endl;
252 SaS->apply_to_self_element_raw(data3, verbose_level);
253
254 cout << "applying fourth transformation:" << endl;
255 SaS->apply_to_self_element_raw(data4, verbose_level);
256
257 //equation: W^3 + 16X^2W + 16Y^2W + 16Z^2W + 5XYZ
258
259 }
260 if (q == 17 && nb == 2) {
261
262 cout << "q=17, nb=2:" << endl;
263
264 //int *Elt;
265 int data1[] = {14, 11, 14, 15, 7, 12, 8, 14, 9, 1, 11, 16, 13, 13, 1, 6};
266 int data2[] = {16, 0, 0, 0, 0, 15, 0, 0, 14, 14, 14, 0, 8, 7, 9, 8 };
267 int data3[] = { 6, 0, 0, 0, 0, 15, 0, 0, 0, 0, 7, 0, 0, 0, 0, 8};
268 int data4[] = { 16, 0, 0, 0, 0, 1, 0, 0, 0, 0, 16, 0, 12, 6, 14, 15};
269
270
271 cout << "applying first transformation:" << endl;
272 SaS->apply_to_self_element_raw(data1, verbose_level);
273
274 cout << "applying second transformation:" << endl;
275 SaS->apply_to_self_inverse_element_raw(data2, verbose_level);
276
277 cout << "applying third transformation:" << endl;
278 SaS->apply_to_self_element_raw(data3, verbose_level);
279
280 cout << "applying fourth transformation:" << endl;
281 SaS->apply_to_self_element_raw(data4, verbose_level);
282
283 //equation: W^3 + 8X^2W + 8Y^2W + 8Z^2W + 12XYZ
284
285 }
286 if (q == 17 && nb == 6) {
287
288 cout << "q=17, nb=6:" << endl;
289
290 int data1[] = {16, 10, 13, 9, 4, 13, 2, 1, 2, 3, 12, 7, 4, 6, 3, 9};
291 int data2[] = {16, 0, 0, 0, 0, 15, 0, 0, 14, 14, 14, 0, 8, 7, 9, 8};
292 int data3[] = { 7, 0, 0, 0, 0, 6, 0, 0, 0, 0, 7, 0, 0, 0, 0, 9};
293 int data4[] = { 0, 0, 16, 0, 16, 0, 0, 0, 0, 1, 0, 0, 7, 8, 1, 14};
294
295 cout << "applying first transformation:" << endl;
296 SaS->apply_to_self_element_raw(data1, verbose_level);
297
298 cout << "applying second transformation:" << endl;
299 SaS->apply_to_self_inverse_element_raw(data2, verbose_level);
300
301 cout << "applying third transformation:" << endl;
302 SaS->apply_to_self_element_raw(data3, verbose_level);
303
304
305 cout << "applying fourth transformation:" << endl;
306 SaS->apply_to_self_element_raw(data4, verbose_level);
307
308
309 //equation: W^3 + 16X^2W + 16Y^2W + 16Z^2W + 11XYZ
310
311 }
312
313
314
315
317 SaS->sz, SaS->data, coeff,
318 0 /* verbose_level */);
320 cout << "coefficient vector of the surface: ";
321 Int_vec_print(cout, coeff, 20);
322 cout << endl;
323 cout << "equation: ";
324 Surf->print_equation(cout, coeff);
325 cout << endl;
326
327
329 SaS->data /* Lines */,
330 0 /* verbose_level */);
331}
332
333
335{
336 int f_v = (verbose_level >= 1);
338
339 if (f_v) {
340 cout << "surface_study::study_intersection_points" << endl;
341 }
342
343
344 int *Adj;
345 //int *R;
346 long int *Intersection_pt;
347 int line_labels[27];
348 int fst[1];
349 int len[1];
350 int i;
351 fst[0] = 0;
352 len[0] = 27;
353
354 for (i = 0; i < 27; i++) {
355 line_labels[i] = i;
356 }
357
359 Adj, SaS->data, SaS->sz, verbose_level);
360 cout << "The adjacency matrix is:" << endl;
362
365 verbose_level);
366
367 cout << "The intersection points are:" << endl;
369
370
371 string fname_intersection_pts;
372 string fname_intersection_pts_tex;
373
374 fname_intersection_pts.assign(prefix);
375 fname_intersection_pts.append("_intersection_points0.csv");
376
377 fname_intersection_pts_tex.assign(prefix);
378 fname_intersection_pts_tex.append("_intersection_points0.tex");
379
380
381 Fio.lint_matrix_write_csv(fname_intersection_pts,
383 cout << "Written file " << fname_intersection_pts
384 << " of size " << Fio.file_size(fname_intersection_pts) << endl;
385
386 {
387 ofstream fp(fname_intersection_pts_tex);
389
390 L.head_easy(fp);
391 //latex_head_easy_sideways(fp);
392 fp << "{\\tiny \\arraycolsep=1pt" << endl;
393 fp << "$$" << endl;
396 line_labels, line_labels,
397 fst, len, 1,
398 fst, len, 1,
399 matrix_entry_print, (void *) Surf,
400 TRUE /* f_tex */);
401 fp << "$$}" << endl;
402 L.foot(fp);
403 }
404 cout << "Written file " << fname_intersection_pts_tex
405 << " of size " << Fio.file_size(fname_intersection_pts_tex) << endl;
406 FREE_int(Adj);
407 //FREE_int(R);
409
410 if (f_v) {
411 cout << "surface_study::study_intersection_points done" << endl;
412 }
413}
414
415
416
417
418
419
420
421#if 0
422 int *Pts;
423 int nb_pts;
424 int a, b;
425
426 nb_pts = SaS->sz;
427 Pts = NEW_int(nb_pts);
428 for (i = 0; i < nb_pts; i++) {
429 a = SaS->data[i];
430 b = Klein->Line_to_point_on_quadric[a];
431 Pts[i] = b;
432 }
433 //compute_decomposition(O, F, Pts, nb_pts, verbose_level);
434 FREE_int(Pts);
435#endif
436
437
438
439void surface_study::study_line_orbits(int verbose_level)
440{
441 int f_v = (verbose_level >= 1);
442
443 if (f_v) {
444 cout << "surface_study::study_line_orbits" << endl;
445 }
446
447
448 cout << "rearranging by orbits:" << endl;
450 nb_orbits, 0 /* verbose_level*/);
451
452
453 cout << "after rearranging, the set is:" << endl;
454 Lint_vec_print(cout, SaS->data, SaS->sz);
455 cout << endl;
456
457 cout << "orbit_length: ";
459 cout << endl;
460
461
462
463 if (f_v) {
464 cout << "surface_study::study_line_orbits" << endl;
465 }
466}
467
468
469
470void surface_study::study_group(int verbose_level)
471{
472 int f_v = (verbose_level >= 1);
474
475 if (f_v) {
476 cout << "surface_study::study_group" << endl;
477 }
478 cout << "The elements are :" << endl;
479 //SaS->Stab->print_all_group_elements();
480
481 int *Group_elts;
482 int group_order;
483 int elt_sz;
485 int i;
486
488 Group_elts, group_order, elt_sz,
489 verbose_level);
490 SaS->Stab->group_order(go);
491
492 cout << "Group_elts:" << endl;
493 Int_matrix_print(Group_elts, group_order, elt_sz);
494 for (i = 0; i < group_order; i++) {
495 F->PG_element_normalize(Group_elts + i * elt_sz, 1, elt_sz);
496 }
497 cout << "group elements:" << endl;
498 for (i = 0; i < group_order; i++) {
500 Group_elts + i * elt_sz);
501 cout << endl;
502 }
503 cout << "Group_elts normalized from the back:" << endl;
504 for (i = 0; i < group_order; i++) {
505 F->PG_element_normalize(Group_elts + i * elt_sz, 1, elt_sz);
506 cout << "element " << i << " / " << group_order << ":" << endl;
507 Int_matrix_print(Group_elts + i * elt_sz, 4, 4);
508 }
509 //int_matrix_print(Group_elts, group_order, elt_sz);
510
511
512 if (group_order < 1000) {
513 int *Table;
514 long int n;
515
516 cout << "creating the group table:..." << endl;
517 SaS->Stab->create_group_table(Table, n, 0 /* verbose_level */);
518 //cout << "The group table is:" << endl;
519 //int_matrix_print(Table, n, n);
520
521 string fname_out;
522 char str[1000];
523
524 fname_out.assign(prefix);
525 sprintf(str, "_table_%d_%d.csv", q, nb);
526 fname_out.append(str);
527
528 Fio.int_matrix_write_csv(fname_out, Table, n, n);
529 cout << "Written file " << fname_out
530 << " of size " << Fio.file_size(fname_out) << endl;
532 prefix, SaS->Strong_gens->gens, verbose_level);
533 }
534 else {
535 cout << "We won't create the group table because "
536 "the group order is too big" << endl;
537 }
538
539
540
541 FREE_int(Group_elts);
542 if (f_v) {
543 cout << "surface_study::study_group done" << endl;
544 }
545}
546
547
548#if 0
549 int *Mtx3;
550 action *A3;
551 int h;
552 sims *PGL3;
553 vector_ge *gens;
554 Mtx3 = NEW_int(9);
555 strong_generators *Strong_gens;
556
557 cout << "creating linear group A3" << endl;
558 create_linear_group(PGL3, A3,
559 F, 3,
560 TRUE /*f_projective*/, FALSE /* f_general*/, FALSE /* f_affine */,
561 FALSE /* f_semilinear */, FALSE /* f_special */,
562 0 /*verbose_level*/);
563 cout << "creating linear group A3 done" << endl;
564 gens = NEW_OBJECT(vector_ge);
565 gens->init(A3);
566 gens->allocate(group_order);
567 for (h = 0; h < group_order; h++) {
568 for (i = 0; i < 3; i++) {
569 for (j = 0; j < 3; j++) {
570 a = Group_elts[h * elt_sz + i * 4 + j];
571 Mtx3[i * 3 + j] = a;
572 }
573 }
574 A3->make_element(gens->ith(h), Mtx3, 0 /* verbose_level */);
575 }
576 generators_to_strong_generators(A3,
577 TRUE /* f_target_go */, go,
578 gens, Strong_gens,
579 verbose_level);
580 cout << "Strong generators:" << endl;
581 Strong_gens->print_generators();
582 sims *S3;
583
584 S3 = Strong_gens->create_sims(verbose_level);
585 S3->print_all_group_elements();
586 FREE_int(Group_elts);
587 S3->table_of_group_elements_in_data_form(
588 Group_elts, group_order, elt_sz, verbose_level);
589 cout << "Group_elts:" << endl;
590 int_matrix_print(Group_elts, group_order, elt_sz);
591 for (i = 0; i < group_order; i++) {
592 PG_element_normalize(*F, Group_elts + i * elt_sz, 1, elt_sz);
593 }
594 cout << "Group_elts normalized from the back:" << endl;
595 int_matrix_print(Group_elts, group_order, elt_sz);
596
597 {
598 int *Table;
599 int n;
600
601 S3->create_group_table(Table, n, 0 /* verbose_level */);
602 cout << "The group table is:" << endl;
603 int_matrix_print(Table, n, n);
604 int_matrix_print_tex(cout, Table, n, n);
605 FREE_int(Table);
606 }
607#endif
608
609 //exit(1);
610
611
612
613
615{
616 int f_v = (verbose_level >= 1);
617
618 if (f_v) {
619 cout << "surface_study::study_orbits_on_lines" << endl;
620 }
621
622
623 cout << "creating restricted action on the set of lines" << endl;
625 SaS->data, 27, verbose_level);
626 cout << "creating restricted action on the set of lines done" << endl;
627
628
629 cout << "computing orbits on lines:" << endl;
631 A_on_lines, verbose_level);
632
633 cout << "orbits on lines:" << endl;
635
636 int f, l, b, ii, i, a;
637 int Basis[8];
638
642 cout << "The unique shortest orbit has length " << l << ":" << endl;
643 for (i = 0; i < l; i++) {
644 a = Orb->orbit[f + i];
645 b = SaS->data[a];
646 cout << i << " : " << a << " : " << b << endl;
647
648 Surf->Gr->unrank_lint_here(Basis, b, 0);
649 Int_matrix_print(Basis, 2, 4);
650 }
651
652 for (ii = 0; ii < Orb->nb_orbits; ii++) {
653 f = Orb->orbit_first[ii];
654 l = Orb->orbit_len[ii];
655 cout << "Orbit " << ii << " has length " << l << ":" << endl;
656 for (i = 0; i < l; i++) {
657 a = Orb->orbit[f + i];
658 b = SaS->data[a];
659 cout << i << " : " << a << " : " << b << endl;
660
661 Surf->Gr->unrank_lint_here(Basis, b, 0);
662 Int_matrix_print(Basis, 2, 4);
663 }
664 }
665 }
666 cout << "The unique shortest orbit on lines is orbit "
667 << shortest_line_orbit_idx << endl;
668 if (f_v) {
669 cout << "surface_study::study_orbits_on_lines" << endl;
670 }
671}
672
674{
675 int f_v = (verbose_level >= 1);
679
680 if (f_v) {
681 cout << "surface_study::study_find_eckardt_points" << endl;
682 }
683
684
685
687 Adj, SaS->data, SaS->sz, verbose_level);
688 cout << "The adjacency matrix is:" << endl;
690
691
692
694 orbit_first, orbit_length, nb_orbits, R, verbose_level);
695
696
697 cout << "The tactical decomposition scheme is:" << endl;
699
702 verbose_level);
703
704 cout << "The intersection points are:" << endl;
706
707 {
708 string fname_intersection_pts;
709 string fname_intersection_pts_tex;
710
711
712 fname_intersection_pts.append(prefix);
713 fname_intersection_pts.append("_intersection_points.csv");
714
715 fname_intersection_pts_tex.append(prefix);
716 fname_intersection_pts_tex.append("_intersection_points.tex");
717
718 Fio.lint_matrix_write_csv(fname_intersection_pts,
720 cout << "Written file " << fname_intersection_pts
721 << " of size " << Fio.file_size(fname_intersection_pts)
722 << endl;
723
724 {
725 ofstream fp(fname_intersection_pts_tex);
727
728 L.head_easy(fp);
729 //latex_head_easy_sideways(fp);
730 fp << "{\\tiny \\arraycolsep=1pt" << endl;
731 fp << "$$" << endl;
734 orbit, orbit,
737 matrix_entry_print, (void *) Surf,
738 TRUE /* f_tex */);
739 fp << "$$}" << endl;
740 L.foot(fp);
741 }
742 cout << "Written file " << fname_intersection_pts_tex
743 << " of size " << Fio.file_size(fname_intersection_pts_tex)
744 << endl;
745 }
746
747
749
751 cout << "classification of points by multiplicity:" << endl;
752 C.print_naked(TRUE);
753 cout << endl;
754
755
756
757
760 2,
761 0 /* verbose_level */);
762
764
765 cout << "We found " << nb_double_pts << " double points" << endl;
767 cout << endl;
768
769
770
771
772
775 6,
776 0 /* verbose_level */);
777 // Eckardt points appear 6 = {3 \choose 2} times in the table
778
780
781 cout << "We found " << nb_Eckardt_pts << " Eckardt points" << endl;
783 cout << endl;
784
785 if (f_v) {
786 cout << "surface_study::study_find_eckardt_points done" << endl;
787 }
788}
789
790
791
792
794{
795 int f_v = (verbose_level >= 1);
796
797 if (f_v) {
798 cout << "surface_study::study_surface_with_6_eckardt_points" << endl;
799 }
800
801 int i, j;
802
803 cout << "nb_Eckardt_pts = 6" << endl;
804
805 int Basis1[] = {1,0,0,0,0,1,0,0}; // Z=0
806 int Basis2[] = {1,0,0,0,0,0,1,0}; // Y=0
807 int Basis3[] = {0,1,0,0,0,0,1,0}; // X=0
808 long int desired_lines[3];
809
810 desired_lines[0] = Surf->Gr->rank_lint_here(Basis1, 0 /*verbose_level*/);
811 desired_lines[1] = Surf->Gr->rank_lint_here(Basis2, 0 /*verbose_level*/);
812 desired_lines[2] = Surf->Gr->rank_lint_here(Basis3, 0 /*verbose_level*/);
813
814 cout << "desired_lines : ";
815 Lint_vec_print(cout, desired_lines, 3);
816 cout << endl;
817
818
819 //display_all_PG_elements(3, *F);
820
821#if 0
822 action *Ar;
823 int special_lines[] = {0,1,2,4, 3,5,6,7, 10,11,8,9, 14,16,18,20, 12,13,22,23, 15,17,19,21, 24,25,26};
824 int nb_special_lines = 27;
825
826 Ar = A_on_lines->restricted_action(special_lines,
827 nb_special_lines, 0 /* verbose_level */);
828 cout << "The elements are :" << endl;
830
831#endif
832
833
834
835 long int *triangle;
836 int nb_pts_triangle;
837 long int three_points[3] = {0,1,2};
838 cout << "creating projective triangle" << endl;
840 triangle, nb_pts_triangle, three_points,
841 verbose_level);
842
843
844
845
848
849 cout << "After taking away the triangle points, "
850 "we still have " << nb_double_pts << " double points" << endl;
852 cout << endl;
853
854
857 actions::action *A_triangle;
858 actions::action *A_on_double_pts;
859 int *Elt;
860 char fname_stab[1000];
861
862 A_triangle = A->restricted_action(
863 triangle, nb_pts_triangle, 0 /* verbose_level */);
865 Triangle->init(A, A, 0 /* verbose_level */);
866 Triangle->init_data(triangle, nb_pts_triangle,
867 0 /* verbose_level */);
868
869 sprintf(fname_stab, "PGL_4_%d_Grassmann_4_2_%d_stab_gens_3_2.txt", q, q);
870 Triangle->init_stab_from_file(fname_stab, 0 /* verbose_level */);
872 A, triangle, nb_pts_triangle,
873 0 /* verbose_level */);
874 cout << "The trangle is invariant under the given group" << endl;
875
876#if 0
877 int Eckardt_pts[] = {7,12,15,24,58,91}; // these were the E-points from before. Not any more.
878 int Eckardt_pts2[] = {15,24,5,14,25,124}; // these are the n e w E-points
879 int nb_E = 6;
880#endif
881
882 Elt = NEW_int(A->elt_size_in_int);
883 cout << "before move_point_set" << endl;
884 move_point_set(A_triangle, Triangle,
886 Elt, Eckardt_stab,
887 verbose_level - 2);
888 cout << "after move_point_set" << endl;
889
890 cout << "The stabilizer of the Eckardt points is:" << endl;
891 Eckardt_stab->Strong_gens->print_generators(cout);
892 cout << "a group of order " << Eckardt_stab->target_go << endl;
893
894
895#if 0
896
897 // this is how we find the third transformation:
898
899 set_and_stabilizer_apply(SaS, Elt, FALSE, verbose_level);
900
901 cout << "The transporter is:" << endl;
902 A->print_for_make_element(cout, Elt);
903 cout << endl;
904
905 cout << "the moved set is:" << endl;
906 int_vec_print(cout, SaS->data, SaS->sz);
907 cout << endl;
908
909 cout << "this is the third transformation, stop" << endl;
910 exit(1);
911#endif
912
913
914#if 0
915 action *A_triangle_reduced;
916 int *triangle_reduced;
917 int nb_pts_triangle_reduced;
918
919 triangle_reduced = NEW_int(nb_pts_triangle);
920 int_vec_copy(triangle, triangle_reduced, nb_pts_triangle);
921 nb_pts_triangle_reduced = nb_pts_triangle;
922
923 int_vec_take_away(triangle_reduced, nb_pts_triangle_reduced,
924 Eckardt_pts2, nb_Eckardt_pts);
925
926 cout << "The triangle without Eckardt points: " << endl;
927 int_vec_print(cout, triangle_reduced, nb_pts_triangle_reduced);
928 cout << endl;
929 cout << "nb_pts_triangle_reduced=" << nb_pts_triangle_reduced << endl;
930
931 cout << "setting up A_triangle_reduced" << endl;
932 A_triangle_reduced = A->restricted_action(
933 triangle_reduced, nb_pts_triangle_reduced,
934 0 /* verbose_level */);
935 cout << "setting up A_triangle_reduced done" << endl;
936
937
938 Eckardt_stab->init_data(
939 triangle_reduced,
940 nb_pts_triangle_reduced,
941 0 /* verbose_level*/);
942
943 cout << "testing if the reduced set is invariant "
944 "under the stabilizer of the E-pts:" << endl;
946 A, triangle_reduced, nb_pts_triangle_reduced,
947 0 /* verbose_level */);
948
949 cout << "Yes!" << endl;
950#endif
951
952
953#if 0
954 cout << "testing if the double pts are invariant "
955 "under the stabilizer of the E-pts:" << endl;
958 0 /* verbose_level */);
959
960 cout << "Yes!" << endl;
961
962
963
964#endif
965
966
967 cout << "Creating restricted action on Double_pts:" << endl;
968 A_on_double_pts = A->restricted_action(
970 0 /* verbose_level */);
971
972 groups::schreier *Orb2;
973
974 cout << "computing orbits on double points off the triangle:" << endl;
976 A_on_double_pts, verbose_level);
977 cout << "orbits on double points off the triangle:" << endl;
978 Orb2->print_and_list_orbits(cout);
979
980
981 int idx, f, l, a, b;
982
983 if (!Orb2->find_shortest_orbit_if_unique(idx)) {
984 cout << "the shortest orbit on double points "
985 "is not unique" << endl;
986 exit(1);
987 }
988
989 f = Orb2->orbit_first[idx];
990 l = Orb2->orbit_len[idx];
991 cout << "The unique shortest orbit on double points off "
992 "the triangle has length " << l << ":" << endl;
993 for (i = 0; i < l; i++) {
994 a = Orb2->orbit[f + i];
995 b = Double_pts[a];
996 //cout << i << " : " << a << " : " << b << endl;
997 }
998
999
1000 long int *short_orbit;
1001 int short_orbit_len;
1002
1003 f = Orb2->orbit_first[idx];
1004 short_orbit_len = Orb2->orbit_len[idx];
1005 short_orbit = NEW_lint(short_orbit_len);
1006 for (i = 0; i < short_orbit_len; i++) {
1007 a = Orb2->orbit[f + i];
1008 b = Double_pts[a];
1009 short_orbit[i] = b;
1010 }
1011 Lint_vec_print(cout, short_orbit, short_orbit_len);
1012 cout << endl;
1013
1014
1015 orbit_of_sets *OS;
1016
1018 cout << "before OS->init" << endl;
1019 OS->init(A, A, short_orbit, short_orbit_len,
1020 Eckardt_stab->Strong_gens->gens, verbose_level);
1021 cout << "after OS->init" << endl;
1022
1023 long int *six_point_orbit;
1024 int six_point_orbit_length;
1025 int sz;
1026 actions::action *A_on_six_point_orbit;
1027
1028 OS->get_table_of_orbits(six_point_orbit,
1029 six_point_orbit_length, sz, verbose_level);
1030
1031 cout << "Creating action on six_point_orbit" << endl;
1032 A_on_six_point_orbit = A->create_induced_action_on_sets(
1033 six_point_orbit_length, sz, six_point_orbit,
1034 verbose_level);
1035 cout << "Creating action on six_point_orbit done" << endl;
1036
1037 groups::schreier *Orb_six_points;
1038
1039 cout << "computing orbits on set of six points:" << endl;
1040 Orb_six_points = Eckardt_stab->Strong_gens->orbit_of_one_point_schreier(
1041 A_on_six_point_orbit,
1043 verbose_level);
1044 cout << "orbits on set of six points:" << endl;
1045 Orb_six_points->print(cout);
1046 //Orb_six_points->print_and_list_orbits(cout);
1047
1048 l = Orb_six_points->orbit_len[0];
1049
1050
1051 int *Coeff;
1052
1053
1054 cout << "computing Coeff" << endl;
1055
1056 Coeff = NEW_int(l * 20);
1057 for (j = 0; j < l; j++) {
1058 if ((j % 1000) == 0) {
1059 cout << "coset " << j << " / " << l << ":" << endl;
1060 }
1061 Orb_six_points->coset_rep(j, 0 /* verbose_level */);
1062 A->element_move(Orb_six_points->cosetrep, Elt, 0);
1063
1065
1066
1067 SaS2 = SaS->create_copy(0 /* verbose_level */);
1068 SaS2->apply_to_self(Elt, 0 /* verbose_level */);
1069
1071 SaS2->data, coeff,
1072 0 /* verbose_level */);
1074
1075#if 0
1076 cout << "coefficient vector of the surface: ";
1077 int_vec_print(cout, coeff, 20);
1078 cout << endl;
1079 cout << "equation: ";
1080 Surf->print_equation(cout, coeff);
1081 cout << endl;
1082#endif
1083
1084 Int_vec_copy(coeff, Coeff + j * 20, 20);
1085
1086 FREE_OBJECT(SaS2);
1087 }
1088
1089#if 1
1090 cout << "Coeff:" << endl;
1091 for (i = 0; i < l; i++) {
1092
1093 int *co;
1094
1095 co = Coeff + i * 20;
1096 if ((co[16] == co[17]) && (co[17] == co[18])) {
1097 cout << i << " / " << l << " : ";
1098 Int_vec_print(cout, co, 20);
1099 cout << endl;
1100 }
1101 }
1102 //int_matrix_print(Coeff, l, 20);
1103#endif
1104
1105
1106
1107#if 1
1108 // this is how we find the fourth transformation:
1109
1110 if (q == 11 && nb == 0) {
1111 //j = 298;
1112 j = 4051;
1113 }
1114 else if (q == 13 && nb == 1) {
1115 j = 2963;
1116 }
1117 else if (q == 17 && nb == 0) {
1118 j = 38093;
1119 }
1120 else if (q == 17 && nb == 2) {
1121 j = 3511;
1122 }
1123 else if (q == 17 && nb == 6) {
1124 j = 39271;
1125 }
1126 else {
1127 j = -1;
1128 }
1129
1130
1131 if (j >= 0) {
1132 cout << "coset " << j << " / " << l << ":" << endl;
1133 Orb_six_points->coset_rep(j, 0 /* verbose_level */);
1134 A->element_move(Orb_six_points->cosetrep, Elt, 0);
1135
1137
1138 SaS2 = SaS->create_copy(0 /* verbose_level */);
1139
1140 SaS2->apply_to_self(Elt, verbose_level);
1141
1143 SaS2->data, coeff,
1144 0 /* verbose_level */);
1146 cout << "coefficient vector of the surface: ";
1147 Int_vec_print(cout, coeff, 20);
1148 cout << endl;
1149 cout << "equation: ";
1150 Surf->print_equation(cout, coeff);
1151 cout << endl;
1152
1153 FREE_OBJECT(SaS2);
1154 }
1155#endif
1156
1157
1158 if (f_v) {
1159 cout << "surface_study::study_surface_with_6_eckardt_points done" << endl;
1160 }
1161}
1162
1163
1164#if 0
1165
1166 if (nb_Eckardt_pts == 4) {
1167 cout << "nb_Eckardt_pts = 4" << endl;
1168
1169
1170 int Basis1[] = {1,0,0,0,0,0,1,0};
1171 int Basis2[] = {0,1,0,0,0,0,1,0};
1172 int Basis3[] = {0,0,1,0,1,1,0,0};
1173 int desired_lines[3];
1174
1175 desired_lines[0] = Surf->Gr->rank_int_here(Basis1, 0 /*verbose_level*/);
1176 desired_lines[1] = Surf->Gr->rank_int_here(Basis2, 0 /*verbose_level*/);
1177 desired_lines[2] = Surf->Gr->rank_int_here(Basis3, 0 /*verbose_level*/);
1178
1179 cout << "desired_lines : ";
1180 int_vec_print(cout, desired_lines, 3);
1181 cout << endl;
1182
1183
1184 int *pts_on_three_lines;
1185 int nb_pts_on_three_lines;
1186 int three_lines_idx[3] = {169, 30927, 352}; // this is in PG(3,13)
1187 int a, b, c, idx;
1188
1189 cout << "creating the three lines" << endl;
1190
1191 pts_on_three_lines = NEW_int(3 * (q + 1));
1192 nb_pts_on_three_lines = 0;
1193
1194 for (i = 0; i < 3; i++) {
1195 for (j = 0; j < q + 1; j++) {
1196 a = three_lines_idx[i];
1197 b = Surf->P->Lines[a * (q + 1) + j];
1198 if (int_vec_search(pts_on_three_lines,
1199 nb_pts_on_three_lines, b, idx)) {
1200 }
1201 else {
1202 for (c = nb_pts_on_three_lines; c > idx; c--) {
1203 pts_on_three_lines[c] = pts_on_three_lines[c - 1];
1204 }
1205 pts_on_three_lines[idx] = b;
1206 nb_pts_on_three_lines++;
1207 }
1208 }
1209 }
1210
1211 int_vec_take_away(
1212 pts_on_three_lines, nb_pts_on_three_lines,
1213 Eckardt_pts, nb_Eckardt_pts);
1214 cout << "After taking away the Eckardt points, we still have "
1215 << nb_pts_on_three_lines
1216 << " points on the three lines" << endl;
1217 int_vec_print_as_table(cout,
1218 pts_on_three_lines, nb_pts_on_three_lines, 10);
1219 cout << endl;
1220
1221
1222#if 1
1223 int_vec_take_away(Double_pts, nb_double_pts,
1224 pts_on_three_lines, nb_pts_on_three_lines);
1225 //int_vec_take_away(Double_pts, nb_double_pts, three_points, 3);
1226
1227 cout << "After taking away the triangle points, "
1228 "we still have " << nb_double_pts
1229 << " double points" << endl;
1230 int_vec_print_as_table(cout,
1231 Double_pts, nb_double_pts, 10);
1232 cout << endl;
1233#endif
1234
1235
1236 set_and_stabilizer *Three_lines;
1237 //set_and_stabilizer *Eckardt_stab;
1238 action *A_on_pts_on_three_lines;
1239 //int *Elt;
1240 char fname_stab[1000];
1241
1242 A_on_pts_on_three_lines = A->restricted_action(
1243 pts_on_three_lines, nb_pts_on_three_lines,
1244 0 /* verbose_level */);
1245 Three_lines = NEW_OBJECT(set_and_stabilizer);
1246 Three_lines->init(A, A, 0 /* verbose_level */);
1247 Three_lines->init_data(
1248 pts_on_three_lines, nb_pts_on_three_lines,
1249 0 /* verbose_level */);
1250
1251 sprintf(fname_stab, "PGL_4_%d_stab_gens_4_1.txt", q);
1252 cout << "Reading group from file " << fname_stab << endl;
1253 Three_lines->init_stab_from_file(fname_stab, verbose_level);
1254 Three_lines->Strong_gens->test_if_set_is_invariant_under_given_action(
1255 A,
1256 pts_on_three_lines, nb_pts_on_three_lines,
1257 0 /* verbose_level */);
1258 cout << "The points on the three lines "
1259 "are invariant under the given group" << endl;
1260
1261 //int interesting_points[6] = {25,20,133,68,72,142};
1262 int interesting_points[6] = {17,28,29,172,30,184};
1263 int interesting_pt_idx[6];
1264
1265 for (i = 0; i < 6; i++) {
1266 if (!int_vec_search(
1267 pts_on_three_lines, nb_pts_on_three_lines,
1268 interesting_points[i], idx)) {
1269 cout << "could not find interesting point" << endl;
1270 exit(1);
1271 }
1272 interesting_pt_idx[i] = idx;
1273 }
1274 cout << "interesting_points: ";
1275 int_vec_print(cout, interesting_points, 6);
1276 cout << endl;
1277 cout << "interesting_pt_idx: ";
1278 int_vec_print(cout, interesting_pt_idx, 6);
1279 cout << endl;
1280
1281 set_and_stabilizer *Interesting_pts_stab;
1282 int *Elt;
1283 char fname_stabilizer_stage_two[1000];
1284 char fname_stabilizer_stage_three[1000];
1285
1286 sprintf(fname_stabilizer_stage_two, "%s_stage2_stab.txt", prefix);
1287 sprintf(fname_stabilizer_stage_three, "%s_stage3_stab.txt", prefix);
1288 Elt = NEW_int(A->elt_size_in_int);
1289
1290
1291#if 0
1292 move_point_set(A_on_pts_on_three_lines, Three_lines,
1293 interesting_points, 6, Elt, Interesting_pts_stab, verbose_level);
1294
1295 cout << "Writing generators to file "
1296 << fname_stabilizer_stage_two << endl;
1297 Interesting_pts_stab->Strong_gens->print_generators_in_source_code_to_file(
1298 fname_stabilizer_stage_two);
1299 cout << "Written file " << fname_stabilizer_stage_two
1300 << " of size " << file_size(fname_stabilizer_stage_two) << endl;
1301 exit(1);
1302#else
1303 cout << "Reading generators from file "
1304 << fname_stabilizer_stage_two << endl;
1305 Interesting_pts_stab = NEW_OBJECT(set_and_stabilizer);
1306 Interesting_pts_stab->init(A, A, 0 /* verbose_level*/);
1307 Interesting_pts_stab->init_stab_from_file(
1308 fname_stabilizer_stage_two, verbose_level);
1309 cout << "Generators are:" << endl;
1310 Interesting_pts_stab->Strong_gens->print_generators_tex();
1311#endif
1312
1313
1314
1315
1316 //int stage3_points[3] = {1878,1883,1948};
1317 int stage3_points[3] = {3,185,198};
1318
1319 schreier *Orb3;
1320
1321 Orb3 = Interesting_pts_stab->Strong_gens->orbits_on_points_schreier(
1322 A, verbose_level);
1323 cout << "orbits in stage3:" << endl;
1324 Orb3->print_and_list_orbits(cout);
1325
1326
1327 int *set;
1328 int sz;
1329 int orbit_idx;
1330
1331 set = NEW_int(A->degree);
1332 orbit_idx = Orb3->orbit_number(stage3_points[0]);
1333 Orb3->get_orbit(orbit_idx, set, sz, 0 /* verbose_level */);
1334
1335 int_vec_heapsort(set, sz);
1336
1337 cout << "We will consider the set of size " << sz << ":" << endl;
1338 int_vec_print_as_table(cout, set, sz, 25);
1339 cout << endl;
1340
1341 action *A_on_stage3_set;
1342
1343 cout << "Creating restricted action on Stage 3 set:" << endl;
1344 A_on_stage3_set = A->restricted_action(
1345 set, sz, 0 /* verbose_level */);
1346
1347 set_and_stabilizer *Stage3_set;
1348
1349 Stage3_set = NEW_OBJECT(set_and_stabilizer);
1350 Stage3_set->init(A, A, 0 /* verbose_level */);
1351 Stage3_set->init_data(set, sz, 0 /* verbose_level */);
1352
1353 cout << "Reading group from file "
1354 << fname_stabilizer_stage_two << endl;
1355 Stage3_set->init_stab_from_file(
1356 fname_stabilizer_stage_two, verbose_level);
1357 Stage3_set->Strong_gens->test_if_set_is_invariant_under_given_action(
1358 A,
1359 set, sz, 0 /* verbose_level */);
1360 cout << "The points on the three lines are invariant "
1361 "under the given group" << endl;
1362
1363
1364
1365 set_and_stabilizer *Stage3_Interesting_pts_stab;
1366
1367
1368 cout << "before move_point_set" << endl;
1369 move_point_set(A_on_stage3_set, Stage3_set,
1370 stage3_points, 3, Elt, Stage3_Interesting_pts_stab,
1371 verbose_level - 2);
1372 cout << "after move_point_set" << endl;
1373
1374 cout << "Writing generators to file "
1375 << fname_stabilizer_stage_three << endl;
1376 Stage3_Interesting_pts_stab->Strong_gens->print_generators_in_source_code_to_file(
1377 fname_stabilizer_stage_three);
1378 cout << "Written file " << fname_stabilizer_stage_three
1379 << " of size " << file_size(fname_stabilizer_stage_three)
1380 << endl;
1381
1382 cout << "Generators are:" << endl;
1383 Stage3_Interesting_pts_stab->Strong_gens->print_generators_tex();
1384
1385 {
1386 char fname_intersection_pts[1000];
1387 char fname_intersection_pts_tex[1000];
1388 sprintf(fname_intersection_pts,
1389 "%s_intersection_points3.csv", prefix);
1390 sprintf(fname_intersection_pts_tex,
1391 "%s_intersection_points3.tex", prefix);
1392
1393 int_matrix_write_csv(fname_intersection_pts,
1394 Intersection_pt, SaS->sz, SaS->sz);
1395 cout << "Written file " << fname_intersection_pts
1396 << " of size " << file_size(fname_intersection_pts) << endl;
1397 {
1398 ofstream fp(fname_intersection_pts_tex);
1399 latex_head_easy(fp);
1400 //latex_head_easy_sideways(fp);
1401 fp << "{\\tiny \\arraycolsep=1pt" << endl;
1402 fp << "$$" << endl;
1403 int_matrix_print_with_labels_and_partition(fp,
1404 Intersection_pt, SaS->sz, SaS->sz,
1405 orbit, orbit,
1406 Orb->orbit_first, Orb->orbit_len, Orb->nb_orbits,
1407 Orb->orbit_first, Orb->orbit_len, Orb->nb_orbits,
1408 matrix_entry_print, (void *) Surf,
1409 TRUE /* f_tex */);
1410 fp << "$$}" << endl;
1411 latex_foot(fp);
1412 }
1413 cout << "Written file " << fname_intersection_pts_tex
1414 << " of size "
1415 << file_size(fname_intersection_pts_tex) << endl;
1416 }
1417
1418
1419 }
1420
1421 else if (nb_Eckardt_pts == 6) {
1422
1423
1424 } // nb_E = 6
1425
1426
1427
1428 //FREE_int(Elt);
1429
1430 FREE_int(Eckardt_pts);
1431 FREE_int(Double_pts);
1432 FREE_int(R);
1433 FREE_int(Adj);
1434 FREE_int(orbit_first);
1435 FREE_int(orbit_length);
1436 FREE_OBJECT(SaS);
1437 FREE_OBJECT(A_on_lines);
1438
1439 FREE_int(coeff);
1440 FREE_OBJECT(S);
1441 FREE_OBJECT(A2);
1442 FREE_OBJECT(A);
1443
1444 FREE_OBJECT(Surf);
1445 FREE_OBJECT(F);
1446}
1447
1448
1449
1450void compute_decomposition(orthogonal *O,
1451 finite_field *F, int *Pts, int nb_pts,
1452 int verbose_level)
1453{
1454 int f_v = (verbose_level >= 1);
1455
1456 if (f_v) {
1457 cout << "compute_decomposition" << endl;
1458 }
1459 int N, ht0, depth;
1460
1461 partitionstack S;
1462
1463 N = O->nb_points + O->nb_lines;
1464
1465 //O.make_initial_partition(S, verbose_level);
1466 S.allocate(N, FALSE);
1467 // split off the column class:
1468 S.subset_continguous(O->nb_points, O->nb_lines);
1469 S.split_cell(FALSE);
1470
1471 ht0 = S.ht;
1472
1473 cout << "ht = " << S.ht << endl;
1474 cout << "before S.refine_arbitrary_set" << endl;
1475 S.refine_arbitrary_set(nb_pts, Pts, verbose_level - 1);
1476 cout << "after S.refine_arbitrary_set" << endl;
1477
1478 if (f_v) {
1479 cout << "compute_decomposition before S.compute_TDO" << endl;
1480 }
1481
1482 depth = 1;
1483 S.compute_TDO(*O, ht0, -1, -1, depth, verbose_level - 2);
1484 if (f_v) {
1485 cout << "compute_decomposition after S.compute_TDO" << endl;
1486 }
1487 if (EVEN(depth)) {
1488 S.get_and_print_row_decomposition_scheme(*O, -1, -1);
1489 }
1490 else {
1491 S.get_and_print_col_decomposition_scheme(*O, -1, -1);
1492 }
1493
1494
1495 if (f_v) {
1496 cout << "compute_decomposition done" << endl;
1497 }
1498}
1499#endif
1500
1501static void move_point_set(actions::action *A2,
1503 long int *Pts, int nb_pts,
1504 int *Elt,
1506 int verbose_level)
1507{
1508 int f_v = (verbose_level >= 1);
1509
1510 if (f_v) {
1511 cout << "move_point_set" << endl;
1512 }
1516 //char prefix[1000];
1517 //int f_W = FALSE;
1518 //int f_w = FALSE;
1519 long int *data_in;
1520 long int *data_out;
1521 long int *data2;
1522 int idx, i;
1524
1525 //prefix[0] = 0;
1526
1527
1528 if (f_v) {
1529 cout << "move_point_set computing orbits "
1530 "on subsets of size " << nb_pts << endl;
1531 }
1532
1535 Poset->init_subset_lattice(
1536 Universe->A, A2,
1537 Universe->Strong_gens,
1538 verbose_level);
1539
1540
1541
1543
1545 nb_pts,
1546 //prefix,
1547 //f_W, f_w,
1548 Control,
1549 Poset,
1550 verbose_level - 2);
1551
1552 data_in = NEW_lint(nb_pts);
1553 data_out = NEW_lint(nb_pts);
1554 data2 = NEW_lint(nb_pts);
1555
1556 for (i = 0; i < nb_pts; i++) {
1557
1558 data_in[i] = Universe->find(Pts[i]);
1559
1560 }
1561
1562 if (f_v) {
1563 cout << "identifying " << nb_pts << " points:" << endl;
1564 }
1565 idx = gen->trace_set(data_in, nb_pts, nb_pts,
1566 data_out, Elt,
1567 0 /* verbose_level */);
1568
1569 if (f_v) {
1570 cout << "idx = " << idx << " data_out = ";
1571 Lint_vec_print(cout, data_out, nb_pts);
1572 cout << endl;
1573 }
1574
1575 for (i = 0; i < nb_pts; i++) {
1576 data2[i] = Universe->data[data_out[i]];
1577 }
1578
1579 if (f_v) {
1580 cout << "data2 = ";
1581 Lint_vec_print(cout, data2, nb_pts);
1582 cout << endl;
1583 }
1584
1585 if (f_v) {
1586 cout << "transporter:" << endl;
1587 Universe->A->element_print_quick(Elt, cout);
1588 cout << endl;
1589 }
1590
1591
1592
1593 new_stab = gen->get_set_and_stabilizer(
1594 nb_pts,
1595 idx /* orbit_at_level */,
1596 verbose_level);
1597
1598 if (f_v) {
1599 cout << "pulled out set and stabilizer at level "
1600 << nb_pts << " for orbit " << idx << ":" << endl;
1601 cout << "a set with a group of order "
1602 << new_stab->target_go << endl;
1603 }
1604
1605
1606 FREE_lint(data_in);
1607 FREE_lint(data_out);
1608 FREE_lint(data2);
1609 FREE_OBJECT(gen);
1610 FREE_OBJECT(Poset);
1611 FREE_OBJECT(Control);
1612
1613 if (f_v) {
1614 cout << "move_point_set done" << endl;
1615 }
1616}
1617
1618static void matrix_entry_print(long int *p,
1619 int m, int n, int i, int j, int val,
1620 std::string &output, void *data)
1621{
1623 Surf = (algebraic_geometry::surface_domain *) data;
1624 char str[1000];
1625
1626 if (i == -1) {
1627 strcpy(str, Surf->Schlaefli->Labels->Line_label_tex[val].c_str());
1628 }
1629 else if (j == -1) {
1630 strcpy(str, Surf->Schlaefli->Labels->Line_label_tex[val].c_str());
1631 }
1632 else {
1633 if (val == -1) {
1634 strcpy(str, ".");
1635 }
1636 else {
1637 sprintf(str, "%d", val);
1638 }
1639 }
1640 output.assign(str);
1641}
1642
1643
1644
1645
1646
1647}}}}
1648
1649
void rearrange_lines_according_to_double_six(long int *Lines, int verbose_level)
Picks a double six and rearranges the lines accordingly.
void compute_intersection_points(int *Adj, long int *Lines, int nb_lines, long int *&Intersection_pt, int verbose_level)
void compute_adjacency_matrix_of_line_intersection_graph(int *&Adj, long int *S, int n, int verbose_level)
Given a set of lines in S[n], compute the associated line intersection graph.
void build_cubic_surface_from_lines(int len, long int *S, int *coeff, int verbose_level)
void init(field_theory::finite_field *F, int verbose_level)
void take_away(long int *v, int &len, long int *take_away, int nb_take_away)
Definition: lint_vec.cpp:41
void print_as_table(std::ostream &ost, long int *v, int len, int width)
Definition: lint_vec.cpp:299
a collection of functions related to sorted vectors
a statistical analysis of data consisting of single integers
void init_lint(long int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:123
void get_data_by_multiplicity_as_lint(long int *&Pts, int &nb_pts, int multiplicity, int verbose_level)
Definition: tally.cpp:585
ring_theory::longinteger_object * nCkq
Definition: geometry.h:895
long int rank_lint_here(int *Mtx, int verbose_level)
Definition: grassmann.cpp:275
void unrank_lint_here(int *Mtx, long int rk, int verbose_level)
Definition: grassmann.cpp:269
void points_on_projective_triangle(long int *&set, int &set_size, long int *three_points, int verbose_level)
void compute_decomposition_of_graph_wrt_partition(int *Adj, int N, int *first, int *len, int nb_parts, int *&R, int verbose_level)
provides access to pre-computed combinatorial data in encoded form
void cubic_surface_stab_gens(int q, int i, int *&data, int &nb_gens, int &data_size, std::string &stab_order_str)
void int_matrix_write_csv(std::string &fname, int *M, int m, int n)
Definition: file_io.cpp:1300
void lint_matrix_write_csv(std::string &fname, long int *M, int m, int n)
Definition: file_io.cpp:1323
void lint_matrix_print_with_labels_and_partition(std::ostream &ost, long int *p, int m, int n, int *row_labels, int *col_labels, int *row_part_first, int *row_part_len, int nb_row_parts, int *col_part_first, int *col_part_len, int nb_col_parts, void(*process_function_or_NULL)(long int *p, int m, int n, int i, int j, int val, std::string &output, void *data), void *data, int f_tex)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
a permutation group in a fixed action.
Definition: actions.h:99
void print_for_make_element(std::ostream &ost, void *elt)
Definition: action_cb.cpp:182
action * restricted_action(long int *points, int nb_points, int verbose_level)
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
action * create_induced_action_on_sets(int nb_sets, int set_size, long int *sets, int verbose_level)
groups::strong_generators * Strong_gens
Definition: actions.h:130
action * induced_action_on_grassmannian(int k, int verbose_level)
void element_move(void *a, void *b, int verbose_level)
Definition: action_cb.cpp:335
void init_linear_group(field_theory::finite_field *F, int m, int f_projective, int f_general, int f_affine, int f_semilinear, int f_special, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
Definition: action_init.cpp:17
void init_stab_from_data(int *data_gens, int data_gens_size, int nb_gens, std::string &ascii_target_go, int verbose_level)
void init(actions::action *A, actions::action *A2, int verbose_level)
void rearrange_by_orbits(int *&orbit_first, int *&orbit_length, int *&orbit, int &nb_orbits, int verbose_level)
Schreier trees for orbits of groups on points.
Definition: groups.h:839
void coset_rep(int j, int verbose_level)
Definition: schreier.cpp:787
void print_all_group_elements_as_permutations_in_special_action(actions::action *A_special)
Definition: sims_io.cpp:547
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 write_as_magma_permutation_group(std::string &fname_base, data_structures_groups::vector_ge *gens, int verbose_level)
Definition: sims_io.cpp:677
void table_of_group_elements_in_data_form(int *&Table, int &len, int &sz, int verbose_level)
void test_if_set_is_invariant_under_given_action(actions::action *A_given, long int *set, int set_sz, int verbose_level)
schreier * orbit_of_one_point_schreier(actions::action *A_given, int pt, int verbose_level)
schreier * orbits_on_points_schreier(actions::action *A_given, int verbose_level)
data_structures_groups::vector_ge * gens
Definition: groups.h:1708
orbit of sets using a Schreier tree, used in packing::make_spread_table
Definition: orbits.h:106
void get_table_of_orbits(long int *&Table, int &orbit_length, int &set_size, int verbose_level)
void init(actions::action *A, actions::action *A2, long int *set, int sz, data_structures_groups::vector_ge *gens, int verbose_level)
to control the behavior of the poset classification algorithm
int trace_set(long int *set, int size, int level, long int *canonical_set, int *Elt_transporter, int verbose_level)
data_structures_groups::set_and_stabilizer * get_set_and_stabilizer(int level, int orbit_at_level, int verbose_level)
void compute_orbits_on_subsets(int target_depth, poset_classification_control *PC_control, poset_with_group_action *Poset, int verbose_level)
void init_subset_lattice(actions::action *A, actions::action *A2, groups::strong_generators *Strong_gens, int verbose_level)
#define Lint_matrix_print(A, B, C)
Definition: foundations.h:708
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define 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 Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects