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
//! Star semirings (Kleene star).
//!
//! A semiring with a unary `a*` satisfying the closure laws `1 + a·a* == a*`
//! and `1 + a*·a == a*` — the algebraic home of regular languages, path
//! problems in graphs, and the boolean semiring's iteration.

use crate::op::Operator;

use super::Semiring;

/// A semiring with a Kleene star.
pub trait StarSemiring<Oa: Operator, Om: Operator>: Semiring<Oa, Om> {
    /// The Kleene star `a*` (the closure of `a` under the operation).
    fn star(&self) -> Self;
}