Sid Andal
unread,Dec 1, 2021, 2:25:09 PM12/1/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to FriCAS - computer algebra system
The following file contains:
**** mysolv.input ****
F := PF 13
VF ==> Vector F
LZ ==> List Integer
fsol(a: List LZ, b: LZ): LZ ==_
x := solve(a :: SquareMatrix(3, F), b :: VF).particular
if x case VF then x :: LZ else [0,0,0] :: LZ
**** End of mysolv.input
The following run outputs an error:
(1) -> )r mysolv
F := PF 13
(1) PrimeField(13)
VF ==> Vector F
LZ ==> List Integer
fsol(a: List LZ, b: LZ): LZ ==_
x := solve(a :: SquareMatrix(3, F), b :: VF).particular
if x case VF then x :: LZ else [0,0,0] :: LZ
Function declaration fsol : (List(List(Integer)), List(Integer)) ->
List(Integer) has been added to workspace.
(5) ->
(5) -> fsol([[1,2,3],[5,7,9],[11,2,8]],[4,0,3])
case is only used for Unions and the object on the left-hand side
does not belong to a union.
(5) ->
Isn't solve.particular of Union type?