Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here my attempt so far using the program suggested in the answer of FrédéricC: There seems to be a probem with the program fcn. Maybe it is because the program isoposetset gives lists of posets instead of posets as an output?

def iso(P):
    D = {}
    for x, y in P.relations():
        Q = P.subposet(P.interval(x, y))
        dp = Q.degree_polynomial()
        if dp not in D:
            D[dp] = []
        if not any(Q.is_isomorphic(R) for R in D[dp]):
            D[dp].append(Q)
    return D

def isoposetset(P):
    U=list(iso(P).values())
    return(U)

def fcn(A, B):
    if B.has_isomorphic_subposet(A):
        return True
    if not B.has_isomorphic_subposet(A):
        return False

def isoposet(P):
    U=list(iso(P).values())
    UU=Poset((U,fcn), cover_relations=True)
    return(UU)

P = posets.PentagonPoset()
U=isoposet(P)

Here my attempt so far using the program suggested in the answer of FrédéricC: There seems to be a probem with the program fcn. Maybe it is because the program isoposetset gives lists of posets instead of posets as an output?output? I will try to fix this error, but maybe someone sees my mistake already.

def iso(P):
    D = {}
    for x, y in P.relations():
        Q = P.subposet(P.interval(x, y))
        dp = Q.degree_polynomial()
        if dp not in D:
            D[dp] = []
        if not any(Q.is_isomorphic(R) for R in D[dp]):
            D[dp].append(Q)
    return D

def isoposetset(P):
    U=list(iso(P).values())
    return(U)

def fcn(A, B):
    if B.has_isomorphic_subposet(A):
        return True
    if not B.has_isomorphic_subposet(A):
        return False

def isoposet(P):
    U=list(iso(P).values())
    UU=Poset((U,fcn), cover_relations=True)
    return(UU)

P = posets.PentagonPoset()
U=isoposet(P)

Here my attempt so far using the program suggested in the answer of FrédéricC: There seems to be a probem with the program fcn. Maybe it is because the program isoposetset list(iso(P).values()) gives lists of posets instead of posets as an output? I will try to fix this error, but maybe someone sees my mistake already.

def iso(P):
    D = {}
    for x, y in P.relations():
        Q = P.subposet(P.interval(x, y))
        dp = Q.degree_polynomial()
        if dp not in D:
            D[dp] = []
        if not any(Q.is_isomorphic(R) for R in D[dp]):
            D[dp].append(Q)
    return D

def isoposetset(P):
    U=list(iso(P).values())
    return(U)

def fcn(A, B):
    if B.has_isomorphic_subposet(A):
        return True
    if not B.has_isomorphic_subposet(A):
        return False

def isoposet(P):
    U=list(iso(P).values())
    UU=Poset((U,fcn), cover_relations=True)
    return(UU)

P = posets.PentagonPoset()
U=isoposet(P)