Orbiter 2022
Combinatorial Objects
semifield_trace.cpp
Go to the documentation of this file.
1/*
2 * semifield_trace.cpp
3 *
4 * Created on: Apr 18, 2019
5 * Author: betten
6 */
7
8
9
10
11
12#include "orbiter.h"
13
14using namespace std;
15
16namespace orbiter {
17namespace layer5_applications {
18namespace semifields {
19
20
21
23{
24 SC = NULL;
25 SL = NULL;
26 L2 = NULL;
27 A = NULL;
28 F = NULL;
29 n = k = k2 = 0;
30 ELT1 = ELT2 = ELT3 = NULL;
31 M1 = NULL;
32 Basis = NULL;
33 basis_tmp = NULL;
34 base_cols = NULL;
35 R1 = NULL;
36 //null();
37}
38
40{
41 if (ELT1) {
43 }
44 if (ELT2) {
46 }
47 if (ELT3) {
49 }
50 if (M1) {
51 FREE_int(M1);
52 }
53 if (Basis) {
55 }
56 if (basis_tmp) {
58 }
59 if (base_cols) {
61 }
62 if (R1) {
64 }
65 //freeself();
66}
67
69{
71 SC = SL->SC;
72 L2 = SL->L2;
73 A = SC->A;
74 F = SC->Mtx->GFq;
75 k = SC->k;
76 k2 = k * k;
77 n = 2 * k;
81
82
83 M1 = NEW_int(n * n);
84 Basis = NEW_int(k * k);
85 basis_tmp = NEW_int(k /* basis_sz */ * k2);
87
89}
90
92 int cur_level,
93 int *input_basis, int basis_sz,
94 int *basis_after_trace, int *transporter,
95 int &trace_po, int &trace_so,
96 int verbose_level)
97// input basis is input_basis of size basis_sz x k2
98// there is a check if input_basis defines a semifield
99{
100 int f_v = (verbose_level >= 1);
101 int f_vv = (verbose_level >= 2);
102 int i, j, idx, d, d0, po, c0, c1;
103
104 if (f_v) {
105 cout << "semifield_trace::trace_very_general" << endl;
106 }
107 if (f_vv) {
108 cout << "semifield_trace::trace_very_general "
109 "input basis:" << endl;
110 SC->basis_print(input_basis, basis_sz);
111 }
112 if (!SC->test_partial_semifield(input_basis,
113 basis_sz, 0 /* verbose_level */)) {
114 cout << "does not satisfy the partial semifield condition" << endl;
115 exit(1);
116 }
117
118
119
120
121 // Step 1:
122 // trace the first matrix (which becomes the identity matrix):
123
124 // create the n x n matrix which is a 2 x 2 block matrix
125 // (A 0)
126 // (0 I)
127 // where A is input_basis
128 // the resulting matrix will be put in transporter
129 Int_vec_zero(M1, n * n);
130 for (i = 0; i < k; i++) {
131 for (j = 0; j < k; j++) {
132 M1[i * n + j] = input_basis[i * k + j];
133 }
134 }
135 for (i = k; i < n; i++) {
136 M1[i * n + i] = 1;
137 }
138 A->make_element(transporter, M1, 0);
139
140 if (f_vv) {
141 cout << "transformation matrix transporter=" << endl;
142 Int_matrix_print(transporter, n, n);
143 cout << "transformation matrix M1=" << endl;
145 }
146
147 // apply transporter to elements 0,...,basis_sz - 1 of input_basis
148 SC->apply_element_and_copy_back(transporter,
149 input_basis, basis_tmp,
150 0, basis_sz, verbose_level);
151 if (f_vv) {
152 cout << "semifield_trace::trace_very_general "
153 "after transform (1):" << endl;
154 SC->basis_print(input_basis, basis_sz);
155 }
156 if (!F->Linear_algebra->is_identity_matrix(input_basis, k)) {
157 cout << "semifield_trace::trace_very_general "
158 "basis_tmp is not the identity matrix" << endl;
159 exit(1);
160 }
161
162
163
164 // Step 2:
165 // Trace the second matrix using rational normal forms.
166 // Do adjustment to get the right coset representative.
167 // Apply fusion element if necessary
168
169 L2->C->identify_matrix(input_basis + 1 * k2, R1, Basis, 0 /* verbose_level */);
170
171 idx = L2->C->find_class_rep(L2->R, L2->nb_classes, R1, 0 /* verbose_level */);
172 d = L2->class_to_flag_orbit[idx];
173 if (f_vv) {
174 cout << "semifield_starter::trace_very_general "
175 "the second matrix belongs to conjugacy class "
176 << idx << " which is in down orbit " << d << endl;
177 }
178
179 L2->multiply_to_the_right(transporter, Basis, ELT2, ELT3, 0 /* verbose_level */);
180 A->element_move(ELT3, transporter, 0);
181
182 // apply ELT2 (i.e., Basis) to input_basis elements 1, .., basis_sz - 1
184 input_basis, basis_tmp,
185 1, basis_sz, verbose_level);
186 if (f_vv) {
187 cout << "semifield_trace::trace_very_general "
188 "after transform (2):" << endl;
189 SC->basis_print(input_basis, basis_sz);
190 }
191
192
193 c0 = L2->flag_orbit_classes[d * 2 + 0];
194 c1 = L2->flag_orbit_classes[d * 2 + 1];
195 if (c0 != idx && c1 == idx) {
196 if (f_vv) {
197 cout << "Adjusting" << endl;
198 }
199 L2->multiply_to_the_right(transporter,
201 ELT2, ELT3,
202 0 /* verbose_level */);
203 A->element_move(ELT3, transporter, 0);
204
205 // apply ELT2 to the basis elements 1,...,basis_sz - 1:
207 input_basis, basis_tmp,
208 1, basis_sz, verbose_level);
209 if (f_vv) {
210 cout << "semifield_trace::trace_very_general "
211 "after transform because of adjustment:" << endl;
212 SC->basis_print(input_basis, basis_sz);
213 }
214 // subtract off the first matrix (is this really the identity?)
215 for (i = 0; i < k2; i++) {
216 input_basis[1 * k2 + i] = F->add(
217 input_basis[1 * k2 + i], F->negate(input_basis[i]));
218 }
219 if (f_vv) {
220 cout << "semifield_trace::trace_very_general "
221 "after subtracting the identity:" << endl;
222 SC->basis_print(input_basis, basis_sz);
223 }
224 }
225 else {
226 if (f_vv) {
227 cout << "No adjustment needed" << endl;
228 }
229 }
230
231 if (L2->f_Fusion[d]) {
232 if (f_vv) {
233 cout << "Applying fusion element" << endl;
234 }
235 if (L2->Fusion_elt[d] == NULL) {
236 cout << "Fusion_elt[d] == NULL" << endl;
237 exit(1);
238 }
239 d0 = L2->Fusion_idx[d];
240 A->element_mult(transporter, L2->Fusion_elt[d], ELT3, 0);
241 A->element_move(ELT3, transporter, 0);
242
243 // apply Fusion_elt[d] to the basis elements 0,1,...,basis_sz - 1
245 input_basis, basis_tmp,
246 0, basis_sz, verbose_level);
247 if (f_vv) {
248 cout << "semifield_starter::trace_very_general "
249 "after transform (3):" << endl;
250 SC->basis_print(input_basis, basis_sz);
251 }
252 if (input_basis[0] == 0) {
253 // add the second matrix to the first:
254 for (j = 0; j < k2; j++) {
255 input_basis[j] = F->add(
256 input_basis[j], input_basis[k2 + j]);
257 }
258 }
259 // now, input_basis[0] != 0
260 if (input_basis[0] == 0) {
261 cout << "input_basis[0] == 0" << endl;
262 exit(1);
263 }
264 if (input_basis[0] != 1) {
265 int lambda;
266
267 lambda = F->inverse(input_basis[0]);
268 for (j = 0; j < k2; j++) {
269 input_basis[j] = F->mult(input_basis[j], lambda);
270 }
271 }
272 if (input_basis[0] != 1) {
273 cout << "input_basis[0] != 1" << endl;
274 exit(1);
275 }
276 if (input_basis[k2]) {
277 int lambda;
278 lambda = F->negate(input_basis[k2]);
279 for (j = 0; j < k2; j++) {
280 input_basis[k2 + j] = F->add(
281 input_basis[k2 + j],
282 F->mult(input_basis[j], lambda));
283 }
284 }
285 if (input_basis[k]) {
286 int lambda;
287 lambda = F->negate(input_basis[k]);
288 for (j = 0; j < k2; j++) {
289 input_basis[j] = F->add(
290 input_basis[j],
291 F->mult(input_basis[k2 + j], lambda));
292 }
293 }
294 if (input_basis[k]) {
295 cout << "input_basis[k] (should be zero by now)" << endl;
296 exit(1);
297 }
298 if (f_vv) {
299 cout << "semifield_starter::trace_very_general "
300 "after gauss elimination:" << endl;
301 SC->basis_print(input_basis, basis_sz);
302 }
303 }
304 else {
305 if (f_vv) {
306 cout << "No fusion" << endl;
307 }
308 d0 = d;
309 }
310 if (f_vv) {
311 cout << "semifield_trace::trace_very_general "
312 "d0 = " << d0 << endl;
313 }
314 if (L2->Fusion_elt[d0]) {
315 cout << "Fusion_elt[d0]" << endl;
316 exit(1);
317 }
318 po = L2->Fusion_idx[d0];
319 if (f_vv) {
320 cout << "semifield_trace::trace_very_general "
321 "po = " << po << endl;
322 }
323
324
325 // Step 2 almost finished.
326 // Next we need to compute the reduced coset representatives
327 // for the remaining elements
328 // w.r.t. the basis and the pivots in base_col
329
330 if (f_vv) {
331 cout << "semifield_trace::trace_very_general "
332 "we will now compute the reduced coset reps:" << endl;
333 }
334
335 base_cols[0] = 0;
336 base_cols[1] = k;
337 if (f_vv) {
338 cout << "semifield_trace::trace_very_general base_cols=";
339 Int_vec_print(cout, base_cols, 2);
340 cout << endl;
341 }
342 for (i = 0; i < 2; i++) {
343 for (j = 2; j < basis_sz; j++) {
344 F->Linear_algebra->Gauss_step(input_basis + i * k2,
345 input_basis + j * k2, k2, base_cols[i],
346 0 /*verbose_level*/);
347 }
348 }
349 if (f_vv) {
350 cout << "semifield_trace::trace_very_general "
351 "reduced basis=" << endl;
352 Int_matrix_print(input_basis, basis_sz, k2);
353 cout << "Which is:" << endl;
354 SC->basis_print(input_basis, basis_sz);
355 }
356 if (!SC->test_partial_semifield(input_basis,
357 basis_sz, 0 /* verbose_level */)) {
358 cout << "does not satisfy the partial "
359 "semifield condition" << endl;
360 exit(1);
361 }
362
363
364#if 0
365
366 // ToDo
367
368
369 int a, a_local, pos, so;
370
371
372 // Step 3:
373 // Locate the third matrix, compute its rank,
374 // and find the rank in the candidates array to compute the local point.
375 // Then find the point in the schreier structure
376 // and compute a coset representative.
377 // This coset representative stabilizes the subspace which is
378 // generated by the first two vectors, so when applying the mapping,
379 // we can skip the first two vectors.
380
381 a = SC->matrix_rank(input_basis + 2 * k2);
382 if (f_vv) {
383 cout << "semifield_trace::trace_very_general "
384 "a = " << a << endl;
385 }
386
387 a_local = Level_two_down[po].find_point(a);
388 if (f_vv) {
389 cout << "semifield_trace::trace_very_general "
390 "a_local = " << a_local << endl;
391 }
392
393 pos = Level_two_down[po].Sch->orbit_inv[a_local];
394 so = Level_two_down[po].Sch->orbit_number(a_local);
395 // Level_two_down[po].Sch->orbit_no[pos];
396
397 if (f_vv) {
398 cout << "semifield_trace::trace_very_general "
399 "so = " << so << endl;
400 }
401 trace_po = po;
402 trace_so = so;
403
404 Level_two_down[po].Sch->coset_rep_inv(pos);
405 A->element_mult(transporter,
406 Level_two_down[po].Sch->cosetrep,
407 ELT3,
408 0 /* verbose_level */);
409 A->element_move(ELT3, transporter, 0);
410 // apply cosetrep to base elements 2,...,basis_sz - 1:
411 apply_element_and_copy_back(
412 Level_two_down[po].Sch->cosetrep,
413 input_basis, basis_tmp,
414 2, basis_sz, verbose_level);
415#if 0
416 for (i = 2; i < basis_sz; i++) {
417 SF->A_on_S->compute_image_low_level(
418 Level_two_down[po].Sch->cosetrep,
419 input_basis + i * k2,
420 basis_tmp + i * k2,
421 0 /* verbose_level */);
422 }
423 int_vec_copy(basis_tmp + 2 * k2,
424 input_basis + 2 * k2,
425 (basis_sz - 2) * k2);
426#endif
427 if (f_vv) {
428 cout << "semifield_trace::trace_very_general "
429 "after transforming with cosetrep from "
430 "secondary orbit (4):" << endl;
431 basis_print(input_basis, basis_sz);
432 }
433 base_cols[0] = 0;
434 base_cols[1] = k;
435 if (f_vv) {
436 cout << "semifield_trace::trace_very_general "
437 "base_cols=";
438 int_vec_print(cout, base_cols, 2);
439 cout << endl;
440 }
441 for (i = 0; i < 2; i++) {
442 for (j = 2; j < basis_sz; j++) {
443 F->Gauss_step(input_basis + i * k2,
444 input_basis + j * k2, k2,
445 base_cols[i],
446 0 /*verbose_level*/);
447 }
448 }
449 if (f_vv) {
450 cout << "semifield_trace::trace_very_general "
451 "reduced basis(2)=" << endl;
452 int_matrix_print(input_basis, basis_sz, k2);
453 cout << "Which is:" << endl;
454 basis_print(input_basis, basis_sz);
455 }
456
457#if 0
458 if (!test_partial_semifield(input_basis,
459 basis_sz, 0 /* verbose_level */)) {
460 cout << "does not satisfy the partial semifield condition" << endl;
461 exit(1);
462 }
463#endif
464
465
466 if (cur_level >= 3) {
467 // we need to keep going, since we are working on level 4 or higher:
468 //f_vv = TRUE;
469
470 if (f_vv) {
471 cout << "semifield_trace::trace_very_general "
472 "keep going since cur_level >= 3" << endl;
473 cout << "po=" << po << " so=" << so << endl;
474 }
475
478 middle_layer_node *M;
479
480 D = Level_two_down;
481 D1 = Level_three_down;
482 M = Level_two_middle;
483
484 trace_step(3 /* step */,
485 po, so,
486 input_basis, basis_sz, basis_tmp,
487 transporter, ELT3,
488 D,
489 D1,
490 M,
491 verbose_level);
492
493#if 0
494 if (!test_partial_semifield(input_basis,
495 basis_sz, 0 /* verbose_level */)) {
496 cout << "does not satisfy the partial "
497 "semifield condition" << endl;
498 exit(1);
499 }
500#endif
501 trace_po = po;
502 trace_so = so;
503
504
505 }
506
507 if (cur_level >= 4) {
508 // we need to keep going, since we are working on level 5 or higher:
509 //f_vv = TRUE;
510
511 if (f_vv) {
512 cout << "semifield_trace::trace_very_general "
513 "keep going since cur_level >= 4" << endl;
514 cout << "po=" << po << " so=" << so << endl;
515 }
516
519 semifield_middle_layer_node *M;
520
521 D = Level_three_down;
522 D1 = Level_four_down;
523 M = Level_three_middle;
524
525 trace_step(4 /* step */,
526 po, so,
527 input_basis, basis_sz, basis_tmp,
528 transporter, ELT3,
529 D,
530 D1,
531 M,
532 verbose_level);
533
534#if 0
535 if (!test_partial_semifield(input_basis,
536 basis_sz, 0 /* verbose_level */)) {
537 cout << "does not satisfy the partial "
538 "semifield condition" << endl;
539 exit(1);
540 }
541#endif
542 trace_po = po;
543 trace_so = so;
544
545
546 }
547#endif
548
549
550 if (f_v) {
551 cout << "semifield_trace::trace_very_general done" << endl;
552 }
553}
554
555
556#if 0
557int semifield_trace::trace_to_level_three(semifield_lifting *SL,
558 int *input_basis, int basis_sz, int *transporter,
559 int verbose_level)
560{
561 int f_v = (verbose_level >= 1);
562 int f_vv = (verbose_level >= 2);
563 int trace_po;
564 int trace_so;
565 int *Elt1;
566 int *basis_tmp;
567
568
569 if (f_v) {
570 cout << "semifield_trace::trace_to_level_three" << endl;
571 }
572 Elt1 = NEW_int(A->elt_size_in_int);
573 basis_tmp = NEW_int(basis_sz * k2);
574
576 input_basis, basis_sz, basis_tmp, transporter,
577 trace_po, trace_so,
578 verbose_level - 4);
579
580 semifield_downstep_node *D;
581 semifield_downstep_node *D1;
582 semifield_middle_layer_node *M;
583
584 D = Level_two_down;
585 D1 = Level_three_down;
586 M = Level_two_middle;
587
588 if (f_vv) {
589 cout << "semifield_trace::trace_to_level_three "
590 "before trace_step_up" << endl;
591 }
592
593 trace_step_up(3 /* step */,
594 trace_po, trace_so,
595 input_basis, basis_sz, basis_tmp,
596 transporter, Elt1,
597 D,
598 D1,
599 M,
600 verbose_level - 4);
601
602 FREE_int(Elt1);
604
605 if (f_v) {
606 cout << "semifield_trace::trace_to_level_three "
607 "done" << endl;
608 }
609 return trace_po;
610}
611
612
613void semifield_trace::trace_general(
614 int cur_level, int cur_po, int cur_so,
615 int *input_basis, int *basis_after_trace, int *transporter,
616 int &trace_po, int &trace_so,
617 int verbose_level)
618// input_basis has size (cur_level + 1) x k2
619// there is a check if input_basis defines a semifield
620{
621 int f_v = (verbose_level >= 1);
622
623 if (f_v) {
624 cout << "semifield_trace::trace_general "
625 "before trace_very_general" << endl;
626 }
627 trace_very_general(cur_level,
628 input_basis,
629 cur_level + 1,
630 basis_after_trace,
631 transporter,
632 trace_po, trace_so,
633 verbose_level - 1);
634 if (f_v) {
635 cout << "semifield_trace::trace_general "
636 "after trace_very_general" << endl;
637 }
638}
639
640void semifield_trace::trace_step(
641 int step,
642 int &po, int &so,
643 int *changed_basis, int basis_sz, int *basis_tmp,
644 int *transporter, int *ELT3,
645 semifield_downstep_node *D,
646 semifield_downstep_node *D1,
647 semifield_middle_layer_node *M,
648 int verbose_level)
649{
650 int f_v = (verbose_level >= 1);
651
652 if (f_v) {
653 cout << "semifield_trace::trace_step "
654 "step = " << step << endl;
655 }
656
657
658 trace_step_up(step,
659 po, so,
660 changed_basis, basis_sz, basis_tmp,
661 transporter, ELT3,
662 D,
663 D1,
664 M,
665 verbose_level - 1);
666
667
668 trace_step_down(step,
669 po, so,
670 changed_basis, basis_sz, basis_tmp,
671 transporter, ELT3,
672 D,
673 D1,
674 M,
675 verbose_level - 1);
676
677
678
679 if (f_v) {
680 cout << "semifield_trace::trace_step "
681 "step = " << step << " done" << endl;
682 }
683
684}
685
686void semifield_trace::trace_step_up(
687 int step,
688 int &po, int &so,
689 int *changed_basis, int basis_sz, int *basis_tmp,
690 int *transporter, int *ELT3,
691 semifield_downstep_node *D,
692 semifield_downstep_node *D1,
693 semifield_middle_layer_node *M,
694 int verbose_level)
695{
696 int f_v = (verbose_level >= 1);
697 int f_vv = (verbose_level >= 1);
698 int mo, m0;
699 int i, j;
700
701 if (f_v) {
702 cout << "semifield_trace::trace_step_up "
703 "step = " << step << endl;
704 }
705 mo = D[po].first_middle_orbit + so;
706 if (f_vv) {
707 cout << "semifield_trace::trace_step_up "
708 "mo = " << mo << endl;
709 }
710 if (M[mo].f_fusion_node) {
711 if (f_vv) {
712 cout << "semifield_trace::trace_step_up "
713 "fusion node" << endl;
714 }
715 m0 = M[mo].fusion_with;
716 A->element_mult(transporter,
717 M[mo].fusion_elt,
718 ELT3,
719 0 /* verbose_level */);
720 A->element_move(ELT3, transporter, 0);
721 apply_element_and_copy_back(M[mo].fusion_elt,
722 changed_basis, basis_tmp,
723 0, basis_sz, verbose_level);
724#if 0
725 for (i = 0; i < basis_sz; i++) {
726 SF->A_on_S->compute_image_low_level(
727 M[mo].fusion_elt,
728 changed_basis + i * k2,
729 basis_tmp + i * k2,
730 0 /* verbose_level */);
731 }
732 int_vec_copy(basis_tmp + 0 * k2,
733 changed_basis + 0 * k2,
734 (basis_sz - 0) * k2);
735#endif
736 if (f_vv) {
737 cout << "semifield_trace::trace_step_up "
738 "after fusion:" << endl;
739 int_matrix_print(changed_basis, basis_sz, k2);
740 basis_print(changed_basis, basis_sz);
741 }
742#if 0
743 if (!test_partial_semifield(changed_basis,
744 basis_sz, 0 /* verbose_level */)) {
745 cout << "does not satisfy the partial semifield condition" << endl;
746 exit(1);
747 }
748#endif
749 //exit(1);
750 }
751 else {
752 m0 = mo;
753 }
754 if (f_vv) {
755 cout << "semifield_trace::trace_step_up "
756 "m0 = " << m0 << endl;
757 }
758 po = M[m0].upstep_orbit;
759 if (f_vv) {
760 cout << "semifield_trace::trace_step_up "
761 "po = " << po << endl;
762 }
763 if (po == -1) {
764 cout << "semifield_trace::trace_step_up "
765 "po == -1" << endl;
766 exit(1);
767 }
768
769 int *pivots;
770
771 pivots = NEW_int(step);
772 get_pivots(step /* level */, M[m0].upstep_orbit,
773 pivots, verbose_level - 3);
774
775 if (f_vv) {
776 cout << "semifield_trace::trace_step_up "
777 "pivots=";
778 int_vec_print(cout, pivots, step);
779 cout << endl;
780 }
781 F->Gauss_int_with_given_pivots(
782 changed_basis,
783 FALSE /* f_special */,
784 TRUE /* f_complete */,
785 pivots,
786 step /* nb_pivots */,
787 basis_sz /* m */,
788 k2 /* n */,
789 0 /*verbose_level*/);
790 if (f_vv) {
791 cout << "semifield_trace::trace_step_up "
792 "after Gauss_int_with_given_pivots:" << endl;
793 int_matrix_print(changed_basis, basis_sz, k2);
794 }
795#if 0
796 if (!test_partial_semifield(changed_basis,
797 basis_sz, 0 /* verbose_level */)) {
798 cout << "does not satisfy the partial "
799 "semifield condition" << endl;
800 exit(1);
801 }
802#endif
803 for (i = 0; i < step; i++) {
804 for (j = step; j < basis_sz; j++) {
805 F->Gauss_step(changed_basis + i * k2,
806 changed_basis + j * k2, k2,
807 pivots[i], 0 /*verbose_level*/);
808 }
809 }
810 if (f_vv) {
811 cout << "semifield_trace::trace_step_up "
812 "after reducing:" << endl;
813 int_matrix_print(changed_basis, basis_sz, k2);
814 basis_print(changed_basis, basis_sz);
815 }
816#if 0
817 if (!test_partial_semifield(changed_basis,
818 basis_sz, 0 /* verbose_level */)) {
819 cout << "does not satisfy the partial semifield condition" << endl;
820 exit(1);
821 }
822#endif
823
824 FREE_int(pivots);
825 if (f_v) {
826 cout << "semifield_trace::trace_step_up "
827 "step = " << step << " done" << endl;
828 }
829}
830
831void semifield_trace::trace_step_down(
832 int step,
833 int &po, int &so,
834 int *changed_basis, int basis_sz, int *basis_tmp,
835 int *transporter, int *ELT3,
836 semifield_downstep_node *D,
837 semifield_downstep_node *D1,
838 semifield_middle_layer_node *M,
839 int verbose_level)
840{
841 int f_v = (verbose_level >= 1);
842 int f_vv = (verbose_level >= 1);
843 int a, a_local, pos;
844
845 if (f_v) {
846 cout << "semifield_trace::trace_step_down "
847 "step = " << step << endl;
848 }
849 if (f_vv) {
850 cout << "Elt " << step << endl;
851 int_matrix_print(changed_basis + step * k2, k, k);
852 }
853 a = matrix_rank(changed_basis + step * k2);
854 if (f_vv) {
855 cout << "semifield_trace::trace_step_down "
856 "a = " << a << " po = " << po << endl;
857 }
858
859 a_local = D1[po].find_point(a);
860 if (f_vv) {
861 cout << "semifield_trace::trace_step_down "
862 "a_local = " << a_local << endl;
863 }
864
865 pos = D1[po].Sch->orbit_inv[a_local];
866 so = D1[po].Sch->orbit_number(a_local);
867 // D1[po].Sch->orbit_no[pos];
868
869
870 if (f_vv) {
871 cout << "semifield_trace::trace_step_down "
872 "so = " << so << endl;
873 }
874 D1[po].Sch->coset_rep_inv(pos);
875 A->element_mult(transporter,
876 D1[po].Sch->cosetrep,
877 ELT3,
878 0 /* verbose_level */);
879 A->element_move(ELT3, transporter, 0);
880 apply_element_and_copy_back(D1[po].Sch->cosetrep,
881 changed_basis, basis_tmp,
882 step, basis_sz, verbose_level);
883#if 0
884 for (i = step; i < basis_sz; i++) {
885 SF->A_on_S->compute_image_low_level(
886 D1[po].Sch->cosetrep,
887 changed_basis + i * k2,
888 basis_tmp + i * k2,
889 0 /* verbose_level */);
890 }
891 int_vec_copy(basis_tmp + step * k2,
892 changed_basis + step * k2,
893 (basis_sz - step) * k2);
894#endif
895 if (f_vv) {
896 cout << "semifield_trace::trace_step_down "
897 "after transforming with cosetrep from "
898 "secondary orbit:" << endl;
899 basis_print(changed_basis, basis_sz);
900#if 0
901 for (i = 0; i < basis_sz; i++) {
902 cout << "Elt i = " << i << endl;
903 int_matrix_print(changed_basis + i * k2, k, k);
904 }
905#endif
906 }
907 if (f_v) {
908 cout << "semifield_trace::trace_step_down "
909 "step = " << step << " done" << endl;
910 }
911}
912
913#endif
914
915
916
917
918
919
920
921
922}}}
923
924
conjugacy class in GL(n,q) described using rational normal form
Definition: algebra.h:260
int find_class_rep(gl_class_rep *Reps, int nb_reps, gl_class_rep *R, int verbose_level)
void identify_matrix(int *Mtx, gl_class_rep *R, int *Basis, int verbose_level)
Definition: gl_classes.cpp:704
void Gauss_step(int *v1, int *v2, int len, int idx, int verbose_level)
void element_mult(void *a, void *b, void *ab, int verbose_level)
Definition: action_cb.cpp:315
void make_element(int *Elt, int *data, int verbose_level)
Definition: action.cpp:1875
void element_move(void *a, void *b, int verbose_level)
Definition: action_cb.cpp:335
int test_partial_semifield(int *Basis, int n, int verbose_level)
void apply_element_and_copy_back(int *Elt, int *basis_in, int *basis_out, int first, int last_plus_one, int verbose_level)
auxiliary class for classifying semifields
Definition: semifields.h:734
void multiply_to_the_right(int *ELT1, int *Mtx, int *ELT2, int *ELT3, int verbose_level)
One step of lifting for classifying semifields.
Definition: semifields.h:465
void trace_very_general(int cur_level, int *input_basis, int basis_sz, int *basis_after_trace, int *transporter, int &trace_po, int &trace_so, int verbose_level)
#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 FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define Int_matrix_print(A, B, C)
Definition: foundations.h:707
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects