# Quickstart
This five‑minute guide gets you from zero to a working algebra and a compiled expression.
## Installation
Add Reefer to your manifest (not on crates.io yet):
```toml
[dependencies]
reefer = { git = "https://github.com/kgullion/reefer", branch = "main" }
```
> **Heads up:** building the default CAS backend compiles GMP/MPFR through `rug`, which requires the `m4` macro processor to be available during the build. Install it via your system package manager (for example, `sudo apt install m4` on Debian/Ubuntu or `brew install m4` on macOS) before running `cargo build`.
## Example CGA 2D
```rust
#[reefer::algebra(f32, 3, 1)]
mod cga2d {
basis! { e0 = P0 + N0 }
basis! { eI = P0 - N0 }
basis! { e1 = P1 }
basis! { e2 = P2 }
#[derive(Debug, Clone, Copy, PartialEq)]
shape!(Vector { e0, eI, e1, e2 });
}
// Use the generated `expr!` macro to build expressions:
// Methods are available directly on symbolic values:
let norm = cga2d::expr!(|| (e1 + e2).norm_squared())();
let rotor = cga2d::expr!(|| ((-0.5 * (e1 ^ e2)).exp()))();
// Closures can take typed arguments too
r.sandwich(v)
});
let result = reflect(mv);
```
- Operators: `*` (geometric), `^` (wedge), `|` (inner), `&` (regressive/meet)
- Methods: `.reverse()`, `.dual()`, `.undual()`, `.left_contract(rhs)`, `.right_contract(rhs)`, `.complement()`, `.conjugate()`, `.automorphism()`, `.sandwich(x)`, `.exp()`, `.sqrt()`, `.norm_squared()`, `.scalar()`
- Shapes returned from `expr!` are concrete structs. Inspect the generated module to see fields.
See the “Expressions & Operators” chapter for details.