bug ih hom?

33 views
Skip to first unread message

Enrique Artal

unread,
Dec 22, 2020, 4:51:07 AM12/22/20
to sage-support
I am running sage in Fedora 33, x86_64 sage 9.3beta4 (though the bug appears also in ubuntu sage 9.1). This is a toy example:

K=GF(2)
V=K^2
B=V.basis()
B1=[vector(K,[i,j]) for i,j in [(1,0),(1,1)]] 
V1=V.subspace_with_basis(B1)

I considere a vector space V of dimension 2 over the field of two elements with two distinct bases. The following define linear maps using hom:

a=V.hom(B,V)
b=V.hom(B1,V)
c=V1.hom(B,V)
d=V1.hom(B1,V)

The output of [a==k for k in (a,b,c,d)] is [True, False, True, False] and as it should be the output all([a(v)==c(v) for v in V]) is False and the output of all([a(v)==d(v) for v in V]) is True.

It seems it checks the equality of the lists of images and not the equality of the maps (a and d are the identity and not b and c).

Best, Enrique.
Reply all
Reply to author
Forward
0 new messages