Orbiter 2022
Combinatorial Objects
surface_with_action.cpp
Go to the documentation of this file.
1// surface_with_action.cpp
2//
3// Anton Betten
4//
5// March 22, 2017
6//
7//
8//
9//
10//
11
12#include "orbiter.h"
13
14using namespace std;
15
16
17namespace orbiter {
18namespace layer5_applications {
19namespace applications_in_algebraic_geometry {
20namespace cubic_surfaces_in_general {
21
22
24{
25 PA = NULL;
26
28 Surf = NULL;
29 A = NULL;
30 A_wedge = NULL;
31 A2 = NULL;
32 A_on_planes = NULL;
33
34 Elt1 = NULL;
35
36 AonHPD_3_4 = NULL;
37
39
40 Recoordinatize = NULL;
41 regulus = NULL;
42 regulus_size = 0;
43 //null();
44}
45
47{
48 freeself();
49}
50
52{
53}
54
56{
57
58 if (A_on_planes) {
60 }
61 if (Elt1) {
63 }
64 if (AonHPD_3_4) {
66 }
69 }
70 if (Recoordinatize) {
72 }
73 if (regulus) {
75 }
76 null();
77}
78
81 int f_recoordinatize,
82 int verbose_level)
83{
84 int f_v = (verbose_level >= 1);
85
86 if (f_v) {
87 cout << "surface_with_action::init" << endl;
88 }
91
92
93
94 A = PA->A;
95
96 if (f_v) {
97 cout << "surface_with_action::init action A:" << endl;
98 A->print_info();
99 }
100
101
102 if (f_v) {
103 cout << "surface_with_action::init "
104 "before A->induced_action_on_wedge_product" << endl;
105 }
106 A_wedge = A->induced_action_on_wedge_product(verbose_level);
107 if (f_v) {
108 cout << "surface_with_action::init "
109 "after A->induced_action_on_wedge_product" << endl;
110 }
111 if (f_v) {
112 cout << "surface_with_action::init action A_wedge:" << endl;
114 }
115
116 A2 = PA->A_on_lines;
117 if (f_v) {
118 cout << "surface_with_action::init action A2:" << endl;
119 A2->print_info();
120 }
122 if (f_v) {
123 cout << "surface_with_action::init f_semilinear=" << f_semilinear << endl;
124 }
125
126
127
128#if 0
129 if (f_v) {
130 cout << "surface_with_action::init "
131 "creating action on lines" << endl;
132 }
133 A2 = A->induced_action_on_grassmannian(2, verbose_level);
134 if (f_v) {
135 cout << "surface_with_action::init "
136 "creating action on lines done" << endl;
137 }
138#endif
139
140 if (f_v) {
141 cout << "surface_with_action::init "
142 "creating action A_on_planes" << endl;
143 }
144 A_on_planes = A->induced_action_on_grassmannian(3, verbose_level);
145 if (f_v) {
146 cout << "surface_with_action::init "
147 "creating action A_on_planes done" << endl;
148 }
149
150
151
153
155 if (f_v) {
156 cout << "surface_with_action::init "
157 "before AonHPD_3_4->init" << endl;
158 }
159 AonHPD_3_4->init(A, Surf->Poly3_4, verbose_level);
160
161#if 1
163 if (f_v) {
164 cout << "surface_with_action::init "
165 "before Classify_trihedral_pairs->init" << endl;
166 }
167 Classify_trihedral_pairs->init(this, verbose_level);
168#endif
169
170 if (f_recoordinatize) {
171 //char str[1000];
172 //string fname_live_points;
173
174 //sprintf(str, "live_points_q%d", PA->F->q);
175 //fname_live_points.assign(str);
176
178
179 if (f_v) {
180 cout << "surface_with_action::init "
181 "before Recoordinatize->init" << endl;
182 }
183 Recoordinatize->init(4 /*n*/, 2 /*k*/,
184 PA->F, Surf->Gr, A, A2,
185 TRUE /* f_projective */, f_semilinear,
186 NULL /*int (*check_function_incremental)(int len,
187 int *S, void *data, int verbose_level)*/,
188 NULL /*void *check_function_incremental_data */,
189 //fname_live_points,
190 verbose_level);
191 if (f_v) {
192 cout << "surface_with_action::init after "
193 "Recoordinatize->init" << endl;
194 }
195 }
196 else {
197 if (f_v) {
198 cout << "surface_with_action::init not f_recoordinatize" << endl;
199 }
200
201 }
202
203 if (f_v) {
204 cout << "surface_with_action::init before "
205 "Surf->Gr->line_regulus_in_PG_3_q" << endl;
206 }
208 regulus_size, FALSE /* f_opposite */, verbose_level);
209 if (f_v) {
210 cout << "surface_with_action::init after "
211 "Surf->Gr->line_regulus_in_PG_3_q" << endl;
212 }
213
214 if (f_v) {
215 cout << "surface_with_action::init done" << endl;
216 }
217}
218
220 long int *five_lines, long int transversal_line, long int *double_six,
221 int verbose_level)
222{
223 int f_v = (verbose_level >= 1);
224 long int double_six1[12];
225 long int double_six2[12];
226 int r1, r2, c;
228
229 if (f_v) {
230 cout << "surface_with_action::create_double_six_safely" << endl;
231 cout << "five_lines=";
232 Lint_vec_print(cout, five_lines, 5);
233 cout << " transversal_line=" << transversal_line << endl;
234 }
235
236 if (f_v) {
237 cout << "surface_with_action::create_double_six_safely "
238 "before create_double_six_from_five_lines_with_a_common_transversal (1)" << endl;
239 }
241 five_lines, transversal_line, double_six1,
242 0 /* verbose_level */);
243 if (f_v) {
244 cout << "surface_with_action::create_double_six_safely "
245 "after create_double_six_from_five_lines_with_a_common_transversal (1)" << endl;
246 }
247
248 if (f_v) {
249 cout << "surface_with_action::create_double_six_safely "
250 "before create_double_six_from_five_lines_with_a_common_transversal (2)" << endl;
251 }
253 five_lines, double_six2,
254 0 /* verbose_level */);
255 if (f_v) {
256 cout << "surface_with_action::create_double_six_safely "
257 "after create_double_six_from_five_lines_with_a_common_transversal (2)" << endl;
258 }
259
260 if (r1 && !r2) {
261 cout << "surface_with_action::create_double_six_safely "
262 "r1 && !r2" << endl;
263 exit(1);
264 }
265 if (!r1 && r2) {
266 cout << "surface_with_action::create_double_six_safely "
267 "!r1 && r2" << endl;
268 exit(1);
269 }
270 c = Sorting.lint_vec_compare(double_six1, double_six2, 12);
271 if (!r1) {
272 return FALSE;
273 }
274 if (c) {
275 cout << "surface_with_action::create_double_six_safely "
276 "the double sixes differ" << endl;
277 cout << "double six 1: ";
278 Lint_vec_print(cout, double_six1, 12);
279 cout << endl;
280 cout << "double six 2: ";
281 Lint_vec_print(cout, double_six2, 12);
282 cout << endl;
283 exit(1);
284 }
285 Lint_vec_copy(double_six1, double_six, 12);
286 if (f_v) {
287 cout << "surface_with_action::create_double_six_safely done" << endl;
288 }
289 return TRUE;
290}
291
293 long int a, int verbose_level)
294{
295 int f_v = (verbose_level >= 1);
296
297 if (f_v) {
298 cout << "surface_with_action::apply_null_polarity" << endl;
299 }
300
301 int v[6];
302 int w[6];
303 int basis_line[8];
304 long int a_perp;
305
306 Surf->Klein->line_to_Pluecker(a, v, 0 /* verbose_level */);
307 w[0] = v[1];
308 w[1] = v[0];
309 w[2] = v[2];
310 w[3] = v[3];
311 w[4] = v[4];
312 w[5] = v[5];
313
314 Surf->Klein->Pluecker_to_line(w, basis_line, verbose_level);
315
316 a_perp = Surf->Klein->P3->rank_line(basis_line);
317
318 if (f_v) {
319 cout << "surface_with_action::apply_null_polarity done" << endl;
320 }
321 return a_perp;
322}
323
325 long int a, int *Polarity36, int verbose_level)
326{
327 int f_v = (verbose_level >= 1);
328
329 if (f_v) {
330 cout << "surface_with_action::apply_polarity" << endl;
331 }
332
333 int v[6];
334 int w[6];
335 int basis_line[8];
336 long int a_perp;
337
338 Surf->Klein->line_to_Pluecker(a, v, 0 /* verbose_level */);
339
340 Surf->F->Linear_algebra->mult_matrix_matrix(v, Polarity36,
341 w, 1, 6, 6, 0 /* verbose_level */);
342
343 Surf->Klein->Pluecker_to_line(w, basis_line, verbose_level);
344
345 a_perp = Surf->Klein->P3->rank_line(basis_line);
346
347 if (f_v) {
348 cout << "surface_with_action::apply_polarity done" << endl;
349 }
350 return a_perp;
351}
352
354 long int *skew_hexagon,
355 std::vector<std::vector<long int> > &Double_sixes,
356 int verbose_level)
357{
358 int f_v = (verbose_level >= 1);
359
360
361 if (f_v) {
362 cout << "surface_with_action::complete_skew_hexagon" << endl;
363 }
364
365 long int three_skew_lines[3];
366 long int *regulus_a123;
367 long int *opp_regulus_a123;
368 long int *regulus_b123;
369 long int *opp_regulus_b123;
370 int regulus_size;
371 int i, j, r;
372 long int a;
373 int Basis[8];
374 int Mtx[16];
375 int forbidden_points[6];
376 int Forbidden_points[6 * 4];
378 long int a1, a2, a3;
379 long int b1, b2, b3;
380 long int a4, a5, a6;
381 long int b4, b5, b6;
382 long int b6_image;
383 //long int a4_image;
384 //long int a5_image;
385 int v[2];
386 int w[8];
387 int z[4];
388 int idx[2];
389 long int double_six[12];
390
391 F = PA->F;
392
393 a1 = skew_hexagon[0];
394 a2 = skew_hexagon[1];
395 a3 = skew_hexagon[2];
396 b1 = skew_hexagon[3];
397 b2 = skew_hexagon[4];
398 b3 = skew_hexagon[5];
399
400 three_skew_lines[0] = skew_hexagon[0];
401 three_skew_lines[1] = skew_hexagon[1];
402 three_skew_lines[2] = skew_hexagon[2];
403
404 forbidden_points[0] = 0;
405 forbidden_points[1] = 1;
406 forbidden_points[2] = 2;
407 forbidden_points[3] = 3;
408
409 Int_vec_zero(Basis, 4);
410 Basis[0] = 1;
411 Basis[3] = 1;
412 forbidden_points[4] = PA->P->rank_point(Basis);
413
414 Int_vec_zero(Basis, 4);
415 Basis[1] = 1;
416 Basis[2] = 1;
417 forbidden_points[5] = PA->P->rank_point(Basis);
418
419 for (j = 0; j < 6; j++) {
420 PA->P->unrank_point(Forbidden_points + j * 4, forbidden_points[j]);
421 }
422 if (f_v) {
423 cout << "surface_with_action::complete_skew_hexagon Forbidden_points:" << endl;
424 Int_matrix_print(Forbidden_points, 6, 4);
425 }
426
428 three_skew_lines, regulus_a123, opp_regulus_a123, regulus_size,
429 verbose_level);
430
431
433
434
435 for (i = 0; i < regulus_size; i++) {
436
437 a = opp_regulus_a123[i];
438 if (f_v) {
439 cout << "surface_with_action::complete_skew_hexagon "
440 "i=" << i << " / " << regulus_size << " a=" << a << endl;
441 }
442 Surf->Gr->unrank_lint_here(Basis, a, 0 /* verbose_level */);
443 for (j = 0; j < 6; j++) {
444 Int_vec_copy(Basis, Mtx, 8);
445 Int_vec_copy(Forbidden_points + j * 4, Mtx + 8, 4);
447 3, 4, 0 /* verbose_level*/);
448 if (r == 2) {
449 break;
450 }
451 }
452 if (j < 6) {
453 if (f_v) {
454 cout << "surface_with_action::complete_skew_hexagon "
455 "i=" << i << " / " << regulus_size
456 << " a=" << a << " contains point " << j << ", skipping" << endl;
457 }
458 continue;
459 }
460 b6 = a;
461 if (f_v) {
462 cout << "surface_with_action::complete_skew_hexagon "
463 "i=" << i << " / " << regulus_size << " b6=" << b6 << endl;
464 }
465
466 // We map b1, b2, b3 to
467 // \ell_0,\ell_1,\ell_2, the first three lines in a regulus:
468 // This cannot go wrong because we know
469 // that the three lines are pairwise skew,
470 // and hence determine a regulus.
471 // This is because they are part of a
472 // partial ovoid on the Klein quadric.
474 b1, b2, b3,
475 verbose_level - 2);
476
478
479 b6_image = A2->element_image_of(b6,
480 Recoordinatize->Elt, 0 /* verbose_level */);
481
482 if (f_v) {
483 cout << "surface_with_action::complete_skew_hexagon "
484 "after F->find_secant_points_wrt_x0x3mx1x2" << endl;
485 cout << "surface_with_action::complete_skew_hexagon b6_image=" << b6_image << endl;
486 }
487
488 Surf->Gr->unrank_lint_here(Basis, b6_image, 0 /* verbose_level */);
489
490
491 if (f_v) {
492 cout << "surface_with_action::complete_skew_hexagon basis=" << endl;
493 Int_matrix_print(Basis, 2, 4);
494 }
495
496 three_skew_lines[0] = b1;
497 three_skew_lines[1] = b2;
498 three_skew_lines[2] = b3;
499
500 int sz;
501
503 three_skew_lines, regulus_b123, opp_regulus_b123, sz,
504 verbose_level);
505
506
507
508 if (f_v) {
509 cout << "surface_with_action::complete_skew_hexagon basis=" << endl;
510 Int_matrix_print(Basis, 2, 4);
511 }
512
513
514 int Pts4[4];
515 int nb_pts;
516 int u;
517
518 if (f_v) {
519 cout << "surface_with_action::complete_skew_hexagon "
520 "before F->find_secant_points_wrt_x0x3mx1x2" << endl;
521 }
522 F->Linear_algebra->find_secant_points_wrt_x0x3mx1x2(Basis, Pts4, nb_pts, verbose_level);
523 if (f_v) {
524 cout << "surface_with_action::complete_skew_hexagon "
525 "after F->find_secant_points_wrt_x0x3mx1x2" << endl;
526 cout << "surface_with_action::complete_skew_hexagon Pts4=" << endl;
527 Int_matrix_print(Pts4, 2, 2);
528 }
529
530 if (nb_pts != 2) {
531 cout << "surface_with_action::complete_skew_hexagon nb_pts != 2" << endl;
532 exit(1);
533 }
534 for (j = 0; j < nb_pts; j++) {
535 v[0] = Pts4[j * 2 + 0];
536 v[1] = Pts4[j * 2 + 1];
537 F->Linear_algebra->mult_matrix_matrix(v, Basis, w + j * 4, 1, 2, 4, 0 /* verbose_level */);
538 }
539 if (f_v) {
540 cout << "surface_with_action::complete_skew_hexagon after multiplying" << endl;
541 cout << "surface_with_action::complete_skew_hexagon w=" << endl;
542 Int_matrix_print(w, 2, 4);
543 }
544
545 // test if the intersection points lie on the quadric:
547 if (u) {
548 cout << "the first secant point does not lie on the quadric" << endl;
549 exit(1);
550 }
552 if (u) {
553 cout << "the second secant point does not lie on the quadric" << endl;
554 exit(1);
555 }
556
557 for (j = 0; j < nb_pts; j++) {
558
559 if (f_v) {
560 cout << "the " << j << "-th secant points is: ";
561 Int_vec_print(cout, w + j * 4, 4);
562 cout << endl;
563 }
564 Int_vec_copy(w + j * 4, z, 4);
565 if (z[0] == 0 && z[2] == 0) {
566 idx[j] = 0;
567 }
568 else {
570 idx[j] = z[1] + 1;
571 }
572 if (f_v) {
573 cout << "idx[" << j << "] = " << idx[j] << endl;
574 }
575 }
576 a4 = opp_regulus_b123[idx[0]];
577 if (f_v) {
578 cout << "a4 = " << a4 << " = " << endl;
580 }
581 a5 = opp_regulus_b123[idx[1]];
582 if (f_v) {
583 cout << "a5 = " << a5 << " = " << endl;
585 }
586
587 //a4 = A2->element_image_of(a4_image, Elt1, 0 /* verbose_level */);
588 //a5 = A2->element_image_of(a5_image, Elt1, 0 /* verbose_level */);
589
590 b4 = apply_null_polarity(a4, 0 /* verbose_level */);
591 b5 = apply_null_polarity(a5, 0 /* verbose_level */);
592 a6 = apply_null_polarity(b6, 0 /* verbose_level */);
593
594 double_six[0] = a1;
595 double_six[1] = a2;
596 double_six[2] = a3;
597 double_six[3] = a4;
598 double_six[4] = a5;
599 double_six[5] = a6;
600 double_six[6] = b1;
601 double_six[7] = b2;
602 double_six[8] = b3;
603 double_six[9] = b4;
604 double_six[10] = b5;
605 double_six[11] = b6;
606
607 Surf->test_double_six_property(double_six, verbose_level);
608
609 cout << "The double six for i=" << i << " is:" << endl;
610 Surf->latex_double_six(cout, double_six);
611
612
613 std::vector<long int> Double_six;
614
615 Double_six.push_back(a1);
616 Double_six.push_back(a2);
617 Double_six.push_back(a3);
618 Double_six.push_back(a4);
619 Double_six.push_back(a5);
620 Double_six.push_back(a6);
621 Double_six.push_back(b1);
622 Double_six.push_back(b2);
623 Double_six.push_back(b3);
624 Double_six.push_back(b4);
625 Double_six.push_back(b5);
626 Double_six.push_back(b6);
627
628 Double_sixes.push_back(Double_six);
629 }
630
631 if (f_v) {
632 cout << "surface_with_action::complete_skew_hexagon done" << endl;
633 }
634}
635
637 std::string &label_for_printing,
638 long int *skew_hexagon,
639 int *Polarity36,
640 std::vector<std::vector<long int> > &Double_sixes,
641 int verbose_level)
642{
643 int f_v = (verbose_level >= 1);
644
645
646 if (f_v) {
647 cout << "surface_with_action::complete_skew_hexagon_with_polarity " << label_for_printing << endl;
648 }
649
650 long int three_skew_lines[3];
651 long int *regulus_a123;
652 long int *opp_regulus_a123;
653 long int *regulus_b123;
654 long int *opp_regulus_b123;
655 int regulus_size;
656 int i, j, r;
657 long int a;
658 int Basis[8];
659 int Mtx[16];
660 int forbidden_points[6];
661 int Forbidden_points[6 * 4];
663 long int a1, a2, a3;
664 long int b1, b2, b3;
665 long int a4, a5, a6;
666 long int b4, b5, b6;
667 long int b6_image;
668 int v[2];
669 int w[8];
670 int z[4];
671 int idx[2];
672 long int double_six[12];
673
674 F = PA->F;
675
676 a1 = skew_hexagon[0];
677 a2 = skew_hexagon[1];
678 a3 = skew_hexagon[2];
679 b1 = skew_hexagon[3];
680 b2 = skew_hexagon[4];
681 b3 = skew_hexagon[5];
682 if (f_v) {
683 cout << "a1 = " << a1 << " = " << endl;
685 }
686 if (f_v) {
687 cout << "a2 = " << a2 << " = " << endl;
689 }
690 if (f_v) {
691 cout << "a3 = " << a3 << " = " << endl;
693 }
694 if (f_v) {
695 cout << "b1 = " << b1 << " = " << endl;
697 }
698 if (f_v) {
699 cout << "b2 = " << b2 << " = " << endl;
701 }
702 if (f_v) {
703 cout << "b3 = " << b3 << " = " << endl;
705 }
706
707 three_skew_lines[0] = skew_hexagon[0];
708 three_skew_lines[1] = skew_hexagon[1];
709 three_skew_lines[2] = skew_hexagon[2];
710
711 forbidden_points[0] = 0;
712 forbidden_points[1] = 1;
713 forbidden_points[2] = 2;
714 forbidden_points[3] = 3;
715
716 Int_vec_zero(Basis, 4);
717 Basis[0] = 1;
718 Basis[3] = 1;
719 forbidden_points[4] = PA->P->rank_point(Basis);
720
721 Int_vec_zero(Basis, 4);
722 Basis[1] = 1;
723 Basis[2] = 1;
724 forbidden_points[5] = PA->P->rank_point(Basis);
725
726 for (j = 0; j < 6; j++) {
727 PA->P->unrank_point(Forbidden_points + j * 4, forbidden_points[j]);
728 }
729 if (f_v) {
730 cout << "surface_with_action::complete_skew_hexagon_with_polarity Forbidden_points:" << endl;
731 Int_matrix_print(Forbidden_points, 6, 4);
732 }
733
735 three_skew_lines, regulus_a123, opp_regulus_a123, regulus_size,
736 verbose_level);
737
738
740
741
742 for (i = 0; i < regulus_size; i++) {
743
744 a = opp_regulus_a123[i];
745 if (f_v) {
746 cout << "surface_with_action::complete_skew_hexagon_with_polarity i=" << i << " / " << regulus_size << " a=" << a << endl;
747 }
748 Surf->Gr->unrank_lint_here(Basis, a, 0 /* verbose_level */);
749 for (j = 0; j < 6; j++) {
750 Int_vec_copy(Basis, Mtx, 8);
751 Int_vec_copy(Forbidden_points + j * 4, Mtx + 8, 4);
753 3, 4, 0 /* verbose_level*/);
754 if (r == 2) {
755 break;
756 }
757 }
758 if (j < 6) {
759 if (f_v) {
760 cout << "surface_with_action::complete_skew_hexagon_with_polarity "
761 "i=" << i << " / " << regulus_size << " a=" << a << " contains point " << j << ", skipping" << endl;
762 }
763 continue;
764 }
765 b6 = a;
766 if (f_v) {
767 cout << "surface_with_action::complete_skew_hexagon_with_polarity "
768 "i=" << i << " / " << regulus_size << " b6=" << b6 << endl;
769 }
770 if (f_v) {
771 cout << "b6 = " << b6 << " = " << endl;
773 }
774
775 // We map b1, b2, b3 to
776 // \ell_0,\ell_1,\ell_2, the first three lines in a regulus:
777 // This cannot go wrong because we know
778 // that the three lines are pairwise skew,
779 // and hence determine a regulus.
780 // This is because they are part of a
781 // partial ovoid on the Klein quadric.
783 b1, b2, b3,
784 verbose_level - 2);
785
787
788 b6_image = A2->element_image_of(b6,
789 Recoordinatize->Elt, 0 /* verbose_level */);
790
791 if (f_v) {
792 cout << "surface_with_action::complete_skew_hexagon_with_polarity "
793 "after F->find_secant_points_wrt_x0x3mx1x2" << endl;
794 cout << "surface_with_action::complete_skew_hexagon_with_polarity b6_image=" << b6_image << endl;
795 }
796
797 Surf->Gr->unrank_lint_here(Basis, b6_image, 0 /* verbose_level */);
798
799
800 if (f_v) {
801 cout << "surface_with_action::complete_skew_hexagon_with_polarity basis=" << endl;
802 Int_matrix_print(Basis, 2, 4);
803 }
804
805 three_skew_lines[0] = b1;
806 three_skew_lines[1] = b2;
807 three_skew_lines[2] = b3;
808
809 int sz;
810
812 three_skew_lines, regulus_b123, opp_regulus_b123, sz,
813 verbose_level);
814
815
816
817 if (f_v) {
818 cout << "surface_with_action::complete_skew_hexagon_with_polarity basis=" << endl;
819 Int_matrix_print(Basis, 2, 4);
820 }
821
822
823 int Pts4[4];
824 int nb_pts;
825 int u;
826
827 if (f_v) {
828 cout << "surface_with_action::complete_skew_hexagon_with_polarity "
829 "before F->find_secant_points_wrt_x0x3mx1x2" << endl;
830 }
831 F->Linear_algebra->find_secant_points_wrt_x0x3mx1x2(Basis, Pts4, nb_pts, verbose_level);
832 if (f_v) {
833 cout << "surface_with_action::complete_skew_hexagon_with_polarity "
834 "after F->find_secant_points_wrt_x0x3mx1x2" << endl;
835 cout << "surface_with_action::complete_skew_hexagon_with_polarity Pts4=" << endl;
836 Int_matrix_print(Pts4, 2, 2);
837 }
838
839 if (nb_pts != 2) {
840 cout << "surface_with_action::complete_skew_hexagon_with_polarity nb_pts != 2. i=" << i << endl;
841 continue;
842 }
843 for (j = 0; j < nb_pts; j++) {
844 v[0] = Pts4[j * 2 + 0];
845 v[1] = Pts4[j * 2 + 1];
846 F->Linear_algebra->mult_matrix_matrix(v, Basis, w + j * 4, 1, 2, 4, 0 /* verbose_level */);
847 }
848 if (f_v) {
849 cout << "surface_with_action::complete_skew_hexagon_with_polarity after multiplying" << endl;
850 cout << "surface_with_action::complete_skew_hexagon_with_polarity w=" << endl;
851 Int_matrix_print(w, 2, 4);
852 }
853
854 // test if the intersection points lie on the quadric:
856 if (u) {
857 cout << "the first secant point does not lie on the quadric" << endl;
858 exit(1);
859 }
861 if (u) {
862 cout << "the second secant point does not lie on the quadric" << endl;
863 exit(1);
864 }
865
866 for (j = 0; j < nb_pts; j++) {
867
868 if (f_v) {
869 cout << "the " << j << "-th secant points is: ";
870 Int_vec_print(cout, w + j * 4, 4);
871 cout << endl;
872 }
873 Int_vec_copy(w + j * 4, z, 4);
874 if (z[0] == 0 && z[2] == 0) {
875 idx[j] = 0;
876 }
877 else {
879 idx[j] = z[1] + 1;
880 }
881 if (f_v) {
882 cout << "idx[" << j << "] = " << idx[j] << endl;
883 }
884 }
885 a4 = opp_regulus_b123[idx[0]];
886 if (f_v) {
887 cout << "a4 = " << a4 << " = " << endl;
889 }
890 a5 = opp_regulus_b123[idx[1]];
891 if (f_v) {
892 cout << "a5 = " << a5 << " = " << endl;
894 }
895
896 b4 = apply_polarity(a4, Polarity36, 0 /* verbose_level */);
897 if (f_v) {
898 cout << "b4 = " << b4 << " = " << endl;
900 }
901 b5 = apply_polarity(a5, Polarity36, 0 /* verbose_level */);
902 if (f_v) {
903 cout << "b5 = " << b5 << " = " << endl;
905 }
906 a6 = apply_polarity(b6, Polarity36, 0 /* verbose_level */);
907 if (f_v) {
908 cout << "a6 = " << a6 << " = " << endl;
910 }
911
912 double_six[0] = a1;
913 double_six[1] = a2;
914 double_six[2] = a3;
915 double_six[3] = a4;
916 double_six[4] = a5;
917 double_six[5] = a6;
918 double_six[6] = b1;
919 double_six[7] = b2;
920 double_six[8] = b3;
921 double_six[9] = b4;
922 double_six[10] = b5;
923 double_six[11] = b6;
924
925
926 cout << "The candidate for " << label_for_printing << " and i=" << i << " is: ";
927 Lint_vec_print(cout, double_six, 12);
928 cout << endl;
929 Surf->latex_double_six(cout, double_six);
930
931
932
933 if (!Surf->test_double_six_property(double_six, verbose_level)) {
934 continue;
935 }
936 else {
937 cout << "passes the double six test" << endl;
938
939 int nb_E;
940
941 nb_E = Surf->build_surface_from_double_six_and_count_Eckardt_points(double_six, 0 /* verbose_level*/);
942
943
944 cout << "A double-six for " << label_for_printing << " and i=" << i << " is: ";
945 Lint_vec_print(cout, double_six, 12);
946 cout << " nb_E = " << nb_E;
947 cout << endl;
948 Surf->latex_double_six(cout, double_six);
949 }
950
951 std::vector<long int> Double_six;
952
953 Double_six.push_back(a1);
954 Double_six.push_back(a2);
955 Double_six.push_back(a3);
956 Double_six.push_back(a4);
957 Double_six.push_back(a5);
958 Double_six.push_back(a6);
959 Double_six.push_back(b1);
960 Double_six.push_back(b2);
961 Double_six.push_back(b3);
962 Double_six.push_back(b4);
963 Double_six.push_back(b5);
964 Double_six.push_back(b6);
965
966 Double_sixes.push_back(Double_six);
967 }
968
969 if (f_v) {
970 cout << "surface_with_action::complete_skew_hexagon_with_polarity done" << endl;
971 }
972}
973
975 long int *three_skew_lines, long int *&regulus, long int *&opp_regulus, int &regulus_size,
976 int verbose_level)
977// 6/4/2021:
978//Hi Anton,
979//
980//The opposite regulus consists of
981//[0 1 0 0]
982//[0 0 0 1]
983//and
984//[1 a 0 0]
985//[0 0 1 a]
986//
987//Cheers,
988//Alice
989{
990 int f_v = (verbose_level >= 1);
991
992
993 if (f_v) {
994 cout << "surface_with_action::create_regulus_and_opposite_regulus" << endl;
995 }
996
997
998 if (Recoordinatize == NULL) {
999 cout << "surface_with_action::create_regulus_and_opposite_regulus "
1000 "Recoordinatize == NULL" << endl;
1001 exit(1);
1002 }
1004 int i, sz;
1005
1006
1007 F = PA->F;
1008
1009
1010 // We map a_{1}, a_{2}, a_{3} to
1011 // \ell_0,\ell_1,\ell_2, the first three lines in a regulus on the
1012 // hyperbolic quadric x_0x_3-x_1x_2 = 0:
1013
1014 // the first three lines are:
1015 //int L0[] = {0,0,1,0, 0,0,0,1};
1016 //int L1[] = {1,0,0,0, 0,1,0,0};
1017 //int L2[] = {1,0,1,0, 0,1,0,1};
1018
1019 // This cannot go wrong because we know
1020 // that the three lines are pairwise skew,
1021 // and hence determine a regulus.
1022 // This is because they are part of a
1023 // partial ovoid on the Klein quadric.
1025 three_skew_lines[0], three_skew_lines[1], three_skew_lines[2],
1026 verbose_level - 2);
1027
1029
1031 regulus, regulus_size, FALSE /* f_opposite */, verbose_level);
1032
1034 opp_regulus, sz, TRUE /* f_opposite */, verbose_level);
1035
1036 if (sz != regulus_size) {
1037 cout << "sz != regulus_size" << endl;
1038 exit(1);
1039 }
1040
1041
1042 // map regulus back:
1043 for (i = 0; i < regulus_size; i++) {
1044 regulus[i] = A2->element_image_of(regulus[i], Elt1, 0 /* verbose_level */);
1045 }
1046
1047 // map opposite regulus back:
1048 for (i = 0; i < regulus_size; i++) {
1049 opp_regulus[i] = A2->element_image_of(opp_regulus[i], Elt1, 0 /* verbose_level */);
1050 }
1051
1052
1053 if (f_v) {
1054 cout << "surface_with_action::create_regulus_and_opposite_regulus done" << endl;
1055 }
1056}
1057
1058
1060 long int *five_lines, long int transversal_line, long int *double_six,
1061 int verbose_level)
1062{
1063 int f_v = (verbose_level >= 1);
1064 int f_vv = (verbose_level >= 2);
1065 int nb_subsets;
1066 int subset[5];
1067 long int four_lines[5];
1068 long int P[5];
1069 long int rk, i, ai4image, P4, Q, a, b, h, k, line3, line4;
1070 long int b1, b2, b3, b4, b5;
1071 int size_complement;
1072 int Q4[4];
1073 int L[8];
1074 int v[2];
1075 int w[4];
1076 int d;
1077
1078 // L0,L1,L2 are the first three lines in the regulus on the
1079 // hyperbolic quadric x_0x_3-x_1x_2 = 0:
1080 int L0[] = {0,0,1,0, 0,0,0,1};
1081 int L1[] = {1,0,0,0, 0,1,0,0};
1082 int L2[] = {1,0,1,0, 0,1,0,1};
1083 int ell0;
1084
1085 int pi1[12];
1086 int pi2[12];
1087 int *line1;
1088 int *line2;
1089 int M[16];
1090 long int image[2];
1091 int pt_coord[4 * 4];
1092 int nb_pts;
1095
1096 if (f_v) {
1097 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal, "
1098 "verbose_level = " << verbose_level << endl;
1099 }
1100
1101 F = PA->F;
1102
1103 if (Recoordinatize == NULL) {
1104 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal "
1105 "Recoordinatize == NULL" << endl;
1106 exit(1);
1107 }
1108
1109
1110 if (f_v) {
1111 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal" << endl;
1112 cout << "The five lines are ";
1113 Lint_vec_print(cout, five_lines, 5);
1114 cout << endl;
1115 }
1116
1117 ell0 = Surf->rank_line(L0);
1118
1119 Lint_vec_copy(five_lines, double_six, 5); // fill in a_1,\ldots,a_5
1120 double_six[11] = transversal_line; // fill in b_6
1121
1122 for (i = 0; i < 5; i++) {
1123 if (f_vv) {
1124 cout << "intersecting line " << i << " = " << five_lines[i]
1125 << " with line " << transversal_line << endl;
1126 }
1128 five_lines[i], transversal_line, 0 /* verbose_level */);
1129 }
1130 if (f_vv) {
1131 cout << "The five intersection points are:";
1132 Lint_vec_print(cout, P, 5);
1133 cout << endl;
1134 }
1135
1136
1137 // Determine b_1,\ldots,b_5:
1138
1139 // For every 4-subset \{a_1,\ldots,a_5\} \setminus \{a_i\},
1140 // let b_i be the unique second transversal:
1141
1142 nb_subsets = Combi.int_n_choose_k(5, 4);
1143
1144 for (rk = 0; rk < nb_subsets; rk++) {
1145
1146 // Determine a subset a_{i1},a_{i2},a_{i3},a_{i4};a_{i5}
1147 Combi.unrank_k_subset(rk, subset, 5, 4);
1148 Combi.set_complement(subset, 4, subset + 4, size_complement, 5);
1149 for (i = 0; i < 5; i++) {
1150 four_lines[i] = five_lines[subset[i]];
1151 }
1152
1153 // P4 is the intersection of a_{i4} with the transversal:
1154 P4 = P[subset[3]];
1155 if (f_vv) {
1156 cout << "subset " << rk << " / " << nb_subsets << " : ";
1157 Lint_vec_print(cout, four_lines, 5);
1158 cout << " P4=" << P4 << endl;
1159 }
1160
1161 // We map a_{i1},a_{12},a_{i3} to
1162 // \ell_0,\ell_1,\ell_2, the first three lines in a regulus:
1163 // This cannot go wrong because we know
1164 // that the three lines are pairwise skew,
1165 // and hence determine a regulus.
1166 // This is because they are part of a
1167 // partial ovoid on the Klein quadric.
1169 four_lines[0], four_lines[1], four_lines[2],
1170 verbose_level - 2);
1171
1173
1174
1175 ai4image = A2->element_image_of(four_lines[3],
1176 Recoordinatize->Elt, 0 /* verbose_level */);
1177
1178
1179 Q = A->element_image_of(P4,
1180 Recoordinatize->Elt, 0 /* verbose_level */);
1181 if (f_vv) {
1182 cout << "ai4image = " << ai4image << " Q=" << Q << endl;
1183 }
1184 Surf->unrank_point(Q4, Q);
1185
1187 if (b) {
1188 cout << "error: The point Q does not "
1189 "lie on the quadric" << endl;
1190 exit(1);
1191 }
1192
1193
1194 Surf->Gr->unrank_lint_here(L, ai4image, 0 /* verbose_level */);
1195 if (f_vv) {
1196 cout << "before F->adjust_basis" << endl;
1197 cout << "L=" << endl;
1198 Int_matrix_print(L, 2, 4);
1199 cout << "Q4=" << endl;
1200 Int_matrix_print(Q4, 1, 4);
1201 }
1202
1203 // Adjust the basis L of the line ai4image so that Q4 is first:
1204 F->Linear_algebra->adjust_basis(L, Q4, 4, 2, 1, verbose_level - 1);
1205 if (f_vv) {
1206 cout << "after F->adjust_basis" << endl;
1207 cout << "L=" << endl;
1208 Int_matrix_print(L, 2, 4);
1209 cout << "Q4=" << endl;
1210 Int_matrix_print(Q4, 1, 4);
1211 }
1212
1213 // Determine the point w which is the second point where
1214 // the line which is the image of a_{i4} intersects the hyperboloid:
1215 // To do so, we loop over all points on the line distinct from Q4:
1216 for (a = 0; a < F->q; a++) {
1217 v[0] = a;
1218 v[1] = 1;
1219 F->Linear_algebra->mult_matrix_matrix(v, L, w, 1, 2, 4,
1220 0 /* verbose_level */);
1221 //rk = Surf->rank_point(w);
1222
1223 // Evaluate the equation of the hyperboloid
1224 // which is x_0x_3-x_1x_2 = 0,
1225 // to see if w lies on it:
1227 if (f_vv) {
1228 cout << "a=" << a << " v=";
1229 Int_vec_print(cout, v, 2);
1230 cout << " w=";
1231 Int_vec_print(cout, w, 4);
1232 cout << " b=" << b << endl;
1233 }
1234 if (b == 0) {
1235 break;
1236 }
1237 }
1238 if (a == F->q) {
1239 if (f_v) {
1240 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal "
1241 "we could not find a second intersection point"
1242 << endl;
1243 }
1244 return FALSE;
1245 }
1246
1247 // test that the line is not a line of the quadric:
1248 F->Linear_algebra->add_vector(L, w, pt_coord, 4);
1250 if (b == 0) {
1251 if (f_v) {
1252 cout << "The line lies in the quadric, "
1253 "this five plus one is not good." << endl;
1254 }
1255 return FALSE;
1256 }
1257
1258 // Pick two lines out of the three lines ell_0,ell_1,ell_2
1259 // which do not contain the point w:
1260
1261 // test if w lies on ell_0 or ell_1 or ell2:
1262 if (w[0] == 0 && w[1] == 0) {
1263 // now w lies on ell_0 so we take ell_1 and ell_2:
1264 line1 = L1;
1265 line1 = L2;
1266 }
1267 else if (w[2] == 0 && w[3] == 0) {
1268 // now w lies on ell_1 so we take ell_0 and ell_2:
1269 line1 = L0;
1270 line1 = L2;
1271 }
1272 else if (w[0] == w[2] && w[1] == w[3]) {
1273 // now w lies on ell_2 so we take ell_0 and ell_1:
1274 line1 = L0;
1275 line2 = L1;
1276 }
1277 else {
1278 // Now, w does not lie on ell_0,ell_1,ell_2:
1279 line1 = L0;
1280 line2 = L1;
1281 }
1282
1283 // Let pi1 be the plane spanned by line1 and w:
1284 Int_vec_copy(line1, pi1, 8);
1285 Int_vec_copy(w, pi1 + 8, 4);
1286
1287 // Let pi2 be the plane spanned by line2 and w:
1288 Int_vec_copy(line2, pi2, 8);
1289 Int_vec_copy(w, pi2 + 8, 4);
1290
1291 // Let line3 be the intersection of pi1 and pi2:
1292 F->Linear_algebra->intersect_subspaces(4, 3, pi1, 3, pi2,
1293 d, M, 0 /* verbose_level */);
1294 if (d != 2) {
1295 if (f_v) {
1296 cout << "projective_space::create_double_six_from_five_lines_with_a_common_transversal "
1297 "intersection is not a line" << endl;
1298 }
1299 return FALSE;
1300 }
1301 line3 = Surf->rank_line(M);
1302
1303 // Map line3 back to get line4 = b_i:
1304 line4 = A2->element_image_of(line3, Elt1, 0 /* verbose_level */);
1305
1306 double_six[10 - rk] = line4; // fill in b_i
1307 } // next rk
1308
1309 // Now, b_1,\ldots,b_5 have been determined.
1310 b1 = double_six[6];
1311 b2 = double_six[7];
1312 b3 = double_six[8];
1313 b4 = double_six[9];
1314 b5 = double_six[10];
1315
1316 // Next, determine a_6 as the transversal of b_1,\ldots,b_5:
1317
1318 Recoordinatize->do_recoordinatize(b1, b2, b3, verbose_level - 2);
1319
1321
1322 // map b4 and b5:
1323 image[0] = A2->element_image_of(b4, Recoordinatize->Elt, 0 /* verbose_level */);
1324 image[1] = A2->element_image_of(b5, Recoordinatize->Elt, 0 /* verbose_level */);
1325
1326 nb_pts = 0;
1327 for (h = 0; h < 2; h++) {
1328 Surf->Gr->unrank_lint_here(L, image[h], 0 /* verbose_level */);
1329 for (a = 0; a < F->q + 1; a++) {
1330 F->PG_element_unrank_modified(v, 1, 2, a);
1331 F->Linear_algebra->mult_matrix_matrix(v, L, w, 1, 2, 4,
1332 0 /* verbose_level */);
1333
1334 // Evaluate the equation of the hyperboloid
1335 // which is x_0x_3-x_1x_2 = 0,
1336 // to see if w lies on it:
1338 if (b == 0) {
1339 Int_vec_copy(w, pt_coord + nb_pts * 4, 4);
1340 nb_pts++;
1341 if (nb_pts == 5) {
1342 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal "
1343 "nb_pts == 5" << endl;
1344 exit(1);
1345 }
1346 }
1347 }
1348 if (nb_pts != (h + 1) * 2) {
1349 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal nb_pts != "
1350 "(h + 1) * 2" << endl;
1351 exit(1);
1352 }
1353 } // next h
1354
1355 if (f_vv) {
1356 cout << "four points have been computed:" << endl;
1357 Int_matrix_print(pt_coord, 4, 4);
1358 }
1359 line3 = -1;
1360 for (h = 0; h < 2; h++) {
1361 for (k = 0; k < 2; k++) {
1362 F->Linear_algebra->add_vector(pt_coord + h * 4, pt_coord + (2 + k) * 4, w, 4);
1364 if (b == 0) {
1365 if (f_vv) {
1366 cout << "h=" << h << " k=" << k
1367 << " define a singular line" << endl;
1368 }
1369 Int_vec_copy(pt_coord + h * 4, L, 4);
1370 Int_vec_copy(pt_coord + (2 + k) * 4, L + 4, 4);
1371 line3 = Surf->rank_line(L);
1372
1373 if (!Surf->P->test_if_lines_are_skew(ell0,
1374 line3, 0 /* verbose_level */)) {
1375 if (f_vv) {
1376 cout << "The line intersects ell_0, so we are good" << endl;
1377 }
1378 break;
1379 }
1380 // continue on to find another line
1381 }
1382 }
1383 if (k < 2) {
1384 break;
1385 }
1386 }
1387 if (h == 2) {
1388 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal "
1389 "could not determine a_6" << endl;
1390 exit(1);
1391 }
1392 if (line3 == -1) {
1393 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal "
1394 "line3 == -1" << endl;
1395 exit(1);
1396 }
1397 // Map line3 back to get line4 = a_6:
1398 line4 = A2->element_image_of(line3, Elt1, 0 /* verbose_level */);
1399 double_six[5] = line4; // fill in a_6
1400
1401 if (f_v) {
1402 cout << "surface_with_action::create_double_six_from_five_lines_with_a_common_transversal done" << endl;
1403 }
1404 return TRUE;
1405}
1406
1407
1408
1409
1411{
1412
1413 Surf->print_basics(ost);
1414
1415
1416
1417}
1418
1420{
1421
1422
1423
1425
1426}
1427
1429{
1430
1431
1432
1433 Classify_trihedral_pairs->print_trihedral_pairs(ost, TRUE /* f_with_stabilizers */);
1434
1435}
1436
1438 surface_create_description *Surface_Descr,
1439 surface_create *&SC,
1440 int verbose_level)
1441{
1442 int f_v = (verbose_level >= 1);
1443
1444 if (f_v) {
1445 cout << "surface_with_action::create_surface" << endl;
1446 }
1448
1449 if (f_v) {
1450 cout << "surface_with_action::create_surface before SC->init" << endl;
1451 }
1452 SC->init(Surface_Descr, this /*Surf_A*/, verbose_level);
1453 if (f_v) {
1454 cout << "surface_with_action::create_surface after SC->init" << endl;
1455 }
1456
1457
1458 if (f_v) {
1459 cout << "surface_with_action::create_surface "
1460 "before SC->apply_transformations" << endl;
1461 }
1462 SC->apply_transformations(Surface_Descr->transform_coeffs,
1463 Surface_Descr->f_inverse_transform,
1464 verbose_level - 2);
1465
1466 if (f_v) {
1467 cout << "surface_with_action::create_surface "
1468 "after SC->apply_transformations" << endl;
1469 }
1470
1471 SC->F->PG_element_normalize(SC->SO->eqn, 1, 20);
1472
1473 if (f_v) {
1474 cout << "surface_with_action::create_surface done" << endl;
1475 }
1476}
1477
1479 surface_create_description *Surface_Descr,
1480 int f_has_control_six_arcs,
1482 int verbose_level)
1483{
1484 int f_v = (verbose_level >= 1);
1485
1486 if (f_v) {
1487 cout << "surface_with_action::create_surface_and_do_report" << endl;
1488 }
1489
1490 //finite_field *F;
1491
1492 //F = PA->F;
1493
1494
1495 surface_create *SC;
1496
1497 if (f_v) {
1498 cout << "surface_with_action::create_surface_and_do_report before create_surface" << endl;
1499 }
1501 Surface_Descr,
1502 SC,
1503 verbose_level);
1504 if (f_v) {
1505 cout << "surface_with_action::create_surface_and_do_report after create_surface" << endl;
1506 }
1507
1509 //int *Elt1;
1510 int *Elt2;
1511
1512 A = SC->Surf_A->A;
1513
1514 Elt2 = NEW_int(A->elt_size_in_int);
1515
1516 //SC->F->init_symbol_for_print("\\omega");
1517
1518 if (SC->F->e == 1) {
1520 }
1521
1522
1523 cout << "surface_with_action::create_surface_and_do_report "
1524 "We have created the following surface:" << endl;
1525 cout << "$$" << endl;
1526 SC->Surf->print_equation_tex(cout, SC->SO->eqn);
1527 cout << endl;
1528 cout << "$$" << endl;
1529
1530 cout << "$$" << endl;
1531 Int_vec_print(cout, SC->SO->eqn, 20);
1532 cout << endl;
1533 cout << "$$" << endl;
1534
1535
1536 if (SC->f_has_group) {
1537 if (f_v) {
1538 cout << "surface_with_action::create_surface_and_do_report before test_group" << endl;
1539 }
1540 test_group(SC, verbose_level);
1541 if (f_v) {
1542 cout << "surface_with_action::create_surface_and_do_report after test_group" << endl;
1543 }
1544 }
1545 else {
1546 cout << "surface_with_action::create_surface_and_do_report "
1547 "We do not have information about "
1548 "the automorphism group" << endl;
1549 }
1550
1551
1552 cout << "surface_with_action::create_surface_and_do_report We have created "
1553 "the surface " << SC->label_txt << ":" << endl;
1554 cout << "$$" << endl;
1555 SC->Surf->print_equation_tex(cout, SC->SO->eqn);
1556 cout << endl;
1557 cout << "$$" << endl;
1558
1559 if (SC->f_has_group) {
1560 cout << "surface_with_action::create_surface_and_do_report "
1561 "The stabilizer is generated by:" << endl;
1562 SC->Sg->print_generators_tex(cout);
1563
1564 if (SC->f_has_nice_gens) {
1565 cout << "surface_with_action::create_surface_and_do_report "
1566 "The stabilizer is generated by the following nice generators:" << endl;
1567 SC->nice_gens->print_tex(cout);
1568
1569 }
1570 }
1571
1572
1573
1574
1575 do_report(SC, verbose_level);
1576
1577
1578
1579
1580
1581 if (SC->f_has_group) {
1582
1584 SC,
1585 f_has_control_six_arcs, Control_six_arcs,
1586 verbose_level);
1587
1588 }
1589 else {
1590 cout << "We don't have the group of the surface" << endl;
1591 }
1592
1593
1594
1595 FREE_int(Elt2);
1596
1597 FREE_OBJECT(SC);
1598
1599 if (f_v) {
1600 cout << "surface_with_action::create_surface_and_do_report done" << endl;
1601 }
1602
1603}
1604
1605
1607 surface_create *SC,
1608 int verbose_level)
1609{
1610 int f_v = (verbose_level >= 1);
1611
1612 if (f_v) {
1613 cout << "surface_with_action::test_group" << endl;
1614 }
1615
1616
1617 int *Elt2;
1618
1619
1620 Elt2 = NEW_int(A->elt_size_in_int);
1621
1622 // test the generators:
1623
1624 int coeffs_out[20];
1625 int i;
1626
1627 for (i = 0; i < SC->Sg->gens->len; i++) {
1628 cout << "surface_with_action::test_group "
1629 "Testing generator " << i << " / "
1630 << SC->Sg->gens->len << endl;
1631 A->element_invert(SC->Sg->gens->ith(i),
1632 Elt2, 0 /*verbose_level*/);
1633
1634
1635
1637
1638 M = A->G.matrix_grp;
1640 SC->SO->eqn, coeffs_out, SC->Surf,
1641 verbose_level - 1);
1642
1643
1644 if (!PA->F->test_if_vectors_are_projectively_equal(SC->SO->eqn, coeffs_out, 20)) {
1645 cout << "surface_with_action::test_group error, "
1646 "the transformation does not preserve "
1647 "the equation of the surface" << endl;
1648 cout << "SC->SO->eqn:" << endl;
1649 Int_vec_print(cout, SC->SO->eqn, 20);
1650 cout << endl;
1651 cout << "coeffs_out" << endl;
1652 Int_vec_print(cout, coeffs_out, 20);
1653 cout << endl;
1654
1655 exit(1);
1656 }
1657 cout << "surface_with_action::test_group "
1658 "Generator " << i << " / " << SC->Sg->gens->len
1659 << " is good" << endl;
1660 }
1661
1662 FREE_int(Elt2);
1663
1664 if (f_v) {
1665 cout << "surface_with_action::test_group the group is good. Done" << endl;
1666 }
1667}
1668
1670 surface_create *SC,
1671 int f_has_control_six_arcs,
1673 int verbose_level)
1674{
1675 int f_v = (verbose_level >= 1);
1676
1677 if (f_v) {
1678 cout << "surface_with_action::report_with_group" << endl;
1679 }
1680
1681 if (f_v) {
1682 cout << "surface_with_action::report_with_group creating "
1683 "surface_object_with_action object" << endl;
1684 }
1685
1687
1688 F = PA->F;
1689
1691
1692
1694 SC,
1695 SoA,
1696 verbose_level);
1697
1698
1699 if (f_v) {
1700 cout << "surface_with_action::report_with_group "
1701 "The surface has been created." << endl;
1702 }
1703
1704
1705
1706 if (f_v) {
1707 cout << "surface_with_action::report_with_group "
1708 "Classifying non-conical six-arcs." << endl;
1709 }
1710
1713
1714 int *transporter;
1715
1717
1719 Six_arc_descr->f_target_size = TRUE;
1720 Six_arc_descr->target_size = 6;
1721
1722 if (f_has_control_six_arcs) {
1723 Six_arc_descr->Control = Control_six_arcs;
1724 }
1725 else {
1727 }
1728
1729
1730
1731 // classify six arcs not on a conic:
1732
1733 if (f_v) {
1734 cout << "surface_with_action::report_with_group "
1735 "before Six_arcs->init:" << endl;
1736 }
1737
1738
1739 Six_arcs->init(
1740 Six_arc_descr,
1741 PA->PA2,
1742 FALSE, 0, //NULL,
1743 verbose_level);
1744
1745 transporter = NEW_int(Six_arcs->Gen->PA->A->elt_size_in_int);
1746
1747
1748 if (f_v) {
1749 cout << "surface_with_action::report_with_group "
1750 "before SoA->investigate_surface_and_write_report:" << endl;
1751 }
1752
1753 if (orbiter_kernel_system::Orbiter->f_draw_options) {
1755 orbiter_kernel_system::Orbiter->draw_options,
1756 A,
1757 SC,
1758 Six_arcs,
1759 verbose_level);
1760 }
1761 else {
1762 cout << "use -draw_options to specify the drawing option for the report" << endl;
1763 exit(1);
1764 }
1765
1766 FREE_OBJECT(SoA);
1767 FREE_OBJECT(Six_arcs);
1768 FREE_OBJECT(Six_arc_descr);
1769 FREE_int(transporter);
1770
1771 if (f_v) {
1772 cout << "surface_with_action::report_with_group done" << endl;
1773 }
1774
1775}
1777 surface_create *SC,
1779 int verbose_level)
1780{
1781 int f_v = (verbose_level >= 1);
1782
1783 if (f_v) {
1784 cout << "surface_with_action::create_surface_object_with_action" << endl;
1785 }
1786
1787
1788 if (!SC->f_has_group) {
1789 cout << "surface_with_action::create_surface_object_with_action "
1790 "The automorphism group of the surface is missing" << endl;
1791 exit(1);
1792 }
1793
1795
1796 if (f_v) {
1797 cout << "surface_with_action::create_surface_object_with_action "
1798 "before SoA->init_with_group" << endl;
1799 }
1800 SoA->init_with_group(
1801 SC->Surf_A,
1802 SC->SO->Lines, SC->SO->nb_lines,
1803 SC->SO->eqn,
1804 SC->Sg,
1805 FALSE /*f_find_double_six_and_rearrange_lines*/,
1806 SC->f_has_nice_gens, SC->nice_gens,
1807 verbose_level - 1);
1808 if (f_v) {
1809 cout << "surface_with_action::create_surface_object_with_action "
1810 "after SoA->init_with_group" << endl;
1811 }
1812
1813 if (f_v) {
1814 cout << "surface_with_action::create_surface_object_with_action "
1815 "The surface has been created." << endl;
1816 }
1817
1818 if (f_v) {
1819 cout << "surface_with_action::create_surface_object_with_action done" << endl;
1820 }
1821}
1822
1823
1825 surface_create *SC,
1826 int verbose_level)
1827{
1828 int f_v = (verbose_level >= 1);
1829
1830 if (f_v) {
1831 cout << "surface_with_action::export_points" << endl;
1832 }
1833
1834 string fname_points;
1836
1837 fname_points.assign("surface_");
1838 fname_points.append(SC->label_txt);
1839 fname_points.append("_points.txt");
1840 Fio.write_set_to_file(fname_points, SC->SO->Pts, SC->SO->nb_pts, 0 /*verbose_level*/);
1841 cout << "group_theoretic_activity::do_create_surface "
1842 "Written file " << fname_points << " of size "
1843 << Fio.file_size(fname_points) << endl;
1844
1845 if (f_v) {
1846 cout << "surface_with_action::export_points done" << endl;
1847 }
1848
1849}
1850
1852 surface_create *SC,
1853 int verbose_level)
1854{
1855 int f_v = (verbose_level >= 1);
1856
1857 if (f_v) {
1858 cout << "surface_with_action::do_report" << endl;
1859 }
1860
1862
1863 F = PA->F;
1864
1865 {
1866 string fname_report;
1867
1868 if (SC->Descr->f_label_txt) {
1869 fname_report.assign(SC->label_txt);
1870 fname_report.append(".tex");
1871
1872 }
1873 else {
1874 fname_report.assign("surface_");
1875 fname_report.append(SC->label_txt);
1876 fname_report.append("_report.tex");
1877 }
1878
1879 {
1880 ofstream ost(fname_report);
1881
1882
1883 char title[1000];
1884 char author[1000];
1885
1886 snprintf(title, 1000, "%s over GF(%d)", SC->label_tex.c_str(), F->q);
1887 strcpy(author, "");
1888
1890
1891 //latex_head_easy(fp);
1892 L.head(ost,
1893 FALSE /* f_book */,
1894 TRUE /* f_title */,
1895 title, author,
1896 FALSE /*f_toc */,
1897 FALSE /* f_landscape */,
1898 FALSE /* f_12pt */,
1899 TRUE /*f_enlarged_page */,
1900 TRUE /* f_pagenumbers*/,
1901 NULL /* extra_praeamble */);
1902
1903
1904
1905
1906 //ost << "\\subsection*{The surface $" << SC->label_tex << "$}" << endl;
1907
1908
1909 if (SC->SO->SOP == NULL) {
1910 cout << "surface_with_action::create_surface_and_do_report SC->SO->SOP == NULL" << endl;
1911 exit(1);
1912 }
1913
1914
1915 string summary_file_name;
1916 string col_postfix;
1917
1918 if (SC->Descr->f_label_txt) {
1919 summary_file_name.assign(SC->Descr->label_txt);
1920 }
1921 else {
1922 summary_file_name.assign(SC->label_txt);
1923 }
1924 summary_file_name.append("_summary.csv");
1925
1926 char str[1000];
1927
1928 sprintf(str, "-Q%d", F->q);
1929 col_postfix.assign(str);
1930
1931 if (f_v) {
1932 cout << "surface_with_action::create_surface_and_do_report "
1933 "before SC->SO->SOP->create_summary_file" << endl;
1934 }
1935 if (SC->Descr->f_label_for_summary) {
1936 SC->SO->SOP->create_summary_file(summary_file_name,
1937 SC->Descr->label_for_summary, col_postfix, verbose_level);
1938 }
1939 else {
1940 SC->SO->SOP->create_summary_file(summary_file_name,
1941 SC->label_txt, col_postfix, verbose_level);
1942 }
1943 if (f_v) {
1944 cout << "surface_with_action::create_surface_and_do_report "
1945 "after SC->SO->SOP->create_summary_file" << endl;
1946 }
1947
1948
1949#if 0
1950 if (f_v) {
1951 cout << "surface_with_action::create_surface_and_do_report "
1952 "before SC->SO->SOP->print_everything" << endl;
1953 }
1954 SC->SO->SOP->print_everything(ost, verbose_level);
1955 if (f_v) {
1956 cout << "surface_with_action::create_surface_and_do_report "
1957 "after SC->SO->SOP->print_everything" << endl;
1958 }
1959#else
1960 if (f_v) {
1961 cout << "surface_with_action::create_surface_and_do_report "
1962 "before SC->SO->SOP->report_properties_simple" << endl;
1963 }
1964 SC->SO->SOP->report_properties_simple(ost, verbose_level);
1965 if (f_v) {
1966 cout << "surface_with_action::create_surface_and_do_report "
1967 "after SC->SO->SOP->report_properties_simple" << endl;
1968 }
1969#endif
1970
1971
1972 L.foot(ost);
1973 }
1975
1976 cout << "Written file " << fname_report << " of size "
1977 << Fio.file_size(fname_report) << endl;
1978
1979
1980 }
1981 if (f_v) {
1982 cout << "surface_with_action::do_report done" << endl;
1983 }
1984
1985}
1986
1988 surface_create_description *Surface_Descr,
1989 std::string &sweep_fname,
1990 int verbose_level)
1991{
1992 int f_v = (verbose_level >= 1);
1993 int alpha, beta, gamma, delta;
1994
1995 if (f_v) {
1996 cout << "surface_with_action::sweep_4_15_lines" << endl;
1997 }
1998
2000
2001 F = PA->F;
2002
2003 vector<vector<long int>> Properties;
2004 vector<vector<long int>> Points;
2005
2006 string sweep_fname_csv;
2007
2008 sweep_fname_csv.assign(sweep_fname);
2009 char str[1000];
2010
2011 sprintf(str, "_q%d", F->q);
2012 sweep_fname_csv.assign(Surface_Descr->equation_name_of_formula);
2013 sweep_fname_csv.append(str);
2014 sweep_fname_csv.append("_sweep4_15_data.csv");
2015
2016
2017 {
2018 ofstream ost_csv(sweep_fname_csv);
2019
2020 ost_csv << "orbit,equation,pts,parameters,nb_lines,nb_sing_pts,go" << endl;
2021
2022 for (alpha = 0; alpha < F->q; alpha++) {
2023
2024#if 1
2025 if (alpha == 0) {
2026 continue;
2027 }
2028
2029 if (alpha == 1) {
2030 continue;
2031 }
2032#endif
2033
2034 cout << "alpha=" << alpha << endl;
2035
2036 for (beta = 0; beta < F->q; beta++) {
2037
2038#if 1
2039 if (beta == 0) {
2040 continue;
2041 }
2042
2043 if (beta == F->negate(1)) {
2044 continue;
2045 }
2046#endif
2047
2048 cout << "alpha=" << alpha << " beta=" << beta << endl;
2049
2050 for (gamma = 0; gamma < F->q; gamma++) {
2051
2052#if 1
2053 if (gamma == 0) {
2054 continue;
2055 }
2056
2057 if (gamma == F->negate(1)) {
2058 continue;
2059 }
2060#endif
2061
2062 cout << "alpha=" << alpha << " beta=" << beta << " gamma=" << gamma << endl;
2063
2064
2065 for (delta = 0; delta < F->q; delta++) {
2066
2067
2068#if 1
2069 if (delta == 0) {
2070 continue;
2071 }
2072
2073 if (delta == F->negate(1)) {
2074 continue;
2075 }
2076
2077 if (delta == beta) {
2078 continue;
2079 }
2080#endif
2081
2082 cout << "alpha=" << alpha << " beta=" << beta
2083 << " delta=" << delta << " gamma=" << gamma << endl;
2084
2085#if 0
2086 if (delta == F->mult(F->mult(alpha, beta),F->inverse(F->add(alpha,F->negate(1))))) {
2087 continue;
2088 }
2089#endif
2090
2091
2092
2093#if 0
2094 if (gamma == F->mult((F->add3(1,F->mult(F->negate(1),alpha),F->negate(F->mult(alpha,beta)))),
2095 F->inverse(F->add3(F->mult(alpha,beta),F->negate(F->mult(alpha,delta)),delta)))) {
2096 continue;
2097 }
2098#endif
2099
2100
2101
2102 char str[1000];
2103
2104 sprintf(str, "alpha=%d,beta=%d,gamma=%d,delta=%d", alpha, beta, gamma, delta);
2105
2106
2107 Surface_Descr->equation_parameters.assign(str);
2108
2109 //int f_by_equation;
2110 //std::string equation_name_of_formula;
2111 //std::string equation_name_of_formula_tex;
2112 //std::string equation_managed_variables;
2113 //std::string equation_text;
2114 //std::string equation_parameters;
2115 //std::string equation_parameters_tex;
2116
2117
2118 surface_create *SC;
2120
2121 if (f_v) {
2122 cout << "surface_with_action::sweep_4_15_lines before SC->init" << endl;
2123 }
2124 SC->init(Surface_Descr, this /*Surf_A*/, verbose_level);
2125 if (f_v) {
2126 cout << "surface_with_action::sweep_4_15_lines after SC->init" << endl;
2127 }
2128
2129
2130
2131#if 0
2132 if (f_v) {
2133 cout << "surface_with_action::sweep_4_15_lines "
2134 "before SC->apply_transformations" << endl;
2135 }
2136 SC->apply_transformations(Surface_Descr->transform_coeffs,
2137 Surface_Descr->f_inverse_transform,
2138 verbose_level - 2);
2139
2140 if (f_v) {
2141 cout << "surface_with_action::sweep_4_15_lines "
2142 "after SC->apply_transformations" << endl;
2143 }
2144#endif
2145
2146 cout << "the number of lines is " << SC->SO->nb_lines << endl;
2147
2148 SC->SO->SOP->print_everything(cout, verbose_level);
2149
2150#if 1
2151 if (SC->SO->nb_lines != 15) {
2152 cout << "the number of lines is " << SC->SO->nb_lines << " skipping" << endl;
2153 continue;
2154 }
2155 if (SC->SO->SOP->nb_singular_pts) {
2156 cout << "the number of singular points is " << SC->SO->SOP->nb_singular_pts << " skipping" << endl;
2157 continue;
2158 }
2159#endif
2160
2161
2162 vector<long int> Props;
2163 vector<long int> Pts;
2164
2165 Props.push_back(alpha);
2166 Props.push_back(beta);
2167 Props.push_back(gamma);
2168 Props.push_back(delta);
2169 Props.push_back(SC->SO->nb_lines);
2170 Props.push_back(SC->SO->nb_pts);
2171 Props.push_back(SC->SO->SOP->nb_singular_pts);
2172 Props.push_back(SC->SO->SOP->nb_Eckardt_points);
2173 Props.push_back(SC->SO->SOP->nb_Double_points);
2174 Props.push_back(SC->SO->SOP->nb_Single_points);
2175 Props.push_back(SC->SO->SOP->nb_pts_not_on_lines);
2176 Props.push_back(SC->SO->SOP->nb_Hesse_planes);
2177 Props.push_back(SC->SO->SOP->nb_axes);
2178 Properties.push_back(Props);
2179
2180 int i;
2181 for (i = 0; i < SC->SO->nb_pts; i++) {
2182 Pts.push_back(SC->SO->Pts[i]);
2183 }
2184 Points.push_back(Pts);
2185
2186
2187 ost_csv << Properties.size() - 1;
2188 ost_csv << ",";
2189
2190 {
2191 string str;
2193 ost_csv << str;
2194 }
2195
2196 ost_csv << ",";
2197
2198 {
2199 string str;
2201 ost_csv << str;
2202 }
2203
2204 ost_csv << ",";
2205
2206 {
2207 int params[4];
2208
2209 params[0] = alpha;
2210 params[1] = beta;
2211 params[2] = gamma;
2212 params[3] = delta;
2213 string str;
2215 ost_csv << str;
2216 }
2217
2218 ost_csv << ",";
2219
2220 ost_csv << SC->SO->nb_lines;
2221 ost_csv << ",";
2222
2223 ost_csv << SC->SO->SOP->nb_singular_pts;
2224 ost_csv << ",";
2225
2226 ost_csv << -1;
2227 ost_csv << endl;
2228
2229
2230
2231 FREE_OBJECT(SC);
2232
2233 } // delta
2234
2235 } // gamma
2236
2237 } // beta
2238
2239 } // alpha
2240 ost_csv << "END" << endl;
2241 }
2243 cout << "Written file " << sweep_fname_csv << " of size " << Fio.file_size(sweep_fname_csv) << endl;
2244
2245
2246 long int *T;
2247 int i, j, N;
2248
2249 N = Properties.size();
2250
2251 T = NEW_lint(N * 13);
2252 for (i = 0; i < N; i++) {
2253 for (j = 0; j < 13; j++) {
2254 T[i * 13 + j] = Properties[i][j];
2255 }
2256 }
2257 std::string fname;
2258 //char str[1000];
2259
2260 sprintf(str, "_q%d", F->q);
2261 fname.assign(Surface_Descr->equation_name_of_formula);
2262 fname.append(str);
2263 fname.append("_sweep.csv");
2264
2265 Fio.lint_matrix_write_csv(fname, T, N, 13);
2266 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
2267
2268
2269 fname.assign(Surface_Descr->equation_name_of_formula);
2270 fname.append(str);
2271 fname.append("_points.txt");
2272
2273
2274 {
2275 ofstream ost(fname);
2276
2277 for (i = 0; i < N; i++) {
2278 long int sz = Points[i].size();
2279 ost << sz;
2280 for (j = 0; j < sz; j++) {
2281 ost << " " << Points[i][j];
2282 }
2283 ost << endl;
2284 }
2285 ost << "-1" << endl;
2286
2287 }
2288 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
2289
2290
2291
2292
2293 FREE_lint(T);
2294
2295 if (f_v) {
2296 cout << "surface_with_action::sweep_4_15_lines done" << endl;
2297 }
2298}
2299
2300
2302 surface_create_description *Surface_Descr,
2303 std::string &sweep_fname,
2304 int verbose_level)
2305{
2306 int f_v = (verbose_level >= 1);
2307 int b;
2308
2309 if (f_v) {
2310 cout << "surface_with_action::sweep_F_beta_9_lines" << endl;
2311 }
2312
2314
2315 F = PA->F;
2316
2317 vector<vector<long int>> Properties;
2318 vector<vector<long int>> Points;
2319
2320 string sweep_fname_csv;
2321
2322 sweep_fname_csv.assign(sweep_fname);
2323 char str[1000];
2324
2325 sprintf(str, "_q%d", F->q);
2326 sweep_fname_csv.assign(Surface_Descr->equation_name_of_formula);
2327 sweep_fname_csv.append(str);
2328 sweep_fname_csv.append("_sweep_F_beta_9_lines_data.csv");
2329
2330
2331 {
2332 ofstream ost_csv(sweep_fname_csv);
2333
2334 ost_csv << "orbit,equation,pts,parameters,nb_lines,nb_sing_pts,go" << endl;
2335
2336 for (b = 0; b < F->q; b++) {
2337
2338 int t1, t2, t3, t4, three;
2339
2340 three = F->add3(1, 1, 1);
2341
2342 t1 = F->add3(F->mult(b, b), b, 1);
2343 t2 = F->add3(F->mult(b, b), F->negate(b), F->negate(1));
2344 t3 = F->add3(F->mult(b, b), b, F->negate(1));
2345 t4 = F->add3(F->mult(b, b), F->mult(three, b), 1);
2346
2347 cout << "b=" << b << ",t1=" << t1 << ",t2=" << t2 << ",t3=" << t3 << ",t4=" << t4 << endl;
2348
2349 if (t1 == 0 || t2 == 0 || t3 == 0 || t4 == 0) {
2350 continue;
2351 }
2352
2353 cout << "b=" << b << endl;
2354
2355
2356
2357 int a, c, d;
2358
2359 a = F->mult(b, b);
2360 c = b;
2361 d = F->mult(b, b);
2362
2363
2364
2365
2366 char str[1000];
2367
2368 sprintf(str, "a=%d,b=%d,c=%d,d=%d", a, b, c, d);
2369
2370
2371 Surface_Descr->equation_parameters.assign(str);
2372
2373
2374 surface_create *SC;
2376
2377 if (f_v) {
2378 cout << "surface_with_action::sweep_F_beta_9_lines before SC->init" << endl;
2379 }
2380 SC->init(Surface_Descr, this /*Surf_A*/, 0 /*verbose_level*/);
2381 if (f_v) {
2382 cout << "surface_with_action::sweep_F_beta_9_lines after SC->init" << endl;
2383 }
2384
2385
2386
2387
2388 cout << "the number of lines is " << SC->SO->nb_lines << endl;
2389
2390 //SC->SO->SOP->print_everything(cout, verbose_level);
2391
2392#if 1
2393 if (SC->SO->nb_lines != 9) {
2394 cout << "the number of lines is " << SC->SO->nb_lines << " skipping" << endl;
2395 continue;
2396 }
2397 if (SC->SO->SOP->nb_singular_pts) {
2398 cout << "the number of singular points is " << SC->SO->SOP->nb_singular_pts << " skipping" << endl;
2399 continue;
2400 }
2401#endif
2402
2403
2404 vector<long int> Props;
2405 vector<long int> Pts;
2406
2407 Props.push_back(a);
2408 Props.push_back(b);
2409 Props.push_back(c);
2410 Props.push_back(d);
2411 Props.push_back(SC->SO->nb_lines);
2412 Props.push_back(SC->SO->nb_pts);
2413 Props.push_back(SC->SO->SOP->nb_singular_pts);
2414 Props.push_back(SC->SO->SOP->nb_Eckardt_points);
2415 Props.push_back(SC->SO->SOP->nb_Double_points);
2416 Props.push_back(SC->SO->SOP->nb_Single_points);
2417 Props.push_back(SC->SO->SOP->nb_pts_not_on_lines);
2418 Props.push_back(SC->SO->SOP->nb_Hesse_planes);
2419 Props.push_back(SC->SO->SOP->nb_axes);
2420 Properties.push_back(Props);
2421
2422 int i;
2423 for (i = 0; i < SC->SO->nb_pts; i++) {
2424 Pts.push_back(SC->SO->Pts[i]);
2425 }
2426 Points.push_back(Pts);
2427
2428
2429 ost_csv << Properties.size() - 1;
2430 ost_csv << ",";
2431
2432 {
2433 string str;
2435 ost_csv << str;
2436 }
2437
2438 ost_csv << ",";
2439
2440 {
2441 string str;
2443 ost_csv << str;
2444 }
2445
2446 ost_csv << ",";
2447
2448 {
2449 int params[4];
2450
2451 params[0] = a;
2452 params[1] = b;
2453 params[2] = c;
2454 params[3] = d;
2455 string str;
2457 ost_csv << str;
2458 }
2459
2460 ost_csv << ",";
2461
2462 ost_csv << SC->SO->nb_lines;
2463 ost_csv << ",";
2464
2465 ost_csv << SC->SO->SOP->nb_singular_pts;
2466 ost_csv << ",";
2467
2468 ost_csv << -1;
2469 ost_csv << endl;
2470
2471
2472
2473 FREE_OBJECT(SC);
2474
2475
2476 } // b
2477 ost_csv << "END" << endl;
2478 }
2480 cout << "Written file " << sweep_fname_csv << " of size " << Fio.file_size(sweep_fname_csv) << endl;
2481
2482 long int *T;
2483 int i, j, N, nb_cols = 13;
2484
2485 N = Properties.size();
2486
2487 cout << "The number of valid parameter sets found is " << N << endl;
2488
2489
2490 T = NEW_lint(N * nb_cols);
2491 for (i = 0; i < N; i++) {
2492 for (j = 0; j < nb_cols; j++) {
2493 T[i * nb_cols + j] = Properties[i][j];
2494 }
2495 }
2496 std::string fname;
2497
2498 sprintf(str, "_q%d", F->q);
2499 fname.assign(Surface_Descr->equation_name_of_formula);
2500 fname.append(str);
2501 fname.append("_sweep_F_beta_9_lines.csv");
2502
2503 Fio.lint_matrix_write_csv(fname, T, N, nb_cols);
2504 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
2505
2506
2507 fname.assign(Surface_Descr->equation_name_of_formula);
2508 fname.append(str);
2509 fname.append("_points.txt");
2510
2511
2512 {
2513 ofstream ost(fname);
2514
2515 for (i = 0; i < N; i++) {
2516 long int sz = Points[i].size();
2517 ost << sz;
2518 for (j = 0; j < sz; j++) {
2519 ost << " " << Points[i][j];
2520 }
2521 ost << endl;
2522 }
2523 ost << "-1" << endl;
2524
2525 }
2526 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
2527
2528
2529
2530
2531 FREE_lint(T);
2532
2533 if (f_v) {
2534 cout << "surface_with_action::sweep_F_beta_9_lines done" << endl;
2535 }
2536}
2537
2538
2539
2541 surface_create_description *Surface_Descr,
2542 std::string &sweep_fname,
2543 int verbose_level)
2544{
2545 int f_v = (verbose_level >= 1);
2546 int a, b, c, d, f, g;
2547
2548 if (f_v) {
2549 cout << "surface_with_action::sweep_6_9_lines" << endl;
2550 }
2551
2553
2554 F = PA->F;
2555
2556 vector<vector<long int>> Properties;
2557 vector<vector<long int>> Points;
2558
2559 string sweep_fname_csv;
2560
2561 sweep_fname_csv.assign(sweep_fname);
2562 char str[1000];
2563
2564 sprintf(str, "_q%d", F->q);
2565 sweep_fname_csv.assign(Surface_Descr->equation_name_of_formula);
2566 sweep_fname_csv.append(str);
2567 sweep_fname_csv.append("_sweep_6_9_lines_data.csv");
2568
2569
2570 {
2571 ofstream ost_csv(sweep_fname_csv);
2572
2573 ost_csv << "orbit,equation,pts,parameters,nb_lines,nb_sing_pts,go" << endl;
2574
2575 for (a = 0; a < F->q; a++) {
2576
2577 if (a == 0) {
2578 continue;
2579 }
2580
2581 if (a == 1) {
2582 continue;
2583 }
2584
2585 cout << "a=" << a << endl;
2586
2587 for (c = 0; c < F->q; c++) {
2588
2589 if (c == 0) {
2590 continue;
2591 }
2592
2593 if (c == 1) {
2594 continue;
2595 }
2596
2597 cout << "a=" << a << " c=" << c << endl;
2598
2599 for (d = 0; d < F->q; d++) {
2600
2601 if (d == 0) {
2602 continue;
2603 }
2604
2605 if (d == F->negate(1)) {
2606 continue;
2607 }
2608
2609 cout << "a=" << a << " c=" << c << " d=" << d << endl;
2610
2611
2612 for (f = 0; f < F->q; f++) {
2613
2614 if (f == 0) {
2615 continue;
2616 }
2617
2618 cout << "a=" << a << " c=" << c << " d=" << d << " f=" << f << endl;
2619
2620 for (g = 0; g < F->q; g++) {
2621
2622
2623 if (g == 0) {
2624 continue;
2625 }
2626 if (g == f) {
2627 continue;
2628 }
2629
2630 int top, bottom, t;
2631
2632 top = F->add4(F->mult(c, f), F->mult(d, f), f, F->negate(c));
2633 bottom = F->add(d, 1);
2634 t = F->mult(top, F->inverse(bottom));
2635
2636 if (g == t) {
2637 continue;
2638 }
2639
2640 cout << "a=" << a << " c=" << c << " d=" << d << " f=" << f << " g=" << g << endl;
2641
2642
2643 for (b = 0; b < F->q; b++) {
2644
2645
2646 if (b == 0) {
2647 continue;
2648 }
2649 if (b == F->negate(1)) {
2650 continue;
2651 }
2652 if (b == d) {
2653 continue;
2654 }
2655
2656 top = F->add(F->mult(a, g), F->negate(a));
2657 bottom = F->add(f, F->negate(g));
2658 t = F->mult(top, F->inverse(bottom));
2659
2660 if (b == t) {
2661 continue;
2662 }
2663
2664
2665 top = F->mult(F->negate(a), F->add3(c, d, 1));
2666 bottom = c;
2667 t = F->mult(top, F->inverse(bottom));
2668
2669 if (b == t) {
2670 continue;
2671 }
2672
2673
2674 top = F->mult(F->negate(a), F->add3(F->mult(d, g), c, g));
2675 bottom = F->mult(c, f);
2676 t = F->mult(top, F->inverse(bottom));
2677
2678 if (b == t) {
2679 continue;
2680 }
2681
2682
2683
2684 cout << "a=" << a << " c=" << c << " d=" << d << " f=" << f << " g=" << g << " b=" << b << endl;
2685
2686
2687
2688
2689
2690
2691 char str[1000];
2692
2693 sprintf(str, "a=%d,b=%d,c=%d,d=%d,f=%d,g=%d", a, b, c, d, f, g);
2694
2695
2696 Surface_Descr->equation_parameters.assign(str);
2697
2698
2699 surface_create *SC;
2701
2702 if (f_v) {
2703 cout << "surface_with_action::sweep_6_9_lines before SC->init" << endl;
2704 }
2705 SC->init(Surface_Descr, this /*Surf_A*/, verbose_level);
2706 if (f_v) {
2707 cout << "surface_with_action::sweep_6_9_lines after SC->init" << endl;
2708 }
2709
2710
2711
2712
2713 cout << "the number of lines is " << SC->SO->nb_lines << endl;
2714
2715 SC->SO->SOP->print_everything(cout, verbose_level);
2716
2717#if 1
2718 if (SC->SO->nb_lines != 9) {
2719 cout << "the number of lines is " << SC->SO->nb_lines << " skipping" << endl;
2720 continue;
2721 }
2722 if (SC->SO->SOP->nb_singular_pts) {
2723 cout << "the number of singular points is " << SC->SO->SOP->nb_singular_pts << " skipping" << endl;
2724 continue;
2725 }
2726#endif
2727
2728
2729 vector<long int> Props;
2730 vector<long int> Pts;
2731
2732 Props.push_back(a);
2733 Props.push_back(b);
2734 Props.push_back(c);
2735 Props.push_back(d);
2736 Props.push_back(f);
2737 Props.push_back(g);
2738 Props.push_back(SC->SO->nb_lines);
2739 Props.push_back(SC->SO->nb_pts);
2740 Props.push_back(SC->SO->SOP->nb_singular_pts);
2741 Props.push_back(SC->SO->SOP->nb_Eckardt_points);
2742 Props.push_back(SC->SO->SOP->nb_Double_points);
2743 Props.push_back(SC->SO->SOP->nb_Single_points);
2744 Props.push_back(SC->SO->SOP->nb_pts_not_on_lines);
2745 Props.push_back(SC->SO->SOP->nb_Hesse_planes);
2746 Props.push_back(SC->SO->SOP->nb_axes);
2747 Properties.push_back(Props);
2748
2749 int i;
2750 for (i = 0; i < SC->SO->nb_pts; i++) {
2751 Pts.push_back(SC->SO->Pts[i]);
2752 }
2753 Points.push_back(Pts);
2754
2755
2756 ost_csv << Properties.size() - 1;
2757 ost_csv << ",";
2758
2759 {
2760 string str;
2762 ost_csv << str;
2763 }
2764
2765 ost_csv << ",";
2766
2767 {
2768 string str;
2770 ost_csv << str;
2771 }
2772
2773 ost_csv << ",";
2774
2775 {
2776 int params[6];
2777
2778 params[0] = a;
2779 params[1] = b;
2780 params[2] = c;
2781 params[3] = d;
2782 params[4] = f;
2783 params[5] = g;
2784 string str;
2786 ost_csv << str;
2787 }
2788
2789 ost_csv << ",";
2790
2791 ost_csv << SC->SO->nb_lines;
2792 ost_csv << ",";
2793
2794 ost_csv << SC->SO->SOP->nb_singular_pts;
2795 ost_csv << ",";
2796
2797 ost_csv << -1;
2798 ost_csv << endl;
2799
2800
2801
2802 FREE_OBJECT(SC);
2803
2804 } // b
2805 } // g
2806 } // f
2807
2808 } // d
2809
2810 } // c
2811
2812 } // a
2813 ost_csv << "END" << endl;
2814 }
2816 cout << "Written file " << sweep_fname_csv << " of size " << Fio.file_size(sweep_fname_csv) << endl;
2817
2818 long int *T;
2819 int i, j, N, nb_cols = 15;
2820
2821 N = Properties.size();
2822
2823 cout << "The number of valid parameter sets found is " << N << endl;
2824
2825
2826 T = NEW_lint(N * nb_cols);
2827 for (i = 0; i < N; i++) {
2828 for (j = 0; j < nb_cols; j++) {
2829 T[i * nb_cols + j] = Properties[i][j];
2830 }
2831 }
2832 std::string fname;
2833
2834 sprintf(str, "_q%d", F->q);
2835 fname.assign(Surface_Descr->equation_name_of_formula);
2836 fname.append(str);
2837 fname.append("_sweep_6_9_lines.csv");
2838
2839 Fio.lint_matrix_write_csv(fname, T, N, nb_cols);
2840 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
2841
2842
2843 fname.assign(Surface_Descr->equation_name_of_formula);
2844 fname.append(str);
2845 fname.append("_points.txt");
2846
2847
2848 {
2849 ofstream ost(fname);
2850
2851 for (i = 0; i < N; i++) {
2852 long int sz = Points[i].size();
2853 ost << sz;
2854 for (j = 0; j < sz; j++) {
2855 ost << " " << Points[i][j];
2856 }
2857 ost << endl;
2858 }
2859 ost << "-1" << endl;
2860
2861 }
2862 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
2863
2864
2865
2866
2867 FREE_lint(T);
2868
2869 if (f_v) {
2870 cout << "surface_with_action::sweep_6_9_lines done" << endl;
2871 }
2872}
2873
2874
2876 surface_create_description *Surface_Descr,
2877 std::string &sweep_fname,
2878 int verbose_level)
2879{
2880 int f_v = (verbose_level >= 1);
2881 int a, b, c, d;
2882 int m;
2883
2884 if (f_v) {
2885 cout << "surface_with_action::sweep_4_27" << endl;
2886 }
2887
2889
2890 F = PA->F;
2891
2892 m = F->negate(1);
2893
2894 vector<vector<long int>> Properties;
2895 vector<vector<long int>> Points;
2896
2897
2898 for (a = 0; a < F->q; a++) {
2899
2900 if (a == 0) {
2901 continue;
2902 }
2903
2904 if (a == 1) {
2905 continue;
2906 }
2907
2908
2909 for (b = 0; b < F->q; b++) {
2910
2911 if (b == 0) {
2912 continue;
2913 }
2914
2915 if (b == 1) {
2916 continue;
2917 }
2918
2919 if (b == a) {
2920 continue;
2921 }
2922
2923 for (c = 0; c < F->q; c++) {
2924
2925 if (c == 0) {
2926 continue;
2927 }
2928
2929 if (c == 1) {
2930 continue;
2931 }
2932 if (c == a) {
2933 continue;
2934 }
2935
2936 for (d = 0; d < F->q; d++) {
2937
2938
2939 if (d == 0) {
2940 continue;
2941 }
2942
2943 if (d == 1) {
2944 continue;
2945 }
2946
2947 if (d == b) {
2948 continue;
2949 }
2950 if (d == c) {
2951 continue;
2952 }
2953
2954 cout << "a=" << a << " b=" << b << " c=" << c << " d=" << d << endl;
2955
2956 int delta, epsilon, gamma;
2957
2958 delta = F->add(F->mult(a, d), F->negate(F->mult(b, c)));
2959 epsilon = F->add6(
2960 F->mult3(a, b, c),
2961 F->mult4(m, a, b, d),
2962 F->mult4(m, a, c, d),
2963 F->mult3(b, c, d),
2964 F->mult(a, d),
2965 F->mult3(m, b, c)
2966 );
2967 gamma = F->add6(
2968 F->mult(a, d),
2969 F->mult3(m, b, c),
2970 F->mult(m, a),
2971 b,
2972 c,
2973 F->mult(m, d)
2974 );
2975
2976 if (delta == 0) {
2977 continue;
2978 }
2979 if (epsilon == 0) {
2980 continue;
2981 }
2982 if (gamma == 0) {
2983 continue;
2984 }
2985
2986
2987 char str[1000];
2988
2989 sprintf(str, "a=%d,b=%d,c=%d,d=%d", a, b, c, d);
2990
2991
2992 Surface_Descr->equation_parameters.assign(str);
2993
2994 //int f_by_equation;
2995 //std::string equation_name_of_formula;
2996 //std::string equation_name_of_formula_tex;
2997 //std::string equation_managed_variables;
2998 //std::string equation_text;
2999 //std::string equation_parameters;
3000 //std::string equation_parameters_tex;
3001
3002
3003 surface_create *SC;
3005
3006 if (f_v) {
3007 cout << "surface_with_action::sweep_4_27 before SC->init" << endl;
3008 }
3009 SC->init(Surface_Descr, this /*Surf_A*/, verbose_level);
3010 if (f_v) {
3011 cout << "surface_with_action::sweep_4_27 after SC->init" << endl;
3012 }
3013
3014
3015
3016
3017
3018#if 0
3019 if (SC->SO->nb_lines != 15) {
3020 continue;
3021 }
3022 if (SC->SO->SOP->nb_singular_pts) {
3023 continue;
3024 }
3025#endif
3026
3027
3028 vector<long int> Props;
3029 vector<long int> Pts;
3030
3031 Props.push_back(a);
3032 Props.push_back(b);
3033 Props.push_back(c);
3034 Props.push_back(d);
3035 Props.push_back(delta);
3036 Props.push_back(epsilon);
3037 Props.push_back(gamma);
3038 Props.push_back(SC->SO->nb_lines);
3039 Props.push_back(SC->SO->nb_pts);
3040 Props.push_back(SC->SO->SOP->nb_singular_pts);
3041 Props.push_back(SC->SO->SOP->nb_Eckardt_points);
3042 Props.push_back(SC->SO->SOP->nb_Double_points);
3043 Props.push_back(SC->SO->SOP->nb_Single_points);
3044 Props.push_back(SC->SO->SOP->nb_pts_not_on_lines);
3045 Props.push_back(SC->SO->SOP->nb_Hesse_planes);
3046 Props.push_back(SC->SO->SOP->nb_axes);
3047 Properties.push_back(Props);
3048
3049 int i;
3050 for (i = 0; i < SC->SO->nb_pts; i++) {
3051 Pts.push_back(SC->SO->Pts[i]);
3052 }
3053 Points.push_back(Pts);
3054
3055 FREE_OBJECT(SC);
3056
3057 } // d
3058
3059 } // c
3060
3061 } // b
3062
3063 } // a
3064
3065
3066 long int *T;
3067 int i, j, N;
3068
3069 N = Properties.size();
3070
3071 T = NEW_lint(N * 16);
3072 for (i = 0; i < N; i++) {
3073 for (j = 0; j < 16; j++) {
3074 T[i * 16 + j] = Properties[i][j];
3075 }
3076 }
3078 std::string fname;
3079 char str[1000];
3080
3081 sprintf(str, "_q%d", F->q);
3082 fname.assign(Surface_Descr->equation_name_of_formula);
3083 fname.append(str);
3084 fname.append("_sweep_4_27.csv");
3085
3086 Fio.lint_matrix_write_csv(fname, T, N, 16);
3087 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
3088
3089
3090 fname.assign(Surface_Descr->equation_name_of_formula);
3091 fname.append(str);
3092 fname.append("_points.txt");
3093
3094
3095 {
3096 ofstream ost(fname);
3097
3098 for (i = 0; i < N; i++) {
3099 long int sz = Points[i].size();
3100 ost << sz;
3101 for (j = 0; j < sz; j++) {
3102 ost << " " << Points[i][j];
3103 }
3104 ost << endl;
3105 }
3106 ost << "-1" << endl;
3107
3108 }
3109 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
3110
3111
3112
3113
3114 FREE_lint(T);
3115
3116 if (f_v) {
3117 cout << "surface_with_action::sweep_4_27 done" << endl;
3118 }
3119}
3120
3122{
3123 int f_v = (verbose_level >= 1);
3124
3125 if (f_v) {
3126 cout << "surface_with_action::table_of_cubic_surfaces" << endl;
3127 }
3128
3129
3131
3132 F = PA->F;
3133
3134 int q;
3135
3136 q = F->q;
3137
3139
3140 int nb_cubic_surfaces;
3141 int h;
3142 surface_create **SC;
3143 int *nb_E;
3144 long int *Table;
3145 int nb_cols = 19;
3146
3147
3149
3150
3151 nb_cubic_surfaces = K.cubic_surface_nb_reps(q);
3152
3153 SC = (surface_create **) NEW_pvoid(nb_cubic_surfaces);
3154
3155 nb_E = NEW_int(nb_cubic_surfaces);
3156
3157 Table = NEW_lint(nb_cubic_surfaces * nb_cols);
3158
3159
3160
3161
3162 for (h = 0; h < nb_cubic_surfaces; h++) {
3163
3164 if (f_v) {
3165 cout << "surface_with_action::table_of_cubic_surfaces " << h << " / " << nb_cubic_surfaces << endl;
3166 }
3167 surface_create_description Surface_create_description;
3168
3169 Surface_create_description.f_q = TRUE;
3170 Surface_create_description.q = q;
3171 Surface_create_description.f_catalogue = TRUE;
3172 Surface_create_description.iso = h;
3173
3174
3175 if (f_v) {
3176 cout << "surface_with_action::table_of_cubic_surfaces before create_surface" << endl;
3177 }
3179 &Surface_create_description,
3180 SC[h],
3181 verbose_level);
3182 if (f_v) {
3183 cout << "surface_with_action::table_of_cubic_surfaces after create_surface" << endl;
3184 }
3185
3186
3187
3188 nb_E[h] = SC[h]->SO->SOP->nb_Eckardt_points;
3189
3190
3191 if (!SC[h]->f_has_group) {
3192 cout << "!SC[h]->f_has_group" << endl;
3193 exit(1);
3194 }
3195
3197
3199
3200 if (f_v) {
3201 cout << "surface_with_action::table_of_cubic_surfaces before SoA->init_with_surface_object" << endl;
3202 }
3203 SoA->init_with_surface_object(this,
3204 SC[h]->SO,
3205 SC[h]->Sg,
3206 FALSE /* f_has_nice_gens */, NULL /* vector_ge *nice_gens */,
3207 verbose_level);
3208 if (f_v) {
3209 cout << "surface_with_action::table_of_cubic_surfaces after SoA->init_with_surface_object" << endl;
3210 }
3211
3212
3213
3214 Table[h * nb_cols + 0] = h;
3215
3216 if (f_v) {
3217 cout << "collineation stabilizer order" << endl;
3218 }
3219 if (SC[h]->f_has_group) {
3220 Table[h * nb_cols + 1] = SC[h]->Sg->group_order_as_lint();
3221 }
3222 else {
3223 Table[h * nb_cols + 1] = 0;
3224 }
3225 if (f_v) {
3226 cout << "projectivity stabilizer order" << endl;
3227 }
3229 Table[h * nb_cols + 2] = SoA->projectivity_group_gens->group_order_as_lint();
3230 }
3231 else {
3232 Table[h * nb_cols + 2] = SC[h]->Sg->group_order_as_lint();
3233 }
3234
3235 Table[h * nb_cols + 3] = SC[h]->SO->nb_pts;
3236 Table[h * nb_cols + 4] = SC[h]->SO->nb_lines;
3237 Table[h * nb_cols + 5] = SC[h]->SO->SOP->nb_Eckardt_points;
3238 Table[h * nb_cols + 6] = SC[h]->SO->SOP->nb_Double_points;
3239 Table[h * nb_cols + 7] = SC[h]->SO->SOP->nb_Single_points;
3240 Table[h * nb_cols + 8] = SC[h]->SO->SOP->nb_pts_not_on_lines;
3241 Table[h * nb_cols + 9] = SC[h]->SO->SOP->nb_Hesse_planes;
3242 Table[h * nb_cols + 10] = SC[h]->SO->SOP->nb_axes;
3243 if (f_v) {
3244 cout << "SoA->Orbits_on_Eckardt_points->nb_orbits" << endl;
3245 }
3246 Table[h * nb_cols + 11] = SoA->Orbits_on_Eckardt_points->nb_orbits;
3247 Table[h * nb_cols + 12] = SoA->Orbits_on_Double_points->nb_orbits;
3248 Table[h * nb_cols + 13] = SoA->Orbits_on_points_not_on_lines->nb_orbits;
3249 Table[h * nb_cols + 14] = SoA->Orbits_on_lines->nb_orbits;
3250 Table[h * nb_cols + 15] = SoA->Orbits_on_single_sixes->nb_orbits;
3251 Table[h * nb_cols + 16] = SoA->Orbits_on_tritangent_planes->nb_orbits;
3252 Table[h * nb_cols + 17] = SoA->Orbits_on_Hesse_planes->nb_orbits;
3253 Table[h * nb_cols + 18] = SoA->Orbits_on_trihedral_pairs->nb_orbits;
3254 //Table[h * nb_cols + 19] = SoA->Orbits_on_tritangent_planes->nb_orbits;
3255
3256
3257 FREE_OBJECT(SoA);
3258
3259
3260 } // next h
3261
3262
3263#if 0
3264 strong_generators *projectivity_group_gens;
3265 sylow_structure *Syl;
3266
3267 action *A_on_points;
3268 action *A_on_Eckardt_points;
3269 action *A_on_Double_points;
3270 action *A_on_the_lines;
3271 action *A_single_sixes;
3272 action *A_on_tritangent_planes;
3273 action *A_on_Hesse_planes;
3274 action *A_on_trihedral_pairs;
3275 action *A_on_pts_not_on_lines;
3276
3277
3278 schreier *Orbits_on_points;
3279 schreier *Orbits_on_Eckardt_points;
3280 schreier *Orbits_on_Double_points;
3281 schreier *Orbits_on_lines;
3282 schreier *Orbits_on_single_sixes;
3283 schreier *Orbits_on_tritangent_planes;
3284 schreier *Orbits_on_Hesse_planes;
3285 schreier *Orbits_on_trihedral_pairs;
3286 schreier *Orbits_on_points_not_on_lines;
3287#endif
3288
3289#if 0
3290 set_of_sets *pts_on_lines;
3291 // points are stored as indices into Pts[]
3292 int *f_is_on_line; // [SO->nb_pts]
3293
3294
3295 set_of_sets *lines_on_point;
3296 tally *Type_pts_on_lines;
3297 tally *Type_lines_on_point;
3298
3299 long int *Eckardt_points; // the orbiter rank of the Eckardt points
3300 int *Eckardt_points_index; // index into SO->Pts
3301 int *Eckardt_points_schlaefli_labels; // Schlaefli labels
3302 int *Eckardt_point_bitvector_in_Schlaefli_labeling;
3303 // true if the i-th Eckardt point in the Schlaefli labeling is present
3304 int nb_Eckardt_points;
3305
3306 int *Eckardt_points_line_type; // [nb_Eckardt_points + 1]
3307 int *Eckardt_points_plane_type; // [SO->Surf->P->Nb_subspaces[2]]
3308
3309 long int *Hesse_planes;
3310 int nb_Hesse_planes;
3311 int *Eckardt_point_Hesse_plane_incidence; // [nb_Eckardt_points * nb_Hesse_planes]
3312
3313
3314 int nb_axes;
3315 int *Axes_index; // [nb_axes] two times the index into trihedral pairs + 0 or +1
3316 long int *Axes_Eckardt_points; // [nb_axes * 3] the Eckardt points in Schlaefli labels that lie on the axes
3317 long int *Axes_line_rank;
3318
3319
3320 long int *Double_points;
3321 int *Double_points_index;
3322 int nb_Double_points;
3323
3324 long int *Single_points;
3325 int *Single_points_index;
3326 int nb_Single_points;
3327
3328 long int *Pts_not_on_lines;
3329 int nb_pts_not_on_lines;
3330
3331 int nb_planes;
3332 int *plane_type_by_points;
3333 int *plane_type_by_lines;
3334 tally *C_plane_type_by_points;
3335
3336 long int *Tritangent_plane_rk; // [45]
3337 // list of tritangent planes in Schlaefli labeling
3338 int nb_tritangent_planes;
3339
3340 long int *Lines_in_tritangent_planes; // [nb_tritangent_planes * 3]
3341
3342 long int *Trihedral_pairs_as_tritangent_planes; // [nb_trihedral_pairs * 6]
3343
3344 long int *All_Planes; // [nb_trihedral_pairs * 6]
3345 int *Dual_point_ranks; // [nb_trihedral_pairs * 6]
3346
3347 int *Adj_line_intersection_graph; // [SO->nb_lines * SO->nb_lines]
3348 set_of_sets *Line_neighbors;
3349 int *Line_intersection_pt; // [SO->nb_lines * SO->nb_lines]
3350 int *Line_intersection_pt_idx; // [SO->nb_lines * SO->nb_lines]
3351
3352
3353 int *gradient;
3354
3355 long int *singular_pts;
3356 int nb_singular_pts;
3357 int nb_non_singular_pts;
3358
3359 long int *tangent_plane_rank_global; // [SO->nb_pts]
3360 long int *tangent_plane_rank_dual; // [nb_non_singular_pts]
3361#endif
3362
3363
3364 if (f_v) {
3365 cout << "surface_with_action::table_of_cubic_surfaces before table_of_cubic_surfaces_export_csv" << endl;
3366 }
3367
3369 nb_cols,
3370 q, nb_cubic_surfaces,
3371 SC,
3372 verbose_level);
3373
3374 if (f_v) {
3375 cout << "surface_with_action::table_of_cubic_surfaces after table_of_cubic_surfaces_export_csv" << endl;
3376 }
3377
3378
3379 if (f_v) {
3380 cout << "surface_with_action::table_of_cubic_surfaces before table_of_cubic_surfaces_export_sql" << endl;
3381 }
3382
3384 nb_cols,
3385 q, nb_cubic_surfaces,
3386 SC,
3387 verbose_level);
3388
3389 if (f_v) {
3390 cout << "surface_with_action::table_of_cubic_surfaces after table_of_cubic_surfaces_export_sql" << endl;
3391 }
3392
3393 if (f_v) {
3394 cout << "surface_with_action::table_of_cubic_surfaces done" << endl;
3395 }
3396
3397}
3398
3399
3401 int nb_cols,
3402 int q, int nb_cubic_surfaces,
3403 surface_create **SC,
3404 int verbose_level)
3405{
3406 int f_v = (verbose_level >= 1);
3407
3408 if (f_v) {
3409 cout << "surface_with_action::table_of_cubic_surfaces_export_csv" << endl;
3410 }
3411
3413 char str[1000];
3414
3415 sprintf(str, "_q%d", q);
3416
3417 string fname;
3418 fname.assign("table_of_cubic_surfaces");
3419 fname.append(str);
3420 fname.append("_info.csv");
3421
3422 //Fio.lint_matrix_write_csv(fname, Table, nb_quartic_curves, nb_cols);
3423
3424 {
3425 ofstream f(fname);
3426 int i, j;
3427
3428 f << "Row,OCN,CollStabOrder,ProjStabOrder,nbPts,nbLines,"
3429 "nbE,nbDouble,nbSingle,nbPtsNotOn,nbHesse,nbAxes,"
3430 "nbOrbE,nbOrbDouble,nbOrbPtsNotOn,nbOrbLines,nbOrbSingleSix,nbOrbTriPlanes,nbOrbHesse,nbOrbTrihedralPairs,"
3431 "Eqn20,Equation,Lines";
3432
3433
3434
3435 f << endl;
3436 for (i = 0; i < nb_cubic_surfaces; i++) {
3437 f << i;
3438 for (j = 0; j < nb_cols; j++) {
3439 f << "," << Table[i * nb_cols + j];
3440 }
3441 {
3442 string str;
3443 f << ",";
3445 f << str;
3446 }
3447
3448#if 1
3449 {
3450 stringstream sstr;
3451 string str;
3452 SC[i]->Surf->print_equation_maple(sstr, SC[i]->SO->eqn);
3453 str.assign(sstr.str());
3454 f << ",";
3455 f << "\"$";
3456 f << str;
3457 f << "$\"";
3458 }
3459 {
3460 string str;
3461 f << ",";
3463 f << str;
3464 }
3465#endif
3466
3467 f << endl;
3468 }
3469 f << "END" << endl;
3470 }
3471
3472
3473 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
3474
3475 if (f_v) {
3476 cout << "surface_with_action::table_of_cubic_surfaces_export_csv done" << endl;
3477 }
3478}
3479
3481 int nb_cols,
3482 int q, int nb_cubic_surfaces,
3483 surface_create **SC,
3484 int verbose_level)
3485{
3486 int f_v = (verbose_level >= 1);
3487
3488 if (f_v) {
3489 cout << "surface_with_action::table_of_cubic_surfaces_export_sql" << endl;
3490 }
3491
3493 char str[1000];
3494
3495 sprintf(str, "_q%d", q);
3496
3497 string fname;
3498 fname.assign("table_of_cubic_surfaces");
3499 fname.append(str);
3500 fname.append("_data.sql");
3501
3502 //Fio.lint_matrix_write_csv(fname, Table, nb_quartic_curves, nb_cols);
3503
3504 {
3505 ofstream f(fname);
3506 int i;
3507
3508 for (i = 0; i < nb_cubic_surfaces; i++) {
3509
3510 f << "UPDATE `cubicvt`.`surface` SET ";
3511 f << "`CollStabOrder` = '" << Table[i * nb_cols + 1] << "', ";
3512 f << "`ProjStabOrder` = '" << Table[i * nb_cols + 2] << "', ";
3513 f << "`nbPts` = '" << Table[i * nb_cols + 3] << "', ";
3514 f << "`nbLines` = '" << Table[i * nb_cols + 4] << "', ";
3515 f << "`nbE` = '" << Table[i * nb_cols + 5] << "', ";
3516 f << "`nbDouble` = '" << Table[i * nb_cols + 6] << "', ";
3517 f << "`nbSingle` = '" << Table[i * nb_cols + 7] << "', ";
3518 f << "`nbPtsNotOn` = '" << Table[i * nb_cols + 8] << "',";
3519 f << "`nbHesse` = '" << Table[i * nb_cols + 9] << "', ";
3520 f << "`nbAxes` = '" << Table[i * nb_cols + 10] << "', ";
3521 f << "`nbOrbE` = '" << Table[i * nb_cols + 11] << "', ";
3522 f << "`nbOrbDouble` = '" << Table[i * nb_cols + 12] << "', ";
3523 f << "`nbOrbPtsNotOn` = '" << Table[i * nb_cols + 13] << "', ";
3524 f << "`nbOrbLines` = '" << Table[i * nb_cols + 14] << "', ";
3525 f << "`nbOrbSingleSix` = '" << Table[i * nb_cols + 15] << "', ";
3526 f << "`nbOrbTriPlanes` = '" << Table[i * nb_cols + 16] << "', ";
3527 f << "`nbOrbHesse` = '" << Table[i * nb_cols + 17] << "', ";
3528 f << "`nbOrbTrihedralPairs` = '" << Table[i * nb_cols + 18] << "', ";
3529 {
3530 string str;
3532 f << "`Eqn20` = '" << str << "', ";
3533 }
3534 {
3535 stringstream sstr;
3536 string str;
3537 SC[i]->Surf->print_equation_maple(sstr, SC[i]->SO->eqn);
3538 str.assign(sstr.str());
3539 //f << ",";
3540 //f << "\"$";
3541 //f << str;
3542 //f << "$\"";
3543 f << "`Equation` = '$" << str << "$', ";
3544 }
3545 {
3546 string str;
3548 f << "`Lines` = '" << str << "' ";
3549 }
3550 f << "WHERE `Q` = '" << q << "' AND `OCN` = '" << Table[i * nb_cols + 0] << "';" << endl;
3551 }
3552
3553 }
3554
3555
3556 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
3557
3558 if (f_v) {
3559 cout << "surface_with_action::table_of_cubic_surfaces_export_sql done" << endl;
3560 }
3561}
3562
3563
3564// from Oznur Oztunc, 11/28/2021:
3565// oznr83@gmail.com
3566//UPDATE `cubicvt`.`surface` SET `CollStabOrder` = '12', `ProjStabOrder` = '12', `nbPts` = '691', `nbLines` = '27', `nbE` = '4', `nbDouble` = '123', `nbSingle` = '390', `nbPtsNotOn` = '174',`nbHesse` = '0', `nbAxes` = '1', `nbOrbE` = '2', `nbOrbDouble` = '16', `nbOrbPtsNotOn` = '16', `nbOrbLines` = '5', `nbOrbSingleSix` = '10', `nbOrbTriPlanes` = '10', `nbOrbHesse` = '0', `nbOrbTrihedralPairs` = '19', `nbOrbTritangentPlanes` = '10',`Eqn20` = '0,0,0,0,0,0,8,0,10,0,0,18,0,2,0,0,18,10,2,1', `Equation` = '$8X_0^2*X_3+10X_1^2*X_2+18X_1*X_2^2+2X_0*X_3^2+18X_0*X_1*X_2+10X_0*X_1*X_3+2X_0*X_2*X_3+X_1*X_2*X_3$', `Lines` = '529,292560,1083,4965,290982,88471,169033,6600,8548,576,293089,0,3824,9119,1698,242212,12168,59424,229610,292854,242075,120504,179157,279048,30397,181283,12150' WHERE `Q` = '23' AND `OCN` = '1';
3567
3568
3569}}}}
3570
3571
3572
void latex_double_six(std::ostream &ost, long int *double_six)
int build_surface_from_double_six_and_count_Eckardt_points(long int *double_six, int verbose_level)
int test_double_six_property(long int *S12, int verbose_level)
Given a set of lines in S12[12], test the double six property.
void print_equation_maple(std::stringstream &ost, int *coeffs)
int create_double_six_from_five_lines_with_a_common_transversal(long int *five_pts, long int *double_six, int verbose_level)
Given a five-plus-one five_pts[5], complete the double-six.
ring_theory::homogeneous_polynomial_domain * Poly3_4
void create_summary_file(std::string &fname, std::string &surface_label, std::string &col_postfix, int verbose_level)
void set_complement(int *subset, int subset_size, int *complement, int &size_complement, int universal_set_size)
void create_string_with_quotes(std::string &str, int *v, int len)
Definition: int_vec.cpp:1088
void create_string_with_quotes(std::string &str, long int *v, int len)
Definition: lint_vec.cpp:533
a collection of functions related to sorted vectors
int lint_vec_compare(long int *p, long int *q, int len)
Definition: sorting.cpp:2326
void PG_element_unrank_modified(int *v, int stride, int len, int a)
int add6(int i1, int i2, int i3, int i4, int i5, int i6)
void line_regulus_in_PG_3_q(long int *&regulus, int &regulus_size, int f_opposite, int verbose_level)
Definition: grassmann.cpp:1007
void unrank_lint_here(int *Mtx, long int rk, int verbose_level)
Definition: grassmann.cpp:269
void print_single_generator_matrix_tex(std::ostream &ost, long int a)
Definition: grassmann.cpp:122
void Pluecker_to_line(int *v6, int *basis_line, int verbose_level)
void line_to_Pluecker(long int line_rk, int *v6, int verbose_level)
int test_if_lines_are_skew(int line1, int line2, int verbose_level)
int point_of_intersection_of_a_line_and_a_line_in_three_space(long int line1, long int line2, int verbose_level)
provides access to pre-computed combinatorial data in encoded form
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
void find_secant_points_wrt_x0x3mx1x2(int *Basis_line, int *Pts4, int &nb_pts, int verbose_level)
int rank_of_rectangular_matrix(int *A, int m, int n, int verbose_level)
void adjust_basis(int *V, int *U, int n, int k, int d, int verbose_level)
int intersect_subspaces(int n, int k1, int *A, int k2, int *B, int &k3, int *intersection, int verbose_level)
void lint_matrix_write_csv(std::string &fname, long int *M, int m, int n)
Definition: file_io.cpp:1323
void write_set_to_file(std::string &fname, long int *the_set, int set_size, int verbose_level)
Definition: file_io.cpp:2434
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)
a permutation group in a fixed action.
Definition: actions.h:99
action * induced_action_on_wedge_product(int verbose_level)
void element_invert(void *a, void *av, int verbose_level)
Definition: action_cb.cpp:322
action * induced_action_on_grassmannian(int k, int verbose_level)
long int element_image_of(long int a, void *elt, int verbose_level)
Definition: action_cb.cpp:198
a matrix group over a finite field in projective, vector space or affine action
Definition: groups.h:318
void substitute_surface_equation(int *Elt, int *coeff_in, int *coeff_out, algebraic_geometry::surface_domain *Surf, int verbose_level)
data_structures_groups::vector_ge * gens
Definition: groups.h:1708
induced action on the set of homogeneous polynomials over a finite field
void init(actions::action *A, ring_theory::homogeneous_polynomial_domain *HPD, int verbose_level)
to control the behavior of the poset classification algorithm
void init_with_group(surface_with_action *Surf_A, long int *Lines, int nb_lines, int *eqn, groups::strong_generators *Aut_gens, int f_find_double_six_and_rearrange_lines, int f_has_nice_gens, data_structures_groups::vector_ge *nice_gens, int verbose_level)
void init_with_surface_object(surface_with_action *Surf_A, algebraic_geometry::surface_object *SO, groups::strong_generators *Aut_gens, int f_has_nice_gens, data_structures_groups::vector_ge *nice_gens, int verbose_level)
void investigate_surface_and_write_report(graphics::layered_graph_draw_options *Opt, actions::action *A, surface_create *SC, cubic_surfaces_and_arcs::six_arcs_not_on_a_conic *Six_arcs, int verbose_level)
void init(apps_geometry::arc_generator_description *Descr, projective_geometry::projective_space_with_action *PA, int f_test_nb_Eckardt_points, int nb_E, int verbose_level)
void sweep_4_27(surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void create_surface_and_do_report(surface_create_description *Surface_Descr, int f_has_control_six_arcs, poset_classification::poset_classification_control *Control_six_arcs, int verbose_level)
void create_regulus_and_opposite_regulus(long int *three_skew_lines, long int *&regulus, long int *&opp_regulus, int &regulus_sz, int verbose_level)
void sweep_6_9_lines(surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void sweep_F_beta_9_lines(surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void complete_skew_hexagon_with_polarity(std::string &label_for_printing, long int *skew_hexagon, int *Polarity36, std::vector< std::vector< long int > > &Double_sixes, int verbose_level)
void table_of_cubic_surfaces_export_csv(long int *Table, int nb_cols, int q, int nb_cubic_surfaces, surface_create **SC, int verbose_level)
void init(algebraic_geometry::surface_domain *Surf, projective_geometry::projective_space_with_action *PA, int f_recoordinatize, int verbose_level)
int create_double_six_from_five_lines_with_a_common_transversal(long int *five_lines, long int transversal_line, long int *double_six, int verbose_level)
void create_surface(surface_create_description *Surface_Descr, surface_create *&SC, int verbose_level)
void create_surface_object_with_action(surface_create *SC, surface_object_with_action *&SoA, int verbose_level)
int create_double_six_safely(long int *five_lines, long int transversal_line, long int *double_six, int verbose_level)
void sweep_4_15_lines(surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void complete_skew_hexagon(long int *skew_hexagon, std::vector< std::vector< long int > > &Double_sixes, int verbose_level)
void table_of_cubic_surfaces_export_sql(long int *Table, int nb_cols, int q, int nb_cubic_surfaces, surface_create **SC, int verbose_level)
void report_with_group(surface_create *SC, int f_has_control_six_arcs, poset_classification::poset_classification_control *Control_six_arcs, int verbose_level)
to create a cubic surface from a description using class surface_create_description
void apply_transformations(std::vector< std::string > &transform_coeffs, std::vector< int > &f_inverse_transform, int verbose_level)
void init(surface_create_description *Descr, surface_with_action *Surf_A, int verbose_level)
description of a classification problem of arcs in a geometry
Definition: tl_geometry.h:27
poset_classification::poset_classification_control * Control
Definition: tl_geometry.h:32
projective_geometry::projective_space_with_action * PA
Definition: tl_geometry.h:81
projective space PG(n,q) with automorphism group PGGL(n+1,q)
three skew lines in PG(3,q), used to classify spreads
Definition: spreads.h:24
void do_recoordinatize(long int i1, long int i2, long int i3, int verbose_level)
void init(int n, int k, field_theory::finite_field *F, geometry::grassmann *Grass, actions::action *A, actions::action *A2, int f_projective, int f_semilinear, int(*check_function_incremental)(int len, long int *S, void *data, int verbose_level), void *check_function_incremental_data, int verbose_level)
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define FREE_int(p)
Definition: foundations.h:640
#define Int_vec_zero(A, B)
Definition: foundations.h:713
#define NEW_pvoid(n)
Definition: foundations.h:637
#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 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