<commit_before># generating functions for sequent calculus presentation of Tamari order

R.<x,z> = ZZ[]

max = 60
G = Sequence([0..max],R)
D = Sequence([0..max],R)

for i in range(max):
    D[i+1] = x + x*z*D[i]*G[i]
    D[i+1] = D[i+1].truncate(z,max)
    G[i+1] = (D[i] - D[i].subs(x=0))/x + z*(G[i] - G[i].subs(x=0))/x
    G[i+1] = G[i+1].truncate(z,max)

GG = G[max]
DD = D[max].truncate(z,1+max/2)
   
GG.subs(x=0)
# 1212874549986011921108784*z^58 + 154783062599495992284287*z^56 + 19531720611142944584227*z^54 + 2432947216517006699452*z^52 + 298798698366229883964*z^50 + 36178728375680100180*z^48 + 4326820785313276095*z^46 + 513294164376599520*z^44 + 60753243788736195*z^42 + 7211046574184310*z^40 + 860593023907540*z^38 + 103367824774012*z^36 + 12504654858828*z^34 + 1524813969276*z^32 + 187606350645*z^30 + 23317105140*z^28 + 2931682810*z^26 + 373537388*z^24 + 48336171*z^22 + 6369883*z^20 + 857956*z^18 + 118668*z^16 + 16965*z^14 + 2530*z^12 + 399*z^10 + 68*z^8 + 13*z^6 + 3*z^4 + z^2 + 1

DD.subs(x=z*x).polynomial(z)
# 3814986502092303*x^31*z^61 + (1002242216651368*x^30 + 14031391033119152*x^29)*z^59 + (263747951750360*x^29 + 3560597348629860*x^28 + 25310212533425456*x^27)*z^57 + (69533550916004*x^28 + 903936161908052*x^27 + 6198981661851300*x^26 + 29832903119309472*x^25)*z^55 + (18367353072152*x^27 + 229591913401900*x^26 + 1516927277253024*x^25 + 7046101404757350*x^24 + 25826899954026600*x^23)*z^53 + (4861946401452*x^26 + 58343356817424*x^25 + 370847442355650*x^24 + 1660408530066000*x^23 + 5876748405669960*x^22 + 17498225240169960*x^21)*z^51 + (1289904147324*x^25 + 14833897694226*x^24 + 90567738003600*x^23 + 390310357770060*x^22 + 1332188239239000*x^21 + 3831719961609540*x^20 + 9651929119343280*x^19)*z^49 + (343059613650*x^24 + 3773655750150*x^23 + 22093039119060*x^22 + 91503838654800*x^21 + 300758151463770*x^20 + 834554696213700*x^19 + 2031369210416700*x^18 + 4450641336884160*x^17)*z^47 + (91482563640*x^23 + 960566918220*x^22 + 5382578744400*x^21 + 21389186388570*x^20 + 67597817017500*x^19 + 180705001607130*x^18 + 424473636993120*x^17 + 898852609804050*x^16 + 1747300906086120*x^15)*z^45 + (24466267020*x^22 + 244662670200*x^21 + 1309542023790*x^20 + 4983682195800*x^19 + 15119175409800*x^18 + 38877879625200*x^17 + 88005682600875*x^16 + 179872259664240*x^15 + 337944585221100*x^14 + 591359821344600*x^13)*z^43 + (6564120420*x^21 + 62359143990*x^20 + 318107374200*x^19 + 1157079750750*x^18 + 3363504431760*x^17 + 8305728829020*x^16 + 18089805182400*x^15 + 35633001631500*x^14 + 64609288672500*x^13 + 109227027667758*x^12 + 173808364882152*x^11)*z^41 + (1767263190*x^20 + 15905368710*x^19 + 77138650050*x^18 + 267586846560*x^17 + 743836982625*x^16 + 1760661410760*x^15 + 3683222721360*x^14 + 6980466696000*x^13 + 12194405002780*x^12 + 19882182069750*x^11 + 30529293447510*x^10 + 44432213578896*x^9)*z^39 + (477638700*x^19 + 4059928950*x^18 + 18668849760*x^17 + 61610739975*x^16 + 163416307320*x^15 + 370015460100*x^14 + 742041207600*x^13 + 1350514997832*x^12 + 2268651676200*x^11 + 3559857361060*x^10 + 5262051194400*x^9 + 7368102767025*x^8 + 9801223583580*x^7)*z^37 + (129644790*x^18 + 1037158320*x^17 + 4508102925*x^16 + 14115694320*x^15 + 35636913000*x^14 + 77012282760*x^13 + 147732098514*x^12 + 257640394440*x^11 + 415220449644*x^10 + 625442818000*x^9 + 887209032710*x^8 + 1190292863760*x^7 + 1511405695800*x^6 + 1808402199660*x^5)*z^35 + (35357670*x^17 + 265182525*x^16 + 1085822640*x^15 + 3216014100*x^14 + 7706844600*x^13 + 15854466628*x^12 + 29019121040*x^11 + 48370136958*x^10 + 74580114180*x^9 + 107483105730*x^8 + 145691385840*x^7 + 186127769100*x^6 + 223353322920*x^5 + 248377859100*x^4 + 246041115600*x^3)*z^33 + (9694845*x^16 + 67863915*x^15 + 260757900*x^14 + 728042000*x^13 + 1650887238*x^12 + 3223471524*x^11 + 5613072036*x^10 + 8914574240*x^9 + 13103365275*x^8 + 17986968714*x^7 + 23150207388*x^6 + 27878644080*x^5 + 31021294850*x^4 + 30680401500*x^3 + 23317105140*x^2)*z^31 + (2674440*x^15 + 17383860*x^14 + 62403600*x^13 + 163601438*x^12 + 349776700*x^11 + 645999354*x^10 + 1066411632*x^9 + 1607458710*x^8 + 2241753228*x^7 + 2911858950*x^6 + 3521923944*x^5 + 3922142574*x^4 + 3872033900*x^3 + 2931682810*x^2)*z^29 + (742900*x^14 + 4457400*x^13 + 14872858*x^12 + 36447320*x^11 + 73163376*x^10 + 127287160*x^9 + 198333135*x^8 + 282285432*x^7 + 370952010*x^6 + 451137596*x^5 + 502957455*x^4 + 495508780*x^3 + 373537388*x^2)*z^27 + (208012*x^13 + 1144066*x^12 + 3527160*x^11 + 8036886*x^10 + 15072200*x^9 + 24576552*x^8 + 35939904*x^7 + 47948670*x^6 + 58727214*x^5 + 65572325*x^4 + 64448228*x^3 + 48336171*x^2)*z^25 + (58786*x^12 + 293930*x^11 + 831402*x^10 + 1750320*x^9 + 3048045*x^8 + 4628052*x^7 + 6301680*x^6 + 7791168*x^5 + 8717940*x^4 + 8544965*x^3 + 6369883*x^2)*z^23 + (16796*x^11 + 75582*x^10 + 194480*x^9 + 375375*x^8 + 602316*x^7 + 844074*x^6 + 1057224*x^5 + 1186680*x^4 + 1159400*x^3 + 857956*x^2)*z^21 + (4862*x^10 + 19448*x^9 + 45045*x^8 + 78936*x^7 + 115500*x^6 + 147420*x^5 + 166257*x^4 + 161820*x^3 + 118668*x^2)*z^19 + (1430*x^9 + 5005*x^8 + 10296*x^7 + 16170*x^6 + 21252*x^5 + 24150*x^4 + 23400*x^3 + 16965*x^2)*z^17 + (429*x^8 + 1287*x^7 + 2310*x^6 + 3192*x^5 + 3675*x^4 + 3542*x^3 + 2530*x^2)*z^15 + (132*x^7 + 330*x^6 + 504*x^5 + 595*x^4 + 570*x^3 + 399*x^2)*z^13 + (42*x^6 + 84*x^5 + 105*x^4 + 100*x^3 + 68*x^2)*z^11 + (14*x^5 + 21*x^4 + 20*x^3 + 13*x^2)*z^9 + (5*x^4 + 5*x^3 + 3*x^2)*z^7 + (2*x^3 + x^2)*z^5 + x^2*z^3 + x*z
<commit_msg>adjusted equation<commit_after># generating functions for sequent calculus presentation of Tamari order

