This file is indexed.

/usr/share/gap/lib/padics.gd is in gap-libs 4r7p9-1.

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
#############################################################################
##
#W  padics.gd                   GAP Library                     Jens Hollmann
##
##
#Y  Copyright (C)  1997,  Lehrstuhl D für Mathematik,  RWTH Aachen,  Germany
#Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland
#Y  Copyright (C) 2002 The GAP Group
##
##  This file contains the declaration part of the padic numbers.
##


#############################################################################
##
#C  IsPadicNumber
##
##  <ManSection>
##  <Filt Name="IsPadicNumber" Arg='obj' Type='Category'/>
##
##  <Description>
##  </Description>
##  </ManSection>
##
DeclareCategory( "IsPadicNumber", IsScalar 
    and IsAssociativeElement and IsCommutativeElement );

DeclareCategoryCollections( "IsPadicNumber" );
DeclareCategoryCollections( "IsPadicNumberCollection" );

DeclareSynonym( "IsPadicNumberList", IsPadicNumberCollection and IsList );
DeclareSynonym( "IsPadicNumberTable", IsPadicNumberCollColl and IsTable );


#############################################################################
##
#C  IsPadicNumberFamily
##
##  <ManSection>
##  <Filt Name="IsPadicNumberFamily" Arg='obj' Type='Category'/>
##
##  <Description>
##  </Description>
##  </ManSection>
##
DeclareCategoryFamily( "IsPadicNumber" );


#############################################################################
##
#C  IsPurePadicNumber(<obj>)
##
##  <#GAPDoc Label="IsPurePadicNumber">
##  <ManSection>
##  <Filt Name="IsPurePadicNumber" Arg='obj' Type='Category'/>
##
##  <Description>
##  The category of pure <M>p</M>-adic numbers.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategory( "IsPurePadicNumber", IsPadicNumber );


#############################################################################
##
#C  IsPurePadicNumberFamily(<fam>)
##
##  <#GAPDoc Label="IsPurePadicNumberFamily">
##  <ManSection>
##  <Filt Name="IsPurePadicNumberFamily" Arg='fam' Type='Category'/>
##
##  <Description>
##  The family of pure <M>p</M>-adic numbers.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategoryFamily( "IsPurePadicNumber" );


#############################################################################
##
#C  IsPadicExtensionNumber(<obj>)
##
##  <#GAPDoc Label="IsPadicExtensionNumber">
##  <ManSection>
##  <Filt Name="IsPadicExtensionNumber" Arg='obj' Type='Category'/>
##
##  <Description>
##  The category of elements of the extended <M>p</M>-adic field.
##  <Example><![CDATA[
##  gap>  efam:=PadicExtensionNumberFamily(3, 5, [1,1,1], [1,1]);;
##  gap> IsPadicExtensionNumber(PadicNumber(efam,7/9));
##  true
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategory( "IsPadicExtensionNumber", IsPadicNumber );


#############################################################################
##
#C  IsPadicExtensionNumberFamily(<fam>)
##
##  <#GAPDoc Label="IsPadicExtensionNumberFamily">
##  <ManSection>
##  <Filt Name="IsPadicExtensionNumberFamily" Arg='fam' Type='Category'/>
##
##  <Description>
##  Family of elements of the extended <M>p</M>-adic field.
##  <Example><![CDATA[
##  gap> efam:=PadicExtensionNumberFamily(3, 5, [1,1,1], [1,1]);;
##  gap> IsPadicExtensionNumberFamily(efam);
##  true
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategoryFamily( "IsPadicExtensionNumber" );


#############################################################################
##
#O  Valuation( <obj> )
##
##  <#GAPDoc Label="Valuation">
##  <ManSection>
##  <Oper Name="Valuation" Arg='obj'/>
##
##  <Description>
##  The valuation is the <M>p</M>-part of the <M>p</M>-adic number.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "Valuation",  [ IsObject ] );


