Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ checkdiff = test/diff/diff_bug-2nd-prime-bad.sh \
test/diff/diff_quadratic-nonradical-qq.sh \
test/diff/diff_radical-shape-31.sh \
test/diff/diff_radical-shape-qq.sh \
test/diff/diff_reject-malformed.sh \
test/diff/diff_realroot1.sh \
test/diff/diff_realroot-extraction-exact-root.sh \
test/diff/diff_reals-dim0-chgvar.sh \
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ x1+x2+x3+x4,
```
Polynomials may be multiline, thus `,` as a separator.

Coefficients can be rational, using `/`, e.g. `-2/3*x2*y1^2+...`.
Coefficients can be rational, using `/`, e.g. `-2/3*x2*y1^2+...`
(leading rational form only: `1/2*x`, not `x/2`).

In each polynomial, a single occurrence of each monomial is expected; the
behaviour of msolve's parser is undefined if some monomial is repeated, as in
`x1+x2+x3+x4-x1`.
In each polynomial, a single occurrence of each monomial is expected.
Parentheses, post-monomial division (`x/2`), a leading `*`, repeated
monomials, and (over a prime field) coefficients that do not fit in a
machine word are rejected with a nonzero exit code.

# Basic usage

Expand Down Expand Up @@ -99,6 +101,10 @@ Using the `-g 2` flag as follows
```
will return the reduced Groebner basis for the graded reverse
lexicographic ordering.
Over a prime field this is exact. Over the rationals, coefficients are
lifted to Q when possible; if lifting is skipped (in particular when the
basis is `{1}`, or when only leading monomials are requested with `-g 1`)
the header prints the first modular prime rather than characteristic 0.

`msolve` also allows you to perform Groebner bases computations using
**one-block elimination monomial order**
Expand Down
4 changes: 4 additions & 0 deletions input_files/bad-div.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
x, y
0
x/2 - y,
y - 3
3 changes: 3 additions & 0 deletions input_files/bad-overflow-ff.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
x
65521
9223372036854775808*x
3 changes: 3 additions & 0 deletions input_files/bad-paren.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
x
0
x-(3+1)
3 changes: 3 additions & 0 deletions input_files/bad-star.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
x
0
*x
3 changes: 3 additions & 0 deletions input_files/good-leading-rat.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
x
0
1/2*x-1
3 changes: 2 additions & 1 deletion output_files/empty-elim-qq.g2.e2.res
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Reduced Groebner basis data
#---
#field characteristic: 0
#field characteristic: <unlifted prime>
#lifted to Q: no (first modular prime only)
#variable order: z
#monomial order: graded reverse lexicographical
#length of basis: 0 elements sorted by increasing leading monomials
Expand Down
8 changes: 8 additions & 0 deletions output_files/good-leading-rat.g2.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Reduced Groebner basis data
#---
#field characteristic: 0
#variable order: x
#monomial order: graded reverse lexicographical
#length of basis: 1 element
#---
[x-2]:
3 changes: 2 additions & 1 deletion output_files/one-qq.g2.res
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Reduced Groebner basis data
#---
#field characteristic: 0
#field characteristic: <unlifted prime>
#lifted to Q: no (first modular prime only)
#variable order: x, y, z
#monomial order: graded reverse lexicographical
#length of basis: 1 element
Expand Down
Loading