R.<x,z> = ZZ[]

max = 20
G = Sequence([0..max],R)
D = Sequence([0..max],R)

for i in range(max):
    D[i+1] = x + z*D[i]*G[i]
    D[i+1] = D[i+1].truncate(z,max)
    G[i+1] = (G[i] - x*derivative(G[i],x).subs(x=0))/x + D[i+1]
    G[i+1] = G[i+1].truncate(z,max)

GG = G[max]
DD = D[max].truncate(z,1+max/2)
   
derivative(GG,x).subs(x=0)
# 2397041278146*z^19 + 649486202652*z^18 + 170024047591*z^17 + 42986246667*z^16 + 10547597711*z^15 + 2529087729*z^14 + 595472965*z^13 + 137251154*z^12 + 30217176*z^11 + 5851024*z^10 + 857956*z^9 + 118668*z^8 + 16965*z^7 + 2530*z^6 + 399*z^5 + 68*z^4 + 13*z^3 + 3*z^2 + z + 1

DD.polynomial(z)
# (16796*x^11 + 75582*x^10 + 194480*x^9 + 375375*x^8 + 602316*x^7 + 844074*x^6 + 1057224*x^5 + 1186680*x^4 + 1159400*x^3 + 857956*x^2)*z^10 + (4862*x^10 + 19448*x^9 + 45045*x^8 + 78936*x^7 + 115500*x^6 + 147420*x^5 + 166257*x^4 + 161820*x^3 + 118668*x^2)*z^9 + (1430*x^9 + 5005*x^8 + 10296*x^7 + 16170*x^6 + 21252*x^5 + 24150*x^4 + 23400*x^3 + 16965*x^2)*z^8 + (429*x^8 + 1287*x^7 + 2310*x^6 + 3192*x^5 + 3675*x^4 + 3542*x^3 + 2530*x^2)*z^7 + (132*x^7 + 330*x^6 + 504*x^5 + 595*x^4 + 570*x^3 + 399*x^2)*z^6 + (42*x^6 + 84*x^5 + 105*x^4 + 100*x^3 + 68*x^2)*z^5 + (14*x^5 + 21*x^4 + 20*x^3 + 13*x^2)*z^4 + (5*x^4 + 5*x^3 + 3*x^2)*z^3 + (2*x^3 + x^2)*z^2 + x^2*z + x

{'fraction_non_alphanumeric': 0.20687123770371457, 'fraction_numerical': 0.5370723829099985, 'mean_word_length': 6.705882352941177, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3060873', 'n_tokens_mistral': 5955, 'n_tokens_neox': 3690, 'n_words': 427}