Sharedinteressant.sageOpen in CoCalc
More code for the worksheet

def bar(x):
return tuple((6-x[2],6-x[1],6-x[0]))

def diff(e):
inter=[i for i in e[0] if i in e[1]]
xp=[i for i in e[0] if i not in inter][0]
yp=[i for i in e[1] if i not in inter][0]
return tuple(sorted([xp,yp]))

xm= ((((0,3,5),(2,4,6)),((1,2,5),)),
(((1,3,5),(0,2,4)),((2,5,6),)),
(((0,3,5),(2,4,6)),((1,3,5),(0,2,4))),
(((0,1,4),),       ((1,2,5),)),
(((0,2,5),(1,4,6)),((1,2,5),)),
(((0,2,4),),        ((1,2,5),)),
(((1,3,4),),       ((2,4,5),)),
(((0,2,4),),       ((1,3,4),)),
(((0,2,5),(1,4,6)),((1,4,5),)),
(((0,3,5),(2,4,6)),((2,4,5),)),
(((0,2,4),),       ((1,4,5),)),
(((0,2,5),),       ((1,4,5),)),
(((0,1,4),),       ((0,2,5),)),
(((0,3,4),),       ((1,4,5),)),
(((0,3,4),),       ((2,4,5),)),
(((1,3,5),(0,2,4)),((2,4,5),)),
(((0,2,4),),       ((1,3,5),(0,2,4))),
(((0,2,5),),       ((1,5,6),)),
(((0,2,5),),       ((0,2,5),(1,4,6))),
(((0,4,5),),       ((1,5,6),)),
(((0,2,5),(1,4,6)),((0,4,5),)),
(((0,4,5),),       ((2,5,6),)),
(((0,3,5),(2,4,6)),((0,4,5),)))

xn=[]
for m in xm:
for i in range(7):
st=[]
for a in m[0]:
st=tuple(st)
en=[]
for b in m[1]:
en=tuple(en)
xn.append(tuple(sorted([st,en])))

st=[]
for a in m[0]:
st.reverse()
st=tuple(st)
en=[]
for b in m[1]:
en.reverse()
en=tuple(en)
xn.append(tuple(sorted([st,en])))

xp= ((((0,2,5),),    ((1,3,4),)),
(((0,3,5),),    ((1,2,4),)),
(((0,1,5),),    ((1,3,6),(0,2,4))),
(((0,2,5),),    ((1,3,6),(0,2,4))),
(((0,3,5),),    ((1,3,5),(2,4,6))),
(((0,4,5),),    ((1,3,5),(2,4,6))),
(((1,2,4),),    ((1,3,5),)),
(((0,1,5),),    ((1,2,6),)),
(((1,3,4),),    ((2,4,5),)),
(((1,3,5),),    ((2,4,5),)),
(((1,3,5),(2,4,6)),((2,3,5),)),
(((1,3,5),(2,4,6)),((2,4,5),)),
(((2,4,5),),    ((3,5,6),)),
(((0,3,4),),    ((1,2,5),)),
(((0,2,6),),    ((1,3,4),)), #the last two are from 2v2 term
(((0,4,5),),    ((3,5,6),))) #and this is its p conj

xq=[]
for m in xp:
for i in range(7):
st=[]
for a in m[0]:
st=tuple(st)
en=[]
for b in m[1]:
en=tuple(en)
xq.append(tuple(sorted([st,en])))

st=[]
for a in m[0]:
st.reverse()
st=tuple(st)
en=[]
for b in m[1]:
en.reverse()
en=tuple(en)
xq.append(tuple(sorted([st,en])))

xn=xn+xq

ll=len(xn)

for i in range(ll-1,-1,-1):
if xn.count(xn[i])>1:
xn.pop(i)

exp=[]
for i in range(len(xn)/14):
ll=[]
for j in range(14):
ll=ll+[e for e in H.edges() if diff(e)==xn[14*i+j]]
exp.append(ll)

ssa= (((1, 2, 6),),
((1, 3, 6),),
((1, 4, 5),),
((1, 4, 6), (0, 3, 5)),
((2, 3, 5),),
((2, 4, 6), (0, 3, 5)))

ssb=(((0,1,3),),((0,4,6),),((1,3,6),),((1,4,5),),((2,4,6),(0,3,5)),((2,4,6),(1,3,5)))

tri=(((0, 2, 6),),
((0, 3, 6),),
((0, 4, 6),),
((1, 2, 6),),
((2, 3, 6),),
((3, 4, 6),))