When I asked for code, I actually meant some fricas input by which I can at least get your first W representation.

I do not, however know, how you computed your W. I get the following.

PAR ==> PAdicRational(13);
DP ==> DirectProduct(3, PAR);
u: DP := directProduct [2, 3, 4];
v: DP := directProduct [7, 8, 9];
(36) -> w := u*v

   (36)  [1 + 13, 11 + 13, 10 + 2 13]
                       Type: DirectProduct(3,PAdicRational(13))

Anyway, the problem with printing this in the form you want, is that PAdicRational(13) simply has not enough functionality.

https://fricas.github.io/api/PAdicRational.html

If you only worked with a DirectProduct of PAdicInteger, then you can find a digits: % -> Stream Integer function from which one could program the respective output function.

https://fricas.github.io/api/PAdicInteger.html

Unfortunately PAdicRational does not export something to get hold of the exponent or the stream data.

https://github.com/fricas/fricas/blob/master/src/algebra/padic.spad#L377

Ralf


On 18.04.23 16:48, Sid Andal wrote:

The following two vectors

U := [2, 3, 4]
V := [7, 8, 9]

are in a 3-Dim Alg over the PAdicRational(13).

Is there a way to rewrite their product

         2                          2                    3
W := [6 + 13 + 7 13 , 1 + 9 13 + 7 13 , 8 13 + 7 13 ]

in a different form where the powers of 13 are factored out of the brackets
per the following?

                                                                   2
3
W  := [6, 1, 0] + [1, 9, 8] 13  + [7, 7, 0] 13 + [0, 0, 7] 13

Thanks,
SWA


--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ec35b061-82ba-ab6f-6ec6-e79c3967ed7b%40hemmecke.de.

Reply via email to