Ask Your Question

Why doesn't '==' or '!=' work for mixed forms?

asked 2020-07-10 14:02:22 -0500

sum8tion gravatar image

I have the following setup

M = Manifold((4), 'M', field='complex')
U = M.open_subset('U')
x = U.chart(names=tuple('x_%d' % i for i in range(4)))
eU = x.frame()

Form0 = M.mixed_form(comp=([0,0,0,0,0]))
Form1 = M.mixed_form(comp=([1,0,0,0,0]))

Clearly Form0 and Form1 are distinct mixed forms of M, but when I run

if Form0 != Form1:
    print('Not Equal')

I get 'Equal' as the output, what's going wrong?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2020-07-11 05:22:53 -0500

MJung gravatar image

I already started an attempt to fix this: Until this is resolved, you can use ==. This works fine.

edit flag offensive delete link more

answered 2020-07-11 05:21:01 -0500

FrédéricC gravatar image

This is a bug. the _richcmp_ method of mixed form only make sense for ==. Read the code

sage: Form0._richcmp_??
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-07-10 14:02:22 -0500

Seen: 114 times

Last updated: Jul 10