morphism

Morphisms involving pylatsurf backed surfaces.

This module extends flatsurf.geometry.morphism with morphisms that rely on the C++/Python library pyflatsurf.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.veech_double_n_gon(5)
sage: to_pyflatsurf = S.pyflatsurf()  # optional: pyflatsurf  # random output due to cppyy deprecation warnings
sage: to_pyflatsurf  # optional: pyflatsurf
Composite morphism:
  From: Translation Surface in H_2(2) built from 2 regular pentagons
  To:   Surface backed by FlatTriangulationCombinatorial(...) with vectors ...
  Defn: Triangulation morphism:
          ...
        then pyflatsurf conversion morphism:
          ...

sage: to_pyflatsurf.codomain().flat_triangulation()  # optional: pyflatsurf
FlatTriangulationCombinatorial(...) with vectors ...
class flatsurf.geometry.pyflatsurf.morphism.Morphism_Deformation(parent, deformation)[source]

A morphism of Surface_pyflatsurf surfaces that is backed by a libflatsurf Deformation.

These morphisms are usually hidden deep inside the machinery of some complex morphism constructions.

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)  # optional: pyflatsurf

sage: deformation = isomorphism._factorization()._factorization()._morphisms[2]  # optional: pyflatsurf

sage: deformation  # optional: pyflatsurf
pyflatsurf deformation morphism:
  From: Surface backed by FlatTriangulationCombinatorial(vertices = (1, -3, 2, -1, 3, -2), faces = (1, 2, 3)(-1, -2, -3)) with vectors {1: (1, 0), 2: (0, 1), 3: (-1, -1)}
  To:   Surface backed by FlatTriangulationCombinatorial(vertices = (1, -3, 2, -1, 3, -2), faces = (1, 2, 3)(-1, -2, -3)) with vectors {1: (1, 0), 2: (0, 1), 3: (-1, -1)}
  Defn: FlatTriangulationCombinatorial(vertices = (1, -3, 2, -1, 3, -2), faces = (1, 2, 3)(-1, -2, -3)) with vectors {1: (1, 0), 2: (0, 1), 3: (-1, -1)} → ...
__annotations__ = {}
__eq__(other)[source]

Return whether this morphism is indistinguishable from other.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.square_torus()
sage: T = S.relabel({0: 1})
sage: S.delaunay_decompose(codomain=T)._factorization()._factorization()._morphisms[2] == S.delaunay_decompose(codomain=T)._factorization()._factorization()._morphisms[2]  # optional: pyflatsurf
Traceback (most recent call last):
...
NotImplementedError: deformations do not implement the == operator yet
__hash__()[source]

Return a hash value for this morphism that is compatible with __eq__().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.square_torus()
sage: T = S.relabel({0: 1})
sage: hash(S.delaunay_decompose(codomain=T)._factorization()._factorization()._morphisms[2]) == hash(S.delaunay_decompose(codomain=T)._factorization()._factorization()._morphisms[2])  # optional: pyflatsurf
True
__init__(parent, deformation)[source]
__module__ = 'flatsurf.geometry.pyflatsurf.morphism'
class flatsurf.geometry.pyflatsurf.morphism.Morphism_from_pyflatsurf(parent, pyflatsurf_conversion)[source]

A trivial isomorphism from a pyflatsurf backed translation surface to a sage-flatsurf translation surface.

You should not create such morphisms directly but only create them as the Morphism_to_pyflatsurf.section() of another morphism.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.veech_double_n_gon(5).triangulate().codomain()
sage: from_pyflatsurf = S.pyflatsurf().section()  # optional: pyflatsurf
__annotations__ = {}
__eq__(other)[source]

Return whether this morphism is indistinguishable from other.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.veech_double_n_gon(5).triangulate().codomain()
sage: S.pyflatsurf().section() == S.pyflatsurf().section()  # optional: pyflatsurf
True
__hash__()[source]

Return a hash value for this morphism that is compatible with __eq__().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.veech_double_n_gon(5).triangulate().codomain()
sage: hash(S.pyflatsurf().section()) == hash(S.pyflatsurf().section())  # optional: pyflatsurf
True
__init__(parent, pyflatsurf_conversion)[source]
__module__ = 'flatsurf.geometry.pyflatsurf.morphism'
class flatsurf.geometry.pyflatsurf.morphism.Morphism_to_pyflatsurf(parent, pyflatsurf_conversion)[source]

A trivial isomorphism from a sage-flatsurf translation surface to a pyflatsurf backed translation surface.

You should not create such morphisms directly but rely on the caching provided by pyflatsurf().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.veech_double_n_gon(5).triangulate().codomain()
sage: to_pyflatsurf = S.pyflatsurf()  # optional: pyflatsurf
__annotations__ = {}
__eq__(other)[source]

Return whether this morphism is indistinguishable from other.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.veech_double_n_gon(5).triangulate().codomain()
sage: S.pyflatsurf() == S.pyflatsurf()  # optional: pyflatsurf
True
__hash__()[source]

Return a hash value for this morphism that is compatible with __eq__().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.veech_double_n_gon(5).triangulate().codomain()
sage: hash(S.pyflatsurf()) == hash(S.pyflatsurf())  # optional: pyflatsurf
True
__init__(parent, pyflatsurf_conversion)[source]
__module__ = 'flatsurf.geometry.pyflatsurf.morphism'
section()[source]

Return the inverse of this morphism.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.veech_double_n_gon(5).triangulate().codomain()
sage: to_pyflatsurf = S.pyflatsurf()  # optional: pyflatsurf
sage: to_pyflatsurf.section()  # optional: pyflatsurf
pyflatsurf reconversion morphism:
  From: Surface backed by FlatTriangulationCombinatorial(...) with vectors ...
  To:   Triangulation of Translation Surface in H_2(2) built from 2 regular pentagons