Orbiter 2022
Combinatorial Objects
classify_cubic_curves.cpp
Go to the documentation of this file.
1/*
2 * classify_cubic_curves.cpp
3 *
4 * Created on: Mar 7, 2019
5 * Author: betten
6 */
7
8
9#include "orbiter.h"
10
11using namespace std;
12using namespace orbiter::layer1_foundations;
13
14namespace orbiter {
15namespace layer5_applications {
16namespace apps_geometry {
17
18
20{
21 q = 0;
22 F = NULL;
23 A = NULL; // do not free
24
25 CCA = NULL; // do not free
26 CC = NULL; // do not free
27
28 Arc_gen = NULL;
29
31 nb = 0;
32 Idx = NULL;
33
34
35 Flag_orbits = NULL;
36
37 Po = NULL;
38
40
41 Curves = NULL;
42 //null();
43}
44
46{
47 freeself();
48}
49
51{
52}
53
55{
56 if (Arc_gen) {
58 }
59 if (Idx) {
61 }
62 if (Flag_orbits) {
64 }
65 if (Po) {
66 FREE_int(Po);
67 }
68 if (Curves) {
70 }
71 null();
72}
73
78 int verbose_level)
79{
80 int f_v = (verbose_level >= 1);
81
82 if (f_v) {
83 cout << "classify_cubic_curves::init" << endl;
84 }
86 F = CCA->F;
87 q = F->q;
88 A = CCA->A;
89 CC = CCA->CC;
90
92
93
94 if (f_v) {
95 cout << "classify_cubic_curves::init before Arc_gen->init" << endl;
96 }
97
98
99
100 // ToDo
101
102 Arc_gen->init(
103 Descr,
104 PA,
105 A->Strong_gens,
106 verbose_level);
107
108#if 0
109 Arc_gen->init(GTA,
110 F,
111 A, A->Strong_gens,
112 9 /* starter_size */,
113 FALSE /* f_conic_test */,
114 Control,
115 verbose_level);
116#endif
117
118
119 if (f_v) {
120 cout << "classify_cubic_curves::init after Arc_gen->init" << endl;
121 }
122
123
124 if (f_v) {
125 cout << "classify_cubic_curves::init done" << endl;
126 }
127}
128
130{
131 int f_v = (verbose_level >= 1);
132
133
134 if (f_v) {
135 cout << "classify_cubic_curves::compute_starter" << endl;
136 }
137 Arc_gen->compute_starter(verbose_level);
138 if (f_v) {
139 cout << "classify_cubic_curves::compute_starter done" << endl;
140 }
141}
142
143
145{
146 //verbose_level += 2;
147 int f_v = (verbose_level >= 1);
148 int f_vv = FALSE; // (verbose_level >= 2);
149 int i, r;
150 long int S[9];
151 //long int *Pts_on_curve;
152 //long int *singular_Pts;
153 int *type;
154 //int nb_pts_on_curve; //, nb_singular_pts;
155
156 if (f_v) {
157 cout << "classify_cubic_curves::test_orbits" << endl;
158 cout << "verbose_level = " << verbose_level << endl;
159 }
161
162 //Pts_on_curve = NEW_lint(CC->P->N_points);
163 //singular_Pts = NEW_lint(CC->P->N_points);
164 type = NEW_int(CC->P->N_lines);
165
166 if (f_v) {
167 cout << "classify_cubic_curves::test_orbits testing "
168 << nb_orbits_on_sets << " orbits of 9-sets of points:" << endl;
169 }
170 nb = 0;
172 for (i = 0; i < nb_orbits_on_sets; i++) {
173 if (f_vv || ((i % 1000) == 0)) {
174 cout << "classify_cubic_curves::test_orbits orbit "
175 << i << " / " << nb_orbits_on_sets << ":" << endl;
176 }
177 Arc_gen->gen->get_set_by_level(9, i, S);
178 if (f_vv) {
179 cout << "set: ";
180 Lint_vec_print(cout, S, 5);
181 cout << endl;
182 }
183
184
185
186
187#if 1
188 if (f_vv) {
189 CC->P->print_set(S, 9);
190 }
191#endif
192
193 r = CC->compute_system_in_RREF(9, S, 0 /*verbose_level*/);
194 if (f_vv) {
195 cout << "classify_cubic_curves::test_orbits orbit "
196 << i << " / " << nb_orbits_on_sets
197 << " has rank = " << r << endl;
198 }
199 if (r == 9) {
200
201 // second test:
202 // the curve should not contain lines:
203 int eqn[10];
204 int idx;
205
207 CC->Poly,
208 9 /* nb_pts */, S /* int *Pts */, eqn,
209 verbose_level - 5);
210
211 {
212 long int *Pts;
213 int nb_pts;
214
215 {
216 vector<long int> Pts_on_curve;
217
219 Pts_on_curve,
220 0 /*verbose_level - 4*/);
221
222 int h;
223
224 nb_pts = Pts_on_curve.size();
225 Pts = NEW_lint(nb_pts);
226 for (h = 0; h < nb_pts; h++) {
227 Pts[h] = Pts_on_curve[h];
228 }
229 }
231 Pts, nb_pts /* set_size */,
232 type, 0 /*verbose_level*/);
233
234 FREE_lint(Pts);
235 }
236
238
239 Cl.init(type, CC->P->N_lines, FALSE, 0);
240 idx = Cl.determine_class_by_value(q + 1);
241
242 if (idx == -1) {
243
244#if 0
245 // third test: the curve should have no singular points:
246
248 eqn,
249 Pts_on_curve, nb_pts_on_curve,
250 singular_Pts, nb_singular_pts,
251 0 /*verbose_level*/);
252
253 if (nb_singular_pts == 0) {
254 Idx[nb++] = i;
255 }
256#else
257 Idx[nb++] = i;
258#endif
259 }
260 }
261 } // next i
262
263 if (f_v) {
264 cout << "classify_cubic_curves::test_orbits we found "
265 << nb << " / " << nb_orbits_on_sets
266 << " orbits where the rank is 9" << endl;
267 cout << "Idx=";
268 Int_vec_print(cout, Idx, nb);
269 cout << endl;
270 }
271
272 //FREE_lint(Pts_on_curve);
273 //FREE_lint(singular_Pts);
274 FREE_int(type);
275
276 if (f_v) {
277 cout << "classify_cubic_curves::test_orbits done" << endl;
278 }
279}
280
281
282void classify_cubic_curves::downstep(int verbose_level)
283{
284 int f_v = (verbose_level >= 1);
285 int f_vv = FALSE; // (verbose_level >= 2);
286 //int f_vvv = (verbose_level >= 3);
287 int f, i, nb_flag_orbits;
288
289 if (f_v) {
290 cout << "classify_cubic_curves::downstep" << endl;
291 cout << "verbose_level = " << verbose_level << endl;
292 }
293
294 if (f_v) {
295 cout << "classify_cubic_curves::downstep "
296 "before test_orbits" << endl;
297 }
298 test_orbits(verbose_level - 1);
299 if (f_v) {
300 cout << "classify_cubic_curves::downstep "
301 "after test_orbits" << endl;
302 cout << "Idx=";
303 Int_vec_print(cout, Idx, nb);
304 cout << endl;
305 }
306
307
308
311 nb_orbits_on_sets /* nb_primary_orbits_lower */,
312 9 + 10 /* pt_representation_sz */,
313 nb,
314 1 /* upper_bound_for_number_of_traces */, // ToDo
315 NULL /* void (*func_to_free_received_trace)(void *trace_result, void *data, int verbose_level) */,
316 NULL /* void (*func_latex_report_trace)(std::ostream &ost, void *trace_result, void *data, int verbose_level)*/,
317 NULL /* void *free_received_trace_data */,
318 verbose_level);
319
320 if (f_v) {
321 cout << "classify_cubic_curves::downstep "
322 "initializing flag orbits" << endl;
323 }
324
325 nb_flag_orbits = 0;
326 for (f = 0; f < nb; f++) {
327
328 i = Idx[f];
329 if (f_v) {
330 if ((f % 1000) == 0) {
331 cout << "classify_cubic_curves::downstep "
332 "orbit " << f << " / " << nb
333 << " with rank = 9 is orbit "
334 << i << " / " << nb_orbits_on_sets << endl;
335 }
336 }
337
341 long int dataset[19];
342
344 9 /* level */,
345 i /* orbit_at_level */,
346 0 /* verbose_level */);
347
349 i /* node */, 9 /* level */, ol);
350
351 R->Strong_gens->group_order(go);
352
353 Lint_vec_copy(R->data, dataset, 9);
354
355 int eqn[10];
356 if (f_vv) {
357 cout << "9 points = ";
358 Lint_vec_print(cout, dataset, 9);
359 cout << endl;
360 }
361
362 if (f_vv) {
363 cout << "classify_cubic_curves::downstep before "
364 "determine_cubic_in_plane" << endl;
365 }
366
368 CC->Poly,
369 9 /* nb_pts */, dataset /* int *Pts */, eqn,
370 0 /*verbose_level - 5*/);
371 //c = Surf_A->create_double_six_from_five_lines_with_a_common_transversal(
372 // dataset + 5, pt0_line, double_six,
373 // 0 /*verbose_level*/);
374
375 if (f_vv) {
376 cout << "The starter configuration is good, "
377 "a cubic has been computed:" << endl;
378 Int_vec_print(cout, eqn, 10);
379 }
380
381 Int_vec_copy_to_lint(eqn, dataset + 9, 10);
382
383
384 Flag_orbits->Flag_orbit_node[nb_flag_orbits].init(
386 nb_flag_orbits /* flag_orbit_index */,
387 i /* downstep_primary_orbit */,
388 0 /* downstep_secondary_orbit */,
389 ol.as_int() /* downstep_orbit_len */,
390 FALSE /* f_long_orbit */,
391 dataset /* int *pt_representation */,
392 R->Strong_gens,
393 0 /*verbose_level - 2*/);
394 R->Strong_gens = NULL;
395
396 if (f_vv) {
397 cout << "orbit " << f << " / " << nb
398 << " with rank = 9 is orbit " << i
399 << " / " << nb_orbits_on_sets << ", stab order "
400 << go << endl;
401 }
402 nb_flag_orbits++;
403
404 FREE_OBJECT(R);
405 } // next f
406
407 Flag_orbits->nb_flag_orbits = nb_flag_orbits;
408
409
410 Po = NEW_int(nb_flag_orbits);
411 for (f = 0; f < nb_flag_orbits; f++) {
413 }
414 if (f_v) {
415 cout << "classify_cubic_curves::downstep we found "
416 << nb_flag_orbits << " flag orbits out of "
417 << nb_orbits_on_sets << " orbits" << endl;
418 }
419 if (f_v) {
420 cout << "classify_cubic_curves::downstep "
421 "initializing flag orbits done" << endl;
422 }
423}
424
425
426void classify_cubic_curves::upstep(int verbose_level)
427{
428 int f_v = (verbose_level >= 1);
429 int i, j, r;
430 int f, po, so;
431 int *f_processed;
432 int nb_processed;
433 int *Elt;
434 int idx_set[9];
435 long int set[9];
436 long int canonical_set[9];
437 long int *Pts;
438 int *type;
441
442 if (f_v) {
443 cout << "classify_cubic_curves::upstep" << endl;
444 cout << "verbose_level = " << verbose_level << endl;
445 }
446
447
448 Elt = NEW_int(A->elt_size_in_int);
449 Pts = NEW_lint(CCA->CC->P->N_points);
450 type = NEW_int(CCA->CC->P->N_lines);
451
452 f_processed = NEW_int(Flag_orbits->nb_flag_orbits);
454 nb_processed = 0;
455
457
459 A->group_order(go);
460
461 Curves->init(A, A,
463 verbose_level);
464
465
466 if (f_v) {
467 cout << "flag orbit : downstep_primary_orbit" << endl;
468 if (Flag_orbits->nb_flag_orbits < 50) {
469 cout << "f : po" << endl;
470 for (f = 0; f < Flag_orbits->nb_flag_orbits; f++) {
472 cout << f << " : " << po << endl;
473 }
474 }
475 else {
476 cout << "classify_cubic_curves::upstep "
477 "too many flag orbits to print" << endl;
478 }
479 }
480 for (f = 0; f < Flag_orbits->nb_flag_orbits; f++) {
481
482 double progress;
483 long int dataset[19];
484
485 if (f_processed[f]) {
486 continue;
487 }
488
489 progress = ((double)nb_processed * 100. ) /
490 (double) Flag_orbits->nb_flag_orbits;
491
492 if (f_v) {
493 cout << "Defining n e w orbit "
495 << " from flag orbit " << f << " / "
497 << " progress=" << progress << "%" << endl;
498 }
501
502
504 cout << "Flag_orbits->pt_representation_sz != 19" << endl;
505 exit(1);
506 }
509 if (f_v) {
510 cout << "po=" << po << " so=" << so << endl;
511 }
512 Lint_vec_copy(Flag_orbits->Pt + f * 19, dataset, 19);
513
514
515
516
518 int nb_coset_reps;
519
520
523 int eqn[10];
524
525 Lint_vec_copy_to_int(dataset + 9, eqn, 10);
526
527 if (f_v) {
528 cout << "equation:";
529 Int_vec_print(cout, eqn, 10);
530 cout << endl;
531 }
533 S->group_order(go);
534 if (f_v) {
535 cout << "po=" << po << " so=" << so
536 << " go=" << go << endl;
537 }
538
539 nb_coset_reps = 0;
540
541 int nb_pts;
542 int N;
543 int orbit_index;
544 int f2;
545 int h;
546
547 {
548 vector<long int> Points;
549 CCA->CC->Poly->enumerate_points(eqn, Points,
550 0 /*verbose_level - 4*/);
551
552 nb_pts = Points.size();
553
554 for (h = 0; h < nb_pts; h++) {
555 Pts[h] = Points[h];
556 }
557 }
558 if (f_v) {
559 cout << "po=" << po << " so=" << so
560 << " we found a curve with " << nb_pts
561 << " points" << endl;
562 }
563
564 N = Combi.int_n_choose_k(nb_pts, 9);
565
567 coset_reps->init(CCA->A, verbose_level - 2);
568 coset_reps->allocate(N, verbose_level - 2);
569
570
571 for (i = 0; i < N; i++) {
572 if (FALSE) {
573 cout << "po=" << po << " so=" << so
574 << " i=" << i << " / " << N << endl;
575 }
576
577 Combi.unrank_k_subset(i, idx_set, nb_pts, 9);
578 for (j = 0; j < 9; j++) {
579 set[j] = Pts[idx_set[j]];
580 }
581
582 r = CC->compute_system_in_RREF(9, set, 0 /*verbose_level*/);
583
584 if (r < 9) {
585 continue;
586 }
587
589 set, 9 /* set_size */, type, 0 /*verbose_level*/);
590 // type[N_lines]
591
592 for (j = 0; j < CCA->CC->P->N_lines; j++) {
593 if (type[j] > 3) {
594 break;
595 }
596 }
597 if (j < CCA->CC->P->N_lines) {
598 continue;
599 }
600
601
602 orbit_index = Arc_gen->gen->trace_set(
603 set, 9, 9,
604 canonical_set,
605 Elt,
606 0 /*verbose_level - 2*/);
607
609 orbit_index, f2)) {
610 cout << "cannot find orbit " << orbit_index
611 << " in Po" << endl;
612 cout << "Po=";
614 cout << endl;
615 exit(1);
616 }
617
619 != orbit_index) {
620 cout << "Flag_orbits->Flag_orbit_node[f2].downstep_"
621 "primary_orbit != orbit_index" << endl;
622 exit(1);
623 }
624
625
626
627
628
629
630 if (f2 == f) {
631 if (f_v) {
632 cout << "We found an automorphism of "
633 "the curve with " << nb_pts << " points:" << endl;
634 A->element_print_quick(Elt, cout);
635 cout << endl;
636 }
637 A->element_move(Elt, coset_reps->ith(nb_coset_reps), 0);
638 nb_coset_reps++;
639 //S->add_single_generator(Elt3,
640 //2 /* group_index */, verbose_level - 2);
641 }
642 else {
643 if (FALSE) {
644 cout << "We are identifying flag orbit "
645 << f2 << " with flag orbit " << f << endl;
646 }
647 if (!f_processed[f2]) {
651 = TRUE;
653 = f;
656 A->element_invert(Elt,
658 0);
659 f_processed[f2] = TRUE;
660 nb_processed++;
661 }
662 else {
663 if (FALSE) {
664 cout << "Flag orbit " << f2 << " has already been "
665 "identified with flag orbit " << f << endl;
666 }
668 cout << "Flag_orbits->Flag_orbit_node[f2]."
669 "fusion_with != f" << endl;
670 exit(1);
671 }
672 }
673 }
674
675 }
676
677 coset_reps->reallocate(nb_coset_reps, verbose_level - 2);
678
680
681 {
683
684 if (f_v) {
685 cout << "classify_cubic_curves::upstep "
686 "Extending the group by a factor of "
687 << nb_coset_reps << endl;
688 }
690 Aut_gens->init_group_extension(S,
691 coset_reps, nb_coset_reps,
692 verbose_level - 2);
693 if (f_v) {
694 cout << "classify_cubic_curves::upstep "
695 "Aut_gens tl = ";
696 Int_vec_print(cout,
697 Aut_gens->tl, Aut_gens->A->base_len());
698 cout << endl;
699 }
700
701 Aut_gens->group_order(ago);
702
703
704 if (f_v) {
705 cout << "the double six has a stabilizer of order "
706 << ago << endl;
707 cout << "The n e w stabilizer is:" << endl;
708 Aut_gens->print_generators_tex(cout);
709 }
710 }
711
712
713
715 Curves,
717 Aut_gens, dataset, NULL /* extra_data */, verbose_level);
718
719 FREE_OBJECT(coset_reps);
720 FREE_OBJECT(S);
721
722 f_processed[f] = TRUE;
723 nb_processed++;
725 } // next f
726
727
728 if (nb_processed != Flag_orbits->nb_flag_orbits) {
729 cout << "nb_processed != Flag_orbits->nb_flag_orbits" << endl;
730 cout << "nb_processed = " << nb_processed << endl;
731 cout << "Flag_orbits->nb_flag_orbits = "
732 << Flag_orbits->nb_flag_orbits << endl;
733 exit(1);
734 }
735
737
738 if (f_v) {
739 cout << "We found " << Flag_orbits->nb_primary_orbits_upper
740 << " orbits of curves" << endl;
741 }
742
743 FREE_int(Elt);
744 FREE_int(f_processed);
745 FREE_lint(Pts);
746 FREE_int(type);
747
748
749 if (f_v) {
750 cout << "classify_cubic_curves::upstep done" << endl;
751 }
752}
753
754
756{
757 int f_v = (verbose_level >= 1);
758
759
760 if (f_v) {
761 cout << "classify_cubic_curves::do_classify" << endl;
762 }
763
764 if (f_v) {
765 cout << "classify_cubic_curves::do_classify "
766 "before downstep" << endl;
767 }
768 downstep(verbose_level);
769 if (f_v) {
770 cout << "classify_cubic_curves::do_classify "
771 "after downstep" << endl;
772 cout << "we found " << Flag_orbits->nb_flag_orbits
773 << " flag orbits out of "
775 << " orbits" << endl;
776 }
777
778 if (f_v) {
779 cout << "classify_cubic_curves::do_classify "
780 "before upstep" << endl;
781 }
782 upstep(verbose_level);
783 if (f_v) {
784 cout << "classify_cubic_curves::do_classify "
785 "after upstep" << endl;
786 cout << "we found " << Curves->nb_orbits
787 << " cubic curves out of "
789 << " flag orbits" << endl;
790 }
791
792 if (f_v) {
793 cout << "classify_cubic_curves::do_classify done" << endl;
794 }
795}
796
797
799 int *Elt, int &iso_type, int verbose_level)
800{
801 int f_v = (verbose_level >= 1);
802 int i, j, r;
803 int idx_set[9];
804 long int set[9];
805 long int canonical_set[9];
806 int *Elt1;
807 long int *Pts_on_curve;
808 long int *singular_Pts;
809 int *type;
810 int ret;
813
814 if (f_v) {
815 cout << "classify_cubic_curves::recognize" << endl;
816 cout << "verbose_level = " << verbose_level << endl;
817 }
818
819
820 Elt1 = NEW_int(A->elt_size_in_int);
821 Pts_on_curve = NEW_lint(CCA->CC->P->N_points);
822 singular_Pts = NEW_lint(CCA->CC->P->N_points);
823 type = NEW_int(CCA->CC->P->N_lines);
824
825
826 int nb_pts_on_curve; //, nb_singular_pts;
827 int N;
828 int orbit_index;
829 int f2;
830 int h;
831
832
833 {
834 vector<long int> Points;
835
836 CCA->CC->Poly->enumerate_points(eqn_in, Points,
837 verbose_level - 4);
838
839
840 nb_pts_on_curve = Points.size();
841
842 for (h = 0; h < nb_pts_on_curve; h++) {
843 Pts_on_curve[h] = Points[h];
844 }
845 }
846
847 if (f_v) {
848 cout << "classify_cubic_curves::recognize"
849 << " we found a curve with " << nb_pts_on_curve
850 << " points" << endl;
851 }
853 Pts_on_curve, nb_pts_on_curve /* set_size */, type, 0 /*verbose_level*/);
854 // type[N_lines]
855
856 ret = TRUE;
857 for (j = 0; j < CCA->CC->P->N_lines; j++) {
858 if (type[j] > 3) {
859 ret = FALSE;
860 break;
861 }
862 }
863
864#if 0
865 if (ret) {
867 eqn_in,
868 Pts_on_curve, nb_pts_on_curve,
869 singular_Pts, nb_singular_pts,
870 0 /*verbose_level*/);
871
872 if (nb_singular_pts) {
873 ret = FALSE;
874 }
875 }
876#endif
877
878 if (ret) {
879 N = Combi.int_n_choose_k(nb_pts_on_curve, 9);
880
881
882 for (i = 0; i < N; i++) {
883 if (f_v) {
884 cout << "classify_cubic_curves::recognize"
885 << " i=" << i << " / " << N << endl;
886 }
887
888 Combi.unrank_k_subset(i, idx_set, nb_pts_on_curve, 9);
889 for (j = 0; j < 9; j++) {
890 set[j] = Pts_on_curve[idx_set[j]];
891 }
892
894 set, 0 /*verbose_level*/);
895
896 if (r < 9) {
897 continue;
898 }
899
901 set, 9 /* set_size */, type, 0 /*verbose_level*/);
902 // type[N_lines]
903
904 for (j = 0; j < CCA->CC->P->N_lines; j++) {
905 if (type[j] > 3) {
906 break;
907 }
908 }
909 if (j < CCA->CC->P->N_lines) {
910 continue;
911 }
912
913
914 if (f_v) {
915 cout << "classify_cubic_curves::recognize"
916 << " i=" << i << " / " << N
917 << " before trace_set" << endl;
918 }
919
920
921 orbit_index = Arc_gen->gen->trace_set(
922 set, 9, 9,
923 canonical_set,
924 Elt,
925 verbose_level - 1);
926
927
928 if (f_v) {
929 cout << "classify_cubic_curves::recognize"
930 << " i=" << i << " / " << N
931 << " after trace_set, "
932 "orbit_index=" << orbit_index << endl;
933 }
934
936 orbit_index, f2)) {
937
938 continue;
939#if 0
940 cout << "classify_cubic_curves::recognize "
941 "cannot find orbit " << orbit_index
942 << " in Po" << endl;
943 cout << "Po=";
944 int_vec_print(cout, Po, Flag_orbits->nb_flag_orbits);
945 cout << endl;
946 exit(1);
947#endif
948 }
949
950 if (f_v) {
951 cout << "classify_cubic_curves::recognize"
952 << " i=" << i << " / " << N
953 << " after trace_set, "
954 "f2=" << f2 << endl;
955 }
956
958
959 if (f_v) {
960 cout << "classify_cubic_curves::recognize"
961 << " i=" << i << " / " << N
962 << " after trace_set, "
963 "iso_type=" << iso_type << endl;
964 }
965
967 A->element_mult(Elt,
969 Elt1,
970 0);
971 A->element_move(Elt1,
972 Elt,
973 0);
974 }
975 break;
976
977 }
978 if (i == N) {
979 cout << "classify_cubic_curves::recognize "
980 "could not identify the curve" << endl;
981 ret = FALSE;
982 }
983 else {
984 ret = TRUE;
985 }
986 }
987
988
989 FREE_int(Elt1);
990 FREE_lint(Pts_on_curve);
991 FREE_lint(singular_Pts);
992 FREE_int(type);
993
994 if (f_v) {
995 cout << "classify_cubic_curves::recognize done" << endl;
996 }
997 return ret;
998}
999
1001 int verbose_level)
1002{
1003 int f_v = (verbose_level >= 1);
1004 int *Elt;
1005 int eqn[10];
1006 int e, iso_type;
1007
1008 if (f_v) {
1009 cout << "classify_cubic_curves::family1_recognize" << endl;
1010 cout << "verbose_level = " << verbose_level << endl;
1011 }
1012
1013 Elt = NEW_int(A->elt_size_in_int);
1014
1015 for (e = 0; e < F->q; e++) {
1016
1017#if 1
1018 Int_vec_zero(eqn, 10);
1019 // 0 = x0x1(x0 + x1) + ex2^3
1020 // 0 = x0^2x1 + x0x1^2 + ex2^3
1021 // 0 = X^2Y + XY^2 + eZ^3
1022
1023 eqn[3] = 1;
1024 eqn[5] = 1;
1025 eqn[2] = e;
1026//0 & X^3 & ( 3, 0, 0 )
1027//1 & Y^3 & ( 0, 3, 0 )
1028//2 & Z^3 & ( 0, 0, 3 )
1029//3 & X^2Y & ( 2, 1, 0 )
1030//4 & X^2Z & ( 2, 0, 1 )
1031//5 & XY^2 & ( 1, 2, 0 )
1032//6 & Y^2Z & ( 0, 2, 1 )
1033//7 & XZ^2 & ( 1, 0, 2 )
1034//8 & YZ^2 & ( 0, 1, 2 )
1035//9 & XYZ & ( 1, 1, 1 )
1036#endif
1037 if (recognize(eqn,
1038 Elt, iso_type, verbose_level)) {
1039 Iso_type[e] = iso_type;
1040 }
1041 else {
1042 Iso_type[e] = -1;
1043 }
1044
1045 }
1046
1047 FREE_int(Elt);
1048}
1049
1051 int verbose_level)
1052{
1053 int f_v = (verbose_level >= 1);
1054 int *Elt;
1055 int eqn[10];
1056 int e, iso_type;
1057
1058 if (f_v) {
1059 cout << "classify_cubic_curves::family2_recognize" << endl;
1060 cout << "verbose_level = " << verbose_level << endl;
1061 }
1062
1063 Elt = NEW_int(A->elt_size_in_int);
1064
1065 for (e = 0; e < F->q; e++) {
1066
1067#if 1
1068 Int_vec_zero(eqn, 10);
1069 // 0 = x0x1(x0 + x1 + x2) + ex2^3
1070 // 0 = x0^2x1 + x0x1^2 + x1x2x3 + ex2^3
1071 // 0 = X^2Y + XY^2 + XYZ + eZ^3
1072
1073 eqn[3] = 1;
1074 eqn[5] = 1;
1075 eqn[2] = e;
1076 eqn[9] = 1;
1077//0 & X^3 & ( 3, 0, 0 )
1078//1 & Y^3 & ( 0, 3, 0 )
1079//2 & Z^3 & ( 0, 0, 3 )
1080//3 & X^2Y & ( 2, 1, 0 )
1081//4 & X^2Z & ( 2, 0, 1 )
1082//5 & XY^2 & ( 1, 2, 0 )
1083//6 & Y^2Z & ( 0, 2, 1 )
1084//7 & XZ^2 & ( 1, 0, 2 )
1085//8 & YZ^2 & ( 0, 1, 2 )
1086//9 & XYZ & ( 1, 1, 1 )
1087#endif
1088 if (recognize(eqn,
1089 Elt, iso_type, verbose_level)) {
1090 Iso_type[e] = iso_type;
1091 }
1092 else {
1093 Iso_type[e] = -1;
1094 }
1095
1096 }
1097
1098 FREE_int(Elt);
1099}
1100
1102 int verbose_level)
1103{
1104 int f_v = (verbose_level >= 1);
1105 int *Elt;
1106 int eqn[10];
1107 int e, iso_type;
1108 int three, six;
1109 int three_e, six_e_plus_one;
1110
1111 if (f_v) {
1112 cout << "classify_cubic_curves::family3_recognize" << endl;
1113 cout << "verbose_level = " << verbose_level << endl;
1114 }
1115
1116 Elt = NEW_int(A->elt_size_in_int);
1117
1118 for (e = 0; e < F->q; e++) {
1119
1120#if 1
1121 Int_vec_zero(eqn, 10);
1122 // 0 = x0x1x2 + e(x0 + x1 + x2)
1123 // 0 = e(x0^3 + x1^3 + x2^3)
1124 // + 3e(x0^2x1 + x0^2x2 + x1^2x0 + x1^2x2 + x2^2x0 + x2^2x1)
1125 // + (6e+1)x0x1x2
1126 three = F->Z_embedding(3);
1127 six = F->Z_embedding(6);
1128 three_e = F->mult(three, e);
1129 six_e_plus_one = F->add(F->mult(six, e), 1);
1130 eqn[0] = e;
1131 eqn[1] = e;
1132 eqn[2] = e;
1133 eqn[3] = three_e;
1134 eqn[4] = three_e;
1135 eqn[5] = three_e;
1136 eqn[6] = three_e;
1137 eqn[7] = three_e;
1138 eqn[8] = three_e;
1139 eqn[9] = six_e_plus_one;
1140//0 & X^3 & ( 3, 0, 0 )
1141//1 & Y^3 & ( 0, 3, 0 )
1142//2 & Z^3 & ( 0, 0, 3 )
1143//3 & X^2Y & ( 2, 1, 0 )
1144//4 & X^2Z & ( 2, 0, 1 )
1145//5 & XY^2 & ( 1, 2, 0 )
1146//6 & Y^2Z & ( 0, 2, 1 )
1147//7 & XZ^2 & ( 1, 0, 2 )
1148//8 & YZ^2 & ( 0, 1, 2 )
1149//9 & XYZ & ( 1, 1, 1 )
1150#endif
1151 if (recognize(eqn,
1152 Elt, iso_type, verbose_level)) {
1153 Iso_type[e] = iso_type;
1154 }
1155 else {
1156 Iso_type[e] = -1;
1157 }
1158
1159 }
1160
1161 FREE_int(Elt);
1162}
1163
1165 int verbose_level)
1166{
1167 int f_v = (verbose_level >= 1);
1168 int *Elt;
1169 int eqn[10];
1170 int d, iso_type;
1171
1172 if (f_v) {
1173 cout << "classify_cubic_curves::familyE_recognize" << endl;
1174 cout << "verbose_level = " << verbose_level << endl;
1175 }
1176
1177 Elt = NEW_int(A->elt_size_in_int);
1178
1179 for (d = 0; d < F->q; d++) {
1180
1181#if 1
1182 Int_vec_zero(eqn, 10);
1183 // 0 = x2^2x1 + x0^3 - dx1^3
1184 // 0 = Z^2Y + X^3 - dY^3
1185
1186 eqn[0] = 1;
1187 eqn[1] = F->negate(d);
1188 eqn[8] = 1;
1189//0 & X^3 & ( 3, 0, 0 )
1190//1 & Y^3 & ( 0, 3, 0 )
1191//2 & Z^3 & ( 0, 0, 3 )
1192//3 & X^2Y & ( 2, 1, 0 )
1193//4 & X^2Z & ( 2, 0, 1 )
1194//5 & XY^2 & ( 1, 2, 0 )
1195//6 & Y^2Z & ( 0, 2, 1 )
1196//7 & XZ^2 & ( 1, 0, 2 )
1197//8 & YZ^2 & ( 0, 1, 2 )
1198//9 & XYZ & ( 1, 1, 1 )
1199#endif
1200 if (recognize(eqn,
1201 Elt, iso_type, verbose_level)) {
1202 Iso_type[d] = iso_type;
1203 }
1204 else {
1205 Iso_type[d] = -1;
1206 }
1207
1208 }
1209
1210 FREE_int(Elt);
1211}
1212
1214 int verbose_level)
1215{
1216 int f_v = (verbose_level >= 1);
1217 int *Elt;
1218 int eqn[10];
1219 int e, iso_type;
1220
1221 if (f_v) {
1222 cout << "classify_cubic_curves::familyH_recognize" << endl;
1223 cout << "verbose_level = " << verbose_level << endl;
1224 }
1225
1226 Elt = NEW_int(A->elt_size_in_int);
1227
1228 for (e = 0; e < F->q; e++) {
1229
1230#if 1
1231 Int_vec_zero(eqn, 10);
1232 // 0 = x2^2x1 + x0^3 + ex0x1^2
1233 // 0 = Z^2Y + X^3 + eXY^2
1234
1235 eqn[0] = 1;
1236 eqn[5] = e;
1237 eqn[8] = 1;
1238//0 & X^3 & ( 3, 0, 0 )
1239//1 & Y^3 & ( 0, 3, 0 )
1240//2 & Z^3 & ( 0, 0, 3 )
1241//3 & X^2Y & ( 2, 1, 0 )
1242//4 & X^2Z & ( 2, 0, 1 )
1243//5 & XY^2 & ( 1, 2, 0 )
1244//6 & Y^2Z & ( 0, 2, 1 )
1245//7 & XZ^2 & ( 1, 0, 2 )
1246//8 & YZ^2 & ( 0, 1, 2 )
1247//9 & XYZ & ( 1, 1, 1 )
1248#endif
1249 if (recognize(eqn,
1250 Elt, iso_type, verbose_level)) {
1251 Iso_type[e] = iso_type;
1252 }
1253 else {
1254 Iso_type[e] = -1;
1255 }
1256
1257 }
1258
1259 FREE_int(Elt);
1260}
1261
1262
1264 int verbose_level)
1265{
1266 int f_v = (verbose_level >= 1);
1267 int *Elt;
1268 int eqn[10];
1269 int c, d, iso_type;
1270
1271 if (f_v) {
1272 cout << "classify_cubic_curves::familyG_recognize" << endl;
1273 cout << "verbose_level = " << verbose_level << endl;
1274 }
1275
1276 Elt = NEW_int(A->elt_size_in_int);
1277
1278 for (c = 0; c < F->q; c++) {
1279 for (d = 0; d < F->q; d++) {
1280
1281#if 1
1282 Int_vec_zero(eqn, 10);
1283 // 0 = x2^2x1 + x0^3 + cx0x1^2 + dx1^3
1284 // 0 = Z^2Y + X^3 + cXY^2 + dY^3
1285
1286 eqn[0] = 1;
1287 eqn[2] = d;
1288 eqn[5] = c;
1289 eqn[8] = 1;
1290//0 & X^3 & ( 3, 0, 0 )
1291//1 & Y^3 & ( 0, 3, 0 )
1292//2 & Z^3 & ( 0, 0, 3 )
1293//3 & X^2Y & ( 2, 1, 0 )
1294//4 & X^2Z & ( 2, 0, 1 )
1295//5 & XY^2 & ( 1, 2, 0 )
1296//6 & Y^2Z & ( 0, 2, 1 )
1297//7 & XZ^2 & ( 1, 0, 2 )
1298//8 & YZ^2 & ( 0, 1, 2 )
1299//9 & XYZ & ( 1, 1, 1 )
1300#endif
1301 if (recognize(eqn,
1302 Elt, iso_type, verbose_level)) {
1303 Iso_type[c * q + d] = iso_type;
1304 }
1305 else {
1306 Iso_type[c * q + d] = -1;
1307 }
1308 }
1309
1310 }
1311
1312 FREE_int(Elt);
1313}
1314
1315
1316void classify_cubic_curves::report(ostream &ost, int verbose_level)
1317{
1318 int f_v = (verbose_level >= 1);
1319 int f_with_stabilizers = TRUE;
1320
1321
1322 if (f_v) {
1323 cout << "classify_cubic_curves::report writing cheat sheet "
1324 "on cubic curves" << endl;
1325 }
1326 long int *Pts_on_curve;
1327 long int *inflexion_Pts;
1328 long int *singular_Pts;
1329 int *type;
1330
1331 Pts_on_curve = NEW_lint(CCA->CC->P->N_points);
1332 inflexion_Pts = NEW_lint(CCA->CC->P->N_points);
1333 singular_Pts = NEW_lint(CCA->CC->P->N_points);
1334 type = NEW_int(CCA->CC->P->N_lines);
1335
1336
1337
1338 ost << "The order of the group is ";
1340 ost << "\\\\" << endl;
1341
1342 ost << "\\bigskip" << endl;
1343
1344 ost << "The group has " << Curves->nb_orbits
1345 << " orbits: \\\\" << endl;
1346
1347 int i;
1350 Ol.create(0, __FILE__, __LINE__);
1351
1352 vector<string> References;
1353 int *Ago;
1354 int *Nb_points;
1355 int *Nb_singular_points;
1356 int *Nb_inflexions;
1357 Ago = NEW_int(Curves->nb_orbits);
1358 Nb_points = NEW_int(Curves->nb_orbits);
1359 Nb_singular_points = NEW_int(Curves->nb_orbits);
1360 Nb_inflexions = NEW_int(Curves->nb_orbits);
1361
1362
1363
1364 for (i = 0; i < Curves->nb_orbits; i++) {
1365
1366 if (f_v) {
1367 cout << "Curve " << i << " / "
1368 << Curves->nb_orbits << ": "
1369 "verbose_level=" << verbose_level << endl;
1370 }
1371
1372 Curves->Orbit[i].gens->group_order(go1);
1373
1374 if (f_v) {
1375 cout << "stab order " << go1 << endl;
1376 }
1377
1378 Ago[i] = go1.as_int();
1379
1380 D.integral_division_exact(Curves->go, go1, ol);
1381
1382 if (f_v) {
1383 cout << "orbit length " << ol << endl;
1384 }
1385
1386 long int *data;
1387 long int *eqn1;
1388 int eqn[10];
1389 int nb_pts_on_curve;
1390 int nb_singular_pts;
1391 int nb_inflection_pts;
1393
1394 data = Curves->Rep + i * Curves->representation_sz;
1395 eqn1 = data + 9;
1396 Lint_vec_copy_to_int(eqn1, eqn, 10);
1397
1398 ost << "\\subsection*{Curve " << i << " / "
1399 << Curves->nb_orbits << "}" << endl;
1400 //ost << "$" << i << " / " << Curves->nb_orbits << "$ $" << endl;
1401
1402 ost << "$";
1404 data,
1405 9 /*CCC->Curves->representation_sz*/);
1406 ost << "_{";
1407 go1.print_not_scientific(ost);
1408 ost << "}$ orbit length $";
1409 ol.print_not_scientific(ost);
1410 ost << "$\\\\" << endl;
1411
1412
1413#if 0
1414 int_vec_zero(eqn, 10);
1415 // y = x^3 or X^3 - YZ^2
1416 eqn[0] = 1;
1417 eqn[8] = F->minus_one();
1418 eqn[2] = 0;
1419//0 & X^3 & ( 3, 0, 0 )
1420//1 & Y^3 & ( 0, 3, 0 )
1421//2 & Z^3 & ( 0, 0, 3 )
1422//3 & X^2Y & ( 2, 1, 0 )
1423//4 & X^2Z & ( 2, 0, 1 )
1424//5 & XY^2 & ( 1, 2, 0 )
1425//6 & Y^2Z & ( 0, 2, 1 )
1426//7 & XZ^2 & ( 1, 0, 2 )
1427//8 & YZ^2 & ( 0, 1, 2 )
1428//9 & XYZ & ( 1, 1, 1 )
1429#endif
1430#if 0
1431 int_vec_zero(eqn, 10);
1432 // y = x^3 + x + 3
1433 eqn[0] = 1;
1434 eqn[2] = 3;
1435 eqn[6] = 10;
1436 eqn[7] = 1;
1437#endif
1438
1439
1440 ost << "\\begin{eqnarray*}" << endl;
1441 ost << "&&";
1442
1443
1444 {
1445 vector<long int> Points;
1446 int h;
1447
1448 CCA->CC->Poly->enumerate_points(eqn,
1449 Points,
1450 verbose_level - 4);
1451
1452 nb_pts_on_curve = Points.size();
1453 for (h = 0; h < nb_pts_on_curve; h++) {
1454 Pts_on_curve[h] = Points[h];
1455 }
1456 }
1457
1458 Nb_points[i] = nb_pts_on_curve;
1459
1460
1462 eqn,
1463 5 /* nb_terms_per_line */,
1464 "\\\\\n&&");
1465 ost << "\\end{eqnarray*}" << endl;
1466
1467 ost << "The curve has " << nb_pts_on_curve
1468 << " points.\\\\" << endl;
1469
1470
1472 eqn,
1473 Pts_on_curve, nb_pts_on_curve,
1474 singular_Pts, nb_singular_pts,
1475 verbose_level - 2);
1476
1477 ost << "The curve has " << nb_singular_pts
1478 << " singular points.\\\\" << endl;
1479 Nb_singular_points[i] = nb_singular_pts;
1480
1481
1483 eqn,
1484 Pts_on_curve, nb_pts_on_curve,
1485 inflexion_Pts, nb_inflection_pts,
1486 verbose_level - 2);
1487
1488
1489 Nb_inflexions[i] = nb_inflection_pts;
1490
1491 ost << "The curve has " << nb_inflection_pts << " inflexion points: $";
1492 Lint_vec_print(ost, inflexion_Pts, nb_inflection_pts);
1493 ost << "$\\\\" << endl;
1494
1495
1497 Pts_on_curve, nb_pts_on_curve /* set_size */,
1498 type, 0 /*verbose_level*/);
1499 // type[N_lines]
1500
1501 ost << "The line type is $";
1503 C.init(type, CCA->CC->P->N_lines, FALSE, 0);
1504 C.print_naked_tex(ost, TRUE /* f_backwards*/);
1505 ost << ".$ \\\\" << endl;
1506
1507
1508 if (f_with_stabilizers) {
1509 //ost << "Strong generators are:" << endl;
1511 D.add_in_place(Ol, ol);
1512 }
1513
1514#if 1
1515 if (nb_inflection_pts == 3) {
1516 int Basis[9];
1517 int Basis_t[9];
1518 int Basis_inv[9];
1519 int transformed_eqn[10];
1520
1521 CC->P->unrank_point(Basis, inflexion_Pts[0]);
1522 CC->P->unrank_point(Basis + 3, inflexion_Pts[1]);
1523
1524 CC->P->F->Linear_algebra->extend_basis(2, 3, Basis,
1525 verbose_level);
1526
1527 //CC->P->unrank_point(Basis + 6, inflexion_Pts[2]);
1528 CC->F->Linear_algebra->transpose_matrix(Basis, Basis_t, 3, 3);
1529 CC->F->Linear_algebra->invert_matrix(Basis, Basis_inv, 3, 0 /* verbose_level */);
1530 CC->Poly->substitute_linear(eqn, transformed_eqn,
1531 Basis /* int *Mtx_inv */, 0 /* verbose_level */);
1532
1533
1534 ost << "The transformed equation is:\\\\" << endl;
1535 ost << "\\begin{eqnarray*}" << endl;
1536 ost << "&&";
1537
1538
1539 {
1540 vector<long int> Points;
1541 int h;
1542
1543
1544 CCA->CC->Poly->enumerate_points(transformed_eqn,
1545 Points,
1546 verbose_level - 4);
1547
1548 nb_pts_on_curve = Points.size();
1549 for (h = 0; h < nb_pts_on_curve; h++) {
1550 Pts_on_curve[h] = Points[h];
1551 }
1552 }
1553
1555 transformed_eqn,
1556 5 /* nb_terms_per_line */,
1557 "\\\\\n&&");
1558 ost << "\\end{eqnarray*}" << endl;
1559
1560 ost << "The transformed curve has " << nb_pts_on_curve
1561 << " points.\\\\" << endl;
1562
1564 transformed_eqn,
1565 Pts_on_curve, nb_pts_on_curve,
1566 singular_Pts, nb_singular_pts,
1567 verbose_level - 2);
1568
1569 ost << "The curve has " << nb_singular_pts
1570 << " singular points.\\\\" << endl;
1571
1572
1574 transformed_eqn,
1575 Pts_on_curve, nb_pts_on_curve,
1576 inflexion_Pts, nb_inflection_pts,
1577 verbose_level - 2);
1578
1579 ost << "The transformed curve has " << nb_inflection_pts
1580 << " inflexion points: $";
1581 Lint_vec_print(ost, inflexion_Pts, nb_inflection_pts);
1582 ost << "$\\\\" << endl;
1583
1584
1585
1586 }
1587#endif
1588
1589
1590 } // next i
1591 ost << "The overall number of objects is: " << Ol << "\\\\" << endl;
1592
1593
1594
1595
1596 ost << "summary of the stabilizer orders:\\\\" << endl;
1597
1598
1599 for (i = 0; i < Curves->nb_orbits; i++) {
1600 string ref("");
1601 References.push_back(ref);
1602 }
1603
1604
1605 int *Iso_type1;
1606 int *Iso_type2;
1607 int *Iso_type3;
1608 int *Iso_typeE;
1609 int *Iso_typeH;
1610 int *Iso_typeG;
1611 int e, c, d;
1612
1613 Iso_type1 = NEW_int(F->q);
1614 Iso_type2 = NEW_int(F->q);
1615 Iso_type3 = NEW_int(F->q);
1616 Iso_typeE = NEW_int(F->q);
1617 Iso_typeH = NEW_int(F->q);
1618 Iso_typeG = NEW_int(F->q * F->q);
1619 family1_recognize(Iso_type1, verbose_level - 1);
1620 family2_recognize(Iso_type2, verbose_level - 1);
1621 family3_recognize(Iso_type3, verbose_level - 1);
1622 familyE_recognize(Iso_typeE, verbose_level - 1);
1623 familyH_recognize(Iso_typeH, verbose_level - 1);
1624 familyG_recognize(Iso_typeG, verbose_level - 1);
1625
1626 ost << "Families 1, 2, 3, E, H: \\\\" << endl;
1627 for (e = 0; e < F->q; e++) {
1628 ost << "e=" << e
1629 << " iso1=" << Iso_type1[e]
1630 << " iso2=" << Iso_type2[e]
1631 << " iso3=" << Iso_type2[e]
1632 << " isoE=" << Iso_typeE[e]
1633 << " isoH=" << Iso_typeH[e]
1634 << " \\\\" << endl;
1635 }
1636 for (c = 1; c < F->q; c++) {
1637 for (d = 1; d < F->q; d++) {
1638 ost << "c=" << c << " d=" << d
1639 << " isoG=" << Iso_typeG[c * F->q + d]
1640 << " \\\\" << endl;
1641 }
1642 }
1643 for (e = 0; e < F->q; e++) {
1644 if (Iso_type1[e] != -1) {
1645 string ref;
1646 char str[1000];
1647 ref = References[Iso_type1[e]];
1648 if (strlen(ref.c_str())) {
1649 ref.append(",");
1650 }
1651 sprintf(str, "F1_{%d}", e);
1652 ref.append(str);
1653 References[Iso_type1[e]] = ref;
1654 }
1655 }
1656 for (e = 0; e < F->q; e++) {
1657 if (Iso_type2[e] != -1) {
1658 string ref;
1659 char str[1000];
1660 ref = References[Iso_type2[e]];
1661 if (strlen(ref.c_str())) {
1662 ref.append(",");
1663 }
1664 sprintf(str, "F2_{%d}", e);
1665 ref.append(str);
1666 References[Iso_type2[e]] = ref;
1667 }
1668 }
1669 for (e = 0; e < F->q; e++) {
1670 if (Iso_type3[e] != -1) {
1671 string ref;
1672 char str[1000];
1673 ref = References[Iso_type3[e]];
1674 if (strlen(ref.c_str())) {
1675 ref.append(",");
1676 }
1677 sprintf(str, "F3_{%d}", e);
1678 ref.append(str);
1679 References[Iso_type3[e]] = ref;
1680 }
1681 }
1682 for (e = 0; e < F->q; e++) {
1683 if (Iso_typeE[e] != -1) {
1684 string ref;
1685 char str[1000];
1686 ref = References[Iso_typeE[e]];
1687 if (strlen(ref.c_str())) {
1688 ref.append(",");
1689 }
1690 sprintf(str, "E_{%d}", e);
1691 ref.append(str);
1692 References[Iso_typeE[e]] = ref;
1693 }
1694 }
1695 for (e = 0; e < F->q; e++) {
1696 if (Iso_typeH[e] != -1) {
1697 string ref;
1698 char str[1000];
1699 ref = References[Iso_typeH[e]];
1700 if (strlen(ref.c_str())) {
1701 ref.append(",");
1702 }
1703 sprintf(str, "H_{%d}", e);
1704 ref.append(str);
1705 References[Iso_typeH[e]] = ref;
1706 }
1707 }
1708 for (c = 1; c < F->q; c++) {
1709 for (d = 1; d < F->q; d++) {
1710 int iso;
1711
1712 iso = Iso_typeG[c * F->q + d];
1713 if (iso == -1) {
1714 continue;
1715 }
1716 string ref;
1717 char str[1000];
1718 ref = References[iso];
1719 if (strlen(ref.c_str())) {
1720 ref.append(",");
1721 }
1722 sprintf(str, "G_{%d,%d}", c,d);
1723 ref.append(str);
1724 References[iso] = ref;
1725 }
1726 }
1727
1728
1729
1731
1732 C.init(Ago, Curves->nb_orbits, FALSE, 0);
1733 ost << "Distribution: $(";
1734 C.print_naked_tex(ost, TRUE /* f_backwards */);
1735 ost << ")$\\\\" << endl;
1736
1737
1738 ost << "$$" << endl;
1739 ost << "\\begin{array}{|c||c|c|c|c|c|}";
1740 ost << "\\hline";
1741 ost << "\\mbox{Curve} & ";
1742 ost << "\\mbox{Ago} & ";
1743 ost << "\\mbox{Pts} & ";
1744 ost << "\\mbox{s. Pts} & ";
1745 ost << "\\mbox{Infl} & ";
1746 ost << "\\mbox{References} \\\\";
1747 ost << "\\hline";
1748 for (i = 0; i < Curves->nb_orbits; i++) {
1749 ost << i;
1750 ost << " & " << Ago[i];
1751 ost << " & " << Nb_points[i];
1752 ost << " & " << Nb_singular_points[i];
1753 ost << " & " << Nb_inflexions[i];
1754 ost << " & " << References[i];
1755 ost << "\\\\";
1756 }
1757 ost << "\\hline";
1758 ost << "\\end{array}" << endl;
1759 ost << "$$" << endl;
1760
1761 ost << "with canonical forms " << endl;
1762 ost << "\\begin{eqnarray*}" << endl;
1763 ost << "F1_e &=& X^2Y + XY^2 + eZ^3 \\\\" << endl;
1764 ost << "F2_e &=& X^2Y + XY^2 + XYZ + eZ^3 \\\\" << endl;
1765 ost << "F3_e &=& XYZ + e(X + Y + Z)^3 \\\\" << endl;
1766 ost << "E_d &=& Z^2Y + X^3 - dY^3 \\\\" << endl;
1767 ost << "H_e &=& Z^2Y + X^3 + eXY^2 \\\\" << endl;
1768 ost << "G_{c,d} &=& Z^2Y + X^3 + cXY^2 + dY^3 \\\\" << endl;
1769 ost << "\\end{eqnarray*}" << endl;
1770 ost << "for $c,d,e \\in {\\mathbb F}_{" << F->q << "}$ \\\\" << endl;
1771
1772 FREE_int(Iso_type1);
1773 FREE_int(Iso_type2);
1774 FREE_int(Iso_type3);
1775 FREE_int(Iso_typeE);
1776 FREE_int(Iso_typeH);
1777 FREE_int(Iso_typeG);
1778 FREE_int(Ago);
1779 FREE_int(Nb_points);
1780 FREE_int(Nb_singular_points);
1781 FREE_int(Nb_inflexions);
1782
1783
1784 FREE_lint(Pts_on_curve);
1785 FREE_lint(inflexion_Pts);
1786 FREE_lint(singular_Pts);
1787 FREE_int(type);
1788
1789}
1790
1791
1792}}}
1793
1794
ring_theory::homogeneous_polynomial_domain * Poly
void compute_inflexion_points(int *eqn_in, long int *Pts_on_curve, int nb_pts_on_curve, long int *Pts, int &nb_pts, int verbose_level)
void compute_singular_points(int *eqn_in, long int *Pts_on_curve, int nb_pts_on_curve, long int *Pts, int &nb_pts, int verbose_level)
int compute_system_in_RREF(int nb_pts, long int *pt_list, int verbose_level)
a collection of functions related to sorted vectors
int int_vec_search(int *v, int len, int a, int &idx)
Definition: sorting.cpp:1094
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:72
void print_naked_tex(std::ostream &ost, int f_backwards)
Definition: tally.cpp:413
int determine_cubic_in_plane(ring_theory::homogeneous_polynomial_domain *Poly_3_3, int nb_pts, long int *Pts, int *coeff10, int verbose_level)
void line_intersection_type(long int *set, int set_size, int *type, int verbose_level)
void transpose_matrix(int *A, int *At, int ma, int na)
void invert_matrix(int *A, int *A_inv, int n, int verbose_level)
void extend_basis(int m, int n, int *Basis, int verbose_level)
void lint_set_print_tex_for_inline_text(std::ostream &ost, long int *v, int len)
void enumerate_points(int *coeff, std::vector< long int > &Pts, int verbose_level)
void print_equation_with_line_breaks_tex(std::ostream &ost, int *coeffs, int nb_terms_per_line, const char *new_line_text)
void substitute_linear(int *coeff_in, int *coeff_out, int *Mtx_inv, int verbose_level)
domain to compute with objects of type longinteger
Definition: ring_theory.h:240
void integral_division_exact(longinteger_object &a, longinteger_object &b, longinteger_object &a_over_b)
void add_in_place(longinteger_object &a, longinteger_object &b)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
void create(long int i, const char *file, int line)
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
void element_mult(void *a, void *b, void *ab, int verbose_level)
Definition: action_cb.cpp:315
groups::strong_generators * Strong_gens
Definition: actions.h:130
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 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 strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void init_group_extension(strong_generators *subgroup, int *data, int index, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
a single step classification of combinatorial objects
Definition: classify.h:29
void init(actions::action *A, actions::action *A2, int max_orbits, int representation_sz, ring_theory::longinteger_object &go, 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 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
int trace_set(long int *set, int size, int level, long int *canonical_set, int *Elt_transporter, int verbose_level)
data_structures_groups::set_and_stabilizer * get_set_and_stabilizer(int level, int orbit_at_level, int verbose_level)
void orbit_length(int orbit_at_level, int level, ring_theory::longinteger_object &len)
description of a classification problem of arcs in a geometry
Definition: tl_geometry.h:27
classification of arcs in desarguesian projective planes
Definition: tl_geometry.h:75
void init(arc_generator_description *Descr, projective_geometry::projective_space_with_action *PA, groups::strong_generators *SG, int verbose_level)
poset_classification::poset_classification * gen
Definition: tl_geometry.h:104
invariant_relations::classification_step * Curves
Definition: tl_geometry.h:336
int recognize(int *eqn_in, int *Elt, int &iso_type, int verbose_level)
void init(projective_geometry::projective_space_with_action *PA, cubic_curve_with_action *CCA, arc_generator_description *Descr, int verbose_level)
domain for cubic curves in projective space with automorphism group
Definition: tl_geometry.h:378
projective space PG(n,q) with automorphism group PGGL(n+1,q)
#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 Lint_vec_copy_to_int(A, B, C)
Definition: foundations.h:723
#define Int_vec_copy_to_lint(A, B, C)
Definition: foundations.h:722
#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
algebra, combinatorics and graph theory, geometry, linear algebra, number theory, data structures,...
Definition: a_domain.cpp:18
the orbiter library for the classification of combinatorial objects