AlgebraicJulia / AlgebraicJulia/Catlab.jl
Support for Commutative Diagrams
- Ngôn ngữ chính
- Julia
- Star
- 724
- Fork
- 73
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Could we represent commutative diagrams in Catlab? Isn't a diagram `D` in category `C` just a functor `F: D --> C`. The data you pass to the `functor` function specifies a map from objects/homs of `D` to objects/homs of `C`. So having a struct for that input (rather than passing it as a tuple of arguments to a function would be a good first step. One of the benefits would be to make drawing commutative diagram as easy as it is currently to draw wiring diagrams.
I'm thinking of the fact that many data structures can be described with a commutative diagram and then an instance of that structure is a functor into **Set**. Like for example a graph `G` is a functor `G: Gr --> Set` where **Gr** is

We could define julia types diagrams whose instances are functors into **Set** and then do pushouts to represent a type of multiple inheritance. If you have a functor `F:A-->B` between diagrams, and interpret `S:A-->Set, T:B-->Set` as instances of those types and then a natural transformation `alpha(F): S-->T`. If you build a span of types `F:A-->B, G:A-->C` then you can do a push `G` along `F` to get a type `B+C`. And you want a functor `U: B+C --> Set` to be an instance of `B+C` consistent with `S` and `T`
Types that are like graphs with metadata are good candidate for this framework. For example, I want a graph where every edge has a weight, every vertex has a color which in inherits from `Graph`. Another type of graph has positions on the earth for each vertex and a population for each position. I can combine these types to get "graphs where each edge has a weight and each vertex has a color and position, and those positions have populations."

Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.