{"text": "#!/bin/bash maple\n# Use `maple -q expand6.mpl -D n=100` to run\n\ne := a0 + a1:\nf := 0:\n\nfor i from 2 to (n - 1)\ndo\n f := f + cat(a, convert(i, string)):\n e := e + cat(a, convert(i, string)):\nend do:\n\nf := -f:\ne := e ^ 2:\n\nst := time[real]():\ne := expand(e):\ne := subs(a0 = f, e):\ne := expand(e):\n1000*(time[real]()-st);\n\nprint(e);\n\ndone\n", "meta": {"hexsha": "f43963097eaf4b910f4e90d9380ee7f878a204c1", "size": 342, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "benchmarks/expand6.mpl", "max_stars_repo_name": "jmig5776/symengine", "max_stars_repo_head_hexsha": "03babc5c56b047b2fe81ef6f8391d1845e6bb66c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 808, "max_stars_repo_stars_event_min_datetime": "2015-10-24T14:47:34.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T02:59:22.000Z", "max_issues_repo_path": "benchmarks/expand6.mpl", "max_issues_repo_name": "HQSquantumsimulations/symengine", "max_issues_repo_head_hexsha": "95d6af92dc6a759d9320d6bdadfa51d038c81218", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1226, "max_issues_repo_issues_event_min_datetime": "2015-10-12T19:28:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T06:22:58.000Z", "max_forks_repo_path": "benchmarks/expand6.mpl", "max_forks_repo_name": "HQSquantumsimulations/symengine", "max_forks_repo_head_hexsha": "95d6af92dc6a759d9320d6bdadfa51d038c81218", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 253, "max_forks_repo_forks_event_min_datetime": "2015-10-24T14:49:40.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-13T06:44:29.000Z", "avg_line_length": 13.68, "max_line_length": 44, "alphanum_fraction": 0.5029239766, "num_tokens": 135, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.34975754789168645}} {"text": "with(Groebner):\n\n################ proc PolylistToNormal\n# input: \n# Polylist: a nonempty list of nonzero polynomials which are different from each other (list)\n# VarList: a list of variables which appear in Polylist (list)\n# output: If Polylist has finite solutions, then the output is a strong triangular decomposition (STD) of Polylist.\n# (a row vector of some row vectors)\n# Else FAIL.\nPolylistToNormal := proc(PolyList, VarList)\nlocal i, k, ans, TriList, j;\nfor i from 1 to nops(PolyList) do\n if type(PolyList[i], constant)=true then\n return Vector[row]();\n end if;\nend do;\nTriList := IsTri(PolyList, VarList);\nif TriList[1]=true then\n if IniConstant(PolyList, TriList[2])=0 then \n if nops(PolyList)=nops(VarList) then \n ans := Vector[row](nops(VarList));\n for i from 1 to nops(TriList[3]) do\n k := TriList[3][i];\n ans[-i] := PolyList[k];\n end do;\n for i from 2 to nops(VarList) do\n ans[i] := NormalForm(ans[i], [seq(ans[j], j=1..i-1)], plex(op(VarList)));\n end do;\n return Vector[row](1, fill = ans);\n else \n error \"FAIL1: This is not a zero-dimensional system.\"; \n end if;\n else\n return SubPolylistToNormal(PolyList, VarList, 1, 1);\n end if;\nelse \n return SubPolylistToNormal(PolyList, VarList, 2, 1);\nend if;\nend proc:\n\n################ proc SubPolylistToNormal\n# GBmethod: 0: fgb+convert\n# 1: buchberger\n# 2: the first time 0, else 1 (def)\n# SATGBmethod: 0: fgb+convert\n# 1: buchberger\nSubPolylistToNormal := proc(PolyList, VarList, GBmethod := 2, SATGBmethod := 1)\nlocal ComputedSet, GBmethod1, SplitSet, P, GB_Grad, GB_Lex, wCharList, AbnormalNum, IniNum, GB, AddF, i, GB_mainvar, lindex, lnum;\nComputedSet := Vector[row](); # ComputedSet is a row vector of some row vectors\nSplitSet := Vector[row](); # SplitSet is a row vector of some lists\nSplitSet(1) := PolyList;\nGBmethod1 := GBmethod;\nlindex := 1;\nlnum := 1;\nwhile lindex<=lnum do\n P := SplitSet[lindex];\n lindex := lindex+1;\n if GBmethod1=1 then\n GB_Lex := Basis(P, plex(op(VarList)), method = Buchberger);\n else\n GB_Grad := Basis(P, tdeg(op(VarList)), method = fgb);\n GB_Lex := Basis(GB_Grad, plex(op(VarList)), method = convert);\n if GBmethod1=2 then\n GBmethod1 := 1;\n end if;\n end if;\n if GB_Lex <> [1] then\n GB_mainvar := [seq(MainVar(GB_Lex[i], VarList), i=1..nops(GB_Lex))];\n if lindex=2 then\n if not(IsZeroDim(GB_Lex, VarList)) then\n error \"FAIL2: This is not a zero-dimensional system.\"; \n end if; \n end if;\n wCharList := wChar(GB_Lex, VarList, GB_mainvar); # wCharList is a row vector\n AbnormalNum := IsNormal(wCharList, VarList);\n if AbnormalNum = 0 then\n ComputedSet(numelems(ComputedSet)+1) := wCharList;\n else\n IniNum := SquareFree(primpart(lcoeff(wCharList[AbnormalNum], VarList[-AbnormalNum])));\n GB := SaturIdeal(IniNum, [seq(wCharList[i], i=1..AbnormalNum-1)], VarList, SATGBmethod); # GB is a row vector\n AddF := Vector[row]();\n for i from 1 to numelems(GB) do\n if NormalForm(GB[i], [seq(wCharList[i], i=1..AbnormalNum-1)], plex(op(VarList)))<>0 then\n AddF(numelems(AddF)+1) := GB[i]; \n end if;\n end do;\n SplitSet(++lnum):= [op(GB_Lex), seq(AddF[i], i=1..numelems(AddF))];\n SplitSet(++lnum):= [op(GB_Lex), IniNum];\n end if;\n end if;\nend do;\nreturn ComputedSet; \nend proc:\n\n################ proc NormalToSquarefree\n# input: \n# NormalChain: a strong chain (a row vector)\n# VarList: a list of variables which appear in Polylist (list)\n# output: \n# ans: a strong square-free triangular decomposition (SSFTD) of NormalChain \n# (a row vector of some row vectors) \nNormalToSquarefree := proc(NormalChain, VarList, SATGBmethod:=1)\nlocal NormalSet, ans, P, AbNum, temp, tempSet, f, GB, AddF, i, r1, r2, lindex, lnum;\nNormalSet := Vector[row](); # NormalSet is a vector of some row vectors\nNormalSet(1) := NormalChain; \nans := Vector[row](); # ans is a vector of some row vectors\nlindex := 1;\nlnum := 1;\nwhile lindex<=lnum do\n P := NormalSet[lindex]; # P is a row vector\n lindex := lindex+1;\n AbNum := IsSquareFree(P, VarList);\n if AbNum=0 then\n ans(numelems(ans)+1) := P;\n elif AbNum=1 then\n temp := factors(P[1]);\n tempSet := [seq(temp[2][i][1], i = 1 .. nops(temp[2]))];\n for i from 1 to nops(tempSet) do\n P(1) := tempSet[i];\n NormalSet(++lnum) := Vector[row](P);\n end do;\n else\n f := SquareFree(diff(P[AbNum], VarList[-AbNum])); \n GB := SaturIdeal(f, [seq(P[i], i=1..AbNum)], VarList, SATGBmethod); # GB is a row vector\n AddF := Vector[row]();\n for i from 1 to numelems(GB) do\n if NormalForm(GB[i], [seq(P[i], i=1..AbNum)], plex(op(VarList)))<>0 then\n AddF(numelems(AddF)+1) := GB[i]; \n end if;\n end do;\n r1 := SubPolylistToNormal([seq(P[i], i=1..numelems(P)), f], VarList); # r1 is a row vector of some row vectors\n r2 := SubPolylistToNormal([seq(P[i], i=1..numelems(P)), seq(AddF[i], i=1..numelems(AddF))], VarList);\n # r2 is a row vector of some row vectors\n for i from 1 to numelems(r1) do\n NormalSet(++lnum) := r1[i];\n end do;\n for i from 1 to numelems(r2) do\n NormalSet(++lnum) := r2[i];\n end do;\n end if;\nend do;\nreturn ans;\nend proc:\n\n################ proc PolysetToSfNormal\n# input: \n# Polylist: a nonempty list of nonzero polynomials which are different from each other (list)\n# VarList: a nonempty list of variables\n# output: \n# output: If Polylist has finite solutions, then the output is a strong square-free triangular decomposition (SSFTD) of Polylist.\n# (a row vector of some row vectors)\n# Else FAIL.\nPolylistToSfNormal := proc(PolySet, VarList, SATGBmethod:=1)\nlocal NormalDec, ans, i, r, j;\nNormalDec := PolylistToNormal(PolySet, VarList); # NormalDec is a row vector of some row vectors\nif NormalDec=FAIL then\n return FAIL;\nelse\n ans := Vector[row](); # ans is a row vector of some row vectors\n for i from 1 to numelems(NormalDec) do\n r := NormalToSquarefree(NormalDec[i], VarList, SATGBmethod); # r is a row vector of some row vectors\n for j from 1 to numelems(r) do\n ans(numelems(ans)+1) := r[j];\n end do;\n end do;\n return ans;\nend if;\nend proc:\n\n################ proc IsTri\nIsTri := proc(PolyList, VarList)\nlocal JudgeList, i, k, mainvarList;\nJudgeList := [seq(-1, i=1..nops(VarList))];\nmainvarList := [seq(MainVar(PolyList[i], VarList), i=1..nops(PolyList))];\nfor i from 1 to nops(PolyList) do\n member(mainvarList[i], VarList, 'k'); \n if JudgeList[k]=-1 then\n JudgeList[k] := i;\n else \n return [false];\n end if;\nend do;\nreturn [true, mainvarList, JudgeList];\nend proc:\n\n################ proc wChar\n# input:\n# GroeBasis: the reduced lex Groebner basis w.r.t. VarList[1]>...>VarList[n]\n# VarList: the variable list of GroeBasis\n# mainvar: the main variable list of GroeBasis such that the main variable of GroeBasis[i] is mainvar[i]\n# output: \n# wCharList: the W-characteristic list of GroeBasis (row vector)\nwChar := proc(GroeBasis, VarList, mainvar)\nlocal k, i, PolySet, wCharList, wCharPrep, j;\nPolySet := Vector[row](nops(VarList));\nfor k from 1 to nops(VarList) do\n PolySet[k] := Vector[row]();\nend do;\nfor i from 1 to nops(GroeBasis) do\n member(mainvar[i], VarList, 'k');\n PolySet[k](numelems(PolySet[k])+1) := GroeBasis[i];\nend do;\nwCharList := Vector[row](nops(VarList));\nfor i from 1 to nops(VarList) do\n wCharPrep := PolySet[i][1];\n for j from 2 to numelems(PolySet[i]) do \n if TestOrder(LeadingMonomial(PolySet[i][j], plex(op(VarList))), LeadingMonomial(wCharPrep, plex(op(VarList))), plex(op(VarList))) then\n wCharPrep := PolySet[i][j];\n end if;\n end do;\n wCharList[-i] := wCharPrep;\nend do;\nreturn wCharList;\nend proc:\n\n################ proc IsNormal\n# input:\n# TriSet: a zero-dim triangle set T=[T1,...,Tn] such that 01) such that [T1,...,Tk] is abnormal\nIsNormal := proc(TriSet, VarList)\nlocal NormNum, i;\nNormNum := 0;\nfor i from 1 to numelems(TriSet) do # Note that Triset[1] is a univariate polynomial.\n if type(lcoeff(TriSet[i], VarList[-i]), constant)=false then \n NormNum := i; \n break;\n end if;\nend do;\nreturn NormNum;\nend proc:\n\n################ proc IsNormalSpe\n# input:\n# PolyList: a polynomial list which is a out-of-order triangle set (a list)\n# mainvarList: lv(PolyList[i]) = mainvarList[i]\n# output: \n# NormNum: if all initials of PolyList are constants, then return 0; else return 1\nIniConstant := proc(PolyList, mainvarList)\nlocal i;\nfor i from 1 to nops(PolyList) do # Note that Triset[1] is a univariate polynomial.\n if type(lcoeff(PolyList[i], mainvarList[i]), constant)=false then \n return 1;\n end if;\nend do;\nreturn 0;\nend proc:\n\n################ proc IsSquareFree\n# input:\n# TriSet: a triangle set T=[T1,...,Tn] such that 0 0 then break; end if;\n end do;\n return NormNum;\nend if;\nend proc:\n\n################ proc ResTri\n# input:\n# P : a polynomial\n# TriSet: a triangle set T=[T1,...,Tn] such that 0:Poly^{infinity} (a vector)\nSaturIdeal := proc(Poly, PolyList, VarList, SATGBmethod:=0) \nlocal Z, GB_Grad, GB_Lex, i, ans;\nans := Vector[row]();\nif SATGBmethod=0 then\n GB_Grad := Basis([op(PolyList), 1-Poly*Z], tdeg(Z, op(VarList)), method = fgb);\n GB_Lex := Basis(GB_Grad, plex(Z, op(VarList)), method = convert);\nelse\n GB_Lex := Basis([op(PolyList), 1-Poly*Z], plex(Z, op(VarList)), method = buchberger);\nend if;\nfor i from 1 to nops(GB_Lex) do\n if has(GB_Lex[i], Z)=false then\n ans(numelems(ans)+1) := GB_Lex[i];\n end if;\nend do; \nreturn ans;\nend proc:\n\n########## proc Class, proc MainVar, proc WuInitial\n# input:\n# f: a polynomial\n# ord: a list of variables of f such that ord[1]>ord[2]>... \n########## proc Class\nClass := proc(f::polynom, ord::list)\nlocal i;\noption cache;\nfor i from 1 to nops(ord) do\n\tif has(f,ord[i]) then\n\t\treturn i;\n\tend if;\nend do;\nreturn 0;\nend proc:\n\n########## proc MainVar\nMainVar := proc(f::polynom, ord::list)\nlocal i;\noption cache;\nfor i from 1 to nops(ord) do\n\tif has(f, ord[i]) then\n\t\treturn ord[i];\n\tend if;\nend do;\nreturn 0;\nend proc:\n\n########## proc WuInitial\nWuInitial := proc(f::polynom, ord::list)\noption cache;\nif Class(f, ord)=0 then\n\treturn 1;\nelse\n\treturn primpart(lcoeff(f, MainVar(f,ord)));\nend if;\nend proc:\n\n########## proc SquareFree\nSquareFree := proc(poly)\noption cache;\nlocal FactorList,i;\nFactorList := sqrfree(poly);\nreturn mul(FactorList[2][i][1], i = 1 .. nops(FactorList[2]));\nend proc:\n\n########## proc IsZeroDim\nIsZeroDim := proc(GBlex, VarList)\nlocal JudgeList,i,IndSet,j;\nJudgeList := [seq(0, i=1..nops(VarList))];\nfor i from 1 to nops(GBlex) do\n IndSet := indets(LeadingMonomial(GBlex[i], plex(op(VarList))));\n if nops(IndSet)=1 then\n for j from 1 to nops(VarList) do\n if IndSet={VarList[j]} then\n JudgeList[j] := 1;\n break;\n end if;\n end do;\n end if;\nend do;\nfor i from 1 to nops(JudgeList) do\n if JudgeList[i]=0 then\n return false;\n end if;\nend do;\nreturn true;\nend proc:", "meta": {"hexsha": "bf15667c3064ca75bf505f4e33de3a835c2b32f7", "size": 13071, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "Code/SFSTD.mpl", "max_stars_repo_name": "lihaokun/StrongSfTriDec", "max_stars_repo_head_hexsha": "2c5c3bed0a07cb790820fd6ffc7567b5f6c524e4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_repo_stars_event_min_datetime": "2022-03-21T11:48:40.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-21T11:50:26.000Z", "max_issues_repo_path": "Code/SFSTD.mpl", "max_issues_repo_name": "lihaokun/StrongSfTriDec", "max_issues_repo_head_hexsha": "2c5c3bed0a07cb790820fd6ffc7567b5f6c524e4", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Code/SFSTD.mpl", "max_forks_repo_name": "lihaokun/StrongSfTriDec", "max_forks_repo_head_hexsha": "2c5c3bed0a07cb790820fd6ffc7567b5f6c524e4", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 34.0390625, "max_line_length": 142, "alphanum_fraction": 0.6196924489, "num_tokens": 4118, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548782017746, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.3485389718040475}} {"text": "(*\n Test file for highlight\n*)\n`&+`:=proc(x::set,y::set)\n return x union y;\nend proc: # keywords\n$include \"utils.mpl\" # preprocessor\nsolve(x^2+x-1); # maple functions\nprint(`&+`); # quoted name\nprint(\"123\"); # string\nprint('x+y'); # unvaluated expression\ntype(x,uneval); # type name\nfun:=proc(x::uneval) # parameter modifier\n option inline; # proc and module options\n print(procname); # language variable\n return true; # language constants\nend proc:\n", "meta": {"hexsha": "83e44e3ed882e0b7ae5d0e691d2edbaecf1fec3c", "size": 547, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "test/test.mpl", "max_stars_repo_name": "yu961549745/VSCodeHighlightForMaple", "max_stars_repo_head_hexsha": "4636e7754a48f621e7750ae61f26e70eacc52267", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 8, "max_stars_repo_stars_event_min_datetime": "2016-10-13T19:09:27.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-10T10:04:02.000Z", "max_issues_repo_path": "test/test.mpl", "max_issues_repo_name": "yu961549745/VSCodeHighlightForMaple", "max_issues_repo_head_hexsha": "4636e7754a48f621e7750ae61f26e70eacc52267", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 5, "max_issues_repo_issues_event_min_datetime": "2017-11-19T03:21:15.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-22T08:18:42.000Z", "max_forks_repo_path": "test/test.mpl", "max_forks_repo_name": "yu961549745/VSCodeHighlightForMaple", "max_forks_repo_head_hexsha": "4636e7754a48f621e7750ae61f26e70eacc52267", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 1, "max_forks_repo_forks_event_min_datetime": "2018-09-12T22:47:10.000Z", "max_forks_repo_forks_event_max_datetime": "2018-09-12T22:47:10.000Z", "avg_line_length": 30.3888888889, "max_line_length": 49, "alphanum_fraction": 0.5685557587, "num_tokens": 148, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5660185351961015, "lm_q2_score": 0.6150878555160665, "lm_q1q2_score": 0.3481511269961152}} {"text": "\n# Definitions for Parallel Robot Dynamics Code Generation\n# Einleitung\n# Erstelle Definitionen für die Maple-Skripte zur Berechnung von Kinematik und Dynamik des parallelen Roboters\n# \n# Dateiname:\n# robot -> Berechnung für allgemeinen Roboter\n# para -> Berechnung für eine parallelen Roboter\n# definitions -> Definitionen\n# Autor\n# Tim Job (Studienarbeit bei Moritz Schappler), 2018-12\n# Moritz Schappler, moritz.schappler@imes.uni-hannover.de\n# (C) Institut für Mechatronische Systeme, Universität Hannover\n# Init\ninterface(warnlevel=0): # Unterdrücke die folgende Warnung.\nrestart: # Gibt eine Warnung, wenn über Terminal-Maple mit read gestartet wird.\ninterface(warnlevel=3):\nwith(LinearAlgebra):\nread \"../helper/proc_MatlabExport\":\nread \"../helper/proc_convert_t_s\":\n# Lese Umgebungsvariable für Codegenerierung.\nread \"../robot_codegen_definitions/robot_env_par\":\nprintf(\"Generiere Parameter für %s\\n\",robot_name):\nread sprintf(\"../codeexport/%s/tmp/tree_floatb_definitions\", leg_name):\n# Link-Index, für den die Jacobi-Matrix aufgestellt wird. Hier wird angenommen, dass der Endeffektor das letzte Segment (=Link) ist. Die Jacobi-Matrix kann hier aber für beliebige Segmente aufgestellt werden. (0=Basis)\nLIJAC:=NL-1:\n# Ergebnisse der analytischen Jacobi-Matrix (Translatorisch)\npx, py, pz := 0, 0, 0:\nalphaxs_base, betays_base, gammazs_base := 0, 0, 0: \nread sprintf(\"../codeexport/%s/tmp/jacobia_transl_%d_maple.m\", leg_name, LIJAC):\nb_transl := b_transl:\n# Lese Umgebungsvariable für Codegenerierung.\nread \"../robot_codegen_definitions/robot_env_par\":\n# Additional Definitions\n# Parameter definieren, wenn nicht vorher schon geschehen\nif not assigned(J_SP) then\n J_SP := Matrix(3,3,[XX,XY,XZ,XY,YY,YZ,XZ,YZ,ZZ]):\nend if:\nif not assigned(J_P_P) then\n J_P_P := Matrix(3,3,[XXFP,XYFP,XZFP,XYFP,YYFP,YZFP,XZFP,YZFP,ZZFP]):\nend if:\nif not assigned(xE_s) then\n xE_s:=:\nend if:\n\n# Gravity vector in world frame\nif not assigned(g_world) then\n g_world := Matrix(3, 1):\n g_world(1 .. 3, 1) := :\nend if:\n\n# Parallel Robotics Definitions\n# Erstelle für Gelenkkoordinaten, -geschwindigkeiten und -beschleunigungen für jedes Bein\nJ := simplify(b_transl):\nvars := indets(J):\ncounter := 0:\nthetaList := convert(vars,list):\ndList := convert(d,list):\nfor i to NQJ do\n var := parse(sprintf(\"qJ%ds\", i)):\n if has(thetaList, var) then\n counter := counter + 1:\n end if:\n if has(dList, var) then\n counter := counter + 1:\n end if:\nend do:\nNQJ_parallel := counter:\ncounter := 0:\nfor i to ColumnDimension(J) do\n if not(Equal(J(..,i),Vector(3,[0,0,0]))) then\n counter := counter + 1:\n end if:\nend do:\nNQJ_parallel := counter:\n\nqJ_i_s := Matrix(NQJ_parallel,N_LEGS):\nqJD_i_s := Matrix(NQJ_parallel,N_LEGS):\nqJDD_i_s := Matrix(NQJ_parallel,N_LEGS):\nfor i from 1 to NQJ_parallel do\n for j from 1 to N_LEGS do\n k := j-1:\n qJ_i_s(i,j):=parse(sprintf(\"qJ%ds\", i+k*NQJ_parallel)):\n qJD_i_s(i,j):=parse(sprintf(\"qJD%ds\", i+k*NQJ_parallel)):\n qJDD_i_s(i,j):=parse(sprintf(\"qJDD%ds\", i+k*NQJ_parallel)):\n end do:\nend do:\n# Erstelle Vektor der Basisdrehungen jedes Beines\nframe_A_i := Matrix(3,N_LEGS):\nfor i to N_LEGS do\n for j to 3 do\n if has(indets(leg_frame(4..6)),leg_frame(j+3)) then\n frame_A_i(j,i) := leg_frame(j+3)[i]:\n else \n frame_A_i(j,i) := leg_frame(j+3):\n end if:\n end do:\nend do:\n# Plattformschwerpunkt\nr_P_sP := Vector(3,symbol=r_sP):\ns_P_sP := Vector(3,symbol=s_sP):\nangleConvLeg := leg_frame(7):\nangleConv := xE_s(7):\n# Erstelle EE-Koordinaten: xE_t, xED_t, xEDD_t -> Variablen mit Zeitabhängigkeit\n# xE_s, xED_s, xEDD_s -> Variablen ohne Zeitabhängigkeit\nxE_t:=:\nxED_t:=diff~(xE_t,t):\nxEDD_t:=diff~(xED_t,t):\n# Zähle Freiheitsgrade des Roboters und setze nicht benötigte zu null.\nxE_s := Matrix(xE_s(1..6,1)):\nxED_s := copy(xE_s):\nxEDD_s := copy(xE_s):\nFHG_trans := 0:FHG_rot := 0:\ncounter := 6:\nfor i to 6 do\n if not(xE_s(i) = 0) then\n \t Tmp := xE_s(i):\n xED_s(i) := D||Tmp:\n xEDD_s(i) := DD||Tmp:\n else\n \t counter := counter - 1:\n xED_s(i) := 0:\n xEDD_s(i) := 0:\n xE_t(i) := 0:\n xED_t(i) := 0:\n xEDD_t(i) := 0:\n end if:\nend do:\nNX := counter:\ncounter := 0:\nfor i from 4 to 6 do\n\tif not(leg_frame(i) = 0) then\n\t\tcounter := counter + 1:\n\tend if:\nend do:\nlegAngles := counter:\n# Export\n# Maple-Export\nsave g_world, J_P_P, s_P_sP, NX, NQJ_parallel, angleConvLeg, angleConv, r_P_sP, frame_A_i, qJ_i_s, qJD_i_s, qJDD_i_s, xE_t, xED_t, xEDD_t, xE_s, xED_s, xEDD_s, J_SP, sprintf(\"../codeexport/%s/tmp/para_definitions\", robot_name):\nvarScript := :\nMatlabExport(varScript, sprintf(\"../codeexport/%s/tmp/var_parallel.m\", robot_name), 1);\n\n", "meta": {"hexsha": "7f841bb5420d0c9bea5444e7a51dfb65c066faff", "size": 4826, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "robot_codegen_parallel/robot_para_definitions.mpl", "max_stars_repo_name": "SchapplM/robsynth-modelgen", "max_stars_repo_head_hexsha": "33b345ae0dd6ec4aa15499ab3d43edbbded0bea5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_stars_repo_stars_event_min_datetime": "2020-05-25T07:31:46.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-15T09:54:50.000Z", "max_issues_repo_path": "robot_codegen_parallel/robot_para_definitions.mpl", "max_issues_repo_name": "SchapplM/robsynth-modelgen", "max_issues_repo_head_hexsha": "33b345ae0dd6ec4aa15499ab3d43edbbded0bea5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "robot_codegen_parallel/robot_para_definitions.mpl", "max_forks_repo_name": "SchapplM/robsynth-modelgen", "max_forks_repo_head_hexsha": "33b345ae0dd6ec4aa15499ab3d43edbbded0bea5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 33.7482517483, "max_line_length": 227, "alphanum_fraction": 0.6935350186, "num_tokens": 1665, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947290421275, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.3427852275917898}} {"text": "#!/bin/bash maple\n# Use `maple -q expand2.mpl -D n=15` to run\n\ne := (x + y + z + w) ^ n:\nf := e * (e + w):\n\nst := time[real]():\nf := expand(f):\n1000*(time[real]() - st);\n\ndone\n", "meta": {"hexsha": "7d6c216c285b32de6909017cfbb34dbd802dbba3", "size": 176, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "benchmarks/expand2.mpl", "max_stars_repo_name": "jmig5776/symengine", "max_stars_repo_head_hexsha": "03babc5c56b047b2fe81ef6f8391d1845e6bb66c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 808, "max_stars_repo_stars_event_min_datetime": "2015-10-24T14:47:34.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T02:59:22.000Z", "max_issues_repo_path": "benchmarks/expand2.mpl", "max_issues_repo_name": "HQSquantumsimulations/symengine", "max_issues_repo_head_hexsha": "95d6af92dc6a759d9320d6bdadfa51d038c81218", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 1226, "max_issues_repo_issues_event_min_datetime": "2015-10-12T19:28:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T06:22:58.000Z", "max_forks_repo_path": "benchmarks/expand2.mpl", "max_forks_repo_name": "HQSquantumsimulations/symengine", "max_forks_repo_head_hexsha": "95d6af92dc6a759d9320d6bdadfa51d038c81218", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 253, "max_forks_repo_forks_event_min_datetime": "2015-10-24T14:49:40.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-13T06:44:29.000Z", "avg_line_length": 14.6666666667, "max_line_length": 43, "alphanum_fraction": 0.4886363636, "num_tokens": 72, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.3387169266059758}} {"text": "# The full Eilenberg-Zilber operad EZ has EZ(A) equal to the set of\n# natural maps N_*(X) \\to N_*(X)^{\\otimes A} for simplicial sets X.\n# By consideration of universal examples, we see that any such map\n# sends N_{\\leq n}(X) into (N_{\\leq n}(X))^{\\otimes A} for all n.\n# Thus, if we define EZ_{\\leq n}(A) to be the set of natural maps\n# N_{\\leq n}(X) \\to (N_{\\leq n}(X))^{\\otimes A}, we get a quotient\n# operad of EZ. The group EZ(A) is an infinite product of copies of\n# the integers and so is not computationally tractable. We\n# therefore work with EZ_{\\leq n} instead.\n\n`is_element/eilenberg_zilber` := (n :: nonnegint) -> (A::set) -> proc(x)\n local y,z,i;\n \n if x = 0 then return true; fi;\n \n if type(x,`+`) then\n return `and`(op(map(`is_element/eilenberg_zilber`(n)(A),[op(x)])));\n fi;\n\n if type(x,`*`) then\n y,z := selectremove(type,[op(x)],integer);\n return (nops(z) = 1 and `is_element/eilenberg_zilber`(n)(A)(z[1]));\n fi;\n \n if not type(x,specfunc(Z)) then return false; fi;\n\n if nops(x) = 0 or nops(x) > n+1 then return false; fi;\n\n for i from 1 to nops(x) do\n if not(`is_element/subsets`(A)(op(i,x))) then\n return false;\n fi;\n od;\n\n if map(op,{op(x)}) <> A then\n return false;\n fi;\n \n for i from 1 to nops(x) - 1 do\n if op(i,x) intersect op(i+1,x) = {} then return false; fi;\n od;\n\n return true;\nend:\n\n`is_equal/eilenberg_zilber` := (n::nonnegint) -> (A::set) -> (x,y) -> evalb(x = y):\n\n`random_basis_element/eilenberg_zilber` := (n::nonnegint) -> (A) -> proc(m_)\n local m,t,M,a,i;\n\n if A = {} then\n if nargs = 0 or m_ = 0 then\n return Z({});\n else\n error(\"A is empty\");\n fi;\n fi;\n \n m := `if`(nargs > 0,min(n,m_),rand(0..n)());\n \n t := table():\n M := {seq(i,i=0..m)};\n \n for a in A do t[a] := random_nonempty_subset_of(M); od;\n\n for i from 0 to m-1 do\n a := random_element_of(A);\n t[a] := t[a] union {i,i+1};\n od:\n\n return Z(seq(select(a->member(i,t[a]),A),i=0..m));\nend:\n\n`random_element/eilenberg_zilber` := (n::nonnegint) -> (A) -> proc(coeff_range_,num_terms_)\n local coeff_range,num_terms;\n\n coeff_range := -3..3;\n num_terms := 5;\n if nargs > 0 then coeff_range := args[1]; fi;\n if nargs > 1 then num_terms := args[2]; fi;\n \n add(rand(coeff_range)() * `random_basis_element/eilenberg_zilber`(n)(A)(),i=1..num_terms);\nend:\n\n`transpose0/eilenberg_zilber` := (A::set) -> proc(x)\n local m,M,t,a;\n \n m := nops(x) - 1;\n M := [seq(i,i=0..m)];\n t := table():\n for a in A do\n t[a] := select(i -> member(a,op(i+1,x)),M);\n od;\n\n return Zt(eval(t));\nend;\n\n`transpose/eilenberg_zilber` := (A::set) ->\n apply_linear(`transpose0/eilenberg_zilber`(A));\n\n`detranspose0/eilenberg_zilber` := (A::set) -> proc(x)\n local t,m;\n\n t := op(1,x);\n m := max(op(map(op,{{0},seq(t[a],a in A)})));\n return Z(seq(select(a -> member(i,t[a]),A),i=0..m));\nend:\n\n`detranspose/eilenberg_zilber` := (A::set) ->\n apply_linear(`detranspose0/eilenberg_zilber`(A));\n\n`eta/eilenberg_zilber` := (n::nonnegint) -> (A::set) ->\n `if`(nops(A)=1,add(Z(A $ k),k=1..(n+1)),FAIL);\n\n`source_degree/eilenberg_zilber` := (A::set) -> proc(x)\n return nops(x) - 1;\nend:\n\n`target_degrees/eilenberg_zilber` := (A::set) -> proc(x)\n local xt,d,a;\n\n xt := op(1,`transpose/eilenberg_zilber`(A)(x));\n d := table();\n for a in A do\n d[a] := nops(xt[a]) - 1;\n od:\n\n return eval(d);\nend:\n\n`gamma0/eilenberg_zilber` := (A::set,B::set) -> (p) -> proc(y,x)\n local F,s,d,t,u,a,b;\n \n F := fibres(A,B)(p);\n s := op(1,`transpose/eilenberg_zilber`(B)(y));\n d := `target_degrees/eilenberg_zilber`(B)(y);\n \n t := table():\n for b in B do\n if `source_degree/eilenberg_zilber`(F[b])(x[b]) <> d[b] then\n return 0;\n fi;\n\n t[b] := op(1,`transpose/eilenberg_zilber`(F[b])(x[b]));\n od;\n\n u := table();\n for a in A do\n b := p[a];\n u[a] := [seq(s[b][j+1], j in t[b][a])];\n od;\n\n return `detranspose/eilenberg_zilber`(A)(Zt(u));\nend:\n\n`gamma/eilenberg_zilber` := (n::nonnegint) -> (A::set,B::set) -> (p) -> proc(y,x)\n local c,y1,F,d0,BL,M,t,z,b,m,mt;\n \n if y = 0 then\n return 0;\n elif type(y,`+`) then\n return map(t -> `gamma/eilenberg_zilber`(n)(A,B)(p)(t,x),y);\n fi;\n\n if type(y,`*`) then\n c,y1 := selectremove(type,y,integer);\n else\n c := 1;\n y1 := y;\n fi;\n\n if not(type(y1,specfunc(Z))) then\n return FAIL;\n fi;\n\n F := fibres(A,B)(p);\n\n d0 := `target_degrees/eilenberg_zilber`(B)(y1);\n \n BL := sort([op(B)]);\n M := [[1]];\n for b in BL do\n t := map(coeff_split,sum_terms(x[b]));\n t := select(u -> `source_degree/eilenberg_zilber`(F[b])(u[2]) = d0[b],t);\n M := [seq(seq([m[1] * u[1],seq(m[i],i=2..nops(m)),u[2]],u in t),m in M)];\n od:\n\n z := 0;\n\n for m in M do\n mt := table([seq(BL[i]=m[i+1],i=1..nops(BL))]);\n z := z + c * m[1] * `gamma0/eilenberg_zilber`(A,B)(p)(y1,mt);\n od;\n\n return z;\nend:", "meta": {"hexsha": "4310690eba27de1953b115f231e303d2cb55c9d7", "size": 4663, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/operads/eilenberg_zilber.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/operads/eilenberg_zilber.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/operads/eilenberg_zilber.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 23.7908163265, "max_line_length": 91, "alphanum_fraction": 0.5923225391, "num_tokens": 1768, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.746138993030751, "lm_q2_score": 0.45326184801538616, "lm_q1q2_score": 0.33819633885745753}} {"text": "#@ Not autoload\n\n# This was originally written for Mathematica, and needs more\n# translation.\n\n#**************************************************************\n# the rest of this does not appear in Deligne's formulaire.\t\n\n# The cubical structure\t\t\t\t\t\n\n#h[{{x0_,y0_,z0_},\n# {x1_,y1_,z1_},\n# {x2_,y2_,z2_}}] := \n# Det[{{x0,y0,z0},{x1,y1,z1},{x2,y2,z2}}] z0 z1 z2 /\n# ( Det[{{x0,z0},{x1,z1}}] *\n# Det[{{x1,z1},{x2,z2}}] *\n# Det[{{x2,z2},{x0,z0}}] )\n \n# z in terms of x where y = 1, valid mod x^10\t\t\t\n\n#zx = \n# x^3 - a1 x^4 + a1^2 x^5 + a2 x^5 - a1^3 x^6 - 2 a1 a2 x^6 - a3 x^6 + \n# a1^4 x^7 + 3 a1^2 a2 x^7 + a2^2 x^7 + 3 a1 a3 x^7 + a4 x^7 - a1^5 x^8 - \n# 4 a1^3 a2 x^8 - 3 a1 a2^2 x^8 - 6 a1^2 a3 x^8 - 3 a2 a3 x^8 - \n# 3 a1 a4 x^8 + a1^6 x^9 + 5 a1^4 a2 x^9 + 6 a1^2 a2^2 x^9 + a2^3 x^9 + \n# 10 a1^3 a3 x^9 + 12 a1 a2 a3 x^9 + 2 a3^2 x^9 + 6 a1^2 a4 x^9 + \n# 3 a2 a4 x^9 + a6 x^9\n\n# Invariant differential mod x^10, where y = 1\t\t\t\n\n#omx = \n# dx (-1 + a1 x - a1^2 x^2 - a2 x^2 + a1^3 x^3 + 2 a1 a2 x^3 + 2 a3 x^3 - \n# a1^4 x^4 - 3 a1^2 a2 x^4 - a2^2 x^4 - 6 a1 a3 x^4 - 2 a4 x^4 + \n# a1^5 x^5 + 4 a1^3 a2 x^5 + 3 a1 a2^2 x^5 + 12 a1^2 a3 x^5 + \n# 6 a2 a3 x^5 + 6 a1 a4 x^5 - a1^6 x^6 - 5 a1^4 a2 x^6 - 6 a1^2 a2^2 x^6 - \n# a2^3 x^6 - 20 a1^3 a3 x^6 - 24 a1 a2 a3 x^6 - 6 a3^2 x^6 - \n# 12 a1^2 a4 x^6 - 6 a2 a4 x^6 - 3 a6 x^6)\n\n# The following functions are invertible near [0:1:0], and\t\n# they satisfy uu ww = vv^3. Note that vv depends only on y \n# and z. Moreover, {uu != 0} \\cap {x = 0} = {0} as schemes.\t\n\n#uu = y^2 + a1 x y - a2 x^2 + a3 y z - a4 x z - a6 z^2\n#vv = y^2 + a3 y z - a6 z^2\n#ww = a1^2 x^2 y^2 + a2 x^2 y^2 - a1 x y^3 + y^4 + a2 a3 x^2 y z - \n# 2 a1 a4 x^2 y z + a1^2 a2 x y^2 z + a2^2 x y^2 z - a1 a3 x y^2 z + \n# a4 x y^2 z - a1^3 y^3 z - 2 a1 a2 y^3 z + 2 a3 y^3 z + a4^2 x^2 z^2 - \n# a2 a6 x^2 z^2 + a2^2 a3 x y z^2 - 2 a1 a2 a4 x y z^2 + a3 a4 x y z^2 + \n# a1 a6 x y z^2 - 2 a1 a2 a3 y^2 z^2 + a3^2 y^2 z^2 + 3 a1^2 a4 y^2 z^2 + \n# 2 a2 a4 y^2 z^2 - 2 a6 y^2 z^2 + a2 a4^2 x z^3 - a2^2 a6 x z^3 - \n# a4 a6 x z^3 + 2 a2 a3 a4 y z^3 - 3 a1 a4^2 y z^3 + 2 a1 a2 a6 y z^3 - \n# 2 a3 a6 y z^3 + a4^3 z^4 - 2 a2 a4 a6 z^4 + a6^2 z^4\n\n# We now give some formulae that identify the singular locus.\t\n\n#Frule = {F -> HomogeneousCubic,\n# Fx -> D[HomogeneousCubic,x],\n# Fy -> D[HomogeneousCubic,y],\n# Fz -> D[HomogeneousCubic,z]}\n\n#A0 = 4 F - 2 x Fx - (2 y + a3 z) Fy \n#A1 = - 2 Fx + a1 Fy\n#A2 = 4 a2 z F +\n# - ((a1 a3 + a4) z^2 + (a1^2 + 2 a2) x z + 3 x^2 + a1 y z) Fx +\n# - (a2 a3 z^2 + (a1 a2 + 2 a3) x z + 2 a1 x^2 + (2 a2 z + 4 x) y) Fy\n#\n#AA0 = 2 x^3 - B4 x z^2 - B6 z^3\n#AA1 = 6 x^2 + B2 x z + B4 z^2\n#AA2 = x^4 - B4 x^2 z^2 - 2 B6 x z^3 - B8 z^4\n\n#Dl = (-7 B2 B4 z^2 + 27 B6 z^2 - 36 B4 x z + 3 B2 x^2) AA0 + \n# (-8 B4^2 z^3 + 2 B2 B6 z^3 + B2 B4 x z^2 - 9 B6 x z^2 +\n# 12 B4 x^2 z - B2 x^3) AA1 +\n# B2^2 z AA2\n\n# The singular point, where Delta = 0 and c4 is invertible.\t\n\n#xs = 18 b6 - b2 b4 \n\n#ys = (a1 a4 - 2 a2 a3) b2 + 12 a3 b4 - 9 a1 b6\n\n#zs = c4\n\n# This evaluates to {0,0,0,0}, showing that [xs:ys:zs] is\t\n# indeed a singular point.\t\t\t\t\t\n\nCheckSingular0 =\n({F,Fx,Fy,Fz} /. Frule /. {x->xs,y->ys,z->zs}) - \n {-c6,36,0,3 b2} Delta \n\n# The following evaluates to {0,0}. Because points with z=0\t\n# are smooth and zs = c4 is assumed invertible, we conclude\t\n# that every singular point is projectively equivalent to\t\n# [xs:ys:zs].\t\t\t\t\t\t\t\n\nCheckSingular1 =\n({-2 b2 z Fx - \n (6 a1 x + 12 y - a1 b2 z + 18 a3 z) Fy + \n 24 z Fz,\n a1 b2 z Fx + \n (3 a1^2 x + 6 a1 y + (2 a2 b2 - 3 a1 a3 - 24 a4)z ) Fy - \n 12 a1 z Fz} /. Frule) -\n{ (zs x - xs z) z^2 , \n (zs y - ys z) z^2}\n\n# Grobner basis for the singular points over the locus where\t\n# c4 = Delta = 2 = 0 (with y > x > a3 > a1 > a6 > a4 > a2) \n\nAdditiveLocusMod2 = {\n y^2 + x^3 + a2 x^2 + a4 x + a6,\n x^2 y + a4 y + a3 x^2 + a2 a3 x + a1 a6 + a3 a4,\n a3 y + x^3 + a4 x,\n a1 y + x^2 + a4,\n x^4 + a3^2 x + a1^2 a6 + a4^2 + a1 a3 a4 + a2 a3^2,\n a3 x^3 + a1^3 a6 + a1 a4^2 + a1^3 a2 a4,\n a1^2 a4^2 + a3^2 x^2,\n a3 + a1 x,\n a3^3 + a1^2 a3 a4,\n a1 a3^2 + a1^3 a4,\n a1^3 a3,\n a1^4}\n\nReducedAdditiveLocusMod2 = {y^2 + a2 a4 + a6, x^2 + a4, a1, a3}\n\nAdditiveLocusMod3 = {\n y - a1 x - a3,\n a1^4 - a1^2 a2 + a2^2,\n -a3^2 - a6 - a1 a3 x + a4 x - x^3, \n a1 a3 - a4 + a1^2 x + a2 x, \n a1^3 a3 + a1 a2 a3 - a1^2 a4 - a2 a4, \n -(a1^2 a3^2) - a1 a3 a4 - a4^2, \n a1^2 a3^2 + a2 a3^2 + a1^2 a6 + a2 a6 - a1 a3 x^2 + a4 x^2}\n\nReducedAdditiveLocusMod3 = {\n y - a1 x - a3,\n x^3 + a6 + a3^2,\n a4 - a1 a3,\n a2 + a1^2}\n\nReducedAdditiveLocusRational = {\n y + a1 x/2 + a3/2,\n x^2 - b2 x/6 - b4/6,\n a6 + a3^2/4 - a2^3/27 - a1^2 a2^2/36 - a1^4 a2/144 - a1^6/1728,\n a4 + a1 a3/2 - a2^2/3 - a1^2 a2/6 - a1^4/48}\n \n\n#**************************************************************\n# Various quotients of localisations of Z[a1,..,a6] that give\t\n# etale maps to the elliptic moduli stack (I think)\t\t\n\n# etale1 covers D(6 c6) \t\t\t\t\n\netale1 = {a1 -> 0, a2 -> 0, a3 -> 0, a6 -> 1}\n\n# etale2 covers D(6 c4) \t\t\t\t\n\netale2 = {a1 -> 0, a3 -> 0, a2 -> 0, a4 -> 1}\n\n# etale3 covers a neighbourhood of V(2) D(c4) \t\t\n\netale3 = {a1 -> 1, a3 -> 0, a2 -> 0, a4 -> 0}\n\n# etale4 covers a neighbourhood of V(3) D(c4) \t\t\n\netale4 = {a1 -> 0, a3 -> 0, a2 -> 1, a4 -> 0}\n\n# etale5 covers a neighbourhood of V(2,a1) ; etale over D(3)\t\n\netale5 = {a3 -> 1, a2 -> 0, a4 -> 0, a6 -> 0}\n\n# etale6 covers a neighbourhood of V(3,a2) ; etale over D(2)\t\n\netale6 = {a1 -> 0, a3 -> 0, a4 -> 1, a6 -> 0}\n\n# Det[Jac[etale6,a2]] (for example) is the Jacobian\t\t\n# determinant for the map\t\t\t\t\t\n#\t\t\t\t\t\t\t\t\n# Z[a1,a2,a3,a4,a6] -> Z[v,r,s,t,a2]\t\t\t\t\n#\t\t\t\t\t\t\t\t\n# (where v = 1/u) given by alpha. This must be invertible for\t\n# the map to be etale.\t\t\t\t\t\t\n\nJac[er_,aa_] := \n Outer[D,\n FixedPoint[Expand[# /. er /. u -> 1/v]&, alpha /@ {a1,a3,a2,a4,a6}],\n {v,r,s,t,aa}\n ]\n\n#**************************************************************\n# Singular fibres\t\t\t\t\t\t\n\n# The curve y^2 z + x y z = x^3 is a nodal cubic, with \n# multiplicative formal group.\t\t\t\t\t\n\nmultcurve = {a1->1, a3->0, a2->0, a4->0, a6->0}\n\n# There is a birational map f from P^1 to the curve, with\t\n# inverse g.\tThis sends both 0 and infinity to the singular \n# point [0:0:1], and the restriction to G_m is a homomorphism. \n# The discriminant is zero and the j invariant is infinite.\t\n\nfm[s_,t_] := {s t (s - t), t^2 s, (s - t)^3}\n\ngm[x_,y_,z_] := {y + x, y}\n\n# The curve y^2 = x^3 is a cuspidal cubic, with additive \t\n# formal group.\t\t\t\t\t\t\n\naddcurve = {a1->0, a3->0, a2->0, a4->0, a6->0}\n\n# There is a birational map f from P^1 to the curve, with\t\n# inverse g.\tThis sends infinity to the singular point \n# [0:0:1] with multiplicity two, and the restriction to G_a is \n# a homomorphism the discriminant is zero and the j invariant \n# is undefined.\t\t\t\t\t\t \n\nfa[s_,t_] := {t^2 s, t^3, s^3}\n\nga[x_,y_,z_] := {x, y}\n\n#**************************************************************\n# Curves with prescribed j invariant\t\t\t\t\n\n# This curve is defined if jj - 1728 is invertible, and is \n# nonsingular if jj is also invertible. It has\t\t\n# c4 = - c6 = jj/(jj - 1728) and Delta = jj^2 / (jj - 1728)^3 \n# and j = jj (unless jj = 0, in which case j is undefined). \n\n# jcurve[0] corresponds to the curve (y + x/2)^2 =(x + 1/12)^3 \n\njcurve[jj_] := \n {a1 -> 1, a2 -> 0, a3 -> 0, \n a4 -> 36/(1728 - jj), a6 -> 1/(1728 - jj)}\n\n#**************************************************************\n# Legendre curve. This is defined where 2 is invertible and \n# lm != 0 or 1. The points of order two are\t\t\t\n# P = [0:0:1] and Q = [1:0:1] and P+Q = [lm:0:1]. An invariant\n# differential is given by om = -dx/y. This is the universal \n# example of a curve with an invariant differential and a \n# level two structure such that x(P) = 0 and x(Q) = 1, where\t\n# x is the unique choice adapted to om with a1 = a3 = 0.\t\n\n# c4 = 16(1 - lm + lm^2)\t\t\t\t\t\n# c6 = 32(lm - 2)(lm + 1)(2 lm - 1)\t\t\t\t\n# Delta = 16 lm^2 (lm - 1)^2\t\t\t\t\t\n# j = 256 (1 - lm + lm^2)^3 / ((lm - 1)^2 lm^2)\t\t\n\nlegendre = {a1 -> 0, a3 -> 0, a2 -> -(lm + 1), a4 -> lm, a6 -> 0}\n\n#**************************************************************\n# Jacobi quartic.\t\t\t\t\t\t\n\n# c4 = 2^6 3^4 (dl^2 + 3 ep)\t\t\t\t\n# c6 = 2^9 3^6 (dl^3 - 9 dl ep)\t\t\t\t\n# Delta = 2^12 3^12 ep (ep - dl^2)^2\t\t\t\t\n# j = 64 (dl^2 + 3 ep)^3 / (ep (ep - dl^2)^2)\t\t\n\njacobi_rule :=\n {a1 = 0, a3 = 0, a2 = 0, a4 = -108 dl^2 - 324 ep, a6 = 3888 dl ep - 432 dl^3} \n\nxXY := (6*(-2*dl - dl^2*X^2 + 3*ep*X^2 + 2*dl*Y))/(-1 + dl*X^2 + Y);\nyXY := (108*(dl^2 - ep)*X)/(-1 + dl*X^2 + Y);\n\nXxy = (6*(12*dl - x))/y\nYxy = (2592*dl^3 - 7776*dl*ep + 216*dl^2*x + 648*ep*x - \n 36*dl*x^2 + y^2)/y^2\n\n# In quartic form, the zero element is (0,1).\t\t\t\n\njacobiquartic = Y^2 - (1 - 2 dl X^2 + ep X^4)\n\n# invariant differential\t\t\t\t\t\n\nomegaXY = -dX/(6 Y) \n\n# This can also be written as \\sum_n P_n(dl,ep) X^(2n) dX\t\n# where P_n(dl,ep)=P_n(dl/Sqrt[ep]) ep^(n/2) and P_n(t) is the \n# Legendre polynomial. These are defined by\t\t\t\n# (1 -2xt +t^2)^(-1/2) = \\sum_n P_n(x) t^n\t\t\t\n\n# There is a canonical point P of order 2: (x,y)=(12 dl,0).\t\n# Apparently this is the universal example of a curve with an \n# invariant differential and a point of exact order 2 (where \n# 2 is invertible). Apparently also\t\t\t\t\n# div(X) = [2]^{-1}[0] - [2]^{-1}[P]\t\t\t\t\n\n# It seems that if six is invertible and we have a given point \n# P of order 2, we can put the curve in the form\t\t\n# y^2 = x^3 + a4 x + a6 and then P = (12 dl,0) say and we can \n# define ep = -(4 a4 + 432 dl^2)/1296 to put the curve in\t\n# Jacobi form. I'm not sure this is right, though.\t\t\n\n#**************************************************************\n\n# Formal group formulae, valid up to terms of weight 7.\t\n\nF = x0 + x1 + a1*x0*x1 - a2*x0^2*x1 + 2*a3*x0^3*x1 - 2*a1*a3*x0^4*x1 - \n 2*a4*x0^4*x1 + 2*a1^2*a3*x0^5*x1 + 2*a2*a3*x0^5*x1 + 2*a1*a4*x0^5*x1 - \n 2*a1^3*a3*x0^6*x1 - 4*a1*a2*a3*x0^6*x1 - 2*a3^2*x0^6*x1 - \n 2*a1^2*a4*x0^6*x1 - 2*a2*a4*x0^6*x1 - 3*a6*x0^6*x1 - a2*x0*x1^2 - \n a1*a2*x0^2*x1^2 + 3*a3*x0^2*x1^2 + a2^2*x0^3*x1^2 - a1*a3*x0^3*x1^2 - \n 4*a4*x0^3*x1^2 + a1^2*a3*x0^4*x1^2 + a1*a4*x0^4*x1^2 - a1^3*a3*x0^5*x1^2 - \n a1*a2*a3*x0^5*x1^2 - a1^2*a4*x0^5*x1^2 - 9*a6*x0^5*x1^2 + 2*a3*x0*x1^3 + \n a2^2*x0^2*x1^3 - a1*a3*x0^2*x1^3 - 4*a4*x0^2*x1^3 + a1*a2^2*x0^3*x1^3 + \n a1^2*a3*x0^3*x1^3 - 2*a2*a3*x0^3*x1^3 - a2^3*x0^4*x1^3 - a1^3*a3*x0^4*x1^3 - \n 2*a1*a2*a3*x0^4*x1^3 + 4*a3^2*x0^4*x1^3 - a1^2*a4*x0^4*x1^3 + \n 4*a2*a4*x0^4*x1^3 - 15*a6*x0^4*x1^3 - 2*a1*a3*x0*x1^4 - 2*a4*x0*x1^4 + \n a1^2*a3*x0^2*x1^4 + a1*a4*x0^2*x1^4 - a2^3*x0^3*x1^4 - a1^3*a3*x0^3*x1^4 - \n 2*a1*a2*a3*x0^3*x1^4 + 4*a3^2*x0^3*x1^4 - a1^2*a4*x0^3*x1^4 + \n 4*a2*a4*x0^3*x1^4 - 15*a6*x0^3*x1^4 + 2*a1^2*a3*x0*x1^5 + 2*a2*a3*x0*x1^5 + \n 2*a1*a4*x0*x1^5 - a1^3*a3*x0^2*x1^5 - a1*a2*a3*x0^2*x1^5 - \n a1^2*a4*x0^2*x1^5 - 9*a6*x0^2*x1^5 - 2*a1^3*a3*x0*x1^6 - \n 4*a1*a2*a3*x0*x1^6 - 2*a3^2*x0*x1^6 - 2*a1^2*a4*x0*x1^6 - 2*a2*a4*x0*x1^6 - \n 3*a6*x0*x1^6\n\n\nlogF =\n x - (a1*x^2)/2 + (a1^2*x^3)/3 + (a2*x^3)/3 - (a1^3*x^4)/4 - (a1*a2*x^4)/2 - \n (a3*x^4)/2 + (a1^4*x^5)/5 + (3*a1^2*a2*x^5)/5 + (a2^2*x^5)/5 + \n (6*a1*a3*x^5)/5 + (2*a4*x^5)/5 - (a1^5*x^6)/6 - (2*a1^3*a2*x^6)/3 - \n (a1*a2^2*x^6)/2 - 2*a1^2*a3*x^6 - a2*a3*x^6 - a1*a4*x^6 + (a1^6*x^7)/7 + \n (5*a1^4*a2*x^7)/7 + (6*a1^2*a2^2*x^7)/7 + (a2^3*x^7)/7 + \n (20*a1^3*a3*x^7)/7 + (24*a1*a2*a3*x^7)/7 + (6*a3^2*x^7)/7 + \n (12*a1^2*a4*x^7)/7 + (6*a2*a4*x^7)/7 + (3*a6*x^7)/7\n\n# ms[k] is the [k] series.\t\t\t\t\t\n\nms[-1] =\n -x + a1*x^2 - a1^2*x^3 + a1^3*x^4 + a3*x^4 - a1^4*x^5 - 3*a1*a3*x^5 + \n a1^5*x^6 + 6*a1^2*a3*x^6 + a2*a3*x^6 - a1^6*x^7 - 10*a1^3*a3*x^7 - \n 4*a1*a2*a3*x^7 - 2*a3^2*x^7 + a1^7*x^8 + 15*a1^4*a3*x^8 + \n 10*a1^2*a2*a3*x^8 + a2^2*a3*x^8 + 10*a1*a3^2*x^8 + a3*a4*x^8 - a1^8*x^9 - \n 21*a1^5*a3*x^9 - 20*a1^3*a2*a3*x^9 - 5*a1*a2^2*a3*x^9 - 30*a1^2*a3^2*x^9 - \n 5*a2*a3^2*x^9 - 5*a1*a3*a4*x^9\n\nms[2] = \n 2*x + a1*x^2 - 2*a2*x^3 - a1*a2*x^4 + 7*a3*x^4 + 2*a2^2*x^5 - 6*a1*a3*x^5 - \n 12*a4*x^5 + a1*a2^2*x^6 + 7*a1^2*a3*x^6 + 2*a2*a3*x^6 + 6*a1*a4*x^6 - \n 2*a2^3*x^7 - 8*a1^3*a3*x^7 - 14*a1*a2*a3*x^7 + 4*a3^2*x^7 - 8*a1^2*a4*x^7 + \n 4*a2*a4*x^7 - 54*a6*x^7\n\nms[3] = \n 3*x + 3*a1*x^2 + a1^2*x^3 - 8*a2*x^3 - 12*a1*a2*x^4 + 39*a3*x^4 - \n 6*a1^2*a2*x^5 + 24*a2^2*x^5 - 9*a1*a3*x^5 - 96*a4*x^5 - a1^3*a2*x^6 + \n 44*a1*a2^2*x^6 + 30*a1^2*a3*x^6 - 57*a2*a3*x^6 - 48*a1*a4*x^6 + \n 30*a1^2*a2^2*x^7 - 72*a2^3*x^7 - 36*a1^3*a3*x^7 - 168*a1*a2*a3*x^7 + \n 234*a3^2*x^7 - 72*a1^2*a4*x^7 + 288*a2*a4*x^7 - 936*a6*x^7\n\nms[5] =\n 5*x + 10*a1*x^2 + 10*a1^2*x^3 - 40*a2*x^3 + 5*a1^3*x^4 - 140*a1*a2*x^4 + \n 310*a3*x^4 + a1^4*x^5 - 222*a1^2*a2*x^5 + 376*a2^2*x^5 + 306*a1*a3*x^5 - \n 1248*a4*x^5 - 205*a1^3*a2*x^6 + 1740*a1*a2^2*x^6 + 620*a1^2*a3*x^6 - \n 2130*a2*a3*x^6 - 3120*a1*a4*x^6 - 120*a1^4*a2*x^7 + 3750*a1^2*a2^2*x^7 - \n 3560*a2^3*x^7 - 90*a1^3*a3*x^7 - 9540*a1*a2*a3*x^7 + 10540*a3^2*x^7 - \n 5800*a1^2*a4*x^7 + 14240*a2*a4*x^7 - 33480*a6*x^7\n\n\nNull[];\n", "meta": {"hexsha": "faacddd7b45a63960354e154c71bf1b51519b53c", "size": 12964, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/elliptic/moreformulaire.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/elliptic/moreformulaire.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/elliptic/moreformulaire.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 36.0111111111, "max_line_length": 79, "alphanum_fraction": 0.5074051219, "num_tokens": 6745, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7025300449389326, "lm_q2_score": 0.480478678047907, "lm_q1q2_score": 0.337550707281195}} {"text": "######################################################################\n#\n# General operad framework.\n\n`check_semi_gamma_args` := proc(J,U,V,is_el_CC)\n local i,k,jj;\n global reason;\n\n if not type(J,list(nonnegint)) then\n reason := [convert(procname,string),\"J is not a list of natural numbers\",J];\n return false;\n fi;\n\n k := nops(J);\n jj := `+`(op(JJ));\n \n if not is_el_CC(k)(U) then\n reason := [convert(procname,string),\"U is not in C(k)\",eval(U),k];\n return false;\n fi;\n\n if not (type(V,list) and nops(V) = k) then\n reason := [convert(procname,string),\"V is not a list of length k\",eval(V),k];\n return false;\n fi;\n\n for i from 1 to k do \n if not is_el_CC(J[i])(V[i]) then\n reason := [convert(procname,string),\"V[i] is not in C(j[i])\",i,j[i],eval(V[i])];\n return false;\n fi;\n od;\n\n return true;\nend;\n\n######################################################################\n\n`check_semi_gamma_axiom` := proc(L,U,V,W,is_el_CC,is_equal_CC,gamma_CC)\n local J,L_,k,jj,ii,H,k0,j0,W0,W_,UV,VW0,VW,UVW0,UVW1;\n global reason;\n\n if not type(L,list(list(nonnegint))) then\n reason := [convert(procname,string),\"L is not a list of lists of natural numbers\",L];\n return false;\n fi;\n\n J := map(nops,L);\n L_ := map(op,L);\n k := nops(J);\n jj := `+`(op(J));\n ii := `+`(op(L_));\n H := [seq(`+`(op(L[k0])),k0=1..k)];\n \n if not is_el_CC(k)(U) then\n reason := [convert(procname,string),\"U is not in O(k)\",eval(U),k];\n return false;\n fi;\n\n if not (type(V,list) and nops(V) = k) then\n reason := [convert(procname,string),\"V is not a list of length k\",eval(V),k];\n return false;\n fi;\n\n for k0 from 1 to k do \n if not is_el_CC(J[k0])(V[k0]) then\n reason := [convert(procname,string),\"V[k0] is not in O(J[k0])\",k0,J[k0],eval(V[k0])];\n return false;\n fi;\n od;\n\n if not (type(W,list) and nops(W) = k) then\n reason := [convert(procname,string),\"W is not a list of length k\",eval(W),k];\n return false;\n fi;\n\n for k0 from 1 to k do\n W0 := W[k0];\n if not (type(W0,list) and nops(W0) = J[k0]) then\n reason := [convert(procname,string),\"W[k0] is not a list of length J[k0]\",k0,J[k0],W0];\n return false;\n fi;\n\n for j0 from 1 to J[k0] do\n if not is_el_CC(L[k0][j0])(W[k0][j0]) then\n reason := [convert(procname,string),\"W[k0][j0] is not in O(L[k0][j0])\",k0,j0,L[k0][j0],eval(W[k0][j0])];\n return false;\n fi;\n od:\n od:\n\n UV := gamma_CC(J)(U,V);\n if not is_el_CC(jj)(UV) then\n reason := [convert(procname,string),\"UV is not in O(jj)\",jj,J,eval(U),eval(V),eval(UV)];\n return false;\n fi;\n\n W_ := map(op,W);\n \n if not `check_semi_gamma_args`(L_,UV,W_,is_el_CC) then\n reason := [convert(procname,string),\"invalid arguments to gamma 1\",reason];\n return false;\n fi;\n\n UVW0 := gamma_CC(L_)(UV,W_);\n if not is_el_CC(ii)(UVW0) then\n reason := [convert(procname,string),\"UVW0 is not in O(ii)\",ii,eval(UVW0)];\n return false;\n fi;\n\n VW := [];\n for k0 from 1 to k do\n if not `check_semi_gamma_args`(L[k0],V[k0],W[k0],is_el_CC) then\n reason := [convert(procname,string),\"invalid arguments to gamma 2\",reason];\n return false;\n fi;\n VW0 := gamma_CC(L[k0])(V[k0],W[k0]);\n if not is_el_CC(H[k0])(VW0) then\n reason := [convert(procname,string),\"VW[k0] is not in O(H[k0])\",k0,H[k0],eval(VW0)];\n return false;\n fi;\n VW := [op(VW),VW0];\n od;\n\n if not `check_semi_gamma_args`(H,U,VW,is_el_CC) then\n reason := [convert(procname,string),\"invalid arguments to gamma 3\",reason];\n return false;\n fi;\n\n UVW1 := gamma_CC(H)(U,VW);\n if not is_el_CC(ii)(UVW1) then\n reason := [convert(procname,string),\"UVW1 is not in O(ii)\",ii,eval(UVW1)];\n return false;\n fi;\n\n if not is_equal_CC(ii)(UVW0,UVW1) then\n reason := [convert(procname,string),\"UVW0 != UVW1\",eval(UVW0),eval(UVW1)];\n return false;\n fi;\n\n return true;\nend;\n\n", "meta": {"hexsha": "ef8d0b0cd788798e647be105154dcb5564773f93", "size": 3718, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/semioperads/general.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/semioperads/general.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/semioperads/general.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 25.8194444444, "max_line_length": 108, "alphanum_fraction": 0.6040882195, "num_tokens": 1248, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6187804196836383, "lm_q2_score": 0.5273165233795672, "lm_q1q2_score": 0.32629313964292567}} {"text": "read(\"metaMPFR_common.mpl\"):\n\nFUNCTION_SERIES := 0:\nFUNCTION_SERIES_RATIONAL := %+1:\nCONSTANT_SERIES := %+1:\n\n###############################################################################\n######################### We can now generate the code ########################\n###############################################################################\n# This procedure generate code for a straightforward evaluation of the series\n# corresponding to a recurrence.\n# rec is a recurrence with inital conditions\n# type can take three values, depending on which series should be evaluated:\n# FUNCTION_SERIES -> produces code for evaluating sum( a(i)*x^i )\n# FUNCTION_SERIES_RATIONAL -> produces code for evaluating sum( a(i)*(p/q)^i )\n# CONSTANT_SERIES -> produces code for evaluating sum( a(i) )\n# name is the name the should be given to the produced procedure.\n# fofx is an optional parameter. It is the function being implemented.\n# -> if provided, this argument will be used to (heuristically) find the limits\n# of the function at +/-oo and find its asymptotical behavior.\n# *IMPORTANT NOTE*: it must be a function of the variable 'x'.\n# Moreover, neither _f nor x shall be assigned at the time of\n# calling the function\n# \ngenerateStraightforwardAlgo := proc(rec, aofn, type, name, filename, fofx := _f(x))\n local a, b, n, fd, init_cond, nc, d, exponents, formalRec, c, s1, s2, p, q, hardconstant, f0, i0, ri0, i, j, var, var1, var2, var3, guard_bits, required_mulsi, required_divsi, temp, error_counter, error_in_loop, maxofti, additional_error:\n\n getname(aofn, a, n):\n\n required_mulsi := {}:\n required_divsi := {}:\n fd := fopen(filename, WRITE):\n\n # We check that we have a recurrence of the form a(n+d)=r(n)*a(n)\n # and we extract its canonical form:\n # a(n+d) = c * s1(n)/s1(n+d) * s2(n+d)/s2(n) * p(n)/q(n) * a(n)\n #\n formalRec := checkOneTermRecurrence(rec, a(n)):\n decomposeOneTermRecurrence(formalRec, c, s1, s2, p, q):\n d := formalRec:-order:\n\n # We keep only non-trivial inital conditions\n init_cond := removeTrivialConditions(rec, a(n));\n nc := nops(init_cond):\n exponents := {1, d}:\n for i from 1 to nc do\n exponents := { op(exponents), init_cond[i][1] }\n od:\n exponents := findFixpointOfDifferences(exponents):\n exponents := exponents minus {0}:\n\n error_counter := []:\n\n fprintf(fd, \"/* Evaluation by a straightforward algorithm */\\n\"):\n fprintf(fd, \"/* Code automatically generated by metaMPFR. */\\n\"):\n\n fprintf(fd, \"static int\\n\"):\n if (type=FUNCTION_SERIES)\n then fprintf(fd, \"mpfr_%a (mpfr_ptr res, mpfr_srcptr x, mpfr_rnd_t rnd)\\n\", name):\n elif (type=FUNCTION_SERIES_RATIONAL)\n then fprintf(fd, \"mpfr_%a (mpfr_ptr res, int u, int v, mpfr_rnd_t rnd)\\n\", name):\n elif (type=CONSTANT_SERIES)\n then fprintf(fd, \"mpfr_%a (mpfr_ptr res, mpfr_rnd_t rnd)\\n\", name):\n fi:\n fprintf(fd, \"{\\n\"):\n\n\n ######################################################\n #################### Declarations ####################\n ######################################################\n\n fprintf(fd, \" MPFR_ZIV_DECL (loop);\\n\"):\n fprintf(fd, \" MPFR_SAVE_EXPO_DECL (expo);\\n\"):\n fprintf(fd, \" mpfr_prec_t wprec; /* working precision */\\n\"):\n fprintf(fd, \" mpfr_prec_t prec; /* target precision */\\n\"):\n fprintf(fd, \" mpfr_prec_t err; /* used to estimate the evaluation error */\\n\"):\n fprintf(fd, \" mpfr_prec_t correctBits; /* estimates the number of correct bits*/\\n\"):\n fprintf(fd, \" unsigned long int k;\\n\"):\n fprintf(fd, \" unsigned long int conditionNumber; /* condition number of the series */\\n\"):\n fprintf(fd, \" unsigned assumed_exponent; /* used as a lowerbound of -EXP(f(x)) */\\n\"):\n fprintf(fd, \" int r; /* returned ternary value */\\n\"):\n fprintf(fd, \" mpfr_t s; /* used to store the partial sum */\\n\"):\n \n if (whattype(c) = 'fraction') or (whattype(c) = 'integer')\n then hardconstant := 0\n else hardconstant := 1\n fi:\n if (type=FUNCTION_SERIES) then hardconstant := 1 fi:\n\n if (hardconstant=1)\n then\n if (type=CONSTANT_SERIES)\n then fprintf(fd, \" mpfr_t x%d; /* used to store %a */\\n\", d, c):\n elif (type=FUNCTION_SERIES_RATIONAL)\n then fprintf(fd, \" mpfr_t x%d; /* used to store %a */\\n\", d, c*(u/v)^d):\n elif (type=FUNCTION_SERIES)\n then fprintf(fd, \" mpfr_t x%d; /* used to store %a */\\n\", d, c*x^d):\n fi:\n fi:\n\n if (type=FUNCTION_SERIES)\n then\n fprintf(fd, \" mpfr_t tmp;\\n\"):\n if (nops(exponents)-1 >= 1) then fprintf(fd, \" mpfr_t \") fi:\n for i from 1 to nops(exponents)-1 do\n fprintf(fd, \"x%d\", exponents[i]):\n if (i 0) then f0 := 0 else f0 := init_cond[1][2] fi:\n if (type=FUNCTION_SERIES)\n then fprintf(fd, \" if (MPFR_UNLIKELY (MPFR_IS_ZERO (x)))\\n\")\n else fprintf(fd, \" if (MPFR_UNLIKELY (u==0))\\n\")\n fi:\n if (whattype(f0) = 'integer')\n then\n fprintf(fd, \" {\\n\"):\n fprintf(fd, \" return mpfr_set_si (res, %a, rnd);\\n\", f0):\n fprintf(fd, \" }\\n\")\n else\n printf(\"You need to provide a function mpfr_%a0(mpfr_t, mpfr_rnd_t) that evaluates %a with correct rounding\\n\", name, f0):\n fprintf(fd, \" {\\n\"):\n fprintf(fd, \" return mpfr_%a0 (res, rnd);\\n\", name):\n fprintf(fd, \" }\\n\")\n fi:\n\n if (type=FUNCTION_SERIES)\n then\n fprintf(fd, \" if (MPFR_UNLIKELY (MPFR_IS_INF (x)))\\n\"):\n fprintf(fd, \" {\\n\"):\n for i from -1 to 1 by 2 do # Trick to handle both -oo and +oo\n if (i<0)\n then fprintf(fd, \" if (MPFR_IS_NEG (x))\\n\"):\n else fprintf(fd, \" else\\n\")\n fi:\n fprintf(fd, \" {\\n\"):\n if (i<0) then f0 := \"m\" else f0 := \"p\" fi:\n if (fofx <> _f(x))\n then\n f0 := limit(fofx, x=i*infinity):\n if (whattype(f0)='integer')\n then fprintf(fd, \" return mpfr_set_si (res, %a, rnd);\\n\", f0):\n elif (f0 = infinity) or (f0 = -infinity)\n then\n fprintf(fd, \" MPFR_SET_INF(res);\\n\"):\n if (f0>0)\n then fprintf(fd, \" MPFR_SET_POS(res);\\n\")\n else fprintf(fd, \" MPFR_SET_NEG(res);\\n\")\n fi:\n fprintf(fd, \" MPFR_RET(0);\\n\"):\n else\n if (i<0) then f0 := \"m\" else f0 := \"p\" fi:\n fi: \n fi:\n if ((f0 = \"p\") or (f0 = \"m\"))\n then\n printf(\"You need to provide a function mpfr_%a%sinf(mpfr_t, mpfr_rnd_t) that evaluates lim(f(x), x=\", name, f0):\n if (f0 = \"m\") then printf(\"-\") fi:\n printf(\"inf) with correct rounding.\\n\"):\n fprintf(fd, \" return mpfr_%a%sinf (res, rnd);\\n\", name, f0)\n fi:\n fprintf(fd, \" }\\n\")\n od:\n fprintf(fd, \" }\\n\")\n fi:\n fi:\n\n\n ######################################################\n ################## Precomputations ###################\n ######################################################\n\n fprintf(fd, \"\\n\"):\n fprintf(fd, \" /* Save current exponents range */\\n\"):\n fprintf(fd, \" MPFR_SAVE_EXPO_MARK (expo);\\n\\n\"):\n\n if ( (type=FUNCTION_SERIES) or (type=FUNCTION_SERIES_RATIONAL) )\n then fprintf(fd, \" /* FIXME: special case for large values of |x| ? */\\n\\n\")\n fi:\n\n # Note : prec is the value such that we will try to compute an approximation\n # with relative error smaller than 2^(1-prec).\n # Several things may happen:\n # 1) We do not achieve the intended error: this is because we badly estimated the exponent of the result\n # 2) We achieve the error, but it is not sufficient to decide correct rounding (Ziv's bad case)\n # Against 1), we can try to make our estimate of the exponent better with any heuristic.\n # Against 2), we can consider more guard bits. 11 guard bits seem a good value for the beginning\n # (statistically, we expect to fail in less than 0.1 % of the cases)\n # wprec is the precision used during the computation, in order to ensure the final relative error 2^(1-prec)\n #\n fprintf(fd, \" /* We begin with 11 guard bits */\\n\"):\n fprintf(fd, \" prec = MPFR_PREC (res) + 11;\\n\"):\n fprintf(fd, \" MPFR_ZIV_INIT (loop, prec);\\n\"):\n\n # TODO: the value here can be chosen completely heursitically. We could do something much better\n # when fofx is known by using asympt(fofx, x, 1). A clean implementation appears to be complex though.\n # We must catch errors if the development does not exist (e.g. AiryAi(-x));\n # We must find a separation after which the asymptotic behavior is valid (e.g. x>1)\n printf(\"The code contains a variable assumed_exponent arbitrarily set to 10. You can put any value heuristically chosen. The closer it is to -log_2(|f(x)|), the better it is.\\n\"):\n fprintf(fd, \" assumed_exponent = 10; /* TIP: You can put any value heuristically chosen. The closer it is to -log_2(|f(x)|), the better it is */\\n\"):\n\n # TODO: find a way of putting a rigorous value here.\n # This value *must* be rigorous: the safety of the implementation relies on it.\n # Precisely, we need to have sum(|a(i)*x^i|) <= 2^conditionNumber\n fprintf(fd, \" conditionNumber = xxx; /* FIXME: set a value such that sum(|a(i)*x^i|) <= 2^conditionNumber */\\n\"):\n printf(\"The code contains a variable conditionNumber that you must manually set to a suitable value, in order to ensure that sum_{i=0}^{infinity} |a(i)*x^i| <= 2^conditionNumber\\n\"):\n fprintf(fd, \" wprec = prec + ERRORANALYSISPREC + conditionNumber + assumed_exponent;\\n\"):\n\n\n ######################################################\n ################## Initialisations ###################\n ######################################################\n\n if (hardconstant=1)\n then\n fprintf(fd, \" mpfr_init (x%d);\\n\", d):\n fi:\n if (type = FUNCTION_SERIES)\n then\n fprintf(fd, \" mpfr_init (tmp);\\n\"):\n for i from 1 to nops(exponents)-1 do\n fprintf(fd, \" mpfr_init (x%d);\\n\", exponents[i])\n od:\n fi:\n\n for i from 1 to nc do\n fprintf(fd, \" mpfr_init (tip%d);\\n\", init_cond[i][1])\n od:\n fprintf(fd, \" mpfr_init (s);\\n\\n\"):\n\n\n ######################################################\n ########## Ziv' loop: setting the precision ##########\n ######################################################\n\n fprintf(fd, \" /* ZIV' loop */\\n\"):\n fprintf(fd, \" for (;;)\\n\"):\n fprintf(fd, \" {\\n\"):\n\n fprintf(fd, \" MPFR_LOG_MSG ((\\\"Working precision: %%d\\\\n\\\", wprec, 0));\\n\\n\"):\n if (hardconstant=1)\n then\n fprintf(fd, \" mpfr_set_prec (x%d, wprec);\\n\", d):\n fi:\n if (type = FUNCTION_SERIES)\n then\n fprintf(fd, \" mpfr_set_prec (tmp, wprec);\\n\"):\n fprintf(fd, \" if(mpfr_get_prec (x) > wprec)\\n\"):\n fprintf(fd, \" mpfr_set_prec (x1, wprec);\\n\"):\n fprintf(fd, \" else\\n\"):\n fprintf(fd, \" mpfr_set_prec (x1, mpfr_get_prec (x));\\n\"):\n for i from 2 to nops(exponents)-1 do\n fprintf(fd, \" mpfr_set_prec (x%d, wprec);\\n\", exponents[i])\n od:\n fi:\n\n for i from 1 to nc do\n fprintf(fd, \" mpfr_set_prec (tip%d, wprec);\\n\", init_cond[i][1])\n od:\n fprintf(fd, \" mpfr_set_prec (s, wprec);\\n\\n\"):\n\n\n ######################################################\n ############ Ziv' loop: initial conditions ###########\n ######################################################\n\n fprintf(fd, \" mpfr_set_ui (s, 0, MPFR_RNDN);\\n\"):\n\n if (type = FUNCTION_SERIES)\n then\n fprintf(fd, \" mpfr_set (x1, x, MPFR_RNDN);\\n\"):\n error_counter := init_error_counter(\"x1\", error_counter):\n for i from 2 to nops(exponents) do\n fprintf(fd, \" mpfr_mul (x%d, x%d, x%d, MPFR_RNDN);\\n\", exponents[i], exponents[i-1], exponents[i]-exponents[i-1]):\n\tvar1 := sprintf(\"x%d\", exponents[i]):\n var2 := sprintf(\"x%d\", exponents[i-1]):\n var3 := sprintf(\"x%d\", exponents[i]-exponents[i-1]):\n\terror_counter := error_counter_of_a_multiplication(var1, var2, var3, error_counter):\n od:\n fi:\n\n for i from 1 to nc do\n i0 := init_cond[i][1]:\n ri0 := init_cond[i][2]: # We implement t_{i0} <- ri0\n if (whattype(ri0)='integer') or (whattype(ri0)='fraction')\n then\n if (type = FUNCTION_SERIES) and (i0 <> 0)\n then \n var := sprintf(\" mpfr_mul_si (tip%d, x%d, \", i0, i0):\n var1 := sprintf(\"tip%d\", i0):\n var2 := sprintf(\"x%d\", i0):\n error_counter := error_counter_of_a_multiplication(var1, var2, \"\", error_counter):\n else \n var := sprintf(\" mpfr_set_si (tip%d, \", i0):\n var1 := sprintf(\"tip%d\", i0):\n error_counter := init_error_counter(var1, error_counter):\n fi:\n fprintf(fd, \"%s%d, MPFR_RNDN);\\n\", var, numer(ri0)):\n if (whattype(ri0)='fraction')\n then\n fprintf(fd, \" mpfr_div_si (tip%d, tip%d, %d, MPFR_RNDN);\\n\", i0, i0, denom(ri0)):\n var1 := sprintf(\"tip%d\", i0):\n error_counter := error_counter_of_a_multiplication(var1, var1, \"\", error_counter):\n fi:\n else\n printf(\"You need to provide a function mpfr_%a%d (mpfr_t, mpfr_rnd_t) that evaluates %a with faithful rounding.\\n\", name, i0, ri0): \n fprintf(fd, \" mpfr_%a%d (tip%d, MPFR_RNDN);\\n\", name, i0, i0):\n var1 := sprintf(\"tip%d\", i0):\n error_counter := init_error_counter(var1, error_counter):\n if (type = FUNCTION_SERIES) and (i0 <> 0)\n then\n fprintf(fd, \" mpfr_mul (tip%d, tip%d, x%d, MPFR_RNDN);\\n\", i0, i0, i0):\n var1 := sprintf(\"tip%d\", i0):\n var2 := sprintf(\"x%d\", i0):\n error_counter := error_counter_of_a_multiplication(var1, var1, var2, error_counter):\n fi:\n fi:\n\n if (type = FUNCTION_SERIES_RATIONAL) and (i0 <> 0)\n then\n var1 := sprintf(\"tip%d\", i0):\n if (i0 = 1)\n then fprintf(fd, \" mpfr_mul_si (tip%d, tip%d, \", i0, i0):\n else\n required_mulsi := { op(required_mulsi), i0 }:\n fprintf(fd, \" mpfr_mul_si%d (tip%d, tip%d, \", i0, i0, i0):\n fi:\n for j from 1 to i0 do\n fprintf(fd, \"u, \"):\n error_counter := error_counter_of_a_multiplication(var1, var1, \"\", error_counter):\n od:\n fprintf(fd, \"MPFR_RNDN);\\n\"):\n if (i0 = 1)\n then fprintf(fd, \" mpfr_div_si (tip%d, tip%d, \", i0, i0):\n else\n required_divsi := { op(required_divsi), i0 }:\n fprintf(fd, \" mpfr_div_si%d (tip%d, tip%d, \", i0, i0, i0):\n fi:\n for j from 1 to i0 do\n fprintf(fd, \"v, \"):\n error_counter := error_counter_of_a_multiplication(var1, var1, \"\", error_counter):\n od:\n fprintf(fd, \"MPFR_RNDN);\\n\"):\n fi:\n\n fprintf(fd, \" mpfr_add (s, s, tip%d, MPFR_RNDN);\\n\\n\", i0):\n od:\n\n if (whattype(c) = 'integer') or (whattype(c) = 'fraction')\n then\n if (type = FUNCTION_SERIES) and (c = -1)\n then\n fprintf(fd, \" MPFR_CHANGE_SIGN (x%d);\\n\", d):\n elif (type = FUNCTION_SERIES) and (c <> 1)\n then\n fprintf(fd, \" mpfr_mul_si (x%d, x%d, %d, MPFR_RNDN);\\n\", d, d, numer(c)):\n var1 := sprintf(\"x%d\", d):\n error_counter := error_counter_of_a_multiplication(var1, var1, \"\", error_counter):\n if (whattype(c) = 'fraction')\n then\n fprintf(fd, \" mpfr_div_si (x%d, x%d, %d, MPFR_RNDN);\\n\", d, d, denom(c)):\n error_counter := error_counter_of_a_multiplication(var1, var1, \"\", error_counter):\n fi:\n fi:\n else\n printf(\"You need to provide a function mpfr_%a_cste (mpfr_t, mpfr_rnd_t) that evaluates %a with faithful rounding.\\n\", name, c):\n if (type = CONSTANT_SERIES)\n then\n fprintf(fd, \" mpfr_%a_cste (x%d, MPFR_RNDN);\\n\", name, d):\n var1 := sprintf(\"x%d\", d):\n error_counter := init_error_counter(var1, error_counter):\n elif (type = FUNCTION_SERIES) then\n fprintf(fd, \" mpfr_%a_cste (tmp, MPFR_RNDN);\\n\", name):\n error_counter := init_error_counter(\"tmp\", error_counter):\n fprintf(fd, \" mpfr_mul (x%d, tmp, x%d, MPFR_RNDN);\\n\", d, d):\n var1 := sprintf(\"x%d\", d):\n error_counter := error_counter_of_a_multiplication(var1, \"tmp\", var1, error_counter):\n elif (type = FUNCTION_SERIES_RATIONAL) then\n fprintf(fd, \" mpfr_%a_cste (x%d, MPFR_RNDN);\\n\", name, d):\n var1 := sprintf(\"x%d\", d):\n error_counter := init_error_counter(var1, error_counter):\n if (d = 1)\n then fprintf(fd, \" mpfr_mul_si (x%d, x%d, \", d, d):\n else\n required_mulsi := { op(required_mulsi), d }:\n fprintf(fd, \" mpfr_mul_si%d (x%d, x%d, \", d, d, d):\n fi:\n for j from 1 to d do\n fprintf(fd, \"u, \"):\n error_counter := error_counter_of_a_multiplication(var1, var1, \"\", error_counter):\n od:\n fprintf(fd, \"MPFR_RNDN);\\n\"):\n var1 := sprintf(\"x%d\", d):\n if (d = 1)\n then fprintf(fd, \" mpfr_div_si (x%d, x%d, \", d, d):\n else\n required_divsi := { op(required_divsi), d }:\n fprintf(fd, \" mpfr_div_si%d (x%d, x%d, \", d, d, d):\n fi:\n for j from 1 to d do\n fprintf(fd, \"v, \"):\n error_counter := error_counter_of_a_multiplication(var1, var1, \"\", error_counter):\n od:\n fprintf(fd, \"MPFR_RNDN);\\n\"): \n fi:\n fi:\n\n ######################################################\n ######### Ziv' loop: evaluation of the series ########\n ######################################################\n\n fprintf(fd, \"\\n\"):\n fprintf(fd, \" /* Evaluation of the series */\\n\"):\n fprintf(fd, \" k = %d;\\n\", d):\n fprintf(fd, \" for (;;)\\n\"):\n fprintf(fd, \" {\\n\"):\n if (init_cond[1][1] <> 0) then fprintf(fd, \" k += %d;\\n\", init_cond[1][1]) fi:\n\n for i from 1 to nc do\n error_in_loop := 0:\n i0 := init_cond[i][1]:\n if (hardconstant = 1)\n then \n fprintf(fd, \" mpfr_mul (tip%d, tip%d, x%d, MPFR_RNDN);\\n\", i0, i0, d):\n var1 := sprintf(\"x%d\", d):\n error_in_loop := error_in_loop + 1 + find_in_error_counter(var1, error_counter):\n else\n var := sprintf(\"tip%d\", i0):\n temp := generate_multiply_rational(fd, var, var, c, [[var, error_in_loop]], \" \"):\n error_in_loop := find_in_error_counter(var, temp):\n if (type = FUNCTION_SERIES_RATIONAL)\n then\n if (d=1)\n then\n fprintf(fd, \" mpfr_mul_si (tip%d, tip%d, u, MPFR_RNDN);\\n\", i0, i0):\n fprintf(fd, \" mpfr_div_si (tip%d, tip%d, v, MPFR_RNDN);\\n\", i0, i0):\n\t error_in_loop := error_in_loop + 2:\n else\n required_mulsi := { op(required_mulsi), d }:\n fprintf(fd, \" mpfr_mul_si%d (tip%d, tip%d\", d, i0, i0):\n for j from 1 to d do fprintf(fd, \", u\") od:\n fprintf(fd, \", MPFR_RNDN);\\n\"):\n\t error_in_loop := error_in_loop + d:\n\n required_divsi := { op(required_divsi), d }:\n fprintf(fd, \" mpfr_div_si%d (tip%d, tip%d\", d, i0, i0):\n for j from 1 to d do fprintf(fd, \", v\") od:\n fprintf(fd, \", MPFR_RNDN);\\n\" ):\n\t error_in_loop := error_in_loop + d:\n fi\n fi\n fi:\n var := sprintf(\"tip%d\", i0):\n\n temp := generate_multiply_poly(fd, var, var, subs(n=k-d, p/q), [[var, error_in_loop]], \" \"):\n required_mulsi := { op(required_mulsi), op(temp[1]) }:\n required_divsi := { op(required_divsi), op(temp[2]) }:\n error_in_loop := find_in_error_counter(var, temp[3]):\n temp := generate_multiply_poly(fd, \"tmp\", var, subs(n=k, s2/s1), [[var, error_in_loop]], \" \"):\n required_mulsi := { op(required_mulsi), op(temp[1]) }:\n required_divsi := { op(required_divsi), op(temp[2]) }:\n\n fprintf(fd, \" mpfr_add (s, s, tmp, MPFR_RNDN);\\n\"):\n \n if (i maxofti\n then maxofti := find_in_error_counter(var, error_counter):\n fi:\n od:\n additional_error := find_in_error_counter(\"tmp\", temp[3]) - error_in_loop:\n\n\n ######################################################\n #### Ziv' loop: stopping criterion for the series ####\n ######################################################\n\n # The first neglected term is tk, so the remainder is made by\n # tk + t(k+d) + t(k+2d).... and the corresponding series\n # beginning with t(k+1), t(k+2), etc. up to t(k+d-1).\n #\n # We have t(k0+d) = c*s1(k0)/s1(k0+d) * s2(k0+d)/s2(k0)* p(k0)/q(k0) * x^d t(k0)\n # (where x=u/v or x=1 in cases of rational series or constant series)\n # So it suffices that:\n # forall k0>=k-d, |c * s1(k0)/s1(k0+d) * s2(k0+d)/s2(k0) * p(k0)/q(k0) * x^d| <= 1/2 (1)\n #\n # If this is true, |tk| = |c*s1(k-d)/s1(k) * s2(k)/s2(k-d)* p(k-d)/q(k-d) * x^d t(k-d)| <= t(k-d)/2\n # This is also true for larger values of k, so we can bound |tk + t(k+d) + t(k+2d) + ...| by |t(k-d)|.\n # And the same holds for |t(k+1) + ...|, |t(k+2) + ...|, etc. up to |t(k+d-1)+...|.\n #\n # global_test depends on k and we must satisfy:\n # \"if (global_test) then (1) holds\".\n #\n # the total remainder is bounded by 2*nc*tk.\n\n fprintf(fd, \" global_test = xxx; /* FIXME: set the value in order to ensure that, whenever global_test is true, we have: forall k'>=k, |r(k')*x^d| <= 1/2, where r is the fraction such that a(n)=r(n)a(n-d)*/\\n\"):\n printf(\"The code contains a variable global_test that you must manually set to a suitable value, in order to ensure that when global_test is true, the following holds:\\n\"):\n printf(\" forall k'>=k, |r(k')*x^d| <= 1/2, where r is the fraction such that a(n)=r(n)a(n-d)\\n\"):\n guard_bits := 1+1+ceil(log[2](nc)):\n for i from 1 to nc do\n i0 := init_cond[i][1]:\n fprintf(fd, \" test%d = ( (!MPFR_IS_ZERO(s))\\n\", i0):\n fprintf(fd, \" && ( MPFR_IS_ZERO(tip%d)\\n\", i0):\n fprintf(fd, \" || (MPFR_EXP(tip%d) + (mp_exp_t)prec + %d <= MPFR_EXP(s))\\n\", i0, guard_bits):\n fprintf(fd, \" )\\n\"):\n fprintf(fd, \" );\\n\"):\n od:\n fprintf(fd, \" if (\");\n for i from 1 to nc do\n fprintf(fd, \"test%d && \", init_cond[i][1]):\n od:\n fprintf(fd, \"global_test)\\n\"):\n fprintf(fd, \" break;\\n\"):\n fprintf(fd, \" }\\n\\n\"):\n\n\n ######################################################\n ############## Ziv' loop: testing final ##############\n ######################################################\n\n fprintf(fd, \" MPFR_LOG_MSG ((\\\"Truncation rank: %%lu\\\\n\\\", k));\\n\\n\"):\n fprintf(fd, \" err = ERRORANALYSISK + conditionNumber - MPFR_GET_EXP (s);\\n\\n\"):\n fprintf(fd, \" /* err is the number of bits lost due to the evaluation error */\\n\"):\n fprintf(fd, \" /* wprec-(prec+1): number of bits lost due to the approximation error */\\n\"):\n fprintf(fd, \" MPFR_LOG_MSG ((\\\"Roundoff error: %%Pu\\\\n\\\", err));\\n\"):\n fprintf(fd, \" MPFR_LOG_MSG ((\\\"Approxim error: %%Pu\\\\n\\\", wprec-prec-1));\\n\\n\"):\n fprintf(fd, \" if (wprec < err+1)\\n\"):\n fprintf(fd, \" correct_bits=0;\\n\"):\n fprintf(fd, \" else\\n\"):\n fprintf(fd, \" {\\n\"):\n fprintf(fd, \" if (wprec < err+prec+1)\\n\"):\n fprintf(fd, \" correct_bits = wprec - err - 1;\\n\"):\n fprintf(fd, \" else\\n\"):\n fprintf(fd, \" correct_bits = prec;\\n\"):\n fprintf(fd, \" }\\n\\n\"):\n fprintf(fd, \" if (MPFR_LIKELY (MPFR_CAN_ROUND (s, correct_bits, MPFR_PREC (y), rnd)))\\n\"):\n fprintf(fd, \" break;\\n\\n\"):\n\n fprintf(fd, \" if (correct_bits == 0)\\n\"):\n fprintf(fd, \" {\\n\"):\n fprintf(fd, \" assumed_exponent *= 2;\\n\"):\n fprintf(fd, \" MPFR_LOG_MSG ((\\\"Not a single bit correct (assumed_exponent=%%lu)\\\\n\\\",\\n\"):\n fprintf(fd, \" assumed_exponent));\\n\"):\n fprintf(fd, \" wprec = prec + ERRORANALYSISK + conditionNumber + assumed_exponent;\\n\"):\n fprintf(fd, \" }\\n\"):\n fprintf(fd, \" else\\n\"):\n fprintf(fd, \" {\\n\"):\n fprintf(fd, \" if (correct_bits < prec)\\n\"):\n fprintf(fd, \" { /* The precision was badly chosen */\\n\"):\n fprintf(fd, \" MPFR_LOG_MSG ((\\\"Bad assumption on the exponent of %s(x)\\\", 0));\\n\", name):\n fprintf(fd, \" MPFR_LOG_MSG ((\\\" (E=%%ld)\\\\n\\\", (long) MPFR_GET_EXP (s)));\\n\"):\n fprintf(fd, \" wprec = prec + err + 1;\\n\"):\n fprintf(fd, \" }\\n\"):\n fprintf(fd, \" else\\n\"):\n fprintf(fd, \" { /* We are really in a bad case of the TMD */\\n\"):\n fprintf(fd, \" MPFR_ZIV_NEXT (loop, prec);\\n\\n\"):\n\n fprintf(fd, \" /* We update wprec */\\n\"):\n fprintf(fd, \" /* We assume that K will not be multiplied by more than 4 */\\n\"):\n fprintf(fd, \" wprec = prec + ERRORANALYSIS4K + conditionNumber\\n\"):\n fprintf(fd, \" - MPFR_GET_EXP (s);\\n\"):\n fprintf(fd, \" }\\n\"):\n fprintf(fd, \" }\\n\\n\"):\n\n fprintf(fd, \" } /* End of ZIV loop */\\n\\n\"):\n fprintf(fd, \" MPFR_ZIV_FREE (loop);\\n\\n\"):\n fprintf(fd, \" r = mpfr_set (res, s, rnd);\\n\\n\"):\n\n\n ######################################################\n ################ Clearing everything #################\n ######################################################\n\n fprintf(fd, \" mpfr_clear (s);\\n\"):\n if (hardconstant=1)\n then\n fprintf(fd, \" mpfr_clear (x%d);\\n\", d):\n fi:\n if (type = FUNCTION_SERIES)\n then\n fprintf(fd, \" mpfr_clear (tmp);\\n\"):\n for i from 1 to nops(exponents)-1 do\n fprintf(fd, \" mpfr_clear (x%d);\\n\", exponents[i]):\n od:\n fi:\n\n for i from 1 to nc do\n fprintf(fd, \" mpfr_clear (tip%d);\\n\", init_cond[i][1]):\n od:\n\n fprintf(fd, \"\\n\"):\n fprintf(fd, \" MPFR_SAVE_EXPO_FREE (expo);\\n\"):\n fprintf(fd, \" return mpfr_check_range (res, r, rnd);\\n\"):\n fprintf(fd, \"}\\n\"):\n \n fclose(fd):\n\n for i from 1 to nops(required_mulsi) do\n printf(\"You need to provide a mpfr_mul_si%d function.\\n\", required_mulsi[i]):\n printf(\" -> This can be achieved by a call to generate_muldivsin(\\\"mul\\\", %d):\\n\", required_mulsi[i]):\n od:\n for i from 1 to nops(required_divsi) do\n printf(\"You need to provide a mpfr_div_si%d function.\\n\", required_divsi[i]):\n printf(\" -> This can be achieved by a call to generate_muldivsin(\\\"div\\\", %d):\\n\", required_divsi[i]):\n od:\n\n\n ######################################################\n ################## Error analysis ####################\n ######################################################\n \n printf(\"\\n\\n\"):\n printf(\"Before the loop, we have \"):\n for i from 1 to nc do\n var := sprintf(\"tip%d\", init_cond[i][1]):\n printf(\"%s {%d}\", var, find_in_error_counter(var, error_counter)):\n if (i <> nc) then printf(\", \") else printf(\"\\n\") fi:\n od:\n printf(\"Each step of the loop adds another {%d}\\n\", error_in_loop):\n if (additional_error <> 0)\n then printf(\"Moreover, the multiplication by %a adds another {%d} to each term before it is summed.\\n\", subs(n=k, s2/s1), additional_error)\n fi:\n printf(\"Finally, we have s = sum_(i=0)^(k-1) ( ti{%d + %dk} )\\n\", maxofti + additional_error + 1 - error_in_loop, error_in_loop):\n printf(\"We bound it by {(k+%d)*2^(%d)}\\n\", ceil( (maxofti + additional_error + 1 - error_in_loop)/error_in_loop), ceil(log[2](error_in_loop))):\n\n a := ceil( (maxofti + additional_error + 1 - error_in_loop)/error_in_loop):\n b := ceil(log[2](error_in_loop)):\n\n if (a > 0)\n then var := sprintf(\"MPFR_INT_CEIL_LOG2 (prec + %d)\", a)\n elif (a=0) then var := sprintf(\"MPFR_INT_CEIL_LOG2 (prec)\")\n else sprintf(\"MPFR_INT_CEIL_LOG2 (prec - %d)\", -a)\n fi:\n if (b > 0) then var := sprintf(\"%s + %d\", var, b+2) fi:\n var := sprintf(\"sed -n -i 's/ERRORANALYSISPREC/%s/g;p' %s\", var, filename):\n system(var):\n\n if (a > 0)\n then var := sprintf(\"MPFR_INT_CEIL_LOG2 (k + %d)\", a)\n elif (a=0) then var := sprintf(\"MPFR_INT_CEIL_LOG2 (k)\")\n else sprintf(\"MPFR_INT_CEIL_LOG2 (k - %d)\", -a)\n fi:\n if (b > 0) then var := sprintf(\"%s + %d\", var, b+2) fi:\n var := sprintf(\"sed -n -i 's/ERRORANALYSISK/%s/g;p' %s\", var, filename):\n system(var):\n\n if (a > 0)\n then var := sprintf(\"MPFR_INT_CEIL_LOG2 (k + %d)\", a)\n elif (a=0) then var := sprintf(\"MPFR_INT_CEIL_LOG2 (k)\")\n else sprintf(\"MPFR_INT_CEIL_LOG2 (k - %d)\", -a)\n fi:\n var := sprintf(\"%s + %d\", var, b+4):\n var := sprintf(\"sed -n -i 's/ERRORANALYSIS4K/%s/g;p' %s\", var, filename):\n system(var):\n\nend proc:\n", "meta": {"hexsha": "bfa8aca0d85d2a53c00244f179070c5921770d49", "size": 30452, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "LibSource/mpfr/tools/metaMPFR/metaMPFR_straightforwardAlgo.mpl", "max_stars_repo_name": "ekzyis/CrypTool-2", "max_stars_repo_head_hexsha": "1af234b4f74486fbfeb3b3c49228cc36533a8c89", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 12, "max_stars_repo_stars_event_min_datetime": "2021-09-29T14:50:06.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T15:01:21.000Z", "max_issues_repo_path": "LibSource/mpfr/tools/metaMPFR/metaMPFR_straightforwardAlgo.mpl", "max_issues_repo_name": "ekzyis/CrypTool-2", "max_issues_repo_head_hexsha": "1af234b4f74486fbfeb3b3c49228cc36533a8c89", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 15, "max_issues_repo_issues_event_min_datetime": "2021-12-24T22:53:49.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-25T10:03:13.000Z", "max_forks_repo_path": "LibSource/mpfr/tools/metaMPFR/metaMPFR_straightforwardAlgo.mpl", "max_forks_repo_name": "ekzyis/CrypTool-2", "max_forks_repo_head_hexsha": "1af234b4f74486fbfeb3b3c49228cc36533a8c89", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 10, "max_forks_repo_forks_event_min_datetime": "2021-10-17T19:46:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-18T02:57:57.000Z", "avg_line_length": 43.011299435, "max_line_length": 240, "alphanum_fraction": 0.5384539603, "num_tokens": 9140, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.665410558746814, "lm_q2_score": 0.4882833952958347, "lm_q1q2_score": 0.3249089268905928}} {"text": "`depends/Bucket` := proc(mr, r::(name=range), x, $)\n depends(rhs(r), x) or depends(mr, x minus {lhs(r)})\nend proc:\n\n`depends/Index` := proc(n, o::name, e, mr, x, $)\n depends({n,e}, x) or depends(mr, x minus {o})\nend proc:\n\n# note that v _can_ occur in m1.\n`depends/Let` := proc(m1, v::name, m2, x, $)\n depends(m1, x) or depends(m2, x minus {v})\nend proc:\n\n`eval/Bucket` := proc(e::anyfunc(anything,name=range), eqs, $)\n local bvar, body;\n bvar, body := BindingTools:-generic_evalat(op([2,1],e), op(1,e), eqs);\n eval(op(0,e), eqs)(body, bvar = eval(op([2,2],e), eqs))\nend proc:\n\n`eval/Index` := proc(e::anyfunc(anything,name,anything,anything), eqs, $)\n local o, mr;\n o, mr := BindingTools:-generic_evalat(op(2,e), op(4,e), eqs);\n eval(op(0,e), eqs)(eval(op(1,e), eqs), o, eval(op(3,e), eqs), mr)\nend proc:\n\n`eval/Let` := proc(e, eqs, $)\n local m1, v, m2;\n m1, v, m2 := op(e);\n eval(op(0,e), eqs)(eval(m1, eqs), BindingTools:-generic_evalat(v, m2, eqs))\nend proc:\n\nSummary := module ()\n option package;\n export RoundTrip, Summarize, SummarizeKB, bucket, summarize;\n global Bucket, Fanout, Index, Split, Nop, Add, Let,\n SumIE, ProductIE, BucketIE;\n uses Hakaru, KB;\n\n RoundTrip := proc(e)\n local result;\n interface(screenwidth=9999, prettyprint=0, warnlevel=0,\n showassumed=0,quiet=true);\n kernelopts(assertlevel=0);\n result := eval(ToInert(Summarize(_passed)), _Inert_ATTRIBUTE=NULL);\n lprint(result)\n end proc;\n\n Summarize := proc(e, {ctx :: list := []}, $)\n local ie;\n ie := table('[sum =SumIE , Sum =SumIE ,\n product=ProductIE, Product=ProductIE,\n bucket =BucketIE , Bucket =BucketIE ]');\n subsindets(SummarizeKB(e, foldr(assert, empty, op(ctx))),\n And(specfunc({indices(ie, 'nolist')}),\n anyfunc(anything, anything=range)),\n e -> subsop(0 = ie[op(0,e)],\n applyop(`+`, [2,2,2], e, 1)))\n end proc;\n\n SummarizeKB := proc(e, kb :: t_kb, $)\n local patterns, x, kb1, e1, rng, summary, mr, f;\n if not hasfun(e, '{Sum,sum}', 'piecewise') then\n e;\n elif e :: '{known_continuous, known_discrete,\n specfunc({Msum, Weight, Fanout, Split, Nop, Add,\n exp, log, GAMMA, Beta, idx, And, Or, Not}),\n `+`, `*`, `^`, `..`, boolean, indexed, list}' then\n map(procname, _passed);\n elif e :: 'Context(anything, anything)' then\n kb1 := assert(op(1,e), kb);\n applyop(procname, 2, e, kb1);\n elif e :: 'specfunc(piecewise)' then\n kb_piecewise(e, kb, ((lhs, kb) -> lhs), SummarizeKB);\n elif e :: 'lam(name, anything, anything)' then\n patterns := htype_patterns(op(2,e));\n if patterns :: Branches(Branch(PVar(name),anything)) then\n # Eta-expand the function type\n x := op(1,e);\n x, kb1 := genType(x, op(2,e), kb);\n e1 := eval(op(3,e), op(1,e)=x);\n lam(x, op(2,e), SummarizeKB(e1, kb1))\n else\n # Eta-expand the function type and the sum-of-product argument-type\n x := op(1,e);\n if depends([e,kb], x) then x := gensym(x) end if;\n e1 := eval(op(3,e), op(1,e)=x);\n lam(x, op(2,e), 'case'(x,\n map(proc(branch)\n local eSubst, pSubst, p1, binds, y, kb1, i, pSubst1;\n eSubst, pSubst := pattern_match([x,e], x, op(1,branch));\n p1 := subs(pSubst, op(1,branch));\n binds := [pattern_binds(p1)];\n kb1 := kb;\n pSubst1 := table();\n for i from 1 to nops(binds) do\n y, kb1 := genType(op(i,binds), op([2,i],branch), kb1);\n pSubst1[op(i,binds)] := y;\n end do;\n pSubst1 := op(op(pSubst1));\n Branch(subs(pSubst1, p1),\n SummarizeKB(eval(eval(e1,eSubst),pSubst1), kb1))\n end proc,\n patterns)))\n end if\n elif e :: 'ary(anything, name, anything)' then\n x, kb1 := genType(op(2,e), HInt(closed_bounds(0..op(1,e)-1)), kb);\n e1 := SummarizeKB(eval(op(3,e), op(2,e)=x), kb1);\n subsop(2=x, 3=e1, e);\n elif e :: 'And(specfunc({sum, Sum, product, Product}),\n anyfunc(anything, name=range))' then\n rng := op([2,2],e);\n x, kb1 := genType(op([2,1],e), HInt(closed_bounds(rng)), kb);\n rng := map(SummarizeKB, rng, kb);\n e1 := eval(op(1,e), op([2,1],e)=x);\n if op(0, e) in '{sum, Sum}' and has(e1, 'piecewise') then\n mr, f := summarize(e1, kb, x, summary);\n if hasfun(mr, '{Fanout, Index}') then\n mr := SummarizeKB(mr, kb1);\n return Let(Bucket(mr, x=rng),\n summary,\n NewSLO:-simplify_factor_assuming(f, kb));\n end if;\n end if;\n e1 := SummarizeKB(e1, kb1);\n subsop(2=(x=rng), 1=e1, e);\n else\n error \"SummarizeKB doesn't know how to handle %1\", e;\n end if;\n end proc;\n\n bucket := proc(mr, r::(name=range), cond::list:=[], $)\n if mr :: 'Fanout(anything,anything)' then\n Pair(op(map(procname, _passed)))\n elif mr :: 'Split(anything,anything,anything)' then\n Pair(bucket(op(2,mr), r, [ op(1,mr) ,op(cond)]),\n bucket(op(3,mr), r, [Not(op(1,mr)),op(cond)]))\n elif mr :: 'Index(anything,name,anything,anything)' then\n ary(op(1,mr), op(2,mr),\n bucket(op(4,mr), r, [op(2,mr)=op(3,mr),op(cond)]));\n elif mr :: 'Nop()' then\n _Unit\n elif mr :: 'Add(anything)' then\n sum(piecewise_And(cond, op(1,mr), 0), r)\n else\n 'procname(_passed)'\n end if;\n end proc;\n\n summarize := proc(ee,\n kb :: t_kb,\n i :: {name,list(name),set(name)},\n summary, $)\n local e, r, s,\n e1, mr1, f1, e2, mr2, f2,\n variables, var_outerness, outermost, thunk, consider,\n o, t, lo, hi, b, a;\n\n # Try to ensure termination\n e := simplify_assuming(ee, kb);\n if length(e) >= length(ee) then e := ee end if;\n\n # Nop rule\n if Testzero(e) then return Nop(), 0 end if;\n\n r := indets(e, '{relation, logical, specfunc({And,Or})}');\n s, r := selectremove(depends, r, i);\n # Fanout rule\n r := sort(convert(r, 'list'), 'length');\n while nops(r) > 0 do\n e1 := eval(e, r[-1]=true); if e = e1 then r := r[1..-2]; next end if;\n e2 := eval(e, r[-1]=false); if e = e2 then r := r[1..-2]; next end if;\n mr1, f1 := summarize(e1, kb, i, 'fst(summary)');\n mr2, f2 := summarize(e2, kb, i, 'snd(summary)');\n return Fanout(mr1, mr2), 'piecewise'(r[-1], f1, f2);\n end do;\n\n variables := kb_to_variables(kb);\n var_outerness := table(variables =~ [seq(1..nops(variables))]);\n outermost := -infinity;\n consider := proc(expr, th, $)\n local outerness;\n outerness := map((n -> var_outerness[n]), indets(expr, 'name'));\n outerness := min(select(type, outerness, 'integer'));\n if outermost < outerness then\n outermost := outerness;\n thunk := th;\n end if;\n end proc;\n if has(variables, i) then\n error \"The loop to be summarized shadows the variable %1\", i;\n end if;\n for r in s do\n e1 := eval(e, r=true); if e = e1 then next end if;\n e2 := eval(e, r=false); if e = e2 then next end if;\n # Index rule\n if r :: `=` and Testzero(e2) then\n for o in indets(r, 'name') minus convert(i, 'set') do\n if not (var_outerness[o] :: integer) then next end if;\n t := getType(kb, o);\n if not (t :: specfunc(HInt)) then next end if;\n lo := op(select(type, t, 'Bound(identical(`>=`), anything)'));\n if lo = NULL then next else lo := op(2,lo) end if;\n hi := op(select(type, t, 'Bound(identical(`<=`), anything)'));\n if hi = NULL then next else hi := op(2,hi) end if;\n if not ispoly(`-`(op(r)), 'linear', o, 'b', 'a') then next end if;\n b := Normalizer(-b/a);\n consider(b, ((e1, o, lo, hi, b) -> proc($)\n local mr, f;\n mr, f := summarize(e1, kb, i, 'idx'(summary, o-lo));\n Index(hi-lo+1, o, b, mr),\n 'piecewise'(And(o::integer, lo<=o, o<=hi), f, 0);\n end proc)(e1, o, lo, hi, b));\n end do;\n end if;\n # Split rule\n consider(r, ((e1, e2, r) -> proc($)\n local mr1, f1, mr2, f2;\n mr1, f1 := summarize(e1, kb, i, 'fst(summary)');\n mr2, f2 := summarize(e2, kb, i, 'snd(summary)');\n Split(r, mr1, mr2), f1 + f2;\n end proc)(e1, e2, r));\n end do;\n if thunk :: procedure then\n return thunk();\n else\n # Add rule\n return Add(e), summary;\n end if;\n end proc;\nend module; # Summary\n", "meta": {"hexsha": "7aab63d9b0436964ca828432622da20a0b1e3a24", "size": 8740, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "maple/Summary.mpl", "max_stars_repo_name": "zaxtax/hakaru", "max_stars_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 4, "max_stars_repo_stars_event_min_datetime": "2015-02-07T17:57:04.000Z", "max_stars_repo_stars_event_max_datetime": "2016-01-29T19:40:24.000Z", "max_issues_repo_path": "maple/Summary.mpl", "max_issues_repo_name": "zaxtax/hakaru", "max_issues_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "maple/Summary.mpl", "max_forks_repo_name": "zaxtax/hakaru", "max_forks_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 37.8354978355, "max_line_length": 77, "alphanum_fraction": 0.5254004577, "num_tokens": 2817, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5621765008857981, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.322508519735389}} {"text": "######################################################################\n\n`is_element/P/itloc` := (N::set(nonnegint)) -> (AA) -> (T) -> proc(TT)\n `is_element/M1/itloc`(N)(AA)(TT) and `omega/itloc`(TT) = T;\nend:\n\n`is_leq/P/itloc` := (N::set(nonnegint)) -> (AA) -> (T) -> proc(TT0,TT1)\n `and`(seq(TT0[i] minus TT1[i] = {},i=1..nops(TT0)));\nend:\n\n`list_elements/P/itloc` := (N::set(nonnegint)) -> (AA) -> proc(T)\n local BB,L;\n \n BB := `cap/itloc`(AA,T);\n L := `list_elements/M1/itloc`(T)(BB);\n L := select(TT -> `omega/itloc`(TT) = T,L);\n return L;\nend:\n\n######################################################################\n\n`is_element/P_star/itloc` := (N) -> (AA) -> (T) -> (iu) -> proc(TT)\n local i,u;\n \n i,u := op(iu);\n\n if not(`is_element/P/itloc`(N)(AA)(T)(TT)) then\n return false;\n fi;\n\n if max(u,op(TT[i])) <> u then\n return false;\n fi;\n\n return true;\nend:\n\n`Alpha/itloc` := (N) -> (AA) -> (T) -> (iu) -> proc(TT)\n local i,u,r,UU;\n \n i,u := op(iu);\n\n if max(op(TT[i])) < u then\n return TT;\n fi;\n\n r := nops(AA);\n UU := [\n seq(TT[k],k=1..i),\n TT[i+1] union {u},\n seq(TT[k],k=i+2..r)\n ];\n\n return UU;\nend:\n\n`Beta/itloc` := (N) -> (AA) -> (T) -> (iu) -> proc(TT)\n local i,u,r,UU;\n \n i,u := op(iu);\n\n if max(op(TT[i])) < u then\n return TT;\n fi;\n\n r := nops(AA);\n UU := [\n seq(TT[k],k=1..i-1),\n TT[i] minus {u},\n TT[i+1] union {u},\n seq(TT[k],k=i+2..r)\n ];\n\n return UU;\nend:\n\n######################################################################\n\n`is_element/MM/itloc` := (N) -> (AA) -> (T) -> (i) -> proc(TT)\n local a,r,k,UU;\n \n if not(`is_element/P/itloc`(N)(AA)(T)(TT)) then\n return false;\n fi;\n\n a := `bot/threads/itloc`(`cap/itloc`(AA,T));\n r := nops(AA);\n UU := [\n select(t -> t <= a[1],T),\n seq(select(t -> a[k-1] <= t and t <= a[k],T),k=2..r)\n ];\n\n for k from 1 to i do\n if TT[k] <> UU[k] then return false; fi;\n od;\n\n return true;\nend:\n\n`is_element/NN/itloc` := (N) -> (AA) -> (T) -> (i) -> proc(TT)\n local a,r,k,UU;\n \n if not(`is_element/P/itloc`(N)(AA)(T)(TT)) then\n return false;\n fi;\n\n a := `bot/threads/itloc`(`cap/itloc`(AA,T));\n r := nops(AA);\n UU := [\n select(t -> t <= a[1],T),\n seq(select(t -> a[k-1] <= t and t <= a[k],T),k=2..r)\n ];\n\n for k from 1 to i do\n if TT[k] <> UU[k] then return false; fi;\n od;\n\n if i = 0 and not(member(min(op(T)),TT[1])) then\n return false;\n fi;\n \n if i > 0 and not(member(a[i],TT[i+1])) then\n return false;\n fi;\n \n return true;\nend:\n\n`is_element/LL/itloc` := (N) -> (AA) -> (T) -> (iu) -> proc(TT)\n local i,u,a,r,k,UU;\n\n i,u := op(iu);\n \n if not(`is_element/NN/itloc`(N)(AA)(T)(i-1)(TT)) then\n return false;\n fi;\n\n if max(op(TT[i])) > u then\n return false;\n fi;\n\n return true;\nend:\n\n`theta/itloc` := (N) -> (AA) -> (T) -> (i) -> proc(TT)\n local a,r;\n \n a := `bot/threads/itloc`(`cap/itloc`(AA,T));\n r := nops(AA);\n \n return [\n seq(TT[k],k=1..i),\n TT[i+1] union {a[i]},\n seq(TT[k],k=i+2..r)\n ];\nend;", "meta": {"hexsha": "f2d23e53d02b0d281738f04f403b26f16d5239ef", "size": 2874, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/scratch/itloc_scratch.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/scratch/itloc_scratch.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/scratch/itloc_scratch.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 18.4230769231, "max_line_length": 71, "alphanum_fraction": 0.4735560195, "num_tokens": 1118, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6477982315512489, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.3213687054147485}} {"text": "#@ Not autoload\n\nN := 20;\n\nFamilies := []:\nElements := []:\nRelations := []:\n\nElementDocumentation := \"\":\n\nLaTeXName := table([]):\n\nFamilyStem := proc(u)\n 'FamilyStem'(u);\nend:\n\nFamilySource := proc(u)\n 'FamilySource'(u);\nend:\n\nFamilyTarget := proc(u)\n 'FamilyTarget'(u);\nend:\n\nSource := proc(u)\n local L;\n if type(u,integer) then\n return(0);\n elif type(u,`+`) then\n L := map(Source,{op(u)});\n if nops(L) = 1 then\n return(L[1]);\n else\n return(FAIL);\n fi;\n elif type(u,specfunc(anything,o)) then\n return(Source(op(-1,o)));\n elif type(u,specfunc(anything,E)) then\n return(Source(op(1,u))+1);\n elif type(u,specfunc(anything,H)) then\n return(Source(op(1,u)));\n elif type(u,specfunc(anything,P)) then\n return(Source(op(1,u))-2);\n elif type(u,indexed) and type(FamilyStem(op(0,u)),integer) then\n return(FamilyStem(op(0,u))+op(1,u));\n else\n return('Source'(args));\n fi;\nend:\n\nTarget := proc(u)\n local L;\n if type(u,integer) then\n return(0);\n elif type(u,`+`) then\n L := map(Target,{op(u)});\n if nops(L) = 1 then\n return(L[1]);\n else\n return(FAIL);\n fi;\n elif type(u,specfunc(anything,o)) then\n return(Target(op(1,o)));\n elif type(u,specfunc(anything,E)) then\n return(Target(op(1,u))+1);\n elif type(u,specfunc(anything,H)) then\n return(2*Target(op(1,u))-1);\n elif type(u,specfunc(anything,P)) then\n return((Target(op(1,u))-1)/2);\n elif type(u,indexed) and type(FamilyStem(op(0,u)),integer) then\n return(op(1,u));\n else\n return('Target'(args));\n fi;\nend:\n\nE := proc(u) \n if type(u,`+`) then\n return(map(E,u));\n elif type(u,specfunc(anything,o)) then\n return(map(E,u));\n elif type(u,specfunc(anything,P)) then\n return(0);\n elif type(u,indexed) and member(op(0,u),Families) and nops(u) > 0 then\n return(op(0,u)[op(1,u)+1]);\n else\n return('E'(args));\n fi;\nend:\n\nH := proc(u) \n if type(u,`+`) then\n return(map(H,u));\n elif type(u,specfunc(anything,E)) then\n return(0);\n else\n return('H'(args));\n fi;\nend:\n\nP := proc(u) \n if type(u,`+`) then\n return(map(P,u));\n elif type(u,specfunc(anything,H)) then\n return(0);\n else\n return('P'(args));\n fi;\nend:\n\nis_E := proc(u)\n if type(u,specfunc(anything,E)) then\n return true;\n elif type(u,indexed) and\n member(op(0,u),Families) and\n op(1,u) > FamilyTarget(op(0,u)) then\n return true;\n else\n return false;\n fi;\nend:\n\no := proc(a,b)\n local a0,a1,b0,b1;\n if a=0 or b=0 then\n return(0);\n elif type(b,`+`) then\n return(map2(o,a,b));\n elif type(b,`*`) then\n b0,b1 := selectremove(type,b,integer);\n return b0 * o(a,b1);\n elif type(a,`+`) and is_E(b) then\n return(map(o,a,b));\n elif type(a,`*`) and is_E(b) then\n a0,a1 := selectremove(type,a,integer);\n return a0 * o(a1,b);\n else\n return('o'(args));\n fi;\nend:\n\nDefinition := table([]):\nIndeterminacy := table([]):\nAdditiveOrder := table([]):\n\nLaTeXForm :=\n proc(x)\n local s;\n s := LaTeXName[x];\n if not(type([s],[string])) then s := sprintf(\"%A\",x); fi;\n s;\n end:\n\nDeclareFamily := \n proc(nam,fmt,source,target,defn)\n global Families,LaTeXName,Source,Target,Definition,ElementDocumentation;\n Families := [op(Families),nam];\n LaTeXName[nam] := fmt;\n FamilySource(nam) := source;\n FamilyTarget(nam) := target;\n FamilyStem(nam) := source-target;\n Definition[nam] := defn;\n ElementDocumentation := \n cat(\n ElementDocumentation,\n \"\\n\\\\item \",defn,\n \" Maple notation is {\\\\tt \",convert(nam,string),\"[n]}.\\n\"\n );\n end:\n \nDeclareElement := \n proc(nam,fmt,source,target,defn)\n global Elements,LaTeXName,Source,Target,Definition,ElementDocumentation;\n Elements := [op(Elements),nam];\n LaTeXName[nam] := fmt;\n Source(nam) := source;\n Target(nam) := target;\n Definition[nam] := defn;\n ElementDocumentation := \n cat(\n ElementDocumentation,\n \"\\n\\\\item \",defn,\n \" Maple notation is {\\\\tt \",convert(nam,string),\"[n]}.\\n\"\n );\n end:\n\nSetOrder := \n proc(x,n::Or(posint,identical(infinity)),reason::string)\n global AdditiveOrder;\n AdditiveOrder[x] := n;\n end:\n\nRelations := [];\nFullRelations := [];\n\nAddRelation := \n proc(a,cond,b,text)\n global Relations,FullRelations;\n local var,v0,a0,b0;\n\n FullRelations := [op(FullRelations),[a,cond,b,text]];\n if type(cond,`<=`) then\n var := rhs(cond);\n v0 := lhs(cond);\n a0 := subs(var = v0,a);\n b0 := subs(var = v0,b);\n while (Source(a0) <= 2*N and Target(v0) <= N and v0 <= 3*N) do\n Relations := [op(Relations),a0 = b0];\n v0 := v0+1;\n a0 := subs(var = v0,a);\n b0 := subs(var = v0,b);\n od:\n else\n Relations := [op(Relations),a = b];\n fi;\n end:\n \n######################################################################\n\n# Declarations of elements and families of elements \n\nDeclareFamily(\n iota,\"\\\\iota\",1,1,\n \"\\\\(\\\\iota_n:S^n\\\\rightarrow S^n\\\\) is the identity map.\"\n):\n\nIndeterminacy[iota[1]] := {}:\n\nDeclareFamily(\n eta,\"\\\\eta\",3,2,\n cat(\n \"\\\\(\\\\eta_2:S^3\\\\rightarrow S^2\\\\) is the complex Hopf map. \",\n \"For \\\\(k\\\\geq 2\\\\) we put \\\\(\\\\eta_k=\\\\E^{k-2}\\\\eta_2\\\\). \"\n )\n):\n\nIndeterminacy[eta[2]] := {}:\n\nDeclareFamily(\n nu,\"\\\\nu\",7,4,\n cat( \n \"\\\\(\\\\nu_4:S^7\\\\rightarrow S^4\\\\) is defined by the properties \",\n \"\\\\(H(\\\\nu_4)=\\\\iota_7\\\\) and \\\\(2\\\\E(\\\\nu_4)=\\\\E^2\\\\nu'\\\\) \",\n \"(Lemma 5.4). I think this only defines it modulo \\\\(2\\\\nu'\\\\). \",\n \"However, I think we pin it down precisely by requiring that \",\n \"\\\\(\\\\nu_4\\\\) should be equal to the quaternionic Hopf map plus an \",\n \"odd torsion class, and that \\\\(\\\\E\\\\nu_4\\\\) should be 2-torsion. \",\n \"For \\\\(n\\\\geq 4\\\\) we put \\\\(\\\\nu_n=\\\\E^{n-4}\\\\nu_4\\\\).\"\n )\n):\n\nIndeterminacy[nu[4]] := {}:\n\nDeclareFamily(\n sigma,\"\\\\sigma\",15,8,\n cat(\n \"\\\\(\\\\sigma_8:S^{15}\\\\rightarrow S^{8}\\\\) is the octonionic Hopf map \",\n \"plus an odd torsion class, chosen so that \\\\(\\\\E\\\\sigma_8\\\\) is \",\n \"2-torsion. Toda defines it (Lemma 5.14) by the property that \",\n \"\\\\(H(\\\\sigma_8)=\\\\iota_{15}\\\\). \",\n \"For \\\\(n\\\\geq 8\\\\) we put \\\\(\\\\sigma_n=\\\\E^{n-8}\\\\sigma_8\\\\).\"\n )\n):\n\nIndeterminacy[sigma[8]] := {}:\n\nDeclareFamily(\n epsilon,\"\\\\epsilon\",11,3,\n cat(\n \"\\\\(\\\\epsilon_3:S^{11}\\\\rightarrow S^3\\\\) is the unique element of the \",\n \"Toda bracket \\\\(\\\\langle\\\\eta_3,\\\\E\\\\nu',\\\\nu_7\\\\rangle_1\\\\) (see \",\n \"the beginning of Toda's Chapter VI). \",\n \"For \\\\(k\\\\geq 3\\\\) we put \\\\(\\\\epsilon_k=\\\\E^{k-3}\\\\epsilon_3\\\\).\"\n )\n):\n\nTodaBracketRepresentation[epsilon[3]] := \n TodaBracket[{eta[3],nuprime,nu[6]},1]:\nIndeterminacy[epsilon[3]] := {}:\n\nDeclareFamily(\n nubar,\"\\\\overline{\\\\nu}\",14,6,\n cat(\n \"In Toda's Section VI(ii) he defines \\\\(\\\\nubar_6:S^{14}\\\\rightarrow S^6\\\\) \",\n \"to be an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\nu_6,\\\\eta_9,\\\\nu_{10}\\\\rangle_1\\\\). We will let \\\\(\\\\nubar_6\\\\)\",\n \"denote the unique element of this Toda bracket that satisfies \",\n \"\\\\(H(\\\\nubar_6)=\\\\nu_{11}\\\\). This definition is validated in \",\n \"the notes by Strickland. \",\n \"We put \\\\(\\\\nubar_n=\\\\E^{n-6}\\\\nubar_6\\\\) for \\\\(n\\\\geq 6\\\\).\"\n )\n):\n\nTodaBracketRepresentation[nubar[6]] := \n TodaBracket[{nu[6],eta[8],nu[9]},1]:\nIndeterminacy[nubar[6]] := {}:\n\nDeclareFamily(\n mu,\"\\\\mu\",12,3,\n cat(\n \"The map \\\\(\\\\mu_3:S^{12}\\\\rightarrow S^3\\\\) is defined in Toda's \",\n \"Section VI(iii) by a procedure of several steps, involving the cofibre \",\n \"of the map \\\\(\\\\nu':S^6/8\\\\rightarrow S^3\\\\). It turns out that the \",\n \"indeterminacy is \\\\(\\\\{0,\\\\eta_3\\\\circ\\\\epsilon_4\\\\}\\\\) \",\n \"(see the discussion preceeding Lemma 6.5, together with Theorem 7.1). \",\n \"We also have \",\n \"\\\\(\\\\pi_{12}S^3=\\\\Z_2\\\\mu_3\\\\oplus\\\\Z_2(\\\\eta_3\\\\circ\\\\epsilon_4)\\\\). \",\n \"The element \\\\(\\\\eta_3\\\\circ\\\\epsilon_4\\\\) has Adams filtration 4, \",\n \"and we make the unique choice of \\\\(\\\\mu_3\\\\) that has Adams \",\n \"filtration 5. \",\n \"We write \\\\(\\\\mu_k=\\\\E^{k-3}\\\\mu_3\\\\) for \\\\(k\\\\geq 3\\\\). \"\n )\n):\n\nIndeterminacy[mu[3]] := {}:\n\nDeclareFamily(\n zeta,\"\\\\zeta\",16,5,\n cat(\n \"We define \\\\(\\\\zeta_5:S^{16}\\\\rightarrow S^5\\\\) to be the unique element \",\n \"of the Toda bracket \",\n \"\\\\(\\\\langle\\\\nu_5,8\\\\iota_8,\\\\E\\\\sigma'\\\\rangle_1\\\\) that satisfies \",\n \"\\\\(H(\\\\zeta_5)=8\\\\sigma_9\\\\) and \\\\(P(\\\\zeta_5)=\\\\pm\\\\eta_2\\\\circ\\\\mu'\\\\). \",\n \"This is validated in the notes by Strickland, based on Toda's Section VI(v). \",\n \"For \\\\(k\\\\geq 5\\\\) we put \\\\(\\\\zeta_k=\\\\E^{k-5}\\\\zeta_5\\\\). \"\n )\n):\n\nTodaBracketRepresentation[zeta[5]] := \n TodaBracket[{nu[5],8 * iota[7],sigmaprime},1]:\nIndeterminacy[zeta[5]] := {}:\n\nDeclareFamily(\n kappa,\"\\\\kappa\",21,7,\n cat(\n \"The element \\\\(\\\\kappa_7:S^{21}\\\\rightarrow S^7\\\\) is defined in Toda's \",\n \"Section X(i) as an element of a Toda bracket involving the Moore space \",\n \"\\\\(S^9/2\\\\). The indeterminacy is not given explicitly. For \\\\(k\\\\geq 7\\\\) \",\n \"we put \\\\(\\\\kappa_k=\\\\E^{k-7}\\\\kappa_7\\\\).\"\n )\n):\n\nDeclareFamily(\n epsilonbar,\"\\\\overline{\\\\epsilon}\",18,3,\n cat(\n \"\\\\(\\\\epsilonbar_3:S^{18}\\\\rightarrow S^3\\\\) is the unique element of the Toda \",\n \"bracket \\\\(\\\\langle \\\\epsilon_3,2\\\\iota_{5},\\\\nu_5\\\\circ\\\\nu_8\\\\rangle_6\\\\), \",\n \"and the unique nonzero element of \\\\(\\\\pi_{18}^3\\\\). See Toda's Section X(i) \",\n \"and Theorem 10.5. For \\\\(k\\\\geq 3\\\\) we put \",\n \"\\\\(\\\\epsilonbar_k=\\\\E^{k-3}\\\\epsilonbar_3\\\\). \"\n )\n):\n\nTodaBracketRepresentation[epsilonbar[3]] := \n TodaBracket[{epsilon[3],2 * iota[5],o[nu[5],nu[8]]},6]:\nIndeterminacy[epsilonbar[3]] := {}:\n\nDeclareFamily(\n rho,\"\\\\rho\",28,13,\n cat(\n \"\\\\(\\\\rho_{13}:S^{28}\\\\rightarrow S^{13}\\\\) is defined in Toda's Lemma 10.9 \",\n \"by the properties \\\\(2\\\\rho_{13}=\\\\E^4\\\\rho'\\\\) and \",\n \"\\\\(\\\\E^{\\\\infty}\\\\rho_{13}\\\\in\\\\langle\\\\sigma,2\\\\sigma,8\\\\iota\\\\rangle\\\\). \",\n \"For \\\\(k\\\\geq 13\\\\) we put \\\\(\\\\rho_k=\\\\E^{k-13}\\\\rho_{13}\\\\).\"\n )\n):\n\nDeclareFamily(\n zetabar,\"\\\\overline{\\\\zeta}\",24,5,\n cat(\n \"\\\\(\\\\zetabar_5:S^{24}\\\\rightarrow S^5\\\\) is an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\zeta_5,8\\\\iota_{16},2\\\\sigma_{16}\\\\rangle_1\\\\). \",\n \"See the preamble to Toda's Lemma 12.4. \",\n \"For \\\\(k\\\\geq 5\\\\) we put \\\\(\\\\zetabar_k=\\\\E^{k-5}\\\\zetabar_5\\\\).\"\n )\n):\n\nTodaBracketRepresentation[zetabar[5]] := \n TodaBracket[{zeta[5],8 * iota[15],2 * sigma[15]},1]:\n\nDeclareFamily(\n sigmabar,\"\\\\overline{\\\\sigma}\",25,6,\n cat(\n \"\\\\(\\\\sigmabar_6:S^{25}\\\\rightarrow S^6\\\\) is an element of the Toda \",\n \"bracket \\\\(\\\\langle\\\\nu_6,\\\\epsilon_9+\\\\nubar_9,\\\\sigma_{16}\\\\rangle_1\\\\). \",\n \"See the preamble to Toda's Lemma 12.5. \",\n \"For \\\\(k\\\\geq 6\\\\) we put \\\\(\\\\sigmabar_k=\\\\E^{k-6}\\\\sigmabar_6\\\\).\"\n )\n):\n\nTodaBracketRepresentation[sigmabar[6]] := \n TodaBracket[{nu[6],epsilon[8] + nubar[8],sigma[15]},1]:\n\nDeclareFamily(\n omega,\"\\\\omega\",30,14,\n cat(\n \"\\\\(\\\\omega_{14}:S^{30}\\\\rightarrow S^{14}\\\\) is defined in \",\n \"Toda's Lemma 12.15(i) by the requirement that \",\n \"\\\\(H(\\\\omega_{14})=\\\\nu_{27}\\\\). The indeterminacy is \",\n \"\\\\(\\\\{0,\\\\sigma_{14}\\\\circ\\\\mu_{21}\\\\}\\\\). \",\n \"For \\\\(k\\\\geq 14\\\\) we put \\\\(\\\\omega_k=\\\\E^{k-14}\\\\omega_{14}\\\\).\"\n )\n):\n\nIndeterminacy[omega[14]] := {o[sigma[14],mu[21]]}:\n\nDeclareFamily(\n etastar,\"\\\\eta^*\",32,16,\n cat(\n \"\\\\(\\\\eta_{16}^{*}:S^{32}\\\\rightarrow S^{16}\\\\) is an element of the \",\n \"Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma_{16},2\\\\sigma_{23},\\\\eta_{30}\\\\rangle_1\\\\). \",\n \"See Toda's Section XII(iii). \",\n \"For \\\\(k\\\\geq 16\\\\) we put \\\\(\\\\eta_{k}^{*}=\\\\E^{k-16}\\\\eta_{16}^{*}\\\\). \",\n \"For \\\\(k\\\\geq 18\\\\) we have \\\\(\\\\eta_{k}^{*}=\\\\omega_{k}\\\\) modulo \",\n \"\\\\({\\\\sigma_{k}}\\\\circ{\\\\mu_{k+7}}\\\\), so either \\\\(\\\\eta_{k}^{*}\\\\) or \",\n \"\\\\(\\\\omega_{k}\\\\) can be used as a generator of \\\\(\\\\pi_{k+16}^{k}\\\\).\"\n )\n):\n\nTodaBracketRepresentation[etastar[16]] := \n TodaBracket[{sigma[16],2 * sigma[22],eta[29]},1]:\n\nDeclareFamily(\n epsilonstar,\"\\\\epsilon^*\",29,12,\n cat(\n \"\\\\(\\\\epsilon_{12}^{*}:S^{29}\\\\rightarrow S^{12}\\\\) is defined in Toda's \",\n \"Lemma 12.15(ii) by the properties \",\n \"\\\\(H(\\\\epsilon_{12}^{*})=\\\\nu_{23}\\\\circ\\\\nu_{27}\\\\) and \",\n \"\\\\(\\\\E^2\\\\epsilon_{12}^{*}=\\\\omega_{14}\\\\circ\\\\eta_{30}\\\\). \",\n \"This fixes \\\\(\\\\epsilon_{12}^{*}\\\\) as a function of \",\n \"\\\\(\\\\omega_{14}\\\\). However, the indeterminacy of \",\n \"\\\\(\\\\sigma_{14}\\\\circ\\\\mu_{21}\\\\) in \\\\(\\\\omega_{14}\\\\) creates an indeterminacy \",\n \"of \\\\(\\\\sigma_{12}\\\\circ\\\\eta_{19}\\\\circ\\\\mu_{20}\\\\) in \\\\(\\\\epsilon_{12}^{*}\\\\). \",\n \"For \\\\(k\\\\geq 12\\\\) we put \\\\(\\\\epsilon_{k}^{*}=\\\\E^{k-12}\\\\epsilon^{*}_{12}\\\\).\"\n )\n):\n\nDeclareFamily(\n mubar,\"\\\\overline{\\\\mu}\",20,3,\n cat(\n \"\\\\(\\\\mubar_3:S^{20}\\\\rightarrow S^3\\\\) is defined in the preamble to \",\n \"Toda's Lemma 12.2 to be an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\mu_3,2\\\\iota_{12},8\\\\sigma_{12}\\\\rangle_1\\\\). \",\n \"I have not checked the indeterminacy. \",\n \"For \\\\(k\\\\geq 3\\\\) we put \\\\(\\\\mubar_{k}=\\\\E^{k-3}\\\\mubar_3\\\\). \"\n )\n):\n\nTodaBracketRepresentation[mubar[3]] := \n TodaBracket[{mu[3],2 * iota[11],8 * sigma[11]},1]:\n\nDeclareFamily(\n nustar,\"\\\\nu^*\",34,16,\n cat(\n \"\\\\(\\\\nu^*_{16}:S^{34}\\\\rightarrow S^{16}\\\\) is defined in Toda's \",\n \"Section XII(iii) to be an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma_{16},2\\\\sigma_{23},\\\\nu_{30}\\\\rangle_1\\\\). \",\n \"I have not checked the indeterminacy. \",\n \"For \\\\(k\\\\geq 16\\\\) we put \\\\(\\\\nu^*_{k}=\\\\E^{k-16}\\\\nu^*_{16}\\\\). \"\n )\n):\n\nTodaBracketRepresentation[nustar[16]] := \n TodaBracket[{sigma[16],2 * sigma[22],nu[29]},1]:\n\nDeclareFamily(\n xi,\"\\\\xi\",30,12,\n cat(\n \"\\\\(\\\\xi_{12}:S^{30}\\\\rightarrow S^{12}\\\\) is defined in Toda's \",\n \"Section XII(iii) to be an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma_{12},\\\\nu_{19},\\\\sigma_{22}\\\\rangle_1\\\\). \",\n \"I have not checked the indeterminacy. \",\n \"For \\\\(k\\\\geq 12\\\\) we put \\\\(\\\\xi_{k}=\\\\E^{k-12}\\\\xi_{16}\\\\). \"\n )\n):\n\nTodaBracketRepresentation[xi[12]] := \n TodaBracket[{sigma[12],nu[18],sigma[21]},1]:\n\nDeclareElement(\n nuprime,\"\\\\nu'\",6,3,\n cat(\n \"\\\\(\\\\nu'\\\\) is an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\nu_3,2\\\\iota_4,\\\\eta_4\\\\rangle_1\\\\). I think it is also \",\n \"obtained by applying the unstable J-homomorphism to the generator of \",\n \"\\\\(\\\\pi_3SO(3)\\\\). Toda's definition is indeterminate up to sign. \",\n \"See Toda's Equations 5.3 and 5.4. \"\n )\n):\n\nTodaBracketRepresentation[nuprime] := \n TodaBracket[{eta[3],2 * iota[3],eta[3]},1]:\nIndeterminacy[nuprime] := {2 * nuprime}:\n\nDeclareElement(\n sigmathird,\"\\\\sigma'''\",12,5,\n cat(\n \"\\\\(\\\\sigma''':S^{12}\\\\rightarrow S^5\\\\) is the unique element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\nu_5,8\\\\iota_8,\\\\nu_8\\\\rangle\\\\), and is the unique nonzero element \",\n \"in \\\\(\\\\pi_{12}S^5\\\\). See Toda's Lemma 5.13. \"\n )\n):\n\nTodaBracketRepresentation[sigmathird] := \n TodaBracket[{nu[5],8 * iota[8],nu[8]},0]:\n\nIndeterminacy[sigmathird] := {}:\n\nDeclareElement(\n sigmasecond,\"\\\\\\sigma''\",13,6,\n cat(\n \"\\\\(\\\\sigma'':S^{13}\\\\rightarrow S^6\\\\) is characterised by the properties \",\n \"\\\\(H(\\\\sigma'')=\\\\eta_{11}^2\\\\) and \\\\(\\\\E^3\\\\sigma''=4\\\\sigma_9\\\\). \",\n \"It has order \\\\(4\\\\) and generates \\\\(\\\\pi_{13}S^6\\\\). See Toda's \",\n \"Lemma 5.14 (corrected by replacing \\\\(\\\\sigma''\\\\) by \\\\(sigma'\\\\) on \",\n \"the second line), and note that \",\n \"\\\\(\\\\E^3:\\\\pi_{13}^6\\\\rightarrow\\\\pi_{16}^9\\\\) is injective.\"\n )\n):\n\nIndeterminacy[sigmasecond] := {}:\n\nDeclareElement(\n sigmaprime,\"\\\\\\sigma'\",14,7,\n cat(\n \"\\\\(\\\\sigma':S^{14}\\\\rightarrow S^7\\\\) is characterised by the properties \",\n \"\\\\(H(\\\\sigma')=\\\\eta_{13}\\\\) and \\\\(\\\\E^2\\\\sigma'=2\\\\sigma_9\\\\). \",\n \"It has order \\\\(8\\\\) and generates \\\\(\\\\pi_{14}S^7\\\\). See Toda's \",\n \"Lemma 5.14 (corrected by replacing \\\\(\\\\sigma''\\\\) by \\\\(sigma'\\\\) on \",\n \"the second line), and note that \",\n \"\\\\(\\\\E^2:\\\\pi_{14}^7\\\\rightarrow\\\\pi_{16}^9\\\\) is injective.\"\n )\n):\n\nIndeterminacy[sigmaprime] := {}:\n\nDeclareElement(\n epsilonprime,\"\\\\epsilon'\",13,3,\n cat(\n \"\\\\(\\\\epsilon':S^{13}\\\\rightarrow S^3\\\\) is the unique element of the Toda \",\n \"bracket \\\\(\\\\langle\\\\nu',2\\\\nu_6,\\\\nu_9\\\\rangle_3\\\\). \",\n \"See Toda, Section VI(iv).\"\n )\n):\n\nTodaBracketRepresentation[epsilonprime] := \n TodaBracket[{nuprime,nuprime,nu[6]},3]:\n\nIndeterminacy[epsilonprime] := {}:\n\nDeclareElement(\n muprime,\"\\\\mu'\",14,3,\n cat(\n \"The element \\\\(\\\\mu':S^{14}\\\\rightarrow S^3\\\\) lies in the Toda bracket \",\n \"\\\\(\\\\langle\\\\eta_3,2\\\\iota_4,\\\\mu_4\\\\rangle_1\\\\) and satisfies \",\n \"\\\\(H(\\\\mu')=\\\\mu_5\\\\) and \\\\(2\\\\mu'=\\\\eta_3\\\\circ\\\\eta_4\\\\circ\\\\mu_5\\\\); \",\n \"this is explained at the beginning of Toda's \",\n \"Section VII(ii). Toda does not state the indeterminacy and I have not \",\n \"worked it out.\"\n )\n):\n\nTodaBracketRepresentation[muprime] :=\n TodaBracket[{eta[3],2 * iota[3],mu[3]},1]:\n\nDeclareElement(\n thetaprime,\"\\\\theta'\",23,11,\n cat(\n \"\\\\(\\\\theta':S^{23}\\\\rightarrow S^{11}\\\\) is the unique element of the \",\n \"Toda bracket \\\\(\\\\langle\\\\sigma_{11},2\\\\nu_{18},\\\\eta_{21}\\\\rangle_1\\\\) \",\n \"and the unique nonzero element of \\\\(\\\\pi_{23}^{11}\\\\). See \",\n \"Toda's Lemma 7.5.\"\n )\n):\n\nTodaBracketRepresentation[thetaprime] := \n TodaBracket[{sigma[11],2 * nu[17],eta[20]},1]:\nIndeterminacy[thetaprime] := {}:\n\nDeclareElement(\n theta,\"\\\\theta\",24,12,\n cat(\n \"\\\\(\\\\theta:S^{24}\\\\rightarrow S^{12}\\\\) lies in the Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma_{12},\\\\nu_{19},\\\\eta_{22}\\\\rangle_1\\\\). \",\n \"It is not clear whether the indeterminacy is zero.\"\n )\n):\n\nTodaBracketRepresentation[theta] := \n TodaBracket[{sigma[12],nu[18],eta[21]},1]:\n\nDeclareElement(\n rhofourth,\"\\\\rho''''\",20,5,\n cat(\n \"\\\\(\\\\rho^{(4)}:S^{20}\\\\rightarrow S^5\\\\) is defined in Toda's \",\n \"Section X(iii) to be an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma^{(3)},2\\\\iota_{12},8\\\\sigma_{12}\\\\rangle_1\\\\). \",\n \"It is proved in the notes by Strickland that the indeterminacy is zero. \"\n )\n):\n\nTodaBracketRepresentation[rhofourth] := \n TodaBracket[{sigmathird,2 * iota[11],8 * sigma[11]},1]:\nIndeterminacy[rhofourth] := {}:\n\nDeclareElement(\n rhothird,\"\\\\rho'''\",21,6,\n cat(\n \"\\\\(\\\\rho^{(3)}:S^{21}\\\\rightarrow S^6\\\\) is defined in Toda's \",\n \"Section X(iii) to be an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma'',4\\\\iota_{13},4\\\\sigma_{13}\\\\rangle_1\\\\).\"\n )\n):\n\nTodaBracketRepresentation[rhothird] := \n TodaBracket[{sigmasecond,4 * iota[12],4 * sigma[12]},1]:\n\nDeclareElement(\n rhosecond,\"\\\\rho''\",22,7,\n cat(\n \"\\\\(\\\\rho'':S^{22}\\\\rightarrow S^7\\\\) is defined in Toda's \",\n \"Section X(iii) to be an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma',8\\\\iota_{14},2\\\\sigma_{14}\\\\rangle_1\\\\). \",\n \"We will take it to be the unique element for which \",\n \"\\\\(H(\\\\rho'')=\\\\mu_{13}\\\\). This is validated in the \",\n \"notes by Strickland, prop-rho-second.\"\n )\n):\n\nTodaBracketRepresentation[rhosecond] := \n TodaBracket[{sigmaprime,8 * iota[13],2 * sigma[13]},1]:\n\nDeclareElement(\n rhoprime,\"\\\\rho'\",24,9,\n cat(\n \"\\\\(\\\\rho':S^{24}\\\\rightarrow S^9\\\\) is defined in Toda's \",\n \"Section X(iii) to be an element of the Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma_9,16\\\\iota_{16},\\\\sigma_{16}\\\\rangle_1\\\\).\"\n )\n):\n\nTodaBracketRepresentation[rhoprime] := \n TodaBracket[{sigma[9],16 * iota[15],sigma[15]},1]:\n\nDeclareElement(\n zetaprime,\"\\\\zeta'\",22,6,\n cat(\n \"\\\\(\\\\zeta':S^{22}\\\\rightarrow S^6\\\\) is the unique element such that \",\n \"\\\\(H(\\\\zeta')=\\\\zeta_{11} mod 2\\\\zeta_{11}\\\\) and \",\n \"\\\\(\\\\E\\\\zeta'=\\\\sigma'\\\\circ\\\\eta_{14}\\\\circ\\\\epsilon_{15}\\\\). \",\n \"This is validated in the notes by Strickland, prop-zetaprime, which \",\n \"refines Toda's Lemma 12.1.\"\n )\n):\n\nIndeterminacy[zetaprime] := {}:\n\nDeclareElement(\n epsilonbarprime,\"\\\\overline{\\\\epsilon}'\",20,3,\n cat(\n \"\\\\(\\\\epsilonbar':S^{20}\\\\rightarrow S^3\\\\) is defined in Toda's \",\n \"Lemma 12.3 by the properties \",\n \"\\\\(2\\\\epsilonbar'=\\\\eta_{3}\\\\circ\\\\eta_{4}\\\\circ\\\\epsilonbar_5\\\\) \",\n \"and \\\\(\\\\E\\\\epsilonbar'=(\\\\E\\\\nu')\\\\circ\\\\kappa_{7}\\\\). \",\n \"The map \\\\(\\\\E\\\\) here is injective by Toda's Theorem 12.7, \",\n \"so this characterises \\\\(\\\\epsilonbar'\\\\) uniquely. \"\n )\n):\n\nDeclareElement(\n mubarprime,\"\\\\overline{\\\\mu}'\",22,3,\n cat(\n \"\\\\(\\\\mubar':S^{22}\\\\rightarrow S^3\\\\) is an element of the Toda \",\n \"bracket \\\\(\\\\langle\\\\mu',4\\\\iota_{14},4\\\\sigma_{14}\\\\rangle_1\\\\). \",\n \"See the preamble to Toda's Lemma 12.4. \"\n )\n):\n\nTodaBracketRepresentation[mubarprime] := \n TodaBracket[{muprime,4 * iota[13],4 * sigma[13]},1]:\n\nDeclareElement(\n etastarprime,\"{\\\\eta^*}'\",31,15,\n cat(\n \"\\\\({\\\\eta^*}':S^{31}\\\\rightarrow S^{15}\\\\) is an element of the \",\n \"Toda bracket \",\n \"\\\\(\\\\langle\\\\sigma_{15},4\\\\sigma_{22},\\\\eta_{29}\\\\rangle_1\\\\). \",\n \"(There seems to be a filtration shift so this is not seen in Ext.) \",\n \"See Toda's Section XII(iii). \"\n )\n):\n\nTodaBracketRepresentation[etastarprime] := \n TodaBracket[{sigma[15],4 * sigma[21],eta[28]},1]:\n\nDeclareElement(\n lambdasecond,\"\\\\lambda''\",28,10,\n cat(\n \"\\\\(\\\\lambda'':S^{28}\\\\rightarrow S^{10}\\\\) is defined in Toda's \",\n \"Lemma 12.19 by the properties \",\n \"\\\\(\\\\E\\\\lambda''=2\\\\lambda'\\\\) and \",\n \"\\\\(H(\\\\lambda'')=\\\\eta_{19}\\\\circ\\\\epsilon_{20} mod \",\n \"(\\\\eta_{19}\\\\circ\\\\epsilon_{20} + \\\\nu^3_{19}) \\\\). \",\n \"I have not checked the indeterminacy. \"\n )\n):\n\nDeclareElement(\n xisecond,\"\\\\xi''\",28,10,\n cat(\n \"\\\\(\\\\xi'':S^{28}\\\\rightarrow S^{10}\\\\) is defined in Toda's \",\n \"Lemma 12.19 by the properties \",\n \"\\\\(\\\\E\\\\xi''=2\\\\xi'\\\\) and \",\n \"\\\\(H(\\\\xi'')=\\\\nu_{19}\\\\circ\\\\nu_{22}\\\\circ\\\\nu_{25}+\\\\eta_{13}\\\\circ\\\\epsilon_{20}\\\\). \",\n \"I have not checked the indeterminacy. \"\n )\n):\n\nDeclareElement(\n lambdaprime,\"\\\\lambda'\",29,11,\n cat(\n \"\\\\(\\\\lambda':S^{29}\\\\rightarrow S^{11}\\\\) is defined in Toda's \",\n \"Lemma 12.19 by the properties \",\n \"\\\\(\\\\E^2\\\\lambda'=2\\\\lambda\\\\) and \",\n \"\\\\(H(\\\\lambda')=\\\\epsilon_{21} mod (\\\\nubar_{21}+\\\\epsilon_{21})\\\\). \",\n \"I have not checked the indeterminacy. \"\n )\n):\n\nDeclareElement(\n xiprime,\"\\\\xi'\",29,11,\n cat(\n \"\\\\(\\\\xi':S^{29}\\\\rightarrow S^{11}\\\\) is defined in Toda's \",\n \"Lemma 12.19 by the properties \",\n \"\\\\(\\\\E\\\\xi'=2\\\\xi_{12}\\\\pm w_{12}\\\\circ\\\\sigma_{23}\\\\) and \",\n \"\\\\(H(\\\\xi')=\\\\nubar_{21}+\\\\epsilon_{21}\\\\). \",\n \"I have not checked the indeterminacy. \"\n )\n):\n\nDeclareElement(\n lambda,\"\\\\lambda\",31,13,\n cat(\n \"\\\\(\\\\lambda:S^{31}\\\\rightarrow S^{13}\\\\) is defined in Toda's \",\n \"Lemma 12.18 by the properties \",\n \"\\\\(\\\\E^3\\\\lambda=2\\\\nu^*_{16}\\\\pm w_{16}\\\\circ\\\\nu_{31}\\\\) and \",\n \"\\\\(H(\\\\lambda)=\\\\nu_{25}\\\\circ\\\\nu_{28}\\\\). \",\n \"I have not checked the indeterminacy. \"\n )\n):\n\nDeclareElement(\n omegaprime,\"\\\\omega'\",31,12,\n cat(\n \"\\\\(\\\\omega':S^{31}\\\\rightarrow S^{12}\\\\) is defined in Toda's \",\n \"Lemma 12.21 by the properties \",\n \"\\\\(\\\\E^2\\\\omega'=2\\\\omega_{14}\\\\circ\\\\nu_{30}\\\\) and \",\n \"\\\\(H(\\\\omega')=\\\\epsilon_{23} mod (\\\\nubar_{23}+\\\\epsilon_{23})\\\\). \",\n \"I have not checked the indeterminacy. \"\n )\n):\n\n######################################################################\n\n# Orders of elements \n\nAddOrderRule(\n w[n_],2,type(n_,odd),\"Anticommutativity of the Whitehead product\"\n):\n\n# 1-stem \nSetStableOrder(eta,2,3,\"Toda, Proposition 5.1\"):\n\n# 2-stem \nAddOrderRule(\n o(eta[n_], eta[m_]), \n 2, \n m_ = n_ + 1, \n \"\\\\(2\\\\eta_n\\\\circ\\\\eta_{n+1}=0\\\\) for \\\\(n\\\\geq 2\\\\)\",\n \"Toda, Proposition 5.3\"\n):\n\n# 3-stem \nSetOrder(o(eta[2],eta[3],eta[4]),2,\"Toda, Proposition 5.6\"):\nSetOrder(nuprime,4,\"Toda, Proposition 5.6\"):\nSetOrder(E(nuprime),4,\"Toda, Proposition 5.6\"):\nSetStableOrder(nu,8,5,\"Toda, Proposition 5.6\"):\n\n# 4-stem \nSetOrder(o(eta[2],nuprime),4,\"Toda, Proposition 5.8\"):\nSetOrder(o(nuprime,eta[6]),2,\"Toda, Proposition 5.8\"):\nSetOrder(o(E(nuprime),eta[7]),2,\"Toda, Proposition 5.8\"):\nAddOrderRule(\n o(nu[n_],eta[m_]),\n 2,\n m_ = n_+3,\n \"\\\\(2\\\\nu_n\\\\circ\\\\eta_{n+3}=0\\\\) for \\\\(n\\\\geq 2\\\\)\",\n \"Toda, Proposition 5.8\"\n):\n\n# 5-stem \nSetOrder(o(eta[2],nuprime,eta[6]),2,\"Toda, Proposition 5.9\"):\nSetOrder(o(nuprime,eta[6],eta[7]),2,\"Toda, Proposition 5.9\"):\nSetOrder(o(E(nuprime),eta[7],eta[8]),2,\"Toda, Proposition 5.9\"):\nSetOrder(o(nu[4],eta[7],eta[8]),2,\"Toda, Proposition 5.9\"):\nSetOrder(o(nu[5],eta[8],eta[9]),2,\"Toda, Proposition 5.9\"):\n\n# 6-stem \nSetOrder(o(eta[2],nuprime,eta[6],eta[7]),2,\"Toda, Proposition 5.11\"):\nSetOrder(o(nu[4],nu[7]),8,\"Toda, Proposition 5.11\"):\nAddOrderRule(\n o(nu[n_],nu[m_]),\n 2,\n (n_ >= 5) and (m_ = n+3),\n \"\\\\(2\\\\nu_n\\\\circ\\\\nu_{n+3}=0\\\\) for \\\\(n\\\\geq 5\\\\)\",\n \"Toda, Proposition 5.11\"\n):\n\n# 7-stem \nSetOrder(sigmathird,2,\"Toda, Proposition 5.15\"):\nSetOrder(sigmasecond, 4,\"Toda, Proposition 5.15\"):\nSetOrder(sigmaprime,8,\"Toda, Proposition 5.15\"):\nSetOrder(E(sigmaprime),8,\"Toda, Proposition 5.15\"):\nSetStableOrder(sigma,16,9,\"Toda, Proposition 5.15\"):\n\n# 8-stem \nSetStableOrder(epsilon,2,3,\"Toda, Theorem 7.1\"):\nSetOrder(nubar[6],8,\"Toda, Theorem 7.1\"):\nSetStableOrder(nubar,2,7,\"Toda, Theorem 7.1\"):\nSetOrder(o(sigmaprime,eta[14]),2,\"Toda, Theorem 7.1\"):\nSetOrder(o(E(sigmaprime),eta[15]),2,\"Toda, Theorem 7.1\"):\nSetOrder(o(sigma[8],eta[15]),2,\"Toda, Theorem 7.1\"):\nSetOrder(o(sigma[9],eta[16]),2,\"Toda, Theorem 7.1\"):\n\n# 9-stem \nAddOrderRule(\n o(eta[n_],epsilon[m_]), 2, m_ = n_+1,\n \"\\\\(2\\\\eta_n\\\\circ\\\\epsilon_{n+1}=0\\\\) for \\\\(n\\\\geq 2\\\\)\",\n \"Toda, Theorem 7.2\"\n):\nSetStableOrder(mu,2,3,\"Toda, Theorem 7.2\"):\n\nAddOrderRule(\n o(nu[n_],nu[m_],nu[p_]), 2,(m_ = n_+3) and (p_ = m_+3),\n \"\\\\(2(\\\\nu_n\\\\circ\\\\nu_{n+3}\\\\circ\\\\nu_{n+6})=0\\\\) for \\\\(n\\\\geq 4\\\\)\",\n \"Toda, Theorem 7.2\"\n):\n\nSetOrder(o(sigmaprime,eta[14],eta[15]),2,\"Toda, Theorem 7.2\"):\nSetOrder(o(E(sigmaprime),eta[15],eta[16]),2,\"Toda, Theorem 7.2\"):\nSetOrder(o(sigma[8],eta[15],eta[16]),2,\"Toda, Theorem 7.2\"):\nSetOrder(o(sigma[9],eta[16],eta[17]),2,\"Toda, Theorem 7.2\"):\n\n# 10-stem \n\nSetOrder(o(eta[2],eta[3],epsilon[4]),2,\"Toda, Theorem 7.3\"):\n\nAddOrderRule(o(eta[n_],mu[m_]),2,m_ = n_+1,\n \"\\\\(2\\\\eta_n\\\\circ\\\\mu_{n+1}=0\\\\) for \\\\(n\\\\geq 2\\\\)\",\n \"Toda, Theorem 7.3\"\n):\n\nSetOrder(epsilonprime,4,\"Toda, Theorem 7.3\"):\nSetOrder(E(epsilonprime),4,\"Toda, Theorem 7.3\"):\nSetOrder(o(nu[ 4],sigmaprime),8,\"Toda, Theorem 7.3\"):\nSetOrder(o(nu[ 5],sigma[ 8]),8,\"Toda, Theorem 7.3\"):\nSetOrder(o(nu[ 6],sigma[ 9]),8,\"Toda, Theorem 7.3\"):\nSetOrder(o(nu[ 7],sigma[10]),8,\"Toda, Theorem 7.3\"):\nSetOrder(o(nu[ 8],sigma[11]),8,\"Toda, Theorem 7.3\"):\nSetOrder(o(sigma[ 8],nu[15]),8,\"Toda, Theorem 7.3\"):\nSetOrder(o(sigma[ 9],nu[16]),8,\"Toda, Theorem 7.3\"):\nSetOrder(o(sigma[10],nu[17]),4,\"Toda, Theorem 7.3\"):\nSetOrder(o(sigma[11],nu[18]),2,\"Toda, Theorem 7.3\"):\n\n# 11-stem \nSetOrder(o(eta[2],epsilonprime),4,\"Toda, Theorem 7.4\"):\nSetOrder(o(eta[2],eta[3],mu[4]),2,\"Toda, Theorem 7.4\"):\nSetOrder(muprime,4,\"Toda, Theorem 7.4\"):\nSetOrder(E(muprime),4,\"Toda, Theorem 7.4\"):\nSetOrder(o(epsilon[3],nu[11]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(epsilon[4],nu[12]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nuprime,epsilon[6]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(E(nuprime),epsilon[7]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nu[4],sigmaprime,eta[14]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nu[ 4],nubar[7]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nu[ 5],nubar[8]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nu[ 4],epsilon[7]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nu[ 5],epsilon[8]),2,\"Toda, Theorem 7.4\"):\nSetStableOrder(zeta,8,5,\"Toda, Theorem 7.4\"):\nSetOrder(o(nubar[ 6],nu[14]),4,\"Toda, Theorem 7.4\"):\nSetOrder(o(nubar[ 7],nu[15]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nubar[ 8],nu[16]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nubar[ 9],nu[17]),2,\"Toda, Theorem 7.4\"):\nSetOrder(o(nu[5],sigma[8],eta[15]),2,\n \"\\\\(\\\\alpha\\\\circ\\\\eta_n\\\\) is always killed by 2 when \\\\(n>2\\\\).\"\n):\n\n# 12-stem \nSetOrder(o(eta[2],muprime),4,\"Toda, Theorem 7.6\"):\nSetOrder(o(eta[2],epsilon[3],nu[11]),2,\"Toda, Theorem 7.6 and Equations 7.12\"):\nSetOrder(o(eta[2],nuprime,epsilon[6]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nuprime,mu[6]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nuprime,eta[6],epsilon[7]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nu[4],sigmaprime,eta[14],eta[15]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nu[4],nu[7],nu[10],nu[13]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nu[4],mu[7]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nu[4],eta[7],epsilon[8]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(E(nuprime),mu[7]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(E(nuprime),eta[7],epsilon[8]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nu[5],nu[8],nu[11],nu[14]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nu[5],mu[8]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(nu[5],eta[8],epsilon[9]),2,\"Toda, Theorem 7.6\"):\nSetOrder(o(w[6],sigma[11]),16,\"Toda, Theorem 7.6\"):\nSetOrder(o(w[10],nu[19]),4,\"Toda, Theorem 7.6\"):\nSetOrder(thetaprime,2,\"Toda, Theorem 7.6\"):\nSetOrder(E(thetaprime),2,\"Toda, Theorem 7.6\"):\nSetOrder(theta,2,\"Toda, Theorem 7.6\"):\nSetOrder(E(theta),2,\"Toda, Theorem 7.6\"):\n\n# 13-stem \n\nSetOrder(o(eta[2],nuprime,mu[6]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(eta[2],nuprime,eta[6],epsilon[7]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(nuprime,eta[6],mu[7]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(nu[4],nu[7],sigma[10]),8,\n \"Toda, Theorem 7.7. Note that Toda refers to \\\\(\\\\nu_4^2\\\\circ\\\\sigma_8=\\\\nu_4\\\\circ\\\\nu_7\\\\circ\\\\sigma_8\\\\) instead of \\\\(\\\\nu_4^2\\\\circ\\\\sigma_{10}\\\\). This is not dimensionally consistent, and is a typo. \"):\nSetOrder(o(nu[4],eta[7],mu[8]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(E(nuprime),eta[7],mu[8]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(nu[5],sigma[ 8],nu[15]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(nu[6],sigma[ 9],nu[16]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(nu[7],sigma[10],nu[17]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(nu[8],sigma[11],nu[18]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(nu[5],eta[8],mu[9]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(sigma[ 8],nu[15],nu[18]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(sigma[ 9],nu[16],nu[19]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(sigma[10],nu[17],nu[20]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(sigma[11],nu[18],nu[21]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(nu[8],sigma[11],nu[18]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(thetaprime,eta[23]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(theta,eta[24]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(E(thetaprime),eta[24]),2,\"Toda, Theorem 7.7\"):\nSetOrder(o(E(theta),eta[25]),2,\"Toda, Theorem 7.7\"):\n\n# 14-stem \n\nSetOrder(o(eta[2],nuprime,eta[6],mu[7]),2,\"Toda, Theorem 10.3\"):\nSetOrder(o(epsilon[3],nu[11],nu[14]),2,\"Toda, Theorem 10.3\"):\nSetOrder(o(epsilon[4],nu[12],nu[15]),2,\"Toda, Theorem 10.3\"):\nSetOrder(o(nu[4],zeta[7]),8,\"Toda, Theorem 10.3\"):\nSetOrder(o(nu[4],nubar[7],nu[15]),2,\"Toda, Theorem 10.3\"):\nSetOrder(o(nu[5],zeta[8]),2,\"Toda, Theorem 10.3\"):\nSetOrder(o(nu[5],nubar[8],nu[16]),2,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigmasecond,sigma[13]),4,\"Toda, Theorem 10.3\"):\nSetOrder(o(nubar[6],nu[14],nu[17]),2,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigmaprime,sigma[14]),8,\"Toda, Theorem 10.3\"):\nSetOrder(o(E(sigmaprime),sigma[15]),8,\"Toda, Theorem 10.3\"):\n\nSetOrder(kappa[7],4,\"Toda, Theorem 10.3\"):\nSetOrder(kappa[8],4,\"Toda, Theorem 10.3\"):\nSetOrder(kappa[9],4,\"Toda, Theorem 10.3\"):\nSetStableOrder(kappa,2,10,\"Toda, Theorem 10.3\"):\n\nSetOrder(o(sigma[ 8],sigma[15]),16,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigma[ 9],sigma[16]),16,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigma[10],sigma[17]),16,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigma[11],sigma[18]),16,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigma[12],sigma[19]),16,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigma[13],sigma[20]),16,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigma[14],sigma[21]),8,\"Toda, Theorem 10.3\"):\nSetOrder(o(sigma[15],sigma[22]),4,\"Toda, Theorem 10.3\"):\nAddOrderRule(\n o(sigma[n_],sigma[m_]),\n 2,\n m_ = n_+7 and n >= 16,\n \"\\\\(2{\\\\sigma_n}\\\\circ{\\\\sigma_{n+7}}=0\\\\) for \\\\(n\\\\geq 16\\\\)\",\n \"Toda, Theorem 10.3\"\n):\n\nSetOrder(o(w[12],nu[23]),4,\"Toda, Theorem 10.3\"):\n\n# 15-stem \n\nSetStableOrder(epsilonbar,2,3,\"Toda, Theorem 10.5\"):\nSetStableOrder(rho,32,13,\"Toda, Theorem 10.10\"):\n\nSetOrder(o(eta[2],epsilon[3],nu[11],nu[14]),2,\"Toda, Theorem 10.5\"):\nSetOrder(rhofourth,2,\"Toda, Theorem 10.5\"):\nSetOrder(rhothird,4,\"Toda, Theorem 10.5\"):\nSetOrder(rhosecond,8,\"Toda, Theorem 10.5\"):\nSetOrder(E(rhosecond),8,\"Toda, Theorem 10.5\"):\nSetOrder(rhoprime,16,\"Toda, Theorem 10.5\"):\nSetOrder(E(rhoprime),16,\"Toda, Theorem 10.5\"):\nSetOrder(E(E[rhoprime]),16,\"Toda, Theorem 10.5\"):\nSetOrder(E(E[E[rhoprime]]),16,\"Toda, Theorem 10.5\"):\n\nSetOrder(o(sigmaprime,nubar[14]),2,\"Toda, Theorem 10.5\"):\nSetOrder(o(E(sigmaprime),nubar[15]),2,\"Toda, Theorem 10.5\"):\nSetOrder(o(sigma[8],nubar[15]),2,\"Toda, Theorem 10.5\"):\nSetOrder(o(sigma[9],nubar[16]),2,\"Toda, Theorem 10.5\"):\nSetOrder(o(sigma[10],nubar[17]),2,\"Toda, Theorem 10.5\"):\n\nSetOrder(o(sigmaprime,epsilon[14]),2,\"Toda, Theorem 10.5\"):\nSetOrder(o(E(sigmaprime),epsilon[15]),2,\"Toda, Theorem 10.5\"):\nSetOrder(o(sigma[8],epsilon[15]),2,\"Toda, Theorem 10.5\"):\nSetOrder(o(sigma[9],epsilon[16]),2,\"Toda, Theorem 10.5\"):\n\n# 16-stem \n\nSetStableOrder(omega,2,15,\"Toda, Theorem 12.16\"):\nSetStableOrder(etastar,2,16,\"Toda, Theorem 12.16\"):\n\nAddOrderRule(\n o(mu[n_], sigma[m_]), \n 2, \n m_ = n_ + 9 and n_ >= 3, \n \"\\\\(2\\\\mu_n\\\\circ\\\\sigma_{n+9}=0\\\\) for \\\\(n\\\\geq 3\\\\)\",\n cat(\n \"Toda, Theorem 12.6 (with the observation that stably we \",\n \"have \\\\(\\\\mu\\\\sigma=\\\\sigma\\\\mu\\\\)).\"\n )\n):\n\nAddOrderRule(\n o(sigma[n_], mu[m_]), \n 2, \n m_ = n_ + 7 and n_ >= 8, \n \"\\\\(2\\\\sigma_n\\\\circ\\\\mu_{n+7}=0\\\\) for \\\\(n\\\\geq 8\\\\)\",\n \"Toda, Theorem 12.6\"\n):\n\n\nAddOrderRule(\n o(eta[n_], epsilonbar[m_]), \n 2, \n m_ = n_ + 1 and n_ >= 2 and n_ <= 8, \n \"\\\\(2\\\\eta_n\\\\circ\\\\epsilonbar_{n+1}=0\\\\) for \\\\(2\\\\leq n\\\\leq 8\\\\)\",\n \"Toda, Theorem 12.6\"\n):\n\nSetOrder(zetaprime,8,\"Toda, Theorem 12.6\"):\nSetOrder(E(zetaprime),2,\"Toda, Theorem 12.6\"):\nSetOrder(E(E[zetaprime]),2,\"Toda, Theorem 12.6\"):\nSetOrder(etastarprime,2,\"Toda, Theorem 12.16\"):\nSetOrder(E(etastarprime),2,\"Toda, Theorem 12.16\"):\nSetOrder(o(sigmaprime,mu[14]),2,\"Toda, Theorem 12.6\"):\nSetOrder(o(E(sigmaprime),mu[15]),2,\"Toda, Theorem 12.6\"):\nSetOrder(o(nu[4],nu[7],sigma[10],nu[17]),2,\"Toda, Theorem 12.6\"):\nSetOrder(o(sigma[8],eta[15],epsilon[16]),2,\"Toda, Theorem 12.6\"):\nSetOrder(o(sigma[9],eta[16],epsilon[17]),2,\"Toda, Theorem 12.6\"):\nSetOrder(o(sigma[8],nu[15],nu[18],nu[21]),2,\"Toda, Theorem 12.6\"):\nSetOrder(o(sigma[9],nu[16],nu[19],nu[22]),2,\"Toda, Theorem 12.6\"):\nSetOrder(o(w[10],sigma[19]),16,\"Toda, Theorem 12.16\"):\nSetOrder(omega[14],8,\"Toda, Theorem 12.16\"):\n\n# 17-stem \n\n\nSetStableOrder(epsilonstar,2,12,\"Toda, Theorem 12.17\"):\nSetStableOrder(mubar,2,3,\"Toda, Theorem 12.7\"):\n\nSetOrder(epsilonbarprime,4,\"Toda, Theorem 12.7\"):\nSetOrder(E(epsilonbarprime),4,\"Toda, Theorem 12.7\"):\nSetOrder(WhiteheadP[E(theta)],2,\"Toda, Theorem 12.8\"):\nSetOrder(o(etastarprime,eta[31]),2,\"Toda, Theorem 12.17\"):\nSetOrder(o(E(etastarprime),eta[32]),2,\"Toda, Theorem 12.17\"):\nSetOrder(o(sigmaprime,eta[14],mu[15]),2,\"Toda, Theorem 12.7\"):\nSetOrder(o(E(sigmaprime),eta[15],mu[16]),2,\"Toda, Theorem 12.7\"):\nSetOrder(o(eta[2],eta[3],epsilonbar[4]),2,\"Toda, Theorem 12.7\"):\nSetOrder(o(etastar[16],eta[32]),2,\"Toda, Theorem 12.17\"):\nSetOrder(o(etastar[17],eta[33]),2,\"Toda, Theorem 12.17\"):\nSetOrder(o(nu[4],sigmaprime,sigma[14]),8,\"Toda, Theorem 12.7\"):\nSetOrder(w[18],infinity,\"Toda, Theorem 12.17\"):\nSetOrder(o(nu[ 4],kappa[ 7]),4,\"Toda, Theorem 12.7\"):\nSetOrder(o(nu[ 5],kappa[ 8]),4,\"Toda, Theorem 12.7\"):\nSetOrder(o(nu[ 6],kappa[ 9]),4,\"Toda, Theorem 12.7\"):\n\n\nAddOrderRule(\n o(eta[n_],mu[m_],sigma[p_]),2,(m_ = n_+1) and (p_ = m_+9),\n \"\\\\(2\\\\eta_n\\\\circ\\\\mu_{n+1}\\\\circ\\\\sigma_{n+10}=0\\\\) for \\\\(n\\\\geq 2\\\\)\",\n \"Toda, Theorem 12.7\"\n):\n\n\nAddOrderRule(\n o(nu[n_],kappa[m_]),2, (m_ = n_+3) and (n_ >= 8),\n \"\\\\(2\\\\nu_n\\\\circ\\\\kappa_{n+3}=0\\\\) for \\\\(n\\\\geq 8\\\\)\",\n \"Toda, Theorem 12.7\"\n):\n\nAddOrderRule(\n o(sigma[n_],eta[m_],mu[p_]),2, (m_ = n_+7) and (p_ = m_+1),\n \"\\\\(2\\\\sigma_n\\\\circ\\\\eta_{n+7}\\\\circ\\\\mu_{n+8}=0\\\\) for \\\\(n\\\\geq 8\\\\).\",\n \"Toda, Theorem 12.7\"\n):\n\n# 18-stem \n\nSetStableOrder(nustar,8,16,\"Toda, Theorem 12.22\"):\nSetStableOrder(xi,8,13,\"Toda, Theorem 12.22\"):\n\nSetOrder(xi[18]+nustar[18],4,\"Toda, Theorem 12.22\"):\nSetOrder(xi[19]+nustar[19],2,\"Toda, Theorem 12.22\"):\n\nSetOrder(lambdasecond,8,\"Toda, Theorem 12.22\"):\nSetOrder(lambdaprime,8,\"Toda, Theorem 12.22\"):\nSetOrder(E(lambdaprime),4,\"Toda, Theorem 12.22\"):\nSetOrder(lambda,8,\"Toda, Theorem 12.22\"):\nSetOrder(E(lambda),8,\"Toda, Theorem 12.22\"):\nSetOrder(E(E[lambda]),8,\"Toda, Theorem 12.22\"):\nSetOrder(E(E[E[lambda]]),8,\"Toda, Theorem 12.22\"):\nSetOrder(xisecond,2,\"Toda, Theorem 12.22\"):\nSetOrder(xiprime,4,\"Toda, Theorem 12.22\"):\nSetOrder(E(xiprime),4,\"Toda, Theorem 12.22\"):\nSetOrder(o(E(muprime),sigma[15]),4,\"Toda, Theorem 12.8\"):\nSetOrder(o(E(nuprime),epsilonbar[7]),2,\"Toda, Theorem 12.8\"):\nSetOrder(o(WhiteheadP[E(theta)],eta[23]),2,\"Toda, Theorem 12.8\"):\nSetOrder(o(eta[2],epsilonbarprime),4,\"Toda, Theorem 12.8\"):\nSetOrder(o(eta[2],eta[3],mu[4],sigma[13]),2,\"Toda, Theorem 12.8\"):\nSetOrder(o(muprime,sigma[14]),4,\"Toda, Theorem 12.8\"):\nSetOrder(o(nu[4],epsilonbar[7]),2,\"Toda, Theorem 12.8\"):\nSetOrder(o(nu[4],rhosecond),8,\"Toda, Theorem 12.8\"):\nSetOrder(o(nu[4],sigmaprime,epsilon[14]),2,\"Toda, Theorem 12.8\"):\nSetOrder(o(nu[4],sigmaprime,nubar[14]),2,\"Toda, Theorem 12.8\"):\nSetOrder(o(nu[5],epsilonbar[8]),2,\"Toda, Theorem 12.8\"):\nSetOrder(o(nuprime,epsilonbar[6]),2,\"Toda, Theorem 12.8\"):\n\nSetOrder(o(sigma[8],zeta[15]),8,\"Toda, Theorem 12.8\"):\nSetOrder(o(sigma[9],zeta[16]),8,\"Toda, Theorem 12.8\"):\nSetOrder(o(zeta[5],sigma[16]),8,\"Toda, Theorem 12.8\"):\nSetOrder(o(zeta[6],sigma[17]),8,\"Toda, Theorem 12.8\"):\nSetOrder(o(zeta[7],sigma[18]),8,\"Toda, Theorem 12.8\"):\nSetOrder(o(zeta[8],sigma[19]),8,\"Toda, Theorem 12.8\"):\n\nSetOrder(xi[12],32,\"Toda, Theorem 12.22\"):\n\n### FIX THIS\n# AddRelation[4 xi[18] -> 4 nustar[18],\"Toda, Theorem 12.22\"]\n# AddRelation[\n# n_Integer xi[m_] :>\n# 2 Quotient[n,2] nustar[m] + Mod[n,2] xi[m] /; \n# (m >= 19) and (n < 0 || n > 1),\n# \"\\\\(2(\\\\xi_n+\\\\nu^*_n)=0\\\\) for \\\\(n\\\\geq 19\\\\)\",\n# \"Toda, Theorem 12.22\"\n# ]\n\nAddOrderRule(\n o(eta[n_],mubar[m_]),2,m_ = n_+1,\n \"\\\\(2\\\\eta_n\\\\circ\\\\mubar_{n+1}=0\\\\) for \\\\(n\\\\geq 2\\\\)\",\n \"Toda, Theorem 12.8\"\n):\n \n\n# 19-stem \n\nSetOrder(mubarprime,4,\"Toda, Theorem 12.9\"):\nSetOrder(E(mubarprime),4,\"Toda, Theorem 12.9\"):\n\nSetOrder(omegaprime,2,\"Toda, Theorem 12.23\"):\nSetOrder(E(omegaprime),2,\"Toda, Theorem 12.23\"):\n\nSetOrder(o(lambdaprime,eta[29]),2,\"Toda, Theorem 12.23\"):\nSetOrder(o(E(lambdaprime),eta[30]),2,\"Toda, Theorem 12.23\"):\n\nSetOrder(o(nuprime,mu[6],sigma[15]),2,\"Toda, Theorem 12.9\"):\nSetOrder(o(E(nuprime),mu[7],sigma[16]),2,\"Toda, Theorem 12.9\"):\nSetOrder(o(nu[4],mu[7],sigma[16]),2,\"Toda, Theorem 12.9\"):\nSetOrder(o(nu[5],mu[8],sigma[17]),2,\"Toda, Theorem 12.9\"):\n\nSetOrder(o(xiprime,eta[29]),2,\"Toda, Theorem 12.23\"):\nSetOrder(o(E(xiprime),eta[30]),2,\"Toda, Theorem 12.23\"):\nSetOrder(o(xi[12],eta[30]),2,\"Toda, Theorem 12.23\"):\nSetOrder(o(xi[13],eta[31]),2,\"Toda, Theorem 12.23\"):\n\nSetOrder(o(eta[2],eta[3],mubar[4]),2,\"Toda, Theorem 12.9\"):\nSetOrder(o(eta[2],muprime,sigma[14]),4,\"Toda, Theorem 12.9\"):\nSetOrder(o(eta[2],nuprime,epsilonbar[6]),2,\"Toda, Theorem 12.9\"):\n\nSetOrder(o(nu[4],E(zetaprime)),2,\"Toda, Theorem 12.9\"):\nSetOrder(o(nu[4],eta[7],epsilonbar[8]),2,\"Toda, Theorem 12.9\"):\nSetOrder(o(nu[4],sigmaprime,mu[14]),2,\"Toda, Theorem 12.9\"):\n\nSetOrder(o(omega[14],nu[30]),4,\"Toda, Theorem 12.23\"):\nSetOrder(o(omega[15],nu[31]),2,\"Toda, Theorem 12.23\"):\nSetOrder(o(omega[16],nu[32]),2,\"Toda, Theorem 12.23\"):\nSetOrder(o(omega[17],nu[32]),2,\"Toda, Theorem 12.23\"):\n\nSetOrder(sigmabar[6],32,\"Toda, Theorem 12.9\"):\nSetStableOrder(sigmabar,2,7,\"Toda, Theorem 12.9\"):\nSetStableOrder(zetabar,8,5,\"Toda, Theorem 12.9\"):\n\nSetOrder(w[20],infinity,\"Toda, Theorem 12.9\"):\n\n######################################################################\n# Here we give some information about orders of elements x that are not\n# chosen generators of the groups in which they live. We hope to be \n# able to write x in terms of standard generators, at which point this \n# information will become redundant. \n\nSetOrder(o(nu[9],sigma[12]),4,\"Toda, Equations 7.20\"):\nSetOrder(o(nu[10],sigma[13]),2,\"Toda, Equations 7.20\"):\nSetOrder(o(sigma[11],zeta[18]),2,\"Toda, Equations 12.23\"):\nSetOrder(o(sigma[10],zeta[17]),4,\"Toda, Equations 12.23\"):\n\n######################################################################\n\nAddRelation(\n epsilonstar[14],\n true,\n o(omega[14],eta[30]),\n \"Toda, Lemma 12.15\"\n):\n\nAddRelation(\n etastar[n],\n n >= 18,\n Coset(omega[n],{o(sigma[n],mu[n+7])}),\n \"\\\\(\\\\eta^*_n={\\\\omega_n} mod {\\\\sigma_n}\\\\circ{\\\\mu_{n+7}}\\\\) for \\\\(n\\\\geq 18\\\\)\",\n \"Toda, Proposition 12.20(ii)\"\n):\n\nAddRelation(\n xi[n],\n n >= 20,\n - nustar[n],\n \"\\\\(\\\\xi_n=-\\\\nu^*_n\\\\) for \\\\(n\\\\geq 20\\\\)\",\n \"Toda, Corollary 12.25\"\n):\n\n######################################################################\n# Suspensions \n\nAddRelation(\n E(E(nuprime)),\n true,\n 2 * nu[5],\n \"Toda, Lemma 5.4\"\n):\n\nAddRelation(\n E(sigmathird),\n true,\n 2 * sigmasecond,\n \"Toda, Lemma 5.14\"\n):\n\nAddRelation(\n E(sigmasecond),\n true,\n 2 * sigmaprime,\n \"Toda, Lemma 5.14\"\n):\n\nAddRelation(\n E(E(sigmasecond)),\n true,\n 2 * E(sigma[8]),\n \"Toda, Lemma 5.14\"\n):\n\n\nAddRelation(\n E(E(sigmaprime)),\n true,\n 2 * sigma[9],\n \"In the proof of Toda's Lemma 5.14 we have \\\\(\\\\E^2\\\\sigma'=2x\\\\E\\\\alpha^*\\\\). The final statement in the proof shows that \\\\(\\\\sigma_9=\\\\E\\\\sigma_8=x\\\\E\\\\alpha^*\\\\), so \\\\(\\\\E^2\\\\sigma'=2\\\\sigma_9\\\\). \"\n):\n\n\nAddRelation(\n E(E(epsilonprime)),\n true,\n 2 * o(nu[5],sigma[8]),\n \"Toda, Equations 7.10. We have fudged a sign.\"\n):\n\nAddRelation(\n E(E(muprime)),\n true,\n 2 * zeta[5],\n \"Toda, Equations 7.14. We have fudged a sign.\"\n):\n\nAddRelation(\n E(E(theta)),\n true,\n 0,\n \"Toda, Equations 7.30 says that \\\\(\\\\E\\\\theta\\\\) is in the image of P \"\n):\n\nAddRelation(\n E(E(thetaprime)),\n true,\n 0,\n \"Toda, Equations 7.30 says that \\\\(\\\\E\\\\theta'\\\\) is in the image of P \"\n):\n\nAddRelation(\n E(E(E(E(rhoprime)))),\n true,\n 2 * rho(13),\n \"Toda, Lemma 10.9\"\n):\n\nAddRelation(\n E(E(lambdaprime)),\n true,\n 2 * lambda,\n \"Toda, Lemma 12.19\"\n):\n\nAddRelation(\n E(E(mubarprime)),\n true,\n 2 * zetabar[5],\n \"Toda, Lemma 12.4\"\n):\n\nAddRelation(\n E(E(omegaprime)),\n true,\n 2 * o(omega[14],nu[30]),\n \"Toda, Equations 12.27\"\n):\n\nAddRelation(\n E(E(rhosecond)),\n true,\n 2 * rhoprime,\n \"Toda, Remark before Lemma 10.7\"\n):\n\nAddRelation(\n E(lambdasecond),\n true,\n 2 * lambdaprime,\n \"Toda, Lemma 12.19\"\n):\n\n\nAddRelation(\n E(rhofourth),\n true,\n 2 * rhothird,\n \"Toda, Equations 10.15\"\n):\n\nAddRelation(E(rhothird),\n true,\n 2 * rhosecond,\n \"Toda, Equations 10.16\"\n):\n\nAddRelation(\n E(xisecond),\n true,\n 2 * xiprime,\n \"Toda, Lemma 12.19\"\n):\n\nAddRelation(\n E(E(E(zetaprime))),\n true,\n 0,\n cat(\n \"Toda, Lemma 12.1 (together with the fact that \\\\(2\\\\pi_{23}^7=0\\\\)) \",\n \"gives \\\\(\\\\E\\\\zeta'=\\\\sigma'\\\\circ\\\\eta_{14}\\\\circ\\\\epsilon_{15}\\\\). \",\n \"We now suspend this twice and note that $\\\\E^{2}\\\\sigma'=2\\\\sigma_9\\\\) \",\n \"and \\\\(2\\\\eta_{16}=0\\\\) to get \\\\(\\\\E^3\\\\zeta'=0\\\\). \"\n )\n):\n\nAddRelation(\n E(E(epsilonbarprime)),\n true,\n 2 * o(nu[5],kappa[8]),\n cat(\n \"Suspend the relation \",\n \"\\\\(\\\\E{\\\\epsilonbar'}=(\\\\E\\\\nu')\\\\circ\\\\kappa_7\\\\), \",\n \"which is part of the definition of \\\\(\\\\epsilonbar'\\\\).\"\n )\n):\n\n######################################################################\n\n# Composition \n\nAddRelation(\n o(eta[3],eta[4],eta[5]),\n true,\n 2 * nuprime,\n \"Toda, Equations 5.3\"\n):\n\nAddRelation(\n o(eta[4],eta[5],eta[6]),\n true,\n 2 * E(nuprime),\n \"Toda, Equations 5.3\"\n):\n\nAddRelation(\n o(eta[k_],eta[l_],eta[m_]),\n l_ = k_+1 and m_ = l_+1 and k_>=5,\n 4 * nu[k_],\n \"\\\\({\\\\eta_k}\\\\circ{\\\\eta_{k+1}}\\\\circ{\\\\eta_{k+2}}=4\\\\nu_k\\\\) for \\\\(k\\\\geq 5\\\\)\",\n \"Toda, Equations 5.5\"\n):\n\nAddRelation(\n o(eta[3],E(nuprime)),\n true,\n 0,\n \"Toda, Lemma 5.7\"\n):\n\nAddRelation(\n o(eta[n_],nu[m_]),\n m_ = n_+1 and n_ >= 5,\n 0,\n \"\\\\({\\\\eta_n}\\\\circ{\\\\nu_{n+1}}=0\\\\) for \\\\(n\\\\geq 5\\\\)\",\n \"Toda, Equations 5.9\" \n):\n\nAddRelation(\n o(nu[n_],eta[m_]),\n m_ = n_+3 and n_ >= 6,\n 0,\n \"\\\\({\\\\nu_n}\\\\circ{\\\\eta_{n+3}}=0\\\\) for \\\\(n\\\\geq 6\\\\)\",\n \"Toda, Equations 5.9\" \n):\n\nAddRelation(\n o(nuprime,nu[6]),\n true,\n 0,\n \"This is in \\\\(\\\\pi_9S^3=0\\\\) --- see Toda, Section V(vi)\"\n):\n\nAddRelation(\n o(E(nuprime),nu[7]),\n true,\n 0,\n \"This is the suspension of the relation \\\\(\\\\nu'\\\\circ\\\\nu_6=0\\\\), which takes place in \\\\(\\\\pi_9S^3=0\\\\) --- see Toda, Section V(vi). \"\n):\n\nAddRelation(\n o(epsilon[n_],nu[m_]),\n m_ = n_+8 and n_>=5,\n 0 ,\n \"\\\\({\\\\epsilon_n}\\\\circ{\\\\nu_{n+8}}=0\\\\) for \\\\(n\\\\geq 5\\\\)\",\n \"Toda's Equations 7.13 say that \\\\(\\\\epsilon_4\\\\circ\\\\nu_{12}=P(\\\\epsilon_9)\\\\), and we can suspend this to see that \\\\(\\\\epsilon_5\\\\circ\\\\nu_{13}=0\\\\). \"\n):\n\nAddRelation(\n o(sigmathird,eta[12]),\n true,\n 0,\n \"Toda, Equations 7.4\"\n):\n\nAddRelation(\n o(eta[3],E(epsilonprime)),\n true,\n 0,\n \"Notes by Strickland\"\n):\n\nAddRelation(\n o(eta[5],sigmasecond),\n true,\n 0,\n \"Toda, Equations 7.4\"\n):\n \nAddRelation(\n o(eta[4],sigmathird),\n true,\n 0,\n \"Toda, Equations 7.4\"\n):\n \nAddRelation(\n o(eta[3],nu[4]),\n true,\n o(nuprime,eta[6]),\n \"Toda, Equations 5.9\"\n):\n\nAddRelation(\n o(eta[3],eta[4],epsilon[5]),\n true,\n 2 * epsilonprime,\n \"Toda, Lemma 6.6\"\n):\n\nAddRelation(\n o(eta[3],eta[4],mu[5]),\n true,\n 2 * muprime,\n \"Toda, beginning of Section VII(ii)\"\n):\n\nAddRelation(\n o(eta[4],eta[5],mu[6]),\n true,\n 2 * E(muprime),\n \"Suspend the relation \\\\(\\\\eta_3\\\\circ\\\\eta_4\\\\circ\\\\mu_5=2\\\\mu'\\\\) given by Toda at the beginning of Section VII(ii).\"\n):\n\nAddRelation(\n o(eta[5],eta[6],mu[7]),\n true,\n 4 * zeta[5],\n \"Toda, proof of Equations 7.13\"\n):\n\nAddRelation(\n o(eta[4],nu[5]),\n true,\n o(E(nuprime),eta[7]),\n \"Toda, Equations 5.9, suspended once\"\n):\n\nAddRelation(\n o(nu[5],E(sigmaprime)),\n true,\n 2 * o(nu[5],sigma[8]),\n \"Toda, Equations 7.16\"\n):\n\nAddRelation(\n o(nubar[n_],eta[m_]),\n m_ = n_+8 and n_ > 5,\n o(nu[n_],nu[n_+3],nu[n_+6]) ,\n \"\\\\({\\\\nubar_n}\\\\circ{\\\\eta_{n+8}}={\\\\nu_n}\\\\circ{\\\\nu_{n+3}}\\\\circ{\\\\nu_{n+6}}\\\\) for \\\\(n\\\\geq 6\\\\)\",\n \"Toda, Lemma 6.3\"\n):\n\nAddRelation(\n o(eta[n_],nubar[m_]) ,\n m_ = n_+1 and n_ > 5,\n o(nu[n_],nu[n_+3],nu[n_+6]) ,\n \"\\\\({\\\\eta_n}\\\\circ{\\\\nubar_{n+1}}={\\\\nu_n}\\\\circ{\\\\nu_{n+3}}\\\\circ{\\\\nu_{n+6}}\\\\) for \\\\(n\\\\geq 6\\\\)\",\n \"Toda, Lemma 6.3\"\n):\n\nAddRelation(\n o(eta[n_],sigma[m_]) ,\n m_ = n_+1 and n_ >= 9,\n nubar[n_] + epsilon[n_] ,\n \"\\\\({\\\\eta_n}\\\\circ{\\\\sigma_{n+1}}=\\\\nubar_n+\\\\epsilon_n\\\\) for \\\\(n\\\\geq 9\\\\)\",\n \"Toda, Lemma 6.4\"\n):\n\nAddRelation(\n o(sigma[n_],eta[m_]),\n m_ = n_+7 and n_>9,\n nubar[n_] + epsilon[n_],\n \"\\\\({\\\\sigma_n}\\\\circ{\\\\eta_{n+7}}=\\\\nubar_n+\\\\epsilon_n\\\\) for \\\\(n\\\\geq 9\\\\)\",\n \"Toda, Lemma 6.4\"\n):\n\n\nAddRelation(\n o(eta[7],sigma[8]),\n true,\n o(sigmaprime,eta[14]) + nubar[7] + epsilon[7],\n \"Toda, Equations 7.4\"\n):\n\nAddRelation(\n o(eta[8],sigma[9]),\n true,\n o(E(sigmaprime),eta[15]) + nubar[8] + epsilon[8],\n \"Suspension of Toda's Equations 7.4\"\n):\n\nAddRelation(\n o(eta[6],sigmaprime),\n true,\n 4 * nubar[6],\n \"Toda, Equations 7.4\"\n):\n\nAddRelation(\n o(sigmasecond,eta[13]),\n true,\n 4 * nubar[6],\n \"Toda, Equations 7.4\"\n):\n\nAddRelation(\n o(epsilon[n_],eta[m_]),\n m_ = n_+8,\n o(eta[n_],epsilon[n_+1]),\n \"Toda, Equations 7.5\"\n):\n\nAddRelation(\n o(eta[n_],eta[m_],epsilon[p_]),\n m_ = n_+1 and p_ = n_+2 and n_ > 4,\n 4 * o(nu[n_],sigma[n_+3]),\n \"Toda, Equations 7.10\"\n):\n\nAddRelation(\n o(nuprime,nubar[6]),\n true,\n o(epsilon[3],nu[11]),\n \"Toda, Equations 7.12\"\n):\n\nAddRelation(\n o(nuprime,w[6]),\n true,\n 0,\n \"As \\\\(\\\\E w_6=0\\\\) we have \\\\(\\\\E(\\\\nu'\\\\circ w_6)=0\\\\), but \\\\(\\\\E:\\\\pi_{11}^3=\\\\Z_2\\\\epsilon_3\\\\rightarrow\\\\pi_{12}^4=\\\\Z_2\\\\epsilon_4\\\\) is an isomorphism, so \\\\(\\\\nu'\\\\circ w_6=0\\\\). \"\n):\n\nAddRelation(\n o(E(nuprime),nubar[7]),\n true,\n o(epsilon[4],nu[12]),\n \"Suspension of Toda's Equations 7.12\"\n):\n\nAddRelation(\n o(epsilonprime,eta[13]),\n true,\n o(nuprime,epsilon[6]),\n \"Toda, Equations 7.12\"\n):\n\nAddRelation(\n o(E(epsilonprime),eta[14]),\n true,\n o(E(nuprime),epsilon[7]),\n \"Toda, Equations 7.12\"\n):\n\nAddRelation(\n o(nu[5],E(sigmaprime),eta[15]),\n true,\n 0,\n \"If \\\\(2y=0\\\\) and \\\\(y\\\\) is a suspension then \\\\((2x)\\\\circ y)=2(x\\\\circ y)=x\\\\circ(2y)=0\\\\). We have \\\\(\\\\nu_5\\\\circ\\\\E\\\\sigma'=2\\\\nu_5\\\\circ\\\\sigma_8\\\\), and \\\\(\\\\eta_{15}\\\\) is a suspension and \\\\(2\\\\eta_{15}=0\\\\). It follows that \\\\(\\\\nu_5\\\\circ\\\\E\\\\sigma'\\\\circ\\\\eta_{15}=0\\\\). \" \n):\n\nAddRelation(\n o(nu[m_],epsilon[n_]),\n n_ = m_+3 and m_ >= 6,\n 2 * o(nubar[m_],nu[m_+8]),\n \"Toda, Equations 7.18\"\n):\n\nAddRelation(\n o(nu[m_],nubar[n_]),\n n_ = m_+3 and m_ >= 6,\n 2 * o(nubar[m_],nu[m_+8]),\n \"Toda, Equations 7.17 and 7.18\"\n):\n\nAddRelation(\n o(sigma[n_],nu[m_]),\n m_ = n_+7 and n_ >= 12,\n 0,\n \"Toda, Equations 7.20\"\n):\n\nAddRelation(\n o(nu[n_],sigma[m_]),\n m_ = n_+3 and n_ >= 11,\n 0,\n \"Toda, Equations 7.20\"\n):\n\nAddRelation(\n o(2 * eta[2],epsilon[3]),\n true,\n 0,\n \"Notes by Strickland\"\n):\n\nAddRelation(\n o(2 * eta[2],mu[3]),\n true,\n 0,\n \"Notes by Strickland\"\n):\n\nAddRelation(\n o(w[6],eta[11]),\n true,\n 0,\n \"Apply P to the relation \\\\(H(\\\\sigma')=\\\\eta_{13}\\\\) in Toda, Lemma 5.14 \"\n):\n\nAddRelation(\n o(w[6],nu[11]),\n true,\n 2 * nubar[6],\n \"Notes by Strickland\"\n):\n\nAddRelation(\n o(eta[7],E(sigmaprime)),\n true,\n 0,\n \"Suspend the relation \\\\(\\\\eta_6\\\\circ\\\\sigma'=4\\\\nubar_6\\\\)\"\n):\n\nAddRelation(\n o(mu[n_],eta[m_]),\n m_ = n_+9 and n_ >= 3,\n o(eta[n_],mu[n_+1]),\n \"Notes by Strickland\"\n):\n\nAddRelation(\n o(E(nuprime),sigmaprime),\n true,\n 2 * E(epsilonprime),\n \"Notes by Strickland\"\n):\n\nAddRelation(\n o(eta[4],eta[5],epsilon[6]),\n true,\n 2 * E(epsilonprime),\n \"Suspend the relation \\\\(\\\\eta_3\\\\circ\\\\eta_4\\\\circ\\\\epsilon_5=2\\\\epsilon'\\\\) given by Toda, Lemma 6.6 \"\n):\n\nAddRelation(\n o(eta[8],eta[9],w[10]),\n true,\n 0,\n \"This is in \\\\(\\\\pi_{19}^8\\\\), which is in the stable range, but it is killed by one suspension (because \\\\(\\\\E w_{k}=0\\\\) for any \\\\(k\\\\)). \"\n):\n\nAddRelation(\n o(nuprime,sigmasecond),\n true,\n 0,\n \"Notes by Strickland\"\n):\n\nAddRelation(\n o(nu[6],mu[9]),\n true,\n 8 * o(w[6],sigma[11]),\n \"Toda, Equations 7.25\"\n):\n\nAddRelation(\n o(w[6],nubar[11]),\n true,\n 0,\n \"Toda, Equations 7.27\"\n):\n\nAddRelation(\n o(w[6],epsilon[11]),\n true,\n 0,\n \"Toda, Equations 7.27\"\n):\n\nAddRelation(\n o(w[12],eta[23]),\n true,\n E(thetaprime),\n \"Toda, Equations 7.30\"\n):\n\nAddRelation(\n o(nu[7],zeta[10]),\n true,\n 4 * o(sigmaprime,sigma[14]),\n \"Toda, Lemma 9.2\"\n):\n\nAddRelation(\n o(nu[6],zeta[9]),\n true,\n 2 * o(sigmasecond,sigma[13]),\n \"Toda, Equations 10.7\"\n):\n\nAddRelation(\n o(E(theta),eta[25],eta[26]),\n true,\n 8 * o(sigma[13],sigma[20]),\n \"We have \\\\(\\\\E\\\\theta=P(\\\\iota_{27})=w_{13}\\\\) by Toda's Equations 7.30, so \\\\((\\\\E\\\\theta)\\\\circ\\\\eta_{25}\\\\circ\\\\eta_{26}=P(\\\\eta_{25}\\\\circ\\\\eta_{26})\\\\), and this is the same as \\\\(8\\\\sigma_{13}\\\\circ\\\\sigma_{20}\\\\) by Toda's Equations 10.10.\"\n):\n\nAddRelation(\n o(w[14],eta[27]),\n true,\n 4 * o(sigma[14],sigma[21]),\n \"Toda, Equations 10.10\"\n):\n\nAddRelation(\n o(eta[9],eta[10],mu[11]),\n true,\n 4 * zeta[9],\n \"Toda, Equations 10.12\"\n):\n\nAddRelation(\n o(E(nuprime),kappa[7]),\n true,\n E(epsilonbarprime),\n \"Toda, Lemma 12.3\"\n):\n\nAddRelation(\n o(epsilon[n_],epsilon[m_]),\n m_ = n_+8 and n_ >= 3,\n o(eta[n_],epsilonbar[n_+1]),\n \"Toda, Equations 12.4\"\n):\n\nAddRelation(\n o(epsilon[n_],nubar[m_]),\n m_ = n_+8 and n_ >= 3,\n o(eta[n_],epsilonbar[n_+1]),\n \"Toda, Equations 12.4\"\n):\n\n\nAddRelation(\n o(epsilon[n_],sigma[m_]),\n m_ = n_+8 and n_ >= 3,\n 0,\n \"Toda, Lemma 10.7\"\n):\n\nAddRelation(\n o(epsilonbar[n_],eta[m_]),\n m_ = n_+15 and n_ >= 3,\n o(eta[n_],epsilonbar[n_+1]),\n \"Toda, Equations 12.4\"\n):\n\nAddRelation(\n o(eta[12],rho[13]),\n true,\n o(sigma[12],mu[19]),\n \"Toda, Proposition 12.20(i)\"\n):\n\nAddRelation(\n o(eta[3],eta[4],epsilonbar[5]),\n true,\n 2 * epsilonbarprime,\n \"Toda, Lemma 12.3\"\n):\n\nAddRelation(\n o(eta[3],eta[4],mubar[5]),\n true,\n 2 * mubarprime,\n \"Toda, Lemma 12.4\"\n):\n\nAddRelation(\n o(eta[n_],kappa[m_]),\n m_ = n_+1 and n_ >= 6,\n epsilonbar[n_],\n \"Toda, Equations 10.23\"\n):\n\nAddRelation(\n o(eta[n_],rho[m_]),\n m_=n_+1 and n_>=13,\n o(sigma[n_],mu[n_+7]),\n \"Toda, Proposition 12.20(i)\"\n):\n\nAddRelation(\n o(kappa[n_],eta[m_]),\n m_ = n_+14 and n_ >= 9,\n epsilonbar[n_],\n \"Toda, Equations 10.23\"\n):\n\nAddRelation(\n o(mu[n_],sigma[m_]),\n m_=n_+9 and n_>=13,\n o(sigma[n_],mu[n_+7]),\n \"Toda, Proposition 12.20(i)\"\n):\n\nAddRelation(\n o(nu[n_],sigma[m_],nu[p_],nu[q_]),\n m_=n_+3 and p_=n_+10 and q_=n_+13 and n_>=5,\n o(eta[n_],epsilonbar[n_+1]),\n \"Toda, Equations 12.4\"\n):\n\nAddRelation(\n o(nubar[n_],sigma[m_]),\n m_ = n_+8 and n_ >= 6,\n 0,\n \"Toda, Lemma 10.7\"\n):\n\nAddRelation(\n o(rho[n_],eta[m_]),\n o(sigma[n],mu[n+7]),\n m_=n_+16 and n_>=13,\n \"Toda, Proposition 12.20(i)\"\n):\n\nAddRelation(\n o(sigma[10],nubar[17]),\n true,\n o(sigma[10],epsilon[17]),\n \"Toda, Equations 10.18\"\n):\n\nAddRelation(\n o(sigma[13],zeta[20]),\n true,\n 0,\n \"Toda, Equations 12.23\"\n):\n\nAddRelation(\n o(sigma[n_],epsilon[m_]),\n m_ = n_+7 and n_ >= 11,\n 0,\n \"Toda, Lemma 10.7\"\n):\n\nAddRelation(\n o(sigma[n_],nubar[m_]),\n m_ = n_+7 and n_ >= 11 ,\n 0,\n \"Toda, Equations 10.18\"\n):\n\nAddRelation(\n o(w[14],nu[27],nu[30]),\n true,\n 2 * o(omega[14],nu[30]),\n \"Toda, Equations 12.27\"\n):\n\nAddRelation(\n o(sigmaprime,eta[14],epsilon[15]),\n true,\n E(zetaprime),\n \"Toda, Lemma 12.1 (noting that \\\\(2\\\\pi_{23}^{7}=0\\\\))\"\n):\n\nAddRelation(\n o(E(sigmaprime),eta[15],epsilon[16]),\n true,\n E(zetaprime),\n \"Toda, Lemma 12.1 (noting that \\\\(2\\\\pi_{23}^{7}=0\\\\))\"\n):\n\nAddRelation(\n o(eta[5],w[6]),\n true,\n 0,\n \"\\\\(\\\\eta_5\\\\circ w_6\\\\) lies in the kernel of the map \\\\(\\\\E:\\\\pi_{11}^5\\\\rightarrow\\\\pi_{12}^6\\\\), which is zero by inspection of Toda's Proposition 5.11\"\n):\n\nAddRelation(\n o(eta[5],nubar[6]),\n true,\n o(nu[5],nu[8],nu[11]),\n \"This holds after one suspension by Toda's Lemma 6.3, but the map \\\\(\\\\E:\\\\pi_{14}^5\\\\rightarrow\\\\pi_{15}^6\\\\) is injective by Toda's Theorem 7.2.\"\n):\n\nAddRelation(\n o(eta[3],E(muprime)),\n true,\n 0,\n \"We find by calculation that \\\\(H:\\\\pi_{15}^3\\\\rightarrow\\\\pi_{15}^5\\\\) is injective, so \\\\(\\\\E:\\\\pi_{14}^2\\\\rightarrow\\\\pi_{15}^3\\\\) must be zero. In particular \\\\({\\\\eta_3}\\\\circ\\\\E\\\\mu'=\\\\E(\\\\eta_2\\\\circ\\\\mu')=0\\\\).\"\n):\n\nAddRelation(\n o(eta[3],epsilon[4],nu[12]),\n true,\n 0,\n \"One checks that \\\\(H(\\\\eta_3\\\\circ\\\\epsilon_4\\\\circ\\\\nu_{12}=0\\\\), but one can also calculate the Hopf invariants of Toda's generators to see that \\\\(H:\\\\pi_{15}^3\\\\rightarrow\\\\pi_{15}^5\\\\) is injective.\"\n):\n\nAddRelation(\n o(eta[3],E(epsilonbarprime)),\n true,\n 0,\n \"We have \\\\(\\\\E{\\\\epsilonbar'}=(\\\\E\\\\nu')\\\\circ\\\\kappa_7\\\\) by Toda's Lemma 12.3, and \\\\(\\\\eta_3\\\\circ\\\\E\\\\nu'=0\\\\) by Toda's Lemma 5.7, so \\\\(\\\\eta_3\\\\circ\\\\E{\\\\epsilonbar'}=0\\\\). \"\n):\n\nAddRelation(\n o(nu[5],sigma[8],eta[15]),\n true,\n Coset[o(nu[5],epsilon[8]),{4 * zeta[5]}],\n \"Notes by Strickland, cor-nu-sigma-eta\"\n):\n\nAddRelation(\n o(nu[n_],nu[m_],nu[p_],nu[q_]), \n m_ = n_+3 and p_ = m_+3 and q_ = p_+3 and n_ >= 6,\n 0,\n \"\\\\({\\\\nu_n}\\\\circ{\\\\nu_{n+3}}\\\\circ{\\\\nu_{n+6}}\\\\circ{\\\\nu_{n+9}}=0\\\\) for \\\\(n \\\\geq 6)\",\n \"Notes by Strickland, prop-nu-nu-nu-nu\"\n):\n\nAddRelation(\n o(nu[5],nu[8],sigma[11]),\n true,\n 0,\n \"Notes by Strickland, prop-nu-nu-sigma\"\n):\n\nAddRelation(\n o(epsilonprime,nu[13]),\n true,\n 0,\n \"Notes by Strickland, prop-epsilonprime-nu\"\n):\n\nAddRelation(\n o(E(epsilonprime),nu[14]),\n true,\n 0,\n \"Notes by Strickland, prop-epsilonprime-nu\"\n):\n\nAddRelation(\n o(nu[6],nubar[9]),\n true,\n 2 * o(nubar[6],nu[14]),\n \"Notes by Strickland, prop-nu-nubar\"\n):\n\nAddRelation(\n o(nubar[10],nu[18]),\n true,\n 0,\n \"Notes by Strickland, prop-nubar-nu\"\n):\n\nAddRelation(\n o(sigmathird,epsilon[12]),\n true,\n 0,\n \"Notes by Strickland, prop-sigmathird-epsilon\"\n):\n\nAddRelation(\n o(sigmathird,nubar[12]),\n true,\n 0,\n \"Notes by Strickland, prop-sigmathird-nubar\"\n):\n\nAddRelation(\n o(sigmasecond,epsilon[13]),\n true,\n 0,\n \"Notes by Strickland, prop-sigmasecond-epsilon\"\n):\n\nAddRelation(\n o(sigmasecond,nubar[13]),\n true,\n 0,\n \"Notes by Strickland, prop-sigmasecond-nubar\"\n):\n\nAddRelation(\n o(E(theta),nu[25]),\n true,\n 0,\n \"Toda, Equations 10.21 and 7.30\"\n):\n\nAddRelation(\n o(nu[n_],epsilonbar[m_]),\n m_ = n_+3 and n_>=6,\n 0,\n \"\\\\(\\\\nu_n\\\\circ\\\\epsilonbar_{n+3}=0\\\\) for \\\\(n\\\\geq 6\\\\)\",\n \"\\\\(\\\\nu_5\\\\circ\\\\epsilonbar_8=\\\\nu_5\\\\circ\\\\eta_8\\\\circ\\\\kappa_9=w_5\\\\circ\\\\kappa_9\\\\) by Toda's Equations 5.10 and 10.23. The claim follows by suspending.\"\n):\n\nAddRelation(\n o(w[10],eta[19]),\n true,\n 2 * o(sigma[10],nu[17]),\n \"Toda, Equations 7.21\"\n):\n\nAddRelation(\n o(sigma[n_],nu[m_]),\n m_ = n_+7 and n_ >= 12,\n 0,\n \"\\\\(\\\\sigma_n\\\\circ\\\\nu_{n+7}=0\\\\) for \\\\(n\\\\geq 12\\\\)\",\n \"Toda, Equations 7.20\"\n):\n\nAddRelation(\n o(nu[n_],sigma[m_]),\n m_ = n_+3 and n_ >= 11,\n 0,\n \"\\\\(\\\\nu_n\\\\circ\\\\sigma_{n+3}=0\\\\) for \\\\(n\\\\geq 11\\\\)\",\n \"Toda, Equations 7.20\"\n):\n\nAddRelation(\n o(E(sigmaprime),nu[15],nu[18]),\n true,\n o(nu[8],sigma[11],nu[18]),\n \"Notes by Strickland, prop-sigmaprime-nu-nu\"\n):\n\nAddRelation(\n o(eta[n_],epsilonbar[m_]),\n m_ = n_+1 and n_ >= 10,\n 0,\n \"WHY IS THIS?\"\n):\n\nUnknownComposites := {\no(eta[9], w[10]),\no(w[10], eta[19]), \no(sigmaprime,nu[14]),\no(sigmasecond,nu[13]),\no(sigmathird,nu[12]),\no(nu[7], nubar[10]),\no(nu[9], sigma[12]),\no(nubar[10], nu[18]), \no(E(sigmaprime), nu[15]), \no(nu[5], sigma[8], eta[15])\n}:\n\n######################################################################\n\n# Hopf invariants \n\nAddRelation(\n H(eta[2]),\n true,\n iota[3],\n \"Definition of \\\\(\\\\eta_2\\\\) (Toda, Chapter V)\"\n):\n\nAddRelation(\n H(nu[4]),\n true,\n iota[7],\n \"Definition of \\\\(\\\\nu_4\\\\) (Toda, Lemma 5.4)\"\n):\n\nAddRelation(\n H(sigma[8]),\n true,\n iota[15],\n \"Definition of \\\\(\\\\sigma_8\\\\) (Toda, Lemma 5.14)\"\n):\n\nAddRelation(\n H(nuprime),\n true,\n eta[5],\n \"Toda, Equations 5.3\"\n):\n\nAddRelation(\n H(sigmathird),\n true,\n 4 * nu[9],\n \"Toda, Lemma 5.14\"\n):\n\nAddRelation(\n H(sigmasecond),\n true,\n o(eta[11],eta[12]),\n \"Toda, Lemma 5.14\"\n):\n\nAddRelation( \n H(sigmaprime),\n true,\n eta[13],\n \"Toda, Lemma 5.14\"\n):\n\nAddRelation(\n H(epsilon[3]),\n true,\n o(nu[5],nu[8]),\n \"Toda, Lemma 6.1\"\n):\n\nAddRelation(\n H(nubar[6]),\n true,\n nu[11],\n \"For us this is part of the definition of \\\\(\\\\nubar_6\\\\). Toda's Lemma 6.2 says that it is true modulo \\\\(2\\\\nu_{11}\\\\), which is part of the validation of our definition. \"\n):\n\nAddRelation(\n H(mu[3]),\n true,\n sigmathird,\n \"Toda, Lemma 6.5\"\n):\n\nAddRelation(\n H(epsilonprime),\n true,\n epsilon[5],\n \"Toda, Lemma 6.6\"\n):\n\nAddRelation(\n H(muprime),\n true,\n mu[5],\n \"Toda, beginning of Section VII(ii)\"\n):\n\nAddRelation(\n H(zeta[5]),\n true,\n 8 * sigma[9],\n \"Toda, Lemma 6.7\"\n):\n\nAddRelation(\n H(thetaprime),\n true,\n o(eta[21],eta[22]),\n \"Toda, Lemma 7.5\"\n):\n\nAddRelation(\n H(theta),\n true,\n eta[23],\n \"Toda, Lemma 7.5\"\n):\n\nAddRelation(\n H(epsilonbar[3]),\n true,\n o(nu[5],sigma[8],nu[15]),\n \"Strickland, prop-hopf-epsilonbar\"\n):\n\nAddRelation(\n H(epsilonstar[12]),\n true,\n o(nu[23],nu[26]),\n \"Toda, Lemma 12.15\"\n):\n\nAddRelation(\n H(lambda),\n true,\n o(nu[25],nu[28]),\n \"Toda, Lemma 12.18\"\n):\n\nAddRelation(\n H(lambdaprime),\n true,\n Coset(epsilon[21],{nubar[21]+epsilon[21]}),\n \"Toda, Lemma 12.19\"\n):\n\nAddRelation(\n H(lambdasecond),\n true,\n Coset(o(eta[19],epsilon[20]),{o(eta[19],epsilon[20])+o(nu[19],nu[22],nu[25])}),\n \"Toda, Lemma 12.19\"\n):\n\nAddRelation(\n H(mubar[3]),\n true,\n rhofourth,\n \"Toda, Lemma 12.2\"\n):\n\nAddRelation(\n H(mubarprime),\n true,\n Coset(mubar[5],Zap[E(E(E(Generators[SpherePi[19,2]])))]),\n \"Toda, Lemma 12.4\"\n):\n\nAddRelation(\n H(omega[14]),\n true,\n nu[27],\n \"Toda, Lemma 12.15\"\n):\n\nAddRelation(\n H(omegaprime),\n true,\n Coset(epsilon[23],{nubar[23] + epsilon[23]}),\n \"Toda, Lemma 12.21\"\n):\n\nAddRelation(\n H(rho(13)),\n true,\n 4 * nu[25],\n \"Toda, Equations 10.22\"\n):\n\nAddRelation(\n H(rhofourth),\n true,\n 4 * zeta[9],\n \"Toda, Equations 10.12\"\n):\n\nAddRelation(\n H(rhoprime),\n true,\n 8 * sigma[17],\n \"Toda, Equations 10.12\"\n):\n\nAddRelation(\n H(rhosecond),\n true,\n mu[13],\n \"This is part of our definition of \\\\(\\\\rho''\\\\) - see the notes by Strickland, prop-rho-second, and Toda, Equations 10.12\"\n):\n\nAddRelation(\n H(rhothird),\n true,\n o(eta[11],mu[12]),\n \"Toda, Equations 10.12\"\n):\n\nAddRelation(\n H(sigmabar[6]),\n true,\n Coset(o(sigma[11],sigma[18]), {2 * o(sigma[11],sigma[18])}),\n \"Toda, Lemma 12.5\"\n):\n\nAddRelation(\n H(xiprime),\n true,\n nubar[21] + epsilon[21],\n \"Toda, Lemma 12.19\"\n):\n\nAddRelation(\n H(xisecond),\n true,\n o(eta[19],epsilon[20])+o(nu[19],nu[22],nu[25]),\n \"Toda, Lemma 12.19\"\n):\n\nAddRelation(\n H(zetabar[5]),\n true,\n 8 * rhoprime,\n \"Toda, Lemma 12.4\"\n):\n\nAddRelation(\n H(zetaprime),\n true,\n zeta[11],\n \"This is part of our definition of \\\\(\\\\zeta'\\\\), which is validated in the notes by Strickland, prop-zetaprime, which refines Toda's Lemma 12.1\"\n):\n\nAddRelation(\n H(etastarprime),\n true,\n o(eta[29],eta[30]),\n \"Toda, Lemma 12.14\"\n):\n\nAddRelation(\n H(etastar[16]),\n true,\n eta[31],\n \"Toda, Lemma 12.14\"\n):\n\nAddRelation(\n H(epsilonbarprime),\n true,\n Coset(epsilonbar[5],{rhofourth}),\n \"Notes by Strickland, prop-H-epsilonbarprime\"\n):\n\nAddRelation(\n H(WhiteheadP(E(theta))),\n true,\n thetaprime,\n \"Toda, Lemma 12.11\"\n):\n\nAddRelation(\n H(kappa[7]),\n true,\n epsilon[13],\n \"Notes by Strickland, prop-H-kappa\"\n):\n\n######################################################################\n\n# The Whitehead map \n\nAddRelation(\n WhiteheadP(eta[3]),\n true,\n 0,\n \"\\\\(P(\\\\eta_3)\\\\) lies in the trivial group \\\\(\\\\pi_2S^1\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(eta[9]),\n true,\n o(E(nuprime),eta[7]),\n \"Notes by Strickland\"\n):\n\nAddRelation( \n WhiteheadP(nu[5]),\n true,\n o(eta[2],nuprime),\n \"Toda, Lemma 5.7; we have fudged the sign.\"\n):\n\nAddRelation(\n WhiteheadP(o(nu[5],sigma[8])),\n true,\n o(eta[2],epsilonprime),\n \"Notes by Strickland, Proposition 2; we have fudged the sign\"\n):\n\nAddRelation(\n WhiteheadP(sigmaprime),\n true,\n 0,\n \"Notes by Strickland, Proposition 3\"\n):\n\nAddRelation(\n WhiteheadP(sigma[9]),\n true,\n Coset(o(nu[4],sigmaprime) - E(epsilonprime), {2(o(nu[4],sigmaprime) - E(epsilonprime))}),\n \"Notes by Strickland. We have fudged a sign.\"\n):\n\nAddRelation(\n WhiteheadP(sigma[11]),\n true,\n o(nu[5],nubar[8]) + o(nu[5],epsilon[8]),\n \"Toda, Equations 7.17\"\n):\n\nAddRelation(\n WhiteheadP(o(sigma[9],eta[16])),\n true,\n o(nu[4],sigmaprime,eta[14]) + o(E(nuprime),epsilon[7]),\n \"Toda, Equations 7.16\"\n):\n\nAddRelation(\n WhiteheadP(o(sigma[9],eta[16],eta[17])),\n true,\n o(nu[4],sigmaprime,eta[14],eta[15]) + o(E(nuprime),eta[7],epsilon[8]),\n \"Toda, Equations 7.16\"\n):\n\nAddRelation(\n WhiteheadP(nuprime),\n true,\n 0,\n \"To Do: Find this reference!\"\n):\n\nAddRelation(\n WhiteheadP(epsilon[3]),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_9S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(o(eta[3],epsilon[4])),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{10}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(mu[3]),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{10}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(o(eta[3],mu[4])),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{11}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(epsilonprime),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{11}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(muprime),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{12}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(o(epsilon[3],nu[11])),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{12}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(o(nuprime,epsilon[6])),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{12}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(epsilonbar[3]),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{16}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(o(eta[3],epsilonbar[4])),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{17}S^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(sigmathird),\n true,\n 0,\n \"Takes place in \\\\(\\\\pi_{10}S^2=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(nubar[7]),\n true,\n 0,\n \"Notes by Strickland\"\n):\n\nAddRelation(\n WhiteheadP(rhosecond),\n true,\n 0,\n \"\\\\(P(\\\\rho'')\\\\) lies in the kernel of \\\\(\\\\E:\\\\pi_{20}^{3}\\\\rightarrow\\\\pi_{21}^{4}\\\\), which is trivial by inspection of Toda's Theorem 12.7\"\n):\n\nAddRelation(\n WhiteheadP(zeta[5]),\n true,\n Coset(o(eta[2],muprime),{2 * o(eta[2],muprime)}),\n \"Notes by Strickland, prop-zeta\"\n):\n\nAddRelation(\n WhiteheadP(epsilonbarprime),\n true,\n 0,\n \"This takes place in \\\\(\\\\pi_{18}^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(mubar[3]),\n true,\n 0,\n \"This takes place in \\\\(\\\\pi_{18}^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(o(eta[3],mubar[4])),\n true,\n 0,\n \"This takes place in \\\\(\\\\pi_{19}^1=0\\\\).\"\n):\n\nAddRelation(\n WhiteheadP(rhofourth),\n true,\n 0,\n \"\\\\(P(\\\\rho^{(4)})=PH(\\\\mubar_3)=0\\\\) (using Toda, Lemma 12.2)\"\n):\n\nAddRelation(\n o(nu[5],eta[8],epsilonbar[9]),\n true,\n 0,\n \"Toda, Equations 12.15 and 5.10\"\n):\n\nAddRelation(\n WhiteheadP(E(E(rhoprime))),\n true,\n 0,\n \"Toda, Equations 12.15\"\n):\n\nAddRelation(\n o(nu[5],eta[8],rhoprime),\n true,\n 0,\n \"Toda, Equations 12.15 gives \\\\(P(\\\\E^2\\\\rho')=0\\\\), but \\\\(P(\\\\E^2\\\\rho')=P(\\\\iota_{11})\\\\circ\\\\rho'=\\\\nu_5\\\\circ\\\\eta_8\\\\circ\\\\rho'\\\\) by Equations 5.10.\"\n):\n\nAddRelation(\n w[1],\n true,\n 0,\n \"\\\\(w_1=P(\\\\iota_3)=PH(\\\\eta_2)=0\\\\)\"\n):\n\nAddRelation(\n w[2] ,\n true,\n 2 * eta[2],\n \"Toda's Proposition 5.1 should say that \\\\(w_2=P(\\\\iota_5)=\\\\pm 2\\\\eta_2\\\\). In fact it says that \\\\(w_2=P(\\\\iota_5)=\\\\pm 2\\\\eta_3\\\\), but this is not dimensionally correct and is a typo. We have fudged the sign ambiguity. \"\n):\n\nAddRelation(\n w[3],\n true,\n 0,\n \"\\\\(w_3=P(\\\\iota_7)=PH(\\\\nu_4)=0\\\\)\"\n):\n\nAddRelation(\n w[4],\n true,\n 2 * nu[4] - E(nuprime),\n \"Toda, Equations 5.8 say that \\\\(w_4=\\\\pm(2\\\\nu_4-\\\\E\\\\nu')\\\\). We have fudged the sign. \"\n):\n\nAddRelation(\n w[5],\n true,\n o(nu[5],eta[8]),\n \"Toda, Equations 5.10\"\n):\n\nAddRelation(\n w[7],\n true,\n 0,\n \"Toda, Lemma 5.14 gives \\\\(w_7=P(\\\\iota_{15})=PH(\\\\sigma_8)=0\\\\).\"\n):\n\nAddRelation(\n w[8],\n true,\n 2 * sigma[8] - E(sigmaprime),\n \"Toda, Equations 5.16 say that \\\\(w_8=\\\\pm(2\\\\sigma_8-\\\\E\\\\sigma')\\\\). We have fudged the sign. \"\n):\n\nAddRelation(\n w[9],\n true,\n o(sigma[9],eta[16]) + nubar[9] + epsilon[9],\n \"Toda, Equations 7.1\"\n):\n\nAddRelation(\n w[11],\n true,\n o(sigma[11],nu[18]),\n \"Toda, Equations 7.21\"\n):\n\nAddRelation(\n w[13],\n true,\n E(theta),\n \"Toda, Equations 7.30\"\n):\n\nAddRelation(\n w[15],\n true,\n 2 * o(sigma[15],sigma[22]),\n \"Toda, Equations 10.10\"\n):\n\nSpherePi := proc(n,m)\n local stem,is_stable,G;\n stem := n-m;\n is_stable := evalb(m>stem+1);\n\n if stem<0 or m<=0 or (n>1 and m=1) then\n return(Group());\n elif stem=0 then\n return(Group([],[x[n,[]]]));\n else\n return('SpherePi'(n,m));\n fi;\nend:\n\n# Nonpositive stems\nfor i from 1 to 20 do\n for j from 1 to i-1 do\n SpherePi(j,i) := []:\n od:\n SpherePi(i,i) := [[infinity,iota[i]]]:\nod:\n\n# Homotopy groups of the circle\nfor i from 2 to 20 do\n SpherePi(i,1) := []:\nod:\n\n# 1-stem\nSpherePi(3,2) := [[infinity,eta[2]]]:\n\nfor i from 3 to 20 do\n SpherePi(i+1,i) := [[2,eta[i]]]:\nod:\n\n# 2-stem\nfor i from 2 to 20 do\n SpherePi(i+2,i) := [[2,o(eta[i+1],eta[i])]]:\nod:\n\n# 3-stem\nSpherePi(5,2) := [[2,o(eta[2],eta[3],eta[4])]]:\n\n# NB nuprime is usually only defined at p=2. \n# Presumably we get a generator from the unstable J-map?\nSpherePi(6,3) := [[4,nuprime]]: \n\nSpherePi(7,4) := [[infinity,nu[4]],[4,E(nuprime)]]:\n\nfor i from 5 to 20 do \n SpherePi(i+3,i) := [[8,nu[i]]]:\nod:\n\n# 4-stem\nSpherePi(6,2) := [[4,o(eta[2],nuprime)]]:\nSpherePi(7,3) := [[2,o(nuprime,eta[6])]]:\nSpherePi(8,4) := [[2,o(nu[4],eta[7])],[2,o(E(nuprime),eta[7])]]:\nSpherePi(9,5) := [[2,o(nu[5],eta[8])]]:\n\nfor i from 6 to 20 do\n SpherePi(i+4,i) := []:\nod:\n\n# 5-stem\n\nSpherePi(7, 2) := [[2,o(eta[2],nuprime,eta[6])]]:\nSpherePi(8, 3) := [[2,o(nuprime,eta[6],eta[7])]]:\nSpherePi(9, 4) := [[2,o(nu[4],eta[7],eta[8])],\n [2,o(E(nuprime),eta[7],eta[8])]]:\nSpherePi(10, 5) := [[2,o(nu[5],eta[8],eta[9])]]:\nSpherePi(11, 6) := [[infinity,w[6]]]:\n\nfor i from 7 to 20 do \n SpherePi(i+5,i) := []:\nod:\n\n# 6-stem\n\nSpherePi(8, 2) := [[2,o(eta[2],nuprime,eta[6],eta[7])]]:\nSpherePi(9, 3) := []:\nSpherePi(10, 4) := [[8,o(nu[4],nu[7])],3]:\n\nfor i from 5 to 20 do\n SpherePi(i+6,i) := [[2,o(nu[i],nu[i+3])]]:\nod:\n\n# 7-stem\n\nSpherePi( 9, 2) := []:\nSpherePi(10, 3) := []:\nSpherePi(11, 4) := []:\nSpherePi(12, 5) := [[2,sigmathird]]:\nSpherePi(13, 6) := [[4,sigmasecond]]:\nSpherePi(14, 7) := [[8,sigmaprime]]:\nSpherePi(15, 8) := [[infinity,sigma[8]],[8,E(sigmaprime)]]:\n\nfor i from 9 to 20 do\n SpherePi(i+7,i) := [[16,sigma[i]]]:\nod:\n\n# 8-stem\n\nSpherePi(10, 2) := []:\nSpherePi(11, 3) := [[2,epsilon[3]]]:\nSpherePi(12, 4) := [[2,epsilon[4]]]:\nSpherePi(13, 5) := [[2,epsilon[5]]]:\nSpherePi(14, 6) := [[2,epsilon[6]],[24,nubar[6]]]:\nSpherePi(15, 7) := [[2,epsilon[7]],[2,nubar[7]],[2,o(sigmaprime,eta[14])]]:\nSpherePi(16, 8) := [[2,epsilon[8]],\n [2,nubar[8]],\n [2,o(E(sigmaprime),eta[15])],\n [2,o(sigma[8],eta[15])]]:\nSpherePi(17, 9) := [[2,epsilon[9]],\n [2,nubar[9]],\n [2,o(sigma[9],eta[16])]]:\n\nfor i from 10 to 20 do\n SpherePi(i+8,i) := [[2,epsilon[i]],[2,nubar[i]]]:\nod:\n\n# 9-stem\n\nSpherePi(11, 2) := [[2,o(eta[ 2],epsilon[ 3])]]:\nSpherePi(12, 3) := [[2,o(eta[ 3],epsilon[ 4])],\n [2,mu[ 3]]]:\nSpherePi(13, 4) := [[2,o(eta[ 4],epsilon[ 5])],\n [2,mu[ 4]],\n [2,o(nu[ 4],nu[ 7],nu[10])] ]:\nSpherePi(14, 5) := [[2,o(eta[ 5],epsilon[ 6])],\n [2,mu[ 5]],\n [2,o(nu[ 5],nu[ 8],nu[11])] ]:\nSpherePi(15, 6) := [[2,o(eta[ 6],epsilon[ 7])],\n [2,mu[ 6]],\n [2,o(nu[ 6],nu[ 9],nu[12])] ]:\nSpherePi(16, 7) := [[2,o(eta[ 7],epsilon[ 8])],\n [2,mu[ 7]],\n [2,o(nu[ 7],nu[10],nu[13])],\n [2,o(sigmaprime,eta[14],eta[15])] ]:\nSpherePi(17, 8) := [[2,o(eta[ 8],epsilon[ 9])],\n [2,mu[ 8]],\n [2,o(nu[ 8],nu[11],nu[14])],\n [2,o(E(sigmaprime),eta[15],eta[16])],\n [2,o(sigma[8],eta[15],eta[16])] ]:\nSpherePi(18, 9) := [[2,o(eta[ 9],epsilon[10])],\n [2,mu[ 9]],\n [2,o(nu[ 9],nu[12],nu[15])],\n [2,o(sigma[9],eta[16],eta[17])] ]:\nSpherePi(19, 10) := [[2,o(eta[10],epsilon[11])],\n [2,mu[10]],\n [2,o(nu[10],nu[13],nu[16])],\n [infinity,w[10]]]:\n\nfor i from 11 to 20 do\n SpherePi(i+9,i) := [[2,o(eta[n],epsilon[n+1])],\n [2,mu[n]],\n [2,o(nu[n],nu[n+3],nu[n+6])]]:\nod:\n\n# 10-stem\n\nSpherePi(12, 2) := [[2,o(eta[ 2],mu[ 3])],\n [2,o(eta[ 2],eta[ 3],epsilon[4])]]:\nSpherePi(13, 3) := [[2,o(eta[ 3],mu[ 4])],\n [4,epsilonprime]]:\nSpherePi(14, 4) := [[2,o(eta[ 4],mu[ 5])],\n [4,E(epsilonprime)],\n [8,o(nu[ 4],sigmaprime)] ]:\nSpherePi(15, 5) := [[2,o(eta[ 5],mu[ 6])],\n [8,o(nu[ 5],sigma[ 8])] ]:\nSpherePi(16, 6) := [[2,o(eta[ 6],mu[ 7])],\n [8,o(nu[ 6],sigma[ 9])]]:\nSpherePi(17, 7) := [[2,o(eta[ 7],mu[ 8])],\n [8,o(nu[ 7],sigma[10])]]:\nSpherePi(18, 8) := [[2,o(eta[ 8],mu[ 9])],\n [8,o(nu[ 8],sigma[11])],\n [8,o(sigma[ 8],nu[15])]]:\nSpherePi(19, 9) := [[2,o(eta[ 9],mu[10])],\n [8,o(sigma[ 9],nu[16])]]:\nSpherePi(20, 10) := [[2,o(eta[10],mu[11])],\n [4,o(sigma[10],nu[17])]]:\nSpherePi(21, 11) := [[2,o(eta[11],mu[12])],\n [2,o(sigma[11],nu[18])]]:\n\nfor i from 12 to 20 do\n SpherePi(i+10,i) := [[2,o(eta[i],mu[i+1])]]:\nod:\n\n# 11-stem\n\nSpherePi(13, 2) := [[4,o(eta[2],epsilonprime)],\n [2,o(eta[2],eta[3],mu[4])]]:\nSpherePi(14, 3) := [[4,muprime],\n [2,o(epsilon[3],nu[11])],\n [2,o(nuprime,epsilon[6])]]:\nSpherePi(15, 4) := [[4,E(muprime)],\n [2,o(epsilon[4],nu[12])],\n [2,o(E(nuprime),epsilon[7])],\n [2,o(nu[ 4],sigmaprime,eta[14])],\n [2,o(nu[ 4],nubar[7])],\n [2,o(nu[ 4],epsilon[7])]]:\nSpherePi(16, 5) := [[2,o(nu[ 5],nubar[8])],\n [2,o(nu[ 5],epsilon[8])],\n [8,zeta[ 5]]]:\nSpherePi(17, 6) := [[8,zeta[ 6]],\n [4,o(nubar[ 6],nu[14])]]:\nSpherePi(18, 7) := [[8,zeta[ 7]],\n [2,o(nubar[ 7],nu[15])]]:\nSpherePi(19, 8) := [[8,zeta[ 8]],\n [2,o(nubar[ 8],nu[16])]]:\nSpherePi(20, 9) := [[8,zeta[ 9]],\n [2,o(nubar[ 9],nu[17])]]:\nSpherePi(21, 10) := [[8,zeta[10]]]:\nSpherePi(22, 11) := [[8,zeta[11]]]:\nSpherePi(23, 12) := [[8,zeta[12]],\n [infinity,w[12]]]:\n\nfor i from 13 to 20 do \n SpherePi(i+11,i) := [8,zeta[i]]:\nod:\n\n# 12-stem\n\n# Here Toda lists o(eta[2],nuprime,nubar[6]) as a generator, but this \n# is the same as o(eta[2],epsilon[3],nu[11]) by his Equations 7.12, \n# and that is a more convenient expression for comparison with other \n# results.\n \nSpherePi(14, 2) := [\n o(eta[2],muprime),\n o(eta[2],epsilon[3],nu[11]),\n o(eta[2],nuprime,epsilon[6])\n ]:\n\nSpherePi(15, 3) := [\n o(nuprime,mu[6]),\n o(nuprime,eta[6],epsilon[7])\n ]:\n\nSpherePi(16, 4) := [\n o(nu[4],sigmaprime,eta[14],eta[15]),\n o(nu[4],nu[7],nu[10],nu[13]),\n o(nu[4],mu[7]),\n o(nu[4],eta[7],epsilon[8]),\n o(E(nuprime),mu[7]),\n o(E(nuprime),eta[7],epsilon[8])\n ]:\n\nSpherePi(17, 5) := [\n o(nu[5],nu[8],nu[11],nu[14]),\n o(nu[5],mu[8]),\n o(nu[5],eta[8],epsilon[9])\n ]:\n\nSpherePi(18, 6) [o(w[6],sigma[11])]:\nSpherePi(19, 7) := []:\nSpherePi(20, 8) := []:\nSpherePi(21, 9) := []:\nSpherePi(22, 10) [o(w[10],nu[19])]:\nSpherePi(23, 11) [thetaprime]:\nSpherePi(24, 12) [theta,E(thetaprime)]:\nSpherePi(25, 13) [E(theta)]:\n\nfor i from 13 to 20 do \n SpherePi(12+i,i) := []:\nod:\n\n## 13-stem\n#\n#\n#SpherePi(15, 2) : [:\n# o(eta[2],nuprime,mu[6]),\n# o(eta[2],nuprime,eta[6],epsilon[7])\n# ]\n#\n#SpherePi(16, 3) : [:\n# o(nuprime,eta[6],mu[7])\n# ]\n#\n#SpherePi(17, 4) : [:\n# o(nu[4],nu[7],sigma[10]),\n# o(nu[4],eta[7],mu[8]),\n# o(E(nuprime),eta[7],mu[8])\n# ]\n#\n#SpherePi(18, 5) : [:\n# o(nu[5],sigma[ 8],nu[15]),\n# o(nu[5],eta[8],mu[9])\n# ]\n#\n#SpherePi(19, 6) : [:\n# o(nu[6],sigma[ 9],nu[16])\n# ]\n#\n#SpherePi(20, 7) : [:\n# o(nu[7],sigma[10],nu[17])\n# ]\n#\n#SpherePi(21, 8) := [:\n# o(sigma[ 8],nu[15],nu[18]),\n# o(nu[8],sigma[11],nu[18])\n# ]\n#\n#SpherePi(22, 9) := [:\n# o(sigma[ 9],nu[16],nu[19])\n# ]\n#\n#SpherePi(23, 10) := [:\n# o(sigma[10],nu[17],nu[20])\n# ]\n#\n#SpherePi(24, 11) := [:\n# o(sigma[11],nu[18],nu[21]),\n# o(thetaprime,eta[23])\n# ]\n#\n#SpherePi(25, 12) := [:\n# o(theta,eta[24]),\n# o(E(thetaprime),eta[24])\n# ]\n#\n#SpherePi(26, 13) := [:\n# o(E(theta),eta[25])\n# ]\n#\n#SpherePi(27, 14) := [:\n# w[14]\n# ]\n#\n#SpherePi(k_, n_) : := []: /; k == n+13 && n>14\n#\n#\n## 14-stem\n#\n#\n#SpherePi(16, 2) := [:\n# o(eta[2],nuprime,eta[6],mu[7])\n# ]\n#\n#SpherePi(17, 3) := [:\n# o(epsilon[3],nu[11],nu[14])\n# ]\n#\n#SpherePi(18, 4) := [:\n# o(epsilon[4],nu[12],nu[15]),\n# o(nu[4],zeta[7]),\n# o(nu[4],nubar[7],nu[15])\n# ]\n#\n#SpherePi(19, 5) := [:\n# o(nu[5],zeta[8]),\n# o(nu[5],nubar[8],nu[16])\n# ]\n#\n#SpherePi(20, 6) := [:\n# o(sigmasecond,sigma[13]),\n# o(nubar[6],nu[14],nu[17])\n# ]\n#\n#SpherePi(21, 7) := [:\n# o(sigmaprime,sigma[14]),\n# kappa[7]\n# ]\n#\n#SpherePi(22, 8) := [:\n# o(sigma[8],sigma[15]),\n# o(E(sigmaprime),sigma[15]),\n# kappa[8]\n# ]\n#\n#SpherePi(23, 9) := [:\n# o(sigma[9],sigma[16]),\n# kappa[9]\n# ]\n#\n#SpherePi(24, 10) := [:\n# o(sigma[10],sigma[17]),\n# kappa[10]\n# ]\n#\n#SpherePi(25, 11) := [:\n# o(sigma[11],sigma[18]),\n# kappa[11]\n# ]\n#\n#SpherePi(26, 12) := [:\n# o(sigma[12],sigma[19]),\n# kappa[12],\n# o(w[12],nu[23])\n# ]\n#\n#SpherePi(27, 13) := [:\n# o(sigma[13],sigma[20]),\n# kappa[13]\n# ]\n#\n#SpherePi(28, 14) := [:\n# o(sigma[14],sigma[21]),\n# kappa[14]\n# ]\n#\n#SpherePi(29, 15) := [:\n# o(sigma[15],sigma[22]),\n# kappa[15]\n# ]\n#\n#SpherePi(k_, n_) : := [:\n# o(sigma[n],sigma[n+7]),\n# kappa[n]\n# ] /; k == n+14 && n>=16\n#\n## 15-stem\n#\n#\n#\n#\n#SpherePi(17, 2) := [:\n# o(eta[2],epsilon[3],nu[11],nu[14])\n# ]\n#\n#SpherePi(18, 3) := [:\n# epsilonbar[3]\n# ]\n#\n#SpherePi(19, 4) := [:\n# epsilonbar[4]\n# ]\n#\n#SpherePi(20, 5) := [:\n# epsilonbar[5],\n# rhofourth\n# ]\n#\n#SpherePi(21, 6) := [:\n# epsilonbar[6],\n# rhothird\n# ]\n#\n#SpherePi(22, 7) := [:\n# epsilonbar[7],\n# rhosecond,\n# o(sigmaprime,nubar[14]),\n# o(sigmaprime,epsilon[14])\n# ]\n#\n#SpherePi(23, 8) := [:\n# epsilonbar[8],\n# E(rhosecond),\n# o(E(sigmaprime),nubar[15]),\n# o(E(sigmaprime),epsilon[15]),\n# o(sigma[8],nubar[15]),\n# o(sigma[8],epsilon[15])\n# ]\n#\n#SpherePi(24, 9) := [:\n# epsilonbar[9],\n# rhoprime,\n# o(sigma[9],nubar[16]),\n# o(sigma[9],epsilon[16])\n# ]\n#\n#SpherePi(25, 10) := [:\n# epsilonbar[10],\n# E(rhoprime),\n# o(sigma[10],nubar[17])\n# ]\n#\n#SpherePi(26, 11) := [:\n# epsilonbar[11],\n# E(E(rhoprime))\n# ]\n#\n#SpherePi(27, 12) := [:\n# epsilonbar[12],\n# E(E(E(rhoprime)))\n# ]\n#\n#SpherePi(n_, m_) : := [:\n# epsilonbar[m],\n# rho(m)\n# ] /; n === m+15 && m >= 13 && m =!= 16\n#\n#SpherePi(31, 16) := [:\n# epsilonbar[16],\n# rho(16),\n# w[16]\n# ]\n#\n## 16-stem\n#\n#\n#\n#SpherePi(18, 2) := [:\n# o(eta[2],epsilonbar[3])\n# ]\n#\n#SpherePi(19, 3) := [:\n# o(eta[3],epsilonbar[4]),\n# o(mu[3],sigma[12])\n# ]\n#\n#SpherePi(20, 4) := [:\n# o(eta[4],epsilonbar[5]),\n# o(mu[4],sigma[13]),\n# o(nu[4],nu[7],sigma[10],nu[17])\n# ]\n#\n#SpherePi(21, 5) := [:\n# o(eta[5],epsilonbar[6]),\n# o(mu[5],sigma[14])\n# ]\n#\n#SpherePi(22, 6) := [:\n# o(eta[6],epsilonbar[7]),\n# o(mu[6],sigma[15]),\n# zetaprime\n# ]\n#\n#SpherePi(23, 7) := [:\n# o(eta[7],epsilonbar[8]),\n# o(mu[7],sigma[16]),\n# E(zetaprime),\n# o(sigmaprime,mu[14])\n# ]\n#\n#SpherePi(24, 8) := [:\n# o(eta[8],epsilonbar[9]),\n# o(mu[8],sigma[17]),\n# E(E(zetaprime)),\n# o(sigma[8],nu[15],nu[18],nu[21]),\n# o(sigma[8],mu[15]),\n# o(sigma[8],eta[15],epsilon[16]),\n# o(E(sigmaprime),mu[15])\n# ]\n#\n#SpherePi(25, 9) := [:\n# o(mu[9],sigma[18]),\n# o(sigma[9],nu[16],nu[19],nu[22]),\n# o(sigma[9],mu[16]),\n# o(sigma[9],eta[16],epsilon[17])\n# ]\n#\n#SpherePi(26, 10) := [:\n# o(sigma[10],mu[17]),\n# o(w[10],sigma[19])\n# ]\n#\n#SpherePi(27, 11) := [ :\n# o(sigma[11],mu[18])\n# ]\n#\n#SpherePi(28, 12) := [:\n# o(sigma[12],mu[19])\n# ]\n#\n#SpherePi(29, 13) := [:\n# o(sigma[13],mu[20])\n# ]\n#\n#SpherePi(30, 14) := [:\n# o(sigma[14],mu[21]),\n# omega[14]\n# ]\n#\n#SpherePi(31, 15) := [:\n# o(sigma[15],mu[22]),\n# omega[15],\n# etastarprime\n# ]\n#\n#SpherePi(32, 16) := [:\n# o(sigma[16],mu[23]),\n# omega[16],\n# E(etastarprime),\n# etastar[16]\n# ]\n#\n#SpherePi(33, 17) := [:\n# o(sigma[17],mu[24]),\n# omega[17],\n# etastar[17]\n# ]\n#\n#SpherePi(k_, n_) : := [:\n# o(sigma[n],mu[n+7]),\n# omega[n]\n# ] /; k == n+16 && n>=18\n#\n## 17-stem\n#\n#\n#\n#SpherePi(19, 2) := [:\n# o(eta[2],mu[3],sigma[12]),\n# o(eta[2],eta[3],epsilonbar[4])\n# ]\n#\n#SpherePi(20, 3) := [:\n# o(eta[3],mu[4],sigma[13]),\n# epsilonbarprime,\n# mubar[3]\n# ]\n#\n#SpherePi(21, 4) := [:\n# o(eta[4],mu[5],sigma[14]),\n# E(epsilonbarprime),\n# mubar[4],\n# o(nu[4],sigmaprime,sigma[14]),\n# o(nu[4],kappa[7])\n# ]\n#\n#SpherePi(22, 5) := [:\n# o(eta[5],mu[6],sigma[15]),\n# mubar[5],\n# o(nu[5],kappa[8])\n# ]\n#\n#SpherePi(23, 6) := [:\n# o(eta[6],mu[7],sigma[16]),\n# mubar[6],\n# o(nu[6],kappa[9]),\n# WhiteheadP[E(theta)]\n# ]\n#\n#SpherePi(24, 7) := [:\n# o(eta[7],mu[8],sigma[17]),\n# mubar[7],\n# o(nu[7],kappa[10]),\n# o(sigmaprime,eta[14],mu[15])\n# ]\n#\n#SpherePi(25, 8) := [:\n# o(eta[8],mu[9],sigma[18]),\n# mubar[8],\n# o(nu[8],kappa[11]),\n# o(E(sigmaprime),eta[15],mu[16]),\n# o(sigma[8],eta[15],mu[16])\n# ]\n#\n#SpherePi(26, 9) := [:\n# o(eta[9],mu[10],sigma[19]),\n# mubar[9],\n# o(nu[9],kappa[12]),\n# o(sigma[9],eta[16],mu[17])\n# ]\n#\n#SpherePi(27, 10) := [:\n# mubar[10],\n# o(nu[10],kappa[13]),\n# o(sigma[10],eta[17],mu[18])\n# ]\n#\n#SpherePi(28, 11) := [:\n# mubar[11],\n# o(nu[11],kappa[14]),\n# o(sigma[11],eta[18],mu[19])\n# ]\n#\n#SpherePi(29, 12) := [:\n# mubar[12],\n# o(nu[12],kappa[15]),\n# o(sigma[12],eta[19],mu[20]),\n# epsilonstar[12]\n# ]\n#\n#SpherePi(30, 13) := [:\n# mubar[13],\n# o(nu[13],kappa[16]),\n# o(sigma[13],eta[20],mu[21]),\n# epsilonstar[13]\n# ]\n#\n#SpherePi(31, 14) := [:\n# mubar[14],\n# o(nu[14],kappa[17]),\n# o(sigma[14],eta[21],mu[22]),\n# epsilonstar[14]\n# ]\n#\n#SpherePi(32, 15) := [:\n# mubar[15],\n# o(nu[15],kappa[18]),\n# o(sigma[15],eta[22],mu[23]),\n# epsilonstar[15],\n# o(etastarprime,eta[31])\n# ]\n#\n#SpherePi(33, 16) := [:\n# mubar[16],\n# o(nu[16],kappa[19]),\n# o(sigma[16],eta[23],mu[24]),\n# epsilonstar[16],\n# o(E(etastarprime),eta[32]),\n# o(etastar[16],eta[32])\n# ]\n#\n#SpherePi(34, 17) := [:\n# mubar[17],\n# o(nu[17],kappa[20]),\n# o(sigma[17],eta[24],mu[25]),\n# epsilonstar[17],\n# o(etastar[17],eta[33])\n# ]\n#\n#SpherePi(35, 18) := [:\n# mubar[18],\n# o(nu[18],kappa[21]),\n# o(sigma[18],eta[25],mu[26]),\n# epsilonstar[18],\n# w[18]\n# ]\n#\n#SpherePi(k_, n_) : := [:\n# mubar[n],\n# o(nu[n],kappa[n+3]),\n# o(sigma[n],eta[n+7],mu[n+8]),\n# epsilonstar[n]\n# ] /; k == n+17 && n >= 19\n#\n#\n## 18-stem\n#\n#\n#\n#\n#SpherePi(20, 2) := [:\n# o(eta[2],mubar[3]),\n# o(eta[2],epsilonbarprime),\n# o(eta[2],eta[3],mu[4],sigma[13])\n# ]\n#\n#SpherePi(21, 3) := [:\n# o(eta[3],mubar[4]),\n# o(muprime,sigma[14]),\n# o(nuprime,epsilonbar[6])\n# ]\n#\n#SpherePi(22, 4) := [:\n# o(eta[ 4],mubar[ 5]),\n# o(E(muprime),sigma[15]),\n# o(E(nuprime),epsilonbar[7]),\n# o(nu[4],epsilonbar[7]),\n# o(nu[4],rhosecond),\n# o(nu[4],sigmaprime,nubar[14]),\n# o(nu[4],sigmaprime,epsilon[14])\n# ]\n#\n#SpherePi(23, 5) := [:\n# o(eta[ 5],mubar[ 6]),\n# o(nu[5],epsilonbar[8]),\n# o(zeta[5],sigma[16])\n# ]\n#\n#SpherePi(24, 6) := [:\n# o(eta[ 6],mubar[ 7]),\n# o(zeta[6],sigma[17]),\n# o(WhiteheadP[E(theta)],eta[23])\n# ]\n#\n#SpherePi(25, 7) := [:\n# o(eta[ 7],mubar[ 8]),\n# o(zeta[7],sigma[18])\n# ]\n#\n#SpherePi(26, 8) := [:\n# o(eta[ 8],mubar[ 9]),\n# o(zeta[8],sigma[19]),\n# o(sigma[8],zeta[15])\n# ]\n#\n#SpherePi(27, 9) := [:\n# o(eta[ 9],mubar[10]),\n# o(sigma[9],zeta[16])\n# ]\n#\n#SpherePi(28, 10) := [:\n# o(eta[10],mubar[11]),\n# lambdasecond,\n# xisecond\n# ]\n#\n#SpherePi(29, 11) := [:\n# o(eta[11],mubar[12]),\n# lambdaprime,\n# xiprime\n# ]\n#\n#SpherePi(30, 12) := [:\n# o(eta[12],mubar[13]),\n# E(lambdaprime),\n# E(xiprime),\n# xi[12]\n# ]\n#\n#SpherePi(31, 13) := [:\n# o(eta[13],mubar[14]),\n# xi[13],\n# lambda\n# ]\n#\n#SpherePi(32, 14) := [:\n# o(eta[14],mubar[15]),\n# xi[14],\n# E(lambda)\n# ]\n#\n#SpherePi(33, 15) := [:\n# o(eta[15],mubar[16]),\n# xi[15],\n# E(E(lambda))\n# ]\n#\n#SpherePi(34, 16) := [:\n# o(eta[16],mubar[17]),\n# xi[16],\n# E(E(E(lambda))),\n# nustar[16]\n# ]\n#\n#SpherePi(35, 17) := [:\n# o(eta[17],mubar[18]),\n# xi[17],\n# nustar[17]\n# ]\n#\n#SpherePi(36, 18) := [:\n# o(eta[18],mubar[19]),\n# xi[18] + nustar[18],\n# nustar[18]\n# ]\n#\n#SpherePi(37, 19) := [:\n# o(eta[19],mubar[20]),\n# xi[19] + nustar[19],\n# nustar[19]\n# ]\n#\n#SpherePi(k_, n_) : := [:\n# o(eta[n],mubar[n+1]),\n# nustar[n]\n# ] /; k == n+18 && n >= 20\n#\n#\n## 19-stem\n#\n#\n#\n#SpherePi(21, 2) := [:\n# o(eta[2],muprime,sigma[14]),\n# o(eta[2],nuprime,epsilonbar[6]),\n# o(eta[2],eta[3],mubar[4])\n# ]\n#\n#SpherePi(22, 3) := [:\n# mubarprime,\n# o(nuprime,mu[6],sigma[15])\n# ]\n#\n#SpherePi(23, 4) := [:\n# E(mubarprime),\n# o(E(nuprime),mu[7],sigma[16]),\n# o(nu[4],mu[7],sigma[16]),\n# o(nu[4],sigmaprime,mu[14]),\n# o(nu[4],E(zetaprime)),\n# o(nu[4],eta[7],epsilonbar[8])\n# ]\n#\n#SpherePi(24, 5) := [:\n# o(nu[5],mu[8],sigma[17]),\n# zetabar[5]\n# ]\n#\n#SpherePi(25, 6) := [:\n# zetabar[6],\n# sigmabar[6]\n# ]\n#\n#SpherePi(26, 7) := [:\n# zetabar[7],\n# sigmabar[7]\n# ]\n#\n#SpherePi(27, 8) := [:\n# zetabar[8],\n# sigmabar[8]\n# ]\n#\n#SpherePi(28, 9) := [:\n# zetabar[9],\n# sigmabar[9]\n# ]\n#\n#SpherePi(29, 10) := [:\n# zetabar[10],\n# sigmabar[10]\n# ]\n#\n#SpherePi(30, 11) := [:\n# zetabar[11],\n# sigmabar[11],\n# o(lambdaprime,eta[29]),\n# o(xiprime,eta[29])\n# ]\n#\n#SpherePi(31, 12) := [:\n# zetabar[12],\n# sigmabar[12],\n# o(E(lambdaprime),eta[30]),\n# o(E(xiprime),eta[30]),\n# omegaprime,\n# o(xi[12],eta[30])\n# ]\n#\n#SpherePi(32, 13) := [:\n# zetabar[13],\n# sigmabar[13],\n# E(omegaprime),\n# o(xi[13],eta[31])\n# ]\n#\n#SpherePi(33, 14) := [:\n# zetabar[14],\n# sigmabar[14],\n# o(omega[14],nu[30])\n# ]\n#\n#SpherePi(34, 15) := [:\n# zetabar[15],\n# sigmabar[15],\n# o(omega[15],nu[31])\n# ]\n#\n#SpherePi(35, 16) := [:\n# zetabar[16],\n# sigmabar[16],\n# o(omega[16],nu[32])\n# ]\n#\n#SpherePi(36, 17) := [:\n# zetabar[17],\n# sigmabar[17],\n# o(omega[17],nu[33])\n# ]\n#\n#SpherePi(37, 18) := [:\n# zetabar[18],\n# sigmabar[18]\n# ]\n#\n#SpherePi(38, 19) := [:\n# zetabar[19],\n# sigmabar[19]\n# ]\n#\n#SpherePi(39, 20) := [:\n# zetabar[20],\n# sigmabar[20],\n# w[20]\n# ]\n#\n#SpherePi(k_, n_) : := [:\n# zetabar[n],\n# sigmabar[n]\n# ] /; k == n+19 && n >= 21\n#\n#\n\n\ngpad := proc(stem,u)\n local n,J;\n if type(u,list) or type(u,`+`) then\n return(map2(gpad,stem,u));\n elif type(stem,posint) and type(u,indexed) and op(0,u) = x then\n n := op(1,u);\n J := op(2,u);\n if stem > nops(J) then\n J := [op(J),(-1)$(stem-nops(J))];\n fi;\n return(x[n,J]);\n else\n return(u);\n fi;\nend:\n\ngunpad := proc(u)\n local n,J;\n if type(u,list) or type(u,`+`) then\n return(map(gunpad,u));\n elif type(u,indexed) and op(0,u) = x then\n n := op(1,u);\n J := op(2,u);\n J := select(p -> p>= 0,J);\n return(x[n,J]);\n else\n return(u);\n fi;\nend:\n\nGenealogySort := proc(stem,u)\n gunpad(sort(gpad(stem,u)));\nend:\n\nGenealogyName := proc(u)\n if type(u,list) or type(u,`+`) then\n return(map(GenealogyName,u));\n else\n return('GenealogyName'(u));\n fi;\nend:\n\nTodaName := proc(u)\n if type(u,list) or type(u,`+`) then\n return(map(TodaName,u));\n else\n return('TodaName'(u));\n fi;\nend:\n\nSetGenealogy := proc(a,b)\n GenealogyName(a) := b;\n TodaName(b) := a;\nend:\n\nSetStableGenealogy := proc(a,n,J)\n local m,s,i;\n\n if type(a,symbol) then\n m := 1;\n s := a;\n elif type(a,`*`) and type(op(1,a),integer) and type(op(2,a),symbol) then\n m := op(1,a);\n s := op(2,a);\n else\n return(FAIL);\n fi;\n\n for i from n to 20 do\n GenealogyName(m*s[i]) := x[i,J];\n TodaName(x[i,J]) := m*s[i];\n od;\nend:\n\nfor i from 1 to N do \n for j from 0 to 6 do \n SetGenealogy(2^j*iota[i],x[i,[0$j]]);\n if i <> 1 and i <> 2 and i <> 4 then \n SetGenealogy(2^j*w[2*i],x[2*i,[2*i-1,0$(j+1)]]);\n fi;\n od;\nod:\n\nfor i from 0 to 6 do\n SetGenealogy(2^i*eta[2],x[2,[1,0$i]]);\n SetGenealogy(2^i*nu[4],x[4,[3,0$i]]);\n SetGenealogy(2^i*sigma[8],x[8,[7,0$i]]);\nod:\n\nSetStableGenealogy(eta,2,[1]);\n\nfor n from 2 to N do\n SetGenealogy(o(eta[n],eta[n+1]),x[n,[1,1]]);\nod:\n\nSetGenealogy(o(eta[2],eta[3],eta[4]),x[2,[1,1,1]]):\nSetGenealogy(2*nuprime,x[3,[1,1,1]]):\nSetGenealogy(nuprime,x[3,[2,1]]):\nSetGenealogy(2*E(nuprime),x[4,[1,1,1]]):\nSetGenealogy(E(nuprime),x[4,[2,1]]):\n\nSetStableGenealogy(nu,4,[3]):\nSetStableGenealogy(2*nu,5,[2,1]):\nSetStableGenealogy(4*nu,5,[1,1,1]):\n\nTodaName(x[2,[1,1,1,1]]) := - o(eta[2],nuprime):\nGenealogyName(o(eta[2],nuprime)) := - x[2,[1,1,1,1]]:\n\nSetGenealogy(2*o(eta[2],nuprime),x[2,[1,2,1]]):\n\nSetGenealogy(o(nuprime,eta[6]),x[3,[2,1,1]]):\nSetGenealogy(o(nu[4],eta[7]),x[4,[3,1]]):\nSetGenealogy(o(nu[5],eta[8]),x[5,[3,1]]):\n\n(* 5-stem *)\n\nSetGenealogy(o(eta[2],nuprime,eta[6]),x[2,[1,2,1,1]]):\nSetGenealogy(o(nuprime,eta[6],eta[7]),x[3,[2,1,1,1]]):\nSetGenealogy(o(nu[4], eta[7], eta[8]),x[4, [3, 1, 1]]):\nSetGenealogy(o(E(nuprime), eta[7], eta[8]),x[4, [2, 1, 1, 1]]):\nSetGenealogy(o(nu[5], eta[8], eta[9]),x[5, [3, 1, 1]]):\nSetGenealogy(w[6],x[6,[5,0]]):\n\n(* 6-stem *)\n\nSetGenealogy(o(eta[2], nuprime, eta[6], eta[7]),x[2, [1, 2, 1, 1, 1]]):\nSetGenealogy(o(nu[4], nu[7]),x[4, [3, 3]]):\nSetGenealogy(2*o(nu[4], nu[7]),x[4, [3, 2, 1]]):\nSetGenealogy(4*o(nu[4], nu[7]),x[4, [3, 1, 1, 1]]):\n\nfor i from 5 to N do\n SetGenealogy(o(nu[i], nu[i+3]),x[i,[3,3]]);\nod:\n\n(* 7-stem *)\n\nSetStableGenealogy(sigma,8,[7]):\nSetStableGenealogy(2*sigma,9,[6,1]):\nSetStableGenealogy(4*sigma,9,[5,1,1]):\nSetStableGenealogy(8*sigma,9,[4,1,1,1]):\n\nSetGenealogy(sigmathird,x[5, [4, 1, 1, 1]]):\nSetGenealogy(sigmasecond,x[6, [5, 1, 1]]):\nSetGenealogy(2*sigmasecond,x[6, [4, 1, 1, 1]]):\nSetGenealogy(sigmaprime,x[7, [6, 1]]):\nSetGenealogy(2*sigmaprime,x[7, [5, 1, 1]]):\nSetGenealogy(4*sigmaprime,x[7, [4, 1, 1, 1]]):\nSetGenealogy(E(sigmaprime),x[8, [6, 1]]):\nSetGenealogy(2*E(sigmaprime),x[8, [5, 1, 1]]):\nSetGenealogy(4*E(sigmaprime),x[8, [4, 1, 1, 1]]):\n\n(* 8-stem *)\n\nSetStableGenealogy(epsilon,3,[2,3,3]):\nSetStableGenealogy(nubar,6, [5, 3]):\nSetGenealogy(2*nubar[6],x[6, [5, 2, 1]]):\nSetGenealogy(4*nubar[6],x[6, [5, 1, 1, 1]]):\nSetGenealogy(o(sigmaprime, eta[14]),x[7, [6, 1, 1]]):\nSetGenealogy(o(E(sigmaprime), eta[15]),x[8, [6, 1, 1]]):\nSetGenealogy(o(sigma[8], eta[15]),x[8, [7, 1]]):\nSetGenealogy(o(sigma[9], eta[16]),x[9, [7, 1]]):\n\n(* 9-stem *)\n\nSetStableGenealogy(mu,3,[2,4,1,1,1]):\n\nfor n from 2 to N do \n SetGenealogy(o(eta[n],epsilon[m+1]),x[n,[1,2,3,3]]):\nod:\n\nSetGenealogy(o(nu[4], nu[7], nu[10]),x[4, [3, 3, 3]]):\n\nfor n from 4 to N do \n SetGenealogy(o(nu[n], nu[n+3], nu[n+6]),x[n,[3,3,3]]):\nod:\n\nSetGenealogy(o(sigmaprime, eta[14], eta[15]),x[7, [6, 1, 1, 1]]):\nSetGenealogy(o(E(sigmaprime), eta[15], eta[16]),x[8, [6, 1, 1, 1]]):\nSetGenealogy(o(sigma[8], eta[15], eta[16]),x[8, [7, 1, 1]]):\nSetGenealogy(o(sigma[9], eta[16], eta[17]),x[9, [7, 1, 1]]):\n\n(* 10-stem *)\n\nfor n from 2 to N do\n SetGenealogy(o(eta[n],mu[n+1]),x[n,[1,2,4,1,1,1]]);\nod:\n\nSetGenealogy(o(eta[2], eta[3], epsilon[4]),x[2, [1, 1, 2, 3, 3]]):\nSetGenealogy(epsilonprime,x[3, [2, 2, 3, 3]]):\nSetGenealogy(2*epsilonprime,x[3, [1, 1, 2, 3, 3]]):\nSetGenealogy(E(epsilonprime),x[4, [2, 2, 3, 3]]):\nSetGenealogy(2*E(epsilonprime),x[4, [1, 1, 2, 3, 3]]):\nSetGenealogy(o(nu[4], sigmaprime),x[4, [3, 6, 1]]):\nSetGenealogy(2*o(nu[4], sigmaprime),x[4, [3, 5, 1, 1]]):\nSetGenealogy(4*o(nu[4], sigmaprime),x[4, [3, 4, 1, 1, 1]]):\nSetGenealogy(o(nu[5], sigma[8]),x[5, [4, 3, 3]]):\nSetGenealogy(2*o(nu[5], sigma[8]),x[5, [2, 2, 3, 3]]):\nSetGenealogy(4*o(nu[5], sigma[8]),x[5, [1, 1, 2, 3, 3]]):\nSetGenealogy(o(nu[6], sigma[9]),x[6, [4, 3, 3]]):\nSetGenealogy(2*o(nu[6], sigma[9]),x[6, [2, 2, 3, 3]]):\nSetGenealogy(4*o(nu[6], sigma[9]),x[6, [1, 1, 2, 3, 3]]):\nSetGenealogy(o(nu[7], sigma[10]),x[7, [4, 3, 3]]):\nSetGenealogy(2*o(nu[7], sigma[10]),x[7, [2, 2, 3, 3]]):\nSetGenealogy(4*o(nu[7], sigma[10]),x[7, [1, 1, 2, 3, 3]]):\nSetGenealogy(o(nu[8], sigma[11]),x[8, [4, 3, 3]]):\nSetGenealogy(2*o(nu[8], sigma[11]),x[8, [2, 2, 3, 3]]):\nSetGenealogy(4*o(nu[8], sigma[11]),x[8, [1, 1, 2, 3, 3]]):\nSetGenealogy(o(sigma[8], nu[15]),x[8, [7, 3]]):\nSetGenealogy(2*o(sigma[8], nu[15]),x[8, [7, 2, 1]]):\nSetGenealogy(4*o(sigma[8], nu[15]),x[8, [7, 1, 1, 1]]):\nSetGenealogy(o(sigma[9], nu[16]),x[9, [7, 3]]):\nSetGenealogy(2*o(sigma[9], nu[16]),x[9, [7, 2, 1]]):\nSetGenealogy(4*o(sigma[9], nu[16]),x[9, [7, 1, 1, 1]]):\nSetGenealogy(o(sigma[10], nu[17]),x[10, [7, 3]]):\nSetGenealogy(2*o(sigma[10], nu[17]),x[10, [7, 2, 1]]):\nSetGenealogy(o(sigma[11], nu[18]),x[11, [7, 3]]):\n\n(* 11-stem *)\n\nGenealogyName(o(eta[2], epsilonprime)) :=\n x[2, [1, 2, 2, 3, 3]] + x[2, [1, 1, 1, 2, 3, 3]];\nTodaName(x[2,[1,2,2,3,3]]) := 3*o(eta[2],epsilonprime):\n\nSetGenealogy(2*o(eta[2], epsilonprime),x[2, [1, 1, 1, 2, 3, 3]]):\nSetGenealogy(o(eta[2], eta[3], mu[4]),x[2, [1, 1, 2, 4, 1, 1, 1]]):\nSetGenealogy(muprime,x[3, [2, 2, 4, 1, 1, 1]]):\nSetGenealogy(2*muprime,x[3, [1, 1, 2, 4, 1, 1, 1]]):\nSetGenealogy(o(epsilon[3], nu[11]),x[3, [2, 3, 3, 3]]):\nSetGenealogy(o(nuprime, epsilon[6]),x[3, [2, 1, 2, 3, 3]]):\nSetGenealogy(E(muprime),x[4, [2, 2, 4, 1, 1, 1]]):\nSetGenealogy(2*E(muprime),x[4, [1, 1, 2, 4, 1, 1, 1]]):\nSetGenealogy(o(epsilon[4], nu[12]),x[4, [2, 3, 3, 3]]):\nSetGenealogy(o(E(nuprime), epsilon[7]),x[4, [2, 1, 2, 3, 3]]):\nSetGenealogy(o(nu[4], sigmaprime, eta[14]),x[4, [3, 6, 1, 1]]):\nSetGenealogy(o(nu[4], nubar[7]),x[4, [3, 5, 3]]):\nSetGenealogy(o(nu[4], epsilon[7]),x[4, [3, 2, 3, 3]]):\nSetGenealogy(o(nu[5], nubar[8]),x[5, [3, 5, 3]]):\nSetGenealogy(o(nu[5], epsilon[8]),x[5, [3, 2, 3, 3]]):\nSetGenealogy(o(nubar[6], nu[14]),x[6, [5, 3, 3]]):\nSetGenealogy(2*o(nubar[6], nu[14]),x[6, [3, 2, 3, 3]]):\nSetGenealogy(o(nubar[7], nu[15]),x[7, [5, 3, 3]]):\nSetGenealogy(o(nubar[8], nu[16]),x[8, [5, 3, 3]]):\nSetGenealogy(o(nubar[9], nu[17]),x[9, [5, 3, 3]]):\n\nSetStableGenealogy(zeta,5,[4, 4, 1, 1, 1]):\nSetStableGenealogy(2*zeta,5, [2, 2, 4, 1, 1, 1]):\nSetStableGenealogy(4*zeta,5, [1, 1, 2, 4, 1, 1, 1]):\n\n(* 12-stem *)\n\nGenealogyName(o(eta[2],muprime)) := \n x[2, [1, 2, 2, 4, 1, 1, 1]] + x[2, [1, 1, 1, 2, 4, 1, 1, 1]]:\n\nTodaName(x[2,[1,2,2,4,1,1,1]]) := 3*o(eta[2],muprime):\n\nSetGenealogy(2*o(eta[2],muprime),x[2,[1,1,1,2,4,1,1,1]]):\nSetGenealogy(o(eta[2],epsilon[3],nu[11]),x[2,[1,2,3,3,3]]):\nSetGenealogy(o(eta[2],nuprime,epsilon[6]),x[2,[1,2,1,2,3,3]]):\nSetGenealogy(o(nuprime,mu[6]),x[3,[2,1,2,4,1,1,1]]):\nSetGenealogy(o(nuprime,eta[6],epsilon[7]),x[3,[2,1,1,2,3,3]]):\nSetGenealogy(o(nu[4],sigmaprime,eta[14],eta[15]),x[4,[3,6,1,1,1]]):\nSetGenealogy(o(nu[4],nu[7],nu[10],nu[13]),x[4,[3,3,3,3]]):\nSetGenealogy(o(nu[4],mu[7]),x[4,[3,2,4,1,1,1]]):\nSetGenealogy(o(nu[4],eta[7],epsilon[8]),x[4,[3,1,2,3,3]]):\nSetGenealogy(o(E(nuprime),mu[7]),x[4,[2,1,2,4,1,1,1]]):\nSetGenealogy(o(E(nuprime),eta[7],epsilon[8]),x[4,[2,1,1,2,3,3]]):\nSetGenealogy(o(nu[5],nu[8],nu[11],nu[14]),x[5,[3,3,3,3]]):\nSetGenealogy(o(nu[5],mu[8]),x[5,[3,2,4,1,1,1]]):\nSetGenealogy(o(nu[5],eta[8],epsilon[9]),x[5,[3,1,2,3,3]]):\nSetGenealogy(o(w[6],sigma[11]),x[6,[5,6,1]]):\nSetGenealogy(2*o(w[6],sigma[11]),x[6,[5,5,1,1]]):\nSetGenealogy(4*o(w[6],sigma[11]),x[6,[5,4,1,1,1]]):\nSetGenealogy(8*o(w[6],sigma[11]),x[6,[3,2,4,1,1,1]]):\nSetGenealogy(8*o(w[6], sigma[11]),x[6,[3,2,4,1,1,1]]):\nSetGenealogy(o(w[10], nu[19]),x[10, [9, 2, 1]]):\nSetGenealogy(2*o(w[10], nu[19]),x[10, [9, 1, 1, 1]]):\nSetGenealogy(thetaprime,x[11, [10, 1, 1]]):\nSetGenealogy(theta,x[12, [11, 1]]):\nSetGenealogy(E(thetaprime),x[12, [10, 1, 1]]):\nSetGenealogy(E(theta),x[13, [11, 1]]):\n\n(* 13-stem *)\nSetGenealogy(o(eta[2], nuprime, mu[6]),x[2, [1, 2, 1, 2, 4, 1, 1, 1]]):\nSetGenealogy(o(eta[2], nuprime, eta[6], epsilon[7]),x[2, [1, 2, 1, 1, 2, 3, 3]]):\nSetGenealogy(o(nuprime, eta[6], mu[7]),x[3, [2, 1, 1, 2, 4, 1, 1, 1]]):\nSetGenealogy(o(nu[4], nu[7], sigma[10]),x[4, [3, 4, 3, 3]]):\nSetGenealogy(2*o(nu[4], nu[7], sigma[10]),x[4, [3, 2, 2, 3, 3]]):\nSetGenealogy(4*o(nu[4], nu[7], sigma[10]),x[4, [3, 1, 1, 2, 3, 3]]):\nSetGenealogy(o(nu[4], eta[7], mu[8]),x[4, [3, 1, 2, 4, 1, 1, 1]]):\nSetGenealogy(o(E(nuprime), eta[7], mu[8]),x[4, [2, 1, 1, 2, 4, 1, 1, 1]]):\nSetGenealogy(o(nu[5], sigma[8], nu[15]),x[5, [4, 3, 3, 3]]):\nSetGenealogy(o(nu[5], eta[8], mu[9]),x[5, [3, 1, 2, 4, 1, 1, 1]]):\nSetGenealogy(o(nu[6], sigma[9], nu[16]),x[6, [4, 3, 3, 3]]):\nSetGenealogy(o(nu[7], sigma[10], nu[17]),x[7, [4, 3, 3, 3]]):\nSetGenealogy(o(sigma[8], nu[15], nu[18]),x[8, [7, 3, 3]]):\nSetGenealogy(o(nu[8], sigma[11], nu[18]),x[8, [4, 3, 3, 3]]):\nSetGenealogy(o(sigma[9], nu[16], nu[19]),x[9, [7, 3, 3]]):\nSetGenealogy(o(sigma[10], nu[17], nu[20]),x[10, [7, 3, 3]]):\nSetGenealogy(o(sigma[11], nu[18], nu[21]),x[11, [7, 3, 3]]):\nSetGenealogy(o(thetaprime, eta[23]),x[11, [10, 1, 1, 1]]):\nSetGenealogy(o(theta, eta[24]),x[12, [11, 1, 1]]):\nSetGenealogy(o(E(thetaprime), eta[24]),x[12, [10, 1, 1, 1]]):\nSetGenealogy(o(E(theta), eta[25]),x[13, [11, 1, 1]]):\n\n", "meta": {"hexsha": "f3d03eb4a4080be1dc1a6bc503de9d1e9769e92b", "size": 93811, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/chromatic/Toda.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/chromatic/Toda.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/chromatic/Toda.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 23.517422913, "max_line_length": 289, "alphanum_fraction": 0.5699758024, "num_tokens": 39562, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5621765008857981, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3203577695925053}} {"text": "######################################################################\n#\n# General operad framework.\n\n`check_gamma_args` := proc(A,B,p,U,V,is_el_CC)\n local F,b;\n global reason;\n\n if not type(A,set) then\n reason := [convert(procname,string),\"A is not a set\",A];\n return false;\n fi;\n if not type(B,set) then\n reason := [convert(procname,string),\"B is not a set\",B];\n return false;\n fi;\n\n if not `is_element/maps`(A,B)(p) then\n reason := [convert(procname,string),\"not a map from A to B\",A,B,reason];\n return false;\n fi;\n\n F := fibres(A,B)(p);\n\n if not is_el_CC(B)(U) then\n reason := [convert(procname,string),\"U is not in C(B)\",eval(U),B];\n return false;\n fi;\n\n if not type(V,table) then\n reason := [convert(procname,string),\"V is not a table\",eval(V)];\n return false;\n fi;\n\n if map(op,{indices(V)}) <> B then\n reason := [convert(procname,string),\"V is not indexed by B\",eval(V),B];\n return false;\n fi;\n\n for b in B do\n if not is_el_CC(F[b])(V[b]) then\n reason := [convert(procname,string),\"V[b] is not in C(F[b])\",b,eval(V[b]),eval(F[b])];\n return false;\n fi;\n od;\n\n return true;\nend;\n\n######################################################################\n\n`check_gamma_axiom` := proc(A,B,C,p,q,U,V,W,is_el_CC,is_equal_CC,gamma_CC)\n# local a,b,c,qp,Fp,Fq,Fqp,UV,VW,UVW0,UVW1,W0,p0;\n# global reason,check_gamma_axiom_args;\n local a,b,c,qp,Fp,Fq,Fqp,UV,VW,W0,p0;\n global UVW0,UVW1,reason,check_gamma_axiom_args;\n\n check_gamma_axiom_args := [args];\n\n if not type(A,set) then\n reason := [convert(procname,string),\"A is not a set\",eval(A)];\n return false;\n fi;\n if not type(B,set) then\n reason := [convert(procname,string),\"B is not a set\",eval(B)];\n return false;\n fi;\n if not type(C,set) then\n reason := [convert(procname,string),\"C is not a set\",eval(C)];\n return false;\n fi;\n\n if not `is_element/maps`(A,B)(p) then\n reason := [convert(procname,string),\"p is not a map from A to B\",eval(p),A,B,reason];\n return false;\n fi;\n\n if not `is_element/maps`(B,C)(q) then\n reason := [convert(procname,string),\"q is not a map from B to C\",eval(q),B,C,reason];\n return false;\n fi;\n\n qp := `compose/maps`(A,B,C)(p,q);\n\n Fp := fibres(A,B)(p);\n Fq := fibres(B,C)(q);\n Fqp := fibres(A,C)(qp);\n\n if not is_el_CC(C)(U) then\n reason := [convert(procname,string),\"U is not in O(C)\",eval(U),C];\n return false;\n fi;\n\n if not type(V,table) then\n reason := [convert(procname,string),\"V is not a table\",eval(V)];\n return false;\n fi;\n\n if map(op,{indices(V)}) <> C then\n reason := [convert(procname,string),\"V is not indexed by C\",eval(V),C];\n return false;\n fi;\n\n for c in C do\n if not is_el_CC(Fq[c])(V[c]) then\n reason := [convert(procname,string),\"V[c] is not in O(Fq[c])\",c,eval(V[c]),eval(Fq[c])];\n return false;\n fi;\n od;\n\n if not type(W,table) then\n reason := [convert(procname,string),\"W is not a table\",eval(W)];\n return false;\n fi;\n\n if map(op,{indices(W)}) <> B then\n reason := [convert(procname,string),\"W is not indexed by B\",eval(W),B];\n return false;\n fi;\n\n for b in B do\n if not is_el_CC(Fp[b])(W[b]) then\n reason := [convert(procname,string),\"W[b] is not in O(Fp[b])\",b,eval(W[b]),eval(Fp[b])];\n return false;\n fi;\n od;\n\n UV := gamma_CC(B,C)(q)(U,V);\n if not is_el_CC(B)(UV) then\n reason := [convert(procname,string),\"UV is not in O(B)\",eval(UV),B,C,eval(q),eval(U),eval(V)];\n return false;\n fi;\n\n if not `check_gamma_args`(A,B,p,UV,W,is_el_CC) then\n reason := [convert(procname,string),\"invalid arguments to gamma 1\",reason];\n return false;\n fi;\n\n UVW0 := gamma_CC(A,B)(p)(UV,W);\n if not is_el_CC(A)(UVW0) then\n reason := [convert(procname,string),\"UVW0 is not in C(A)\",eval(UVW0),A];\n return false;\n fi;\n\n VW := table();\n for c in C do\n W0 := table();\n p0 := table();\n for b in Fq[c] do W0[b] := W[b]; od;\n for a in Fqp[c] do p0[a] := p[a]; od;\n if not `check_gamma_args`(Fqp[c],Fq[c],p0,V[c],W0,is_el_CC) then\n reason := [convert(procname,string),\"invalid arguments to gamma 2\",reason];\n return false;\n fi;\n VW[c] := gamma_CC(Fqp[c],Fq[c])(p0)(V[c],W0);\n od;\n\n if not `check_gamma_args`(A,C,qp,U,VW,is_el_CC) then\n reason := [convert(procname,string),\"invalid arguments to gamma 3\",reason];\n return false;\n fi;\n\n UVW1 := gamma_CC(A,C)(qp)(U,VW);\n if not is_el_CC(A)(UVW1) then\n reason := [convert(procname,string),\"UVW1 is not in C(A)\",eval(UVW1),A];\n return false;\n fi;\n\n if not is_equal_CC(A)(UVW0,UVW1) then\n reason := [convert(procname,string),\"UVW0 != UVW1\",eval(UVW0),eval(UVW1)];\n return false;\n fi;\n\n return true;\nend;\n\n######################################################################\n\ncheck_operad_morphism_axiom :=\n proc(A,B,p,U,V,\n is_el_CC,is_equal_CC,gamma_CC,\n is_el_DD,is_equal_DD,gamma_DD,\n phi)\n\n local b,Fp,UV,U1,V1,UV1,UV2;\n\n global reason,check_operad_morphism_axiom_args;\n\n check_operad_morphism_axiom_args := [args];\n\n if not type(A,set) then\n reason := [convert(procname,string),\"A is not a set\",eval(A)];\n return false;\n fi;\n\n if not type(B,set) then\n reason := [convert(procname,string),\"B is not a set\",eval(B)];\n return false;\n fi;\n\n if not `is_element/maps`(A,B)(p) then\n reason := [convert(procname,string),\"p is not a map from A to B\",eval(p),A,B,reason];\n return false;\n fi;\n\n Fp := fibres(A,B)(p);\n\n if not is_el_CC(B)(U) then\n reason := [convert(procname,string),\"U is not in C(B)\",eval(U),B];\n return false;\n fi;\n\n if not type(V,table) then\n reason := [convert(procname,string),\"V is not a table\",eval(V)];\n return false;\n fi;\n\n if map(op,{indices(V)}) <> B then\n reason := [convert(procname,string),\"V is not indexed by B\",eval(V),B];\n return false;\n fi;\n\n for b in B do\n if not is_el_CC(Fp[b])(V[b]) then\n reason := [convert(procname,string),\"V[b] is not in C(Fp[b])\",b,eval(V[b]),eval(Fp[b])];\n return false;\n fi;\n od;\n\n UV := gamma_CC(A,B)(p)(U,V);\n if not is_el_CC(A)(UV) then\n reason := [convert(procname,string),\"UV is not in C(A)\",eval(UV),A,B,eval(p),eval(U),eval(V)];\n return false;\n fi;\n\n U1 := phi(B)(U);\n if not is_el_DD(B)(U1) then\n reason := [convert(procname,string),\"phi(U) is not in D(B)\",eval(U1),B];\n return false;\n fi;\n\n V1 := table();\n for b in B do\n V1[b] := phi(Fp[b])(V[b]);\n if not is_el_DD(Fp[b])(V1[b]) then\n reason := [convert(procname,string),\"phi(V[b]) is not in D(Fp[b])\",eval(V1),b,eval(Fp[b])];\n return false;\n fi;\n od;\n\n UV1 := gamma_DD(A,B)(p)(U1,V1);\n if not is_el_DD(A)(UV1) then\n reason := [convert(procname,string),\"UV1 is not in D(A)\",eval(UV1),A];\n return false;\n fi;\n\n UV2 := phi(A)(UV);\n if not is_el_DD(A)(UV1) then\n reason := [convert(procname,string),\"phi(UV) is not in D(A)\",eval(UV2),A];\n return false;\n fi;\n\n if not(is_equal_DD(A)(UV1,UV2)) then\n reason := [convert(procname,string),\"UV1 != UV2\",eval(UV1),eval(UV2)];\n return false;\n fi;\n\n return true;\nend:\n\ncheck_operad_morphism_axiom_globalise := proc()\n global check_operad_morphism_axiom_args,\n A,B,p,U,V,\n is_el_CC,is_equal_CC,gamma_CC,\n is_el_DD,is_equal_DD,gamma_DD,\n phi;\n local ARGS;\n ARGS := check_operad_morphism_axiom_args;\n \n A := eval(ARGS[ 1]);\n B\t\t := eval(ARGS[ 2]);\n p\t\t := eval(ARGS[ 3]);\n U\t\t := eval(ARGS[ 4]);\n V\t\t := eval(ARGS[ 5]);\n is_el_CC\t := eval(ARGS[ 6]);\n is_equal_CC\t := eval(ARGS[ 7]);\n gamma_CC\t := eval(ARGS[ 8]);\n is_el_DD\t := eval(ARGS[ 9]);\n is_equal_DD\t := eval(ARGS[10]);\n gamma_DD\t := eval(ARGS[11]);\n phi \t\t := eval(ARGS[12]);\n NULL;\nend:\n\n######################################################################\n\n# An operad E consists of sets E(A) for each finite set A, functorial\n# for bijections of A. We have formulated the definitions in such a\n# way that this functoriality is determined by the rest of the\n# structure. The code here implements this.\n\n`action/operad` := (gen_name,eta,gamma) -> (A::set,B::set) -> (f) -> proc(x)\n local f_inv,e,a;\n\n f_inv := table();\n e := table();\n for a in A do\n f_inv[f[a]] := a;\n e[a] := eta({f[a]});\n od;\n return gamma(B,A)(f_inv)(x,e);\nend;\n\n######################################################################\n\nextend_gamma_linear := (g0) -> (A::set,B::set) -> (p) -> proc(y,x)\n local c,y1,F,BL,M,b,t,z,m,mt,u,i;\n \n if y = 0 then\n return 0;\n elif type(y,`+`) then\n return map(t -> extend_gamma_linear(g0)(A,B)(p)(t,x),y);\n fi;\n\n if type(y,`*`) then\n c,y1 := selectremove(type,y,integer);\n else\n c := 1;\n y1 := y;\n fi;\n\n F := fibres(A,B)(p);\n\n BL := sort([op(B)]);\n M := [[1]];\n for b in BL do\n t := map(coeff_split,sum_terms(x[b]));\n M := [seq(seq([m[1] * u[1],seq(m[i],i=2..nops(m)),u[2]],u in t),m in M)];\n od:\n\n z := 0;\n\n for m in M do\n mt := table([seq(BL[i]=m[i+1],i=1..nops(BL))]);\n z := z + c * m[1] * g0(A,B)(p)(y1,mt);\n od;\n\n return z;\n\nend;", "meta": {"hexsha": "1dbf7f8ca4ba43253f36678e22bb41d147465db5", "size": 8657, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/operads/general.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/operads/general.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/operads/general.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 24.7342857143, "max_line_length": 96, "alphanum_fraction": 0.5955873859, "num_tokens": 2797, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5660185498374789, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3116539825700914}}