1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Groebner Basis
//!
//! This library computes Groebner bases of polynomial ideals, using the Buchberger and F4
//! algorithms.
//!
//! # Example
//! ```
//! use groebner::{groebner_basis, is_groebner_basis, MonomialOrder, PolynomialRing};
//! use num_rational::BigRational;
//!
//! let ring = PolynomialRing::<BigRational>::new(["x", "y"], MonomialOrder::Lex)?;
//! let f1 = ring.parse("x^2 - y")?;
//! let f2 = ring.parse("x*y - 1")?;
//! let basis_result = groebner_basis(vec![f1, f2], MonomialOrder::Lex, true);
//! match basis_result {
//! Ok(basis) => {
//! assert!(!basis.is_empty());
//! match is_groebner_basis(&basis) {
//! Ok(true) => {}
//! Ok(false) => panic!("Basis is not a Groebner basis!"),
//! Err(e) => panic!("Groebner basis check failed: {}", e),
//! }
//! }
//! Err(e) => panic!("Groebner basis computation failed: {}", e),
//! }
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
pub use Field;
pub use filter_gm_pairs;
pub use ;
pub use ;
pub use ;
pub use ;