When I use Cocalc.com, is sage using the polybori extension?

11 views
Skip to first unread message

Brian Tenneson

unread,
May 8, 2023, 6:19:52 AM5/8/23
to CoCalc
I got an error message that makes me wonder if cocalc is using the polybori package.

# Define the number of variables and the degree of the polynomial
n = 5
d = 4

# Import the BooleanPolynomials class from the sage.crypto.boolean_function module
from sage.crypto.boolean_function import BooleanPolynomials

# Create a random Boolean polynomial in n variables of degree d
p = BooleanPolynomials.random_polynomial(n, d)

# Print the polynomial
print(p)

Response:
ImportError                               Traceback (most recent call last)
Cell In [18], line 6
      3 d = Integer(4)
      5 # Import the BooleanPolynomials class from the sage.crypto.boolean_function module
----> 6 from sage.crypto.boolean_function import BooleanPolynomials
      8 # Create a random Boolean polynomial in n variables of degree d
      9 p = BooleanPolynomials.random_polynomial(n, d)
ImportError: cannot import name 'BooleanPolynomials' from 'sage.crypto.boolean_function' (/ext/sage/9.8/src/sage/crypto/boolean_function.cpython-311-x86_64-linux-gnu.so)
Reply all
Reply to author
Forward
0 new messages