This file is indexed.

/usr/share/axiom-20170501/src/algebra/PAFF.spad is in axiom-source 20170501-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
)abbrev package PAFF PackageForAlgebraicFunctionField
++ Author: Gaetan Hache
++ Date created: June 1995
++ Date Last Updated: May 2010 by Tim Daly
++ Description: 
++ References:
++ Hach95 Effective construction of algebraic geometry codes
++ Walk78 Algebraic Curves
++ Vogl07 Genus of a Plane Curve
++ Fult08 Algebraic Curves: An Introduction to Algebraic Geometry
++ A package that implements the Brill-Noether algorithm.
++ Part of the PAFF package

PackageForAlgebraicFunctionField(K,symb,BLMET) : SIG == CODE where
  K : Field 
  symb :  List(Symbol)
  BLMET : BlowUpMethodCategory

  PolyRing    ==> DistributedMultivariatePolynomial(symb,K) 
  E           ==>  DirectProduct(#symb,NonNegativeInteger)
  AFP         ==> AffinePlane(K)
  ProjPt      ==> ProjectivePlane(K)
  PCS         ==> NeitherSparseOrDensePowerSeries(K)
  Plc         ==> Places(K)
  DIVISOR     ==> Divisor(Plc)
  InfClsPoint ==> InfClsPt(K,symb,BLMET) 
  DesTree     ==> DesingTree(InfClsPoint)
  FRACPOLY    ==> Fraction PolyRing
  NNI         ==> NonNegativeInteger
  PI          ==> PositiveInteger
  UTSZ        ==> UnivariateTaylorSeriesCZero(Integer,t)
  PAFFPC      ==> GeneralPackageForAlgebraicFunctionField
  PACKPOLY    ==> PackageForPoly(K,PolyRing,E,#symb)
  BP ==> PAFFPC(K,symb,PolyRing,E,ProjPt,PCS,Plc,DIVISOR,InfClsPoint,DesTree,BLMET)
  
  SIG ==>  with

    homogenize : (PolyRing,Integer) -> PolyRing

    interpolateFormsForFact : (DIVISOR,List PolyRing) -> List(PolyRing)
  
    fullDesTree : () -> Void

    fullInfClsPt : () -> Void

    setCurve : PolyRing -> PolyRing
      ++ setCurve sets the defining polynomial for the curve
      ++
      ++X K:=PF 101
      ++X R:=DMP([X,Y,Z],K)
      ++X P:=PAFF(K,[X,Y,Z],BLQT)
      ++X C:R:= (X^2 + Y^2)^3 - 4 * X^2 * Y^2 * Z^2
      ++X setCurve(C)$P

    projectivePoint : List K -> ProjPt

    pointDominateBy : Plc -> ProjPt
      ++ pointDominateBy(pl) returns the projective point dominated 
      ++ by the place pl.

    placesAbove : ProjPt -> List Plc

    setSingularPoints : List ProjPt -> List ProjPt
    
    goppaCode : (DIVISOR,DIVISOR) -> Matrix K

    goppaCode : (DIVISOR,List(Plc)) -> Matrix K

    rationalPlaces : () -> List Plc
      ++ rationalPlaces() returns all the rational places of  the
      ++ curve defined by the polynomial given to the package.

    theCurve : () -> PolyRing
      ++ theCurve() returns the specified polynomial for the package.
      ++
      ++X K:=PF 101
      ++X R:=DMP([X,Y,Z],K)
      ++X P:=PAFF(K,[X,Y,Z],BLQT)
      ++X C:R:= (X^2 + Y^2)^3 - 4 * X^2 * Y^2 * Z^2
      ++X theCurve(C)$P

    genus : () -> NNI
      ++ genus() returns the genus of the curve defined by the polynomial 
      ++ given to the package.
      ++
      ++X K:=PF 101
      ++X R:=DMP([X,Y,Z],K)
      ++X P:=PAFF(K,[X,Y,Z],BLQT)
      ++X C:R:= (X^2 + Y^2)^3 - 4 * X^2 * Y^2 * Z^2
      ++X genus()$P

    genusNeg : () -> Integer

    desingTreeWoFullParam : () -> List DesTree
      ++ desingTreeWoFullParam() returns the desingularisation trees at all 
      ++ singular points of the curve defined by the polynomial given to 
      ++ the package. The local parametrizations are not computed.

    desingTree : () -> List DesTree
      ++ desingTree() returns the desingularisation trees at all singular 
      ++ points of the curve defined by the polynomial given to the package.

    rationalPoints : () -> List(ProjPt)

    singularPoints : () -> List(ProjPt)
      ++ singularPoints() returns the singular points of the
      ++ curve defined by the polynomial given to the package.
      ++ If the singular points lie in an extension of the specified 
      ++ ground field an error message is issued specifying the extension 
      ++ degree needed to find all singular points.
      ++
      ++X K:=PF 101
      ++X R:=DMP([X,Y,Z],K)
      ++X P:=PAFF(K,[X,Y,Z],BLQT)
      ++X C:R:= (X^2 + Y^2)^3 - 4 * X^2 * Y^2 * Z^2
      ++X singularPoints()$P

    parametrize : (PolyRing,Plc) -> PCS
      ++ parametrize(f,pl) returns a local parametrization of f at the place pl

    lBasis : (DIVISOR,NNI) -> List FRACPOLY

    lBasis : DIVISOR -> Record(num:List PolyRing, den: PolyRing)
      ++ lBasis computes a basis associated to the specified divisor

    findOrderOfDivisor : (DIVISOR,Integer,Integer) -> _
      Record(ord:Integer,num:PolyRing,den:PolyRing,upTo:Integer)

    interpolateForms : (DIVISOR,NNI) -> List(PolyRing)
      ++ interpolateForms(d,n) returns a basis of the interpolate forms of 
      ++ degree n of the divisor d.

    eval : (PolyRing,Plc) -> K
      ++ eval(f,pl) evaluate f at the place pl.

    eval : (PolyRing,PolyRing,Plc) -> K
      ++ eval(f,g,pl) evaluate the function f/g at the place pl.

    eval : (FRACPOLY,Plc) -> K
      ++ eval(u,pl) evaluate the function u at the place pl.

    evalIfCan : (PolyRing,Plc) -> Union(K,"failed")
      ++ evalIfCan(f,pl) evaluate f at the place pl 
      ++ (returns "failed" if it is a pole).

    evalIfCan : (PolyRing,PolyRing,Plc) -> Union(K,"failed")
      ++ evalIfCan(f,g,pl) evaluate the function f/g at the place pl 
      ++ (returns "failed" if it is a pole).

    evalIfCan : (FRACPOLY,Plc) -> Union(K,"failed")
      ++ evalIfCan(u,pl) evaluate the function u at the place pl 
      ++ (returns "failed" if it is a pole).

    intersectionDivisor : PolyRing -> DIVISOR
      ++ intersectionDivisor(pol) compute the intersection divisor (the 
      ++ Cartier divisor) of the form pol with the curve. If some 
      ++ intersection points lie in an extension of the ground field,
      ++ an error message is issued specifying the extension degree 
      ++ needed to find all the intersection points.
      ++ (If pol is not homogeneous an error message is issued).

    adjunctionDivisor : () -> DIVISOR
      ++ adjunctionDivisor computes the adjunction divisor of the plane 
      ++ curve given by the polynomial set with the function setCurve.

    if K has Finite then --should we say LocallyAlgebraicallyClosedField??

      LPolynomial : () -> SparseUnivariatePolynomial Integer
        ++ LPolynomial() returns the L-Polynomial of the curve.

      LPolynomial : PI -> SparseUnivariatePolynomial Integer
        ++ LPolynomial(d) returns the L-Polynomial of the curve in
        ++ constant field extension of degree d. 

      classNumber : () -> Integer
        ++ classNumber() returns the class number of the curve.

      placesOfDegree : PI -> List Plc
        ++ placesOfDegree(d) returns all places of degree d of the curve.

      numberOfPlacesOfDegree : PI -> Integer
        ++ numberOfPlacesOfDegree(pi) returns the number of places of 
        ++ the given degree

      numberRatPlacesExtDeg : PI -> Integer
        ++ numberRatPlacesExtDeg(n) returns the number of rational
        ++ places in the constant field extenstion of degree n

      numberPlacesDegExtDeg : (PI, PI) -> Integer
        ++ numberPlacesDegExtDeg(d, n) returns the number of 
        ++ places of degree d in the constant field extension of degree n

      ZetaFunction : () -> UTSZ
        ++ ZetaFunction ()eturns the Zeta function of the curve. Calculated 
        ++ by using the L-Polynomial

      ZetaFunction : PI -> UTSZ
        ++ ZetaFunction(pi) eturns the Zeta function of the curve in 
        ++ constant field extension. Calculated by using the L-Polynomial

  CODE ==>  add

    import BP

    homogenize(pol,n) == homogenize(pol,n)$PACKPOLY

    pointDominateBy(pl)== pointDominateBy(pl)$BP

    placesAbove(pt)== placesAbove(pt)$BP

    setSingularPoints(lspt)==    setSingularPoints(lspt)$BP

    projectivePoint(lpt)==projectivePoint(lpt)$ProjPt   

    interpolateFormsForFact(d,lm)==
      interpolateFormsForFact(d,lm)$BP

    if K has Finite then 
      
      goppaCode(d:DIVISOR,lp:List(Plc))==
        lb:=lBasis(d)
        dd:=lb.den
        ll:=[[eval(f,dd,pl) for pl in lp] for f in lb.num]
        matrix ll
      
      goppaCode(d:DIVISOR,p:DIVISOR)==
        lp:=supp p
        goppaCode(d,lp)
    
      ZetaFunction == ZetaFunction()$BP

      ZetaFunction(d) == ZetaFunction(d)$BP

      numberOfPlacesOfDegree(i)==numberOfPlacesOfDegree(i)$BP

      placesOfDegree(i) ==placesOfDegree(i)$BP

      numberRatPlacesExtDeg(extDegree)==numberRatPlacesExtDeg(extDegree)$BP

      numberPlacesDegExtDeg(degree,extDegree)==
        numberPlacesDegExtDeg(degree,extDegree)$BP

      LPolynomial == LPolynomial()$BP

      LPolynomial(extDeg)==LPolynomial(extDeg)$BP

      classNumber== classNumber()$BP

      rationalPlaces == rationalPlaces()$BP 

      rationalPoints==rationalPoints()$BP
      
    crvLocal:PolyRing

    eval(f:PolyRing,pl:Plc)==
      dd:= degree pl
      ^one?(dd) => error " cannot evaluate at place of degree greater than one"
      eval(f,pl)$BP

    evalIfCan(f:PolyRing,pl:Plc)==
      dd:= degree pl
      ^one?(dd) => error " cannot evaluate at place of degree greater than one"
      evalIfCan(f,pl)$BP
    
    setCurve(pol)==setCurve(pol)$BP

    lBasis(divis)==lBasis(divis)$BP

    genus==genus()$BP

    genusNeg==genusNeg()$BP

    theCurve==theCurve()$BP

    desingTree==desingTree()$BP

    desingTreeWoFullParam== desingTreeWoFullParam()$BP

    -- compute the adjunction divisor of the curve using 
    -- adjunctionDivisor from DesingTreePackage
    adjunctionDivisor == adjunctionDivisor()$BP
    
    singularPoints==singularPoints()$BP

    parametrize(f,pl)==parametrize(f,pl)$BP

    -- compute the interpolating forms (see package InterpolateFormsPackage)
    interpolateForms(d,n)==interpolateForms(d,n)$BP

    eval(f:PolyRing,g:PolyRing,pl:Plc)==eval(f,g,pl)$BP
    
    eval(u:FRACPOLY,pl:Plc)==
      ff:=numer u
      gg:=denom u
      eval(ff,gg,pl)

    evalIfCan(f:PolyRing,g:PolyRing,pl:Plc)==evalIfCan(f,g,pl)$BP
    
    evalIfCan(u:FRACPOLY,pl:Plc)==
      ff:=numer u
      gg:=denom u
      evalIfCan(ff,gg,pl)
    
    intersectionDivisor(pol)==intersectionDivisor(pol)$BP

    fullDesTree==
      fullOutput()$DesTree => fullOutput(false())$DesTree
      fullOutput(true())$DesTree

    fullInfClsPt==
      fullOutput()$InfClsPoint => fullOutput(false())$InfClsPoint
      fullOutput(true())$InfClsPoint