feat: add Logics/Propositional/NaturalDeduction/*#91
Merged
fmontesi merged 218 commits intoleanprover:mainfrom Apr 29, 2026
Merged
feat: add Logics/Propositional/NaturalDeduction/*#91fmontesi merged 218 commits intoleanprover:mainfrom
fmontesi merged 218 commits intoleanprover:mainfrom
Conversation
af39522 to
4110032
Compare
## Summary - Updates `bump_toolchain_nightly-testing.yml` to change the mathlib dependency name from `mathlib` to `mathlib-nightly-testing` in `lakefile.toml` - This ensures the workflow correctly references the nightly-testing variant of mathlib, not just updating the rev ## Changes - Added `sed` command to update `name = "mathlib"` to `name = "mathlib-nightly-testing"` - This runs alongside the existing `rev` update ## Test plan - [ ] Verify the workflow runs successfully on the next scheduled execution or manual trigger - [ ] Confirm `lakefile.toml` on `nightly-testing` branch has both correct name and rev after workflow runs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
…eanprover#99) ## Summary - Validates lakefile.toml has git-based mathlib4-nightly-testing dependency - Updates only the `rev` field (not `name` field) - Fails if dependency not in expected git-based format This avoids Reservoir by assuming nightly-testing branch already uses git field. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
Add repository checks to nightly-testing workflows to prevent them from running in forks.
Co-authored-by: Chris Henson <chrishenson.net@gmail.com>
[x] Introduce the namespace `Cslib` for all `Cslib` files [x] Introduce the namespace `CslibTests` for all `CslibTests` files [x] Fix the inconsistencies in linebreaks for all namespace related declarations [x] Use the convention that the namespace begins one line after the module docstring. --------- Co-authored-by: Chris Henson <chrishenson.net@gmail.com>
…prover#102) Normally we check that our library and documentation are using the same `lean-toolchain`. However the [nightly testing workflow](.github/workflows/merge_main_into_nightly-testing.yml) by design is meant to test a toolchain ahead of our current pinned version. To accommodate this, this PR changes the doc toolchain check to only happen during pull requests and commits to the `main` branch.
Note that in Mathlib we actually enforce in CI that everything in scripts/ is documented in this file. Not implemented here.
This is the initial version of ωSequence with reference to: https://leanprover.zulipchat.com/#narrow/channel/513188-CSLib/topic/Automata/near/543709917 --------- Co-authored-by: Fabrizio Montesi <famontesi@gmail.com>
`ωSequence.flatten` is analogous to `List.flatten`: it concatenates an infinite sequence of (finite) lists to form an infinite sequence.
…decidability (leanprover#113) This file did not depend on Mathlib, which given the use of `weak` in `lakefile.toml` meant that this was silently not linted. There are three other files for which this is true: ``` Cslib.Foundations.Syntax.HasAlphaEquiv Cslib.Foundations.Syntax.HasSubstitution Cslib.Foundations.Syntax.HasWellFormed ``` but they only define notation typeclasses and have no lint problems. While here, I also took the opportunity to make a decidability proof easier to read.
This pull request extends the development of SKI combinatory logic — adding notions of evaluation and normal forms, and proving a version of [Rice's theorem](https://en.wikipedia.org/wiki/Rice%27s_theorem). The results and definitions are contained in the new file `CombinatoryLogic/Evaluation.lean`, which is based heavily on the [following development](https://gist.github.com/b-mehta/e412c837818223b8f16ca0b4aa19b166) by Bhavik Mehta. ### Notes The definitions and results of this PR allows us to define normal-order evaluation as a `PFun`, in [the sense of Mathlib](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/PFun.html). The missing piece to make this useful is the so-called _Standardisation theorem_, saying that normal-order reduction will find a normal form, if there is one. The proof of Theorem T9 of Section C in _A Mathematical Logic Without Variables_ (Rosser, 1935) should be amenable to formalization. This would be very interesting, as it ought to define a surjection from SKI terms to, for instance, [partial recursive functions](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Computability/Partrec.html) on the natural numbers, demonstrating that SKI terms are Turing-complete. --------- Co-authored-by: twwar <tom.waring@unimelb.edu.au> Co-authored-by: Maximiliano Onofre-Martínez <maxonomar@ciencias.unam.mx> Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com> Co-authored-by: Fabrizio Montesi <famontesi@gmail.com> Co-authored-by: Tristan F.-R. <pub.tristanf@gmail.com> Co-authored-by: euprunin <178733547+euprunin@users.noreply.github.com> Co-authored-by: euprunin <euprunin@users.noreply.github.com> Co-authored-by: kei <70096720+thelissimus@users.noreply.github.com> Co-authored-by: Juan Pablo Yamamoto <jpy051@uregina.ca> Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com> Co-authored-by: Alexandre Rademaker <arademaker@gmail.com> Co-authored-by: Clark Barrett <barrett@cs.stanford.edu> Co-authored-by: Chris Henson <chrishenson.net@gmail.com>
[This commit](leanprover-community/mathlib4@ed4fde1#diff-54ef6c59abdddf67950b1ee785a0c22c7e03d04f9ad8cdb7cf1d336a72f4d850) in mathlib4 moves `foldl_eq_foldr` to another module, so we need to import it or the build fails with ```lean error: Cslib/Computability/URM/Basic.lean:178:27: Unknown constant `List.foldl_eq_foldr` ``` This PR updates the lake manifest past this commit with `lake update mathlib` and fixes the issue
Co-authored-by: mathlib4-bot <github-mathlib4-bot@leanprover.zulipchat.com> Co-authored-by: leanprover-community-mathlib4-bot <129911861+leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Kim Morrison <kim@tqft.net> Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Chris Henson <chrishenson.net@gmail.com> Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com> Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com> Co-authored-by: Ching-Tsun Chou <chingtsun.chou@gmail.com> Co-authored-by: Alexandre Rademaker <arademaker@gmail.com> Co-authored-by: mathlib-nightly-testing[bot] <mathlib-nightly-testing[bot]@users.noreply.github.com> Co-authored-by: mathlib-nightly-testing[bot] <258991302+mathlib-nightly-testing[bot]@users.noreply.github.com>
arademaker
reviewed
Apr 19, 2026
fmontesi
requested changes
Apr 29, 2026
Collaborator
fmontesi
left a comment
There was a problem hiding this comment.
Looks good to me now, just minor easy nitpicks about names.
83bb811 to
bf79049
Compare
fmontesi
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Natural deduction for minimal logic
This PR adds the definitions and basic properties of natural deduction for propositional logic.
Key developments:
Theory.Derivation, the type of derivation trees.