passagemath-ntl 10.6.36__cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. passagemath_ntl-10.6.36.dist-info/METADATA +122 -0
  2. passagemath_ntl-10.6.36.dist-info/RECORD +161 -0
  3. passagemath_ntl-10.6.36.dist-info/WHEEL +6 -0
  4. passagemath_ntl-10.6.36.dist-info/top_level.txt +2 -0
  5. passagemath_ntl.libs/libgf2x-fbd36f80.so.3.0.0 +0 -0
  6. passagemath_ntl.libs/libgmp-93ebf16a.so.10.5.0 +0 -0
  7. passagemath_ntl.libs/libmpfi-ad12a86d.so.0.0.0 +0 -0
  8. passagemath_ntl.libs/libmpfr-9d41ebf1.so.6.2.1 +0 -0
  9. passagemath_ntl.libs/libntl-0043a3a2.so.44.0.1 +0 -0
  10. sage/all__sagemath_ntl.py +7 -0
  11. sage/libs/all__sagemath_ntl.py +3 -0
  12. sage/libs/mpfi/__init__.pxd +287 -0
  13. sage/libs/mpfi/types.pxd +10 -0
  14. sage/libs/ntl/GF2.pxd +18 -0
  15. sage/libs/ntl/GF2E.pxd +28 -0
  16. sage/libs/ntl/GF2EX.pxd +12 -0
  17. sage/libs/ntl/GF2X.pxd +81 -0
  18. sage/libs/ntl/ZZ.pxd +93 -0
  19. sage/libs/ntl/ZZX.pxd +85 -0
  20. sage/libs/ntl/ZZ_p.pxd +28 -0
  21. sage/libs/ntl/ZZ_pE.pxd +37 -0
  22. sage/libs/ntl/ZZ_pEX.pxd +106 -0
  23. sage/libs/ntl/ZZ_pX.pxd +122 -0
  24. sage/libs/ntl/__init__.py +4 -0
  25. sage/libs/ntl/all.py +72 -0
  26. sage/libs/ntl/conversion.pxd +106 -0
  27. sage/libs/ntl/convert.cpython-314t-aarch64-linux-gnu.so +0 -0
  28. sage/libs/ntl/convert.pxd +7 -0
  29. sage/libs/ntl/convert.pyx +38 -0
  30. sage/libs/ntl/decl.pxi +18 -0
  31. sage/libs/ntl/error.cpython-314t-aarch64-linux-gnu.so +0 -0
  32. sage/libs/ntl/error.pyx +63 -0
  33. sage/libs/ntl/lzz_p.pxd +20 -0
  34. sage/libs/ntl/lzz_pX.pxd +59 -0
  35. sage/libs/ntl/mat_GF2.pxd +30 -0
  36. sage/libs/ntl/mat_GF2E.pxd +30 -0
  37. sage/libs/ntl/mat_ZZ.pxd +59 -0
  38. sage/libs/ntl/misc.pxi +33 -0
  39. sage/libs/ntl/ntl_GF2.cpython-314t-aarch64-linux-gnu.so +0 -0
  40. sage/libs/ntl/ntl_GF2.pxd +5 -0
  41. sage/libs/ntl/ntl_GF2.pyx +281 -0
  42. sage/libs/ntl/ntl_GF2E.cpython-314t-aarch64-linux-gnu.so +0 -0
  43. sage/libs/ntl/ntl_GF2E.pxd +8 -0
  44. sage/libs/ntl/ntl_GF2E.pyx +488 -0
  45. sage/libs/ntl/ntl_GF2EContext.cpython-314t-aarch64-linux-gnu.so +0 -0
  46. sage/libs/ntl/ntl_GF2EContext.pxd +9 -0
  47. sage/libs/ntl/ntl_GF2EContext.pyx +134 -0
  48. sage/libs/ntl/ntl_GF2EX.cpython-314t-aarch64-linux-gnu.so +0 -0
  49. sage/libs/ntl/ntl_GF2EX.pxd +10 -0
  50. sage/libs/ntl/ntl_GF2EX.pyx +251 -0
  51. sage/libs/ntl/ntl_GF2X.cpython-314t-aarch64-linux-gnu.so +0 -0
  52. sage/libs/ntl/ntl_GF2X.pxd +5 -0
  53. sage/libs/ntl/ntl_GF2X.pyx +771 -0
  54. sage/libs/ntl/ntl_GF2X_linkage.pxi +404 -0
  55. sage/libs/ntl/ntl_ZZ.cpython-314t-aarch64-linux-gnu.so +0 -0
  56. sage/libs/ntl/ntl_ZZ.pxd +7 -0
  57. sage/libs/ntl/ntl_ZZ.pyx +541 -0
  58. sage/libs/ntl/ntl_ZZX.cpython-314t-aarch64-linux-gnu.so +0 -0
  59. sage/libs/ntl/ntl_ZZX.pxd +7 -0
  60. sage/libs/ntl/ntl_ZZX.pyx +1206 -0
  61. sage/libs/ntl/ntl_ZZ_p.cpython-314t-aarch64-linux-gnu.so +0 -0
  62. sage/libs/ntl/ntl_ZZ_p.pxd +10 -0
  63. sage/libs/ntl/ntl_ZZ_p.pyx +509 -0
  64. sage/libs/ntl/ntl_ZZ_pContext.cpython-314t-aarch64-linux-gnu.so +0 -0
  65. sage/libs/ntl/ntl_ZZ_pContext.pxd +22 -0
  66. sage/libs/ntl/ntl_ZZ_pContext.pyx +201 -0
  67. sage/libs/ntl/ntl_ZZ_pE.cpython-314t-aarch64-linux-gnu.so +0 -0
  68. sage/libs/ntl/ntl_ZZ_pE.pxd +11 -0
  69. sage/libs/ntl/ntl_ZZ_pE.pyx +349 -0
  70. sage/libs/ntl/ntl_ZZ_pEContext.cpython-314t-aarch64-linux-gnu.so +0 -0
  71. sage/libs/ntl/ntl_ZZ_pEContext.pxd +23 -0
  72. sage/libs/ntl/ntl_ZZ_pEContext.pyx +226 -0
  73. sage/libs/ntl/ntl_ZZ_pEX.cpython-314t-aarch64-linux-gnu.so +0 -0
  74. sage/libs/ntl/ntl_ZZ_pEX.pxd +10 -0
  75. sage/libs/ntl/ntl_ZZ_pEX.pyx +1255 -0
  76. sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi +420 -0
  77. sage/libs/ntl/ntl_ZZ_pX.cpython-314t-aarch64-linux-gnu.so +0 -0
  78. sage/libs/ntl/ntl_ZZ_pX.pxd +17 -0
  79. sage/libs/ntl/ntl_ZZ_pX.pyx +1532 -0
  80. sage/libs/ntl/ntl_lzz_p.cpython-314t-aarch64-linux-gnu.so +0 -0
  81. sage/libs/ntl/ntl_lzz_p.pxd +8 -0
  82. sage/libs/ntl/ntl_lzz_p.pyx +440 -0
  83. sage/libs/ntl/ntl_lzz_pContext.cpython-314t-aarch64-linux-gnu.so +0 -0
  84. sage/libs/ntl/ntl_lzz_pContext.pxd +7 -0
  85. sage/libs/ntl/ntl_lzz_pContext.pyx +137 -0
  86. sage/libs/ntl/ntl_lzz_pX.cpython-314t-aarch64-linux-gnu.so +0 -0
  87. sage/libs/ntl/ntl_lzz_pX.pxd +10 -0
  88. sage/libs/ntl/ntl_lzz_pX.pyx +902 -0
  89. sage/libs/ntl/ntl_mat_GF2.cpython-314t-aarch64-linux-gnu.so +0 -0
  90. sage/libs/ntl/ntl_mat_GF2.pxd +8 -0
  91. sage/libs/ntl/ntl_mat_GF2.pyx +612 -0
  92. sage/libs/ntl/ntl_mat_GF2E.cpython-314t-aarch64-linux-gnu.so +0 -0
  93. sage/libs/ntl/ntl_mat_GF2E.pxd +10 -0
  94. sage/libs/ntl/ntl_mat_GF2E.pyx +752 -0
  95. sage/libs/ntl/ntl_mat_ZZ.cpython-314t-aarch64-linux-gnu.so +0 -0
  96. sage/libs/ntl/ntl_mat_ZZ.pxd +6 -0
  97. sage/libs/ntl/ntl_mat_ZZ.pyx +1523 -0
  98. sage/libs/ntl/ntl_tools.pxd +3 -0
  99. sage/libs/ntl/ntlwrap.h +53 -0
  100. sage/libs/ntl/ntlwrap_impl.h +743 -0
  101. sage/libs/ntl/types.pxd +157 -0
  102. sage/libs/ntl/vec_GF2.pxd +26 -0
  103. sage/libs/ntl/vec_GF2E.pxd +2 -0
  104. sage/matrix/all__sagemath_ntl.py +1 -0
  105. sage/matrix/matrix_modn_dense_double.pxd +10 -0
  106. sage/matrix/matrix_modn_dense_float.pxd +9 -0
  107. sage/matrix/matrix_modn_dense_template.pxi +3257 -0
  108. sage/matrix/matrix_modn_dense_template_header.pxi +15 -0
  109. sage/matrix/matrix_modn_sparse.pxd +8 -0
  110. sage/misc/all__sagemath_ntl.py +1 -0
  111. sage/rings/all__sagemath_ntl.py +7 -0
  112. sage/rings/bernmm.cpython-314t-aarch64-linux-gnu.so +0 -0
  113. sage/rings/bernmm.pyx +161 -0
  114. sage/rings/bernoulli_mod_p.cpython-314t-aarch64-linux-gnu.so +0 -0
  115. sage/rings/bernoulli_mod_p.pyx +313 -0
  116. sage/rings/finite_rings/all__sagemath_ntl.py +1 -0
  117. sage/rings/finite_rings/finite_field_ntl_gf2e.py +305 -0
  118. sage/rings/finite_rings/residue_field_ntl_gf2e.cpython-314t-aarch64-linux-gnu.so +0 -0
  119. sage/rings/finite_rings/residue_field_ntl_gf2e.pyx +140 -0
  120. sage/rings/padics/all__sagemath_ntl.py +5 -0
  121. sage/rings/padics/padic_ZZ_pX_CA_element.cpython-314t-aarch64-linux-gnu.so +0 -0
  122. sage/rings/padics/padic_ZZ_pX_CA_element.pxd +25 -0
  123. sage/rings/padics/padic_ZZ_pX_CA_element.pyx +2368 -0
  124. sage/rings/padics/padic_ZZ_pX_CR_element.cpython-314t-aarch64-linux-gnu.so +0 -0
  125. sage/rings/padics/padic_ZZ_pX_CR_element.pxd +33 -0
  126. sage/rings/padics/padic_ZZ_pX_CR_element.pyx +3277 -0
  127. sage/rings/padics/padic_ZZ_pX_FM_element.cpython-314t-aarch64-linux-gnu.so +0 -0
  128. sage/rings/padics/padic_ZZ_pX_FM_element.pxd +12 -0
  129. sage/rings/padics/padic_ZZ_pX_FM_element.pyx +1739 -0
  130. sage/rings/padics/padic_ZZ_pX_element.cpython-314t-aarch64-linux-gnu.so +0 -0
  131. sage/rings/padics/padic_ZZ_pX_element.pxd +6 -0
  132. sage/rings/padics/padic_ZZ_pX_element.pyx +919 -0
  133. sage/rings/padics/padic_ext_element.cpython-314t-aarch64-linux-gnu.so +0 -0
  134. sage/rings/padics/padic_ext_element.pxd +38 -0
  135. sage/rings/padics/padic_ext_element.pyx +512 -0
  136. sage/rings/padics/pow_computer_ext.cpython-314t-aarch64-linux-gnu.so +0 -0
  137. sage/rings/padics/pow_computer_ext.pxd +107 -0
  138. sage/rings/padics/pow_computer_ext.pyx +2401 -0
  139. sage/rings/polynomial/all__sagemath_ntl.py +1 -0
  140. sage/rings/polynomial/evaluation_ntl.cpython-314t-aarch64-linux-gnu.so +0 -0
  141. sage/rings/polynomial/evaluation_ntl.pxd +7 -0
  142. sage/rings/polynomial/evaluation_ntl.pyx +70 -0
  143. sage/rings/polynomial/polynomial_gf2x.cpython-314t-aarch64-linux-gnu.so +0 -0
  144. sage/rings/polynomial/polynomial_gf2x.pxd +10 -0
  145. sage/rings/polynomial/polynomial_gf2x.pyx +364 -0
  146. sage/rings/polynomial/polynomial_integer_dense_ntl.cpython-314t-aarch64-linux-gnu.so +0 -0
  147. sage/rings/polynomial/polynomial_integer_dense_ntl.pxd +8 -0
  148. sage/rings/polynomial/polynomial_integer_dense_ntl.pyx +1128 -0
  149. sage/rings/polynomial/polynomial_modn_dense_ntl.cpython-314t-aarch64-linux-gnu.so +0 -0
  150. sage/rings/polynomial/polynomial_modn_dense_ntl.pxd +36 -0
  151. sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +2049 -0
  152. sage/rings/polynomial/polynomial_template.pxi +842 -0
  153. sage/rings/polynomial/polynomial_template_header.pxi +11 -0
  154. sage/rings/polynomial/polynomial_zz_pex.cpython-314t-aarch64-linux-gnu.so +0 -0
  155. sage/rings/polynomial/polynomial_zz_pex.pxd +12 -0
  156. sage/rings/polynomial/polynomial_zz_pex.pyx +778 -0
  157. sage/rings/real_mpfi.pxd +50 -0
  158. sage/schemes/all__sagemath_ntl.py +1 -0
  159. sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py +1 -0
  160. sage/schemes/hyperelliptic_curves/hypellfrob.cpython-314t-aarch64-linux-gnu.so +0 -0
  161. sage/schemes/hyperelliptic_curves/hypellfrob.pyx +252 -0
