fundamental_group#

Initialize self. See help(type(self)) for accurate signature.

class flatsurf.geometry.fundamental_group.FundamentalGroup(surface, base)[source]#

The fundamental group of a punctured surface

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: t = translation_surfaces.square_torus()
sage: TestSuite(t.fundamental_group()).run()
Element#

alias of Path

gens()[source]#

Return a generating set

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = SymmetricGroup(8)
sage: r = S('(1,2,3,4,5,6,7,8)')
sage: u = S('(1,8,5,4)(2,3)(6,7)')
sage: o = translation_surfaces.origami(r,u)
sage: len(o.fundamental_group().gens())
9
one()[source]#

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
class flatsurf.geometry.fundamental_group.Path(parent, polys, edge, edge_rev, check=True, reduced=False)[source]#
intersection(other)[source]#

The intersection number of this element with other.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: t = translation_surfaces.square_torus()
sage: a,b = t.fundamental_group().gens()
sage: a.intersection(b)
1
sage: b.intersection(a)
-1

This is an Abelian invariant:

sage: x1 = a*b*b*~a*~a*b*b*a*~b*~b
sage: x2 = a*b*a*b
sage: x3 = ~b*~b*a
sage: (x1*x2).intersection(x3) == x1.intersection(x3) + x2.intersection(x3)
True
sage: (x2*x1*~x2).intersection(x2*x3*~x2) == x1.intersection(x3)
True

A little bit more involved example:

sage: S = SymmetricGroup(4)
sage: r = S('(1,2)(3,4)')
sage: u = S('(2,3)')
sage: o = translation_surfaces.origami(r,u)
sage: F = o.fundamental_group()
sage: x = F([1,2,2,3])
sage: x.intersection(x)
0

sage: a = F.gens()
sage: m = matrix(ZZ, 5, lambda i,j: a[i].intersection(a[j]))
sage: m
[ 0  1  0  0  0]
[-1  0 -1  0  0]
[ 0  1  0  1  0]
[ 0  0 -1  0 -1]
[ 0  0  0  1  0]

A slightly more involved example:

sage: S = SymmetricGroup(8)
sage: r = S('(1,2,3,4,5,6,7,8)')
sage: u = S('(1,8,5,4)(2,3)(6,7)')
sage: o = translation_surfaces.origami(r,u)
sage: a = o.fundamental_group().gens()
sage: m = matrix(ZZ, 9, lambda i,j: a[i].intersection(a[j]))
sage: m
[ 0 -1  1 -1  1 -1 -1 -1  1]
[ 1  0  1  0  0 -1 -1 -1  1]
[-1 -1  0  0  0  0  0  0  0]
[ 1  0  0  0 -1  0  0  0  0]
[-1  0  0  1  0  0  0  0  0]
[ 1  1  0  0  0  0  0  0  0]
[ 1  1  0  0  0  0  0  1 -1]
[ 1  1  0  0  0  0 -1  0 -1]
[-1 -1  0  0  0  0  1  1  0]
is_one()[source]#
flatsurf.geometry.fundamental_group.intersection(i0, j0, i1, j1)[source]#

Intersection inside a polygon.

In case of equality we consider that i0 < i1 < j1 < j0

INPUT:

  • i0, j0 – start and end of the first curve

  • i1, j1 – start and end of the second curve