Hello,

I'm interested in moving theĀ _nth_root_common method in FiniteRingElement in src/sage/rings/finite_rings/element_base.pyx to the FiniteFields category's ElementMethods. This would enable Sage to take nth roots in a finite field constructed by quotienting a ring of polynomials over a finite field by an irreducible polynomial, and also get a bit closer to eventually having all finite field stuff in the same part of the codebase rather than split between src/sage/rings/finite_rings and src/sage/categories.

I think this should be a pretty straightforward change to make, but I have some questions since _nth_root_common is written in Cython and there seems to be very little use of Cython currently in src/sage/categories.

1. Are there any technical limitations or restrictions on using Cython
   methods in the category framework? In
   
https://doc.sagemath.org/html/en/reference/structure/sage/structure/dynamic_class.html
   there's a mention of possible issues with Cython and dynamic
   classes, but it's not clear to me what the implications of that are.
2. At least of the categories I've looked at (mainly FiniteFields and
   related categories), it doesn't look like we've implemented many
   computationally difficult functions in ElementMethods. Is there a
   technical reason for this or it it just that nobody's gotten around
   to doing this work yet?
3. Is there any benefit to having _nth_root_common implemented in
   src/sage/rings/finite_rings/element_base.pyx rather than making a
   new file such as src/sage/categories/finite_field_elements.pyx and
   moving it there?
4. Any other advice/warnings before I look into this further?

--
Vincent Macri (he/him)

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/f140de39-c4fc-4f6e-a5aa-fe6cd79ebd23%40ucalgary.ca.

Reply via email to