alga2 0.1.0

A modern abstract-algebra hierarchy for Rust — the successor to alga, powered by batch-impl
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Lie algebras.
//!
//! A Lie algebra is a magma whose bracket is alternating (`[a, a] == 0`) and
//! satisfies the Jacobi identity — the infinitesimal structure behind Lie
//! groups, rotations (the cross product is the 3D example) and the matrix
//! commutator `[A, B] = AB − BA`.

use crate::op::Operator;

use super::Magma;

/// A Lie algebra: a magma with an alternating, Jacobi-satisfying bracket
/// (laws in `crate::laws`).
pub trait LieAlgebra<Op: Operator>: Magma<Op> {
    /// The Lie bracket `[self, other]`.
    fn bracket(&self, other: &Self) -> Self;
}