CoCalc Public Filessage-surface_dynamics.sagewsOpen with one click!
Author: Harald Schilly
Views : 106
Compute Environment: Ubuntu 18.04 (Deprecated)

Sage Surface Dynamics Module

https://pypi.org/project/surface_dynamics/

version()
'SageMath version 8.2, Release Date: 2018-05-05'
from surface_dynamics.all import Origami o = Origami('(1,2)','(1,3)') o
(1,2)(3) (1,3)(2)
o.sum_of_lyapunov_exponents()
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1044, in execute exec compile(block+'\n', '', 'single', flags=compile_flags) in namespace, locals File "", line 1, in <module> File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3215, in surface_dynamics.flat_surfaces.origamis.origami_dense.Origami_dense_pyx.sum_of_lyapunov_exponents return self.teichmueller_curve().sum_of_lyapunov_exponents() File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/surface_dynamics/flat_surfaces/origamis/teichmueller_curve.py", line 367, in sum_of_lyapunov_exponents K = Integer(1)/Integer(12) * sum(m*(m+2)/(m+1) for m in self.stratum().zeros()) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/surface_dynamics/flat_surfaces/origamis/teichmueller_curve.py", line 226, in stratum return self[0].stratum() File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3063, in surface_dynamics.flat_surfaces.origamis.origami_dense.Origami_dense_pyx.stratum degrees = self.vertex_degrees() File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3258, in genexpr return sorted((v.degree() for v in self.vertices()), reverse=True) File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3258, in genexpr return sorted((v.degree() for v in self.vertices()), reverse=True) File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3240, in surface_dynamics.flat_surfaces.origamis.origami_dense.Origami_dense_pyx.vertices return [v for v in self._vertices() if v.degree()] File "sage/misc/cachefunc.pyx", line 2909, in sage.misc.cachefunc.CachedMethod.__get__ (build/cythonized/sage/misc/cachefunc.c:15723) Caller = CachedMethodCaller(self, inst, File "sage/misc/cachefunc.pyx", line 1813, in sage.misc.cachefunc.CachedMethodCaller.__init__ (build/cythonized/sage/misc/cachefunc.c:9837) cachedmethod._cachedfunc.argfix_init() File "sage/misc/cachefunc.pyx", line 851, in sage.misc.cachefunc.CachedFunction.argfix_init (build/cythonized/sage/misc/cachefunc.c:4504) self._argument_fixer = ArgumentFixer(self.f, File "sage/misc/function_mangling.pyx", line 120, in sage.misc.function_mangling.ArgumentFixer.__init__ (build/cythonized/sage/misc/function_mangling.c:1434) arg_names, varargs, varkw, defaults = sage_getargspec(f) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 1503, in sage_getargspec source = sage_getsource(obj) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 1848, in sage_getsource t = sage_getsourcelines(obj) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 2170, in sage_getsourcelines return sage_getsourcelines(obj.__class__) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 2168, in sage_getsourcelines return sage_getsourcelines(B) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 2171, in sage_getsourcelines raise err IOError: source code not available
o.lyapunov_exponents_approx() # abs tol 0.05
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1044, in execute exec compile(block+'\n', '', 'single', flags=compile_flags) in namespace, locals File "", line 1, in <module> File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 1611, in surface_dynamics.flat_surfaces.origamis.origami_dense.Origami_dense_pyx.lyapunov_exponents_approx nb_vectors = self.genus()-1 File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3082, in surface_dynamics.flat_surfaces.origamis.origami_dense.Origami_dense_pyx.genus return self.stratum().genus() File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3063, in surface_dynamics.flat_surfaces.origamis.origami_dense.Origami_dense_pyx.stratum degrees = self.vertex_degrees() File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3258, in genexpr return sorted((v.degree() for v in self.vertices()), reverse=True) File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3258, in genexpr return sorted((v.degree() for v in self.vertices()), reverse=True) File "surface_dynamics/flat_surfaces/origamis/origami_dense.pyx", line 3240, in surface_dynamics.flat_surfaces.origamis.origami_dense.Origami_dense_pyx.vertices return [v for v in self._vertices() if v.degree()] File "sage/misc/cachefunc.pyx", line 2909, in sage.misc.cachefunc.CachedMethod.__get__ (build/cythonized/sage/misc/cachefunc.c:15723) Caller = CachedMethodCaller(self, inst, File "sage/misc/cachefunc.pyx", line 1813, in sage.misc.cachefunc.CachedMethodCaller.__init__ (build/cythonized/sage/misc/cachefunc.c:9837) cachedmethod._cachedfunc.argfix_init() File "sage/misc/cachefunc.pyx", line 851, in sage.misc.cachefunc.CachedFunction.argfix_init (build/cythonized/sage/misc/cachefunc.c:4504) self._argument_fixer = ArgumentFixer(self.f, File "sage/misc/function_mangling.pyx", line 120, in sage.misc.function_mangling.ArgumentFixer.__init__ (build/cythonized/sage/misc/function_mangling.c:1434) arg_names, varargs, varkw, defaults = sage_getargspec(f) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 1503, in sage_getargspec source = sage_getsource(obj) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 1848, in sage_getsource t = sage_getsourcelines(obj) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 2170, in sage_getsourcelines return sage_getsourcelines(obj.__class__) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 2168, in sage_getsourcelines return sage_getsourcelines(B) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", line 2171, in sage_getsourcelines raise err IOError: source code not available
o.veech_group()
Arithmetic subgroup with permutations of right cosets S2=(2,3) S3=(1,2,3) L=(1,2) R=(1,3)
from surface_dynamics.all import QuadraticStratum q = QuadraticStratum(1,1,1,1) q.orientation_cover()
H_5(2^4)
q.components()
[Q_2(1^4)^hyp]
c = q.components()[0] c
Q_2(1^4)^hyp
c.orientation_cover_component()
H_5(2^4)^odd
from surface_dynamics.all import AbelianStrata AbelianStrata(genus=3).list()
[H_3(4), H_3(3, 1), H_3(2^2), H_3(2, 1^2), H_3(1^4)]
from surface_dynamics.all import OrigamiDatabase, AbelianStratum O = OrigamiDatabase() q = O.query(("stratum","=",AbelianStratum(2)), ("nb_squares","=",5)) q.number_of()
2
for o in q: print("%s\n- - - - - - - -" % o)
(1)(2)(3)(4,5) (1,2,3,4)(5) - - - - - - - - (1)(2)(3,4,5) (1,2,3)(4)(5) - - - - - - - -
Q12_reg = QuadraticStratum(12).regular_component() Q12_reg.lyapunov_exponents_H_plus(nb_iterations=2**20) # abs tol 0.05
[0.6619595333890421, 0.44903083817447104, 0.22962202171849683, 0.08650300278009455]
Q12_reg.lyapunov_exponents_H_minus(nb_iterations=2**20) # abs tol 0.05
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1044, in execute exec compile(block+'\n', '', 'single', flags=compile_flags) in namespace, locals File "", line 1, in <module> File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/surface_dynamics/flat_surfaces/quadratic_strata.py", line 924, in lyapunov_exponents_H_minus return perm.lyapunov_exponents_H_plus(**kargs) File "/ext/sage/sage-8.2_1604/local/lib/python2.7/site-packages/surface_dynamics/interval_exchanges/cover.py", line 864, in lyapunov_exponents_H_plus dimensions, projections, None, verbose) File "src/cysignals/signals.pyx", line 263, in cysignals.signals.python_check_interrupt File "src/cysignals/signals.pyx", line 96, in cysignals.signals.sig_raise_exception KeyboardInterrupt