Ask Your Question
1

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

asked 2020-07-10 21:02:22 +0100

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')
else:
    print('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
2

answered 2020-07-11 12:22:53 +0100

mjungmath gravatar image

I already started an attempt to fix this: https://trac.sagemath.org/ticket/30108. Until this is resolved, you can use ==. This works fine.

edit flag offensive delete link more
1

answered 2020-07-11 12:21:01 +0100

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

Stats

Asked: 2020-07-10 21:02:22 +0100

Seen: 410 times

Last updated: Jul 10 '20