Skip to main content

check-corollary-sources.yml

Diff-scoped, warn-only check for the lab’s rule (Ezra, 2026-11-16; psw’s Using theorem environments in Quarto section) that a corollary follows directly from one earlier result and names that result. A corollary that names nothing leaves the reader to guess what it follows from, and is usually a proposition typed as a corollary.

The check flags a #cor- div whose statement and proof name no earlier result. A result is named by either:

The check reads the corollary’s proof in any of three places:

The corollary’s own id does not count, and neither does a citation inside a comment or a code fence. A corollary that follows from a definition or an axiom alone is exempt with <!-- check-corollary-sources: allow: reason --> in the div or its proof; a pragma with no reason does not exempt it.

Whether a result is central, smaller, or a proof step is a judgment that no pattern can make, so the rest of the rule is a review item.

A corollary is checked when the pull request adds a line inside it or its proof. With no base to diff against, the check skips instead of scanning the whole tree. It only warns by default; set fail: true after a measured corpus shows no false positive.

Inputs

Input Default Meaning
globs *.qmd Git pathspecs of tracked files to check (recursive)
paths-ignore none Comma or newline separated globs to skip
fail false Fail on a finding; false warns
whole-tree false Check every corollary, to measure a corpus
python-version 3.x Python version
runs-on empty (CI_RUNNER variable, else ubuntu-latest) Runner label; a self-hosted label only for a private repository

Usage

Copy examples/check-corollary-sources.yml to .github/workflows/check-corollary-sources.yml.