Orbiter 2022
Combinatorial Objects
surface_classify_wedge.cpp
Go to the documentation of this file.
1// surface_classify_wedge.cpp
2//
3// Anton Betten
4// September 2, 2016
5//
6//
7//
8//
9
10#include "orbiter.h"
11
12using namespace std;
13
14namespace orbiter {
15namespace layer5_applications {
16namespace applications_in_algebraic_geometry {
17namespace cubic_surfaces_and_double_sixes {
18
19
21{
22 F = NULL;
23 q = 0;
24
25 //std::string fname_base;
26
27 A = NULL;
28 A2 = NULL;
29
30
31 Surf = NULL;
32 Surf_A = NULL;
33
34 Elt0 = NULL;
35 Elt1 = NULL;
36 Elt2 = NULL;
37 Elt3 = NULL;
38
40
41 Flag_orbits = NULL;
42 Surfaces = NULL;
43
44 //null();
45
46}
47
49{
50 freeself();
51}
52
54{
55}
56
58{
59 int verbose_level = 0;
60 int f_v = (verbose_level >= 1);
61
62
63#if 0
64 if (Surf) {
66 }
67 if (Surf_A) {
69 }
70#endif
71
72 if (f_v) {
73 cout << "surface_classify_wedge::freeself" << endl;
74 }
75 if (Elt0) {
77 }
78 if (Elt1) {
80 }
81 if (Elt2) {
83 }
84 if (Elt3) {
86 }
87
88 if (f_v) {
89 cout << "surface_classify_wedge::freeself before FREE_OBJECTS(Flag_orbits)" << endl;
90 }
91 if (Flag_orbits) {
93 }
94 if (f_v) {
95 cout << "surface_classify_wedge::freeself before FREE_OBJECTS(Surfaces)" << endl;
96 }
97 if (Surfaces) {
99 }
100
101 if (f_v) {
102 cout << "surface_classify_wedge::freeself before FREE_OBJECTS(Classify_double_sixes)" << endl;
103 }
106 }
107 if (f_v) {
108 cout << "surface_classify_wedge::freeself done" << endl;
109 }
110 null();
111}
112
116 int verbose_level)
117{
118 int f_v = (verbose_level >= 1);
119
120
121 if (f_v) {
122 cout << "surface_classify_wedge::init" << endl;
123 }
127 q = F->q;
128
129 fname_base.assign("surface_");
130 char str[1000];
131
132 sprintf(str, "%d", q);
133 fname_base.append(str);
134
135
136
137 A = Surf_A->PA->A;
139
140
141
146
148
149 if (f_v) {
150 cout << "surface_classify_wedge::init "
151 "before Classify_double_sixes->init" << endl;
152 }
153 Classify_double_sixes->init(Surf_A, Control, verbose_level);
154 if (f_v) {
155 cout << "surface_classify_wedge::init "
156 "after Classify_double_sixes->init" << endl;
157 }
158
159 if (f_v) {
160 cout << "surface_classify_wedge::init done" << endl;
161 }
162}
163
165{
166 int f_v = (verbose_level >= 1);
167
168 if (f_v) {
169 cout << "surface_classify_wedge::do_classify_double_sixes" << endl;
170 cout << "verbose_level = " << verbose_level << endl;
171 }
172
174 if (f_v) {
175 cout << "surface_classify_wedge::do_classify_double_sixes before "
176 "read_double_sixes" << endl;
177 }
178 read_double_sixes(verbose_level);
179 if (f_v) {
180 cout << "surface_classify_wedge::do_classify_double_sixes after "
181 "read_double_sixes" << endl;
182 }
183 }
184
185 else {
186
187 if (f_v) {
188 cout << "surface_classify_wedge::do_classify_double_sixes before "
189 "Classify_double_sixes->classify_partial_ovoids" << endl;
190 }
192 if (f_v) {
193 cout << "surface_classify_wedge::do_classify_double_sixes after "
194 "Classify_double_sixes->classify_partial_ovoids" << endl;
195 }
196
197 if (f_v) {
198 cout << "surface_classify_wedge::do_classify_double_sixes before "
199 "Classify_double_sixes->classify" << endl;
200 }
201 Classify_double_sixes->classify(verbose_level);
202 if (f_v) {
203 cout << "surface_classify_wedge::do_classify_double_sixes after "
204 "Classify_double_sixes->classify" << endl;
205 }
206
207
208
209 if (f_v) {
210 cout << "surface_classify_wedge::do_classify_double_sixes before "
211 "write_double_sixes" << endl;
212 }
213 write_double_sixes(verbose_level);
214 if (f_v) {
215 cout << "surface_classify_wedge::do_classify_double_sixes after "
216 "write_double_sixes" << endl;
217 }
218
219 if (f_v) {
220 cout << "surface_classify_wedge::do_classify_double_sixes writing cheat sheet "
221 "on double sixes" << endl;
222 }
223 create_report_double_sixes(verbose_level);
224 if (f_v) {
225 cout << "surface_classify_wedge::do_classify_double_sixes writing cheat sheet on "
226 "double sixes done" << endl;
227 }
228 }
229 if (f_v) {
230 cout << "surface_classify_wedge::do_classify_double_sixes done" << endl;
231 }
232}
233
235{
236 int f_v = (verbose_level >= 1);
237
238 if (f_v) {
239 cout << "surface_classify_wedge::do_classify_surfaces" << endl;
240 }
242
243 if (f_v) {
244 cout << "surface_classify_wedge::do_classify_surfaces before "
245 "read_surfaces" << endl;
246 }
247 read_surfaces(verbose_level);
248 if (f_v) {
249 cout << "surface_classify_wedge::do_classify_surfaces after "
250 "read_surfaces" << endl;
251 }
252
253 }
254 else {
255
256 if (f_v) {
257 cout << "surface_classify_wedge::do_classify_surfaces classifying surfaces" << endl;
258 }
259
260 if (f_v) {
261 cout << "surface_classify_wedge::do_classify_surfaces before "
262 "SCW->classify_surfaces_from_double_sixes" << endl;
263 }
265 if (f_v) {
266 cout << "surface_classify_wedge::do_classify_surfaces after "
267 "SCW->classify_surfaces_from_double_sixes" << endl;
268 }
269
270 if (f_v) {
271 cout << "surface_classify_wedge::do_classify_surfaces before "
272 "write_surfaces" << endl;
273 }
274 write_surfaces(verbose_level);
275 if (f_v) {
276 cout << "surface_classify_wedge::do_classify_surfaces after "
277 "write_surfaces" << endl;
278 }
279 }
280 if (f_v) {
281 cout << "surface_classify_wedge::do_classify_surfaces done" << endl;
282 }
283}
284
286 int verbose_level)
287{
288 int f_v = (verbose_level >= 1);
289
290 if (f_v) {
291 cout << "surface_classify_wedge::classify_surfaces_from_double_sixes" << endl;
292 cout << "verbose_level = " << verbose_level << endl;
293 }
294
295
296 if (f_v) {
297 cout << "surface_classify_wedge::classify_surfaces_from_double_sixes before downstep" << endl;
298 }
299 downstep(verbose_level);
300 if (f_v) {
301 cout << "surface_classify_wedge::classify_surfaces_from_double_sixes after downstep" << endl;
302 cout << "we found " << Flag_orbits->nb_flag_orbits
303 << " flag orbits out of "
305 << " orbits of double sixes" << endl;
306 }
307
308 if (f_v) {
309 cout << "surface_classify_wedge::classify_surfaces_from_double_sixes before upstep" << endl;
310 }
311 upstep(verbose_level);
312 if (f_v) {
313 cout << "surface_classify_wedge::classify_surfaces_from_double_sixes after upstep" << endl;
314 cout << "we found " << Surfaces->nb_orbits
315 << " surfaces out from "
317 << " double sixes" << endl;
318 }
319
320
321 if (f_v) {
322 cout << "surface_classify_wedge::classify_surfaces_from_double_sixes done" << endl;
323 }
324}
325
326void surface_classify_wedge::downstep(int verbose_level)
327{
328 int f_v = (verbose_level >= 1);
329 int f_vv = (verbose_level >= 2);
330 int i, nb_orbits, nb_flag_orbits;
331
332 if (f_v) {
333 cout << "surface_classify_wedge::downstep" << endl;
334 cout << "verbose_level = " << verbose_level << endl;
335 }
339 A,
340 A2,
341 nb_orbits /* nb_primary_orbits_lower */,
342 27 /* pt_representation_sz */,
343 nb_orbits /* nb_flag_orbits */,
344 1 /* upper_bound_for_number_of_traces */, // ToDo
345 NULL /* void (*func_to_free_received_trace)(void *trace_result, void *data, int verbose_level) */,
346 NULL /* void (*func_latex_report_trace)(std::ostream &ost, void *trace_result, void *data, int verbose_level)*/,
347 NULL /* void *free_received_trace_data */,
348 verbose_level - 3);
349
350 if (f_v) {
351 cout << "surface_classify_wedge::downstep "
352 "initializing flag orbits" << endl;
353 }
354
355 nb_flag_orbits = 0;
356 for (i = 0; i < nb_orbits; i++) {
357
358 if (f_v) {
359 cout << "surface_classify_wedge::downstep "
360 "orbit " << i << " / " << nb_orbits << endl;
361 }
364 long int Lines[27];
365
367 i /* orbit_index */,
368 0 /* verbose_level */);
369
370
371 R->Strong_gens->group_order(go);
372
373 Lint_vec_copy(R->data, Lines, 12);
374
375 if (f_vv) {
376 cout << "surface_classify_wedge::downstep "
377 "before create_the_fifteen_other_lines" << endl;
378 }
379
381 Lines /* double_six */,
382 Lines + 12 /* fifteen_other_lines */,
383 0 /*verbose_level - 4*/);
384 if (f_vv) {
385 cout << "surface_classify_wedge::downstep "
386 "after create_the_fifteen_other_lines" << endl;
387 }
388
389
390 if (f_vv) {
391 cout << "surface_classify_wedge::downstep "
392 "before Flag_orbit_node[].init" << endl;
393 }
394
395 Flag_orbits->Flag_orbit_node[nb_flag_orbits].init(
397 nb_flag_orbits /* flag_orbit_index */,
398 i /* downstep_primary_orbit */,
399 0 /* downstep_secondary_orbit */,
400 1 /* downstep_orbit_len */,
401 FALSE /* f_long_orbit */,
402 Lines /* int *pt_representation */,
403 R->Strong_gens,
404 0/*verbose_level - 2*/);
405
406 if (f_vv) {
407 cout << "surface_classify_wedge::downstep "
408 "after Flag_orbit_node[].init" << endl;
409 }
410
411 R->Strong_gens = NULL;
412
413 nb_flag_orbits++;
414
415
416 FREE_OBJECT(R);
417 }
418
419 Flag_orbits->nb_flag_orbits = nb_flag_orbits;
420
421
422 if (f_v) {
423 cout << "surface_classify_wedge::downstep "
424 "initializing flag orbits done" << endl;
425 }
426}
427
428void surface_classify_wedge::upstep(int verbose_level)
429{
430 int f_v = (verbose_level >= 1);
431 int f, po, so, i, j;
432 int *f_processed;
433 int nb_processed;
434
435 if (f_v) {
436 cout << "surface_classify_wedge::upstep" << endl;
437 cout << "verbose_level = " << verbose_level << endl;
438 }
439
440
441 f_processed = NEW_int(Flag_orbits->nb_flag_orbits);
443 nb_processed = 0;
444
446
448 A->group_order(go);
449
450 Surfaces->init(A, A2,
452 verbose_level - 3);
453
454
455 for (f = 0; f < Flag_orbits->nb_flag_orbits; f++) {
456
457 double progress;
458 long int Lines[27];
459
460 if (f_processed[f]) {
461 continue;
462 }
463
464 progress = ((double)nb_processed * 100. ) /
465 (double) Flag_orbits->nb_flag_orbits;
466
467 if (f_v) {
468 cout << "Defining another orbit "
470 << " from flag orbit " << f << " / "
472 << " progress=" << progress << "%" << endl;
473 }
476
477
479 cout << "Flag_orbits->pt_representation_sz != 27" << endl;
480 exit(1);
481 }
484 if (f_v) {
485 cout << "po=" << po << " so=" << so << endl;
486 }
487 Lint_vec_copy(Flag_orbits->Pt + f * 27, Lines, 27);
488
489
490
491
493 int nb_coset_reps;
494
496 coset_reps->init(Surf_A->A, 0/*verbose_level - 2*/);
497 coset_reps->allocate(36, 0/*verbose_level - 2*/);
498
499
502
503
504 if (f_v) {
505 cout << "Lines:";
506 Lint_vec_print(cout, Lines, 27);
507 cout << endl;
508 }
510 S->group_order(go);
511 if (f_v) {
512 cout << "po=" << po << " so=" << so << " go=" << go << endl;
513 }
514
515 nb_coset_reps = 0;
516 for (i = 0; i < 36; i++) {
517
518 if (f_v) {
519 cout << "f=" << f << " / " << Flag_orbits->nb_flag_orbits
520 << ", upstep i=" << i << " / 36" << endl;
521 }
522 int f2;
523
524 long int double_six[12];
525
526
527 for (j = 0; j < 12; j++) {
528 double_six[j] = Lines[Surf->Schlaefli->Double_six[i * 12 + j]];
529 }
530 if (f_v) {
531 cout << "f=" << f << " / "
533 << ", upstep i=" << i
534 << " / 36 double_six=";
535 Lint_vec_print(cout, double_six, 12);
536 cout << endl;
537 }
538
540 Elt1 /* transporter */, f2, 0/*verbose_level - 10*/);
541
542 if (f_v) {
543 cout << "f=" << f << " / "
545 << ", upstep " << i
546 << " / 36, double six is "
547 "isomorphic to orbit " << f2 << endl;
548 }
549
550
551 if (f2 == f) {
552 if (f_v) {
553 cout << "We found an automorphism of the surface:" << endl;
554 //A->element_print_quick(Elt1, cout);
555 //cout << endl;
556 }
557 A->element_move(Elt1, coset_reps->ith(nb_coset_reps), 0);
558 nb_coset_reps++;
559 }
560 else {
561 if (f_v) {
562 cout << "We are identifying flag orbit " << f2
563 << " with flag orbit " << f << endl;
564 }
565 if (!f_processed[f2]) {
574 f_processed[f2] = TRUE;
575 nb_processed++;
576 }
577 else {
578 cout << "Flag orbit " << f2 << " has already been "
579 "identified with flag orbit " << f << endl;
581 cout << "Flag_orbits->Flag_orbit_node[f2]."
582 "fusion_with != f" << endl;
583 exit(1);
584 }
585 }
586 }
587
588 } // next i
589
590
591 coset_reps->reallocate(nb_coset_reps, 0/*verbose_level - 2*/);
592
594
595 {
597
598 if (f_v) {
599 cout << "surface_classify_wedge::upstep "
600 "Extending the "
601 "group by a factor of " << nb_coset_reps << endl;
602 }
604 Aut_gens->init_group_extension(S, coset_reps,
605 nb_coset_reps, 0/*verbose_level - 2*/);
606
607 Aut_gens->group_order(ago);
608
609
610 if (f_v) {
611 cout << "the double six has a stabilizer of order "
612 << ago << endl;
613 cout << "The double six stabilizer is:" << endl;
614 Aut_gens->print_generators_tex(cout);
615 }
616 }
617
618
619
621 Surfaces,
623 Aut_gens, Lines, NULL /* extra_data */, verbose_level - 4);
624
625 FREE_OBJECT(coset_reps);
626 FREE_OBJECT(S);
627
628 f_processed[f] = TRUE;
629 nb_processed++;
631 } // next f
632
633
634 if (nb_processed != Flag_orbits->nb_flag_orbits) {
635 cout << "nb_processed != Flag_orbits->nb_flag_orbits" << endl;
636 cout << "nb_processed = " << nb_processed << endl;
637 cout << "Flag_orbits->nb_flag_orbits = "
638 << Flag_orbits->nb_flag_orbits << endl;
639 exit(1);
640 }
641
643
644 if (f_v) {
645 cout << "We found " << Surfaces->nb_orbits
646 << " orbits of surfaces from "
648 << " double sixes" << endl;
649 }
650
651 FREE_int(f_processed);
652
653
654 if (f_v) {
655 cout << "surface_classify_wedge::upstep done" << endl;
656 }
657}
658
659
661{
662 int f_v = (verbose_level >= 1);
663 int iso_type;
664 int *Starter_configuration_idx;
665 int nb_starter_conf;
666 int c, orb, i;
667 long int S[5];
668 long int S2[7];
669 long int K1[7];
670 int w[6];
671 int v[6];
672 long int Arc[6];
673 long int four_lines[4];
674 long int trans12[2];
675 int perp_sz;
676 long int b5;
677
678 if (f_v) {
679 cout << "surface_classify_wedge::derived_arcs" << endl;
680 }
681 for (iso_type = 0; iso_type < Surfaces->nb_orbits; iso_type++) {
682 if (f_v) {
683 cout << "surface " << iso_type << " / "
684 << Surfaces->nb_orbits << ":" << endl;
685 }
686
688 Starter_configuration_idx, nb_starter_conf, verbose_level);
689
690 if (f_v) {
691 cout << "There are " << nb_starter_conf
692 << " starter configurations which are involved: " << endl;
693 Int_vec_print(cout, Starter_configuration_idx, nb_starter_conf);
694 cout << endl;
695 }
696
697 for (c = 0; c < nb_starter_conf; c++) {
698 orb = Starter_configuration_idx[c];
699 //s = Starter_configuration_idx[c];
700 //orb = Classify_double_sixes->Idx[s];
701
702 if (f_v) {
703 cout << "configuration " << c << " / " << nb_starter_conf
704 << " is orbit " << orb << endl;
705 }
706
708
709 if (f_v) {
710 cout << "starter configuration as neighbors: ";
711 Lint_vec_print(cout, S, 5);
712 cout << endl;
713 }
714
715
718
719 four_lines[0] = S2[0];
720 four_lines[1] = S2[1];
721 four_lines[2] = S2[2];
722 four_lines[3] = S2[3];
723 Surf->perp_of_four_lines(four_lines,
724 trans12, perp_sz, 0 /* verbose_level */);
725
726 if (trans12[0] == Classify_double_sixes->pt0_line) {
727 b5 = trans12[1];
728 }
729 else if (trans12[1] == Classify_double_sixes->pt0_line) {
730 b5 = trans12[0];
731 }
732 else {
733 cout << "something is wrong with the starter configuration" << endl;
734 exit(1);
735 }
736
737
738
739 long int *lines;
740 int nb_lines;
741 long int lines_meet3[3];
742 long int lines_skew3[3];
743
744 lines_meet3[0] = S2[1]; // a_2
745 lines_meet3[1] = S2[2]; // a_3
746 lines_meet3[2] = S2[3]; // a_4
747 lines_skew3[0] = S2[0]; // a_1
748 lines_skew3[1] = b5;
749 lines_skew3[2] = S2[5]; // b_6
750
751 Surf->lines_meet3_and_skew3(lines_meet3,
752 lines_skew3, lines, nb_lines,
753 0 /* verbose_level */);
754 //Surf->perp_of_three_lines(three_lines, perp, perp_sz, 0 /* verbose_level */);
755
756 if (f_v) {
757 cout << "The lines which meet { a_2, a_3, a_4 } "
758 "and are skew to { a_1, b_5, b_6 } are: ";
759 Lint_vec_print(cout, lines, nb_lines);
760 cout << endl;
761 cout << "generator matrices:" << endl;
762 Surf->Gr->print_set(lines, nb_lines);
763 }
764
765 FREE_lint(lines);
766
767 lines_meet3[0] = S2[0]; // a_1
768 lines_meet3[1] = S2[2]; // a_3
769 lines_meet3[2] = S2[3]; // a_4
770 lines_skew3[0] = S2[1]; // a_2
771 lines_skew3[1] = b5;
772 lines_skew3[2] = S2[5]; // b6
773
774 Surf->lines_meet3_and_skew3(lines_meet3,
775 lines_skew3, lines, nb_lines,
776 0 /* verbose_level */);
777 //Surf->perp_of_three_lines(three_lines, perp, perp_sz, 0 /* verbose_level */);
778
779 if (f_v) {
780 cout << "The lines which meet { a_1, a_3, a_4 } "
781 "and are skew to { a_2, b_5, b_6 } are: ";
782 Lint_vec_print(cout, lines, nb_lines);
783 cout << endl;
784 cout << "generator matrices:" << endl;
785 Surf->Gr->print_set(lines, nb_lines);
786 }
787
788 FREE_lint(lines);
789
790
791 if (f_v) {
792 cout << "starter configuration as line ranks: ";
793 Lint_vec_print(cout, S2, 6);
794 cout << endl;
795 cout << "b5=" << b5 << endl;
796 cout << "generator matrices:" << endl;
797 Surf->Gr->print_set(S2, 6);
798 cout << "b5:" << endl;
799 Surf->Gr->print_set(&b5, 1);
800 }
801 S2[6] = b5;
802
803 for (int h = 0; h < 7; h++) {
804 K1[h] = Surf->Klein->line_to_point_on_quadric(S2[h], 0/*verbose_level*/);
805 }
806 //int_vec_apply(S2, Surf->Klein->Line_to_point_on_quadric, K1, 7);
807 if (f_v) {
808 cout << "starter configuration on the klein quadric: ";
809 Lint_vec_print(cout, K1, 7);
810 cout << endl;
811 for (i = 0; i < 7; i++) {
812 Surf->O->unrank_point(w, 1, K1[i], 0 /* verbose_level*/);
813 cout << i << " / " << 6 << " : ";
814 Int_vec_print(cout, w, 6);
815 cout << endl;
816 }
817 }
818
819 Arc[0] = 1;
820 Arc[1] = 2;
821 for (i = 0; i < 4; i++) {
822 Surf->O->unrank_point(w, 1, K1[1 + i], 0 /* verbose_level*/);
823 Int_vec_copy(w + 3, v, 3);
824 F->PG_element_rank_modified_lint(v, 1, 3, Arc[2 + i]);
825 }
826 if (f_v) {
827 cout << "The associated arc is ";
828 Lint_vec_print(cout, Arc, 6);
829 cout << endl;
830 for (i = 0; i < 6; i++) {
831 F->PG_element_unrank_modified_lint(v, 1, 3, Arc[i]);
832 cout << i << " & " << Arc[i] << " & ";
833 Int_vec_print(cout, v, 3);
834 cout << " \\\\" << endl;
835 }
836 }
837
838 }
839
840 FREE_int(Starter_configuration_idx);
841 }
842
843 if (f_v) {
844 cout << "surface_classify_wedge::derived_arcs done" << endl;
845 }
846}
847
849 int iso_type, int *&Starter_configuration_idx, int &nb_starter_conf,
850 int verbose_level)
851{
852 int f_v = (verbose_level >= 1);
853 int /*k,*/ i, j, cnt, iso;
854 //int nb_orbits;
855
856 if (f_v) {
857 cout << "surface_classify_wedge::starter_configurations_which_are_involved" << endl;
858 }
859
860 //k = 5;
861
862 //nb_orbits = Classify_double_sixes->Five_plus_one->nb_orbits_at_level(k);
863 cnt = 0;
864 for (i = 0; i < Classify_double_sixes->nb; i++) {
865
866 // loop over all 5+1 configurations which have rank 19 and are good
867
869 iso = Surfaces->Orbit[j].orbit_index;
870 //iso = is_isomorphic_to[i];
871 if (iso == iso_type) {
872 cnt++;
873 }
874 }
875 nb_starter_conf = cnt;
876
877 Starter_configuration_idx = NEW_int(nb_starter_conf);
878
879 cnt = 0;
880 for (i = 0; i < Classify_double_sixes->nb; i++) {
882 iso = Surfaces->Orbit[j].orbit_index;
883 //iso = is_isomorphic_to[i];
884 if (iso == iso_type) {
885 Starter_configuration_idx[cnt++] = i;
886 }
887 }
888
889 if (f_v) {
890 cout << "surface_classify_wedge::starter_configurations_which_are_involved" << endl;
891 }
892}
893
894
896 ofstream &fp, int verbose_level)
897{
898 int f_v = (verbose_level >= 1);
899
900 if (f_v) {
901 cout << "surface_classify_wedge::write_file" << endl;
902 }
903 fp.write((char *) &q, sizeof(int));
904
905 Flag_orbits->write_file(fp, verbose_level);
906
907 Surfaces->write_file(fp, verbose_level);
908
909 if (f_v) {
910 cout << "surface_classify_wedge::write_file finished" << endl;
911 }
912}
913
915 ifstream &fp, int verbose_level)
916{
917 int f_v = (verbose_level >= 1);
918 int q1;
919
920 if (f_v) {
921 cout << "surface_classify_wedge::read_file" << endl;
922 }
923 fp.read((char *) &q1, sizeof(int));
924 if (q1 != q) {
925 cout << "surface_classify_wedge::read_file q1 != q" << endl;
926 exit(1);
927 }
928
930 Flag_orbits->read_file(fp, A, A2, verbose_level);
931
933
935
936 A->group_order(go);
937
938 Surfaces->read_file(fp, A, A2, go, verbose_level);
939
940 if (f_v) {
941 cout << "surface_classify_wedge::read_file finished" << endl;
942 }
943}
944
945
946
947
949{
950 int f_v = (verbose_level >= 1);
951 int i;
952 //int m;
953
954 if (f_v) {
955 cout << "surface_classify_wedge::identify_Eckardt_and_print_table" << endl;
956 }
957
958 int *Iso_type;
959 int *Nb_lines;
960 //int *Nb_E;
961
962 Iso_type = NEW_int(q);
963 Nb_lines = NEW_int(q);
964 //Nb_E = NEW_int(q);
965 for (i = 0; i < q; i++) {
966 Iso_type[i] = -1;
967 //Nb_E[i] = -1;
968 }
969 identify_Eckardt(Iso_type, Nb_lines, verbose_level);
970
971#if 0
972 m = q - 3;
973 cout << "\\begin{array}{c|*{" << m << "}{c}}" << endl;
974 for (i = 0; i < m; i++) {
975 cout << " & " << i + 2;
976 }
977 cout << "\\\\" << endl;
978 cout << "\\hline" << endl;
979 //cout << "\\# E ";
980 for (i = 0; i < m; i++) {
981 cout << " & ";
982 if (Nb_E[i + 2] == -1) {
983 cout << "\\times ";
984 }
985 else {
986 cout << Nb_E[i + 2];
987 }
988 }
989 cout << "\\\\" << endl;
990 cout << "\\hline" << endl;
991 cout << "\\mbox{Iso} ";
992 for (i = 0; i < m; i++) {
993 cout << " & ";
994 if (Nb_E[i + 2] == -1) {
995 cout << "\\times ";
996 }
997 else {
998 cout << Iso_type[i + 2];
999 }
1000 }
1001 cout << "\\\\" << endl;
1002 cout << "\\hline" << endl;
1003 cout << "\\end{array}" << endl;
1004#endif
1005
1006 FREE_int(Iso_type);
1007 FREE_int(Nb_lines);
1008
1009 if (f_v) {
1010 cout << "surface_classify_wedge::identify_Eckardt_and_print_table done" << endl;
1011 }
1012}
1013
1015{
1016 int f_v = (verbose_level >= 1);
1017 int a;
1018
1019 if (f_v) {
1020 cout << "surface_classify_wedge::identify_F13_and_print_table" << endl;
1021 }
1022
1023 int *Iso_type;
1024 int *Nb_lines;
1025 //int *Nb_E;
1026
1027 Iso_type = NEW_int(q);
1028 Nb_lines = NEW_int(q);
1029 //Nb_E = NEW_int(q);
1030
1031 for (a = 0; a < q; a++) {
1032 Iso_type[a] = -1;
1033 Nb_lines[a] = -1;
1034 //Nb_E[a] = -1;
1035 }
1036
1037 identify_F13(Iso_type, Nb_lines, verbose_level);
1038
1039
1040 cout << "\\begin{array}{|c|c|c|c|}" << endl;
1041 cout << "\\hline" << endl;
1042 cout << "a & a & \\# lines & \\mbox{OCN} \\\\" << endl;
1043 cout << "\\hline" << endl;
1044 for (a = 1; a < q; a++) {
1045 cout << a << " & ";
1046 F->print_element(cout, a);
1047 cout << " & ";
1048 cout << Nb_lines[a] << " & ";
1049 //cout << Nb_E[a] << " & ";
1050 cout << Iso_type[a] << "\\\\" << endl;
1051 }
1052 cout << "\\hline" << endl;
1053 cout << "\\end{array}" << endl;
1054
1055 FREE_int(Iso_type);
1056 FREE_int(Nb_lines);
1057
1058 if (f_v) {
1059 cout << "surface_classify_wedge::identify_F13_and_print_table done" << endl;
1060 }
1061}
1062
1064{
1065 int f_v = (verbose_level >= 1);
1066 int a, c;
1067
1068 if (f_v) {
1069 cout << "surface_classify_wedge::identify_Bes_and_print_table" << endl;
1070 }
1071
1072 int *Iso_type;
1073 int *Nb_lines;
1074 //int *Nb_E;
1075
1076 Iso_type = NEW_int(q * q);
1077 Nb_lines = NEW_int(q * q);
1078 //Nb_E = NEW_int(q * q);
1079
1080 for (a = 0; a < q * q; a++) {
1081 Iso_type[a] = -1;
1082 Nb_lines[a] = -1;
1083 //Nb_E[a] = -1;
1084 }
1085
1086 identify_Bes(Iso_type, Nb_lines, verbose_level);
1087
1088
1089 //cout << "\\begin{array}{|c|c|c|}" << endl;
1090 //cout << "\\hline" << endl;
1091 cout << "(a,c); \\# lines & \\mbox{OCN} \\\\" << endl;
1092 //cout << "\\hline" << endl;
1093 for (a = 2; a < q; a++) {
1094 for (c = 2; c < q; c++) {
1095 cout << "(" << a << "," << c << "); (";
1096 F->print_element(cout, a);
1097 cout << ", ";
1098 F->print_element(cout, c);
1099 cout << "); ";
1100 cout << Nb_lines[a * q + c] << "; ";
1101 //cout << Nb_E[a * q + c] << "; ";
1102 cout << Iso_type[a * q + c];
1103 cout << "\\\\" << endl;
1104 }
1105 }
1106 //cout << "\\hline" << endl;
1107 //cout << "\\end{array}" << endl;
1108
1109
1110 FREE_int(Iso_type);
1111 FREE_int(Nb_lines);
1112
1113 if (f_v) {
1114 cout << "surface_classify_wedge::identify_Bes_and_print_table done" << endl;
1115 }
1116}
1117
1118
1120 int *Iso_type, int *Nb_lines, int verbose_level)
1121{
1122 int f_v = (verbose_level >= 1);
1123 int a, b, alpha, beta;
1124 int iso_type;
1125 int *Elt;
1126
1127 if (f_v) {
1128 cout << "surface_classify_wedge::identify_Eckardt" << endl;
1129 }
1130
1131 Elt = NEW_int(A->elt_size_in_int);
1132 cout << "surface_classify_wedge::identify_Eckardt "
1133 "looping over all a:" << endl;
1134 b = 1;
1135 for (a = 2; a < q - 1; a++) {
1136 cout << "surface_classify_wedge::identify_Eckardt "
1137 "a = " << a << endl;
1138
1139
1141
1143 a, b,
1144 alpha, beta,
1145 verbose_level);
1146
1148 iso_type, Elt,
1149 verbose_level);
1150
1151 cout << "surface_classify_wedge::identify_Eckardt "
1152 "a = " << a << " is isomorphic to iso_type "
1153 << iso_type << ", an isomorphism is:" << endl;
1154 A->element_print_quick(Elt, cout);
1155
1156 Iso_type[a] = iso_type;
1157 Nb_lines[a] = SO->nb_lines;
1158 //Nb_E[a] = nb_E;
1159
1160 FREE_OBJECT(SO);
1161
1162 }
1163
1164 FREE_int(Elt);
1165 if (f_v) {
1166 cout << "surface_classify_wedge::identify_Eckardt done" << endl;
1167 }
1168}
1169
1171 int *Iso_type, int *Nb_lines, int verbose_level)
1172{
1173 int f_v = (verbose_level >= 1);
1174 int a;
1175 int iso_type;
1176 int *Elt;
1177
1178 if (f_v) {
1179 cout << "surface_classify_wedge::identify_F13" << endl;
1180 }
1181
1182 Elt = NEW_int(A->elt_size_in_int);
1183 cout << "surface_classify_wedge::identify_F13 "
1184 "looping over all a:" << endl;
1185 for (a = 1; a < q; a++) {
1186 cout << "surface_classify_wedge::identify_F13 "
1187 "a = " << a << endl;
1188
1189 Iso_type[a] = -1;
1190 Nb_lines[a] = -1;
1191 //Nb_E[a] = -1;
1192
1194
1195 SO = Surf->create_surface_F13(a, verbose_level);
1196
1197
1199 iso_type, Elt,
1200 verbose_level);
1201
1202 cout << "surface_classify_wedge::identify_F13 "
1203 "a = " << a << " is isomorphic to iso_type "
1204 << iso_type << ", an isomorphism is:" << endl;
1205 A->element_print_quick(Elt, cout);
1206
1207 Iso_type[a] = iso_type;
1208 Nb_lines[a] = SO->nb_lines;
1209 //Nb_E[a] = nb_E;
1210 FREE_OBJECT(SO);
1211
1212 }
1213
1214 FREE_int(Elt);
1215 if (f_v) {
1216 cout << "surface_classify_wedge::identify_F13 done" << endl;
1217 }
1218}
1219
1221 int *Iso_type, int *Nb_lines, int verbose_level)
1222{
1223 int f_v = (verbose_level >= 1);
1224 int i, a, c;
1225 //int *coeff;
1226 int iso_type;
1227 int *Elt;
1228
1229 if (f_v) {
1230 cout << "surface_classify_wedge::identify_Bes" << endl;
1231 }
1232
1233 Elt = NEW_int(A->elt_size_in_int);
1234 cout << "surface_classify_wedge::identify_Bes "
1235 "looping over all a:" << endl;
1236
1237 for (i = 0; i < q * q; i++) {
1238 Iso_type[i] = -1;
1239 //Nb_E[i] = -1;
1240 }
1241 for (a = 2; a < q; a++) {
1242 cout << "surface_classify_wedge::identify_Bes "
1243 "a = " << a << endl;
1244
1245 for (c = 2; c < q; c++) {
1246 cout << "surface_classify_wedge::identify_Bes "
1247 "a = " << a << " c = " << c << endl;
1248
1249 Iso_type[a * q + c] = -1;
1250 Nb_lines[a * q + c] = -1;
1251 //Nb_E[a * q + c] = -1;
1252
1254
1255 SO = Surf->create_surface_bes(a, c, verbose_level);
1256
1257 cout << "surface_classify_wedge::identify_Bes "
1258 "nb_lines = " << SO->nb_lines << endl;
1259
1261 iso_type, Elt,
1262 verbose_level);
1263
1264 cout << "surface_classify_wedge::identify_Bes "
1265 "a = " << a << " c = " << c << " is isomorphic to iso_type "
1266 << iso_type << ", an isomorphism is:" << endl;
1267 A->element_print_quick(Elt, cout);
1268
1269 Iso_type[a * q + c] = iso_type;
1270 Nb_lines[a * q + c] = SO->nb_lines;
1271 //Nb_E[a * q + c] = nb_E;
1272 FREE_OBJECT(SO);
1273 }
1274 }
1275
1276 FREE_int(Elt);
1277 if (f_v) {
1278 cout << "surface_classify_wedge::identify_Bes done" << endl;
1279 }
1280}
1281
1282
1283
1287 int &isomorphic_to1, int &isomorphic_to2,
1288 int *Elt_isomorphism_1to2,
1289 int verbose_level)
1290{
1291 int f_v = (verbose_level >= 1);
1292 int *Elt1, *Elt2, *Elt3;
1293 int ret;
1295
1296 if (f_v) {
1297 cout << "surface_classify_wedge::isomorphism_test_pairwise" << endl;
1298 }
1299 int *coeff1;
1300 int *coeff2;
1301
1302 coeff1 = SC1->SO->eqn;
1303 coeff2 = SC2->SO->eqn;
1308 coeff1,
1309 isomorphic_to1, Elt1,
1310 verbose_level - 1);
1312 coeff2,
1313 isomorphic_to2, Elt2,
1314 verbose_level - 1);
1315 if (isomorphic_to1 != isomorphic_to2) {
1316 ret = FALSE;
1317 if (f_v) {
1318 cout << "surface_classify_wedge::isomorphism_test_pairwise "
1319 "not isomorphic" << endl;
1320 }
1321 }
1322 else {
1323 ret = TRUE;
1324 if (f_v) {
1325 cout << "surface_classify_wedge::isomorphism_test_pairwise "
1326 "they are isomorphic" << endl;
1327 }
1328 A->element_invert(Elt2, Elt3, 0);
1329 A->element_mult(Elt1, Elt3, Elt_isomorphism_1to2, 0);
1330 if (f_v) {
1331 cout << "an isomorphism from surface1 to surface2 is" << endl;
1332 A->element_print(Elt_isomorphism_1to2, cout);
1333 }
1335
1336 mtx = A->G.matrix_grp;
1337
1338 if (f_v) {
1339 cout << "testing the isomorphism" << endl;
1340 A->element_print(Elt_isomorphism_1to2, cout);
1341 cout << "from: ";
1342 Int_vec_print(cout, coeff1, 20);
1343 cout << endl;
1344 cout << "to : ";
1345 Int_vec_print(cout, coeff2, 20);
1346 cout << endl;
1347 }
1348 A->element_invert(Elt_isomorphism_1to2, Elt1, 0);
1349 if (f_v) {
1350 cout << "the inverse element is" << endl;
1351 A->element_print(Elt1, cout);
1352 }
1353 int coeff3[20];
1354 int coeff4[20];
1356 coeff1, coeff3, Surf,
1357 verbose_level - 1);
1358
1359 Int_vec_copy(coeff2, coeff4, 20);
1361 coeff3, 1,
1364 coeff4, 1,
1366
1367 if (f_v) {
1368 cout << "after substitution, normalized" << endl;
1369 cout << " : ";
1370 Int_vec_print(cout, coeff3, 20);
1371 cout << endl;
1372 cout << "coeff2, normalized" << endl;
1373 cout << " : ";
1374 Int_vec_print(cout, coeff4, 20);
1375 cout << endl;
1376 }
1377 if (Sorting.int_vec_compare(coeff3, coeff4, 20)) {
1378 cout << "The surface equations are not equal. That is bad." << endl;
1379 exit(1);
1380 }
1381 }
1382
1383 FREE_int(Elt1);
1384 FREE_int(Elt2);
1385 FREE_int(Elt3);
1386 if (f_v) {
1387 cout << "surface_classify_wedge::isomorphism_test_pairwise done" << endl;
1388 }
1389 return ret;
1390}
1391
1393 int *coeff_of_given_surface,
1394 int &isomorphic_to, int *Elt_isomorphism,
1395 int verbose_level)
1396{
1397 int f_v = (verbose_level >= 1);
1398 int line_idx, subset_idx;
1399 int double_six_orbit, iso_type, idx2;
1401
1402 if (f_v) {
1403 cout << "surface_classify_wedge::identify_surface" << endl;
1404 }
1405
1406 isomorphic_to = -1;
1407
1408 int nb_points;
1409 //int nb_lines;
1410
1411 if (f_v) {
1412 cout << "identifying the surface ";
1413 Int_vec_print(cout, coeff_of_given_surface,
1415 cout << " = ";
1416 Surf->print_equation(cout, coeff_of_given_surface);
1417 cout << endl;
1418 }
1419
1420
1421 //Points = NEW_lint(Surf->P->N_points);
1422
1423 // find all the points on the surface based on the equation:
1424
1425 vector<long int> My_Points;
1426 int h;
1427
1428 Surf->enumerate_points(coeff_of_given_surface, My_Points, 0/*verbose_level - 2*/);
1429
1430 nb_points = My_Points.size();
1431
1432 if (f_v) {
1433 cout << "The surface to be identified has "
1434 << nb_points << " points" << endl;
1435 }
1436
1437 // find all lines which are completely contained in the
1438 // set of points:
1439
1440 vector<long int> My_Lines;
1442 My_Points,
1443 My_Lines,
1444 0/*verbose_level - 2*/);
1445
1446 // the lines are not arranged according to a double six
1447
1448 if (f_v) {
1449 cout << "The surface has " << nb_points << " points and " << My_Lines.size() << " lines" << endl;
1450 }
1451 if (My_Lines.size() != 27 /*&& nb_lines != 21*/) {
1452 cout << "the input surface has " << My_Lines.size() << " lines" << endl;
1453 cout << "something is wrong with the input surface, skipping" << endl;
1454 cout << "Points:";
1456 cout << endl;
1457 cout << "Lines:";
1459 cout << endl;
1460
1461 return;
1462 }
1463
1464
1465 long int *Points;
1466 long int *Lines;
1467
1468 Points = NEW_lint(nb_points);
1469 for (h = 0; h < nb_points; h++) {
1470 Points[h] = My_Points[h];
1471 }
1472
1473 Lines = NEW_lint(27);
1474
1475 for (h = 0; h < 27; h++) {
1476 Lines[h] = My_Lines[h];
1477 }
1478
1479 int *Adj;
1480
1481
1483 Adj, Lines, 27 /* nb_lines */, 0 /* verbose_level */);
1484
1485
1486 data_structures::set_of_sets *line_intersections;
1487 int *Starter_Table;
1488 int nb_starter;
1489
1490 line_intersections = NEW_OBJECT(data_structures::set_of_sets);
1491
1492 line_intersections->init_from_adjacency_matrix(
1493 27 /* nb_lines*/, Adj,
1494 0 /* verbose_level */);
1495
1497 line_intersections, Starter_Table, nb_starter,
1498 0/*verbose_level*/);
1499
1500 long int S3[6];
1501 long int K1[6];
1502 long int W4[6];
1503 int l;
1504 int f;
1505
1506 if (nb_starter == 0) {
1507 cout << "nb_starter == 0" << endl;
1508 exit(1);
1509 }
1510 l = 0;
1511 line_idx = Starter_Table[l * 2 + 0];
1512 subset_idx = Starter_Table[l * 2 + 1];
1513
1514 Surf->create_starter_configuration(line_idx, subset_idx,
1515 line_intersections, Lines, S3, 0 /* verbose_level */);
1516
1517
1518 if (f_v) {
1519 cout << "surface_classify_wedge::identify_surface "
1520 "The starter configuration is S3=";
1521 Lint_vec_print(cout, S3, 6);
1522 cout << endl;
1523 }
1524
1525 int i;
1526 for (i = 0; i < 6; i++) {
1527 K1[i] = Surf->Klein->line_to_point_on_quadric(S3[i], 0 /* verbose_level */);
1528 }
1529 //lint_vec_apply(S3, Surf->Klein->line_to_point_on_quadric, K1, 6);
1530 // transform the five lines plus transversal
1531 // into points on the Klein quadric
1532
1533 for (h = 0; h < 5; h++) {
1534 f = Surf->O->evaluate_bilinear_form_by_rank(K1[h], K1[5]);
1535 if (f) {
1536 cout << "surface_classify_wedge::identify_surface "
1537 "K1[" << h << "] and K1[5] are not collinear" << endl;
1538 exit(1);
1539 }
1540 }
1541
1542
1543 //Surf->line_to_wedge_vec(S3, W1, 5);
1544 // transform the five lines into wedge coordinates
1545
1546 if (f_v) {
1547 cout << "surface_classify_wedge::identify_surface "
1548 "before Classify_double_sixes->identify_five_plus_one" << endl;
1549 }
1551 S3 /* five_lines */,
1552 S3[5] /* transversal_line */,
1553 W4 /* int *five_lines_out_as_neighbors */,
1554 idx2 /* &orbit_index */,
1555 Elt2 /* transporter */,
1556 0/*verbose_level - 2*/);
1557
1558 if (f_v) {
1559 cout << "surface_classify_wedge::identify_surface "
1560 "The five plus one configuration lies in orbit "
1561 << idx2 << endl;
1562 cout << "An isomorphism is given by:" << endl;
1563 A->element_print_quick(Elt2, cout);
1564 }
1565
1566#if 0
1567
1568
1570 Surf->Gr, S3[5], Elt0, 0 /* verbose_level */);
1571
1572
1573 A2->map_a_set(W1, W2, 5, Elt0, 0 /* verbose_level */);
1574
1575 int_vec_search_vec(Classify_double_sixes->Neighbors,
1577
1578 if (f_v) {
1579 cout << "down coset " << l << " / " << nb_starter
1580 << " tracing the set ";
1581 int_vec_print(cout, W3, 5);
1582 cout << endl;
1583 }
1584 idx2 = Classify_double_sixes->gen->trace_set(
1585 W3, 5, 5, W4, Elt1, 0 /* verbose_level */);
1586
1587
1588 A->element_mult(Elt0, Elt1, Elt2, 0);
1589#endif
1590
1591
1594 idx2, f)) {
1595 cout << "cannot find orbit in Po" << endl;
1596 exit(1);
1597 }
1598 if (f_v) {
1599 cout << "surface_classify_wedge::identify_surface "
1600 "flag orbit = " << f << endl;
1601 }
1602
1603
1604 double_six_orbit =
1606
1607 if (f_v) {
1608 cout << "surface_classify_wedge::identify_surface "
1609 "double_six_orbit = "
1610 << double_six_orbit << endl;
1611 }
1612
1613 if (double_six_orbit < 0) {
1614 cout << "surface_classify_wedge::identify_surface "
1615 "double_six_orbit < 0, something is wrong" << endl;
1616 exit(1);
1617 }
1619
1620 if (f_v) {
1621 cout << "surface_classify_wedge::identify_surface "
1622 "the flag orbit is a fusion node" << endl;
1623 }
1624
1627 Elt3, 0);
1628 }
1629 else {
1630
1631 if (f_v) {
1632 cout << "surface_classify_wedge::identify_surface "
1633 "the flag orbit is a definition node" << endl;
1634 }
1635
1636 A->element_move(Elt2, Elt3, 0);
1637 }
1638
1639 if (f_v) {
1640 cout << "An isomorphism is given by:" << endl;
1641 A->element_print_quick(Elt3, cout);
1642 }
1643
1644 iso_type = Flag_orbits->Flag_orbit_node[double_six_orbit].upstep_primary_orbit;
1645
1646 if (f_v) {
1647 cout << "surface_classify_wedge::identify_surface "
1648 "iso_type = " << iso_type << endl;
1649 }
1650
1651 if (Flag_orbits->Flag_orbit_node[double_six_orbit].f_fusion_node) {
1653 Flag_orbits->Flag_orbit_node[double_six_orbit].fusion_elt,
1654 Elt_isomorphism, 0);
1655 }
1656 else {
1657 A->element_move(Elt3, Elt_isomorphism, 0);
1658 }
1659
1660 //iso_type = is_isomorphic_to[orb2];
1661 //A->element_mult(Elt2, Isomorphisms->ith(orb2), Elt_isomorphism, 0);
1662
1663 if (f_v) {
1664 cout << "The surface is isomorphic to surface " << iso_type << endl;
1665 cout << "An isomorphism is given by:" << endl;
1666 A->element_print_quick(Elt_isomorphism, cout);
1667 }
1668 isomorphic_to = iso_type;
1669
1670 int *Elt_isomorphism_inv;
1671
1672 Elt_isomorphism_inv = NEW_int(A->elt_size_in_int);
1673 A->element_invert(Elt_isomorphism, Elt_isomorphism_inv, 0);
1674
1675 long int *image;
1676
1677 image = NEW_lint(nb_points);
1678 A->map_a_set_and_reorder(Points, image,
1679 nb_points, Elt_isomorphism,
1680 0 /* verbose_level */);
1681
1682 if (f_v) {
1683 cout << "The inverse isomorphism is given by:" << endl;
1684 A->element_print_quick(Elt_isomorphism_inv, cout);
1685
1686 cout << "The image of the set of points is: ";
1687 Lint_vec_print(cout, image, nb_points);
1688 cout << endl;
1689 }
1690
1691#if 0
1692 int i;
1693 for (i = 0; i < nb_points; i++) {
1694 if (image[i] != The_surface[isomorphic_to]->Surface[i]) {
1695 cout << "points disagree!" << endl;
1696 exit(1);
1697 }
1698 }
1699 cout << "the image set agrees with the point "
1700 "set of the chosen representative" << endl;
1701#endif
1702
1703 FREE_lint(image);
1704
1705 int *coeffs_transformed;
1706
1707 coeffs_transformed = NEW_int(Surf->nb_monomials);
1708
1709
1710
1711
1712 int idx;
1713 long int Lines0[27];
1714 int eqn0[20];
1715
1716 cout << "the surface in the list is = " << endl;
1717 idx = Surfaces->Orbit[isomorphic_to].orbit_index;
1720 Lines0, 27);
1721
1723 27, Lines0, eqn0,
1724 0 /* verbose_level*/);
1726
1727 Int_vec_print(cout, eqn0, Surf->nb_monomials);
1728 //int_vec_print(cout,
1729 //The_surface[isomorphic_to]->coeff, Surf->nb_monomials);
1730 cout << " = ";
1731 Surf->print_equation(cout, eqn0);
1732 cout << endl;
1733
1734
1736
1737 mtx = A->G.matrix_grp;
1738
1739 mtx->substitute_surface_equation(Elt_isomorphism_inv,
1740 coeff_of_given_surface, coeffs_transformed, Surf,
1741 verbose_level - 1);
1742
1743#if 0
1744 cout << "coeffs_transformed = " << endl;
1745 int_vec_print(cout, coeffs_transformed, Surf->nb_monomials);
1746 cout << " = ";
1747 Surf->print_equation(cout, coeffs_transformed);
1748 cout << endl;
1749#endif
1750
1752 coeffs_transformed, 1,
1754
1755 cout << "the surface to be identified was " << endl;
1756 Int_vec_print(cout, coeff_of_given_surface, Surf->nb_monomials);
1757 cout << " = ";
1758 Surf->print_equation(cout, coeff_of_given_surface);
1759 cout << endl;
1760
1761
1762 cout << "coeffs_transformed (and normalized) = " << endl;
1763 Int_vec_print(cout, coeffs_transformed, Surf->nb_monomials);
1764 cout << " = ";
1765 Surf->print_equation(cout, coeffs_transformed);
1766 cout << endl;
1767
1768
1769
1770
1771 FREE_OBJECT(line_intersections);
1772 FREE_int(Starter_Table);
1773 FREE_int(Adj);
1774 FREE_lint(Points);
1775 FREE_lint(Lines);
1776 FREE_int(Elt_isomorphism_inv);
1777 FREE_int(coeffs_transformed);
1778 if (f_v) {
1779 cout << "surface_classify_wedge::identify_surface done" << endl;
1780 }
1781}
1782
1784 ostream &ost, int f_with_stabilizers, int verbose_level)
1785{
1786 int f_v = (verbose_level >= 1);
1787 char str[1000];
1788 string title;
1789
1790 if (f_v) {
1791 cout << "surface_classify_wedge::latex_surfaces" << endl;
1792 }
1793 sprintf(str, "Cubic Surfaces with 27 Lines in $\\PG(3,%d)$", q);
1794 title.assign(str);
1795
1796
1797 ost << "\\subsection*{The Group $\\PGGL(4," << q << ")$}" << endl;
1798
1799 {
1802
1803 ost << "The order of the group is ";
1804 go.print_not_scientific(ost);
1805 ost << "\\\\" << endl;
1806
1807 ost << "\\bigskip" << endl;
1808 }
1809
1810#if 0
1812
1813
1815#endif
1816
1817 if (f_v) {
1818 cout << "surface_classify_wedge::latex_surfaces before Surfaces->print_latex" << endl;
1819 }
1820 Surfaces->print_latex(ost, title, f_with_stabilizers,
1821 FALSE, NULL, NULL);
1822 if (f_v) {
1823 cout << "surface_classify_wedge::latex_surfaces after Surfaces->print_latex" << endl;
1824 }
1825
1826
1827#if 1
1828 int orbit_index;
1829
1830 if (f_v) {
1831 cout << "surface_classify_wedge::latex_surfaces "
1832 "before loop over all surfaces" << endl;
1833 }
1834 for (orbit_index = 0; orbit_index < Surfaces->nb_orbits; orbit_index++) {
1835 if (f_v) {
1836 cout << "surface_classify_wedge::latex_surfaces "
1837 "before report_surface, orbit_index = " << orbit_index << endl;
1838 }
1839 report_surface(ost, orbit_index, verbose_level);
1840 if (f_v) {
1841 cout << "surface_classify_wedge::latex_surfaces "
1842 "after report_surface" << endl;
1843 }
1844 }
1845 if (f_v) {
1846 cout << "surface_classify_wedge::latex_surfaces "
1847 "after loop over all surfaces" << endl;
1848 }
1849#endif
1850 if (f_v) {
1851 cout << "surface_classify_wedge::latex_surfaces done" << endl;
1852 }
1853}
1854
1856 ostream &ost, int orbit_index,
1857 int verbose_level)
1858{
1859 int f_v = (verbose_level >= 1);
1861 long int Lines[27];
1862 int equation[20];
1863
1864 if (f_v) {
1865 cout << "surface_classify_wedge::report_surface "
1866 "orbit_index = " << orbit_index << endl;
1867 }
1868
1869 ost << endl; // << "\\clearpage" << endl << endl;
1870 ost << "\\section*{Surface $" << q << "\\#"
1871 << orbit_index << "$}" << endl;
1872
1873
1874 if (f_v) {
1875 cout << "surface_classify_wedge::report_surface "
1876 "before Surfaces->get_set_and_stabilizer" << endl;
1877 }
1878 SaS = Surfaces->get_set_and_stabilizer(orbit_index,
1879 0 /* verbose_level */);
1880 if (f_v) {
1881 cout << "surface_classify_wedge::report_surface "
1882 "after Surfaces->get_set_and_stabilizer" << endl;
1883 }
1884
1885 Lint_vec_copy(SaS->data, Lines, 27);
1886
1887 if (f_v) {
1888 cout << "surface_classify_wedge::report_surface "
1889 "before Surf->build_cubic_surface_from_lines" << endl;
1890 cout << "Surf->n = " << Surf->n << endl;
1891 }
1893 Lines, equation, verbose_level);
1894 if (f_v) {
1895 cout << "surface_classify_wedge::report_surface "
1896 "after Surf->build_cubic_surface_from_lines" << endl;
1897 }
1898
1900
1901
1902 //Surf->print_equation_wrapped(ost, equation);
1903
1904 if (f_v) {
1905 cout << "surface_classify_wedge::report_surface "
1906 "before SO->init_with_27_lines" << endl;
1907 }
1909
1911 SO->init_with_27_lines(Surf, Lines, equation,
1912 TRUE /*f_find_double_six_and_rearrange_lines*/,
1913 verbose_level);
1914 if (f_v) {
1915 cout << "surface_classify_wedge::report_surface "
1916 "after SO->init_with_27_lines" << endl;
1917 }
1918
1919
1920#if 0
1921 if (f_v) {
1922 cout << "surface_classify_wedge::report_surface "
1923 "before SO->enumerate_points" << endl;
1924 }
1925 SO->enumerate_points(verbose_level);
1926#endif
1927
1928 if (f_v) {
1929 cout << "surface_classify_wedge::report_surface "
1930 "before SO->compute_properties" << endl;
1931 }
1932 SO->compute_properties(verbose_level - 2);
1933 if (f_v) {
1934 cout << "surface_classify_wedge::report_surface "
1935 "after SO->compute_properties" << endl;
1936 }
1937
1938
1939 SO->SOP->print_equation(ost);
1940
1941
1943
1945
1946 if (f_v) {
1947 cout << "surface_classify_wedge::report_surface "
1948 "before SOA->init" << endl;
1949 }
1950 SOA->init_surface_object(Surf_A, SO,
1951 SaS->Strong_gens, verbose_level);
1952 if (f_v) {
1953 cout << "surface_classify_wedge::report_surface "
1954 "after SOA->init" << endl;
1955 }
1956
1957
1959 SaS->Strong_gens->group_order(ago);
1960 ost << "The automorphism group of the surface has order " << ago << "\\\\" << endl;
1961 ost << "The automorphism group is the following group\\\\" << endl;
1962
1963 if (f_v) {
1964 cout << "surface_classify_wedge::report_surface "
1965 "before SaS->Strong_gens->print_generators_tex" << endl;
1966 }
1968
1969 ost << endl;
1970 ost << "\\clearpage" << endl;
1971 ost << endl;
1972
1973
1974 if (f_v) {
1975 cout << "surface_classify_wedge::report_surface "
1976 "before SO->print_general" << endl;
1977 }
1978 SO->SOP->print_general(ost);
1979
1980 ost << endl;
1981 ost << "\\clearpage" << endl;
1982 ost << endl;
1983
1984
1985
1986 if (f_v) {
1987 cout << "surface_classify_wedge::report_surface "
1988 "before SO->print_lines" << endl;
1989 }
1990 SO->SOP->print_lines(ost);
1991
1992 ost << endl;
1993 ost << "\\clearpage" << endl;
1994 ost << endl;
1995
1996
1997
1998 if (f_v) {
1999 cout << "surface_classify_wedge::report_surface "
2000 "before SO->print_points" << endl;
2001 }
2002 SO->SOP->print_points(ost);
2003
2004
2005 ost << endl;
2006 ost << "\\clearpage" << endl;
2007 ost << endl;
2008
2009 if (f_v) {
2010 cout << "surface_classify_wedge::report_surface "
2011 "before SO->print_Hesse_planes" << endl;
2012 }
2013 SO->SOP->print_Hesse_planes(ost);
2014
2015 ost << endl;
2016 ost << "\\clearpage" << endl;
2017 ost << endl;
2018
2019
2020 if (f_v) {
2021 cout << "surface_classify_wedge::report_surface "
2022 "before SO->print_tritangent_planes" << endl;
2023 }
2024 SO->SOP->print_tritangent_planes(ost);
2025
2026 ost << endl;
2027 ost << "\\clearpage" << endl;
2028 ost << endl;
2029
2030
2031 if (f_v) {
2032 cout << "surface_classify_wedge::report_surface "
2033 "before SO->print_axes" << endl;
2034 }
2035 SO->SOP->print_axes(ost);
2036
2037
2038 //New_clebsch->SO->print_planes_in_trihedral_pairs(fp);
2039
2040#if 0
2041 if (f_v) {
2042 cout << "surface_classify_wedge::report_surface "
2043 "before SO->print_generalized_quadrangle" << endl;
2044 }
2045 SO->print_generalized_quadrangle(ost);
2046
2047 if (f_v) {
2048 cout << "surface_classify_wedge::report_surface "
2049 "before SOA->quartic" << endl;
2050 }
2051 SOA->quartic(ost, verbose_level);
2052#endif
2053
2054 FREE_OBJECT(SOA);
2055 FREE_OBJECT(SO);
2056 FREE_OBJECT(SaS);
2057
2058 if (f_v) {
2059 cout << "surface_classify_wedge::report_surface "
2060 "orbit_index = " << orbit_index << " done" << endl;
2061 }
2062}
2063
2065{
2066 int f_v = (verbose_level >= 1);
2067 int f_vv = (verbose_level >= 2);
2068 std::string fname;
2069 int orbit_index;
2070 int i, j;
2071
2072 if (f_v) {
2073 cout << "surface_classify_wedge::generate_source_code" << endl;
2074 }
2075 fname.assign(fname_base);
2076 fname.append(".cpp");
2077
2078 {
2079 ofstream f(fname.c_str());
2080
2081 f << "static int " << fname_base.c_str() << "_nb_reps = "
2082 << Surfaces->nb_orbits << ";" << endl;
2083 f << "static int " << fname_base.c_str() << "_size = "
2084 << Surf->nb_monomials << ";" << endl;
2085
2086
2087
2088 if (f_v) {
2089 cout << "surface_classify_wedge::generate_source_code "
2090 "preparing reps" << endl;
2091 }
2092 f << "// the equations:" << endl;
2093 f << "static int " << fname_base.c_str() << "_reps[] = {" << endl;
2094 for (orbit_index = 0;
2095 orbit_index < Surfaces->nb_orbits;
2096 orbit_index++) {
2097
2098
2100 long int Lines[27];
2101 int equation[20];
2102
2103 if (f_v) {
2104 cout << "surface_classify_wedge::generate_source_code "
2105 "orbit_index = " << orbit_index << endl;
2106 }
2107
2109 orbit_index, 0 /* verbose_level */);
2110 Lint_vec_copy(SaS->data, Lines, 27);
2111
2113 Lines, equation, 0 /* verbose_level */);
2115
2116 f << "\t";
2117 for (i = 0; i < Surf->nb_monomials; i++) {
2118 f << equation[i];
2119 f << ", ";
2120 }
2121 f << endl;
2122
2123 FREE_OBJECT(SaS);
2124
2125 }
2126 f << "};" << endl;
2127
2128
2129
2130 if (f_v) {
2131 cout << "surface_classify_wedge::generate_source_code "
2132 "preparing stab_order" << endl;
2133 }
2134 f << "// the stabilizer orders:" << endl;
2135 f << "static const char *" << fname_base.c_str() << "_stab_order[] = {" << endl;
2136 for (orbit_index = 0;
2137 orbit_index < Surfaces->nb_orbits;
2138 orbit_index++) {
2139
2141
2142 Surfaces->Orbit[orbit_index].gens->group_order(ago);
2143
2144 f << "\t\"";
2145
2146 ago.print_not_scientific(f);
2147 f << "\"," << endl;
2148
2149 }
2150 f << "};" << endl;
2151
2152
2153 if (f_v) {
2154 cout << "surface_classify_wedge::generate_source_code "
2155 "preparing nb_E" << endl;
2156 }
2157 f << "// the number of Eckardt points:" << endl;
2158 f << "static int " << fname_base.c_str() << "_nb_E[] = { " << endl << "\t";
2159 for (orbit_index = 0;
2160 orbit_index < Surfaces->nb_orbits;
2161 orbit_index++) {
2163 long int Lines[27];
2164 int equation[27];
2165 long int *Pts;
2166 int nb_pts;
2167 data_structures::set_of_sets *pts_on_lines;
2168 int nb_E;
2169
2170 if (f_v) {
2171 cout << "surface_classify_wedge::generate_source_code "
2172 "orbit_index = " << orbit_index << endl;
2173 }
2174
2176 orbit_index, 0 /* verbose_level */);
2177 Lint_vec_copy(SaS->data, Lines, 27);
2179 Lines, equation, 0 /* verbose_level */);
2181
2183
2184 vector<long int> Points;
2185 int h;
2186
2188 0 /* verbose_level */);
2189
2190 nb_pts = Points.size();
2191 Pts = NEW_lint(nb_pts);
2192 for (h = 0; h < nb_pts; h++) {
2193 Pts[h] = Points[h];
2194 }
2195
2196
2197 if (nb_pts != Surf->nb_pts_on_surface_with_27_lines) {
2198 cout << "surface_classify_wedge::generate_source_code "
2199 "nb_pts != Surf->nb_pts_on_surface_with_27_lines" << endl;
2200 exit(1);
2201 }
2202
2203 int *f_is_on_line;
2204
2205 Surf->compute_points_on_lines(Pts, nb_pts,
2206 Lines, 27 /*nb_lines*/,
2207 pts_on_lines,
2208 f_is_on_line,
2209 0/*verbose_level*/);
2210
2211 FREE_int(f_is_on_line);
2212
2213 nb_E = pts_on_lines->number_of_eckardt_points(verbose_level);
2214
2215 f << nb_E;
2216 if (orbit_index < Surfaces->nb_orbits - 1) {
2217 f << ", ";
2218 }
2219 if (((orbit_index + 1) % 10) == 0) {
2220 f << endl << "\t";
2221 }
2222
2223
2224 FREE_OBJECT(pts_on_lines);
2225 FREE_lint(Pts);
2226 FREE_OBJECT(SaS);
2227 }
2228 f << "};" << endl;
2229
2230
2231#if 0
2232 f << "static int " << prefix << "_single_six[] = { " << endl;
2233 for (iso_type = 0; iso_type < nb_iso; iso_type++) {
2234 f << "\t" << The_surface[iso_type]->S2[5];
2235 for (j = 0; j < 5; j++) {
2236 f << ", ";
2237 f << The_surface[iso_type]->S2[j];
2238 }
2239 f << ", " << endl;
2240 }
2241 f << "};" << endl;
2242#endif
2243
2244
2245 if (f_v) {
2246 cout << "surface_classify_wedge::generate_source_code "
2247 "preparing Lines" << endl;
2248 }
2249 f << "// the lines in the order double six "
2250 "a_i, b_i and 15 more lines c_ij:" << endl;
2251 f << "static int " << fname_base.c_str() << "_Lines[] = { " << endl;
2252
2253
2254 for (orbit_index = 0;
2255 orbit_index < Surfaces->nb_orbits;
2256 orbit_index++) {
2257
2258
2260 long int Lines[27];
2261
2262 if (f_v) {
2263 cout << "surface_classify_wedge::generate_source_code "
2264 "orbit_index = " << orbit_index << endl;
2265 }
2266
2268 orbit_index, 0 /* verbose_level */);
2269 Lint_vec_copy(SaS->data, Lines, 27);
2270
2271 f << "\t";
2272 for (j = 0; j < 27; j++) {
2273 f << Lines[j];
2274 f << ", ";
2275 }
2276 f << endl;
2277
2278 FREE_OBJECT(SaS);
2279 }
2280 f << "};" << endl;
2281
2282 f << "static int " << fname_base.c_str() << "_make_element_size = "
2283 << A->make_element_size << ";" << endl;
2284
2285 {
2286 int *stab_gens_first;
2287 int *stab_gens_len;
2288 int fst;
2289
2290 stab_gens_first = NEW_int(Surfaces->nb_orbits);
2291 stab_gens_len = NEW_int(Surfaces->nb_orbits);
2292 fst = 0;
2293 for (orbit_index = 0;
2294 orbit_index < Surfaces->nb_orbits;
2295 orbit_index++) {
2296 stab_gens_first[orbit_index] = fst;
2297 stab_gens_len[orbit_index] =
2298 Surfaces->Orbit[orbit_index].gens->gens->len;
2299 //stab_gens_len[orbit_index] =
2300 //The_surface[iso_type]->stab_gens->gens->len;
2301 fst += stab_gens_len[orbit_index];
2302 }
2303
2304
2305 if (f_v) {
2306 cout << "surface_classify_wedge::generate_source_code "
2307 "preparing stab_gens_fst" << endl;
2308 }
2309 f << "static int " << fname_base.c_str() << "_stab_gens_fst[] = { ";
2310 for (orbit_index = 0;
2311 orbit_index < Surfaces->nb_orbits;
2312 orbit_index++) {
2313 f << stab_gens_first[orbit_index];
2314 if (orbit_index < Surfaces->nb_orbits - 1) {
2315 f << ", ";
2316 }
2317 if (((orbit_index + 1) % 10) == 0) {
2318 f << endl << "\t";
2319 }
2320 }
2321 f << "};" << endl;
2322
2323 if (f_v) {
2324 cout << "surface_classify_wedge::generate_source_code "
2325 "preparing stab_gens_len" << endl;
2326 }
2327 f << "static int " << fname_base.c_str() << "_stab_gens_len[] = { ";
2328 for (orbit_index = 0;
2329 orbit_index < Surfaces->nb_orbits;
2330 orbit_index++) {
2331 f << stab_gens_len[orbit_index];
2332 if (orbit_index < Surfaces->nb_orbits - 1) {
2333 f << ", ";
2334 }
2335 if (((orbit_index + 1) % 10) == 0) {
2336 f << endl << "\t";
2337 }
2338 }
2339 f << "};" << endl;
2340
2341
2342 if (f_v) {
2343 cout << "surface_classify_wedge::generate_source_code "
2344 "preparing stab_gens" << endl;
2345 }
2346 f << "static int " << fname_base.c_str() << "_stab_gens[] = {" << endl;
2347 for (orbit_index = 0;
2348 orbit_index < Surfaces->nb_orbits;
2349 orbit_index++) {
2350 int j;
2351
2352 for (j = 0; j < stab_gens_len[orbit_index]; j++) {
2353 if (f_vv) {
2354 cout << "surface_classify_wedge::generate_source_code "
2355 "before extract_strong_generators_in_"
2356 "order generator " << j << " / "
2357 << stab_gens_len[orbit_index] << endl;
2358 }
2359 f << "\t";
2361 Surfaces->Orbit[orbit_index].gens->gens->ith(j), f);
2362 //A->element_print_for_make_element(
2363 //The_surface[iso_type]->stab_gens->gens->ith(j), f);
2364 f << endl;
2365 }
2366 }
2367 f << "};" << endl;
2368
2369
2370 FREE_int(stab_gens_first);
2371 FREE_int(stab_gens_len);
2372 }
2373 }
2374
2376
2377 cout << "written file " << fname << " of size "
2378 << Fio.file_size(fname.c_str()) << endl;
2379 if (f_v) {
2380 cout << "surface_classify_wedge::generate_source_code done" << endl;
2381 }
2382}
2383
2384
2386{
2387 int f_v = (verbose_level >= 1);
2388
2389 if (f_v) {
2390 cout << "surface_classify_wedge::generate_history" << endl;
2391 }
2393 if (f_v) {
2394 cout << "surface_classify_wedge::generate_history done" << endl;
2395 }
2396
2397}
2398
2400{
2401 char fname[1000];
2403 int ret;
2404
2405 sprintf(fname, "Surfaces_q%d.data", q);
2406 if (Fio.file_size(fname) > 0) {
2407 ret = TRUE;
2408 }
2409 else {
2410 ret = FALSE;
2411 }
2412 return ret;
2413}
2414
2416{
2417 int f_v = (verbose_level >= 1);
2418
2419 if (f_v) {
2420 cout << "surface_classify_wedge::write_surfaces" << endl;
2421 }
2422 char fname[1000];
2424
2425 sprintf(fname, "Surfaces_q%d.data", q);
2426 {
2427
2428 ofstream fp(fname);
2429
2430 if (f_v) {
2431 cout << "surface_classify before SCW->write_file" << endl;
2432 }
2433 write_file(fp, verbose_level - 1);
2434 if (f_v) {
2435 cout << "surface_classify after SCW->write_file" << endl;
2436 }
2437 }
2438 cout << "Written file " << fname << " of size "
2439 << Fio.file_size(fname) << endl;
2440 if (f_v) {
2441 cout << "surface_classify_wedge::write_surfaces done" << endl;
2442 }
2443}
2444
2446{
2447 int f_v = (verbose_level >= 1);
2448
2449 if (f_v) {
2450 cout << "surface_classify_wedge::read_surfaces" << endl;
2451 }
2452 char fname[1000];
2454
2455 sprintf(fname, "Surfaces_q%d.data", q);
2456 cout << "Reading file " << fname << " of size "
2457 << Fio.file_size(fname) << endl;
2458 {
2459 ifstream fp(fname);
2460
2461 if (f_v) {
2462 cout << "surface_classify before SCW->read_file" << endl;
2463 }
2464 read_file(fp, verbose_level - 1);
2465 if (f_v) {
2466 cout << "surface_classify after SCW->read_file" << endl;
2467 }
2468 }
2469 if (f_v) {
2470 cout << "surface_classify_wedge::read_surfaces done" << endl;
2471 }
2472}
2473
2475{
2476 char fname[1000];
2478 int ret;
2479
2480 sprintf(fname, "Double_sixes_q%d.data", q);
2481 if (Fio.file_size(fname) > 0) {
2482 ret = TRUE;
2483 }
2484 else {
2485 ret = FALSE;
2486 }
2487 return ret;
2488}
2489
2491{
2492 int f_v = (verbose_level >= 1);
2493
2494 if (f_v) {
2495 cout << "surface_classify_wedge::write_double_sixes" << endl;
2496 }
2497 char fname[1000];
2499
2500 sprintf(fname, "Double_sixes_q%d.data", q);
2501 {
2502
2503 ofstream fp(fname);
2504
2505 if (f_v) {
2506 cout << "surface_classify before "
2507 "SCW->Classify_double_sixes->write_file" << endl;
2508 }
2509 Classify_double_sixes->write_file(fp, verbose_level - 1);
2510 if (f_v) {
2511 cout << "surface_classify after "
2512 "SCW->Classify_double_sixes->write_file" << endl;
2513 }
2514 }
2515 cout << "Written file " << fname << " of size "
2516 << Fio.file_size(fname) << endl;
2517 if (f_v) {
2518 cout << "surface_classify_wedge::write_double_sixes done" << endl;
2519 }
2520}
2521
2523{
2524 int f_v = (verbose_level >= 1);
2525
2526 if (f_v) {
2527 cout << "surface_classify_wedge::read_double_sixes" << endl;
2528 }
2529 char fname[1000];
2531
2532 sprintf(fname, "Double_sixes_q%d.data", q);
2533 if (f_v) {
2534 cout << "Reading file " << fname << " of size "
2535 << Fio.file_size(fname) << endl;
2536 }
2537 {
2538
2539 ifstream fp(fname);
2540
2541 if (f_v) {
2542 cout << "surface_classify before "
2543 "SCW->Classify_double_sixes->read_file" << endl;
2544 }
2545 Classify_double_sixes->read_file(fp, verbose_level - 1);
2546 if (f_v) {
2547 cout << "surface_classify after "
2548 "SCW->Classify_double_sixes->read_file" << endl;
2549 }
2550 }
2551 if (f_v) {
2552 cout << "surface_classify_wedge::read_double_sixes done" << endl;
2553 }
2554}
2555
2556
2557void surface_classify_wedge::create_report(int f_with_stabilizers,
2560 int verbose_level)
2561{
2562 int f_v = (verbose_level >= 1);
2563
2564 if (f_v) {
2565 cout << "surface_classify_wedge::create_report" << endl;
2566 }
2567 char fname[1000];
2568 char title[1000];
2569 char author[1000];
2571
2572 snprintf(title, 1000, "Cubic Surfaces with 27 Lines over GF(%d) ", q);
2573 strcpy(author, "Orbiter");
2574 snprintf(fname, 1000, "Surfaces_q%d.tex", q);
2575
2576 {
2577 ofstream fp(fname);
2579
2580 //latex_head_easy(fp);
2581 L.head(fp,
2582 FALSE /* f_book */,
2583 TRUE /* f_title */,
2584 title, author,
2585 FALSE /*f_toc */,
2586 FALSE /* f_landscape */,
2587 FALSE /* f_12pt */,
2588 TRUE /*f_enlarged_page */,
2589 TRUE /* f_pagenumbers*/,
2590 NULL /* extra_praeamble */);
2591
2592
2593 if (f_v) {
2594 cout << "surface_classify_wedge::create_report before report" << endl;
2595 }
2596 report(fp, f_with_stabilizers, draw_options, Opt, verbose_level - 1);
2597 if (f_v) {
2598 cout << "surface_classify_wedge::create_report after report" << endl;
2599 }
2600
2601
2602 L.foot(fp);
2603 }
2604 cout << "Written file " << fname << " of size "
2605 << Fio.file_size(fname) << endl;
2606}
2607
2608void surface_classify_wedge::report(ostream &ost, int f_with_stabilizers,
2611 int verbose_level)
2612{
2613 int f_v = (verbose_level >= 1);
2614
2615 if (f_v) {
2616 cout << "surface_classify_wedge::report" << endl;
2617 }
2619
2620
2621#if 0
2622 ost << "\\section{The field of order " << LG->F->q << "}" << endl;
2623 ost << "\\noindent The field ${\\mathbb F}_{"
2624 << LG->F->q
2625 << "}$ :\\\\" << endl;
2626 LG->F->cheat_sheet(ost, verbose_level);
2627#endif
2628
2629 if (f_v) {
2630 cout << "surface_classify_wedge::report before Classify_double_sixes->report" << endl;
2631 }
2632 Classify_double_sixes->report(ost, draw_options, Opt, verbose_level);
2633 if (f_v) {
2634 cout << "surface_classify_wedge::report after Classify_double_sixes->report" << endl;
2635 }
2636
2637 if (f_v) {
2638 cout << "surface_classify_wedge::report "
2639 "before Classify_double_sixes->print_five_plus_ones" << endl;
2640 }
2642 if (f_v) {
2643 cout << "surface_classify_wedge::report "
2644 "after Classify_double_sixes->print_five_plus_ones" << endl;
2645 }
2646
2647
2648 if (f_v) {
2649 cout << "surface_classify_wedge::report "
2650 "before Classify_double_sixes->Flag_orbits->print_latex" << endl;
2651 }
2652 Classify_double_sixes->Flag_orbits->print_latex(ost, "Flag orbits for double sixes", TRUE);
2653 if (f_v) {
2654 cout << "surface_classify_wedge::report "
2655 "after Classify_double_sixes->Flag_orbits->print_latex" << endl;
2656 }
2657
2658 if (f_v) {
2659 cout << "surface_classify_wedge::report "
2660 "before Classify_double_sixes->Double_sixes->print_latex" << endl;
2661 }
2662 {
2663 string title;
2664
2665 title.assign("Double Sixes");
2667 FALSE, NULL, NULL);
2668 }
2669 if (f_v) {
2670 cout << "surface_classify_wedge::report "
2671 "after Classify_double_sixes->Double_sixes->print_latex" << endl;
2672 }
2673
2674 if (f_v) {
2675 cout << "surface_classify_wedge::report before Flag_orbits->print_latex" << endl;
2676 }
2677 Flag_orbits->print_latex(ost, "Flag orbits for surfaces", TRUE);
2678 if (f_v) {
2679 cout << "surface_classify_wedge::report after Flag_orbits->print_latex" << endl;
2680 }
2681
2682 if (f_v) {
2683 cout << "surface_classify_wedge::report before Surfaces->print_latex" << endl;
2684 }
2685 {
2686 string title;
2687
2688 title.assign("Surfaces");
2689 Surfaces->print_latex(ost, title, TRUE,
2690 FALSE, NULL, NULL);
2691 }
2692 if (f_v) {
2693 cout << "surface_classify_wedge::report after Surfaces->print_latex" << endl;
2694 }
2695
2696 if (f_v) {
2697 cout << "surface_classify_wedge::report before latex_surfaces" << endl;
2698 }
2699 latex_surfaces(ost, f_with_stabilizers, verbose_level);
2700 if (f_v) {
2701 cout << "surface_classify_wedge::report after latex_surfaces" << endl;
2702 }
2703
2704 if (f_v) {
2705 cout << "surface_classify_wedge::report done" << endl;
2706 }
2707}
2708
2710{
2711 int f_v = (verbose_level >= 1);
2712
2713 if (f_v) {
2714 cout << "surface_classify_wedge::create_report_double_sixes" << endl;
2715 }
2716
2717 char fname[1000];
2718 char title[1000];
2719 char author[1000];
2720
2721 snprintf(title, 1000, "Cheat Sheet on Double Sixes over GF(%d) ", q);
2722 strcpy(author, "");
2723 snprintf(fname, 1000, "Double_sixes_q%d.tex", q);
2724
2725 {
2726 ofstream fp(fname);
2728
2729 //latex_head_easy(fp);
2730 L.head(fp,
2731 FALSE /* f_book */,
2732 TRUE /* f_title */,
2733 title, author,
2734 FALSE /*f_toc */,
2735 FALSE /* f_landscape */,
2736 FALSE /* f_12pt */,
2737 TRUE /*f_enlarged_page */,
2738 TRUE /* f_pagenumbers*/,
2739 NULL /* extra_praeamble */);
2740
2741
2742 if (f_v) {
2743 cout << "surface_classify_wedge::create_report_double_sixes "
2744 "before Classify_double_sixes->print_five_plus_ones" << endl;
2745 }
2747 if (f_v) {
2748 cout << "surface_classify_wedge::create_report_double_sixes "
2749 "after Classify_double_sixes->print_five_plus_ones" << endl;
2750 }
2751
2752 {
2753 string title;
2754
2755 title.assign("Double Sixes");
2756 if (f_v) {
2757 cout << "surface_classify_wedge::create_report_double_sixes "
2758 "before Classify_double_sixes->Double_sixes->print_latex" << endl;
2759 }
2761 title, FALSE /* f_with_stabilizers*/,
2762 FALSE, NULL, NULL);
2763 if (f_v) {
2764 cout << "surface_classify_wedge::create_report_double_sixes "
2765 "after Classify_double_sixes->Double_sixes->print_latex" << endl;
2766 }
2767 }
2768
2769 L.foot(fp);
2770 }
2772
2773 if (f_v) {
2774 cout << "Written file " << fname << " of size "
2775 << Fio.file_size(fname) << endl;
2776 }
2777 if (f_v) {
2778 cout << "surface_classify_wedge::create_report_double_sixes done" << endl;
2779 }
2780}
2781
2785 int verbose_level)
2786{
2787 int f_v = (verbose_level >= 1);
2788
2789 if (f_v) {
2790 cout << "surface_classify_wedge::test_isomorphism" << endl;
2791 }
2792
2797
2798 if (f_v) {
2799 cout << "before SC1->init" << endl;
2800 }
2801 SC1->init(Descr1, Surf_A, verbose_level);
2802 if (f_v) {
2803 cout << "after SC1->init" << endl;
2804 }
2805
2806 if (f_v) {
2807 cout << "before SC2->init" << endl;
2808 }
2809 SC2->init(Descr2, Surf_A, verbose_level);
2810 if (f_v) {
2811 cout << "after SC2->init" << endl;
2812 }
2813
2814 int isomorphic_to1;
2815 int isomorphic_to2;
2816 int *Elt_isomorphism_1to2;
2817
2818 Elt_isomorphism_1to2 = NEW_int(A->elt_size_in_int);
2820 SC1, SC2,
2821 isomorphic_to1, isomorphic_to2,
2822 Elt_isomorphism_1to2,
2823 verbose_level)) {
2824
2825 if (f_v) {
2826 cout << "The surfaces are isomorphic, "
2827 "an isomorphism is given by" << endl;
2828 A->element_print(Elt_isomorphism_1to2, cout);
2829 cout << "The surfaces belongs to iso type "
2830 << isomorphic_to1 << endl;
2831 }
2832 }
2833 else {
2834 if (f_v) {
2835 cout << "The surfaces are NOT isomorphic." << endl;
2836 cout << "surface 1 belongs to iso type "
2837 << isomorphic_to1 << endl;
2838 cout << "surface 2 belongs to iso type "
2839 << isomorphic_to2 << endl;
2840 }
2841 }
2842 if (f_v) {
2843 cout << "surface_classify_wedge::test_isomorphism done" << endl;
2844 }
2845}
2846
2847
2848
2849
2852 int verbose_level)
2853{
2854 int f_v = (verbose_level >= 1);
2855
2856 if (f_v) {
2857 cout << "surface_classify_wedge::recognition" << endl;
2858 }
2862
2864
2865 if (f_v) {
2866 cout << "before SC->init" << endl;
2867 }
2868 SC->init(Descr, Surf_A, verbose_level);
2869 if (f_v) {
2870 cout << "after SC->init" << endl;
2871 }
2872
2873 int isomorphic_to;
2874 int *Elt_isomorphism;
2875
2876 Elt_isomorphism = NEW_int(A->elt_size_in_int);
2878 SC->SO->eqn,
2879 isomorphic_to, Elt_isomorphism,
2880 verbose_level);
2881 if (f_v) {
2882 cout << "surface belongs to iso type "
2883 << isomorphic_to << endl;
2884 }
2887 if (f_v) {
2888 cout << "before SG->stabilizer_of_cubic_surface_from_catalogue" << endl;
2889 }
2891 Surf_A->A,
2892 F, isomorphic_to,
2893 verbose_level);
2894
2896 SG, Elt_isomorphism, verbose_level);
2898
2899 SG0->group_order(go);
2900 if (f_v) {
2901 cout << "The full stabilizer has order " << go << endl;
2902 cout << "And is generated by" << endl;
2903 SG0->print_generators_tex(cout);
2904 }
2905 if (f_v) {
2906 cout << "surface_classify_wedge::recognition done" << endl;
2907 }
2908}
2909
2910
2912 int verbose_level)
2913{
2914 int f_v = (verbose_level >= 1);
2915
2916 if (f_v) {
2917 cout << "surface_classify_wedge::sweep_Cayley" << endl;
2918 }
2919 int isomorphic_to;
2920 int *Elt_isomorphism;
2921
2922 Elt_isomorphism = NEW_int(A->elt_size_in_int);
2923
2924
2925 int k, l, m, n;
2926 int q4 = q * q * q * q;
2927 int *Table;
2928 int *Table_reverse;
2929 int nb_iso;
2930 int cnt = 0;
2931 int nb_identified = 0;
2932 int h;
2933
2934
2936
2937 nb_iso = K.cubic_surface_nb_reps(q);
2938
2939 Table = NEW_int(q4 * 5);
2940 Table_reverse = NEW_int(nb_iso * 5);
2941
2942 for (h = 0; h < nb_iso; h++) {
2943 Table_reverse[h * 5 + 0] = -1;
2944 Table_reverse[h * 5 + 1] = -1;
2945 Table_reverse[h * 5 + 2] = -1;
2946 Table_reverse[h * 5 + 3] = -1;
2947 Table_reverse[h * 5 + 4] = -1;
2948 }
2949
2950
2951 for (k = 0; k < q; k++) {
2952 for (l = 1; l < q; l++) {
2953 for (m = 1; m < q; m++) {
2954 for (n = 1; n < q; n++) {
2955
2956
2959
2961
2962 Descr.f_Cayley_form = TRUE;
2963 Descr.Cayley_form_k = k;
2964 Descr.Cayley_form_l = l;
2965 Descr.Cayley_form_m = m;
2966 Descr.Cayley_form_n = n;
2967
2968 Descr.f_q = TRUE;
2969 Descr.q = q;
2970
2971 if (f_v) {
2972 cout << "k=" << k << " l=" << l << " m=" << m << " n=" << n << " before SC->init" << endl;
2973 }
2974 SC->init(&Descr, Surf_A, 0 /*verbose_level*/);
2975 if (FALSE) {
2976 cout << "after SC->init" << endl;
2977 }
2978
2979 if (SC->SO->nb_lines == 27) {
2980
2982 SC->SO->eqn,
2983 isomorphic_to, Elt_isomorphism,
2984 verbose_level);
2985 if (f_v) {
2986 cout << "surface " << SC->label_txt << " belongs to iso type " << isomorphic_to << endl;
2987 }
2988
2989 Table[cnt * 5 + 0] = k;
2990 Table[cnt * 5 + 1] = l;
2991 Table[cnt * 5 + 2] = m;
2992 Table[cnt * 5 + 3] = n;
2993 Table[cnt * 5 + 4] = isomorphic_to;
2994
2995 if (Table_reverse[isomorphic_to * 5 + 0] == -1) {
2996 Table_reverse[isomorphic_to * 5 + 0] = cnt;
2997 Table_reverse[isomorphic_to * 5 + 1] = k;
2998 Table_reverse[isomorphic_to * 5 + 2] = l;
2999 Table_reverse[isomorphic_to * 5 + 3] = m;
3000 Table_reverse[isomorphic_to * 5 + 4] = n;
3001 nb_identified++;
3002 }
3003 cnt++;
3004
3005 }
3006
3007 FREE_OBJECT(SC);
3008
3009 if (nb_identified == nb_iso) {
3010 break;
3011 }
3012
3013 }
3014 if (nb_identified == nb_iso) {
3015 break;
3016 }
3017 }
3018 if (nb_identified == nb_iso) {
3019 break;
3020 }
3021 }
3022 if (nb_identified == nb_iso) {
3023 break;
3024 }
3025 }
3026
3027 string fname;
3028 char str[1000];
3029
3030 fname.assign("Cayley_q");
3031 sprintf(str, "%d.csv", q);
3032 fname.append(str);
3034
3035 Fio.int_matrix_write_csv(fname, Table, cnt, 5);
3036
3037 fname.assign("Cayley_reverse_q");
3038 sprintf(str, "%d.csv", q);
3039 fname.append(str);
3040
3041 Fio.int_matrix_write_csv(fname, Table_reverse, nb_iso, 5);
3042
3043
3044
3045 FREE_int(Elt_isomorphism);
3046
3047
3048 if (f_v) {
3049 cout << "surface_classify_wedge::sweep_Cayley done" << endl;
3050 }
3051}
3052
3054 int *Iso_type, int *Nb_lines, int verbose_level)
3055{
3056 int f_v = (verbose_level >= 1);
3057 int i, a, b, c, d;
3058 int a0, b0; //, c0, d0;
3059 int iso_type;
3060 int *Elt;
3061 int q2, q3, q4;
3062
3063 if (f_v) {
3064 cout << "surface_classify_wedge::identify_general_abcd" << endl;
3065 }
3066
3067
3068 q2 = q * q;
3069 q3 = q2 * q;
3070 q4 = q3 * q;
3071
3072 Elt = NEW_int(A->elt_size_in_int);
3073 cout << "surface_classify_wedge::identify_general_abcd "
3074 "looping over all a:" << endl;
3075
3076 for (i = 0; i < q4; i++) {
3077 Iso_type[i] = -1;
3078 Nb_lines[i] = -1;
3079 //Nb_E[i] = -1;
3080 }
3081 for (a = 1; a < q; a++) {
3082 cout << "surface_classify_wedge::identify_general_abcd "
3083 "a = " << a << endl;
3084
3085 if (a == 0 || a == 1) {
3086 continue;
3087 }
3088
3089 for (b = 1; b < q; b++) {
3090 cout << "surface_classify_wedge::identify_general_abcd "
3091 " b = " << b << endl;
3092
3093 if (b == 0 || b == 1) {
3094 continue;
3095 }
3096
3097 if (b == a) {
3098 continue;
3099 }
3100
3101 if (EVEN(q)) {
3103 a0, b0, verbose_level);
3104
3105 cout << "a=" << a << " b=" << b << " a0=" << a0 << " b0=" << b0 << endl;
3106
3107 if (a0 < a) {
3108 cout << "skipping" << endl;
3109 continue;
3110 }
3111 if (a0 == a && b0 < b) {
3112 cout << "skipping" << endl;
3113 continue;
3114 }
3115 }
3116
3117 for (c = 1; c < q; c++) {
3118 cout << "surface_classify_wedge::identify_general_abcd "
3119 "a = " << a << " b = " << b << " c = " << c << endl;
3120
3121
3122 if (c == 0 || c == 1) {
3123 continue;
3124 }
3125
3126 if (c == a) {
3127 continue;
3128 }
3129
3130
3131
3132 for (d = 1; d < q; d++) {
3133
3134 if (d == 0 || d == 1) {
3135 continue;
3136 }
3137
3138 if (d == b) {
3139 continue;
3140 }
3141
3142 if (d == c) {
3143 continue;
3144 }
3145
3146#if 1
3147 // ToDo
3148 // warning: special case
3149
3150 if (d != a) {
3151 continue;
3152 }
3153#endif
3154
3155 cout << "surface_classify_wedge::identify_general_abcd "
3156 "a = " << a << " b = " << b << " c = " << c << " d = " << d << endl;
3157
3158 int m1;
3159
3160
3161 m1 = F->negate(1);
3162
3163
3164#if 0
3165 // this is a test for having 6 Eckardt points:
3166 int b2, b2v, x1, x2;
3167
3168 b2 = F->mult(b, b);
3169 //cout << "b2=" << b2 << endl;
3170 b2v = F->inverse(b2);
3171 //cout << "b2v=" << b2v << endl;
3172
3173 x1 = F->add(F->mult(2, b), m1);
3174 x2 = F->mult(x1, b2v);
3175
3176 if (c != x2) {
3177 cout << "skipping" << endl;
3178 continue;
3179 }
3180#endif
3181
3182
3183
3184#if 0
3185 F->minimal_orbit_rep_under_stabilizer_of_frame(c, d,
3186 c0, d0, verbose_level);
3187
3188 cout << "c=" << c << " d=" << d << " c0=" << c0 << " d0=" << d0 << endl;
3189
3190
3191 if (c0 < c) {
3192 cout << "skipping" << endl;
3193 continue;
3194 }
3195 if (c0 == c && d0 < d) {
3196 cout << "skipping" << endl;
3197 continue;
3198 }
3199#endif
3200
3201
3202 cout << "nonconical test" << endl;
3203
3204 int admbc;
3205 //int m1;
3206 int a1, b1, c1, d1;
3207 int a1d1, b1c1;
3208 int ad, bc;
3209 int adb1c1, bca1d1;
3210
3211
3212 //m1 = F->negate(1);
3213
3214 a1 = F->add(a, m1);
3215 b1 = F->add(b, m1);
3216 c1 = F->add(c, m1);
3217 d1 = F->add(d, m1);
3218
3219 ad = F->mult(a, d);
3220 bc = F->mult(b, c);
3221
3222 adb1c1 = F->mult3(ad, b1, c1);
3223 bca1d1 = F->mult3(bc, a1, d1);
3224
3225 a1d1 = F->mult(a1, d1);
3226 b1c1 = F->mult(b1, c1);
3227 if (a1d1 == b1c1) {
3228 continue;
3229 }
3230 if (adb1c1 == bca1d1) {
3231 continue;
3232 }
3233
3234
3235
3236 admbc = F->add(F->mult(a, d), F->negate(F->mult(b, c)));
3237
3238 if (admbc == 0) {
3239 continue;
3240 }
3241
3242 Iso_type[a * q3 + b * q2 + c * q + d] = -2;
3243 Nb_lines[a * q3 + b * q2 + c * q + d] = -1;
3244 //Nb_E[a * q3 + b * q2 + c * q + d] = -1;
3245
3247
3248 SO = Surf->create_surface_general_abcd(a, b, c, d, verbose_level);
3249
3250
3252 iso_type, Elt,
3253 verbose_level);
3254
3255 cout << "surface_classify_wedge::identify_general_abcd "
3256 "a = " << a << " b = " << b << " c = " << c << " d = " << d
3257 << " is isomorphic to iso_type "
3258 << iso_type << ", an isomorphism is:" << endl;
3259 A->element_print_quick(Elt, cout);
3260
3261 Iso_type[a * q3 + b * q2 + c * q + d] = iso_type;
3262 Nb_lines[a * q3 + b * q2 + c * q + d] = SO->nb_lines;
3263 //Nb_E[a * q3 + b * q2 + c * q + d] = nb_E;
3264 }
3265 }
3266 }
3267 }
3268
3269 FREE_int(Elt);
3270 if (f_v) {
3271 cout << "surface_classify_wedge::identify_general_abcd done" << endl;
3272 }
3273}
3274
3276{
3277 int f_v = (verbose_level >= 1);
3278 int a, b, c, d;
3279 int q4, q3, q2;
3280
3281 if (f_v) {
3282 cout << "surface_classify_wedge::identify_general_abcd_and_print_table" << endl;
3283 }
3284
3285 q2 = q * q;
3286 q3 = q2 * q;
3287 q4 = q3 * q;
3288
3289 int *Iso_type;
3290 int *Nb_lines;
3291 //int *Nb_E;
3292
3293 Iso_type = NEW_int(q4);
3294 Nb_lines = NEW_int(q4);
3295 //Nb_E = NEW_int(q4);
3296
3297 for (a = 0; a < q4; a++) {
3298 Iso_type[a] = -1;
3299 Nb_lines[a] = -1;
3300 //Nb_E[a] = -1;
3301 }
3302
3303 if (f_v) {
3304 cout << "surface_classify_wedge::identify_general_abcd_and_print_table before identify_general_abcd" << endl;
3305 }
3306 identify_general_abcd(Iso_type, Nb_lines, verbose_level);
3307 if (f_v) {
3308 cout << "surface_classify_wedge::identify_general_abcd_and_print_table after identify_general_abcd" << endl;
3309 }
3310
3311
3312 //cout << "\\begin{array}{|c|c|c|}" << endl;
3313 //cout << "\\hline" << endl;
3314 cout << "(a,c); \\# lines & \\mbox{OCN} \\\\" << endl;
3315 //cout << "\\hline" << endl;
3316 for (a = 1; a < q; a++) {
3317 for (b = 1; b < q; b++) {
3318 for (c = 1; c < q; c++) {
3319 for (d = 1; d < q; d++) {
3320 cout << "$(" << a << "," << b << "," << c << "," << d << ")$; ";
3321#if 0
3322 cout << "$(";
3323 F->print_element(cout, a);
3324 cout << ", ";
3325 F->print_element(cout, b);
3326 cout << ", ";
3327 F->print_element(cout, c);
3328 cout << ", ";
3329 F->print_element(cout, d);
3330 cout << ")$; ";
3331#endif
3332 cout << Nb_lines[a * q3 + b * q2 + c * q + d] << "; ";
3333 //cout << Nb_E[a * q3 + b * q2 + c * q + d] << "; ";
3334 cout << Iso_type[a * q3 + b * q2 + c * q + d];
3335 cout << "\\\\" << endl;
3336 }
3337 }
3338 }
3339 }
3340 //cout << "\\hline" << endl;
3341 //cout << "\\end{array}" << endl;
3342
3343 int *Table;
3344 int h = 0;
3345 int nb_lines, iso, nb_e;
3348
3349 Table = NEW_int(q4 * 7);
3350
3351
3352 for (a = 1; a < q; a++) {
3353 for (b = 1; b < q; b++) {
3354 for (c = 1; c < q; c++) {
3355 for (d = 1; d < q; d++) {
3356 nb_lines = Nb_lines[a * q3 + b * q2 + c * q + d];
3357 iso = Iso_type[a * q3 + b * q2 + c * q + d];
3358
3359 if (iso == -1) {
3360 continue;
3361 }
3362
3363 if (iso >= 0) {
3364 nb_e = K.cubic_surface_nb_Eckardt_points(q, iso);
3365 }
3366 else {
3367 nb_e = -1;
3368 }
3369
3370 Table[h * 7 + 0] = a;
3371 Table[h * 7 + 1] = b;
3372 Table[h * 7 + 2] = c;
3373 Table[h * 7 + 3] = d;
3374 Table[h * 7 + 4] = nb_lines;
3375 Table[h * 7 + 5] = iso;
3376 Table[h * 7 + 6] = nb_e;
3377 h++;
3378 }
3379 }
3380 }
3381 }
3382
3383 char str[1000];
3384 string fname;
3385
3386 sprintf(str, "surface_recognize_abcd_q%d.csv", q);
3387 fname.assign(str);
3388
3389 Fio.int_matrix_write_csv(fname, Table, h, 7);
3390 cout << "Written file " << fname << " of size " << Fio.file_size(fname) << endl;
3391
3392
3393
3394 FREE_int(Iso_type);
3395 FREE_int(Nb_lines);
3396
3397 if (f_v) {
3398 cout << "surface_classify_wedge::identify_general_abcd_and_print_table done" << endl;
3399 }
3400}
3401
3402
3403
3404}}}}
3405
3406
3407
void compute_points_on_lines(long int *Pts_on_surface, int nb_points_on_surface, long int *Lines, int nb_lines, data_structures::set_of_sets *&pts_on_lines, int *&f_is_on_line, int verbose_level)
surface_object * create_surface_general_abcd(int a, int b, int c, int d, int verbose_level)
void lines_meet3_and_skew3(long int *lines_meet3, long int *lines_skew3, long int *&lines, int &nb_lines, int verbose_level)
void create_the_fifteen_other_lines(long int *double_six, long int *fifteen_other_lines, int verbose_level)
Given a double six in double_six[12], compute the 15 remaining lines cij.
void list_starter_configurations(long int *Lines, int nb_lines, data_structures::set_of_sets *line_intersections, int *&Table, int &N, int verbose_level)
void enumerate_points(int *coeff, std::vector< long int > &Pts, int verbose_level)
surface_object * create_surface_bes(int a, int c, int verbose_level)
surface_object * create_Eckardt_surface(int a, int b, int &alpha, int &beta, int verbose_level)
void compute_adjacency_matrix_of_line_intersection_graph(int *&Adj, long int *S, int n, int verbose_level)
Given a set of lines in S[n], compute the associated line intersection graph.
void create_starter_configuration(int line_idx, int subset_idx, data_structures::set_of_sets *line_neighbors, long int *Lines, long int *S, int verbose_level)
int perp_of_four_lines(long int *four_lines, long int *trans12, int &perp_sz, int verbose_level)
Given four general lines in four_lines[4], complete the two transversal lines.
void build_cubic_surface_from_lines(int len, long int *S, int *coeff, int verbose_level)
a particular cubic surface in PG(3,q), given by its equation
void init_with_27_lines(surface_domain *Surf, long int *Lines27, int *eqn, int f_find_double_six_and_rearrange_lines, int verbose_level)
void apply(long int *from, long int *through, long int *to, int len)
Definition: lint_vec.cpp:32
void print(std::ostream &ost, long int *v, int len)
Definition: lint_vec.cpp:246
void init_from_adjacency_matrix(int n, int *Adj, int verbose_level)
Definition: set_of_sets.cpp:87
a collection of functions related to sorted vectors
int int_vec_search(int *v, int len, int a, int &idx)
Definition: sorting.cpp:1094
void minimal_orbit_rep_under_stabilizer_of_frame_characteristic_two(int x, int y, int &a, int &b, int verbose_level)
void PG_element_unrank_modified_lint(int *v, int stride, int len, long int a)
void PG_element_rank_modified_lint(int *v, int stride, int len, long int &a)
long int line_to_point_on_quadric(long int line_rk, int verbose_level)
void find_lines_which_are_contained(std::vector< long int > &Points, std::vector< long int > &Lines, int verbose_level)
options for drawing an object of type layered_graph
Definition: graphics.h:457
provides access to pre-computed combinatorial data in encoded form
void int_matrix_write_csv(std::string &fname, int *M, int m, int n)
Definition: file_io.cpp:1300
void head(std::ostream &ost, int f_book, int f_title, const char *title, const char *author, int f_toc, int f_landscape, int f_12pt, int f_enlarged_page, int f_pagenumbers, const char *extras_for_preamble)
void unrank_point(int *v, int stride, long int rk, int verbose_level)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
void element_print(void *elt, std::ostream &ost)
Definition: action_cb.cpp:347
void map_a_set(long int *set, long int *image_set, int n, int *Elt, int verbose_level)
Definition: action.cpp:668
void element_mult(void *a, void *b, void *ab, int verbose_level)
Definition: action_cb.cpp:315
void element_print_for_make_element(void *elt, std::ostream &ost)
Definition: action_cb.cpp:409
groups::strong_generators * Strong_gens
Definition: actions.h:130
void make_element_which_moves_a_line_in_PG3q(geometry::grassmann *Gr, long int line_rk, int *Elt, int verbose_level)
Definition: action.cpp:2811
void element_invert(void *a, void *av, int verbose_level)
Definition: action_cb.cpp:322
void element_move(void *a, void *b, int verbose_level)
Definition: action_cb.cpp:335
void group_order(ring_theory::longinteger_object &go)
Definition: action.cpp:2223
void map_a_set_and_reorder(long int *set, long int *image_set, int n, int *Elt, int verbose_level)
Definition: action.cpp:698
void reallocate(int new_length, int verbose_level)
Definition: vector_ge.cpp:444
void init(actions::action *A, int verbose_level)
Definition: vector_ge.cpp:55
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)
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void stabilizer_of_cubic_surface_from_catalogue(actions::action *A, field_theory::finite_field *F, int iso, int verbose_level)
void init_generators_for_the_conjugate_group_aGav(strong_generators *SG, int *Elt_a, int verbose_level)
void init_group_extension(strong_generators *subgroup, int *data, int index, int verbose_level)
data_structures_groups::vector_ge * gens
Definition: groups.h:1708
void group_order(ring_theory::longinteger_object &go)
a single step classification of combinatorial objects
Definition: classify.h:29
void print_latex(std::ostream &ost, std::string &title, int f_print_stabilizer_gens, int f_has_print_function, void(*print_function)(std::ostream &ost, int i, classification_step *Step, void *print_function_data), void *print_function_data)
void init(actions::action *A, actions::action *A2, int max_orbits, int representation_sz, ring_theory::longinteger_object &go, int verbose_level)
void read_file(std::ifstream &fp, actions::action *A, actions::action *A2, ring_theory::longinteger_object &go, int verbose_level)
data_structures_groups::set_and_stabilizer * get_set_and_stabilizer(int orbit_index, int verbose_level)
void init(flag_orbits *Flag_orbits, int flag_orbit_index, int downstep_primary_orbit, int downstep_secondary_orbit, int downstep_orbit_len, int f_long_orbit, long int *pt_representation, groups::strong_generators *Strong_gens, int verbose_level)
stores the set of flag orbits; related to the class classification_step
Definition: classify.h:75
void init(actions::action *A, actions::action *A2, int nb_primary_orbits_lower, int pt_representation_sz, int nb_flag_orbits, int upper_bound_for_number_of_traces, void(*func_to_free_received_trace)(void *trace_result, void *data, int verbose_level), void(*func_latex_report_trace)(std::ostream &ost, void *trace_result, void *data, int verbose_level), void *free_received_trace_data, int verbose_level)
Definition: flag_orbits.cpp:75
void read_file(std::ifstream &fp, actions::action *A, actions::action *A2, int verbose_level)
void print_latex(std::ostream &ost, const char *title, int f_print_stabilizer_gens)
void write_file(std::ofstream &fp, int verbose_level)
void init(classification_step *C, int orbit_index, groups::strong_generators *gens, long int *Rep, void *extra_data, int verbose_level)
Definition: orbit_node.cpp:41
to control the behavior of the poset classification algorithm
to control the behavior of the poset classification report function
void init(cubic_surfaces_in_general::surface_with_action *Surf_A, poset_classification::poset_classification_control *Control, int verbose_level)
void report(std::ostream &ost, graphics::layered_graph_draw_options *draw_options, poset_classification::poset_classification_report_options *Opt, int verbose_level)
void identify_five_plus_one(long int *five_lines, long int transversal_line, long int *five_lines_out_as_neighbors, int &orbit_index, int *transporter, int verbose_level)
void init_surface_object(surface_with_action *Surf_A, algebraic_geometry::surface_object *SO, groups::strong_generators *Aut_gens, int verbose_level)
int isomorphism_test_pairwise(cubic_surfaces_in_general::surface_create *SC1, cubic_surfaces_in_general::surface_create *SC2, int &isomorphic_to1, int &isomorphic_to2, int *Elt_isomorphism_1to2, int verbose_level)
void test_isomorphism(cubic_surfaces_in_general::surface_create_description *Descr1, cubic_surfaces_in_general::surface_create_description *Descr2, int verbose_level)
void init(cubic_surfaces_in_general::surface_with_action *Surf_A, poset_classification::poset_classification_control *Control, int verbose_level)
void report(std::ostream &ost, int f_with_stabilizers, graphics::layered_graph_draw_options *draw_options, poset_classification::poset_classification_report_options *Opt, int verbose_level)
void create_report(int f_with_stabilizers, graphics::layered_graph_draw_options *draw_options, poset_classification::poset_classification_report_options *Opt, int verbose_level)
void starter_configurations_which_are_involved(int iso_type, int *&Starter_configuration_idx, int &nb_starter_conf, int verbose_level)
void identify_surface(int *coeff_of_given_surface, int &isomorphic_to, int *Elt_isomorphism, int verbose_level)
to create a cubic surface from a description using class surface_create_description
void init(surface_create_description *Descr, surface_with_action *Surf_A, 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_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 TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define EVEN(x)
Definition: foundations.h:221
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects