From 1b75e2552a66cf676d71b4e238715f55722f875f Mon Sep 17 00:00:00 2001 From: Kris Date: Tue, 1 Mar 2022 20:04:28 -0500 Subject: [PATCH] Fix silly bug, add function sigs to docstrings --- src/categorical_algebra/CSets.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/categorical_algebra/CSets.jl b/src/categorical_algebra/CSets.jl index cdbb72b92..a57aea47e 100644 --- a/src/categorical_algebra/CSets.jl +++ b/src/categorical_algebra/CSets.jl @@ -1115,19 +1115,19 @@ i.e. we cast the ACSet to a subobject (f::ACSetTransformation)(X::StructACSet)::SubACSet = X == dom(f) ? f(top(X)) : error("Cannot apply $f to $X") -""" +""" hom_inv(f::ACSetTransformation,Y::Subobject)::SubACSet Inverse of f:A->B as a map of subobjects of B to subjects of A. It can be thought of as `incident`, but for homomorphisms. """ hom_inv(f::ACSetTransformation,Y::Subobject)::SubACSet = begin - codom(hom(X)) == codom(f) || error("Cannot apply $f to $X") + codom(hom(Y)) == codom(f) || error("Cannot apply $f to $X") Subobject(dom(f); Dict{Symbol, Vector{Int}}( [k => vcat([preimage(f,y) for y in collect(components(Y)[k])]...) for (k,f) in pairs(components(f))])...) end -""" +""" hom_inv(f::CSetTransformation,Y::StructACSet)::SubACSet Inverse f:A->B as a map from subobjects of B to subobjects of A. Cast an ACSet to subobject, though this has a trivial answer when computing the preimage (it is necessarily the top subobject of A). @@ -1136,7 +1136,8 @@ hom_inv(f::CSetTransformation,Y::StructACSet)::SubACSet = Y = codom(f) ? top(dom(f)) : error("Cannot apply inverse of $f to $Y") -""" +""" induce_subobject(X::StructACSet{S}; vs...) + Takes a partially-specified ACSet subobject and completes it so that there are no undefined references.