/
qetasymb.spad
652 lines (575 loc) · 25.7 KB
/
qetasymb.spad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
-------------------------------------------------------------------
---
--- FriCAS QEta
--- Copyright (C) 2018-2022 Ralf Hemmecke <ralf@hemmecke.org>
---
-------------------------------------------------------------------
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-------------------------------------------------------------------
OF==>OutputForm
display77(x) ==> display((x::OF)::Formatter(Format1D))
yof x ==> x :: Symbol :: OF
dbgPrint(x,y) ==> display77([yof ":> ", yof x, y::OF]$List(OF))
tracePrint(x,y) ==> display77(hconcat([yof"-- ",yof x,yof":=",y::OF]$List(OF)))
)if LiterateDoc
\documentclass{article}
\usepackage{qeta}
\externaldocument{qeta}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\title{Metadata for dissected (generalized) Dedekind Eta Functions
under Transformation}
\author{Ralf Hemmecke}
\date{26-Jan-2018}
\maketitle
\begin{abstract}
The domains in this file collect all the (meta) data that is needed
to compute the actual Puiseux series expansion of the object in
question, but do not itself hold the series expansion. They are
\begin{itemize}
\item \qetatype{SymbolicEtaGamma},
\item \qetatype{SymbolicEtaQuotientLambdaGamma},
\item \qetatype{SymbolicEtaQuotientGamma}.
\end{itemize}
\end{abstract}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tableofcontents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Implementation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Helper macros}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Let us start with a few common macros.
These two technical macros are necessary to distinguish between Rep
and \%.
)endif
rep x ==> (x@%) pretend Rep
per x ==> (x@Rep) pretend %
)if LiterateDoc
Now some abbreviations for common domains.
)endif
PP ==> PositiveInteger
NN ==> NonNegativeInteger
ZZ ==> Integer
QQ ==> Fraction ZZ
MZZ ==> Matrix ZZ -- consider only 2x2 matricies
SL2Z ==> MZZ -- matrices with determinant = 1
VZZ ==> Vector ZZ
LZZ ==> List ZZ
LLZZ ==> List LZZ
LSL2Z ==> List SL2Z
QETAAUX ==> QEtaAuxiliaryPackage
SPEC ==> QEtaSpecification
asPP x ==> x pretend PP
)if LiterateDoc
%$
In fact, we have two types of domains, namely,
\begin{enumerate}
\item domains that just collect/precompute certain data, and
\item domains that actually compute a series expansion.
\end{enumerate}
Domains in the first category are marked with the prefix
\code{Symbolic}.
%
These \emph{Symbolic} domains actually only serve the purpose to
compute an upper bound for $k$ so that the the series expansions all
live in $\setQ[\xi][x]$ where $\xi=\exp\bigl(\frac{2\pi i}{k}\bigr)$
is a $k$-th primitive root of unity and $x$ is a fractional power of
$q$.
Domains in the second category are implemented in the file
\PathName{qetaquot.spad}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{D SymbolicEtaGamma $\eta_{\delta,m,\lambda}(\gamma\tau)$ and
$\eta_{\delta,g,m,\lambda}^{[R]}(\gamma\tau)$}
\label{sec:SymbolicEtaGamma}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The domain \code{SymbolicEtaGamma} implements functions to compute
data for $\eta_{\delta,m,\lambda}(\gamma\tau)$ (formula
\eqref{eq:eta_delta-m-lambda(gamma*tau)-YEG}) and
$\eta_{\delta,g,m,\lambda}^{[R]}(\gamma\tau)$ (formula
\eqref{eq:eta_delta-g-m-lambda^[R](gamma*tau)-YEG}).
For $0 < m, \delta \in \setN$,
$g \in \Set{-1, 1, 2, \ldots, \lceil \delta/2 \rceil -1}$,
$\lambda \in \Set{0,\ldots,m-1}$,
$\gamma=\left(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\right) \in
\SL2Z$, elements from the domain \code{SymbolicEtaGamma} represent the
tuple
\begin{gather*}
\left(
\delta,
g,
m,
\lambda,
\gamma,
\gamma_{\delta,m,\lambda},
u_{\delta,m,\lambda},
v_{\delta,m,\lambda},
\frac{h_{\delta,m,\lambda}}{\delta},
u_{\delta,g,m,\lambda,\gamma},
v_{\delta,g,m,\lambda,\gamma},
\chi_{\delta,g}
\right)
\end{gather*}
where the respective values are given in \PathName{qeta.tex}
and thus corresponds to the data from
\eqref{eq:eta_delta-m-lambda(gamma*tau)}, and
\eqref{eq:eta_delta-g-m-lambda^[R](gamma*tau)} \ie, it computes the
building blocks for $\eta_{\delta,m,\lambda}(\gamma\tau)$ and
$\eta_{\delta,g,m,\lambda}^{[R]}(\gamma\tau)$. We have
$\gamma_1=\gamma_{\delta,m,\lambda}$ and $\gamma=\gamma_1\gamma_2$.
Note that if \code{y=eta(delta,g,m,lambda,gamma)}, then
$v_{\delta,g,m,\lambda,\gamma}$=\code{unityExponent(y)} and
$u_{\delta,g,m,\lambda,\gamma}$=\code{qExponent(y)}.
See Section~\ref{sec:eta-i-m-lambda}.
)endif
)abbrev domain YEG SymbolicEtaGamma
++ SymbolicEtaGamma collects data for the expansion of
++ $\eta_{\delta,m,\lambda}(\gamma\tau)$ and
++ $\eta_{\delta,g,m,\lambda}^{[R]}(\gamma\tau)$. See
++ \eqref{eq:eta_delta-m-lambda(gamma*tau)-YEG} and
++ \eqref{eq:eta_delta-g-m-lambda^[R](gamma*tau)-YEG}.
SymbolicEtaGamma: SetCategory with
eta: (PP, ZZ, PP, NN, SL2Z) -> %
++ eta(delta,g,m,lambda,gamma) represents the meta-data for the
++ expansion of $\eta_{\delta,m,\lambda}}(\gamma \tau)$ and
++ $\eta_{\delta,g,m,\lambda}^{[R]}(\gamma \tau)$ in terms of
++ $q=\exp(2i \pi \tau)$. We require that c>0 in
++ gamma=matrix[[a,b],[c,d]]. Data for a pure eta-quotient can
++ be created setting g=-1.
delta: % -> PP
++ If x=eta(delta,g,m,lambda,gamma) then delta(x) returns delta.
subindex: % -> ZZ
++ If x=eta(delta,g,m,lambda,gamma) then subindex(x) returns g.
multiplier: % -> PP
++ If x=eta(delta,g,m,lambda,gamma) then multiplier(x) returns m.
lambda: % -> NN
++ If x=eta(delta,g,m,lambda,gamma) then lambda(x) returns lambda.
transformationMatrix: % -> SL2Z
++ If x=eta(delta,g,m,lambda,gamma) then transformationMatrix(x)
++ returns gamma.
gamma1: % -> SL2Z
++ If x=eta(delta,g,m,lambda,gamma) then gamma1(x) returns the
++ SL2Z part of splitMatrix(gamma,delta,m,lambda).
rationalPrefactor: % -> QQ -- (h_delta/delta)
++ rationalPrefactor(x) returns the square of the second product
++ in \eqref{eq:eta_delta-m-lambda(gamma*tau)} if pure?(x).
++ See \ref{eq:rho_delta-g-m-lambda}.
++ If not pure?(x) then rationalPrefactor(x)=1.
qExponent: % -> QQ
++ qExponent(x) returns the (fractional) exponent
++ $u_{\delta,g,m,\lambda,\gamma}$ for the order of the
++ expansion of x in the original variable q, see
++ \eqref{eq:u_delta-g-m-lambda-gamma}.
unityExponent: % -> QQ
++ unityExponent(x) returns the fractional part of the exponent
++ $v_{\delta,g,m,\lambda,\gamma}$ for the unity factor of the
++ expansion of x, see \eqref{eq:v_delta-g-m-lambda-gamma}.
udelta: % -> QQ
++ Returns $u_{\delta,m,\lambda}$.
++ See \eqref{eq:uv_delta}
vdelta: % -> QQ
++ Returns $v_{\delta,m,\lambda}$.
++ See \eqref{eq:uv_delta}.
cdExponent: % -> QQ
++ If pure?(x) cdExponent(x)=1/2, otherwise cdExponent(x)=0. The
++ return value corresponds to the exponent of the (c*\tau+d)
++ factor. See \eqref{eq:chi_delta-g}.
pure?: % -> Boolean
++ pure?(x) returns true if x corresponds to a pure eta function.
minimalRootOfUnityWithoutPrefactors: % -> PP
++ minimalRootOfUnityWithoutPrefactos(x) returns the smallest
++ positive integer n such that the expansion of the function
++ $\eta_{\delta,m,\lambda}(\gamma \tau)$ or
++ $\eta_{\delta,g,m,\lambda}^{[R]}(\gamma \tau)$ corresponding
++ to x=eta(delta,g,m,lambda,gamma) (neglecting the (c*\tau+d)
++ factor, the square root of the rational prefactor
++ (rationalPrefactor(x), and the denominator of
++ v_{\delta,g,m,\lambda,\gamma} from
++ \eqref{v_delta-g-m-lambda-gamma}, i.e. unityExponent(x))
++ lives in Q[w][[z]] where w is an n-th root of unity and z a
++ fractional q power.
minimalRootOfUnity: % -> PP
++ minimalRootOfUnity(x) returns the smallest positive integer n
++ such that the expansion of the function
++ $\eta_{\delta,m,\lambda}(\gamma \tau)$ or
++ $\eta_{\delta,g,m,\lambda}^{[R]}(\gamma \tau)$ corresponding
++ to x=eta(delta,g,m,lambda,gamma) (neglecting the (c*\tau+d)
++ factor) lives in Q[w][[z]] where w is an n-th root of unity
++ and z a fractional q power.
== add
Rec ==> Record(red: SL2Z, triang: MZZ)
Rep ==> Record(
fdelta: PP,
fsubindex: ZZ, -- g
fmultiplier: PP,-- m
flambda: NN,
fgamma: SL2Z,
fgamma1: SL2Z, -- \gamma_{\delta,m,\lambda}
fudelta: QQ, -- udelta = hdelta^2/(delta*m)
-- \eqref{eq:uv_delta-m-lambda}}
fvdelta: QQ, -- b2/d2, reduced form of roots of unity
-- 0<=b2<d2, 0<d2
frat: QQ, -- square of rational prefactor
fqExponent: QQ,
funityExponent: QQ,
fcdExponent: QQ -- exponent of the (c \tau + d) factor
)
import from Rep
xx ==> rep x
yy ==> rep y
eta(delta: PP, g: ZZ, m: PP, lambda: NN, gamma: SL2Z): % ==
determinant gamma ~= 1 => error "SymbolicEtaGamma: gamma not in SL2Z"
zero? g => error "SymbolicEtaGamma: g=0 is not allowed"
lambda >= m => error "SymbolicEtaGamma: only lambda < m allowed"
-- Make sure gamma(2,1) >= 0. Corresponds to the same transformation.
if gamma(2,1) < 0 then gamma := -gamma
rec: Rec := splitMatrix(gamma, delta, m, lambda)$QETAAUX
gamma1: SL2Z := rec.red
gamma2: MZZ := rec.triang
a2: ZZ := gamma2(1, 1); b2: ZZ := gamma2(1, 2); d2: ZZ := gamma2(2, 2)
udelta: QQ := a2/d2 -- = hdelta^2/delta/m
vdelta: QQ := b2/d2
if g = -1 then -- pure eta case
rat: QQ := a2/delta -- = hdelta/delta
kappa: QQ := (upsilonExponent(gamma1)$QETAAUX)::QQ
qexponent: QQ := 1/24 * udelta
uexponent: QQ := 1/24 * (vdelta + kappa)
cdexponent: QQ := 1/2
else -- proper generalized eta
rat: QQ := 1
kappa: QQ := kappaSchoeneberg(delta, g, 0, gamma1)$QETAAUX
gd: QQ := gamma1(1,1)*g/delta -- $a' g / delta$
hd: QQ := gamma1(1,2)*g/delta -- $b' g / delta$
p2: QQ := (1/2)*fractionalBernoulli2(gd)
alpha := alphaSchoenebergContribution(gd, hd)$QETAAUX
uexponent: QQ := fractionalPart(kappa + vdelta * p2 + alpha)
qexponent: QQ := udelta * p2
cdexponent: QQ := 0
per [delta, g, m, lambda, gamma,_
gamma1, udelta, vdelta, rat, qexponent, uexponent, cdexponent]
delta(x: %): PP == xx.fdelta
subindex(x: %): ZZ == xx.fsubindex
multiplier(x: %): PP == xx.fmultiplier
lambda(x: %): NN == xx.flambda
transformationMatrix(x: %): SL2Z == xx.fgamma
gamma1(x: %): SL2Z == xx.fgamma1
udelta(x: %): QQ == xx.fudelta
vdelta(x: %): QQ == xx.fvdelta
rationalPrefactor(x: %): QQ == xx.frat
qExponent(x: %): QQ == xx.fqExponent
unityExponent(x: %): QQ == xx.funityExponent
cdExponent(x: %): QQ == xx.fcdExponent
pure?(x: %): Boolean == subindex x = -1
coerce(x: %): OutputForm == rep(x)::OutputForm
hashUpdate!(h: HashState, x: %): HashState ==
h := hashUpdate!(h, delta x)
h := hashUpdate!(h, subindex x)
h := hashUpdate!(h, multiplier x)
h := hashUpdate!(h, lambda x)
h := hashUpdate!(h, transformationMatrix x)
h
((x: %) = (y: %)): Boolean ==
delta x ~= delta y => false
subindex x ~= subindex y => false
multiplier x ~= multiplier y => false
lambda x ~= lambda y => false
transformationMatrix x = transformationMatrix y
minimalRootOfUnityWithoutPrefactors(x: %): PP ==
minroot := denom vdelta x -- contribution of q_{\delta,m,\lambda}
d: PP := delta x
g: ZZ := subindex x
g = -1 => asPP minroot -- \eqref{eq:eta_delta-m-lambda(gamma*tau)}
-- generalized case: \eqref{eq:eta_delta-g-m-lambda^[R](gamma*tau)}
g1 := gamma1 x
gd: QQ := fractionalPart(g1(1,1)*g/d)$QETAAUX -- note that h=0
hd: QQ := fractionalPart(g1(1,2)*g/d)$QETAAUX
-- see \eqref{eq:Jacobi-a-b-q}, a=gd, b=hd
minroot := lcm(minroot, denom hd) -- contrib of \unityPower(b)
if one? denom gd and not one? denom hd then
-- contribution of q_{\delta,m,\lambda}^a
minroot := lcm(minroot, denom(vdelta(x) * fractionalPart(gd)))
asPP minroot
minimalRootOfUnity(x: %): PP ==
minroot: ZZ := minimalRootOfUnityWithoutPrefactors x
minroot := lcm(minroot, denom unityExponent x)
g: ZZ := subindex x
g > 0 => asPP minroot
-- here g = -1 -- \eqref{eq:eta_delta-m-lambda(gamma*tau)}
rat := rationalPrefactor x
import from MinimalSquareRoot
asPP lcm(minroot, minimalRootOfUnityForSquareRootOf rat)
)if LiterateDoc
%$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{D SymbolicEtaQuotientLambdaGamma
$g_{\bar{r},m,\lambda}(\gamma \tau)$}
\label{sec:SymbolicEtaQuotientLambdaGamma}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This domain represents data for $g_{r,m,\lambda}(\gamma\tau)$, see
formula \eqref{eq:g_r-m-lambda(gamma*tau)}.
)endif
-------------------------------------------------------------------
)abbrev domain YEQLG SymbolicEtaQuotientLambdaGamma
++ SymbolicEtaQuotientLambdaGamma holds data to compute an eta
++ quotient expansion of $g_{r,m,\lambda}(\gamma \tau)$.
++ See \eqref{eq:g_r-m-lambda(gamma*tau)}.
SymbolicEtaQuotientLambdaGamma: SetCategory with
etaQuotient: (SPEC, PP, NN, SL2Z) -> %
++ etaQuotient(rspec,m,lambda,gamma) represents the expansion
++ of $g_{r,m,\lambda}(\gamma \tau)$ in terms of
++ $q=\exp(2i \pi \tau)$ and gamma=matrix[[a,b],[c,d]] represents
++ the cusp a/c. $r$ is given by rspec.
definingSpecification: % -> SPEC
++ If x=etaQuotient(rspec,m,lambda,gamma)), then
++ definingSpecification(x) returns purify(rspec).
multiplier: % -> PP
++ If x=etaQuotient(rspec,m,lambda,gamma)), then
++ multiplier(x) returns the m.
lambda: % -> NN
++ If x=etaQuotient(rspec,m,lambda,gamma)), then
++ lambda(x) returns lambda.
transformationMatrix: % -> SL2Z
++ If x=etaQuotient(rspec,m,lambda,gamma)), then
++ transformationMatrix(x) returns gamma.
rationalPrefactor: % -> QQ
++ If x=etaQuotient(rspec,m,lambda,gamma)), then
++ rationalPrefactor(x) returns the square of the third product
++ in \eqref{eq:g_r-m-lambda(gamma*tau)}, see
++ \eqref{eq:g_r-m-lambda(gamma*tau)-rationalPrefactor}. That is
++ the product of rationalPrefactor(y[d,-1])^e for [d,-1,e] in
++ pureParts(rspec).
unityExponent: % -> QQ
++ If x=etaQuotient(rspec,m,lambda,gamma)), then
++ unityExponent(x) returns the second product in
++ \eqref{eq:g_r-m-lambda(gamma*tau)}, i.e. it returns
++ \eqref{eq:g_r-m-lambda(gamma*tau)-unityExponent}. That is the
++ fractionalPart of the sum of unityExponent(y[d,g])*e for
++ [d,g,e] in parts(rspec).
qExponent: % -> QQ
++ qExponent(e) returns the order of the expansion of e in
++ $q=\exp(2i \pi \tau)$ while neglecting the (c*\tau+d) factor. It
++ corresponds to the exponent of the fourth product of
++ \eqref{eq:g_r-m-lambda(gamma*tau)}, i.e. it returns
++ \eqref{eq:g_r-m-lambda(gamma*tau)-qExponent}.
cdExponent: % -> QQ
++ cdExponent(x) returns the sum over all rd*cdExponent(f) where
++ f runs over all parts of definingSpecification(x) and rd is
++ the corresponding exponent of the eta-function specification,
++ i.e. it returns \eqref{eq:g_r-m-lambda(gamma*tau)-cdExponent}
elt: (%, LZZ) -> SymbolicEtaGamma
++ elt(x, [delta.g]) returns the data corresponding to the
++ respective (delta, g) pair. Note that the pure eta-functions
++ are indexed via (delta, -1).
minimalRootOfUnityWithoutUnityExponent: % -> PP
++ minimalRootOfUnity(x) returns the smallest positive integer n
++ such that the expansion of the function
++ $g_{r,m,\lambda}(\gamma \tau)$ corresponding to
++ x=etaQuotient(rspec,m,lambda,gamma) (neglecting the
++ (c*\tau+d) factor and the denominator $v_{m,\lambda,\gamma}$,
++ i.e. unityExponent(x)) lives in Q[w][[z]] where w is an n-th
++ root of unity and z a fractional q power.
minimalRootOfUnity: % -> PP
++ minimalRootOfUnity(x) returns the smallest positive integer n
++ such that the expansion of the function
++ $g_{r,m,\lambda}(\gamma \tau)$ corresponding to
++ x=etaQuotient(rspec,m,lambda,gamma) (neglecting the
++ (c*\tau+d) factor) lives in Q[w][[z]] where w is an n-th root
++ of unity and z a fractional q power.
== add
HT ==> XHashTable(VZZ, SymbolicEtaGamma)
-- mapping delta to \eta_{\delta,m,\lambda}
Rep ==> Record(
fspec: SPEC, -- the defining specification of the eta-quotient
fmultiplier: PP,-- the multiplier m
flambda: NN, -- lambda \in 0..(m-1)
fgamma: SL2Z, -- gamma
frat: QQ, -- square of rational prefactor
funityExponent: QQ,
fqExponent: QQ,
fcdExponent: QQ,
feta: HT -- mapping (delta,g) to \eta_{\delta,g,m,lambda}
)
import from Rep
xx ==> rep x
yy ==> rep y
etaQuotient(spec: SPEC, m: PP, lambda: NN, gamma: SL2Z): % ==
spec := purify spec
determinant gamma ~= 1 =>
error "SymbolicEtaQuotientLambdaGamma: gamma not in SL2Z"
lambda >= m =>
error "SymbolicEtaQuotientLambdaGamma: only lambda < m allowed"
-- Make sure gamma(2,1) >= 0. Corresponds to the same transformation.
if gamma(2,1) < 0 then gamma := -gamma
h: HT := empty()
mm: PP := level spec
rat: QQ := 1
uexponent: QQ := 0 -- unityExponent
qexponent: QQ := 0
cdexponent: QQ := 0
for l in parts spec repeat
delta: PP := specDelta l
g: ZZ := specSubindex l
e: ZZ := specExponent l
ed := eta(delta, g, m, lambda, gamma)$SymbolicEtaGamma
h(vector [delta, g]) := ed
rat := rat * rationalPrefactor(ed)^e
qexponent := qexponent + e * qExponent(ed)
uexponent := uexponent + e * unityExponent(ed)
cdexponent := cdexponent + e * cdExponent(ed)
-- Now make the numerator small.
uexponent: QQ := fractionalPart(uexponent)$QETAAUX
per [spec, m, lambda, gamma, rat, uexponent, qexponent, cdexponent, h]
definingSpecification(x: %): SPEC == xx.fspec
elt(x: %, idx: LZZ): SymbolicEtaGamma == (xx.feta)(vector idx)
multiplier(x: %): PP == xx.fmultiplier
lambda(x: %): NN == xx.flambda
transformationMatrix(x: %): SL2Z == xx.fgamma
rationalPrefactor(x: %): QQ == xx.frat
unityExponent(x: %): QQ == xx.funityExponent
qExponent(x: %): QQ == xx.fqExponent
cdExponent(x: %): QQ == xx.fcdExponent
minimalRootOfUnityWithoutUnityExponent(x: %): PP ==
import from MinimalSquareRoot
minroot: ZZ := minimalRootOfUnityForSquareRootOf rationalPrefactor x
h: HT := xx.feta
for y in entries h repeat
minroot := lcm(minroot, minimalRootOfUnityWithoutPrefactors y)
asPP minroot
minimalRootOfUnity(x: %): PP ==
minroot := minimalRootOfUnityWithoutUnityExponent x
asPP lcm(minroot, denom unityExponent x)
coerce(x: %): OutputForm == rep(x)::OutputForm
hashUpdate!(h: HashState, x: %): HashState ==
h := hashUpdate!(h, xx.fspec)
h := hashUpdate!(h, xx.fmultiplier)
h := hashUpdate!(h, xx.flambda)
h := hashUpdate!(h, xx.fgamma)
h
((x: %) = (y: %)): Boolean ==
xx.fspec ~= yy.fspec => false
xx.fmultiplier ~= yy.fmultiplier => false
xx.flambda ~= yy.flambda => false
xx.fgamma = yy.fgamma
)if LiterateDoc
%$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{D SymbolicEtaQuotientGamma $p_{r,m,k}(\gamma\tau)$}
\label{sec:SymbolicEtaQuotientGamma}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This domain represents data for $p_{r,m,k}(\gamma\tau)$, see formula
\eqref{eq:p_r-m-k(gamma*tau)}.
)endif
-------------------------------------------------------------------
)abbrev domain YEQG SymbolicEtaQuotientGamma
++ SymbolicEtaQuotientGamma holds data to compute an eta quotient
++ expansion of $p_{r,m,k}(\gamma \tau)$. See
++ \eqref{eq:p_r-m-k(gamma*tau)}.
SymbolicEtaQuotientGamma: SetCategory with
etaQuotient: (SPEC, PP, NN, SL2Z) -> %
++ etaQuotient(rspec,m,k,gamma) represents the expansion of
++ $p_{r,m,k}(\gamma \tau)$ where $r$ is given by rspec.
etaQuotient: (SPEC, SL2Z) -> %
++ etaQuotient(rspec,gamma) returns
++ etaQuotient(rspec,1,0,gamma).
definingSpecification: % -> SPEC
++ If x=etaQuotient(spec,m,k,gamma), then definingSpecification(x)
++ returns purify(spec).
multiplier: % -> PP
++ If x=etaQuotient(spec,m,k,gamma), then multiplier(x)
++ returns m.
offset: % -> NN
++ If x=etaQuotient(spec,m,k,gamma), then offset(x)
++ returns k.
++ offset(x) returns the subsequence offset.
transformationMatrix: % -> SL2Z
++ If x=etaQuotient(spec,m,k,gamma), then
++ transformationMatrix(x) returns gamma.
unityExponent: % -> QQ
++ If x=etaQuotient(spec,m,k,gamma), then
++ unityExponent(x) returns the fractional part of
++ -(k+\rho_\infinity(r))/m.
minimalRootOfUnity: % -> PP
++ minimalRootOfUnity(x) returns the smallest positive integer n
++ such that the expansion of the function
++ $p_{r,m,k}(\gamma \tau)$ corresponding to
++ x=etaQuotient(spec,m,k,gamma) (neglecting the
++ (c*\tau+d) factor) lives in Q[w][[z]] where w is an n-th
++ root of unity and z a fractional q power.
++ See \eqref{p_r-m-k(gamma*tau)}.
elt: (%, NN) -> SymbolicEtaQuotientLambdaGamma
++ x.lambda returns the data corresponding to the respective
++ lambda.
one?: % -> Boolean
++ one?(x) returns true if the eta-quotient corresponding to x
++ represents 1. This is the case if one?(specification(x)),
++ i.e., if the representation is trivial.
qExponentMin: % -> QQ
++ qExponentMin(x) returns the order of the q-expansion in terms
++ of the original q. Note that this exponent is only a lower
++ bound for the q-expansion. The coefficient corresponding to
++ this q-power may be zero. See \eqref{p_r-m-k(gamma*tau)}. It
++ corresponds to $p(\gamma)$ as defined in equation (51) of
++ \cite{Radu_AlgorithmicApproachRamanujanCongruences_2009}.
== add
YEQLG ==> SymbolicEtaQuotientLambdaGamma
A ==> IndexedOneDimensionalArray(YEQLG, 0)
Rep ==> Record(
feta: A, -- mapping lambda to \eta_{\delta,g,m,lambda}
foffset: NN, -- the subsequence offset
funityExponent: QQ -- frationalPart(-(k + \rho_\infty{r})/m)
)
import from Rep
etaQuotient(rspec: SPEC, m: PP, k: NN, gamma: SL2Z): % ==
rspec := purify rspec
y: YEQLG := etaQuotient(rspec, m, 0, gamma)
eta: A := new(m, y) -- fill with dummy values
beta: QQ := - (1/m)*(k::QQ + rhoInfinity rspec)
uexponent: QQ := fractionalPart(beta)$QETAAUX
for lambda in 0..m-1 repeat -- can start with 1.
eta.lambda := etaQuotient(rspec, m, lambda, gamma)
per [eta, k, uexponent]
etaQuotient(rspec: SPEC, gamma: SL2Z): % ==
etaQuotient(rspec, 1, 0, gamma)
elt(x: %, lambda: NN): SymbolicEtaQuotientLambdaGamma ==
rep(x).feta.lambda
definingSpecification(x: %): SPEC == definingSpecification(x.0)
multiplier(x: %): PP == multiplier(x.0)
offset(x: %): NN == rep(x).foffset
transformationMatrix(x: %): SL2Z == transformationMatrix(x.0)
unityExponent(x: %): QQ == rep(x).funityExponent
minimalRootOfUnity(x: %): PP ==
ue := unityExponent x
minroot: ZZ := 1
m := multiplier x
for lambda in 0..m-1 repeat
y := x.lambda
minroot := lcm(minroot, minimalRootOfUnityWithoutUnityExponent y)
uexp: QQ := lambda*ue + unityExponent y
minroot := lcm(minroot, denom uexp)
asPP minroot
coerce(x: %): OutputForm == rep(x)::OutputForm
hashUpdate!(h: HashState, x: %): HashState == hashUpdate!(h, x.0)
((x: %) = (y: %)): Boolean == x.0 = y.0 and offset x = offset y
one?(x): Boolean == one? definingSpecification x
qExponentMin(x: %): QQ ==
min [qExponent(x.lambda) for lambda in 0..multiplier(x)-1]
)if LiterateDoc
\end{document}
)endif