Refactor associated structures - #334
Merged
Merged
Conversation
ScriptRaccoon
force-pushed
the
structure-map-assignments
branch
from
August 14, 2026 21:23
e655bf8 to
0c95bd0
Compare
ScriptRaccoon
force-pushed
the
structure-map-assignments
branch
from
August 15, 2026 06:25
0c95bd0 to
a9f103d
Compare
ScriptRaccoon
force-pushed
the
structure-map-assignments
branch
from
August 15, 2026 08:13
393d872 to
1af32fb
Compare
…e_map_assignments` to `associated_structures`
ScriptRaccoon
marked this pull request as ready for review
August 15, 2026 09:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves the way associated structures (e.g. the codomain of a functor, the right adjoint of a functor, the underlying category of a symmetric monoidal category, the ambient category of a morphism, etc.) are handled throughout the codebase.
functors,morphisms, andsymmetric_monoidal_categories(e.g. to store the underlying category of a symmetric monoidal category), there is now a unifiedassociated_structurestable. It refers to theassociated_structure_typestable, which was previously calledstructure_maps. This was the main motivation of this PR because the previous tables did not formally interact with the structure maps table.categoriestable needs to remain because it stores the description of objects and morphisms of a given category, which is not an associated structure. (This might also be removed in the future by simply writing this information into the description field.)left_adjointandright_adjointare now also associated structure types. This makes it possible to handle adjoint functors without treating them as separate concepts. As a nice byproduct (and proof that this is the right approach), functor implications can now also have assumptions on their left or right adjoints. (At least, theoretically this works now. This needs to be explored in a future PR.)structurestable for now.Associated Structure Types
Updated database diagram
Click for a larger version. Interestingly, not a single table mentions functors, morphisms, or symmetric monoidal categories anymore. The support for them is entirely handled by the entries of the
structure_typestable.