Skip to content

Commit 3ed8655

Browse files
committed
document redundancy script
1 parent b3eb49d commit 3ed8655

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ When contributing new data (categories, functors, properties, implications), ple
110110

111111
- **Reduce Unknowns**: Try to reduce the number of unknown properties of categories, in particular when adding a new category. Use the category detail page to see its unknown properties. Use the [page with missing data](https://catdat.app/missing) to identify categories with unknown properties. The same remarks apply to functors.
112112

113-
- **Atomic Properties**: Only assign properties to a category or functor that cannot be deduced from other properties (satisfied or not). For example, if a category is complete, add the property "complete", but do not add "terminal object". The application infers this property automatically.
113+
- **Avoid redundant assignments**: Only assign properties (satisfied or not) to a category or functor if they cannot be deduced from other assignments. For example, if a category is complete, record that it is complete, but do not also record that it has a terminal object; the application infers this automatically. Redundant assignments can be identified using the redundancy script described below.
114114

115115
- **No dual categories**: Instead of adding the dual of a category already in the database, consider adding properties to the original category (use the corresponding dual properties).
116116

@@ -138,6 +138,26 @@ When contributing new data (categories, functors, properties, implications), ple
138138

139139
- **New Combinations**: Add new categories that satisfy combinations of satisfied properties and unsatisfied properties and not yet in the database. For example, you may add a category that is abelian but neither cocomplete nor essentially small (if it is not already present). The [page with missing data](https://catdat.app/missing) lists consistent combinations of the form $p \land \neg q$ that are not yet witnessed by a category in the database. The same remarks apply to functors.
140140

141+
### Redundancy Script
142+
143+
As noted above, avoid redundant property assignments to a category. To detect redundancies, run `pnpm db:redundancies`.
144+
145+
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.
146+
147+
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.
148+
149+
In particular, it often makes sense to **keep** a redundant assignment of a satisfied property in the following cases:
150+
151+
- The proof for the property is straight forward anyway (e.g. showing that a category is pointed).
152+
- The proof provides useful insight.
153+
- The proof constructs objects (especially limits or colimits) that are used later.
154+
- Removing the assignment would lead to an overly complex deduction generated by _CatDat_.
155+
- The proof establishes an intermediate result that is used as an assumption in a later argument.
156+
157+
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.
158+
159+
Every redundant assignment of a satisfied property that is intentionally kept must be explicitly marked to skip the redundancy check. See `N.sql` for an example.
160+
141161
### Keep Pull Requests Focused
142162

143163
Please keep each pull request limited in scope. Large pull requests are harder to review, more likely to conflict with ongoing changes on the main branch, and more difficult to merge cleanly.

DATABASE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Further tables are:
3333
- `special_morphisms`
3434
- `related_category_properties`
3535
- `category_comments`
36+
- `category_property_comments`
3637
- `lemmas` (a flexible variant of implications)
3738

3839
For functors there are similar tables, such as:
@@ -64,6 +65,10 @@ Use `pnpm db:update` to run all the commands in sequence: `pnpm db:seed`,`pnpm d
6465

6566
Use `pnpm db:watch` to run this command automatically every time a file in the subfolder [/databases/catdat/data](/databases/catdat/data) changes. This is useful in particular during development.
6667

68+
## Redundancies
69+
70+
There is another script that intentionally does not run with each update: `pnpm db:redundancies` checks for redundant assignments of properties ot categories.
71+
6772
## Diagram
6873

6974
This is the database schema as of 24.04.2026; changes may occur.

0 commit comments

Comments
 (0)