morphism
#
Morphisms between Surfaces
Note
Typically, morphisms are actual maps between surfaces that preserve the structure of the surface. In this case, such morphisms live in the appropriate category. However, sometimes, morphisms are not meaningful on the points of a surface but just on homology say.
We aim to encode this in the category of the morphism to some extent. For example, a morphism in the category of translation surfaces, is preserving the structure of a translation surface. A morphism in the category of objects, on the other hand, is not preserving any structure of a topological space but just meaningful in some other context.
Note
Our morphism infrastructure contains quite a few workarounds to make the SageMath machinery work. The fundamental problem that we are facing is that our parents (surfaces) are not unique representations. However, surfaces do implement equality if they are indistinguishable (and this is a good idea to make pickling work). SageMath has the assumption that if S == T (which in SageMath normally implies S is T) that then Hom(S) is Hom(T). We could implement this, but then Hom(T).domain() is not T but S. Instead, we opted for tricking the coercion machinery into allowing our non-unique homsets. Namely, when comparing morphisms, we do not coerce them into a common parent first but compare them directly.
EXAMPLES:
We can use morphisms to follow a surface through a retriangulation process:
sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.regular_octagon()
sage: morphism = S.subdivide_edges(3)
sage: morphism = morphism.codomain().triangulate() * morphism
sage: T = morphism.codomain()
sage: morphism
Composite morphism:
From: Translation Surface in H_2(2) built from a regular octagon
To: Triangulation of Translation Surface in H_2(2, 0^8) built from a regular octagon with 16 marked vertices
Defn: Edge-Subdivision morphism:
From: Translation Surface in H_2(2) built from a regular octagon
To: Translation Surface in H_2(2, 0^8) built from a regular octagon with 16 marked vertices
then Triangulation morphism:
From: Translation Surface in H_2(2, 0^8) built from a regular octagon with 16 marked vertices
To: Triangulation of Translation Surface in H_2(2, 0^8) built from a regular octagon with 16 marked vertices
We can then map points through the morphism:
sage: p = S(0, (0, 0))
sage: p
Vertex 0 of polygon 0
sage: q = morphism(p)
sage: q
Vertex 0 of polygon (0, 10)
A non-singular point:
sage: p = S(0, (1, 1))
sage: p
Point (1, 1) of polygon 0
sage: q = morphism(p)
sage: q
Point (1, 1) of polygon (0, 7)
- class flatsurf.geometry.morphism.CompositionMorphism(parent, lhs, rhs)[source]#
The formal composition of two morphisms between surfaces.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.regular_octagon() sage: f = S.triangulate() sage: T = f.codomain() sage: g = T.delaunay_triangulate() sage: composition = g * f sage: composition Composite morphism: From: Translation Surface in H_2(2) built from a regular octagon To: Delaunay triangulation of Triangulation of Translation Surface in H_2(2) built from a regular octagon Defn: Triangulation morphism: From: Translation Surface in H_2(2) built from a regular octagon To: Triangulation of Translation Surface in H_2(2) built from a regular octagon then Delaunay triangulation morphism: From: Triangulation of Translation Surface in H_2(2) built from a regular octagon To: Delaunay triangulation of Triangulation of Translation Surface in H_2(2) built from a regular octagon
- section()[source]#
Return a section of this morphism.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.regular_octagon() sage: f = S.triangulate() sage: T = f.codomain() sage: g = T.delaunay_triangulate() sage: h = g * f sage: h.section() Composite morphism: From: Delaunay triangulation of Triangulation of Translation Surface in H_2(2) built from a regular octagon To: Translation Surface in H_2(2) built from a regular octagon Defn: Section morphism: From: Delaunay triangulation of Triangulation of Translation Surface in H_2(2) built from a regular octagon To: Triangulation of Translation Surface in H_2(2) built from a regular octagon Defn: Section of Delaunay triangulation morphism: From: Triangulation of Translation Surface in H_2(2) built from a regular octagon To: Delaunay triangulation of Triangulation of Translation Surface in H_2(2) built from a regular octagon then Section morphism: From: Triangulation of Translation Surface in H_2(2) built from a regular octagon To: Translation Surface in H_2(2) built from a regular octagon Defn: Section of Triangulation morphism: From: Translation Surface in H_2(2) built from a regular octagon To: Triangulation of Translation Surface in H_2(2) built from a regular octagon
- class flatsurf.geometry.morphism.DelaunayDecompositionIsomorphism[source]#
An isomorphism between Delaunay decompositions.
Note
This method relies on pyflatsurf to figure out the isomorphism when
_factorization()
is called. This is not aNamedFactorizationMorphism
since the factorization is not pickleable currently. This is not a very pretty solution since the exact chosen isomorphism is now an implementation detail that could change between different versions of libflatsurf.EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: T = S.relabel({0: 1}) sage: isomorphism = S.delaunay_decompose(codomain=T)._factorization() # optional: pyflatsurf # random output due to cppyy deprecation warnings sage: isomorphism # optional: pyflatsurf Delaunay decomposition morphism: From: Translation Surface in H_1(0) built from a square To: Translation Surface in H_1(0) built from a square
- _factorization()[source]#
Return the sequence of morphism that implement this isomorphism.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: T = S.relabel({0: 1}) sage: isomorphism = S.delaunay_decompose(codomain=T)._factorization() # optional: pyflatsurf sage: isomorphism._factorization() # optional: pyflatsurf Composite morphism: From: Translation Surface in H_1(0) built from a square To: Translation Surface in H_1(0) built from a square Defn: Triangulation morphism: From: Translation Surface in H_1(0) built from a square To: Triangulation of Translation Surface in H_1(0) built from a square then pyflatsurf conversion morphism: From: Triangulation of Translation Surface in H_1(0) built from a square To: Surface backed by FlatTriangulationCombinatorial... then pyflatsurf deformation morphism: From: Surface backed by FlatTriangulationCombinatorial... To: Surface backed by FlatTriangulationCombinatorial... Defn: ... then pyflatsurf reconversion morphism: From: Surface backed by FlatTriangulationCombinatorial... To: Triangulation of Translation Surface in H_1(0) built from a square then Section morphism: From: Triangulation of Translation Surface in H_1(0) built from a square To: Translation Surface in H_1(0) built from a square Defn: Section of Triangulation morphism: From: Translation Surface in H_1(0) built from a square To: Triangulation of Translation Surface in H_1(0) built from a square
- class flatsurf.geometry.morphism.DelaunayDecompositionMorphism(parent, morphism)[source]#
A morphism describing the Delaunay decomposition of a Delaunay triangulation.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.delaunay_decompose()._factorization()._morphisms[1] sage: f Delaunay decomposition morphism: From: Delaunay triangulation of Translation Surface in H_1(0) built from a square To: Delaunay cell decomposition of Translation Surface in H_1(0) built from a square Defn: Section of Triangulation morphism: From: Delaunay cell decomposition of Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square
This morphism is implemented as the formal section of a triangulation morphism:
sage: f.section() Triangulation morphism: From: Delaunay cell decomposition of Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square
- class flatsurf.geometry.morphism.DelaunayTriangulationMorphism[source]#
A morphism from a triangulated surface to its Delaunay triangulation.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.delaunay_triangulate()._factorization()._morphisms[1] sage: f Delaunay retriangulation morphism: From: Triangulation of Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square
- class flatsurf.geometry.morphism.DelaunayTriangulationMorphism_delaunay_decomposition[source]#
A triangulation that maps a a Delaunay decomposition into the Delaunay triangulation from which it was created.
This morphism is used internally in
delaunay_decompose()
, the actual delaunay decomposition, is the inverse of this morphism.EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.delaunay_decompose()._factorization()._morphisms[1].section() sage: f Triangulation morphism: From: Delaunay cell decomposition of Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square
- class flatsurf.geometry.morphism.GL2RMorphism(parent, m)[source]#
A morphism that describes the application of a matrix in GL_2(mathbb{R}) on each polygon of a surface.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.apply_matrix(matrix([[1, 2], [0, 1]]), in_place=False) sage: f Linear morphism: From: Translation Surface in H_1(0) built from a square To: Translation Surface in H_1(0) built from a quadrilateral Defn: [1 2] [0 1]
See also
flatsurf.geometry.categories.similarity_surfaces.SimilaritySurfaces.ParentMethods.apply_matrix()
- section()[source]#
Return an inverse of this morphism.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.apply_matrix(matrix([[1, 2], [0, 1]]), in_place=False) sage: f.section() Linear morphism: From: Translation Surface in H_1(0) built from a quadrilateral To: Translation Surface in H_1(0) built from a square Defn: [ 1 -2] [ 0 1]
- class flatsurf.geometry.morphism.IdentityMorphism(parent)[source]#
The identity morphism from a surface to itself.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.mcmullen_L(1, 1, 1, 1) sage: identity = End(S).identity() sage: identity Identity endomorphism of Translation Surface in H_2(2) built from 3 squares
- class flatsurf.geometry.morphism.MorphismSpace(X, Y, category=None, base=None, check=True)[source]#
A set of morphisms between structures attached to surfaces.
This is a base class for surface morphisms but also for other structures such as morphisms in homology.
Note
Since surfaces are not unique parents, we need to override some functionality of the SageMath Homset here to make pickling work correctly.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.mcmullen_L(1, 1, 1, 1) sage: triangulation = S.triangulate() sage: homset = triangulation.parent() sage: homset Surface Morphisms from Translation Surface in H_2(2) built from 3 squares to Triangulation of Translation Surface in H_2(2) built from 3 squares
- base_ring()[source]#
Return the base ring of this morphism space.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.mcmullen_L(1, 1, 1, 1) sage: S.triangulate().base_ring() Rational Field
- identity()[source]#
Return the identical morphism from the domain to the codomain of this space.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.mcmullen_L(1, 1, 1, 1) sage: End(S).identity() Identity endomorphism of Translation Surface in H_2(2) built from 3 squares
- class flatsurf.geometry.morphism.NamedFactorizationMorphism(parent, name, factorization)[source]#
A morphism that is implement by another morphism but has a more appealing name when printing.
This is commonly used when implementing new morphisms that rely on a sequence of existing morphisms while providing a nice interface to the user of sage-flatsurf.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.triangulate() sage: g = f.codomain().apply_matrix(matrix([[1, 2], [0, 1]]), in_place=False) sage: from flatsurf.geometry.morphism import NamedFactorizationMorphism sage: h = NamedFactorizationMorphism._create_morphism(S, g.codomain(), "Foo", g * f) sage: h Foo morphism: From: Translation Surface in H_1(0) built from a square To: Translation Surface in H_1(0) built from 2 triangles
- _factorization()[source]#
Return the morphism underlying this morphism.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.triangulate() sage: g = f.codomain().apply_matrix(matrix([[1, 2], [0, 1]]), in_place=False) sage: from flatsurf.geometry.morphism import NamedFactorizationMorphism sage: h = NamedFactorizationMorphism._create_morphism(S, g.codomain(), "Foo", g * f) sage: h._factorization() Composite morphism: From: Translation Surface in H_1(0) built from a square To: Translation Surface in H_1(0) built from 2 triangles Defn: Triangulation morphism: From: Translation Surface in H_1(0) built from a square To: Triangulation of Translation Surface in H_1(0) built from a square then Linear morphism: From: Triangulation of Translation Surface in H_1(0) built from a square To: Translation Surface in H_1(0) built from 2 triangles Defn: [1 2] [0 1]
- class flatsurf.geometry.morphism.NamedUnknownMorphism(parent, name)[source]#
A morphism that is not functional, typically a placeholder for functionality that has not been implemented yet.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = MutableOrientedSimilaritySurface.from_surface(translation_surfaces.square_torus()) sage: f = S.triangulate() sage: f Triangulation morphism: From: Unknown Surface To: Triangulation of Translation Surface in H_1(0) built from a square
- class flatsurf.geometry.morphism.SectionMorphism(parent, morphism)[source]#
The formal section of a morphism.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.regular_octagon() sage: morphism = S.subdivide_edges(2) sage: section = morphism.section() sage: section Section morphism: From: Translation Surface in H_2(2, 0^4) built from a regular octagon with 8 marked vertices To: Translation Surface in H_2(2) built from a regular octagon Defn: Section of Edge-Subdivision morphism: From: Translation Surface in H_2(2) built from a regular octagon To: Translation Surface in H_2(2, 0^4) built from a regular octagon with 8 marked vertices
- class flatsurf.geometry.morphism.SubdivideEdgesMorphism(parent, parts)[source]#
A morphism that inserts marked points on edges.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.subdivide_edges() sage: f Edge-Subdivision morphism: From: Translation Surface in H_1(0) built from a square To: Translation Surface in H_1(0^3) built from a square
- class flatsurf.geometry.morphism.SurfaceMorphism[source]#
Abstract base class for all morphisms that map from a
domain
surface to acodomain
surface.INPUT:
domain
– a surface orNone
; ifNone
(or if the domain is mutable), the domain is replaced with theUnknownSurface
which means that almost all queries related to the domain are going to fail.codomain
– a surface orNone
; ifNone
(or if the codomain is mutable), the codomain is replaced with theUnknownSurface
which means that almost all queries related to the codomain are going to fail.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: morphism = S.apply_matrix(matrix([[2, 0], [0, 1]]), in_place=False) sage: morphism.domain() Translation Surface in H_1(0) built from a square sage: morphism.codomain() Translation Surface in H_1(0) built from a rectangle
- section()[source]#
Return a section of this morphism from its codomain to its domain.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: morphism = S.apply_matrix(matrix([[2, 0], [0, 1]]), in_place=False) sage: morphism.section() Linear morphism: From: Translation Surface in H_1(0) built from a rectangle To: Translation Surface in H_1(0) built from a square Defn: [1/2 0] [ 0 1]
- class flatsurf.geometry.morphism.SurfaceMorphismSpace(X, Y, category=None, base=None, check=True)[source]#
The set of morphisms from surface
domain
to surfacecodomain
.Note
Since surfaces are not unique parents, we need to override some functionality of the SageMath Homset here to make pickling work correctly.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.mcmullen_L(1, 1, 1, 1) sage: identity = End(S).identity() sage: endset = identity.parent() sage: endset Surface Endomorphisms of Translation Surface in H_2(2) built from 3 squares
- identity()[source]#
Return the identical morphism from the domain to the codomain of this space.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.mcmullen_L(1, 1, 1, 1) sage: End(S).identity() Identity endomorphism of Translation Surface in H_2(2) built from 3 squares
- class flatsurf.geometry.morphism.SurfaceMorphism_factorization[source]#
A morphism between surfaces that is backed by another morphism, usually a
CompositionMorphism
.EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.delaunay_triangulate() sage: f Delaunay triangulation morphism: From: Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square sage: f._factorization() Composite morphism: From: Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square Defn: Triangulation morphism: From: Translation Surface in H_1(0) built from a square To: Triangulation of Translation Surface in H_1(0) built from a square then Delaunay retriangulation morphism: From: Triangulation of Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square
- _factorization()[source]#
Return the morphism underlying this morphism.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.delaunay_triangulate() sage: f._factorization() Composite morphism: From: Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square Defn: Triangulation morphism: From: Translation Surface in H_1(0) built from a square To: Triangulation of Translation Surface in H_1(0) built from a square then Delaunay retriangulation morphism: From: Triangulation of Translation Surface in H_1(0) built from a square To: Delaunay triangulation of Translation Surface in H_1(0) built from a square
- class flatsurf.geometry.morphism.TriangulationMorphism_LazyTriangulatedSurface[source]#
A triangulation that maps a surface into a class
LazyTriangulatedSurface
.EXAMPLES:
sage: from flatsurf import translation_surfaces sage: S = translation_surfaces.square_torus() sage: f = S.triangulate() sage: f Triangulation morphism: From: Translation Surface in H_1(0) built from a square To: Triangulation of Translation Surface in H_1(0) built from a square
- class flatsurf.geometry.morphism.TriangulationMorphism_base[source]#
Abstract base class for morphisms from a surface to its triangulation.
EXAMPLES:
sage: from flatsurf import translation_surfaces sage: G = SymmetricGroup(4) sage: S = translation_surfaces.origami(G('(1,2,3,4)'), G('(1,4,2,3)')) sage: f = S.triangulate() sage: f Triangulation morphism: From: Origami defined by r=(1,2,3,4) and u=(1,4,2,3) To: Triangulation of Origami defined by r=(1,2,3,4) and u=(1,4,2,3)
- class flatsurf.geometry.morphism.UnknownRing[source]#
A placeholder for a SageMath ring that has been lost in the process of creating a morphism.
Ideally, every morphism has a domain and a codomain. However, when migrating code that did not produce a morphism originally, it can be complicated to get a hold of the actual domain/codomain of a morphism.
Instead, it is often convenient to set the domain/codomain to
None
, i.e., stating that the domain/codomain is unknown. When this happens, also the ring over which the domain/codomain is defined is technically unknown. We use this placeholder ring in these situations since a surface requires a ring it is defined over.This ring provides no functionality other than being in the category of rings.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: triangulation = S.triangulate(in_place=True) doctest:warning ... UserWarning: in-place triangulation has been deprecated and the in_place keyword argument will be removed from triangulate() in a future version of sage-flatsurf sage: triangulation.domain() Unknown Surface sage: triangulation.domain().base_ring() The Unknown Ring
- class flatsurf.geometry.morphism.UnknownSurface(base, category=None)[source]#
A placeholder surface for a morphism’s domain or codomain when that codomain is unknown or mutable.
In SageMath a morphism must have an explicit domain and codomain. However, the domain of a morphism might not actually be known, for example when deforming a mutable surface, or exposing it might break things when it is mutable.
In such cases, we replace the domain with this unknown surface which has no functionality other than being a surface.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: S Translation Surface built from a square sage: triangulation = S.triangulate() sage: triangulation.domain() Unknown Surface sage: triangulation.codomain() Triangulation of Translation Surface in H_1(0) built from a square
- is_compact()[source]#
Return whether this surface is compact as a topological space.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: S = S.triangulate(in_place=False).domain() sage: S.is_compact() True
- is_finite_type()[source]#
Return whether this surface is built from a finite number of polygons.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: S = S.triangulate(in_place=False).domain() sage: S.is_finite_type() True
- is_mutable()[source]#
Return whether this surface can be mutated.
Since nothing about this surface can be changed, we return that it is immutable.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: S = S.triangulate(in_place=False).domain() sage: S.is_mutable() False
- is_with_boundary()[source]#
Return whether this surface has a boundary of unglued edges.
Since we do not record whether this unknown surface stands in for a surface that has a boundary, we throw an error.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: S = S.triangulate(in_place=False).domain() sage: S.is_with_boundary() Traceback (most recent call last): ... NotImplementedError: cannot determine whether an unknown surface has boundary
- opposite_edge(label, edge)[source]#
Return the edge that is glued to the
edge
of the polygon withlabel
.Since we do not know anything about the gluings of this surface, we throw an error.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: S = S.triangulate(in_place=False).domain() sage: S.opposite_edge(0, 0) Traceback (most recent call last): ... NotImplementedError: cannot determine how the unknown surface is glued
- polygon(label)[source]#
Return the polygon with
label
.Since we do not know the polygons that make up this surface, we throw an error.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: S = S.triangulate(in_place=False).domain() sage: S.polygon(0) Traceback (most recent call last): ... NotImplementedError: cannot determine polygons of the unknown surface
- roots()[source]#
Return the root labels of the connected components of this surface.
Since this surface doesn’t really have any labels, we throw an error.
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = translation_surfaces.square_torus() sage: S = MutableOrientedSimilaritySurface.from_surface(S) sage: S = S.triangulate(in_place=False).domain() sage: S.roots() Traceback (most recent call last): ... NotImplementedError: cannot determine root labels in an unknown surface
- flatsurf.geometry.morphism.unpickle_NamedUnknownMorphism(*args)[source]#
Unpickle a
NamedUnknownMorphism
.This works around a bug in SageMath 9.8 which fails to unpickle through
NamedUnknownMorphism._create_morphism
directly with:AttributeError: type object 'sage.misc.inherit_comparison.InheritComparisonMeta' has no attribute '_create_morphism'
EXAMPLES:
sage: from flatsurf import translation_surfaces, MutableOrientedSimilaritySurface sage: S = MutableOrientedSimilaritySurface.from_surface(translation_surfaces.square_torus()) sage: loads(dumps(S.triangulate())) == S.triangulate() True