<h1><p align="center">eigenmorphic</p></h1>
<p align="center">Eigenvalues and more for morphic subshifts</p>
<hr>
Morphic subshifts are generalization of substitution subshifts,
where we allow taking the image of a substitution subshift by another substitution,
considering the generated subshift.
This ``eigenmorphic`` package for [SageMath](https://www.sagemath.org) contains:
* computation of exact additive eigenvalues of morphic subshifts
* decide recognizability of a substitution in the subshift of another substitution
* test if a morphic subshift has pure discrete spectrum using an improvement of the balanced pair algorithm
* compute substitutions from an IET given as a Rauzy loop or with lengths
* plot very general Rauzy fractals
* plot fixed points of Anosov maps from IET
* compute coboundaries
## Installation
```python
sage -pip install eigenmorphic
```
## Usage
```python
sage: from eigenmorphic import *
```
### After this command, you can compute eigenvalues of morphic subshifts
```python
sage: s = WordMorphism('a->ab,b->ac,c->a')
sage: morphic_eigenvalues(s)
Z*{1, b, b^2}
where b is root of x^3 - x^2 - x - 1
```
```python
sage: t = WordMorphism('a->0,b->1,c->1')
sage: morphic_eigenvalues(s, t)
Z*{1, b, b^2}
where b is root of x^3 - x^2 - x - 1
# regular paperfolding
sage: t = WordMorphism('a->00,b->01,c->10,d->11')
sage: s = WordMorphism('a->ca,b->cb,c->da,d->db')
sage: t(s.fixed_points()[0])
word: 1101100111001001110110001100100111011001...
sage: morphic_eigenvalues(s,t)
1/8Z[1/2]
```
### There are tools to compute coboundaries
```python
sage: s = WordMorphism('a->c,b->de,c->bde,d->b,e->deab')
sage: coboundary_basis(s)
[ 0 1 0 -1 0]
[ 0 0 0 1 -1]
```
### You can also test if the Z-action of a morphic subshift has pure discrete spectrum, using an improvement of the balanced pair algorithm
```python
sage: s = WordMorphism("a->ab,b->ac,c->a")
sage: has_pure_discrete_spectrum(s)
True
sage: t = WordMorphism('a->ab,b->a,c->a')
sage: has_pure_discrete_spectrum(s, t, verb=1)
The condition ensuring that there is enough eigenvalues is satisfied.
execute balanced_pair_algorithm with w = a...
execute balanced_pair_algorithm with w = ab...
execute balanced_pair_algorithm with w = aba...
execute balanced_pair_algorithm with w = abac...
balanced pair algorithm terminated conclusively with w = a
True
```
### There are also tools to find Rauzy loop in the graph of graphs, and plot fixed points of the corresponding Anosov
```python
sage: b = AA(2*cos(pi/7))
sage: v = [4*b^2 - 2*b - 9, -7*b^2 + 6*b + 12, 5*b^2 - 4*b - 9, -b + 2, -3*b^2 + b + 8, b^2 - 3]
sage: per = "643215"
sage: rauzy_loop_substitution(per, v, gets2=1)
(WordMorphism: 1->1416, 2->14232416, 3->142332416, 4->142416, 5->156, 6->15616,
WordMorphism: 1->12345664321, 2->23432, 3->323, 4->4321234, 5->56, 6->6432156)
sage: plot_surface_with_fixed_pts(per, v)
```
### There are also tools to plot very general Rauzy fractals, from any finite word and projection
```python
sage: u = s.periodic_points()[0][0]
sage: V = usual_projection(s.incidence_matrix())
sage: rauzy_fractal_plot(u[:100000], V)
```
### You can also decide recognizability
```python
sage: s = WordMorphism("a->ab,b->ac,c->a")
sage: t = WordMorphism('a->ab,b->a,c->a')
sage: is_recognizable(t, s)
True
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/mercatp/eigenmorphic",
"name": "eigenmorphic",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "SageMath Eigenvalue Substitutive Morphic Subshift",
"author": "Paul Mercat",
"author_email": "paul.mercat@univ-amu.fr",
"download_url": "https://files.pythonhosted.org/packages/68/6b/170f29a9105b091f6989e1d76d59d29236b3664ecb61ad0754f98adc5d28/eigenmorphic-0.2.8.tar.gz",
"platform": null,
"description": "<h1><p align=\"center\">eigenmorphic</p></h1>\n\n<p align=\"center\">Eigenvalues and more for morphic subshifts</p>\n<hr>\n\nMorphic subshifts are generalization of substitution subshifts,\nwhere we allow taking the image of a substitution subshift by another substitution,\nconsidering the generated subshift.\n\nThis ``eigenmorphic`` package for [SageMath](https://www.sagemath.org) contains:\n\n* computation of exact additive eigenvalues of morphic subshifts\n* decide recognizability of a substitution in the subshift of another substitution\n* test if a morphic subshift has pure discrete spectrum using an improvement of the balanced pair algorithm\n* compute substitutions from an IET given as a Rauzy loop or with lengths\n* plot very general Rauzy fractals\n* plot fixed points of Anosov maps from IET\n* compute coboundaries\n\n## Installation\n\n```python\nsage -pip install eigenmorphic\n```\n\n## Usage\n\n```python\nsage: from eigenmorphic import *\n```\n\n### After this command, you can compute eigenvalues of morphic subshifts\n\n```python\nsage: s = WordMorphism('a->ab,b->ac,c->a')\nsage: morphic_eigenvalues(s)\nZ*{1, b, b^2}\nwhere b is root of x^3 - x^2 - x - 1\n```\n```python\nsage: t = WordMorphism('a->0,b->1,c->1')\nsage: morphic_eigenvalues(s, t)\nZ*{1, b, b^2}\nwhere b is root of x^3 - x^2 - x - 1\n\n# regular paperfolding\nsage: t = WordMorphism('a->00,b->01,c->10,d->11')\nsage: s = WordMorphism('a->ca,b->cb,c->da,d->db')\nsage: t(s.fixed_points()[0])\nword: 1101100111001001110110001100100111011001...\nsage: morphic_eigenvalues(s,t)\n1/8Z[1/2]\n```\n\n### There are tools to compute coboundaries\n\n```python\nsage: s = WordMorphism('a->c,b->de,c->bde,d->b,e->deab')\nsage: coboundary_basis(s)\n[ 0 1 0 -1 0]\n[ 0 0 0 1 -1]\n```\n\n### You can also test if the Z-action of a morphic subshift has pure discrete spectrum, using an improvement of the balanced pair algorithm\n\n```python\nsage: s = WordMorphism(\"a->ab,b->ac,c->a\")\nsage: has_pure_discrete_spectrum(s)\nTrue\nsage: t = WordMorphism('a->ab,b->a,c->a')\nsage: has_pure_discrete_spectrum(s, t, verb=1)\nThe condition ensuring that there is enough eigenvalues is satisfied.\nexecute balanced_pair_algorithm with w = a...\nexecute balanced_pair_algorithm with w = ab...\nexecute balanced_pair_algorithm with w = aba...\nexecute balanced_pair_algorithm with w = abac...\nbalanced pair algorithm terminated conclusively with w = a\n\nTrue\n```\n\n### There are also tools to find Rauzy loop in the graph of graphs, and plot fixed points of the corresponding Anosov\n\n```python\nsage: b = AA(2*cos(pi/7))\nsage: v = [4*b^2 - 2*b - 9, -7*b^2 + 6*b + 12, 5*b^2 - 4*b - 9, -b + 2, -3*b^2 + b + 8, b^2 - 3]\nsage: per = \"643215\"\nsage: rauzy_loop_substitution(per, v, gets2=1)\n(WordMorphism: 1->1416, 2->14232416, 3->142332416, 4->142416, 5->156, 6->15616,\n WordMorphism: 1->12345664321, 2->23432, 3->323, 4->4321234, 5->56, 6->6432156)\nsage: plot_surface_with_fixed_pts(per, v)\n```\n\n### There are also tools to plot very general Rauzy fractals, from any finite word and projection\n\n```python\nsage: u = s.periodic_points()[0][0]\nsage: V = usual_projection(s.incidence_matrix())\nsage: rauzy_fractal_plot(u[:100000], V)\n```\n\n### You can also decide recognizability\n\n```python\nsage: s = WordMorphism(\"a->ab,b->ac,c->a\")\nsage: t = WordMorphism('a->ab,b->a,c->a')\nsage: is_recognizable(t, s)\nTrue\n```\n\n",
"bugtrack_url": null,
"license": "GPLv3.0",
"summary": "Eigenvalues of morphic subshifts",
"version": "0.2.8",
"project_urls": {
"Homepage": "https://gitlab.com/mercatp/eigenmorphic"
},
"split_keywords": [
"sagemath",
"eigenvalue",
"substitutive",
"morphic",
"subshift"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "686b170f29a9105b091f6989e1d76d59d29236b3664ecb61ad0754f98adc5d28",
"md5": "d6765ceb985c4cf462f581a3c1ab897f",
"sha256": "834798dfdac8a98578ed140b522c0ba61bb17247fbcce32edc005d23fa5356e2"
},
"downloads": -1,
"filename": "eigenmorphic-0.2.8.tar.gz",
"has_sig": false,
"md5_digest": "d6765ceb985c4cf462f581a3c1ab897f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 28511,
"upload_time": "2025-07-09T14:53:55",
"upload_time_iso_8601": "2025-07-09T14:53:55.766263Z",
"url": "https://files.pythonhosted.org/packages/68/6b/170f29a9105b091f6989e1d76d59d29236b3664ecb61ad0754f98adc5d28/eigenmorphic-0.2.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 14:53:55",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "mercatp",
"gitlab_project": "eigenmorphic",
"lcname": "eigenmorphic"
}