First time here? Check out the FAQ!

Ask Your Question
1

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

asked 4 years ago

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?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 4 years ago

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.

Preview: (hide)
link
1

answered 4 years ago

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_??
Preview: (hide)
link

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: 4 years ago

Seen: 437 times

Last updated: Jul 10 '20