Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subobject classifier + Internal hom for C-Sets #786

Merged
merged 11 commits into from
Jul 20, 2023

Conversation

kris-brown
Copy link
Contributor

@kris-brown kris-brown commented May 24, 2023

Combines subacset search with computation of representables.

Tested on DDS (with equations to make the repr finite), Grph, and ReflGrph.

A change to SigmaMigration was needed because the previous implementation threw away the diagram map data (how the input CSet is related to the output CSet). Maybe should return a proper DiagramHom, but for now it's just the result ACSet + a dictionary of the diagram map components.

Shoutout to @KevinArlin for helping me work out where the homs go in the subobject classifier + internal hom constructions!

@kris-brown kris-brown changed the title Subobject classifier for C-Sets Subobject classifier + Internal hom for C-Sets May 24, 2023
Copy link
Member

@epatters epatters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Kris! Wonderful to see how slickly we can now implement these features.

I left a few comments below.

Also, I would like to have a generic interface for subobject classifiers and internal homs, which we would then implement for FinSet as well as C-Set. However, that can wait for a future PR.

src/categorical_algebra/CSets.jl Outdated Show resolved Hide resolved
src/categorical_algebra/DataMigrations.jl Outdated Show resolved Hide resolved
src/categorical_algebra/DataMigrations.jl Outdated Show resolved Hide resolved
test/categorical_algebra/DataMigrations.jl Outdated Show resolved Hide resolved
src/categorical_algebra/DataMigrations.jl Outdated Show resolved Hide resolved
@kris-brown
Copy link
Contributor Author

kris-brown commented May 25, 2023

For future reference, we had to change the definition of DiagramHom to not constrain one of its type parameters to be a FinTransformation in order for the Julia compiler to not freeze up when the following code (which seems like it should work) is run

@present ThInitial(FreeSchema) begin
  I::Ob
end
@acset_type Initial(ThInitial)
I = generators(ThInitial)[1]
G = path_graph(Graph,3)
dG = FinDomFunctor(G)

bang = FinFunctor(
  Dict(:E => :I, :V => :I),
  Dict(:src => id(I), :tgt => id(I)),
  SchGraph, ThInitial)
I1 =FinDomFunctor(apex(terminal(Initial)))
α = Dict(:V=>FinFunction([1,1,1]), :E=>FinFunction([1,1]))

DiagramHom{id}(bang, α, dG, I1)

Kris Brown added 3 commits July 18, 2023 13:45
Diagrams comes before CSets now
Accessor to get the ACSet of an ACSetFunctor
Add schema equations to ACSetFunctor

components kw for sigma migration to return a diagram morphism
@epatters epatters merged commit fa9138b into AlgebraicJulia:main Jul 20, 2023
13 checks passed
@kris-brown kris-brown deleted the subobj_classy branch September 5, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants