Skip to content

refactor: 1. split Plfl/Init to 3 files, 2. update version to v4.31.0#18

Merged
rami3l merged 1 commit into
rami3l:masterfrom
srghma:refactor2
Jun 18, 2026
Merged

refactor: 1. split Plfl/Init to 3 files, 2. update version to v4.31.0#18
rami3l merged 1 commit into
rami3l:masterfrom
srghma:refactor2

Conversation

@srghma

@srghma srghma commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

the only interesting thing is that when PDecidable is written as class - need to use @[reducible] on functions that return PDecidable

@srghma srghma force-pushed the refactor2 branch 4 times, most recently from 92edc40 to 69194b9 Compare June 16, 2026 17:15
Comment thread Plfl/Init/PDecidable.lean Outdated
@@ -0,0 +1,45 @@
module

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

For this I think it'd be reasonable to wait for the mathlib people on leanprover-community/mathlib4#39751.

  • Maybe it's useful and we can just use the mathlib type once included?
  • Or this is not useful enough and the introduction of this type makes little sense?
  • Or Decidable' was my bad hack and the proof can be done otherwise? I didn't have time to check...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will make pr, but dont I think they will merge it

Comment thread Plfl/Init/Lemmas.lean

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Human review recommended

It includes a toolchain/dependency bump plus a cross-cutting refactor of foundational modules/types, which warrants a human-verified full build and downstream impact check.

Pull request overview

This PR refactors the project’s foundational “Init” layer by splitting it into separate modules, introduces PDecidable as a replacement for the former Decidable', and updates downstream modules accordingly; it also bumps the Lean/mathlib toolchain versions and adjusts a handful of proofs/definitions to remain compatible.

Changes:

  • Replace Decidable' with PDecidable (as an inductive class) and update inference code to use .isTrue/.isFalse.
  • Split Plfl.Init into Plfl.Init.Tactics, Plfl.Init.Lemmas, and Plfl.Init.PDecidable, updating imports across the codebase (and removing Plfl/Init.lean).
  • Bump Lean + mathlib versions (and update Lake config/manifest), with small proof tweaks and converting some non-typeclass instance declarations to def.
File summaries
File Description
Plfl/Untyped/Substitution.lean Proof adjustment to work with the refactor (simp/convert changes).
Plfl/Untyped/Denotational/Soundness.lean Proof tweaks to preserve soundness lemmas after refactor.
Plfl/Untyped/Denotational/ContextualEquivalence.lean Drop Plfl.Init import; rely on updated import graph.
Plfl/Untyped/Denotational/Compositional.lean Drop Plfl.Init import; rely on updated import graph.
Plfl/Untyped/Denotational/Adequacy.lean Drop Plfl.Init import; rely on updated import graph.
Plfl/Untyped/Denotational.lean Drop Plfl.Init import; rely on updated import graph.
Plfl/Untyped/Confluence.lean Convert non-typeclass instance equivalence to def and tweak pattern-matching proof style.
Plfl/Untyped/BigStep.lean Drop Plfl.Init import; rely on updated import graph.
Plfl/Untyped.lean Convert non-typeclass instance equivalences to def and drop Plfl.Init import.
Plfl/More/Inference.lean Switch from Decidable' to PDecidable throughout bidirectional inference and examples.
Plfl/More/DoubleSubst.lean Update imports to pull in the split Init pieces explicitly.
Plfl/More/Bisimulation.lean Drop Plfl.Init import; rely on updated import graph.
Plfl/More.lean Adjust Init import strategy as part of the split.
Plfl/Lambda/Properties.lean Update Init import usage and convert non-typeclass instance equivalences to def.
Plfl/Lambda.lean Drop Plfl.Init import and convert a non-typeclass instance embedding to def.
Plfl/Init/Tactics.lean New module extracted from former Plfl.Init (defines is_empty tactic).
Plfl/Init/PDecidable.lean New PDecidable definition plus helpers (toDecidable, get) and Repr.
Plfl/Init/Lemmas.lean New module extracted from former Plfl.Init (e.g., congr_arg₃).
Plfl/Init.lean Removed; its contents are now split across Plfl/Init/*.
Plfl/DeBruijn.lean Update Init import to the new split module(s).
Plfl.lean Stop re-exporting Plfl.Init (consistent with its removal).
lean-toolchain Bump Lean toolchain to v4.31.0.
lakefile.toml Bump mathlib to v4.31.0 and adjust aesop requirement configuration.
lake-manifest.json Update pinned dependency revisions to match the new toolchain/deps.

Copilot's findings

  • Files reviewed: 24/24 changed files
  • Comments generated: 4

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Plfl/Init/PDecidable.lean Outdated
Comment thread Plfl/Untyped.lean Outdated
Comment thread Plfl/More/Inference.lean
Comment thread Plfl/Untyped/Confluence.lean Outdated
…31, fix build errors (e.g. cannot anymore declare instance for structures bc of new check introduced in leanprover/lean4#13389)
@srghma

srghma commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@rami3l done

@srghma srghma changed the title refactor: 1. Decidable' is now PDecidable and is rewritten as class instead of structure, 2. split Plfl/Init to 3 files refactor: 1. split Plfl/Init to 3 files, 2. update version to v4.31.0 Jun 18, 2026
@rami3l rami3l merged commit 42b07f4 into rami3l:master Jun 18, 2026
2 checks passed
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.

3 participants