pysiglib.is_lyndon#
Added in version v1.1.0.
- is_lyndon(word)[source]#
Checks if a given word is a Lyndon word.
- Parameters:
word (tuple[int, ...]) – Word
- Returns:
Returns
Trueifwordis a Lyndon word andFalseotherwise.- Return type:
bool
Example:#
import pysiglib print(pysiglib.is_lyndon((0, 1))) # True print(pysiglib.is_lyndon((1, 0))) # False print(pysiglib.is_lyndon((0, 0, 1))) # True
Citation#
If you found this library useful in your research, please consider citing the paper:
@article{shmelev2025pysiglib,
title={pySigLib-Fast Signature-Based Computations on CPU and GPU},
author={Shmelev, Daniil and Salvi, Cristopher},
journal={arXiv preprint arXiv:2509.10613},
year={2025}
}