Orbiter 2022
Combinatorial Objects
action_by_subfield_structure.cpp
Go to the documentation of this file.
1// action_by_subfield_structure.cpp
2//
3// Anton Betten
4// December 6, 2011
5
7#include "group_actions.h"
8
9using namespace std;
10
11
12namespace orbiter {
13namespace layer3_group_actions {
14namespace induced_actions {
15
16
18{
19 null();
20}
21
23{
24 free();
25}
26
28{
29 MQ = NULL;
30 FQ = NULL;
31 Mq = NULL;
32 Fq = NULL;
33 v1 = NULL;
34 v2 = NULL;
35 v3 = NULL;
36 Eltq = NULL;
37 Mtx = NULL;
38 S = NULL;
39 Aq = NULL;
41}
42
44{
45 if (v1) {
46 FREE_int(v1);
47 }
48 if (v2) {
49 FREE_int(v2);
50 }
51 if (v3) {
52 FREE_int(v3);
53 }
54 if (Eltq) {
56 }
57 if (Mtx) {
59 }
60 if (S) {
62 }
63 if (Aq) {
65 }
66 null();
67}
68
70 field_theory::finite_field *Fq, int verbose_level)
71{
72 int f_v = (verbose_level >= 1);
73 int p1, h1;
74 int p, h;
75 int q;
78
79 if (f_v) {
80 cout << "action_by_subfield_structure::init" << endl;
81 cout << "starting with action " << A.label << endl;
82 }
84 q = Fq->q;
85 if (A.type_G != matrix_group_t) {
86 cout << "action_by_subfield_structure::init "
87 "fatal: A.type_G != matrix_group_t" << endl;
88 exit(1);
89 }
90 AQ = &A;
91 MQ = AQ->G.matrix_grp;
92 FQ = MQ->GFq;
93 n = MQ->n;
94 Q = FQ->q;
96
97 NT.is_prime_power(q, p1, h1);
98 NT.is_prime_power(Q, p, h);
99 if (p1 != p) {
100 cout << "action_by_subfield_structure::init "
101 "different characteristics of the fields" << endl;
102 exit(1);
103 }
104
105 s = h / h1;
106 if (h1 * s != h) {
107 cout << "action_by_subfield_structure::init "
108 "not a subfield" << endl;
109 exit(1);
110 }
111
112 m = n * s;
113 if (f_v) {
114 cout << "action_by_subfield_structure::init" << endl;
115 cout << "index=s=" << s << endl;
116 cout << "m=s*n=" << m << endl;
117 }
118
119
120 degree = Gg.nb_PG_elements(m - 1, q);
122 v1 = NEW_int(m);
123 v2 = NEW_int(m);
124 v3 = NEW_int(m);
125
126
128
129 int f_basis = TRUE;
130 int f_semilinear = FALSE;
131
132
133 if (f_v) {
134 cout << "action_by_subfield_structure::init "
135 "before Aq->init_matrix_group" << endl;
136 }
137
139
141 f_semilinear, f_basis, FALSE /* f_init_sims */,
142 nice_gens,
143 verbose_level - 2);
144 Mq = Aq->G.matrix_grp;
145 FREE_OBJECT(nice_gens);
146
147
148 cout << "action_by_subfield_structure::init "
149 "after Aq->init_matrix_group" << endl;
150
151 cout << "action_by_subfield_structure::init "
152 "creating subfield structure" << endl;
153
155
156 S->init(FQ, Fq, verbose_level);
157 cout << "action_by_subfield_structure::init "
158 "creating subfield structure done" << endl;
159
161 Mtx = NEW_int(m * m);
162
163}
164
166 actions::action &A, int *Elt, long int a, int verbose_level)
167{
168 int f_v = (verbose_level >= 1);
169 int f_vv = (verbose_level >= 2);
170 long int b;
171
172 if (f_v) {
173 cout << "action_by_subfield_structure::compute_image_int" << endl;
174 }
176 if (f_vv) {
177 cout << "action_by_subfield_structure::compute_image_int "
178 "a = " << a << " v1 = ";
179 Int_vec_print(cout, v1, m);
180 cout << endl;
181 }
182
183 compute_image_int_low_level(A, Elt, v1, v2, verbose_level);
184 if (f_vv) {
185 cout << " v2=v1 * A=";
186 Int_vec_print(cout, v2, m);
187 cout << endl;
188 }
189
191 if (f_v) {
192 cout << "action_by_subfield_structure::compute_image_int "
193 "done " << a << "->" << b << endl;
194 }
195 return b;
196}
197
199 actions::action &A, int *Elt, int *input, int *output,
200 int verbose_level)
201{
202 int *x = input;
203 int *xA = output;
204 int f_v = (verbose_level >= 1);
205 int f_vv = (verbose_level >= 2);
206 int i, j, a, b, c, d, I, J, u, v;
207
208 if (f_v) {
209 cout << "action_by_subfield_structure::compute_"
210 "image_int_low_level" << endl;
211 }
212 if (f_vv) {
213 cout << "subfield structure action: x=";
214 Int_vec_print(cout, x, m);
215 cout << endl;
216 }
217
218 for (i = 0; i < n; i++) {
219 for (j = 0; j < n; j++) {
220 a = Elt[i * n + j];
221 I = s * i;
222 J = s * j;
223 for (u = 0; u < s; u++) {
224 b = S->Basis[u];
225 c = FQ->mult(b, a);
226 for (v = 0; v < s; v++) {
227 d = S->components[c * s + v];
228 Mtx[(I + u) * m + J + v] = d;
229 }
230 }
231 }
232 }
233
235
236
237 if (f_vv) {
238 cout << "xA=";
239 Int_vec_print(cout, xA, m);
240 cout << endl;
241 }
242 if (MQ->f_semilinear) {
243 cout << "action_by_subfield_structure::compute_"
244 "image_int_low_level "
245 "cannot handle semilinear elements" << endl;
246 exit(1);
247#if 0
248 for (i = 0; i < m; i++) {
249 xA[i] = F->frobenius_power(xA[i], f);
250 }
251 if (f_vv) {
252 cout << "after " << f << " field automorphisms: xA=";
253 int_vec_print(cout, xA, m);
254 cout << endl;
255 }
256#endif
257 }
258 if (f_v) {
259 cout << "action_by_subfield_structure::compute_"
260 "image_int_low_level "
261 "done" << endl;
262 }
263}
264
265}}}
266
267
268
void PG_element_unrank_modified_lint(int *v, int stride, int len, long int a)
void PG_element_rank_modified_lint(int *v, int stride, int len, long int &a)
a finite field as a vector space over a subfield
void init(finite_field *FQ, finite_field *Fq, int verbose_level)
various functions related to geometries
Definition: geometry.h:721
void mult_vector_from_the_left(int *v, int *A, int *vA, int m, int n)
a permutation group in a fixed action.
Definition: actions.h:99
void init_projective_group(int n, field_theory::finite_field *F, int f_semilinear, int f_basis, int f_init_sims, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
long int compute_image_int(actions::action &A, int *Elt, long int a, int verbose_level)
void compute_image_int_low_level(actions::action &A, int *Elt, int *input, int *output, int verbose_level)
void init(actions::action &A, field_theory::finite_field *Fq, int verbose_level)
#define FREE_int(p)
Definition: foundations.h:640
#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 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