Ask Your Question
1

Is there a way to make sage print out all monomials of a Boolean Ring?

asked 2019-01-07 02:55:20 -0600

Stockfish3709 gravatar image

updated 2019-01-07 02:59:22 -0600

Hi all,

In a finite ring, is there a way to get Sage to print out all possible monomials of the ring? I have a method, but it's very crude. It's simply doing something like taking a random variable to mutiply with a random ring element from B.random_element(). But this is obviously not what I want.

Below is the ring I'm working with.

B = BooleanPolynomialRing(20,'x', order = 'lex')

Is there a Sage function to put every monomial of the ring into a list? I can't seem to find it in Sage documentation.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-01-07 04:08:51 -0600

slelievre gravatar image

Hint: start with the boolean polynomial ring generators.

sage: B = BooleanPolynomialRing(9, 'x', order = 'lex')
sage: print(B.gens())
(x0, x1, x2, x3, x4, x5, x6, x7, x8)
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: 2019-01-07 02:55:20 -0600

Seen: 51 times

Last updated: Jan 07