Skip to content

Conversation

@mantepse
Copy link
Contributor

Provide constellations as (an example of) a combinatorial species.

Dependencies: #41534

@mantepse mantepse added the sd130 tickets of Sage Days 130 Le Teich label Jan 27, 2026
@github-actions
Copy link

github-actions bot commented Jan 27, 2026

Documentation preview for this PR (built with commit e4cc7e5; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@videlec
Copy link
Contributor

videlec commented Jan 27, 2026

Here is a test for transitivity without relying on graph connectedness (it does not handle the case of the symmetric group on the empty set)

def perms_are_transitive(sym, p):
    D = sym.domain()
    orbit = set()
    x0 = D.an_element()
    todo = [x0]
    orbit.add(x0)
    n = 1
    while todo and n < len(D):
        x = todo.pop()
        for pp in p:
            y = pp(x)
            if y not in orbit:
                todo.append(y)
                orbit.add(y)
                n += 1

    return n == len(D)

It is roughly 10x faster than what is in constellation.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s: needs review sd130 tickets of Sage Days 130 Le Teich

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants