17namespace layer1_foundations {
18namespace algebraic_geometry {
23 int f_v = (verbose_level >= 1);
27 cout <<
"surface_domain::create_equation_general_abcd" << endl;
32 int two =
F->
add(1, 1);
33 int four =
F->
add(two, two);
38 int abc =
F->
mult3(a, b, c);
39 int abd =
F->
mult3(a, b, d);
40 int mabd =
F->
mult4(m1, a, b, d);
41 int macd =
F->
mult4(m1, a, c, d);
42 int bcd =
F->
mult3(b, c, d);
44 int A =
F->
add5(abc, mabd, macd, bcd, admcb);
46 int aac =
F->
mult3(a, a, c);
47 int aad =
F->
mult3(a, a, d);
48 int acc =
F->
mult3(a, c, c);
49 int bcc =
F->
mult3(b, c, c);
52 int aacd =
F->
mult4(a, a, c, d);
53 int abcc =
F->
mult4(a, b, c, c);
59 int two_aabcd =
F->
mult6(two, a, a, b, c, d);
60 int abbcd =
F->
mult5(a, b, b, c, d);
61 int two_abccd =
F->
mult6(two, a, b, c, c, d);
62 int abcdd =
F->
mult5(a, b, c, d, d);
64 int aadd =
F->
mult4(a, a, d, d);
65 int abbc =
F->
mult4(a, b, b, c);
66 int acdd =
F->
mult4(a, c, d, d);
67 int bbcc =
F->
mult4(b, b, c, c);
69 int aabdd =
F->
mult5(a, a, b, d, d);
70 int two_aacdd =
F->
mult6(two, a, a, c, d, d);
71 int two_abbcc =
F->
mult6(two, a, b, b, c, c);
72 int bbccd =
F->
mult5(b, b, c, c, d);
73 int aabc =
F->
mult4(a, a, b, c);
74 int four_abcd =
F->
mult5(four, a, b, c, d);
75 int accd =
F->
mult4(a, c, c, d);
77 int E_plus1 =
F->
add5(two_aabcd, abbcd, two_abccd, abcdd, aacd);
78 int E_plus2 =
F->
add5(aadd, abbc, abcc, acdd, bbcc);
79 int E_plus =
F->
add(E_plus1, E_plus2);
85 int E_minus1 =
F->
add4(aabdd, two_aacdd, two_abbcc, bbccd);
86 int E_minus2 =
F->
add3(aabc, four_abcd, accd);
87 int E_minus =
F->
add(E_minus1, E_minus2);
93 coeff[5] =
F->
mult3(m1, A, bmd);
95 coeff[17] =
F->
mult(B, bmd);
96 coeff[10] =
F->
mult3(m1, A, admcb);
97 coeff[18] =
F->
mult3(m1, C, bmd);
98 coeff[8] = coeff[9] =
F->
mult3(m1, amc, A);
99 coeff[11] =
F->
mult(A, admcb);
100 coeff[14] =
F->
mult4(c, a, D, bmd);
106 cout <<
"surface_domain::create_equation_general_abcd done" << endl;
112 int f_v = (verbose_level >= 1);
116 cout <<
"surface_domain::create_equation_Cayley_klmn" << endl;
120 coeff[6] = coeff[9] = coeff[12] = coeff[3] = 1;
138 cout <<
"surface_domain::create_equation_Cayley_klmn done" << endl;
146 int f_v = (verbose_level >= 1);
150 int alpha, beta, gamma, delta, epsilon;
153 cout <<
"surface_domain::create_equation_bes" << endl;
169 alpha =
F->
mult(ap1c, apc);
171 gamma =
F->
mult(ap1c, acp1);
177 coeff[4] = coeff[7] = coeff[8] = coeff[11] = coeff[12] = alpha;
185 cout <<
"surface_domain::create_equation_bes done" << endl;
193 int f_v = (verbose_level >= 1);
197 cout <<
"surface_domain::create_equation_F13" << endl;
210 cout <<
"surface_domain::create_equation_F13 done" << endl;
216 int f_v = (verbose_level >= 1);
220 cout <<
"surface_domain::create_equation_G13" << endl;
227 coeff[5] = coeff[8] = coeff[9] = coeff[10] = coeff[11] = coeff[12] = 1;
228 coeff[14] = coeff[15] = b;
229 coeff[18] = coeff[19] = c;
231 cout <<
"surface_domain::create_equation_G13 done" << endl;
238 int f_v = (verbose_level >= 1);
241 cout <<
"surface_domain::create_surface_general_abcd" << endl;
246 cout <<
"surface_domain::create_surface_general_abcd before create_equation_general_abcd" << endl;
250 cout <<
"surface_domain::create_surface_general_abcd after create_equation_general_abcd" << endl;
258 cout <<
"surface_domain::create_surface_general_abcd before SO->init_equation" << endl;
264 cout <<
"surface_domain::create_surface_general_abcd done" << endl;
274 int f_v = (verbose_level >= 1);
277 cout <<
"surface_domain::create_surface_bes" << endl;
282 cout <<
"surface_domain::create_surface_bes before create_equation_bes" << endl;
286 cout <<
"surface_domain::create_surface_bes after create_equation_bes" << endl;
294 cout <<
"surface_domain::create_surface_bes before SO->init_equation" << endl;
299 cout <<
"surface_domain::create_surface_bes done" << endl;
307 int f_v = (verbose_level >= 1);
310 cout <<
"surface_domain::create_surface_F13" << endl;
315 cout <<
"surface_domain::create_surface_F13 before create_equation_F13" << endl;
319 cout <<
"surface_domain::create_surface_F13 after create_equation_F13" << endl;
327 cout <<
"surface_domain::create_surface_F13 before SO->init_equation" << endl;
332 cout <<
"surface_domain::create_surface_F13 done" << endl;
339 int f_v = (verbose_level >= 1);
342 cout <<
"surface_domain::create_surface_G13" << endl;
347 cout <<
"surface_domain::create_surface_G13 before create_equation_G13" << endl;
351 cout <<
"surface_domain::create_surface_G13 after create_equation_G13" << endl;
359 cout <<
"surface_domain::create_surface_G13 before SO->init_equation" << endl;
364 cout <<
"surface_domain::create_surface_G13 done" << endl;
370 int &alpha,
int &beta,
373 int f_v = (verbose_level >= 1);
375 long int Lines27[27];
381 cout <<
"surface_domain::create_Eckardt_surface" << endl;
390 a2p1 =
F->
add(a2, 1);
392 if (a2p1 == 0 || a2m1 == 0) {
393 cout <<
"surface_domain::create_Eckardt_surface "
394 "a2p1 == 0 || a2m1 == 0" << endl;
406 cout <<
"surface_domain::create_Eckardt_surface a="
407 << a <<
" b=" << b <<
" alpha0=" << alpha0
408 <<
" beta0=" << beta0 << endl;
412 int_vec_zero(Basis, 8);
413 Basis[0 * 4 + 0] = 1;
414 Basis[0 * 4 + 1] = a;
415 Basis[1 * 4 + 2] = 1;
416 Basis[1 * 4 + 3] = b;
417 line_rk =
Gr->rank_int_here(Basis, 0);
425 cout <<
"The triangle lines are:" << endl;
436 if (!test_if_sets_are_equal(Oab, Lines, 12)) {
437 cout <<
"the sets are not equal" << endl;
443 cout <<
"surface_domain::create_Eckardt_surface The double six is:" << endl;
455 cout <<
"surface_domain::create_Eckardt_surface We have a set of "
456 "lines of size " << nb <<
":";
465 cout <<
"surface_domain::create_Eckardt_surface The remaining 15 lines are:";
473 cout <<
"surface_domain::create_Eckardt_surface before create_HCV_fifteen_lines" << endl;
476 long int special_lines[15];
479 for (i = 0; i < 15; i++) {
480 if (special_lines[i] != Lines27[12 + i]) {
481 cout <<
"surface_domain::create_Eckardt_surface something is wrong "
482 "with the special line " << i <<
" / 15 " << endl;
487 cout <<
"surface_domain::create_Eckardt_surface after create_special_fifteen_lines" << endl;
491 cout <<
"surface_domain::create_Eckardt_surface before rank_of_system" << endl;
495 cout <<
"surface_domain::create_Eckardt_surface "
496 "a=" << a <<
" b=" << b <<
" rk=" << rk << endl;
500 cout <<
"surface_domain::create_Eckardt_surface rk != 19" << endl;
516 cout <<
"surface_domain::create_Eckardt_surface not of special form" << endl;
521 if (alpha != alpha0) {
522 cout <<
"surface_domain::create_Eckardt_surface alpha != alpha0" << endl;
526 cout <<
"surface_domain::create_Eckardt_surface beta != beta0" << endl;
537 cout <<
"surface_domain::create_Eckardt_surface before SO->init_with_27_lines" << endl;
545 cout <<
"surface_domain::create_Eckardt_surface done" << endl;
552 int *coeff,
int verbose_level)
554 int f_v = (verbose_level >= 1);
558 cout <<
"surface_domain::create_equation_Eckardt_surface" << endl;
572 cout <<
"surface_domain::create_equation_Eckardt_surface done" << endl;
577 int &alpha,
int &beta,
int verbose_level)
579 int f_v = (verbose_level >= 1);
581 int zeroes[] = {0,1,2,4,5,7,8,10,11,13,14,15,17,18,19};
582 int alphas[] = {6,9,12};
587 cout <<
"surface_domain::test_Eckardt_form_alpha_beta" << endl;
590 zeroes,
sizeof(zeroes) /
sizeof(
int), a)) {
591 cout <<
"surface_domain::test_Eckardt_form_alpha_beta "
592 "not constant on zero set" << endl;
596 cout <<
"surface_domain::test_Eckardt_form_alpha_beta "
597 "not zero on zero set" << endl;
601 cout <<
"surface_domain::test_Eckardt_form_alpha_beta "
602 "not normalized" << endl;
606 alphas,
sizeof(alphas) /
sizeof(
int), a)) {
607 cout <<
"surface_domain::test_Eckardt_form_alpha_beta "
608 "not constant on alpha set" << endl;
613 betas,
sizeof(betas) /
sizeof(
int), a)) {
614 cout <<
"surface_domain::test_Eckardt_form_alpha_beta "
615 "not constant on beta set" << endl;
621 cout <<
"surface_domain::test_Eckardt_form_alpha_beta done" << endl;
627 int a,
int b,
int verbose_level)
630 int f_v = (verbose_level >= 1);
631 int Basis[12 * 8] = {
645 int i, c, ma, mb, av, mav;
648 cout <<
"surface_domain::create_Eckardt_double_six "
649 "a=" << a <<
" b=" << b << endl;
655 for (i = 0; i < 12 * 8; i++) {
677 for (i = 0; i < 12; i++) {
682 cout <<
"surface_domain::create_Eckardt_double_six done" << endl;
687 int a,
int b,
int verbose_level)
689 int f_v = (verbose_level >= 1);
690 int Basis[15 * 8] = {
693 0,-1,-1,0,-2,-3,0,-1,
698 -1,0,-1,0,-3,-2,0,-1,
707 int i, m1, a2, a2p1, a2m1, ba2p1, twoa;
708 int c, c2, cm2, c3, cm3, c4, cm4, c5, cm5;
720 cout <<
"surface_domain::create_Eckardt_fifteen_lines "
721 "a=" << a <<
" b=" << b << endl;
725 a2p1 =
F->
add(a2, 1);
726 a2m1 =
F->
add(a2, m1);
728 ba2p1 =
F->
mult(b, a2p1);
732 cout <<
"surface_domain::create_Eckardt_fifteen_lines "
733 "ba2p1 = 0, cannot invert" << endl;
741 cout <<
"surface_domain::create_Eckardt_fifteen_lines "
742 "a2m1 = 0, cannot invert" << endl;
749 cout <<
"surface_domain::create_Eckardt_fifteen_lines "
750 "c3 = 0, cannot invert" << endl;
755 cout <<
"surface_domain::create_Eckardt_fifteen_lines "
756 "cm3 = 0, cannot invert" << endl;
762 for (i = 0; i < 15 * 8; i++) {
798 cout <<
"surface_domain::create_Eckardt_fifteen_lines "
799 "unknown value" << c << endl;
804 for (i = 0; i < 15; i++) {
809 cout <<
"surface_domain::create_Eckardt_fifteen_lines done" << endl;
void create_equation_bes(int a, int c, int *coeff, int verbose_level)
surface_object * create_surface_general_abcd(int a, int b, int c, int d, int verbose_level)
int rank_of_system(int len, long int *S, int verbose_level)
void create_Eckardt_fifteen_lines(long int *fifteen_lines, int a, int b, int verbose_level)
surface_object * create_surface_G13(int a, int verbose_level)
field_theory::finite_field * F
surface_object * create_surface_F13(int a, int verbose_level)
int test_Eckardt_form_alpha_beta(int *coeff, int &alpha, int &beta, int verbose_level)
surface_object * create_surface_bes(int a, int c, int verbose_level)
void create_equation_general_abcd(int a, int b, int c, int d, int *coeff, int verbose_level)
surface_object * create_Eckardt_surface(int a, int b, int &alpha, int &beta, int verbose_level)
void create_equation_G13(int a, int *coeff, int verbose_level)
void create_Eckardt_double_six(long int *double_six, int a, int b, int verbose_level)
void create_equation_F13(int a, int *coeff, int verbose_level)
void create_equation_Cayley_klmn(int k, int l, int m, int n, int *coeff, int verbose_level)
void create_remaining_fifteen_lines(long int *double_six, long int *fifteen_lines, int verbose_level)
void create_equation_Eckardt_surface(int a, int b, int *coeff, int verbose_level)
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_equation(surface_domain *Surf, int *eqn, int verbose_level)
void init_with_27_lines(surface_domain *Surf, long int *Lines27, int *eqn, int f_find_double_six_and_rearrange_lines, int verbose_level)
a collection of functions related to sorted vectors
int add5(int i1, int i2, int i3, int i4, int i5)
int add4(int i1, int i2, int i3, int i4)
void PG_element_normalize_from_front(int *v, int stride, int len)
int mult6(int a1, int a2, int a3, int a4, int a5, int a6)
int mult3(int a1, int a2, int a3)
int mult5(int a1, int a2, int a3, int a4, int a5)
int add3(int i1, int i2, int i3)
int mult4(int a1, int a2, int a3, int a4)
int add6(int i1, int i2, int i3, int i4, int i5, int i6)
various functions related to geometries
void print_set(long int *v, int len)
long int rank_lint_here(int *Mtx, int verbose_level)
#define Lint_vec_copy(A, B, C)
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects