Max Alekseyev on Tue, 06 Sep 2022 21:56:09 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: integer variants of matsolve() / matinverseimage() |
* Max Alekseyev [2022-09-01 13:49]:
> PARI/GP provides function matkerint() but there are no functions
> like matsolveint() or matinverseimageint().
> It looks like matsolvemod() with D=0 does this job, but it's undocumented.
It is documented: ??matsolvemod states that D is a vector of *nonnegative*
integers (explicitly allowing 0, working in Z/(0) = Z), with the
shorthand D = integer for a vector of identical entries: so D = 0 stands
for a system of linear equations in Z.
Note that you can mix integral and modular equations by mixing 0 and
non-zero entries in the vector D and the third example in the
documentation does just that.
This is consistent with the PARI convention for elementary divisors of a
Z-module M of finite type: we have
M ~ \prod_{i <= n} Z/(d_i) with d_n | d_{n_1} | ... | d_1,
which allows the first d_i to be 0. If d_1 = ... = d_r = 0 and d_{r+1} > 0,
then M decomposes in a free part of rank r and a finite torsion part.
(And of course you can do linear algebra in M using coordinates in
\prod_i Z/(d_i) and matsolvemod.)
> Should be it made more explicit / documented?
It can certainly be made more explicit. :-)
Done in commit 353f1f028.
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251), Université de Bordeaux
Vice-président en charge du Numérique
T: (+33) 05 40 00 29 77; http://www.math.u-bordeaux.fr/~kbelabas/
`