AlgebraicJulia / Catlab.jl

A framework for applied category theory in the Julia language
https://www.algebraicjulia.org
MIT License
599 stars 56 forks source link

Keyword argument for sending attrvars to other attrvars #916

Closed kris-brown closed 3 days ago

kris-brown commented 6 days ago

In homomorphism search, we can sometimes have free floating AttrVars in the domain which can in principle be bound to any concrete value, which means infinite possible homomorphisms (we throw an error in this case). However, if we have the constraint that AttrVars are sent to other AttrVars, it becomes a finite search problem again.

This constraint isn't exactly the same thing as monic, so it deserves a different name. Perhaps bind=true.[^1] When bind=false, it should be impossible to trigger the error for searching for morphisms from free-floating variables.

[^1]: Like monic, this could be componentwise too. E.g. bind=[:Weight]