Skip to content

refactor: unify ℒₒᵣ/ℒₛₑₜ syntax type aliases#837

Merged
SnO2WMaN merged 3 commits into
masterfrom
sentence-alias-refactor
Jul 4, 2026
Merged

refactor: unify ℒₒᵣ/ℒₛₑₜ syntax type aliases#837
SnO2WMaN merged 3 commits into
masterfrom
sentence-alias-refactor

Conversation

@SnO2WMaN

@SnO2WMaN SnO2WMaN commented Jul 4, 2026

Copy link
Copy Markdown
Member

Bare Sentence ℒₒᵣ / Sentence ℒₛₑₜ and their aliases were mixed throughout the codebase, and the set-theory side had almost no aliases at all. This continues #806 (fixing #803), redone on top of the current master and adapted to the present FirstOrder design (#794).

Changes

  • Complete the alias families for both ℒₒᵣ and ℒₛₑₜ, covering every syntax level:
    Semiterm / Term / Semiformula / Formula / Semisentence / Sentence / Semiproposition / Proposition / Theory.
    • Arithmetic: ArithmeticSemiterm, ArithmeticTerm, ArithmeticSemiformula, ArithmeticFormula, ArithmeticSemisentence, ArithmeticSentence, ArithmeticSemiproposition, ArithmeticProposition, ArithmeticTheory.
    • Set theory (newly added): SetTheorySemiterm, SetTheoryTerm, SetTheorySemiformula, SetTheoryFormula, SetTheorySemisentence, SetTheorySentence, SetTheorySemiproposition, SetTheoryProposition (alongside the existing SetTheory := Theory ℒₛₑₜ).
  • Replace bare <syntax> ℒₒᵣ / <syntax> ℒₛₑₜ occurrences with the corresponding aliases throughout.
  • Relocate the arithmetic alias family from FirstOrder/Basic/Syntax/Formula.lean into FirstOrder/Arithmetic/Basic/Misc.lean, mirroring how the set-theory aliases live in FirstOrder/SetTheory/Basic/Misc.lean. The generic Semisentence / Semiproposition / Proposition (parameterized by L : Language) stay in Formula.lean.

Notes

Fixes #803

🤖 Generated with Claude Code

SnO2WMaN and others added 3 commits July 4, 2026 11:43
…ence`/`SetTheorySentence`

Add the `SetTheorySentence := Sentence ℒₛₑₜ` alias to mirror the existing
`ArithmeticSentence := Sentence ℒₒᵣ`, and replace bare `Sentence ℒₒᵣ` /
`Sentence ℒₛₑₜ` occurrences with the aliases. The extended-language
`Sentence ℒₒᵣ⋆` and the alias definitions themselves are left untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce the full set-theory alias family in `SetTheory/Basic/Misc.lean`
(`SetTheorySemiformula`, `SetTheoryFormula`, `SetTheorySemisentence`,
`SetTheorySemiproposition`, `SetTheoryProposition`), mirroring the existing
arithmetic family, and replace bare `Semiformula`/`Formula`/`Semisentence`/
`Sentence`/`Semiproposition`/`Proposition`/`Theory` applied to `ℒₒᵣ`/`ℒₛₑₜ`
with the corresponding aliases throughout.

Following the current `FirstOrder` redesign (#794), term-level aliases
(`Semiterm`/`Term`) are intentionally left bare, as is the extended language
`ℒₒᵣ⋆`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…Arithmetic/Basic/Misc.lean`

- Add term-level aliases `ArithmeticSemiterm`/`ArithmeticTerm` and
  `SetTheorySemiterm`/`SetTheoryTerm`, and replace bare `Semiterm`/`Term`
  applied to `ℒₒᵣ`/`ℒₛₑₜ` with them.
- Move the whole arithmetic alias family out of `Basic/Syntax/Formula.lean`
  into `Arithmetic/Basic/Misc.lean`, mirroring how the set-theory aliases live
  in `SetTheory/Basic/Misc.lean`. The generic `Semisentence`/`Semiproposition`/
  `Proposition` stay in `Formula.lean`.
- The lone upstream `#check` in `Basic/BinderNotation.lean` keeps the bare
  `Semiterm ℒₒᵣ`, since it precedes the alias definitions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SnO2WMaN SnO2WMaN merged commit a1733b5 into master Jul 4, 2026
4 checks passed
@SnO2WMaN SnO2WMaN deleted the sentence-alias-refactor branch July 4, 2026 19:55
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.

ℒₒᵣ / ℒₛₑₜ-Sentence to ArithmeticSentence / SetTheorySentence

1 participant