@@ -433,11 +433,13 @@ def regenerated(self, **kwds):
433
433
sage: H = S.regenerated()
434
434
sage: H
435
435
2-regular sequence 1, 3, 6, 9, 12, 18, 18, 27, 24, 36, ...
436
- sage: H.mu[0], H.mu[1], H.left, H.right
437
- (
438
- [ 0 1] [3 0]
439
- [-2 3], [6 0], (1, 0), (1, 1)
440
- )
436
+ sage: H.linear_representation()
437
+ ((1, 0),
438
+ Finite family {0: [ 0 1]
439
+ [-2 3],
440
+ 1: [3 0]
441
+ [6 0]},
442
+ (1, 1))
441
443
sage: H.is_degenerated()
442
444
False
443
445
@@ -446,11 +448,15 @@ def regenerated(self, **kwds):
446
448
sage: S = Seq2((Matrix([2]), Matrix([3])), vector([1]), vector([1]),
447
449
....: allow_degenerated_sequence=True)
448
450
sage: H = S.regenerated(minimize=False)
449
- sage: H.mu[0], H.mu[1], H.left, H.right
450
- (
451
- [1 0] [0 0]
452
- [0 2], [3 3], (1, 1), (1, 0)
453
- )
451
+ sage: H.linear_representation()
452
+ ((1, 1),
453
+ Finite family {0: [1|0]
454
+ [-+-]
455
+ [0|2],
456
+ 1: [0|0]
457
+ [-+-]
458
+ [3|3]},
459
+ (1, 0))
454
460
sage: H.is_degenerated()
455
461
False
456
462
"""
@@ -490,6 +496,7 @@ def _regenerated_(self):
490
496
sage: C.regenerated() is C # indirect doctest
491
497
True
492
498
"""
499
+ from sage .matrix .constructor import Matrix
493
500
from sage .matrix .special import zero_matrix , identity_matrix
494
501
from sage .modules .free_module_element import vector
495
502
@@ -500,8 +507,8 @@ def _regenerated_(self):
500
507
501
508
itA = iter (P .alphabet ())
502
509
z = next (itA )
503
- mu = {z : I . augment ( Z ). stack ( Z . augment ( self .mu [z ]) )}
504
- mu .update ((r , Z . augment ( Z ). stack ( self .mu [r ]. augment ( self .mu [r ]) ))
510
+ mu = {z : Matrix . block ([[ I , Z ], [ Z , self .mu [z ]]] )}
511
+ mu .update ((r , Matrix . block ([[ Z , Z ], [ self .mu [r ], self .mu [r ]]] ))
505
512
for r in itA )
506
513
507
514
return P .element_class (
0 commit comments