AlgebraicJulia / ACSets.jl

ACSets: Algebraic databases as in-memory data structures
https://algebraicjulia.github.io/ACSets.jl/
MIT License
19 stars 8 forks source link

Maps between attrtypes in a schema #29

Closed kris-brown closed 1 year ago

kris-brown commented 1 year ago

When we do a $\Sigma$ migration, the chase is computed in an ACSet whose schema is the collage of the functor. This code works when the domain of that collage has no attributes, but it breaks when that's not true because one needs an explicit $\alpha_{Weight}$ map (for example) and a schema equation codifying the naturality square.

Allowing would be a conservative extension of ACSets. With Tight morphisms, the only nontrivial thing these morphisms can do is relate variables in one attrtype to another. In that case, implicitly an AttrHom between attrtypes A and B imposes a constraint that the Julia type associated with A is the same as the one for B.

Mathematically this is just relaxing the restriction that $S_1$ must be discrete, when viewing the schema as a profunctor $S_0 \nrightarrow S_1$.

epatters commented 1 year ago

This issue turns out to be a duplicate of the old issue #6. It was a good feature request then and is even more so now! Someone should do it :)