Conflicting returns from "isBasis" and "rank" functions

11 views
Skip to first unread message

Sid Andal

unread,
Jan 9, 2025, 11:31:06 AM1/9/25
to FriCAS - computer algebra system
The file test.input contains the following:

cat test.input

FF ==> PF 109
VF ==> Vector FF

)expose VectorSpaceBasis

V : VF := [39, 29]
W : VF := [18, 5]

isBasis?([V, W])

M : Matrix FF := [V, W]

rank M


Here's the test run:


(1) -> )r test
FF ==> PF 109
 
VF ==> Vector FF
 

)expose VectorSpaceBasis
 
   VectorSpaceBasis is now explicitly exposed in frame frame1

V : VF := [39, 29]
 

   (3)  [39, 29]
W : VF := [18, 5]
 

   (4)  [18, 5]

isBasis?([V, W])
 

   (5)  true

M : Matrix FF := [V, W]
 

        ┌39  29┐
   (6)  │      │
        └18  5 ┘

rank M
 

   (7)  1
(8) ->

Vectors V and W are linearly dependent but isBasis returns "true".

Thanks,
SWA

Waldek Hebisch

unread,
Jan 10, 2025, 2:38:08 AM1/10/25
to fricas...@googlegroups.com
On Thu, Jan 09, 2025 at 08:31:06AM -0800, Sid Andal wrote:
> The file test.input contains the following:
>
> cat test.input
>
> FF ==> PF 109
> VF ==> Vector FF
>
> )expose VectorSpaceBasis
>
> V : VF := [39, 29]
> W : VF := [18, 5]
>
> isBasis?([V, W])
>
> M : Matrix FF := [V, W]
>
> rank M

<snip>

> isBasis?([V, W])
>
>
> (5) true

<snip>

> Vectors V and W are linearly dependent but isBasis returns "true".

This was a bug due to wrong resolution of overloads. I have now
pushed a fix.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages