Skip to content

feat: parallel substitution typeclass; refactor strong normalization#583

Open
WegmannDavid wants to merge 1 commit into
leanprover:mainfrom
WegmannDavid:parallel-substitution
Open

feat: parallel substitution typeclass; refactor strong normalization#583
WegmannDavid wants to merge 1 commit into
leanprover:mainfrom
WegmannDavid:parallel-substitution

Conversation

@WegmannDavid
Copy link
Copy Markdown
Contributor

Added the HasParallelSubstitution type class and refactor of the StrongNorm Proof to use this type class. The type class is intended for a future pull request that will add a unification algorithm.

Add `HasParallelSubstitution` / `LawfulHasParallelSubstitution`: a notation typeclass for simultaneous substitution (the relative-monad structure, with `var` as unit and `psubst` as Kleisli extension), substitution composition, and the `MoreGeneral` (`≤ₚ`) preorder. Instantiate it for locally-nameless untyped λ-terms.

Refactor the strong-normalization proof's substitution layer: replace the sequential `multiSubst` (a fold of single substitutions) with the parallel `Term.psubst` applied to a finitely-supported assignment `Env`. Rename MultiSubst.lean to SubstEnv.lean.

Co-Authored-By: Claude Opus 4.7 (1M context) <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.

1 participant