-
Notifications
You must be signed in to change notification settings - Fork 0
barumrho/sage_polynomial
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
FILES
bruteforce.py
Used when generating polynomials with Galois groups that are proper
sub-groups of Sn TO USE
db.py
Contains DB class which can be used to store data
plots.py
Functions used for producing plots
polynomial.py
Functions related to polynomials
TO USE
The scripts here are to be used with Sage. (http://www.sagemath.org)
There are several ways to do this:
Within sage: (assuming you are running sage in the directory with scripts)
(1) sage: load polynomial.py
(2) sage: attach polynomial.py
# This reloads the file when the file is changed (useful when debugging)
(3) sage: from polynomial import *
Above methods make all the functions in polynomial.py available globally.
(4) sage: import polynomial
This will make functions accessible through polynomial.function_name()
Standalone script:
#!/usr/env sage -python
from sage.all import *
from polynomial import *
#python code
Examples
sage: load polynomial.py
sage: irreducible_polynomial(4) # Returns an irreducible polynomial of degree 4
# Generating Normalized roots:
# This sets x as an element of polynomial ring over rationals
sage: R.<x> = QQ[]
sage: f = x^2 + 1
# OR
sage: load polynomial.py
sage: f = make_polynomial([1, 0, 1])
# If you have TransitiveGroup installed, this should return an id of galois
# group of f.
# You can install this optional sage package by running:
# sage -i database_gap-4.4.10
sage: f.galois_group()
# This gives a list of normalized roots mod p for 10 prime numbers p
# starting with 2
sage: roots_modp(f,2,10)
About
Python scripts dependent on Sage for number theory research
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published