@@ -346,7 +346,7 @@ def __init__(self, data, domain=None, codomain=None):
346
346
The image of a letter can be a set, but the order is not
347
347
preserved::
348
348
349
- sage: WordMorphism({2:[4,5,6],3:set([4,1,8])}) # random results
349
+ sage: WordMorphism({2:[4,5,6],3:set([4,1,8])}) # random results
350
350
WordMorphism: 2->456, 3->814
351
351
352
352
If the image of a letter is not iterable, it is considered as a
@@ -1099,23 +1099,24 @@ def _matrix_(self, R=None):
1099
1099
1100
1100
EXAMPLES::
1101
1101
1102
+ sage: # needs sage.modules
1102
1103
sage: fibo = WordMorphism('a->ab,b->a')
1103
1104
sage: tm = WordMorphism('a->ab,b->ba')
1104
- sage: Mfibo = matrix(fibo); Mfibo # indirect doctest # needs sage.modules
1105
+ sage: Mfibo = matrix(fibo); Mfibo # indirect doctest
1105
1106
[1 1]
1106
1107
[1 0]
1107
- sage: Mtm = matrix(tm); Mtm # needs sage.modules
1108
+ sage: Mtm = matrix(tm); Mtm
1108
1109
[1 1]
1109
1110
[1 1]
1110
- sage: Mtm * Mfibo == matrix(tm*fibo) # indirect doctest # needs sage.modules
1111
+ sage: Mtm * Mfibo == matrix(tm*fibo) # indirect doctest
1111
1112
True
1112
- sage: Mfibo * Mtm == matrix(fibo*tm) # indirect doctest # needs sage.modules
1113
+ sage: Mfibo * Mtm == matrix(fibo*tm) # indirect doctest
1113
1114
True
1114
- sage: Mfibo.parent() # needs sage.modules
1115
+ sage: Mfibo.parent()
1115
1116
Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
1116
- sage: p = Mfibo.charpoly(); p # needs sage.modules
1117
+ sage: p = Mfibo.charpoly(); p
1117
1118
x^2 - x - 1
1118
- sage: p.roots(ring=RR, multiplicities=False) # needs sage.modules
1119
+ sage: p.roots(ring=RR, multiplicities=False)
1119
1120
[-0.618033988749895, 1.61803398874989]
1120
1121
"""
1121
1122
if R is None :
@@ -1406,19 +1407,19 @@ def partition_of_domain_alphabet(self):
1406
1407
EXAMPLES::
1407
1408
1408
1409
sage: m = WordMorphism('a->b,b->a')
1409
- sage: m.partition_of_domain_alphabet() # random ordering
1410
+ sage: m.partition_of_domain_alphabet() # random ordering
1410
1411
({'a'}, {'b'}, {})
1411
1412
sage: m = WordMorphism('a->b,b->a,c->c')
1412
- sage: m.partition_of_domain_alphabet() # random ordering
1413
+ sage: m.partition_of_domain_alphabet() # random ordering
1413
1414
({'a'}, {'b'}, {'c'})
1414
1415
sage: m = WordMorphism('a->a,b->b,c->c')
1415
- sage: m.partition_of_domain_alphabet() # random ordering
1416
+ sage: m.partition_of_domain_alphabet() # random ordering
1416
1417
({}, {}, {'a', 'c', 'b'})
1417
1418
sage: m = WordMorphism('A->T,T->A,C->G,G->C')
1418
- sage: m.partition_of_domain_alphabet() # random ordering
1419
+ sage: m.partition_of_domain_alphabet() # random ordering
1419
1420
({'A', 'C'}, {'T', 'G'}, {})
1420
1421
sage: I = WordMorphism({0:oo,oo:0,1:-1,-1:1,2:-2,-2:2,3:-3,-3:3})
1421
- sage: I.partition_of_domain_alphabet() # random ordering
1422
+ sage: I.partition_of_domain_alphabet() # random ordering
1422
1423
({0, -1, -3, -2}, {1, 2, 3, +Infinity}, {})
1423
1424
1424
1425
TESTS::
0 commit comments