Add Redundancy Tests#155
Merged
ScriptRaccoon merged 19 commits intomainfrom May 7, 2026
Merged
Conversation
3f5a01a to
5b68e0c
Compare
33cb1a1 to
3da0d03
Compare
all usages of this lemma could be removed before
3da0d03 to
e5cd7fa
Compare
a5315c6 to
b3eb49d
Compare
b762e82 to
1a0a7c0
Compare
dschepler
reviewed
May 7, 2026
Contributor
|
Looks good to me. |
Owner
Author
|
Thank you for having a look! |
31cf424 to
5718321
Compare
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 resolves #153 by adding a script
pnpm db:redundanciesthat checks for redundant assignments of properties.This PR also removes all 39 redundant assignments of unsatisfied properties. Some proofs generated by CatDat are quite clever, some are easy. It also removes 25 redundant assignments of satisfied properties.
For satisfied properties, I did not remove all redundant assignments, because in some cases, there were good reasons to keep them (see below). Accordingly, I also added an option to let the script skip these.
Documentation in Contribution Guidelines
"As noted above, avoid redundant property assignments to a category. To detect redundancies, run
pnpm db:redundancies.The script reports at most one redundant assignment per category for each of satisfied and unsatisfied properties, even if multiple exist. After removing an assignment, run the script again to ensure that all remaining redundancies are handled.
Removing redundant assignments is not required, but it is recommended, especially for all unsatisfied properties. For satisfied properties, removal depends on context: keep them if the proof is meaningful, otherwise consider removing them if it is purely technical or uninformative.
In particular, it often makes sense to keep a redundant assignment of a satisfied property in the following cases:
For example, you may first prove that a category has zero morphisms, and then prove that it is normal. Although the database contains the implication "normal => zero morphisms", in practice the latter is used as a prerequisite. Similarly, when proving that a category is extensive, it is often clearer to first show that finite coproducts exist, rather than relying on the implication "extensive => finite coproducts". Also, an explicit description of finite coproducts is useful for deciding other properties involving coproducts.
Every redundant assignment of a satisfied property that is intentionally kept must be explicitly marked to skip the redundancy check. See
N.sqlfor an example."How to keep redundant assignments
Example Output