19namespace layer1_foundations {
20namespace algebraic_geometry {
23static void Web_of_cubic_curves_entry_print(
int *p,
24 int m,
int n,
int i,
int j,
int val,
25 std::string &output,
void *data);
88 long int *arc6,
int verbose_level)
90 int f_v = (verbose_level >= 1);
94 cout <<
"web_of_cubic_curves::init" << endl;
102 cout <<
"web_of_cubic_curves::init before find_Eckardt_points" << endl;
106 cout <<
"web_of_cubic_curves::init after find_Eckardt_points" << endl;
110 cout <<
"web_of_cubic_curves::init "
111 "before print_Eckardt_point_data" << endl;
115 cout <<
"web_of_cubic_curves::init "
116 "after print_Eckardt_point_data" << endl;
120 cout <<
"web_of_cubic_curves::init before find_trihedral_pairs" << endl;
124 cout <<
"web_of_cubic_curves::init after find_trihedral_pairs" << endl;
133 cout <<
"web_of_cubic_curves::init "
134 "We choose trihedral pair t_idx0=" <<
t_idx0 << endl;
137 for (h = 0; h < 6; h++) {
155 cout <<
"web_of_cubic_curves::init base_curves4=";
161 cout <<
"web_of_cubic_curves::init "
162 "Creating the web of cubic "
163 "curves through the arc:" << endl;
170 cout <<
"web_of_cubic_curves::init "
171 "Testing the web of cubic curves:" << endl;
177 for (i = 0; i < 45; i++) {
179 for (j = 0; j < 6; j++) {
184 cout <<
"web_of_cubic_curves::init "
185 "the cubic curve does not "
186 "pass through the arc" << endl;
192 cout <<
"web_of_cubic_curves::init The cubic curves all pass "
193 "through the arc" << endl;
197 cout <<
"web_of_cubic_curves::init "
198 "Computing the ranks of 4-subsets:" << endl;
208 cout <<
"web_of_cubic_curves::init "
209 "classification of ranks of 4-subsets:" << endl;
217 cout <<
"web_of_cubic_curves::init "
218 "Web_of_cubic_curves:" << endl;
223 cout <<
"web_of_cubic_curves::init "
230 for (i = 0; i < 4; i++) {
235 cout <<
"web_of_cubic_curves::init "
236 "base_curves:" << endl;
243 cout <<
"web_of_cubic_curves::init "
244 "Tritangent_plane_equations:" << endl;
254 for (i = 0; i < 45; i++) {
260 cout <<
"web_of_cubic_curves::init "
261 "The_plane_ranks:" << endl;
266 for (i = 0; i < 45; i++) {
273 cout <<
"web_of_cubic_curves::init "
274 "computing Dual_point_ranks:" << endl;
275 for (i = 0; i <
nb_T; i++) {
282 for (j = 0; j < 6; j++) {
288 cout <<
"web_of_cubic_curves::init "
289 "Dual_point_ranks:" << endl;
295 cout <<
"web_of_cubic_curves::init before "
296 "Surf->create_lines_from_plane_equations" << endl;
301 cout <<
"web_of_cubic_curves::init after "
302 "Surf->create_lines_from_plane_equations" << endl;
309 cout <<
"web_of_cubic_curves::init done" << endl;
317 int f_v = (verbose_level >= 1);
321 int a, rk, i, j, k, l, m, n;
326 cout <<
"web_of_cubic_curves::compute_web_of_cubic_curves" << endl;
329 bisecants, conics, verbose_level);
337 for (rk = 0; rk < 30; rk++, a++) {
339 ij = Combi.
ij2k(i, j, 6);
348 for (rk = 0; rk < 15; rk++, a++) {
350 ij = Combi.
ij2k(i, j, 6);
351 kl = Combi.
ij2k(k, l, 6);
352 mn = Combi.
ij2k(m, n, 6);
363 cout <<
"web_of_cubic_curves::compute_web_of_cubic_curves a != 45" << endl;
368 cout <<
"The web of cubic curves is:" << endl;
376 cout <<
"web_of_cubic_curves::compute_web_of_cubic_curves done" << endl;
381 int *&rk,
int &N,
int verbose_level)
383 int f_v = (verbose_level >= 1);
389 cout <<
"web_of_cubic_curves::rank_of_foursubsets" << endl;
392 cout <<
"web of cubic curves:" << endl;
397 for (i = 0; i < N; i++) {
400 cout <<
"subset " << i <<
" / " << N <<
" is ";
404 for (j = 0; j < 4; j++) {
412 cout <<
"web_of_cubic_curves::rank_of_foursubsets done" << endl;
417 long int *arc6,
int *base_curves4,
421 int f_v = (verbose_level >= 1);
429 cout <<
"web_of_cubic_curves::create_web_and_equations_based_on_four_tritangent_planes" << endl;
440 for (h = 0; h < 4; h++) {
446 cout <<
"base_curves:" << endl;
454 for (h = 0; h < 45; h++) {
457 cout <<
"h=" << h <<
" / " << 45 <<
":" << endl;
469 cout <<
"h=" << h <<
" / " << 45
470 <<
" the system is:" << endl;
477 cout <<
"after transpose:" << endl;
484 cout <<
"web_of_cubic_curves::create_web_and_equations_based_on_four_tritangent_planes "
486 "system is not equal to 4" << endl;
487 cout <<
"rk = " << rk << endl;
491 cout <<
"h=" << h <<
" / " << 2
492 <<
" curves_t[4 * 5 + 4] != -1" << endl;
503 cout <<
"h=" << h <<
" / " << 45
504 <<
": the plane equation is ";
512 cout <<
"the plane equations are: " << endl;
522 cout <<
"web_of_cubic_curves::create_web_and_equations_based_on_four_tritangent_planes done" << endl;
531 int f_v = (verbose_level >= 1);
534 cout <<
"web_of_cubic_curves::find_Eckardt_points" << endl;
540 cout <<
"web_of_cubic_curves::find_Eckardt_points "
541 "before Surf->P2->compute_eckardt_point_info" << endl;
545 cout <<
"web_of_cubic_curves::find_Eckardt_points "
546 "after Surf->P2->compute_eckardt_point_info" << endl;
549 cout <<
"web_of_cubic_curves::find_Eckardt_points We found " <<
E->
nb_E
550 <<
" Eckardt points" << endl;
551 for (s = 0; s <
E->
nb_E; s++) {
552 cout << s <<
" / " <<
E->
nb_E <<
" : ";
554 cout <<
" = E_{" << s <<
"}";
561 for (s = 0; s <
E->
nb_E; s++) {
570 cout <<
"web_of_cubic_curves::find_Eckardt_points done" << endl;
576 int f_v = (verbose_level >= 1);
580 cout <<
"web_of_cubic_curves::find_trihedral_pairs" << endl;
583 Surf->find_trihedral_pairs_from_collinear_triples_of_Eckardt_points(
589 for (i = 0; i < 120; i++) {
597 cout <<
"nb_T == 0" << endl;
603 cout <<
"List of special trihedral pairs:" << endl;
604 for (i = 0; i <
nb_T; i++) {
606 cout << i <<
" / " <<
nb_T <<
": T_{" << t_idx <<
"} = T_{"
612 cout <<
"web_of_cubic_curves::find_trihedral_pairs done" << endl;
617 int t_idx,
int *surface_equation,
621 int f_v = (verbose_level >= 1);
622 int *The_surface_equations;
624 int The_six_plane_equations[6 * 4];
628 cout <<
"web_of_cubic_curves::create_surface_equation_from_trihedral_pair "
629 "t_idx=" << t_idx << endl;
636 The_six_plane_equations, 4);
638 The_six_plane_equations + 4, 4);
640 The_six_plane_equations + 8, 4);
642 The_six_plane_equations + 12, 4);
644 The_six_plane_equations + 16, 4);
646 The_six_plane_equations + 20, 4);
652 The_six_plane_equations, The_surface_equations,
656 t_idx, lambda, lambda_rk,
660 surface_equation, 20);
665 cout <<
"web_of_cubic_curves::create_surface_equation_from_trihedral_pair done" << endl;
673 int f_v = (verbose_level >= 1);
677 cout <<
"web_of_cubic_curves::extract_six_curves_from_web" << endl;
679 for (i = 0; i < 6; i++) {
685 cout <<
"The six curves are:" << endl;
689 cout <<
"web_of_cubic_curves::extract_six_curves_from_web done" << endl;
695 long int *arc6,
int t_idx,
696 int &lambda,
int &lambda_rk,
699 int f_v = (verbose_level >= 1);
701 int pt, f_point_was_found;
705 int evals_for_point[6];
706 int pt_on_surface[4];
710 cout <<
"web_of_cubic_curves::create_lambda_from_trihedral_pair_and_arc "
711 "t_idx=" << t_idx << endl;
722 cout <<
"row_col_Eckardt_points = ";
732 cout <<
"The six curves are:" << endl;
739 cout <<
"web_of_cubic_curves::create_lambda_from_trihedral_pair_and_arc "
740 "before find_point_not_on_six_curves" << endl;
743 pt, f_point_was_found, verbose_level);
744 if (!f_point_was_found) {
745 cout <<
"web_of_cubic_curves::create_lambda_from_trihedral_pair_and_arc did not find point not on any of the six curves, picking lambda = 1" << endl;
751 cout <<
"web_of_cubic_curves::create_lambda_from_trihedral_pair_and_arc "
752 "after find_point_not_on_six_curves" << endl;
753 cout <<
"pt=" << pt << endl;
757 for (i = 0; i < 6; i++) {
762 cout <<
"The point pt=" << pt <<
" = ";
764 cout <<
" is nonzero on all plane sections of "
765 "the trihedral pair. The values are ";
771 cout <<
"solving for lambda:" << endl;
773 a =
Surf->
F->
mult3(evals[0], evals[1], evals[2]);
774 b =
Surf->
F->
mult3(evals[3], evals[4], evals[5]);
780 pt_on_surface[0] = evals[0];
781 pt_on_surface[1] = evals[1];
782 pt_on_surface[2] = evals[3];
783 pt_on_surface[3] = evals[4];
787 cout <<
"lambda = " << lambda << endl;
792 for (i = 0; i < 6; i++) {
807 cout <<
"lambda = " << lambda << endl;
815 cout <<
"web_of_cubic_curves::create_lambda_from_trihedral_pair_and_arc done" << endl;
821 int &pt,
int &f_point_was_found,
824 int f_v = (verbose_level >= 1);
831 cout <<
"web_of_cubic_curves::find_point_not_on_six_curves" << endl;
832 cout <<
"web_of_cubic_curves::find_point_not_on_six_curves "
840 for (i = 0; i < 6; i++) {
851 cout <<
"web_of_cubic_curves::find_point_not_on_six_curves "
852 "could not find a point which is not on "
853 "any of the six curves" << endl;
854 f_point_was_found =
FALSE;
858 f_point_was_found =
TRUE;
861 cout <<
"web_of_cubic_curves::find_point_not_on_six_curves done" << endl;
870 ost <<
"The 27 lines:\\\\";
871 for (i = 0; i < 27; i++) {
874 ost <<
"\\ell_{" << i <<
"} = "
889 ost <<
"The chosen abstract trihedral pair is no "
894 ost <<
"The six planes in the trihedral pair are:" << endl;
900 ost <<
"The six curves are:\\\\";
901 for (i = 0; i < 6; i++) {
905 <<
"}\\big) = \\Phi\\big(\\pi_{"
907 <<
"}\\big)=V\\Big(" << endl;
909 ost <<
"\\Big)" << endl;
914 ost <<
"The coefficients of the six curves are:\\\\";
922 ost << endl <<
"\\bigskip" << endl << endl;
923 ost <<
"We choose planes $0,1,3,4$ for the base curves:" << endl;
929 ost <<
"The four base curves are:\\\\";
930 for (i = 0; i < 4; i++) {
934 <<
"}\\big) = \\Phi\\big(\\pi_{"
936 <<
"}\\big)=V\\Big(" << endl;
938 ost <<
"\\Big)" << endl;
942 ost <<
"The coefficients of the four base curves are:\\\\";
948 ost <<
"The resulting tritangent plane equations are:\\\\";
949 for (i = 0; i < 45; i++) {
950 ost <<
"$\\pi_{" << i <<
"}=\\pi_{"
954 ost <<
"\\Big)$\\\\";
957 ost <<
"The dual coordinates of the plane equations are:\\\\";
961 ost <<
"\\;\\;" << endl;
964 ost <<
"\\;\\;" << endl;
968 ost <<
"The dual ranks are:\\\\";
972 ost <<
"\\;\\;" << endl;
975 ost <<
"\\;\\;" << endl;
984 int *The_six_plane_equations,
985 long int *plane6, ostream &ost)
990 ost <<
"The six plane equations are:" << endl;
993 The_six_plane_equations, 6, 4,
TRUE );
996 ost <<
"The six plane equations are:\\\\";
997 for (i = 0; i < 6; i++) {
999 ost <<
"$\\pi_{" << h <<
"}=\\pi_{"
1002 ost <<
"\\big)$\\\\";
1007 int *The_surface_equations,
1008 int lambda,
int lambda_rk, ostream &ost)
1014 ost <<
"The $q+1$ equations on the line are:" << endl;
1015 ost <<
"$$" << endl;
1017 The_surface_equations,
Surf->
F->
q + 1, 20,
TRUE );
1018 ost <<
"$$" << endl;
1019 ost <<
"$$" << endl;
1020 ost <<
"\\lambda = " << lambda <<
", \\; \\mbox{in row} \\; "
1021 << lambda_rk << endl;
1022 ost <<
"$$" << endl;
1024 ost <<
"The $q+1$ equations on the line are:\\\\" << endl;
1025 for (i = 0; i <
Surf->
F->
q + 1; i++) {
1026 ost <<
"Row " << i <<
" : ";
1032 ost << v[0] <<
" \\cdot ";
1046 ost << v[1] <<
" \\cdot ";
1061 The_surface_equations + i * 20);
1070 ost <<
"Dual point ranks:\\\\";
1071 ost <<
"$$" << endl;
1074 ost <<
"$$" << endl;
1089 Surf->print_Schlaefli_labelling(ost);
1090 Surf->print_Steiner_and_Eckardt(ost);
1097 int f_v = (verbose_level >= 1);
1100 cout <<
"web_of_cubic_curves::report" << endl;
1104 ost <<
"Web of cubic curves:\\\\" << endl << endl;
1107 cout <<
"web_of_cubic_curves::report before print_Eckardt_point_data" << endl;
1111 cout <<
"web_of_cubic_curves::report after print_Eckardt_point_data" << endl;
1115 cout <<
"web_of_cubic_curves::report before E->print_Eckardt_points" << endl;
1119 cout <<
"web_of_cubic_curves::report before print_web_of_cubic_curves" << endl;
1125 cout <<
"web_of_cubic_curves::report before print_plane_equations" << endl;
1137 cout <<
"web_of_cubic_curves::report done" << endl;
1147 ost <<
"The web of cubic curves is:\\\\" << endl;
1150 ost <<
"$$" << endl;
1151 print_integer_matrix_with_standard_labels(ost,
1153 ost <<
"$$" << endl;
1154 ost <<
"$$" << endl;
1155 print_integer_matrix_with_standard_labels_and_offset(ost,
1157 ost <<
"$$" << endl;
1158 ost <<
"$$" << endl;
1159 print_integer_matrix_with_standard_labels_and_offset(ost,
1161 ost <<
"$$" << endl;
1177 int i, j, k, l, m, n, h, ij, kl, mn;
1180 bisecants, conics, 0 );
1182 for (h = 0; h < 45; h++) {
1184 snprintf(str, 1000,
"W_{%s}=\\Phi\\big(\\pi_{%d}\\big) "
1185 "= \\Phi\\big(\\pi_{%s}\\big)",
1192 ij = Combi.
ij2k(i, j, 6);
1193 ost <<
"C_" << j + 1
1194 <<
"P_{" << i + 1 <<
"}P_{" << j + 1 <<
"} = ";
1206 ij = Combi.
ij2k(i, j, 6);
1207 kl = Combi.
ij2k(k, l, 6);
1208 mn = Combi.
ij2k(m, n, 6);
1209 ost <<
"P_{" << i + 1 <<
"}P_{" << j + 1 <<
"},P_{"
1210 << k + 1 <<
"}P_{" << l + 1 <<
"},P_{"
1211 << m + 1 <<
"}P_{" << n + 1 <<
"} = ";
1230 ost <<
"The coeffcients are:" << endl;
1231 for (i = 0; i < 15; i++) {
1234 ost <<
"$$" << endl;
1238 row_fst, row_len, 1,
1239 col_fst, col_len, 1,
1240 Web_of_cubic_curves_entry_print, (
void *)
this,
1242 ost <<
"$$" << endl;
1244 for (i = 0; i < 15; i++) {
1247 ost <<
"$$" << endl;
1251 row_fst, row_len, 1,
1252 col_fst, col_len, 1,
1253 Web_of_cubic_curves_entry_print, (
void *)
this,
1255 ost <<
"$$" << endl;
1257 for (i = 0; i < 15; i++) {
1260 ost <<
"$$" << endl;
1264 row_fst, row_len, 1,
1265 col_fst, col_len, 1,
1266 Web_of_cubic_curves_entry_print, (
void *)
this,
1268 ost <<
"$$" << endl;
1275static void Web_of_cubic_curves_entry_print(
int *p,
1276 int m,
int n,
int i,
int j,
int val,
1277 std::string &output,
void *data)
1287 sprintf(str,
"\\pi_{%d}", i);
1289 output.append(
" = \\pi_{");
1298 sprintf(str,
"%d", i);
void print_intersections(std::ostream &ost, int verbose_level)
void print_Eckardt_points(std::ostream &ost, int verbose_level)
void print_bisecants(std::ostream &ost, int verbose_level)
void print_conics(std::ostream &ost, int verbose_level)
std::string * Line_label_tex
void latex_abstract_trihedral_pair(std::ostream &ost, int t_idx)
long int * Trihedral_to_Eckardt
std::string * Trihedral_pair_labels
std::string * Eckard_point_label
schlaefli_labels * Labels
cubic surfaces in PG(3,q) with 27 lines
ring_theory::homogeneous_polynomial_domain * Poly3
geometry::projective_space * P2
void print_polynomial_domains(std::ostream &ost)
ring_theory::homogeneous_polynomial_domain * Poly1_4
long int rank_point(int *v)
void unrank_line(int *v, long int rk)
ring_theory::homogeneous_polynomial_domain * Poly3_4
void create_lines_from_plane_equations(int *The_plane_equations, long int *Lines, int verbose_level)
field_theory::finite_field * F
void print_basics(std::ostream &ost)
void multiply_linear_times_linear_times_linear(int *three_coeff1, int *three_coeff2, int *three_coeff3, int *ten_coeff, int verbose_level)
long int rank_plane(int *v)
ring_theory::homogeneous_polynomial_domain * Poly2
void create_equations_for_pencil_of_surfaces_from_trihedral_pair(int *The_six_plane_equations, int *The_surface_equations, int verbose_level)
ring_theory::homogeneous_polynomial_domain * Poly1
void multiply_conic_times_linear(int *six_coeff, int *three_coeff, int *ten_coeff, int verbose_level)
a web of cubic curves which is used to create an algebraic variety
int * Tritangent_plane_equations
void print_dual_point_ranks(std::ostream &ost)
long int row_col_Eckardt_points[6]
void print_web_of_cubic_curves(long int *arc6, std::ostream &ost)
void report(std::ostream &ost, int verbose_level)
void create_web_and_equations_based_on_four_tritangent_planes(long int *arc6, int *base_curves4, int verbose_level)
void print_trihedral_plane_equations(std::ostream &ost)
void compute_web_of_cubic_curves(long int *arc6, int verbose_level)
long int * The_plane_rank
void create_lambda_from_trihedral_pair_and_arc(long int *arc6, int t_idx, int &lambda, int &lambda_rk, int verbose_level)
void create_surface_equation_from_trihedral_pair(long int *arc6, int t_idx, int *surface_equation, int &lambda, int verbose_level)
long int * Dual_point_ranks
void init(surface_domain *Surf, long int *arc6, int verbose_level)
void extract_six_curves_from_web(int verbose_level)
void find_Eckardt_points(int verbose_level)
void report_basics(std::ostream &ost, int verbose_level)
void print_Eckardt_point_data(std::ostream &ost, int verbose_level)
void find_point_not_on_six_curves(int &pt, int &f_point_was_found, int verbose_level)
void print_surface_equations_on_line(int *The_surface_equations, int lambda, int lambda_rk, std::ostream &ost)
int * Web_of_cubic_curves
void find_trihedral_pairs(int verbose_level)
void print_lines(std::ostream &ost)
void print_the_six_plane_equations(int *The_six_plane_equations, long int *plane6, std::ostream &ost)
void rank_of_foursubsets(int *&rk, int &N, int verbose_level)
long int * The_plane_duals
a collection of combinatorial functions
void ordered_pair_unrank(int rk, int &i, int &j, int n)
void unrank_k_subset(int rk, int *set, int n, int k)
void unordered_triple_pair_unrank(int rk, int &i, int &j, int &k, int &l, int &m, int &n)
long int int_n_choose_k(int n, int k)
int ij2k(int i, int j, int n)
void matrix_print(int *p, int m, int n)
void matrix_print(long int *p, int m, int n)
a collection of functions related to sorted vectors
int lint_vec_search_linear(long int *v, int len, long int a, int &idx)
int int_vec_search_linear(int *v, int len, int a, int &idx)
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
void print_naked_tex(std::ostream &ost, int f_backwards)
void PG_element_rank_modified(int *v, int stride, int len, int &a)
void PG_element_normalize_from_front(int *v, int stride, int len)
void PG_element_normalize(int *v, int stride, int len)
void PG_element_unrank_modified(int *v, int stride, int len, int a)
int mult3(int a1, int a2, int a3)
linear_algebra::linear_algebra * Linear_algebra
void compute_bisecants_and_conics(long int *arc6, int *&bisecants, int *&conics, int verbose_level)
various functions related to geometries
algebraic_geometry::eckardt_point_info * compute_eckardt_point_info(projective_space *P2, long int *arc6, int verbose_level)
void print_single_generator_matrix_tex(std::ostream &ost, long int a)
arc_in_projective_space * Arc_in_projective_space
void unrank_point(int *v, long int rk)
void transpose_matrix(int *A, int *At, int ma, int na)
int RREF_and_kernel(int n, int k, int *A, int verbose_level)
int rank_of_rectangular_matrix(int *A, int m, int n, int verbose_level)
interface to create latex output files
void print_lint_matrix_with_standard_labels(std::ostream &ost, long int *p, int m, int n, int f_tex)
void print_lint_matrix_with_standard_labels_and_offset(std::ostream &ost, long int *p, int m, int n, int m_offset, int n_offset, int f_tex)
void int_matrix_print_with_labels_and_partition(std::ostream &ost, int *p, int m, int n, int *row_labels, int *col_labels, int *row_part_first, int *row_part_len, int nb_row_parts, int *col_part_first, int *col_part_len, int nb_col_parts, void(*process_function_or_NULL)(int *p, int m, int n, int i, int j, int val, std::string &output, void *data), void *data, int f_tex)
void print_integer_matrix_with_standard_labels(std::ostream &ost, int *p, int m, int n, int f_tex)
void print_integer_matrix_with_standard_labels_and_offset(std::ostream &ost, int *p, int m, int n, int m_offset, int n_offset, int f_tex)
data_structures::lint_vec * Lint_vec
data_structures::int_vec * Int_vec
void unrank_point(int *v, int rk)
int evaluate_at_a_point(int *coeff, int *pt_vec)
void print_equation(std::ostream &ost, int *coeffs)
void print_monomial_latex(std::ostream &ost, int *mon)
#define Lint_vec_copy(A, B, C)
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
#define Int_vec_copy(A, B, C)
#define Int_vec_print(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects