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()


Dear Karim,

Thank you for linking matkerint and matsolvemod in the docs and mentioning solving over Z explicitly.
The only remaining issue I see is that ???matkerint does not mention matsolvemod, while ???matsolvemod does mention matkerint. 
(It may also be worth it to link matkerint and qflll.)

In a general note, shouldn't linking via ??? be made globally symmetric? That is, if ???A mentions B, then ???B should mention A for any A and B.

Regards,
Max

On Sat, Sep 3, 2022 at 7:05 AM Karim Belabas <Karim.Belabas@math.u-bordeaux.fr> wrote:
* 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/
`