-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSYKmoments.nb
978 lines (935 loc) · 42.3 KB
/
SYKmoments.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
ClearAll; Clear[g4, t4, mo4, mo6, mo6a, tabc, cu6, cu6a, t8, t6c6, \
mo8, qr, d, n, q];
Clear[emx, sc, qr, erhoex, rhoex, rhoapp, et, tan1b]
emx[eta_, sig_] := 4*sig^2/(1 - eta);
rhocc[en_, eta_, sig_, npr_] :=
Sqrt[1 - en^2/emx[eta, sig]]*
Product[1 - en^2*4/emx[eta, sig]/(eta^n + 1/eta^n + 2), {n, 1,
npr}];
rhocc[en_, eta_, sig_, npr_] :=
Sqrt[1 - en^2/emx[eta, sig]]*
Product[1 - en^2*4/emx[eta, sig]/(eta^n + 1/eta^n + 2), {n, 1,
npr}];
rhocc2[en_, eta_, e0_, npr_] :=
Sqrt[1 - en^2/e0^2]*
Product[1 - en^2*4/e0^2/(eta^n + 1/eta^n + 2), {n, 1, npr}];
sc[N_, q_] :=
Sum[(-1)^(q - m)*Binomial[N, q]*Binomial[q, m]*
Binomial[N - q, q - m], {m, 0, q}]
qr[N_, q_] := sc[N, q]/(Binomial[N, q])^2;
t4q[d_, q_] :=
Sum[Binomial[d - q, r]*Binomial[q, r]*(-1)^(r), {r, 0, q}];
mo4[d_, q_] := 2*(Binomial[d, q])^2 + Binomial[d, q]*t4q[d, q];
t4qc[d_, q_, nc_] :=
Sum[Binomial[d - q, r]*Binomial[q, r]*(-1)^(r), {r, 0, q}];
mo4c[d_, q_, nc_] :=
2*(Binomial[d, q])^2 + Binomial[d, q]*t4qc[d, q, nc];
et[n_, q_] :=
1/Binomial[n, q]*
Sum[(-1)^(q + r)*Binomial[q, r]*Binomial[n - q, q - r], {r, 0,
q}];
Clear[momqh, q, p, d];
momqh[d_, q_, p_] :=
1/(1 - et[d, q])^p *
Sum[(-1)^k*et[d, q]^(k*(k - 1)/2)*Binomial[2*p, p + k], {k, -p, p}];
(*Single traces up to 8th moment*)
momrt[et_, p_] :=
1/(1 - et)^p *
Sum[(-1)^k*et^(k*(k - 1)/2)*Binomial[2*p, p + k], {k, -p, p}];
mo6a[d_, q_, a0_, a4_, a44_, a6_] :=
5*a0*(Binomial[d, q])^3 + 6*a4*(Binomial[d, q])^2*t4q[d, q] +
3*a44*Binomial[d, q]*(t4q[d, q])^2 + a6*tabct[d, q];
Bn[d_, q_] := Binomial[d, q];
Bn1[d_, q_] := d!/q!/(d - q)!;
mo8[d_, q_, a0_, a4_, a44_, a444_, a4444_, a6_, a46_, a6c_, a8_] :=
14*Bn[d, q]^4 *a0 + 28*a4*Bn[d, q]^3*t4q[d, q] +
28*a44*Bn[d, q]^2*t4q[d, q]^2 + 8*Bn[d, q]*a6*tabct[d, q] +
12*a444*Bn[d, q]*t4q[d, q]^3 +
2*a4444*t6c6nc[d, q]*Binomial[d, q] + a46*8*t4q[d, q]*tabct[d, q] +
a6c*4*t6c6[d, q]*Bn[d, q] + a8*tan1[d, q];
tabct[d_, q_] :=
Binomial[d,
q]*(Sum[Sum[
Sum[ (-1)^(q1 + m + q)*Binomial[d - 2*q + q1, q - l]*
Binomial[2*q - 2*q1, m]*Binomial[d - q, q - q1]*
Binomial[q, q1]*Binomial[q1, l - m] , {m, 0, l}], {l, 0,
q}] , {q1, 0, q}]
);
t6c6[d_, q_] := Sum[Sum[Sum[Sum[Sum[ (-1)^(q1 + m + m1 + q)*
Binomial[d - 2*q + q1, q - l]*Binomial[2*q - 2*q1, m]*
Binomial[q1, l - m]*Binomial[d - 2*q + q1, q - l1]*
Binomial[2*q - 2*q1, m1]*Binomial[q1, l1 - m1]*
Binomial[d - q, q - q1]*Binomial[q, q1] , {m, 0, l}], {l, 0,
q}], {m1, 0, l1}], {l1, 0, q}] , {q1, 0, q}];
t6c6nc[d_, q_] := Sum[Sum[Sum[Sum[Sum[ (-1)^(m + m1)*
Binomial[d - 2*q + q1, q - l]*Binomial[2*q - 2*q1, m]*
Binomial[q1, l - m]*Binomial[d - 2*q + q1, q - l1]*
Binomial[2*q - 2*q1, m1]*Binomial[q1, l1 - m1]*
Binomial[d - q, q - q1]*Binomial[q, q1] , {m, 0, l}], {l, 0,
q}], {m1, 0, l1}], {l1, 0, q}] , {q1, 0, q}];
t6c6p[d_, q_] :=
Sum[Sum[Sum[
Sum[Sum[
N[Binomial[d - 2*q + q1, q - l]*Binomial[2*q - 2*q1, m]*
Binomial[q1, l - m]*Binomial[d - 2*q + q1, q - l1]*
Binomial[2*q - 2*q1, m1]*Binomial[q1, l1 - m1]*
Binomial[d - q, q - q1]*Binomial[q, q1] ], {m, 0, l}], {l, 0,
q}], {m1, 0, l1}], {l1, 0, q}] , {q1, 0, q}];
t8[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[Sum[N[(-1)^(r + m2 + k2 + s + q)*HeavisideTheta[d - q]*
HeavisideTheta[d - 2*q + r]*
HeavisideTheta[d - 3*q + r + m1 + m2]*
Binomial[d - q, q - r]*Binomial[q, r]*
Binomial[2*q - 2*r, m2]*Binomial[d - 2*q + r, q - m1 - m2]*
Binomial[r, m1]*Binomial[2*q - 2*r, k2]*Binomial[r, k1]*
Binomial[q - m1 - m2, s]*
Binomial[d - 3*q + r + m1 + m2, q - s - k1 - k2]], {s, 0,
q - m1 - m2}], {m1, 0, r}], {m2, 0, q}], {k1, 0, r}], {k2,
0, q}], {r, 0, q}] ;
t8p[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[Sum[Binomial[d - q, q - r]*Binomial[q, r]*
Binomial[2*q - 2*r, m2]*Binomial[d - 2*q + r, q - m1 - m2]*
Binomial[r, m1]*Binomial[2*q - 2*r, k2]*Binomial[r, k1]*
Binomial[q - m1 - m2, s]*
Binomial[d - 3*q + r + m1 + m2, q - s - k1 - k2], {s, 0,
q - m1 - m2}], {m1, 0, q - m2}], {m2, 0, q}], {k1, 0,
r}], {k2, 0, q}], {r, 0, q}] ;
tan1[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[Sum[Sum[
Sum[(-1)^(q1 + q2 + m2 + t)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*Bn[m1, m1 - l1]*
Bn[m2, m2 - l2]*
Bn[d - 2*q + q1, q - (m1 - l1 + m2 - l2)]*
Bn[m1 - l1, s]*Bn[m2 - l2, t]*
Bn[q - (m1 - l1 + m2 - l2), q2 - s - t]
*
Bn[d - 3*q + q1 + m1 - l1 + m2 - l2,
q - (q2 + l1 + l2)], {s, 0, m1 - l1}], {t, 0, m2 - l2}],
{l1, 0, m1}], {l2, 0, m2}], {m1, 0, q1}], {m2, 0,
2*q - 2*q1}], {q1, 0, q}], {q2, 0, q}];
Ftan1[d_, q_, q1_, q2_, m1_, m2_, l1_, l2_, s_, t_] :=
Bn[d, q]*(-1)^(q1 + q2 + m2 + t)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*Bn[m1, m1 - l1]*Bn[m2, m2 - l2]*
Bn[d - 2*q + q1, q - (m1 - l1 + m2 - l2)]*
Bn[m1 - l1, s]*Bn[m2 - l2, t]*
Bn[q - (m1 - l1 + m2 - l2), q2 - s - t]*
Bn[d - 3*q + q1 + m1 - l1 + m2 - l2, q - (q2 + l1 + l2)];
tan1ap[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[Sum[Sum[
Sum[(-1)^(0*(q1 + q2 + m2 + t))*Bn[d - q, q - q1]*
Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*Bn[m1, m1 - l1]*
Bn[m2, m2 - l2]*
Bn[d - 2*q + q1, q - (m1 - l1 + m2 - l2)]*
Bn[m1 - l1, s]*Bn[m2 - l2, t]*
Bn[q - (m1 - l1 + m2 - l2), q2 - s - t]
*
Bn[d - 3*q + q1 + m1 - l1 + m2 - l2,
q - (q2 + l1 + l2)], {s, 0, m1 - l1}], {t, 0, m2 - l2}],
{l1, 0, m1}], {l2, 0, m2}], {m1, 0, q1}], {m2, 0,
2*q - 2*q1}], {q1, 0, q}], {q2, 0, q}];
tan1b[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[Sum[Sum[
Sum[(-1)^(q1 + q2 + m2 + t)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*Bn[m1, s]*
Bn[m1 - s, l1 - s]*Bn[m2, t]*Bn[m2 - t, l2 - t]*
Bn[d - 2*q + q1, 2*q - q2 - m1 - m2]*
Bn[2*q - q2 - m1 - m2, q2 - s - t]*
Bn[2*q - 2*q2 - m1 - m2 + s + t,
q - q2 - m1 - m2 + l1 + l2], {s, 0, l1}], {t, 0, l2}],
{l1, 0, q}], {l2, 0, q}], {m1, 0, q1}], {m2, 0,
2*q - 2*q1}], {q1, 0, q}], {q2, 0, q}];
tan1d[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[Sum[Sum[(-1)^(q1 + q2 + m2 + t)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*Bn[m1, s]*
Bn[m1 + m2 - s - t, l - s - t]*Bn[m2, t]*
Bn[d - 2*q + q1, 2*q - q2 - m1 - m2]*
Bn[2*q - q2 - m1 - m2, q2 - s - t]*
Bn[2*q - 2*q2 - m1 - m2 + s + t, q - q2 - m1 - m2 + l], {s,
0, q}], {t, 0, q}],
{l, 0, q}], {m1, 0, q1}], {m2, 0, 2*q - 2*q1}], {q1, 0,
q}], {q2, 0, q}];
tan1e[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[Sum[(-1)^(q1 + q2 + m2 + t)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*Bn[m1, s]*Bn[m2, t]*
Bn[d - 2*q + q1, 2*q - q2 - m1 - m2]*
Bn[2*q - q2 - m1 - m2, q2 - s - t]*Bn[2*q - 2*q2, q - q2],
{s, 0, q}], {t, 0, q}],
{m1, 0, q1}], {m2, 0, 2*q - 2*q1}], {q1, 0, q}], {q2, 0, q}];
tan1f[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[(-1)^(q1 + q2 + m2 + t)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*Bn[m2, t]*
Bn[d - 2*q + q1, 2*q - q2 - m1 - m2]*
Bn[2*q - q2 - m2, q2 - t]*Bn[2*q - 2*q2, q - q2], {t, 0,
q}],
{m1, 0, q1}], {m2, 0, 2*q - 2*q1}], {q1, 0, q}], {q2, 0, q}];
tan1g[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[(-1)^(q1 + q2 + m2 + t)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[m2, t]*
Bn[d - 2*q + 2 q1, 2*q - q2 - m2]*Bn[2*q - q2 - m2, q2 - t]*
Bn[2*q - 2*q2, q - q2], {t, 0, q}],
{m2, 0, 2*q - 2*q1}], {q1, 0, q}], {q2, 0, q}];
tan1c[d_, q_] :=
Bn[d, q]*Sum[
Sum[Sum[Sum[
Sum[(-1)^(q1 + q2 + m2 + t)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*
Bn[2*q - 2*q2, q - q2]*Bn[d - 2*q + q1, 2*q - q2 - m1 - m2]*
Bn[2*q - q2 - m2, q2 - t]*Bn[m2, t], {t, 0, q}],
{m1, 0, q}], {m2, 0, q}], {q1, 0, q}], {q2, 0, q}];
tan1p[d_, q_] :=
Bn[d, q]*Sum[Sum[Sum[Sum[Sum[Sum[Sum[Sum[Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*Bn[m1, m1 - l1]*
Bn[m2, m2 - l2]*
Bn[d - 2*q + q1, q - (m1 - l1 + m2 - l2)]*
Bn[m1 - l1, s]*Bn[m2 - l2, t]*
Bn[q - (m1 - l1 + m2 - l2), q2 - s - t]
*
Bn[d - 3*q + q1 + m1 - l1 + m2 - l2,
q - (q2 + l1 + l2)], {s, 0, m1 - l1}], {t, 0, m2 - l2}],
{l1, 0, m1}], {l2, 0, m2}], {m1, 0, q1}], {m2, 0,
2*q - 2*q1}], {q1, 0, q}], {q2, 0, q}];
tan1smp[d_, q_] :=
Bn[d, q]*Sum[(-1)^(q + q1 + m2 + s2)*Bn[d - q, q - q1]*Bn[q, q1]*
Bn[2*q - 2*q1, m2]*Bn[q1, m1]*
Bn[m2, k2]*Bn[k2, s2]*Bn[d - 2*q + q1 + m1, q - k2]*
Bn[d - 2*q + q1 - k2, q - s2 - (m1 + m2)], {q1, 0, q}, {m1, 0,
q1}, {m2, 0, 2*q - 2*q1}, {k2, 0, m2}, {s2, 0, k2}];
mom8[d_, q_] :=
mo8[d, q, 1, 1, 1, 1, 1, 1, 1, 1, 1]/Binomial[d, q]^4;
mom6[d_, q_] := mo6a[d, q, 1, 1, 1, 1]/Binomial[d, q]^3;
mom4[d_, q_] := mo4[d, q]/Binomial[d, q]^2;
cu4[d_, q_] := mom4[d, q] - 3;
cu6[d_, q_] := mom6[d, q] - 15 mom4[d, q] + 30;
cu8[d_, q_] :=
mom8[d, q] - 28 mom6[d, q] - 35 mom4[d, q]^2 + 420 mom4[d, q] -
630;
cu4o[d_, q_] := mom4[d, q] - 1;
cu6o[d_, q_] := mom6[d, q] - 3 mom4[d, q] + 2;
cu8o[d_, q_] :=
mom8[d, q] - 4 mom6[d, q] - 3 mom4[d, q]^2 + 12 mom4[d, q] - 6;
t6c6p[24, 4]/Binomial[24, 4]^3;
(*Double traces up to <Tr H^6 Tr H^6>*)
testFromCotlerAppenF[n_, q_, k_] :=
2^(-n) Binomial[n, q]^(-k) Sum[
Binomial[n,
m] (Sum[Binomial[m, p] Binomial[n - m, q - p] (-1)^p, {p, 0,
q}])^k, {m, 0, n}];
t123123[n_, q_] :=
t123123[n, q] = Binomial[n, q]^(-3) n!/(n - 3 q/2)! 1/(q/2)!^3;
sol12341234[q_] :=
sol12341234[q] =
Solve[ab + ac + ad + abcd == q && ab + bc + bd + abcd == q &&
ac + bc + cd + abcd == q && ad + bd + cd + abcd == q &&
0 <= ab <= q && 0 <= ac <= q && 0 <= ad <= q && 0 <= bc <= q &&
0 <= bd <= q && 0 <= cd <= q && 0 <= abcd <= q, {ab, ac, ad, bc,
bd, cd, abcd}, Integers];
t12341234[n_, q_] :=
t12341234[n, q] =
Module[{d2, d3, d4}, d2 = ab + ac + ad + bc + bd + cd;
d4 = abcd;
Binomial[n, q]^(-4) Sum[
n!/(n - 4 q + d2 + 3 d4)! 1/(ab! ac! ad! bc! bd! cd! abcd!) /.
sol12341234[q][[i]], {i, 1, Length[sol12341234[q]]}]];
t12341243[n_, q_] :=
t12341243[n, q] =
Module[{d2, d3, d4}, d2 = ab + ac + ad + bc + bd + cd;
d4 = abcd;
(-1)^q Binomial[n,
q]^(-4) Sum[(-1)^(cd + abcd) n!/(n - 4 q + d2 + 3 d4)! 1/(
ab! ac! ad! bc! bd! cd! abcd!) /. sol12341234[q][[i]], {i, 1,
Length[sol12341234[q]]}]];
sol1234ee1234[q_] :=
sol1234ee1234[q] =
Solve[{{1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1}, {1, 0, 0, 1, 1,
0, 1, 0, 0, 1, 1, 0, 1, 1}, {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 1, 1}, {0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1}}.{ab,
ac, ad, bc, bd, cd, abe, ace, ade, bce, bde, cde, abcd,
abcde} == {q, q, q, q} &&
ConstantArray[0, 14] <= {ab, ac, ad, bc, bd, cd, abe, ace, ade,
bce, bde, cde, abcd, abcde} <= ConstantArray[q, 14], {ab, ac,
ad, bc, bd, cd, abe, ace, ade, bce, bde, cde, abcd, abcde},
Integers];
t1234e12e34[n_, q_] :=
t1234e12e34[n, q] =
Module[{d2, d3, d4, d5, aeIntersect, beIntersect},
d2 = ab + ac + ad + bc + bd + cd;
d3 = abe + ace + ade + bce + bde + cde;
d4 = abcd; d5 = abcde;
aeIntersect = abe + ace + ade + abcde;
beIntersect = abe + bce + bde + abcde;
Binomial[n,
q]^(-5) Sum[(-1)^(aeIntersect + beIntersect) n!/(n - 5 q +
d2 + 2 d3 + 3 d4 + 4 d5)! 1/(q - abe - ace - ade - bce -
bde - cde - abcde)! 1/(ab! ac! ad! bc! bd! cd!) 1/(
abe! ace! ade! bce! bde! cde!) 1/abcd! 1/abcde! /.
sol1234ee1234[q][[i]], {i, 1, Length[sol1234ee1234[q]]}]];
t1234e12e43[n_, q_] :=
t1234e12e43[n, q] =
Module[{d2, d3, d4, d5, aeIntersect, beIntersect, cdIntersect},
d2 = ab + ac + ad + bc + bd + cd;
d3 = abe + ace + ade + bce + bde + cde;
d4 = abcd; d5 = abcde;
aeIntersect = abe + ace + ade + abcde;
beIntersect = abe + bce + bde + abcde;
cdIntersect = cd + cde + abcd + abcde;
(-1)^q Binomial[n,
q]^(-5) Sum[(-1)^(aeIntersect + beIntersect +
cdIntersect) n!/(n - 5 q + d2 + 2 d3 + 3 d4 + 4 d5)! 1/(q -
abe - ace - ade - bce - bde - cde - abcde)! 1/(
ab! ac! ad! bc! bd! cd!) 1/(abe! ace! ade! bce! bde! cde!) 1/
abcd! 1/abcde! /. sol1234ee1234[q][[i]], {i, 1,
Length[sol1234ee1234[q]]}]];
t1234e13e24[n_, q_] :=
t1234e13e24[n, q] =
Module[{d2, d3, d4, d5, aeIntersect, ceIntersect, bcIntersect},
d2 = ab + ac + ad + bc + bd + cd;
d3 = abe + ace + ade + bce + bde + cde;
d4 = abcd; d5 = abcde;
solsubsti =
Solve[ab + ac + ad + abe + ace + ade + abcd + abcde == q &&
ab + bc + bd + abe + bce + bde + abcd + abcde == q &&
ac + bc + cd + ace + bce + cde + abcd + abcde == q &&
ad + bd + cd + ade + bde + cde + abcd + abcde == q &&
0 <= ab <= q && 0 <= ac <= q && 0 <= ad <= q && 0 <= bc <= q &&
0 <= bd <= q && 0 <= cd <= q && 0 <= abe <= q &&
0 <= ace <= q && 0 <= ade <= q && 0 <= bce <= q &&
0 <= bde <= q && 0 <= cde <= q && 0 <= abcd <= q &&
0 <= abcde <= q, {ab, ac, ad, bc, bd, cd, abe, ace, ade, bce,
bde, cde, abcd, abcde}, Integers];
aeIntersect = abe + ace + ade + abcde;
ceIntersect = ace + bce + cde + abcde;
bcIntersect = bc + bce + abcd + abcde;
(-1)^q Binomial[n,
q]^(-5) Sum[(-1)^(aeIntersect + ceIntersect +
bcIntersect) n!/(n - 5 q + d2 + 2 d3 + 3 d4 + 4 d5)! 1/(q -
abe - ace - ade - bce - bde - cde - abcde)! 1/(
ab! ac! ad! bc! bd! cd!) 1/(abe! ace! ade! bce! bde! cde!) 1/
abcd! 1/abcde! /. sol1234ee1234[q][[i]], {i, 1,
Length[sol1234ee1234[q]]}]];
(*Should equal t12341234*)
t1234ee1234[n_, q_] :=
t1234ee1234[n, q] =
Module[{d2, d3, d4, d5, aeIntersect, beIntersect},
d2 = ab + ac + ad + bc + bd + cd;
d3 = abe + ace + ade + bce + bde + cde;
d4 = abcd; d5 = abcde;
aeIntersect = abe + ace + ade + abcde;
beIntersect = abe + bce + bde + abcde;
Binomial[n, q]^(-5) Sum[
n!/(n - 5 q + d2 + 2 d3 + 3 d4 + 4 d5)! 1/(q - abe - ace - ade -
bce - bde - cde - abcde)! 1/(ab! ac! ad! bc! bd! cd!) 1/(
abe! ace! ade! bce! bde! cde!) 1/abcd! 1/abcde! /.
sol1234ee1234[q][[i]], {i, 1, Length[sol1234ee1234[q]]}]];
(*Should equal \[Eta]*t12341234*)
t1234e1e234[n_, q_] :=
t1234e1e234[n, q] =
Module[{d2, d3, d4, d5, aeIntersect, beIntersect},
d2 = ab + ac + ad + bc + bd + cd;
d3 = abe + ace + ade + bce + bde + cde;
d4 = abcd; d5 = abcde;
aeIntersect = abe + ace + ade + abcde;
beIntersect = abe + bce + bde + abcde;
Binomial[n,
q]^(-5) Sum[(-1)^(aeIntersect) n!/(n - 5 q + d2 + 2 d3 +
3 d4 + 4 d5)! 1/(q - abe - ace - ade - bce - bde - cde -
abcde)! 1/(ab! ac! ad! bc! bd! cd!) 1/(
abe! ace! ade! bce! bde! cde!) 1/abcd! 1/abcde! /.
sol1234ee1234[q][[i]], {i, 1, Length[sol1234ee1234[q]]}]];
sol1234512345[q_] :=
sol1234512345[q] =
Solve[{{1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}, {1, 0, 0, 0,
1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1}, {0, 1, 0, 0, 1, 0, 0, 1, 1,
0, 1, 1, 0, 1, 1}, {0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1,
1, 1}, {0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1}}. {ab,
ac, ad, ae, bc, bd, be, cd, ce, de, abcd, abce, abde, acde,
bcde} == {q, q, q, q, q} &&
ConstantArray[0, 15] <= {ab, ac, ad, ae, bc, bd, be, cd, ce, de,
abcd, abce, abde, acde, bcde} <= ConstantArray[q, 15], {ab, ac,
ad, ae, bc, bd, be, cd, ce, de, abcd, abce, abde, acde, bcde},
Integers];
t1234512345[n_, q_] :=
t1234512345[n, q] =
Module[{d2, d3, d4, d5},
d2 = ab + ac + ad + bc + bd + cd + ae + be + ce + de; d3 = 0;
d4 = abcd + abce + abde + acde + bcde; d5 = 0;
Binomial[n, q]^(-5) Sum[
n!/(n - 5 q + d2 + 2 d3 + 3 d4 + 4 d5)! 1/(
ab! ac! ad! bc! bd! cd! ae! be! ce! de!) 1/(
abcd! abce! abde! acde! bcde!) /. sol1234512345[q][[i]], {i,
1, Length[sol1234512345[q]]}]];
t1234512354[n_, q_] :=
t1234512354[n, q] =
Module[{d2, d3, d4, d5, deIntersect},
d2 = ab + ac + ad + bc + bd + cd + ae + be + ce + de; d3 = 0;
d4 = abcd + abce + abde + acde + bcde; d5 = 0;
deIntersect = de + abde + acde + bcde;
(-1)^q Binomial[n,
q]^(-5) Sum[(-1)^
deIntersect n!/(n - 5 q + d2 + 2 d3 + 3 d4 + 4 d5)! 1/(
ab! ac! ad! bc! bd! cd! ae! be! ce! de!) 1/(
abcd! abce! abde! acde! bcde!) /. sol1234512345[q][[i]], {i,
1, Length[sol1234512345[q]]}]];
t1234512453[n_, q_] :=
t1234512453[n, q] =
Module[{d2, d3, d4, d5, cdIntersect, ceIntersect},
d2 = ab + ac + ad + bc + bd + cd + ae + be + ce + de; d3 = 0;
d4 = abcd + abce + abde + acde + bcde; d5 = 0;
cdIntersect = cd + abcd + acde + bcde;
ceIntersect = ce + abce + acde + bcde;
Binomial[n,
q]^(-5) Sum[(-1)^(ceIntersect + cdIntersect) n!/(n - 5 q +
d2 + 2 d3 + 3 d4 + 4 d5)! 1/(
ab! ac! ad! bc! bd! cd! ae! be! ce! de!) 1/(
abcd! abce! abde! acde! bcde!) /. sol1234512345[q][[i]], {i,
1, Length[sol1234512345[q]]}]];
t1234513524[n_, q_] :=
t1234513524[n, q] =
Module[{d2, d3, d4, d5, bcIntersect, beIntersect, deIntersect},
d2 = ab + ac + ad + bc + bd + cd + ae + be + ce + de; d3 = 0;
d4 = abcd + abce + abde + acde + bcde; d5 = 0;
bcIntersect = bc + abcd + abce + bcde;
beIntersect = be + abce + abde + bcde;
deIntersect = de + acde + abde + bcde;
(-1)^q Binomial[n,
q]^(-5) Sum[(-1)^(bcIntersect + beIntersect +
deIntersect) n!/(n - 5 q + d2 + 2 d3 + 3 d4 + 4 d5)! 1/(
ab! ac! ad! bc! bd! cd! ae! be! ce! de!) 1/(
abcd! abce! abde! acde! bcde!) /. sol1234512345[q][[i]], {i,
1, Length[sol1234512345[q]]}]];
t1234512345another[n_, q_] :=
Module[{d2, d3, d4, d5, bcIntersect, beIntersect, deIntersect},
d2 = ab + ac + ad + bc + bd + cd + ae + be + ce + de; d3 = 0;
d4 = abcd + abce + abde + acde + bcde; d5 = 0;
bcIntersect = bc + abcd + abce + bcde;
beIntersect = be + abce + abde + bcde;
deIntersect = de + acde + abde + bcde;
Binomial[n, q]^(-5) Sum[
KroneckerDelta[
ab + ac + ad + ae + abcd + abce + abde + acde -
q] KroneckerDelta[
ab + bc + bd + be + abcd + abce + abde + bcde -
q] KroneckerDelta[
ac + bc + cd + ce + abcd + abce + acde + bcde -
q] KroneckerDelta[
ad + bd + cd + de + abcd + abde + acde + bcde -
q] KroneckerDelta[
ae + be + ce + de + abce + abde + acde + bcde -
q] (-1)^(bcIntersect + beIntersect + deIntersect) n!/(n -
5 q + d2 + 2 d3 + 3 d4 + 4 d5)! 1/(
ab! ac! ad! bc! bd! cd! ae! be! ce! de!) 1/(
abcd! abce! abde! acde! bcde!), {ab, 0, q}, {ac, 0, q}, {ad, 0,
q}, {bc, 0, q}, {bd, 0, q}, {cd, 0, q}, {ae, 0, q}, {be, 0,
q}, {ce, 0, q}, {de, 0, q}, {abcd, 0, q}, {abce, 0, q}, {abde,
0, q}, {acde, 0, q}, {bcde, 0, q}]];
(*Double traces with 6 index sets, much more run time*)
solee1234ff1234[q_] := solee1234ff1234[q] =
Solve[{{1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1,
1, 1, 0, 0, 0, 1, 1, 1, 1}, {1, 0, 0, 1, 1, 0, 0, 1, 0, 0,
1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1}, {0,
1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 1, 1, 1, 1}, {0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1,
1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1}}.{ab, ac,
ad, bc, bd, cd, ef, abe, ace, ade, bce, bde, cde, abf, acf,
adf, bcf, bdf, cdf, abef, acef, adef, bcef, bdef, cdef, abcd,
abcde, abcdf, abcdef} == q &&
ConstantArray[0, 29] <= {ab, ac, ad, bc, bd, cd, ef, abe, ace,
ade, bce, bde, cde, abf, acf, adf, bcf, bdf, cdf, abef, acef,
adef, bcef, bdef, cdef, abcd, abcde, abcdf, abcdef} <=
ConstantArray[q, 29], {ab, ac, ad, bc, bd, cd, ef, abe, ace,
ade, bce, bde, cde, abf, acf, adf, bcf, bdf, cdf, abef, acef,
adef, bcef, bdef, cdef, abcd, abcde, abcdf, abcdef}, Integers];
(*should equal tt12341234*)
tee123434ff1234[n_, q_] :=
tee123434ff1234[n, q] =
Module[{d2, d3, d4, d5, d6, aeIntersect, beIntersect, afIntersect,
bfIntersect}, d2 = ab + ac + ad + bc + bd + cd + ef;
d3 = abe + ace + ade + bce + bde + cde + abf + acf + adf + bcf +
bdf + cdf;
d4 = abef + acef + adef + bcef + bdef + cdef + abcd;
d5 = abcde + abcdf; d6 = abcdef;
aeIntersect =
abe + ace + ade + abef + acef + adef + abcde + abcdef;
beIntersect =
abe + bce + bde + abef + bcef + bdef + abcde + abcdef;
afIntersect =
abf + acf + adf + abef + acef + adef + abcdf + abcdef;
bfIntersect =
abf + bcf + bdf + abef + bcef + bdef + abcdf + abcdef;
Binomial[n, q]^(-6) Sum[
n!/(n - 6 q + d2 + 2 d3 + 3 d4 + 4 d5 + 5 d6)! 1/(q - ef - abe -
ace - ade - bce - bde - cde - abef - acef - adef - bcef -
bdef - cdef - abcde - abcdef)! 1/(q - ef - abf - acf -
adf - bcf - bdf - cdf - abef - acef - adef - bcef - bdef -
cdef - abcdf - abcdef)! 1/(ab! ac! ad! bc! bd! cd! ef!) 1/(
abe! ace! ade! bce! bde! cde! abf! acf! adf! bcf! bdf! cdf!)
1/(abcd! abef! acef! adef! bcef! bdef! cdef!) 1/(
abcde! abcdf!) 1/abcdef! /. solee1234ff1234[q][[i]], {i, 1,
Length[solee1234ff1234[q]]}]];
te12e34f12f34[n_, q_] :=
te12e34f12f34[n, q] =
Module[{d2, d3, d4, d5, d6, aeIntersect, beIntersect, afIntersect,
bfIntersect}, d2 = ab + ac + ad + bc + bd + cd + ef;
d3 = abe + ace + ade + bce + bde + cde + abf + acf + adf + bcf +
bdf + cdf;
d4 = abef + acef + adef + bcef + bdef + cdef + abcd;
d5 = abcde + abcdf; d6 = abcdef;
aeIntersect =
abe + ace + ade + abef + acef + adef + abcde + abcdef;
beIntersect =
abe + bce + bde + abef + bcef + bdef + abcde + abcdef;
afIntersect =
abf + acf + adf + abef + acef + adef + abcdf + abcdef;
bfIntersect =
abf + bcf + bdf + abef + bcef + bdef + abcdf + abcdef;
Binomial[n,
q]^(-6) Sum[ (-1)^(aeIntersect + beIntersect + afIntersect +
bfIntersect) n!/(n - 6 q + d2 + 2 d3 + 3 d4 + 4 d5 +
5 d6)! 1/(q - ef - abe - ace - ade - bce - bde - cde -
abef - acef - adef - bcef - bdef - cdef - abcde -
abcdef)! 1/(q - ef - abf - acf - adf - bcf - bdf - cdf -
abef - acef - adef - bcef - bdef - cdef - abcdf -
abcdef)! 1/(ab! ac! ad! bc! bd! cd! ef!) 1/(
abe! ace! ade! bce! bde! cde! abf! acf! adf! bcf! bdf! cdf!)
1/(abcd! abef! acef! adef! bcef! bdef! cdef!) 1/(
abcde! abcdf!) 1/abcdef! /. solee1234ff1234[q][[i]], {i, 1,
Length[solee1234ff1234[q]]}]];
te12e34f12f43[n_, q_] :=
te12e34f12f43[n, q] =
Module[{d2, d3, d4, d5, d6, aeIntersect, beIntersect, afIntersect,
bfIntersect, cdIntersect}, d2 = ab + ac + ad + bc + bd + cd + ef;
d3 =
abe + ace + ade + bce + bde + cde + abf + acf + adf + bcf + bdf +
cdf;
d4 = abef + acef + adef + bcef + bdef + cdef + abcd;
d5 = abcde + abcdf; d6 = abcdef;
aeIntersect =
abe + ace + ade + abef + acef + adef + abcde + abcdef;
beIntersect =
abe + bce + bde + abef + bcef + bdef + abcde + abcdef;
afIntersect =
abf + acf + adf + abef + acef + adef + abcdf + abcdef;
bfIntersect =
abf + bcf + bdf + abef + bcef + bdef + abcdf + abcdef;
cdIntersect =
cd + cde + cdf + cdef + abcd + abcde + abcdf + abcdef;
(-1)^q Binomial[n,
q]^(-6) Sum[ (-1)^(aeIntersect + beIntersect + afIntersect +
bfIntersect + cdIntersect) n!/(n - 6 q + d2 + 2 d3 +
3 d4 + 4 d5 + 5 d6)! 1/(q - ef - abe - ace - ade - bce -
bde - cde - abef - acef - adef - bcef - bdef - cdef -
abcde - abcdef)! 1/(q - ef - abf - acf - adf - bcf - bdf -
cdf - abef - acef - adef - bcef - bdef - cdef - abcdf -
abcdef)! 1/(ab! ac! ad! bc! bd! cd! ef!) 1/(
abe! ace! ade! bce! bde! cde! abf! acf! adf! bcf! bdf! cdf!)
1/(abcd! abef! acef! adef! bcef! bdef! cdef!) 1/(
abcde! abcdf!) 1/abcdef! /. solee1234ff1234[q][[i]], {i, 1,
Length[solee1234ff1234[q]]}]];
(* {ab,ac,ad,bc,bd,cd,ef,abe,ace,ade,bce,bde,cde,abf,acf,adf,bcf,bdf,\
cdf,abef,acef,adef,bcef,bdef,cdef,abcd,abcde,abcdf,abcdef}*)
te12e34f13f24[n_, q_] :=
te12e34f13f24[n, q] =
Module[{d2, d3, d4, d5, d6, aeIntersect, beIntersect, afIntersect,
bcIntersect, cfIntersect}, d2 = ab + ac + ad + bc + bd + cd + ef;
d3 = abe + ace + ade + bce + bde + cde + abf + acf + adf + bcf +
bdf + cdf;
d4 = abef + acef + adef + bcef + bdef + cdef + abcd;
d5 = abcde + abcdf; d6 = abcdef;
aeIntersect =
abe + ace + ade + abef + acef + adef + abcde + abcdef;
beIntersect =
abe + bce + bde + abef + bcef + bdef + abcde + abcdef;
afIntersect =
abf + acf + adf + abef + acef + adef + abcdf + abcdef;
cfIntersect =
acf + bcf + cdf + acef + bcef + cdef + abcdf + abcdef;
bcIntersect =
bc + bce + bcf + bcef + abcd + abcde + abcdf + abcdef;
(-1)^q Binomial[n,
q]^(-6) Sum[ (-1)^(aeIntersect + beIntersect + afIntersect +
bcIntersect + cfIntersect) n!/(n - 6 q + d2 + 2 d3 +
3 d4 + 4 d5 + 5 d6)! 1/(q - ef - abe - ace - ade - bce -
bde - cde - abef - acef - adef - bcef - bdef - cdef -
abcde - abcdef)! 1/(q - ef - abf - acf - adf - bcf - bdf -
cdf - abef - acef - adef - bcef - bdef - cdef - abcdf -
abcdef)! 1/(ab! ac! ad! bc! bd! cd! ef!) 1/(
abe! ace! ade! bce! bde! cde! abf! acf! adf! bcf! bdf! cdf!)
1/(abcd! abef! acef! adef! bcef! bdef! cdef!) 1/(
abcde! abcdf!) 1/abcdef! /. solee1234ff1234[q][[i]], {i, 1,
Length[solee1234ff1234[q]]}]];
te12e34f13f42[n_, q_] :=
te12e34f13f42[n, q] =
Module[{d2, d3, d4, d5, d6, aeIntersect, beIntersect, afIntersect,
bcIntersect, cfIntersect, bdIntersect},
d2 = ab + ac + ad + bc + bd + cd + ef;
d3 = abe + ace + ade + bce + bde + cde + abf + acf + adf + bcf +
bdf + cdf;
d4 = abef + acef + adef + bcef + bdef + cdef + abcd;
d5 = abcde + abcdf; d6 = abcdef;
aeIntersect =
abe + ace + ade + abef + acef + adef + abcde + abcdef;
beIntersect =
abe + bce + bde + abef + bcef + bdef + abcde + abcdef;
afIntersect =
abf + acf + adf + abef + acef + adef + abcdf + abcdef;
cfIntersect =
acf + bcf + cdf + acef + bcef + cdef + abcdf + abcdef;
bcIntersect =
bc + bce + bcf + bcef + abcd + abcde + abcdf + abcdef;
bdIntersect =
bd + bde + bdf + bdef + abcd + abcde + abcdf + abcdef;
Binomial[n,
q]^(-6) Sum[ (-1)^(aeIntersect + beIntersect + afIntersect +
bcIntersect + cfIntersect + bdIntersect) n!/(n - 6 q +
d2 + 2 d3 + 3 d4 + 4 d5 + 5 d6)! 1/(q - ef - abe - ace -
ade - bce - bde - cde - abef - acef - adef - bcef - bdef -
cdef - abcde - abcdef)! 1/(q - ef - abf - acf - adf - bcf -
bdf - cdf - abef - acef - adef - bcef - bdef - cdef -
abcdf - abcdef)! 1/(ab! ac! ad! bc! bd! cd! ef!) 1/(
abe! ace! ade! bce! bde! cde! abf! acf! adf! bcf! bdf! cdf!)
1/(abcd! abef! acef! adef! bcef! bdef! cdef!) 1/(
abcde! abcdf!) 1/abcdef! /. solee1234ff1234[q][[i]], {i, 1,
Length[solee1234ff1234[q]]}]];
(* {ab,ac,ad,bc,bd,cd,ef,abe,ace,ade,bce,bde,cde,abf,acf,adf,bcf,bdf,\
cdf,abef,acef,adef,bcef,bdef,cdef,abcd,abcde,abcdf,abcdef}*)
(*should \
equal te12e34f13f42*)
te12e34f14f23[n_, q_] :=
te12e34f14f23[n, q] =
Module[{d2, d3, d4, d5, d6, aeIntersect, beIntersect, afIntersect,
cdIntersect, bdIntersect, dfIntersect},
d2 = ab + ac + ad + bc + bd + cd + ef;
d3 = abe + ace + ade + bce + bde + cde + abf + acf + adf + bcf +
bdf + cdf;
d4 = abef + acef + adef + bcef + bdef + cdef + abcd;
d5 = abcde + abcdf; d6 = abcdef;
aeIntersect =
abe + ace + ade + abef + acef + adef + abcde + abcdef;
beIntersect =
abe + bce + bde + abef + bcef + bdef + abcde + abcdef;
afIntersect =
abf + acf + adf + abef + acef + adef + abcdf + abcdef;
dfIntersect =
adf + bdf + cdf + adef + bdef + cdef + abcdf + abcdef;
cdIntersect =
cd + cde + cdf + cdef + abcd + abcde + abcdf + abcdef;
bdIntersect =
bd + bde + bdf + bdef + abcd + abcde + abcdf + abcdef;
Binomial[n,
q]^(-6) Sum[ (-1)^(aeIntersect + beIntersect + afIntersect +
dfIntersect + cdIntersect + bdIntersect) n!/(n - 6 q +
d2 + 2 d3 + 3 d4 + 4 d5 + 5 d6)! 1/(q - ef - abe - ace -
ade - bce - bde - cde - abef - acef - adef - bcef - bdef -
cdef - abcde - abcdef)! 1/(q - ef - abf - acf - adf - bcf -
bdf - cdf - abef - acef - adef - bcef - bdef - cdef -
abcdf - abcdef)! 1/(ab! ac! ad! bc! bd! cd! ef!) 1/(
abe! ace! ade! bce! bde! cde! abf! acf! adf! bcf! bdf! cdf!)
1/(abcd! abef! acef! adef! bcef! bdef! cdef!) 1/(
abcde! abcdf!) 1/abcdef! /. solee1234ff1234[q][[i]], {i, 1,
Length[solee1234ff1234[q]]}]];
(* {ab,ac,ad,bc,bd,cd,ef,abe,ace,ade,bce,bde,cde,abf,acf,adf,bcf,bdf,\
cdf,abef,acef,adef,bcef,bdef,cdef,abcd,abcde,abcdf,abcdef}*)
te12e34f14f32[n_, q_] :=
te12e34f14f32[n, q] =
Module[{d2, d3, d4, d5, d6, aeIntersect, beIntersect, afIntersect,
cdIntersect, bdIntersect, bcIntersect, dfIntersect},
d2 = ab + ac + ad + bc + bd + cd + ef;
d3 = abe + ace + ade + bce + bde + cde + abf + acf + adf + bcf +
bdf + cdf;
d4 = abef + acef + adef + bcef + bdef + cdef + abcd;
d5 = abcde + abcdf; d6 = abcdef;
aeIntersect =
abe + ace + ade + abef + acef + adef + abcde + abcdef;
beIntersect =
abe + bce + bde + abef + bcef + bdef + abcde + abcdef;
afIntersect =
abf + acf + adf + abef + acef + adef + abcdf + abcdef;
dfIntersect =
adf + bdf + cdf + adef + bdef + cdef + abcdf + abcdef;
cdIntersect =
cd + cde + cdf + cdef + abcd + abcde + abcdf + abcdef;
bdIntersect =
bd + bde + bdf + bdef + abcd + abcde + abcdf + abcdef;
bcIntersect =
bc + bce + bcf + bcef + abcd + abcde + abcdf + abcdef;
(-1)^q Binomial[n,
q]^(-6) Sum[ (-1)^(aeIntersect + beIntersect + afIntersect +
dfIntersect + cdIntersect + bdIntersect +
bcIntersect) n!/(n - 6 q + d2 + 2 d3 + 3 d4 + 4 d5 +
5 d6)! 1/(q - ef - abe - ace - ade - bce - bde - cde -
abef - acef - adef - bcef - bdef - cdef - abcde -
abcdef)! 1/(q - ef - abf - acf - adf - bcf - bdf - cdf -
abef - acef - adef - bcef - bdef - cdef - abcdf -
abcdef)! 1/(ab! ac! ad! bc! bd! cd! ef!) 1/(
abe! ace! ade! bce! bde! cde! abf! acf! adf! bcf! bdf! cdf!)
1/(abcd! abef! acef! adef! bcef! bdef! cdef!) 1/(
abcde! abcdf!) 1/abcdef! /. solee1234ff1234[q][[i]], {i, 1,
Length[solee1234ff1234[q]]}]];
(*k=6 all crossed*)
\
(*{ab,ac,ad,ae,af,bc,bd,be,bf,cd,ce,cf,de,df,ef,abcd,abce,abcf,abde,\
abdf,abef,acde,acdf,acef,adef,bcde,bcdf,bcef,bdef,cdef,abcdef}*)
variables123456123456 = {ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce,
cf, de, df, ef, abcd, abce, abcf, abde, abdf, abef, acde, acdf,
acef, adef, bcde, bcdf, bcef, bdef, cdef, abcdef};
labelsVariables123456123456 =
Table[{ToString[variables123456123456[[i]]], i}, {i, 1,
variables123456123456 // Length}];
coeMatrix123456123456 = ConstantArray[0, {6, 31}];
For[j = 1, j < 32, j++,
coeMatrix123456123456[[1, j]] =
StringContainsQ[labelsVariables123456123456[[j]][[1]], "a"] //
Boole;
];
For[j = 1, j < 32, j++,
coeMatrix123456123456[[2, j]] =
StringContainsQ[labelsVariables123456123456[[j]][[1]], "b"] //
Boole;
];
For[j = 1, j < 32, j++,
coeMatrix123456123456[[3, j]] =
StringContainsQ[labelsVariables123456123456[[j]][[1]], "c"] //
Boole;
];
For[j = 1, j < 32, j++,
coeMatrix123456123456[[4, j]] =
StringContainsQ[labelsVariables123456123456[[j]][[1]], "d"] //
Boole;
];
For[j = 1, j < 32, j++,
coeMatrix123456123456[[5, j]] =
StringContainsQ[labelsVariables123456123456[[j]][[1]], "e"] //
Boole;
];
For[j = 1, j < 32, j++,
coeMatrix123456123456[[6, j]] =
StringContainsQ[labelsVariables123456123456[[j]][[1]], "f"] //
Boole;
];
sol123456123456[q_] :=
sol123456123456[q] =
Solve[coeMatrix123456123456.variables123456123456 ==
ConstantArray[q, 6] &&
ConstantArray[0, 31] <= variables123456123456 <=
ConstantArray[q, 31], variables123456123456, Integers];
efIntersect66 =
Sum[variables123456123456[[
i]] Boole[(StringContainsQ[labelsVariables123456123456[[i]][[1]],
"e"]) && (StringContainsQ[
labelsVariables123456123456[[i]][[1]], "f"])], {i, 1,
variables123456123456 // Length}];
deIntersect66 =
Sum[variables123456123456[[
i]] Boole[(StringContainsQ[labelsVariables123456123456[[i]][[1]],
"d"]) && (StringContainsQ[
labelsVariables123456123456[[i]][[1]], "e"])], {i, 1,
variables123456123456 // Length}];
dfIntersect66 =
Sum[variables123456123456[[
i]] Boole[(StringContainsQ[labelsVariables123456123456[[i]][[1]],
"d"]) && (StringContainsQ[
labelsVariables123456123456[[i]][[1]], "f"])], {i, 1,
variables123456123456 // Length}];
cdIntersect66 =
Sum[variables123456123456[[
i]] Boole[(StringContainsQ[labelsVariables123456123456[[i]][[1]],
"c"]) && (StringContainsQ[
labelsVariables123456123456[[i]][[1]], "d"])], {i, 1,
variables123456123456 // Length}];
cfIntersect66 =
Sum[variables123456123456[[
i]] Boole[(StringContainsQ[labelsVariables123456123456[[i]][[1]],
"c"]) && (StringContainsQ[
labelsVariables123456123456[[i]][[1]], "f"])], {i, 1,
variables123456123456 // Length}];
ceIntersect66 =
Sum[variables123456123456[[
i]] Boole[(StringContainsQ[labelsVariables123456123456[[i]][[1]],
"c"]) && (StringContainsQ[
labelsVariables123456123456[[i]][[1]], "e"])], {i, 1,
variables123456123456 // Length}];
beIntersect66 =
Sum[variables123456123456[[
i]] Boole[(StringContainsQ[labelsVariables123456123456[[i]][[1]],
"b"]) && (StringContainsQ[
labelsVariables123456123456[[i]][[1]], "e"])], {i, 1,
variables123456123456 // Length}];
bcIntersect66 =
Sum[variables123456123456[[
i]] Boole[(StringContainsQ[labelsVariables123456123456[[i]][[1]],
"b"]) && (StringContainsQ[
labelsVariables123456123456[[i]][[1]], "c"])], {i, 1,
variables123456123456 // Length}];
t123456123456[n_, q_] :=
t123456123456[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
Binomial[n, q]^(-6) Sum[
n!/(n - 6 q + d2 + 3 d4 + 5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
t123456123465[n_, q_] :=
t123456123465[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
(-1)^q Binomial[n,
q]^(-6) Sum[(-1)^(efIntersect66 ) n!/(n - 6 q + d2 + 3 d4 +
5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
t123456123564[n_, q_] :=
t123456123564[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
Binomial[n,
q]^(-6) Sum[(-1)^(deIntersect66 + dfIntersect66) n!/(n - 6 q +
d2 + 3 d4 + 5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
t123456123654[n_, q_] :=
t123456123654[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
(-1)^q Binomial[n,
q]^(-6) Sum[(-1)^(deIntersect66 + dfIntersect66 +
efIntersect66) n!/(n - 6 q + d2 + 3 d4 + 5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
t123456124365[n_, q_] :=
t123456124365[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
Binomial[n,
q]^(-6) Sum[(-1)^(cdIntersect66 + efIntersect66) n!/(n - 6 q +
d2 + 3 d4 + 5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
t123456124635[n_, q_] :=
t123456124635[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
(-1)^q Binomial[n,
q]^(-6) Sum[(-1)^(cdIntersect66 + efIntersect66 +
cfIntersect66) n!/(n - 6 q + d2 + 3 d4 + 5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
t123456124653[n_, q_] :=
t123456124653[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
Binomial[n,
q]^(-6) Sum[(-1)^(cdIntersect66 + efIntersect66 +
cfIntersect66 + ceIntersect66) n!/(n - 6 q + d2 + 3 d4 +
5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
t123456125634[n_, q_] :=
t123456125634[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
Binomial[n,
q]^(-6) Sum[(-1)^(ceIntersect66 + cfIntersect66 +
deIntersect66 + dfIntersect66) n!/(n - 6 q + d2 + 3 d4 +
5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
t123456135264[n_, q_] :=
t123456135264[n, q] =
Module[{d2, d4, d6},
d2 = Plus[ab, ac, ad, ae, af, bc, bd, be, bf, cd, ce, cf, de, df,
ef]; d4 =
Plus[abcd, abce, abcf, abde, abdf, abef, acde, acdf, acef, adef,
bcde, bcdf, bcef, bdef, cdef]; d6 = abcdef;
Binomial[n,
q]^(-6) Sum[(-1)^(bcIntersect66 + beIntersect66 +
deIntersect66 + dfIntersect66) n!/(n - 6 q + d2 + 3 d4 +
5 d6)! 1/(
ab! ac! ad! ae! af! bc! bd! be! bf! cd! ce! cf! de! df! ef!)
1/(abcd! abce! abcf! abde! abdf! abef! acde! acdf! acef! \
adef! bcde! bcdf! bcef! bdef! cdef!) 1/abcdef! /.
sol123456123456[q][[i]], {i, 1, Length[sol123456123456[q]]}]];
ttr33[n_, q_] := 3 (1 + (-1)^Binomial[q, 2]) t123123[n, q];
ttr44[n_, q_] := (1 + 8/Binomial[n, q]) mom4[n, q]^2 +
8 t12341234[n, q] + 16 t12341243[n, q];
ttrconnected44[n_, q_] := ttr44[n, q] - mom4[n, q]^2;
ttr35[n_, q_] :=
15 (1 + et[n, q]) (1 + (-1)^Binomial[q, 2]) t123123[n, q];
ttr46[n_, q_] := (1 + 12/Binomial[n, q]) mom4[n, q] mom6[n, q] +
6 (1 + et[n, q]) (8 t12341234[n, q] + 16 t12341243[n, q]) +
3*8 (t1234e12e34[n, q] + t1234e12e43[n, q] + t1234e13e24[n, q]);
ttrconnected46[n_, q_] = ttr46[n, q] - mom4[n, q] mom6[n, q];
ttr55[n_, q_] :=
3*25 (1 + (-1)^Binomial[q, 2]) (1 + et[n, q])^2 t123123[n, q] +
5 (1 + (-1)^Binomial[q, 2]) (t1234512345[n, q] +
5 t1234512354[n, q] + 5 t1234512453[n, q] + t1234513524[n, q]);
ttr66[n_, q_] :=
mom6[n, q]^2 + 18/Binomial[n, q] mom6[n, q]^2 +
36 (1 + et[n, q])^2 *(8 t12341234[n, q] + 16 t12341243[n, q]) +
36*8*(1 + et[n, q]) (t1234e12e34[n, q] + t1234e12e43[n, q] +
t1234e13e24[n, q]) +
36 (te12e34f12f34[n, q] + te12e34f12f43[n, q] +
te12e34f13f24[n, q] + 2 te12e34f13f42[n, q] +
te12e34f14f32[n, q]) +
12 (t123456123456[n, q] + 6*t123456123465[n, q] +
12*t123456123564[n, q] + 3*t123456123654[n, q] +
9*t123456124365[n, q] + 12*t123456124635[n, q] +
12*t123456124653[n, q] + 2*t123456125634[n, q] +
3*t123456135264[n, q]);
ttrconnected66[n_, q_] := ttr66[n, q] - mom6[n, q]^2;