Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

more code for the worksheet

Project: variables-X
Views: 119
1
2
def bar(x):
3
return tuple((6-x[2],6-x[1],6-x[0]))
4
5
def diff(e):
6
inter=[i for i in e[0] if i in e[1]]
7
xp=[i for i in e[0] if i not in inter][0]
8
yp=[i for i in e[1] if i not in inter][0]
9
return tuple(sorted([xp,yp]))
10
11
12
xm= ((((0,3,5),(2,4,6)),((1,2,5),)),
13
(((1,3,5),(0,2,4)),((2,5,6),)),
14
(((0,3,5),(2,4,6)),((1,3,5),(0,2,4))),
15
(((0,1,4),), ((1,2,5),)),
16
(((0,2,5),(1,4,6)),((1,2,5),)),
17
(((0,2,4),), ((1,2,5),)),
18
(((1,3,4),), ((2,4,5),)),
19
(((0,2,4),), ((1,3,4),)),
20
(((0,2,5),(1,4,6)),((1,4,5),)),
21
(((0,3,5),(2,4,6)),((2,4,5),)),
22
(((0,2,4),), ((1,4,5),)),
23
(((0,2,5),), ((1,4,5),)),
24
(((0,1,4),), ((0,2,5),)),
25
(((0,3,4),), ((1,4,5),)),
26
(((0,3,4),), ((2,4,5),)),
27
(((1,3,5),(0,2,4)),((2,4,5),)),
28
(((0,2,4),), ((1,3,5),(0,2,4))),
29
(((0,2,5),), ((1,5,6),)),
30
(((0,2,5),), ((0,2,5),(1,4,6))),
31
(((0,4,5),), ((1,5,6),)),
32
(((0,2,5),(1,4,6)),((0,4,5),)),
33
(((0,4,5),), ((2,5,6),)),
34
(((0,3,5),(2,4,6)),((0,4,5),)))
35
36
xn=[]
37
for m in xm:
38
for i in range(7):
39
st=[]
40
for a in m[0]:
41
st.append(addm(a,i))
42
st=tuple(st)
43
en=[]
44
for b in m[1]:
45
en.append(addm(b,i))
46
en=tuple(en)
47
xn.append(tuple(sorted([st,en])))
48
49
st=[]
50
for a in m[0]:
51
st.append(bar(addm(a,i)))
52
st.reverse()
53
st=tuple(st)
54
en=[]
55
for b in m[1]:
56
en.append(bar(addm(b,i)))
57
en.reverse()
58
en=tuple(en)
59
xn.append(tuple(sorted([st,en])))
60
61
62
xp= ((((0,2,5),), ((1,3,4),)),
63
(((0,3,5),), ((1,2,4),)),
64
(((0,1,5),), ((1,3,6),(0,2,4))),
65
(((0,2,5),), ((1,3,6),(0,2,4))),
66
(((0,3,5),), ((1,3,5),(2,4,6))),
67
(((0,4,5),), ((1,3,5),(2,4,6))),
68
(((1,2,4),), ((1,3,5),)),
69
(((0,1,5),), ((1,2,6),)),
70
(((1,3,4),), ((2,4,5),)),
71
(((1,3,5),), ((2,4,5),)),
72
(((1,3,5),(2,4,6)),((2,3,5),)),
73
(((1,3,5),(2,4,6)),((2,4,5),)),
74
(((2,4,5),), ((3,5,6),)),
75
(((0,3,4),), ((1,2,5),)),
76
(((0,2,6),), ((1,3,4),)), #the last two are from 2v2 term
77
(((0,4,5),), ((3,5,6),))) #and this is its p conj
78
79
xq=[]
80
for m in xp:
81
for i in range(7):
82
st=[]
83
for a in m[0]:
84
st.append(addm(a,i))
85
st=tuple(st)
86
en=[]
87
for b in m[1]:
88
en.append(addm(b,i))
89
en=tuple(en)
90
xq.append(tuple(sorted([st,en])))
91
92
st=[]
93
for a in m[0]:
94
st.append(bar(addm(a,i)))
95
st.reverse()
96
st=tuple(st)
97
en=[]
98
for b in m[1]:
99
en.append(bar(addm(b,i)))
100
en.reverse()
101
en=tuple(en)
102
xq.append(tuple(sorted([st,en])))
103
104
xn=xn+xq
105
106
ll=len(xn)
107
108
for i in range(ll-1,-1,-1):
109
if xn.count(xn[i])>1:
110
xn.pop(i)
111
112
exp=[]
113
for i in range(len(xn)/14):
114
ll=[]
115
for j in range(14):
116
ll=ll+[e for e in H.edges() if diff(e)==xn[14*i+j]]
117
exp.append(ll)
118
119
120
121
ssa= (((1, 2, 6),),
122
((1, 3, 6),),
123
((1, 4, 5),),
124
((1, 4, 6), (0, 3, 5)),
125
((2, 3, 5),),
126
((2, 4, 6), (0, 3, 5)))
127
128
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)))
129
130
tri=(((0, 2, 6),),
131
((0, 3, 6),),
132
((0, 4, 6),),
133
((1, 2, 6),),
134
((2, 3, 6),),
135
((3, 4, 6),))
136
137
138
139
140
141
142
143
144