Skip to content

docs(FOL): adopt a consistent terminology for the semantics - #34

Merged
arademaker merged 4 commits into
mainfrom
docs/fol-semantics-terminology
Oct 14, 2026
Merged

arademaker merged 4 commits into
mainfrom
docs/fol-semantics-terminology

Conversation

@arademaker

Copy link
Copy Markdown
Member

Summary

Revises the semantics section of CSwL/Logic/FOL.lean so that it follows one terminology throughout: signature → structure → assignment → satisfaction → model.

  • Structures are written 𝒜 = (D, I), or (D, I, F) with function symbols, in inline math. This replaces 𝔸 and E; E clashed with the predicate E of the L₁ example.
  • "Interpretation" now means only I, and "assignment" only g. The text also spells out what g[v := d] returns.
  • Satisfaction is written 𝒜 ⊨ α [g], and 𝒜 ⊨ α for sentences. The second notation is dropped because it conflated satisfaction with consequence.
  • A model of α is defined as a structure that satisfies it. Consequence and counterexamples are stated in terms of models and structures, and the docstrings of Formula.Valid and Formula.Satisfiable now say "structure".
  • ⊨ (U+22A8) replaces ⊧ (U+22A7) everywhere.
  • A few sentences in the syntax section are reworded, and typos are fixed.

Verification

  • make student builds.
  • Each of the 22 distinct inline math expressions in the rendered FOL page passes through the bundled KaTeX without errors.

Follow-ups (not in this PR)

  • Bundle (D, I, F) into a Lean structure, possibly aligned with Mathlib's FirstOrder.Language.Structure.
  • Revisit why Valid/ValidT and Implies/ImpliesL both exist, and whether domains should be required to be Nonempty.

🤖 Generated with Claude Code

Follow the sequence signature, structure, assignment, satisfaction,
model throughout the semantics of FOL:

- write structures as 𝒜 = (D, I), or (D, I, F) with function symbols,
  in inline math, replacing 𝔸 and E, which clashed with the predicate E
- reserve "interpretation" for I and "assignment" for g, and spell out
  what g[v := d] returns
- write satisfaction as 𝒜 ⊨ α [g], and 𝒜 ⊨ α for sentences; drop the
  second notation, which conflated satisfaction with consequence
- define a model of α as a structure that satisfies it, and state
  consequence and counterexamples in terms of models and structures
- use ⊨ (U+22A8) instead of ⊧ (U+22A7) throughout
- tighten the wording of a few sentences in the syntax section
- fix typos

AI-assisted: the terminology was discussed with an AI assistant, which
also proposed the revised wording and typo fixes; every change was
reviewed and approved by the author.
Copilot AI balanced review requested due to automatic review settings October 14, 2026 00:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Functional-symbol semantics are misstated, and the old consequence symbol remains in the PL chapter.

2 open findings
What changed in this PR

Standardizes terminology and notation in the FOL semantics chapter.

Changes:

  • Clarifies structures, assignments, satisfaction, models, and consequence.
  • Adopts ⊨ notation and updates API documentation.
  • Corrects and refines Portuguese prose.
File Description
CSwL/​Logic/​FOL.lean Revises FOL semantic terminology, notation, and explanations.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CSwL/Logic/FOL.lean Outdated
Comment thread CSwL/Logic/FOL.lean Outdated
FOL:
- spell out when a term is free for a variable: state the equivalent
  scope criterion, explain why each example is or is not free, make
  explicit that substitution only affects free occurrences
- rate ex-fol-valid and ex-fol-consequence 5 instead of 2
- reflow the statement of the closedForm exercise

Proof:
- say that ∨ is inclusive where its rules are introduced
- move the exchange exercise, renamed prop-exchange, next to the
  presentation of the connectives, and note that its argument is invalid
- add a section on invalid arguments and counterexamples
- present simp, simp only and simp … at h, and move them in the
  STYLE-CODE.md ledger from PL to Proof

PL:
- fix typos

AI-assisted: typo fixes were drafted with an AI assistant; every
change was reviewed and approved by the author.
@arademaker
arademaker merged commit 69e7c7d into main Oct 14, 2026
1 check passed
@arademaker
arademaker deleted the docs/fol-semantics-terminology branch October 14, 2026 03:42
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