https://github.com/smimram/hyper
Hypergraph rewriting for PROPs
https://github.com/smimram/hyper
hypergraph ocaml rewriting
Last synced: 12 months ago
JSON representation
Hypergraph rewriting for PROPs
- Host: GitHub
- URL: https://github.com/smimram/hyper
- Owner: smimram
- Created: 2018-03-23T20:14:31.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-10T21:59:12.000Z (over 6 years ago)
- Last Synced: 2025-02-17T21:01:55.165Z (about 1 year ago)
- Topics: hypergraph, ocaml, rewriting
- Language: OCaml
- Homepage: https://smimram.github.io/hyper/
- Size: 135 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hyper
[Hypergraph](https://en.wikipedia.org/wiki/Hypergraph) [rewriting](https://en.wikipedia.org/wiki/Rewriting) in order to manipulate presentations of [PROPs](https://en.wikipedia.org/wiki/PRO_(category_theory)).
## Demo
You can see it [running live here](https://smimram.github.io/hyper/).
## Example session
Let's define the theory for [monoids](https://en.wikipedia.org/wiki/Monoid). We first need to add in generators for multiplication and unit
```
op m : 2 -> 1
op u : 0 -> 1
```
then we throw in the rules for associativity and unitality on left and right
```
rule ass : (m*1);m => (1*m);m
rule u-l : (u*1);m => 1
rule u-r : (1*u);m => 1
```
Note that `;` is sequential composition and `*` is tensor product.
We can then display the graph corresponding to a morphism
```
show (m*2);(m*1);m
```
or display it graphically
```
plot (m*2);(m*1);m
```
we can normalize it
```
normalize (m*2);(m*1);m
```
or even show the normalization
```
plotnormalize (m*2);(m*1);m
```
## Documentation
There is no proper documentation at the moment, the list of available commands can be found in [lang.ml](https://github.com/smimram/hyper/blob/master/src/lang.ml).