The following 2D example describes the problem:

PR ==> PAdicRational(11)
SQ ==> SQMATRIX(2, PR)
LS ==> List SQ

M : SQ := [[10, 7], [3, 8]]

        ┌10  7┐
   (4)  │     │
        └3   8┘

N : SQ := [[9, 2], [5, 1]]

        ┌9  2┐
   (5)  │    │
        └5  1┘

S : LS := [M, N]

         ┌10  7┐  ┌9  2┐
   (6)  [│     │, │    │]
         └3   8┘  └5  1┘

AP := ALGSC(PR, 2, ['A, 'B], S)

   (7)
  
AlgebraGivenByStructuralConstants(PAdicRational(11),2,[A,B],[[[10,7],[3,8]],[
  [9,2],[5,1]]])

V := basis()$AP

   (8)  [A, B]
(A, B) := (V.1, V.2)

   (9)  B

)clear p M N S V
 
(10) -> (U, V, W) : AP
(11) -> U := 9*A + 10*B

   (11)  10 B + 9 A
(12) -> V := 8*A + 7*B

   (12)  7 B + 8 A
(13) -> W := U*V

                                         2                   
                2       3
   (13)  (1 + 3 11 + 10 11 )B + (3 + 2 11 + 5 11  + 11 )A
(14) ->

All scalar coefs are padic integers and an algebra over the ring
of padic integers would've been sufficient. However, ALGSC requires
the Ring to be a Field, so, PAdicRational was chosen, instead.

The problem now is to rewrite the product W into the following form
or into something equivalent:

                                  2        3
(B + 3A) + (3B + 2A)11 + (10B + 5A)11 + A 11

where the powers of the prime (11, in this case) are factored out.

SWA

On Wednesday, April 19, 2023 at 7:06:30 PM UTC-5 Waldek Hebisch wrote:

> On Tue, Apr 18, 2023 at 07:48:48AM -0700, 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
> > 
>
> You did not write what your really want. Do you want internal
> structure to be as above? If yes, than you need new domain
> for vectors (or whatever aggregate you use). Such domain would
> have to do similar things to what PAdicRational is doing, but
> using stream of vectors (or more general aggregates).
>
> If all what you want is printing, then you should be able to
> produce printouts using digits extraction (say via 'approximate').
>
> -- 
> Waldek Hebisch
>

-- 
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/064e32db-2779-481e-8cb4-db4d0a38f518n%40googlegroups.com.

Reply via email to