Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the alt nu-tamari lattices #37221

Merged
merged 11 commits into from
Feb 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
less whitespaces!
  • Loading branch information
Clément Chenevière committed Feb 1, 2024
commit a0dcc80819798b5d7b9d1bc72c5cdcc8db044b3c
8 changes: 4 additions & 4 deletions src/sage/combinat/nu_tamari_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Finite lattice containing 40 elements
sage: AltNuTamariLattice([0,0,0,1,1,0,0,1], [0,1,0])
Finite lattice containing 40 elements


The classical **Tamari lattices** and the **Generalized Tamari lattices** are
special cases of this construction and are also available with this poset::
Expand Down Expand Up @@ -128,7 +128,7 @@ def delta_swap(p, k, delta):
- ``k`` -- an integer between `0` and `p.length()-1`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double back quotes around p.length()-1 (c'est pas du latex)

et idem dans la ligne pour delta

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Est-ce que je laisse en simple back quotes autour du 0 ?

Et par rapport à la ligne 12, est-ce qu'il faut aussi modifier la partie \nu-Dyck paths<sage.combinat.nu_dyck_word.NuDyckWord> pour passer en double back quotes ?

- ``delta`` -- a list of nonnegative integers of length p.height()

OUTPUT:

- a `\nu`-Dyck word
Expand Down Expand Up @@ -230,7 +230,7 @@ def AltNuTamariLattice(nu, delta=None):
[PRV2017]_
[CC2023]_
"""
if not( (isinstance(nu, (list, tuple)) and all(x in [0, 1] for x in nu)) or
if not( (isinstance(nu, (list, tuple)) and all(x in [0, 1] for x in nu)) or
(isinstance(nu, str) and all(x in ['0', '1'] for x in nu)) ):
raise ValueError("nu must be a list or a string of 0s and 1s")
nu = [int(a) for a in nu]
Expand All @@ -244,7 +244,7 @@ def AltNuTamariLattice(nu, delta=None):
raise ValueError("delta is not a valid increment vector")

def covers(p):
return [delta_swap(p, k, delta = delta) for k in range(1, p.length())
return [delta_swap(p, k, delta=delta) for k in range(1, p.length())
if not p[k - 1] and p[k]]
return LatticePoset({p: covers(p) for p in NuDyckWords(nu)},
check=False)
Loading