Add proof references (WIP) - #319
Open
ScriptRaccoon wants to merge 3 commits into
Open
Conversation
ScriptRaccoon
force-pushed
the
proof-references
branch
2 times, most recently
from
August 3, 2026 21:22
dff6255 to
401c617
Compare
ScriptRaccoon
force-pushed
the
proof-references
branch
from
August 3, 2026 21:43
401c617 to
fdbfed4
Compare
ScriptRaccoon
marked this pull request as ready for review
August 3, 2026 21:43
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 is another attempt at #301, at least for a (substantial) sub-problem of it. Specifically, this PR adds proof references (along with proof labels) and therefore prevents proofs from referencing proofs that have been removed (for example, when an implication is added that handles it) or significantly altered; cf. 4041ddb for an example where this has happened.
59 labels and 100 references have been added.
Example usage
The proof that the simplex category$\Delta$ is cosifted now has a label
delta_cosifted:The proof for the walking coreflexive pair is now formally referencing it like so:
How to maintain references
The proofs that reference a given proof can easily be found in the code editor by searching for its (unique) label. They are also stored in the new
proof_referencestable. This table has a foreign key constraint on theproperty_assignmentstable, specifically the newlabelcolumn, which is how the references are verified. In other words, SQL ensures the integrity of the data.If a proof is changed significantly, we can now check (via the aforementioned search) whether all proofs referencing it still make sense. We might even change the label of the proof. If a proof with a label is removed, we need to fix the proofs that reference it. This was already necessary before, of course, but now we know exactly which proofs are affected.
Other dependencies
This PR does not guard against the case where a previously assigned property turns out to be wrong (this was the main goal of the closed PR #301), but this should be prevented by a good review process. Alternatively, we can handle this in a later PR.
For example, the proof that Ring does not have cofiltered-limit-stable epimorphisms references the fact that CRing does not have cofiltered-limit-stable epimorphisms, but this is not handled by this PR. One can argue that this is also not necessary, or at least much less important than proofs that actually reference other proofs. For example, the proof that Man does not have$\aleph_1$ -cofiltered limits literally continues the proof for Setc, so it needs to be checked that the latter exists and continues to exist.
Finding references
Since it was already very common to reference a proof via a link to the category page, the following query could be used to find proofs that potentially reference other proofs:
select structure_id, property_id from property_assignments where proof like '%/category%' and is_deduced = FALSE;For functors and morphisms, a similar query works. But still, much manual work was necessary. Also, it is likely that some (few) references have not been recorded yet.