commutator_rs/lib.rs
1//! # commutator-rs
2//!
3//! A Rust library for commutator operations.
4//!
5//! ## Quick Start
6//!
7//! ```rust
8//! use commutator_rs::{prelude::*, comm};
9//!
10//! let x = CommutatorTerm::Atom { coefficient: 1, atom: 'x' };
11//! let y = CommutatorTerm::Atom { coefficient: 1, atom: 'y' };
12//!
13//! // Using the trait method
14//! let result1 = x.commutator(&y);
15//!
16//! // Using the comm! macro
17//! let result2 = comm![x, y];
18//! assert_eq!(result1, result2);
19//! ```
20
21pub mod commutator;
22pub mod formal_indeterminate;
23
24// Re-export main types at crate root
25pub use commutator::{Commutator, CommutatorTerm};
26pub use formal_indeterminate::FormalIndeterminate;
27
28/// Prelude module for imports
29pub mod prelude {
30 pub use crate::commutator::{Commutator, CommutatorTerm};
31 pub use crate::formal_indeterminate::FormalIndeterminate;
32}