In one example of Sage math (search for octahedral
) there is this line:
K.<v> = sage.groups.matrix_gps.finitely_generated.CyclotomicField(10)
What does this .<v>
do?
SageMath code is not Python, albeit very similar. The syntax
A.<b> = C(d, e, f)
in SageMath is roughly equivalent to the following Python code
A = C(d, e, f, names=('b',))
b = A.gen()
I.e., first the parent ring A
is created, with generator named 'b'
, then a variable b
is initialized to the generator of A
.
You can see what any SageMath statement is translated to using the function preparse()
:
sage: preparse('A.<b> = C(d, e, f)')
"A = C(d, e, f, names=('b',)); (b,) = A._first_ngens(1)"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With