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
46
47
48
49
50
//! # plonkish-cat
//!
//! A `PLONKish` circuit system built on comp-cat-rs's categorical
//! infrastructure.
//!
//! Circuits form a **symmetric monoidal category** where:
//! - Objects = wire counts
//! - Morphisms = gadgets (constraint-generating sub-circuits)
//! - Composition = sequential wiring
//! - Tensor product = parallel placement
//! - Braiding = wire permutation
//!
//! The free category on the `PLONKish` graph of primitive gates
//! provides the circuit DSL. Paths are composed circuits.
//! The [`compile`] function interprets paths into constraint sets
//! via the universal property of free categories.
//!
//! ## Quick start
//!
//! ```rust
//! use plonkish_cat::*;
//! use comp_cat_rs::collapse::free_category::{Edge, Path};
//!
//! // Build the standard `PLONKish` graph.
//! let graph = PlonkishGraph::<F101>::standard();
//!
//! // Compose: dup (1 -> 2) then mul (2 -> 1) = squaring circuit.
//! let dup = Path::singleton(&graph, Edge::new(3)).unwrap();
//! let mul = Path::singleton(&graph, Edge::new(1)).unwrap();
//! let square = dup.compose(mul).unwrap();
//!
//! // Compile to constraints.
//! let constraints = compile(&graph, &square).unwrap();
//! ```
pub use Error;
pub use ;
pub use ;
pub use Expression;
pub use ;
pub use ;
pub use compile;