flatsurf / sage-flatsurf

Flat surfaces in Sage
https://flatsurf.github.io/sage-flatsurf/
GNU General Public License v2.0
10 stars 10 forks source link

Make SimilaritySurface a unique SageMath parent #148

Open saraedum opened 2 years ago

saraedum commented 2 years ago

Currently, a SimilaritySurface (and its subclasses) is not a (unique) SageMath parent but a (possibly mutable) SageObject.

As a result, some of the SageMath machinery, e.g., categories, is not accessible to such a surface. Furthermore, mutability means that we have trouble to use caching on such a surface, see e.g., #97. Note that currently even immutable surfaces are effectively mutable since their graphical_surface() is mutable which makes it harder to use surfaces in caches. Not being a parent means that we cannot define SageMath maps between such surfaces. The lack of uniqueness complicates pickling and also goes a bit against the SageMath philosophy where all parent objects are unique & immutable.

To make similarity surfaces unique parents, several things need to change: