Class factories for Interval exchange transformations.

Warning

This module is deprecated. You are advised to install and use the surface_dynamics package instead available at https://pypi.python.org/pypi/surface_dynamics/

This library is designed for the usage and manipulation of interval exchange transformations and linear involutions. It defines specialized types of permutation (constructed using iet.Permutation()) some associated graph (constructed using iet.RauzyGraph()) and some maps of intervals (constructed using iet.IntervalExchangeTransformation()).

EXAMPLES:

Creation of an interval exchange transformation:

sage: T = iet.IntervalExchangeTransformation(('a b','b a'),(sqrt(2),1))
doctest:warning
...
DeprecationWarning: IntervalExchangeTransformation is deprecated and will be removed from Sage.
You are advised to install the surface_dynamics package via:
    sage -pip install surface_dynamics
If you do not have write access to the Sage installation you can
alternatively do
    sage -pip install surface_dynamics --user
The package surface_dynamics subsumes all flat surface related
computation that are currently available in Sage. See more
information at
    http://www.labri.fr/perso/vdelecro/surface-dynamics/latest/
See http://trac.sagemath.org/20695 for details.
doctest:warning
...
DeprecationWarning: Permutation is deprecated and will be removed from Sage.
You are advised to install the surface_dynamics package via:
    sage -pip install surface_dynamics
If you do not have write access to the Sage installation you can
alternatively do
    sage -pip install surface_dynamics --user
The package surface_dynamics subsumes all flat surface related
computation that are currently available in Sage. See more
information at
    http://www.labri.fr/perso/vdelecro/surface-dynamics/latest/
See http://trac.sagemath.org/20695 for details.
sage: T
Interval exchange transformation of [0, sqrt(2) + 1[ with permutation
a b
b a

It can also be initialized using permutation (group theoretic ones):

sage: p = Permutation([3,2,1])
sage: T = iet.IntervalExchangeTransformation(p, [1/3,2/3,1])
sage: T
Interval exchange transformation of [0, 2[ with permutation
1 2 3
3 2 1

For the manipulation of permutations of iet, there are special types provided by this module. All of them can be constructed using the constructor iet.Permutation. For the creation of labelled permutations of interval exchange transformation:

sage: p1 =  iet.Permutation('a b c', 'c b a')
sage: p1
a b c
c b a

They can be used for initialization of an iet:

sage: p = iet.Permutation('a b','b a')
sage: T = iet.IntervalExchangeTransformation(p, [1,sqrt(2)])
sage: T
Interval exchange transformation of [0, sqrt(2) + 1[ with permutation
a b
b a

You can also, create labelled permutations of linear involutions:

sage: p = iet.GeneralizedPermutation('a a b', 'b c c')
doctest:warning
...
DeprecationWarning: GeneralizedPermutation is deprecated and will be removed from Sage.
You are advised to install the surface_dynamics package via:
    sage -pip install surface_dynamics
If you do not have write access to the Sage installation you can
alternatively do
    sage -pip install surface_dynamics --user
The package surface_dynamics subsumes all flat surface related
computation that are currently available in Sage. See more
information at
    http://www.labri.fr/perso/vdelecro/surface-dynamics/latest/
See http://trac.sagemath.org/20695 for details.
sage: p
a a b
b c c

Sometimes it’s more easy to deal with reduced permutations:

sage: p = iet.Permutation('a b c', 'c b a', reduced = True)
sage: p
a b c
c b a

Permutations with flips:

sage: p1 = iet.Permutation('a b c', 'c b a', flips = ['a','c'])
sage: p1
-a  b -c
-c  b -a

Creation of Rauzy diagrams:

sage: r = iet.RauzyDiagram('a b c', 'c b a')
doctest:warning
...
DeprecationWarning: RauzyDiagram is deprecated and will be removed from Sage.
You are advised to install the surface_dynamics package via:
    sage -pip install surface_dynamics
If you do not have write access to the Sage installation you can
alternatively do
    sage -pip install surface_dynamics --user
The package surface_dynamics subsumes all flat surface related
computation that are currently available in Sage. See more
information at
    http://www.labri.fr/perso/vdelecro/surface-dynamics/latest/
See http://trac.sagemath.org/20695 for details.

Reduced Rauzy diagrams are constructed using the same arguments than for permutations:

sage: r = iet.RauzyDiagram('a b b','c c a')
sage: r_red = iet.RauzyDiagram('a b b','c c a',reduced=True)
sage: r.cardinality()
12
sage: r_red.cardinality()
4

By default, Rauzy diagrams are generated by induction on the right. You can use several options to enlarge (or restrict) the diagram (try help(iet.RauzyDiagram) for more precisions):

sage: r1 = iet.RauzyDiagram('a b c','c b a',right_induction=True)
sage: r2 = iet.RauzyDiagram('a b c','c b a',left_right_inversion=True)

You can consider self similar iet using path in Rauzy diagrams and eigenvectors of the corresponding matrix:

sage: p = iet.Permutation("a b c d", "d c b a")
sage: d = p.rauzy_diagram()
sage: g = d.path(p, 't', 't', 'b', 't', 'b', 'b', 't', 'b')
sage: g
Path of length 8 in a Rauzy diagram
sage: g.is_loop()
True
sage: g.is_full()
True
sage: m = g.matrix()
sage: v = m.eigenvectors_right()[-1][1][0]
sage: T1 = iet.IntervalExchangeTransformation(p, v)
sage: T2 = T1.rauzy_move(iterations=8)
sage: T1.normalize(1) == T2.normalize(1)
True

REFERENCES:

AUTHORS:

  • Vincent Delecroix (2009-09-29): initial version
sage.dynamics.interval_exchanges.constructors.GeneralizedPermutation(*args, **kargs)

Returns a permutation of an interval exchange transformation.

Those permutations are the combinatoric part of linear involutions and were introduced by Danthony-Nogueira [DN1990]. The full combinatoric study and precise links with strata of quadratic differentials was achieved few years later by Boissy-Lanneau [BL2008].

INPUT:

  • intervals - strings, list, tuples
  • reduced - boolean (default: False) specifies reduction. False means labelled permutation and True means reduced permutation.
  • flips - iterable (default: None) the letters which correspond to flipped intervals.

OUTPUT:

generalized permutation – the output type depends on the data.

EXAMPLES:

Creation of labelled generalized permutations:

sage: iet.GeneralizedPermutation('a b b','c c a')
a b b
c c a
sage: iet.GeneralizedPermutation('a a','b b c c')
a a
b b c c
sage: iet.GeneralizedPermutation([[0,1,2,3,1],[4,2,5,3,5,4,0]])
0 1 2 3 1
4 2 5 3 5 4 0

Creation of reduced generalized permutations:

sage: iet.GeneralizedPermutation('a b b', 'c c a', reduced = True)
a b b
c c a
sage: iet.GeneralizedPermutation('a a b b', 'c c d d', reduced = True)
a a b b
c c d d

Creation of flipped generalized permutations:

sage: iet.GeneralizedPermutation('a b c a', 'd c d b', flips = ['a','b'])
-a -b  c -a
 d  c  d -b
sage.dynamics.interval_exchanges.constructors.IET(permutation=None, lengths=None)

Constructs an Interval exchange transformation.

An interval exchange transformation (or iet) is a map from an interval to itself. It is defined on the interval except at a finite number of points (the singularities) and is a translation on each connected component of the complement of the singularities. Moreover it is a bijection on its image (or it is injective).

An interval exchange transformation is encoded by two datas. A permutation (that corresponds to the way we echange the intervals) and a vector of positive reals (that corresponds to the lengths of the complement of the singularities).

INPUT:

  • permutation - a permutation
  • lengths - a list or a dictionary of lengths

OUTPUT:

interval exchange transformation – an map of an interval

EXAMPLES:

Two initialization methods, the first using a iet.Permutation:

sage: p = iet.Permutation('a b c','c b a')
sage: t = iet.IntervalExchangeTransformation(p, {'a':1,'b':0.4523,'c':2.8})

The second is more direct:

sage: t = iet.IntervalExchangeTransformation(('a b','b a'),{'a':1,'b':4})

It’s also possible to initialize the lengths only with a list:

sage: t = iet.IntervalExchangeTransformation(('a b c','c b a'),[0.123,0.4,2])

The two fundamental operations are Rauzy move and normalization:

sage: t = iet.IntervalExchangeTransformation(('a b c','c b a'),[0.123,0.4,2])
sage: s = t.rauzy_move()
sage: s_n = s.normalize(t.length())
sage: s_n.length() == t.length()
True

A not too simple example of a self similar interval exchange transformation:

sage: p = iet.Permutation('a b c d','d c b a')
sage: d = p.rauzy_diagram()
sage: g = d.path(p, 't', 't', 'b', 't', 'b', 'b', 't', 'b')
sage: m = g.matrix()
sage: v = m.eigenvectors_right()[-1][1][0]
sage: t = iet.IntervalExchangeTransformation(p,v)
sage: s = t.rauzy_move(iterations=8)
sage: s.normalize() == t.normalize()
True
sage.dynamics.interval_exchanges.constructors.IntervalExchangeTransformation(permutation=None, lengths=None)

Constructs an Interval exchange transformation.

An interval exchange transformation (or iet) is a map from an interval to itself. It is defined on the interval except at a finite number of points (the singularities) and is a translation on each connected component of the complement of the singularities. Moreover it is a bijection on its image (or it is injective).

An interval exchange transformation is encoded by two datas. A permutation (that corresponds to the way we echange the intervals) and a vector of positive reals (that corresponds to the lengths of the complement of the singularities).

INPUT:

  • permutation - a permutation
  • lengths - a list or a dictionary of lengths

OUTPUT:

interval exchange transformation – an map of an interval

EXAMPLES:

Two initialization methods, the first using a iet.Permutation:

sage: p = iet.Permutation('a b c','c b a')
sage: t = iet.IntervalExchangeTransformation(p, {'a':1,'b':0.4523,'c':2.8})

The second is more direct:

sage: t = iet.IntervalExchangeTransformation(('a b','b a'),{'a':1,'b':4})

It’s also possible to initialize the lengths only with a list:

sage: t = iet.IntervalExchangeTransformation(('a b c','c b a'),[0.123,0.4,2])

The two fundamental operations are Rauzy move and normalization:

sage: t = iet.IntervalExchangeTransformation(('a b c','c b a'),[0.123,0.4,2])
sage: s = t.rauzy_move()
sage: s_n = s.normalize(t.length())
sage: s_n.length() == t.length()
True

A not too simple example of a self similar interval exchange transformation:

sage: p = iet.Permutation('a b c d','d c b a')
sage: d = p.rauzy_diagram()
sage: g = d.path(p, 't', 't', 'b', 't', 'b', 'b', 't', 'b')
sage: m = g.matrix()
sage: v = m.eigenvectors_right()[-1][1][0]
sage: t = iet.IntervalExchangeTransformation(p,v)
sage: s = t.rauzy_move(iterations=8)
sage: s.normalize() == t.normalize()
True
sage.dynamics.interval_exchanges.constructors.Permutation(*args, **kargs)

Returns a permutation of an interval exchange transformation.

Those permutations are the combinatoric part of an interval exchange transformation (IET). The combinatorial study of those objects starts with Gerard Rauzy [Rau1979] and William Veech [Vee1978].

The combinatoric part of interval exchange transformation can be taken independently from its dynamical origin. It has an important link with strata of Abelian differential (see strata)

INPUT:

  • intervals - string, two strings, list, tuples that can be converted to two lists
  • reduced - boolean (default: False) specifies reduction. False means labelled permutation and True means reduced permutation.
  • flips - iterable (default: None) the letters which correspond to flipped intervals.

OUTPUT:

permutation – the output type depends of the data.

EXAMPLES:

Creation of labelled permutations

sage: iet.Permutation('a b c d','d c b a')
a b c d
d c b a
sage: iet.Permutation([[0,1,2,3],[2,1,3,0]])
0 1 2 3
2 1 3 0
sage: iet.Permutation([0, 'A', 'B', 1], ['B', 0, 1, 'A'])
0 A B 1
B 0 1 A

Creation of reduced permutations:

sage: iet.Permutation('a b c', 'c b a', reduced = True)
a b c
c b a
sage: iet.Permutation([0, 1, 2, 3], [1, 3, 0, 2])
0 1 2 3
1 3 0 2

Creation of flipped permutations:

sage: iet.Permutation('a b c', 'c b a', flips=['a','b'])
-a -b  c
 c -b -a
sage: iet.Permutation('a b c', 'c b a', flips=['a'], reduced=True)
-a  b  c
 c  b -a
sage: p = iet.Permutation('a b c','c b a')
sage: iet.Permutation(p) == p
True
sage: iet.Permutation(p, reduced=True) == p.reduced()
True
sage: p = iet.Permutation('a','a',flips='a',reduced=True)
sage: iet.Permutation(p) == p
True
sage: p = iet.Permutation('a b c','c b a',flips='a')
sage: iet.Permutation(p) == p
True
sage: iet.Permutation(p, reduced=True) == p.reduced()
True
sage: p = iet.Permutation('a b c','c b a',reduced=True)
sage: iet.Permutation(p) == p
True

sage: iet.Permutation('a b c','c b a',reduced='badly')
Traceback (most recent call last):
...
TypeError: reduced must be of type boolean
sage: iet.Permutation('a','a',flips='b',reduced=True)
Traceback (most recent call last):
...
ValueError: flips contains not valid letters
sage: iet.Permutation('a b c','c a a',reduced=True)
Traceback (most recent call last):
...
ValueError: letters must appear once in each interval
sage.dynamics.interval_exchanges.constructors.Permutations_iterator(nintervals=None, irreducible=True, reduced=False, alphabet=None)

Returns an iterator over permutations.

This iterator allows you to iterate over permutations with given constraints. If you want to iterate over permutations coming from a given stratum you have to use the module strata and generate Rauzy diagrams from connected components.

INPUT:

  • nintervals - non negative integer
  • irreducible - boolean (default: True)
  • reduced - boolean (default: False)
  • alphabet - alphabet (default: None)

OUTPUT:

iterator – an iterator over permutations

EXAMPLES:

Generates all reduced permutations with given number of intervals:

sage: P = iet.Permutations_iterator(nintervals=2,alphabet="ab",reduced=True)
doctest:warning
...
DeprecationWarning: iet_Permutations_iterator is deprecated and will be removed from Sage.
You are advised to install the surface_dynamics package via:
    sage -pip install surface_dynamics
If you do not have write access to the Sage installation you can
alternatively do
    sage -pip install surface_dynamics --user
The package surface_dynamics subsumes all flat surface related
computation that are currently available in Sage. See more
information at
    http://www.labri.fr/perso/vdelecro/surface-dynamics/latest/
See http://trac.sagemath.org/20695 for details.
sage: for p in P:
....:     print(p)
....:     print("* *")
a b
b a
* *
sage: P = iet.Permutations_iterator(nintervals=3,alphabet="abc",reduced=True)
sage: for p in P:
....:     print(p)
....:     print("* * *")
a b c
b c a
* * *
a b c
c a b
* * *
a b c
c b a
* * *
sage.dynamics.interval_exchanges.constructors.RauzyDiagram(*args, **kargs)

Return an object coding a Rauzy diagram.

The Rauzy diagram is an oriented graph with labelled edges. The set of vertices corresponds to the permutations obtained by different operations (mainly the .rauzy_move() operations that corresponds to an induction of interval exchange transformation). The edges correspond to the action of the different operations considered.

It first appeared in the original article of Rauzy [Rau1979].

INPUT:

  • intervals - lists, or strings, or tuples
  • reduced - boolean (default: False) to precise reduction
  • flips - list (default: []) for flipped permutations
  • right_induction - boolean (default: True) consideration of left induction in the diagram
  • left_induction - boolean (default: False) consideration of right induction in the diagram
  • left_right_inversion - boolean (default: False) consideration of inversion
  • top_bottom_inversion - boolean (default: False) consideration of reversion
  • symmetric - boolean (default: False) consideration of the symmetric operation

OUTPUT:

Rauzy diagram – the Rauzy diagram that corresponds to your request

EXAMPLES:

Standard Rauzy diagrams:

sage: iet.RauzyDiagram('a b c d', 'd b c a')
Rauzy diagram with 12 permutations
sage: iet.RauzyDiagram('a b c d', 'd b c a', reduced = True)
Rauzy diagram with 6 permutations

Extended Rauzy diagrams:

sage: iet.RauzyDiagram('a b c d', 'd b c a', symmetric=True)
Rauzy diagram with 144 permutations

Using Rauzy diagrams and path in Rauzy diagrams:

sage: r = iet.RauzyDiagram('a b c', 'c b a')
sage: r
Rauzy diagram with 3 permutations
sage: p = iet.Permutation('a b c','c b a')
sage: p in r
True
sage: g0 = r.path(p, 'top', 'bottom','top')
sage: g1 = r.path(p, 'bottom', 'top', 'bottom')
sage: g0.is_loop(), g1.is_loop()
(True, True)
sage: g0.is_full(), g1.is_full()
(False, False)
sage: g = g0 + g1
sage: g
Path of length 6 in a Rauzy diagram
sage: g.is_loop(), g.is_full()
(True, True)
sage: m = g.matrix()
sage: m
[1 1 1]
[2 4 1]
[2 3 2]
sage: s = g.orbit_substitution()
sage: s
WordMorphism: a->acbbc, b->acbbcbbc, c->acbc
sage: s.incidence_matrix() == m
True

We can then create the corresponding interval exchange transformation and comparing the orbit of \(0\) to the fixed point of the orbit substitution:

sage: v = m.eigenvectors_right()[-1][1][0]
sage: T = iet.IntervalExchangeTransformation(p, v).normalize()
sage: T
Interval exchange transformation of [0, 1[ with permutation
a b c
c b a
sage: w1 = []
sage: x = 0
sage: for i in range(20):
....:  w1.append(T.in_which_interval(x))
....:  x = T(x)
sage: w1 = Word(w1)
sage: w1
word: acbbcacbcacbbcbbcacb
sage: w2 = s.fixed_point('a')
sage: w2[:20]
word: acbbcacbcacbbcbbcacb
sage: w2[:20] == w1
True