Skip to content

Comparison of combinatorial class of words with word paths is broken #8674

@seblabbe

Description

@seblabbe

This is fine :

sage: m = WordMorphism('a->adab,b->ab,c->cbcd,d->cd')
sage: m.is_endomorphism()
True

But we would like the following to be an endomorphism as well:

sage: P = WordPaths('abcd')
sage: m = WordMorphism('a->adab,b->ab,c->cbcd,d->cd', codomain=P)
sage: m.is_endomorphism()
False

It is caused by the following problem:

sage: WordPaths('abcd') <= Words('abcd')
False
sage: WordPaths('abcd') >= Words('abcd')
True
sage: Words('abcd') >= WordPaths('abcd')
False
sage: Words('abcd') <= WordPaths('abcd')
True

CC: @sagetrac-abmasse

Component: combinatorics

Author: Sébastien Labbé

Reviewer: Alexandre Blondin Massé

Merged: sage-4.6.1.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/8674

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions