is_monic for free simple model morphisms, initializing hom search, monic search constraint #204
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 adds some related features which combine in a test which states (informally)
simple_paths(G, x, y)
is equal tohomomorphisms(walking_edge, G; initial=(walking_src -> x, walking_tgt -> y))
(in the case of all the object/morphism types being the same). This is done for an arbitrary model with lots of loops, but in general could be a nice thing to property-based-test in the future.Now, a path is simple if it has no repeated generating morphisms (before it couldn't repeat objects except for beginning and end). A model morphism is simple if all generators are sent to simple paths.
This PR additionally adds a check for whether a morphism is monic (conditional on it being free and simple).
Initializing hom search merely adds some clauses to the
search
function which check, before looping through possible ob/mor assignments, if the ob/mor has already been preassigned. Future work will go into making this more efficient by playing with the order which the algorithm attempts assignments to improve performance.