@@ -1126,8 +1126,11 @@ def _add_(self, other):
1126
1126
sage: I = E + O # indirect doctest
1127
1127
sage: I
1128
1128
2-regular sequence 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1129
- sage: I.mu[0], I.mu[1], I.left, I.right
1130
- ([1], [1], (1), (1))
1129
+ sage: I.linear_representation()
1130
+ ((1),
1131
+ Finite family {0: [1],
1132
+ 1: [1]},
1133
+ (1))
1131
1134
"""
1132
1135
from sage .modules .free_module_element import vector
1133
1136
P = self .parent ()
@@ -1183,11 +1186,13 @@ def _rmul_(self, other):
1183
1186
sage: M = E * 2 # indirect doctest
1184
1187
sage: M
1185
1188
2-regular sequence 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, ...
1186
- sage: M.mu[0], M.mu[1], M.left, M.right
1187
- (
1188
- [0 1] [0 0]
1189
- [0 1], [0 1], (1, 0), (2, 2)
1190
- )
1189
+ sage: M.linear_representation()
1190
+ ((1, 0),
1191
+ Finite family {0: [0 1]
1192
+ [0 1],
1193
+ 1: [0 0]
1194
+ [0 1]},
1195
+ (2, 2))
1191
1196
"""
1192
1197
P = self .parent ()
1193
1198
return P .element_class (P , self .mu , self .left , self .right * other )
@@ -1275,41 +1280,53 @@ def hadamard_product(self, other):
1275
1280
sage: CE = C.hadamard_product(E)
1276
1281
sage: CE
1277
1282
2-regular sequence 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, ...
1278
- sage: CE.mu[0], CE.mu[1], CE.left, CE.right
1279
- (
1280
- [0 1 0] [ 0 0 0]
1281
- [0 2 0] [ 0 0 1]
1282
- [0 2 1], [ 0 -2 3], (1, 0, 0), (0, 0, 2)
1283
- )
1283
+ sage: CE.linear_representation()
1284
+ ((1, 0, 0),
1285
+ Finite family {0: [0 1 0]
1286
+ [0 2 0]
1287
+ [0 2 1],
1288
+ 1: [ 0 0 0]
1289
+ [ 0 0 1]
1290
+ [ 0 -2 3]},
1291
+ (0, 0, 2))
1284
1292
1285
1293
sage: Z = E.hadamard_product(O)
1286
1294
sage: Z
1287
1295
2-regular sequence 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1288
- sage: Z.mu[0], Z.mu[1], Z.left, Z.right
1289
- ([], [], (), ())
1296
+ sage: Z.linear_representation()
1297
+ ((),
1298
+ Finite family {0: [],
1299
+ 1: []},
1300
+ ())
1290
1301
1291
1302
TESTS::
1292
1303
1293
1304
sage: EC = E.hadamard_product(C, minimize=False)
1294
1305
sage: EC
1295
1306
2-regular sequence 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, ...
1296
- sage: EC.mu[0], EC.mu[1], EC.left, EC.right
1297
- (
1298
- [0 0 2 0] [ 0 0 0 0]
1299
- [0 0 2 1] [ 0 0 0 0]
1300
- [0 0 2 0] [ 0 0 0 1]
1301
- [0 0 2 1], [ 0 0 -2 3], (1, 0, 0, 0), (0, 1, 0, 1)
1302
- )
1307
+ sage: EC.linear_representation()
1308
+ ((1, 0, 0, 0),
1309
+ Finite family {0: [0 0 2 0]
1310
+ [0 0 2 1]
1311
+ [0 0 2 0]
1312
+ [0 0 2 1],
1313
+ 1: [ 0 0 0 0]
1314
+ [ 0 0 0 0]
1315
+ [ 0 0 0 1]
1316
+ [ 0 0 -2 3]},
1317
+ (0, 1, 0, 1))
1303
1318
sage: MEC = EC.minimized()
1304
1319
sage: MEC
1305
1320
2-regular sequence 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, ...
1306
- sage: MEC.mu[0], MEC.mu[1], MEC.left, MEC.right
1307
- (
1308
- [0 1 0] [ 0 0 0]
1309
- [0 2 0] [ 0 0 1]
1310
- [0 2 1], [ 0 -2 3], (1, 0, 0), (0, 0, 2)
1311
- )
1312
-
1321
+ sage: MEC.linear_representation()
1322
+ ((1, 0, 0),
1323
+ Finite family {0: [0 1 0]
1324
+ [0 2 0]
1325
+ [0 2 1],
1326
+ 1: [ 0 0 0]
1327
+ [ 0 0 1]
1328
+ [ 0 -2 3]},
1329
+ (0, 0, 2))
1313
1330
"""
1314
1331
from sage .matrix .constructor import Matrix
1315
1332
from sage .modules .free_module_element import vector
0 commit comments