@@ -0,0 +1,281 @@
1
+ # sage_setup: distribution = sagemath-ntl
2
+ # distutils: libraries = NTL_LIBRARIES gmp
3
+ # distutils: extra_compile_args = NTL_CFLAGS
4
+ # distutils: include_dirs = NTL_INCDIR
5
+ # distutils: library_dirs = NTL_LIBDIR
6
+ # distutils: extra_link_args = NTL_LIBEXTRA
7
+ # distutils: language = c++
8
+
9
+ # ****************************************************************************
10
+ # Copyright (C) 2007 Martin Albrecht <malb@informatik.uni-bremen.de>
11
+ #
12
+ # Distributed under the terms of the GNU General Public License (GPL)
13
+ #
14
+ # This code is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
+ # General Public License for more details.
18
+ #
19
+ # The full text of the GPL is available at:
20
+ #
21
+ # https://www.gnu.org/licenses/
22
+ # ****************************************************************************
23
+
24
+ from sage.ext.cplusplus cimport ccrepr, ccreadstr
25
+
26
+ include 'misc.pxi'
27
+ include 'decl.pxi'
28
+
29
+ from cpython.object cimport Py_EQ, Py_NE
30
+ from sage.rings.integer cimport Integer
31
+
32
+ ##############################################################################
33
+ # GF2: Bits
34
+ ##############################################################################
35
+
36
+ cdef class ntl_GF2():
37
+ r"""
38
+ The \class{GF2} represents the field GF(2). Computationally
39
+ speaking, it is not a particularly useful class. Its main use is
40
+ to make the interfaces to the various finite field classes as
41
+ uniform as possible.
42
+ """
43
+ def __init__(self, v=None):
44
+ r"""
45
+ Initialize a NTL bit.
46
+
47
+ EXAMPLES::
48
+
49
+ sage: ntl.GF2(1)
50
+ 1
51
+ sage: ntl.GF2(int(2))
52
+ 0
53
+ sage: ntl.GF2('1')
54
+ 1
55
+ """
56
+ if isinstance(v, ntl_GF2):
57
+ self.x = (<ntl_GF2>v).x
58
+ elif isinstance(v, (int, Integer)):
59
+ GF2_conv_long(self.x, int(v) % 2)
60
+ elif v is not None:
61
+ ccreadstr(self.x, str(v))
62
+
63
+ def __repr__(self):
64
+ """
65
+ Return the string representation of ``self``.
66
+
67
+ EXAMPLES::
68
+
69
+ sage: str(ntl.GF2(1)) # indirect doctest
70
+ '1'
71
+ """
72
+ return ccrepr(self.x)
73
+
74
+ def __reduce__(self):
75
+ """
76
+ Serialize ``self``.
77
+
78
+ EXAMPLES::
79
+
80
+ sage: a = ntl.GF2(1)
81
+ sage: loads(dumps(a))
82
+ 1
83
+ """
84
+ return unpickle_class_value, (ntl_GF2, int(self))
85
+
86
+ def __richcmp__(ntl_GF2 self, other, int op):
87
+ """
88
+ Compare ``self`` to ``other``.
89
+
90
+ EXAMPLES::
91
+
92
+ sage: a = ntl.GF2(1)
93
+ sage: b = ntl.GF2(0)
94
+ sage: a == a
95
+ True
96
+ sage: a == b
97
+ False
98
+ sage: a == 1
99
+ True
100
+ sage: a < b
101
+ Traceback (most recent call last):
102
+ ...
103
+ TypeError: elements of GF(2) are not ordered
104
+ """
105
+ if op != Py_EQ and op != Py_NE:
106
+ raise TypeError("elements of GF(2) are not ordered")
107
+
108
+ cdef ntl_GF2 b
109
+ try:
110
+ b = <ntl_GF2?>other
111
+ except TypeError:
112
+ b = ntl_GF2(other)
113
+
114
+ return (op == Py_EQ) == (self.x == b.x)
115
+
116
+ def __mul__(self, other):
117
+ """
118
+ EXAMPLES::
119
+
120
+ sage: o = ntl.GF2(1)
121
+ sage: z = ntl.GF2(0)
122
+ sage: o*o
123
+ 1
124
+ sage: o*z
125
+ 0
126
+ sage: z*o
127
+ 0
128
+ sage: z*z
129
+ 0
130
+ """
131
+ cdef ntl_GF2 r = ntl_GF2.__new__(ntl_GF2)
132
+ if not isinstance(self, ntl_GF2):
133
+ self = ntl_GF2(self)
134
+ if not isinstance(other, ntl_GF2):
135
+ other = ntl_GF2(other)
136
+ GF2_mul(r.x, (<ntl_GF2>self).x, (<ntl_GF2>other).x)
137
+ return r
138
+
139
+ def __truediv__(self, other):
140
+ """
141
+ EXAMPLES::
142
+
143
+ sage: o = ntl.GF2(1)
144
+ sage: z = ntl.GF2(0)
145
+ sage: o/o
146
+ 1
147
+ sage: o/z
148
+ Traceback (most recent call last):
149
+ ...
150
+ ZeroDivisionError
151
+ """
152
+ cdef ntl_GF2 r
153
+ if not isinstance(self, ntl_GF2):
154
+ self = ntl_GF2(self)
155
+ if not isinstance(other, ntl_GF2):
156
+ other = ntl_GF2(other)
157
+ if GF2_IsZero((<ntl_GF2>other).x):
158
+ raise ZeroDivisionError
159
+ r = ntl_GF2.__new__(ntl_GF2)
160
+ GF2_div(r.x, (<ntl_GF2>self).x, (<ntl_GF2>other).x)
161
+ return r
162
+
163
+ def __sub__(self, other):
164
+ """
165
+ EXAMPLES::
166
+
167
+ sage: o = ntl.GF2(1)
168
+ sage: z = ntl.GF2(0)
169
+ sage: o-o
170
+ 0
171
+ sage: o-z
172
+ 1
173
+ sage: z-o
174
+ 1
175
+ sage: z-z
176
+ 0
177
+ """
178
+ cdef ntl_GF2 r = ntl_GF2.__new__(ntl_GF2)
179
+ if not isinstance(self, ntl_GF2):
180
+ self = ntl_GF2(self)
181
+ if not isinstance(other, ntl_GF2):
182
+ other = ntl_GF2(other)
183
+ GF2_sub(r.x, (<ntl_GF2>self).x, (<ntl_GF2>other).x)
184
+ return r
185
+
186
+ def __add__(self, other):
187
+ """
188
+ EXAMPLES::
189
+
190
+ sage: o = ntl.GF2(1)
191
+ sage: z = ntl.GF2(0)
192
+ sage: o+o
193
+ 0
194
+ sage: o+z
195
+ 1
196
+ sage: z+o
197
+ 1
198
+ sage: z+z
199
+ 0
200
+ """
201
+ cdef ntl_GF2 r = ntl_GF2.__new__(ntl_GF2)
202
+ if not isinstance(self, ntl_GF2):
203
+ self = ntl_GF2(self)
204
+ if not isinstance(other, ntl_GF2):
205
+ other = ntl_GF2(other)
206
+ GF2_add(r.x, (<ntl_GF2>self).x, (<ntl_GF2>other).x)
207
+ return r
208
+
209
+ def __neg__(ntl_GF2 self):
210
+ """
211
+ EXAMPLES::
212
+
213
+ sage: o = ntl.GF2(1)
214
+ sage: z = ntl.GF2(0)
215
+ sage: -z
216
+ 0
217
+ sage: -o
218
+ 1
219
+ """
220
+ cdef ntl_GF2 r = ntl_GF2.__new__(ntl_GF2)
221
+ GF2_negate(r.x, self.x)
222
+ return r
223
+
224
+ def __pow__(ntl_GF2 self, long e, ignored):
225
+ """
226
+ EXAMPLES::
227
+
228
+ sage: o = ntl.GF2(1)
229
+ sage: z = ntl.GF2(0)
230
+ sage: z^2
231
+ 0
232
+ sage: o^2
233
+ 1
234
+ """
235
+ cdef ntl_GF2 r = ntl_GF2()
236
+ GF2_power(r.x, self.x, e)
237
+ return r
238
+
239
+ def __int__(self):
240
+ """
241
+ Return ``self`` as an int.
242
+
243
+ EXAMPLES::
244
+
245
+ sage: o = ntl.GF2(1)
246
+ sage: z = ntl.GF2(0)
247
+ sage: int(z)
248
+ 0
249
+ sage: int(o)
250
+ 1
251
+ """
252
+ cdef long l = GF2_conv_to_long(self.x)
253
+ return int(l)
254
+
255
+
256
+ def unpickle_class_value(cls, x):
257
+ """
258
+ Here for unpickling.
259
+
260
+ EXAMPLES::
261
+
262
+ sage: sage.libs.ntl.ntl_GF2.unpickle_class_value(ntl.GF2,1)
263
+ 1
264
+ sage: type(sage.libs.ntl.ntl_GF2.unpickle_class_value(ntl.GF2,1))
265
+ <class 'sage.libs.ntl.ntl_GF2.ntl_GF2'>
266
+ """
267
+ return cls(x)
268
+
269
+
270
+ def unpickle_class_args(cls, x):
271
+ """
272
+ Here for unpickling.
273
+
274
+ EXAMPLES::
275
+
276
+ sage: sage.libs.ntl.ntl_GF2.unpickle_class_args(ntl.GF2,[1])
277
+ 1
278
+ sage: type(sage.libs.ntl.ntl_GF2.unpickle_class_args(ntl.GF2,[1]))
279
+ <class 'sage.libs.ntl.ntl_GF2.ntl_GF2'>
280
+ """
281
+ return cls(*x)
@@ -0,0 +1,8 @@
1
+ # sage_setup: distribution = sagemath-ntl
2
+ from sage.libs.ntl.types cimport GF2E_c
3
+ from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class
4
+
5
+ cdef class ntl_GF2E():
6
+ cdef GF2E_c x
7
+ cdef ntl_GF2EContext_class c
8
+ cdef ntl_GF2E _new(self)