Algebraic Structures using SageMath
Applied Discrete Structures by Alan Doerr & Kenneth Levasseur is licensed under a Creative Commons Attribution - Noncommercial - No Derivative Works 3.0 United States License.
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python3.8/site-packages/smc_sagews/sage_server.py", line 1230, in execute
exec(
File "", line 1, in <module>
File "/cocalc/lib/python3.8/site-packages/smc_sagews/sage_salvus.py", line 4013, in displayhook
_system_sys_displayhook(obj)
File "sage/structure/sage_object.pyx", line 194, in sage.structure.sage_object.SageObject.__repr__ (build/cythonized/sage/structure/sage_object.c:2460)
result = reprfunc()
File "/ext/sage/sage-9.2/local/lib/python3.8/site-packages/sage/monoids/indexed_free_monoid.py", line 115, in _repr_
return scalar_mult.join(P._repr_generator(g) + exp(v) for g,v in monomial)
File "/ext/sage/sage-9.2/local/lib/python3.8/site-packages/sage/monoids/indexed_free_monoid.py", line 115, in <genexpr>
return scalar_mult.join(P._repr_generator(g) + exp(v) for g,v in monomial)
ValueError: not enough values to unpack (expected 2, got 1)
frozenset({'Unital', 'Associative'})
Abelian Groups
Most standard algebraic stuctures are built into SageMath. Some do require importing a packages such .
Multiplicative Abelian group isomorphic to C2 x C4
Multiplicative Abelian group isomorphic to C2 x C4
False
* 1 f1 f1^2 f1^3 f0 f0*f1 f0*f1^2 f0*f1^3
+----------------------------------------------------------------
1| 1 f1 f1^2 f1^3 f0 f0*f1 f0*f1^2 f0*f1^3
f1| f1 f1^2 f1^3 1 f0*f1 f0*f1^2 f0*f1^3 f0
f1^2| f1^2 f1^3 1 f1 f0*f1^2 f0*f1^3 f0 f0*f1
f1^3| f1^3 1 f1 f1^2 f0*f1^3 f0 f0*f1 f0*f1^2
f0| f0 f0*f1 f0*f1^2 f0*f1^3 1 f1 f1^2 f1^3
f0*f1| f0*f1 f0*f1^2 f0*f1^3 f0 f1 f1^2 f1^3 1
f0*f1^2| f0*f1^2 f0*f1^3 f0 f0*f1 f1^2 f1^3 1 f1
f0*f1^3| f0*f1^3 f0 f0*f1 f0*f1^2 f1^3 1 f1 f1^2
Modular Arithmetic
* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
+------------------------------------------------------
1| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
2| 2 4 6 8 10 12 14 16 18 1 3 5 7 9 11 13 15 17
3| 3 6 9 12 15 18 2 5 8 11 14 17 1 4 7 10 13 16
4| 4 8 12 16 1 5 9 13 17 2 6 10 14 18 3 7 11 15
5| 5 10 15 1 6 11 16 2 7 12 17 3 8 13 18 4 9 14
6| 6 12 18 5 11 17 4 10 16 3 9 15 2 8 14 1 7 13
7| 7 14 2 9 16 4 11 18 6 13 1 8 15 3 10 17 5 12
8| 8 16 5 13 2 10 18 7 15 4 12 1 9 17 6 14 3 11
9| 9 18 8 17 7 16 6 15 5 14 4 13 3 12 2 11 1 10
10| 10 1 11 2 12 3 13 4 14 5 15 6 16 7 17 8 18 9
11| 11 3 14 6 17 9 1 12 4 15 7 18 10 2 13 5 16 8
12| 12 5 17 10 3 15 8 1 13 6 18 11 4 16 9 2 14 7
13| 13 7 1 14 8 2 15 9 3 16 10 4 17 11 5 18 12 6
14| 14 9 4 18 13 8 3 17 12 7 2 16 11 6 1 15 10 5
15| 15 11 7 3 18 14 10 6 2 17 13 9 5 1 16 12 8 4
16| 16 13 10 7 4 1 17 14 11 8 5 2 18 15 12 9 6 3
17| 17 15 13 11 9 7 5 3 1 18 16 14 12 10 8 6 4 2
18| 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
['1', '5', '7', '11']
* 1 5 7 11
+------------
1| 1 5 7 11
5| 5 1 11 7
7| 7 11 1 5
11| 11 7 5 1
[3, 334]
1
(1, -173, 622)
(1, f, f^2, f^3, f^4, f^5, f^6, f^7, f^8, f^9, f^10, f^11, f^12, f^13)
1 has order 1
f has order 14
f^2 has order 7
f^3 has order 14
f^4 has order 7
f^5 has order 14
f^6 has order 7
f^7 has order 2
f^8 has order 7
f^9 has order 14
f^10 has order 7
f^11 has order 14
f^12 has order 7
f^13 has order 14
[(0, 0, 0), (1, 0, 0), (0, 1, 0), (1, 1, 0), (0, 0, 1), (1, 0, 1), (0, 1, 1), (1, 1, 1)]
False
Additive abelian group isomorphic to Z/23
Additive abelian group isomorphic to Z/2 + Z/4
+ (0, 0) (0, 1) (0, 2) (0, 3) (1, 0) (1, 1) (1, 2) (1, 3)
+--------------------------------------------------------
(0, 0)| (0, 0) (0, 1) (0, 2) (0, 3) (1, 0) (1, 1) (1, 2) (1, 3)
(0, 1)| (0, 1) (0, 2) (0, 3) (0, 0) (1, 1) (1, 2) (1, 3) (1, 0)
(0, 2)| (0, 2) (0, 3) (0, 0) (0, 1) (1, 2) (1, 3) (1, 0) (1, 1)
(0, 3)| (0, 3) (0, 0) (0, 1) (0, 2) (1, 3) (1, 0) (1, 1) (1, 2)
(1, 0)| (1, 0) (1, 1) (1, 2) (1, 3) (0, 0) (0, 1) (0, 2) (0, 3)
(1, 1)| (1, 1) (1, 2) (1, 3) (1, 0) (0, 1) (0, 2) (0, 3) (0, 0)
(1, 2)| (1, 2) (1, 3) (1, 0) (1, 1) (0, 2) (0, 3) (0, 0) (0, 1)
(1, 3)| (1, 3) (1, 0) (1, 1) (1, 2) (0, 3) (0, 0) (0, 1) (0, 2)
False
23692
(8, 1, 0)
[(30, 22, 12), (30, 22, 12)]
(12, 13, 17)
2092
[2092, 0]
21600
0
[7425, 6400, 7776]
[(), (1,2), (1,2,3), (1,3,2), (2,3), (1,3)]
* a b c d e f g h
+----------------
a| a b c d e f g h
b| b a d c f e h g
c| c g a e d h b f
d| d h b f c g a e
e| e f g h a b c d
f| f e h g b a d c
g| g c e a h d f b
h| h d f b g c e a
[(), (1,5,4,3,2), (1,4,2,5,3), (1,3,5,2,4), (1,2,3,4,5), (2,5)(3,4), (1,5)(2,4), (1,4)(2,3), (1,3)(4,5), (1,2)(3,5)]