#############################################################################
##
#O  PadicNumber( <fam>, <rat> )
#O  PadicNumber( <purefam>,<list>)
#O  PadicNumber( <extfam>,<list>)
##
##  <#GAPDoc Label="PadicNumber">
##  <ManSection>
##  <Oper Name="PadicNumber" Arg='fam, rat'
##   Label="for a p-adic extension family and a rational"/>
##  <Oper Name="PadicNumber" Arg='purefam, list'
##   Label="for a pure p-adic numbers family and a list"/>
##  <Oper Name="PadicNumber" Arg='extfam, list'
##   Label="for a p-adic extension family and a list"/>
##
##  <Description>
##  (see also <Ref Oper="PadicNumber" Label="for pure padics"/>).
##  <P/>
##  <Ref Func="PadicNumber"
##   Label="for a p-adic extension family and a rational"/>
##  creates a <M>p</M>-adic number in the
##  <M>p</M>-adic numbers family <A>fam</A>.
##  The first form returns the <M>p</M>-adic number corresponding to the
##  rational <A>rat</A>.
##  <P/>
##  The second form takes a pure <M>p</M>-adic numbers family <A>purefam</A>
##  and a list <A>list</A> of length two, and returns the number
##  <M>p</M><C>^</C><A>list</A><C>[1] * </C><A>list</A><C>[2]</C>.
##  It must be guaranteed that no entry of <A>list</A><C>[2]</C> is 
##  divisible by the prime <M>p</M>.
##  (Otherwise precision will get lost.)
##  <P/>
##  The third form creates a number in the family <A>extfam</A> of a
##  <M>p</M>-adic extension.
##  The second argument must be a list <A>list</A> of length two such that
##  <A>list</A><C>[2]</C> is the list of coefficients w.r.t. the basis
##  <M>\{ 1, \ldots, x^{{f-1}} \cdot y^{{e-1}} \}</M> of the extended
##  <M>p</M>-adic field and <A>list</A><C>[1]</C> is a common <M>p</M>-part
##  of all these coefficients.
##  <P/>
##  <M>p</M>-adic numbers admit the usual field operations.
##  <Example><![CDATA[
##  gap> efam:=PadicExtensionNumberFamily(3, 5, [1,1,1], [1,1]);;
##  gap> PadicNumber(efam,7/9);
##  padic(120(3),0(3))
##  ]]></Example>
##  <P/>
##  <E>A word of warning:</E>
##  <P/>
##  Depending on the actual representation of quotients, precision may seem
##  to <Q>vanish</Q>.
##  For example in <C>PadicExtensionNumberFamily(3, 5, [1,1,1], [1,1])</C>
##  the number <C>(1.2000, 0.1210)(3)</C> can be represented as
##  <C>[ 0, [ 1.2000, 0.1210 ] ]</C>  or as <C>[ -1, [ 12.000, 1.2100 ] ]</C>
##  (here the coefficients have to be multiplied by <M>p^{{-1}}</M>).
##  <P/>
##  So there may be a number <C>(1.2, 2.2)(3)</C> which seems to have
##  only two digits of precision instead of the declared 5.
##  But internally the number is stored as <C>[ -3, [ 0.0012, 0.0022 ] ]</C>
##  and so has in fact maximum precision.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "PadicNumber", [ IsPadicNumberFamily, IsObject ] );


#############################################################################
##
#O  ShiftedPadicNumber( <padic>, <int> )
##
##  <#GAPDoc Label="ShiftedPadicNumber">
##  <ManSection>
##  <Oper Name="ShiftedPadicNumber" Arg='padic, int'/>
##
##  <Description>
##  <Ref Func="ShiftedPadicNumber"/> takes a <M>p</M>-adic number
##  <A>padic</A> and an integer <A>shift</A>
##  and returns the <M>p</M>-adic number <M>c</M>,
##  that is <A>padic</A> <C>*</C> <M>p</M><C>^</C><A>shift</A>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "ShiftedPadicNumber", [ IsPadicNumber, IsInt ] );


#############################################################################
##
#O  PurePadicNumberFamily( <p>, <precision> )
##
##  <#GAPDoc Label="PurePadicNumberFamily">
##  <ManSection>
##  <Oper Name="PurePadicNumberFamily" Arg='p, precision'/>
##
##  <Description>
##  returns the family of pure <M>p</M>-adic numbers over the
##  prime <A>p</A> with <A>precision</A> <Q>digits</Q>. That is to say, the approximate value
##  will differ from the correct value by a multiple of <M>p^{digits}</M>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "PurePadicNumberFamily" );
DeclareGlobalVariable( "PADICS_FAMILIES");

#############################################################################
##
#F  PadicExtensionNumberFamily( <p>, <precision>, <unram>, <ram> )
##
##  <#GAPDoc Label="PadicExtensionNumberFamily">
##  <ManSection>
##  <Func Name="PadicExtensionNumberFamily" Arg='p, precision, unram, ram'/>
##
##  <Description>
##  An extended <M>p</M>-adic field <M>L</M> is given by two polynomials
##  <M>h</M> and <M>g</M> with coefficient lists <A>unram</A> (for the
##  unramified part) and <A>ram</A> (for the ramified part).
##  Then <M>L</M> is isomorphic to <M>Q_p[x,y]/(h(x),g(y))</M>.
##  <P/>
##  This function takes the prime number <A>p</A> and the two coefficient
##  lists <A>unram</A> and <A>ram</A> for the two polynomials.
##  The polynomial given by the coefficients in <A>unram</A> must be a
##  cyclotomic polynomial and the polynomial given by <A>ram</A> must be
##  either an Eisenstein polynomial or <M>1+x</M>.
##  <E>This is not checked by &GAP;.</E>
##  <P/>
##  Every number in <M>L</M> is represented as a coefficient list w. r. t.
##  the basis <M>\{ 1, x, x^2, \ldots, y, xy, x^2 y, \ldots \}</M>
##  of <M>L</M>.
##  The integer <A>precision</A> is the number of <Q>digits</Q> that all the
##  coefficients have.
##  <P/>
##  <E>A general comment:</E>
##  <P/>
##  The polynomials with which <Ref Func="PadicExtensionNumberFamily"/> is
##  called define an extension of <M>Q_p</M>.
##  It must be ensured that both polynomials are really irreducible over
##  <M>Q_p</M>!
##  For example <M>x^2+x+1</M> is <E>not</E> irreducible over <M>Q_p</M>.
##  Therefore the <Q>extension</Q>
##  <C>PadicExtensionNumberFamily(3, 4, [1,1,1], [1,1])</C> contains
##  non-invertible <Q>pseudo-p-adic numbers</Q>.
##  Conversely, if an <Q>extension</Q> contains noninvertible elements
##  then one of the defining polynomials was not irreducible.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "PadicExtensionNumberFamily" );


#############################################################################
##
#E