Lectures onType Theory
ch:cubical-demorgan: ch:cubical-demorgan
appendix sectiontutorials

ch:cubical-demorgan: ch:cubical-demorgan

Exercise 217.22.

Problem and invariant. Construct the truth-table evaluation and overlap checking required by the seminar. Maintain the invariant that De Morgan face formulas is accepted only when every locally checked premise represented by the finite model holds.

Two representations. One can use normalized disjunctive face formulas. The companion instead uses syntax trees compared on the two endpoint assignments. The first presentation prevents more malformed states; the second keeps each rejection visible and gives a small negative corpus.

First complete version. Evaluate constants and variables, add reversal and connections, then compare overlapping branches extensionally. After each stage, add one positive case and one nearby malformed case before extending the syntax.

Observable result. The accepted corpus prints four named PASS lines and then All 4 demorgan-face-normalizer cases passed. A rejected input is represented by a false decision or None; the main oracle negates that result when rejection is expected.

A failing version. Interpret reversal as the identity. This mutation still typechecks, but changes at least one named oracle, so the inline test harness exits nonzero.

Acceptance test. Run the four commands in appendix E. Require a silent check, one passing inline test, the exact five-line run transcript, and an empty audit. Restore the accepted source after replaying the mutation and repeat all four commands.

Mathematical boundary. The program decides the finite representation and cases just described. It does not prove the chapter’s general theorem; that proof remains the local argument or exact import in the main text.

Search the book

Type to search the local edition.