You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on the implementation of matrix spaces and matrices over semirings. I encountered an issue when attempting to use the code that returns the category Algebras(NN.category()) The code resulted in an error, as it seems that the current implimentation of Algebra is only meant for rings and not for semirings.
We would need to change the implementation of the parent to allow for a different category. A lot of parents have category=None as a keyword argument, which lets you set the category manually and chooses a reasonable default if you don't.
In practice, this is going to make it a bit difficult, since we'll need to edit the sage source code to get it work.
Alternatives Considered
We can set a new argument, structure, in the Algebras() class, which will have a default value of a ring. Based on this structure argument, it chooses which category with axiom to inherit.
This will solve the issue with less code modification but i am not sure, if this is the correct way to approach the problem?
Is there an existing issue for this?
I have searched the existing issues for a bug report that matches the one I want to file, without success.
The text was updated successfully, but these errors were encountered:
amanmoon
changed the title
Extend Categories.Algebra over Semirings
Extend Categories.Algebra over Semirings need suggestionsMar 11, 2024
amanmoon
changed the title
Extend Categories.Algebra over Semirings need suggestions
Extend Categories.Algebra over Semirings need suggestionMar 11, 2024
Problem Description
I am currently working on the implementation of matrix spaces and matrices over semirings. I encountered an issue when attempting to use the code that returns the category
Algebras(NN.category())
The code resulted in an error, as it seems that the current implimentation ofAlgebra
is only meant for rings and not for semirings.Proposed Solution
As suggested by David Roe here
We would need to change the implementation of the parent to allow for a different category. A lot of parents have category=None as a keyword argument, which lets you set the category manually and chooses a reasonable default if you don't.
In practice, this is going to make it a bit difficult, since we'll need to edit the sage source code to get it work.
Alternatives Considered
We can set a new argument,
structure
, in theAlgebras()
class, which will have a default value of a ring. Based on this structure argument, it chooses which category with axiom to inherit.This will solve the issue with less code modification but i am not sure, if this is the correct way to approach the problem?
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: