Skip to content

Add tautology, contradiction and double negation to Proof Writing - #596

Merged
d-morrison merged 2 commits into
mainfrom
claude/project-thread-aj2ep4-logic-laws
Nov 3, 2026
Merged

d-morrison merged 2 commits into
mainfrom
claude/project-thread-aj2ep4-logic-laws

Conversation

@d-morrison

@d-morrison d-morrison commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

Merge before #599. Both add includes right after De Morgan's laws in _proof-writing.qmd, so #599 needs a one-hunk conflict fix after this merges.

Adds five blocks from mcs (CSCI 201), with an example after each of the first four:

  • tautology and contradiction;
  • equivalence as a tautological biconditional;
  • double negation;
  • why a proof by contradiction works (after thm-proof-by-contradiction).

The first review asked for an example after each block. Adding them took this PR past the size cap, so the distributive laws, the substitution theorem, negating a conditional and the conditional as an or moved to #599.

Part of #453 and of the mds/mcs consolidation plan (https://claude.ai/artifact/De8D2LiAwjX3fpLezVDdS7). Only definitions, theorems and proofs move from mcs; the examples here are new, and mcs keeps its own. Each block keeps its mcs id, so mcs can switch to the include without breaking a link.

Checked locally against gha main: check-term-links (0 errors), check-avoided-words and check-new-line-breaks are clean.

https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox


Generated by Claude Code

mcs (CSCI 201) defines these general results locally. Moving them here,
one block per subfile, lets mcs include them instead of keeping its own
copies, per the mds/mcs consolidation plan. Each block keeps its mcs id,
so no link in mcs breaks when it switches to the include.

Adds tautology, contradiction, equivalence as a tautological
biconditional, double negation, the distributive laws, replacing a part
by an equivalent part, negating a conditional, the conditional as an or,
and why a proof by contradiction works. The last proof is a full truth
table rather than mcs's pointer to an exercise solution.

Part of #453.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

The review of #596 asked for an example after each new definition and
result, as the rest of the Proof Writing page has. This adds one each
for tautology, contradiction, equivalence as a tautological
biconditional and double negation, and splits a long "where" clause in
the contradiction proof onto its own line.

Adding those examples takes the PR past the size cap, so the
distributive laws, the substitution theorem, negating a conditional
and the conditional as an or move to their own PR, with examples of
their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished review — View run


Review of PR #596 at 68e9c41

This round is clean. My earlier review (commit b6efdf1, Needs more work) is superseded. I did not render the site.

Earlier blocking items, now resolved

  • Missing examples (rule 3). _exm-tautology.qmd and _exm-contradiction.qmd now follow def-tautology and def-contradiction in _proof-writing.qmd. Each gives a correct two-row truth table: P ∨ ¬P is true in both rows, and P ∧ ¬P is false in both.
  • Examples for the remaining theorems. _exm-equivalence-iff.qmd and _exm-double-negation.qmd follow their theorems. The four-row biconditional table is correct, and the 7-is-odd example is sound.
  • Line breaks (rule 12). The long line in _thm-contradiction-works.qmd:20 is now split before "where".
  • Removed theorems. The commit drops thm-distributive, thm-substitution-logic, thm-negate-conditional and cor-conditional-as-or. That narrows the PR to the first four logic laws, so the examples I asked for on those are no longer needed. The two earlier suggestions, on _thm-substitution-logic.qmd:318 and _thm-equivalence-iff.qmd:268, are also moot for the removed file. I did not re-check the _thm-equivalence-iff.qmd link-check comment.
  • Line breaks in _thm-negate-conditional.qmd. The two rule 12 findings on that file are gone because the file is gone.

Checks on the new files

  • Cross-references.
    • #def-or, #def-not, #def-truth-table, #def-proposition, #def-logically-equivalent and #exm-logically-equivalent all exist.
    • number-systems.qmd#def-odd exists.
    • #def-tautology and #thm-equivalence-iff come earlier in the include order than the examples that cite them. There are no forward references.
  • One div per subfile. Each new subfile holds exactly one #exm- div.
  • Macros. The new math is only propositional connectives and truth tables, so no semantic-macro category applies.
  • Line breaks in the new examples. Each sentence starts a new line, and each line holds one clause.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "68e9c4194ca28ad8bec611d1013c9ccd7fa6de4d",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "New example subfiles for tautology, contradiction, equivalence-iff and double negation have correct truth tables and resolving links; the thm-contradiction-works line is split at the where clause.",
  "holistic_assessment": "The commit adds the requested examples after each definition and theorem, narrows scope to four logic laws, and keeps the include order free of forward references."
}

I fetched PR #596 just now. It is open, not a draft, and not merged. Its head is still 68e9c4194ca28ad8bec611d1013c9ccd7fa6de4d, the commit I reviewed.

The review above stands.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "68e9c4194ca28ad8bec611d1013c9ccd7fa6de4d",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "New example subfiles for tautology, contradiction, equivalence-iff and double negation have correct truth tables and resolving links; the thm-contradiction-works line is split at the where clause.",
  "holistic_assessment": "The commit adds the requested examples after each definition and theorem, narrows scope to four logic laws, and keeps the include order free of forward references."
}

Reviewed commit: 68e9c41

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2437 (review) — run

d-morrison pushed a commit that referenced this pull request Nov 3, 2026
The review of #597 asked for an example after each new definition and
result, as the rest of the Proof Writing page has. This adds one each
for domain of discourse, the quantifier laws, a biconditional as two
conditionals and a cycle of conditionals.

The quantifier theorem is renamed "De Morgan's laws for quantifiers",
with a remark saying why its two laws share one theorem, as De Morgan's
laws for propositions do. The cycle proof now splits into the all-false
case and the some-true case, and uses the definition of implies instead
of modus ponens, so it no longer needs the inference rules.

The biconditional and cycle results move before De Morgan's laws, so
this PR and #596 touch different lines of the page. Logical argument,
rule of inference and the inference rules move to their own PRs: the
review asked for premise and conclusion to get their own definitions
and for one rule per theorem, which does not fit under the PR size cap
here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox
@d-morrison d-morrison changed the title Add laws of propositional logic to Proof Writing Add tautology, contradiction and double negation to Proof Writing Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in 68e9c41:

  • Examples now follow tautology, contradiction, thm-equivalence-iff and double negation.
  • The where clause in the contradiction proof is on its own line.
  • The substitution theorem, negating a conditional and cor-conditional-as-or moved to Add the distributive laws and negating a conditional to Proof Writing #599, which restates the substitution claim exactly and adds their examples.

Rebutted: the check-term-links: allow comment on "truth value" stays. mds has no definition of truth value to link (no #def-truth-value anywhere in the repo), and the checker reads the phrase as the defined term "value".

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Cross-model review waived: OpenCode Go returned 429 (monthly usage limit) to a chat-completions probe at 17:32 UTC, and no other cross-model reviewer is reachable from this session. The Claude review is clean on 68e9c41 and CI is green. The head is one commit behind main (#598); that commit adds different includes to _proof-writing.qmd, GitHub reports the PR mergeable, and the publish build on main will confirm the combined page. Merging under Ezra's mwc grant.

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@d-morrison
d-morrison merged commit fb70020 into main Nov 3, 2026
41 checks passed
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-11-03 17:40 UTC

d-morrison pushed a commit that referenced this pull request Nov 3, 2026
Resolve the _proof-writing.qmd conflict by keeping #596's blocks first,
so thm-double-negation precedes its first use here. Also name P and Q in
the negate-conditional example, as the review suggested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox
d-morrison added a commit that referenced this pull request Nov 3, 2026
…ls to Proof Writing (#597)

* Add rules of inference and quantifier negation to Proof Writing

mcs (CSCI 201) defines these general results locally. Moving them here,
one block per subfile, lets mcs include them instead of keeping its own
copies, per the mds/mcs consolidation plan. Each block keeps its mcs id.

Adds domain of discourse, negating a quantifier, logical argument, rule
of inference, the common rules of inference (modus ponens and five
others; exm-formal-proof already uses modus ponens without naming it),
a biconditional as two conditionals, and a cycle of conditionals. The
inference rules sit after the notes on the entailment symbols, which
they use.

Part of #453.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox

* Add examples to #597 and move the inference rules out

The review of #597 asked for an example after each new definition and
result, as the rest of the Proof Writing page has. This adds one each
for domain of discourse, the quantifier laws, a biconditional as two
conditionals and a cycle of conditionals.

The quantifier theorem is renamed "De Morgan's laws for quantifiers",
with a remark saying why its two laws share one theorem, as De Morgan's
laws for propositions do. The cycle proof now splits into the all-false
case and the some-true case, and uses the definition of implies instead
of modus ponens, so it no longer needs the inference rules.

The biconditional and cycle results move before De Morgan's laws, so
this PR and #596 touch different lines of the page. Logical argument,
rule of inference and the inference rules move to their own PRs: the
review asked for premise and conclusion to get their own definitions
and for one rule per theorem, which does not fit under the PR size cap
here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox

* Break the example lines in #597 at each clause

The review asked for one clause per line in the biconditional and cycle
examples. Also reword "every integer is not even" to the unambiguous
"no integer is even", and state the pairing in the remark instead of
claiming a reason the linked theorem does not give.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox

* Link the first use of negation in the quantifier-negation example and remark

#598 links "negation" to def-not, so check-term-links now treats it as a
defined term and flags these unlinked first uses after the merge of main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox

* Fix the quantifier examples flagged in the faed525 review of #597

- exm-domain-of-discourse no longer writes the existential quantifier,
  which the page defines later, so it has no forward reference.
- exm-equivalent-cycle puts its two "let" clauses on separate lines.
- exm-negate-quantifiers applies both laws to the S and P(x) it sets up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox

* Reword the conditional step in the equivalent-cycle proof

The proof called Q the conclusion of a true conditional. #600 made
conclusion a defined term for arguments, later on the page, so the word
now reads as an unlinked first use (check-term-links) and linking it
would be a forward reference. State the step in symbols instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox

* Break the conditional step at its clauses and introduce P and Q

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9pMBq15Hq3DgNBx1ox

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants