Skip to content

feat(ModalLogic): IsAxiom and axiom L (Löb's theorem for modal logic) - #788

Closed
fmontesi wants to merge 1 commit into
mainfrom
fmontesi/modal-axiom-l
Closed

fmontesi wants to merge 1 commit into
mainfrom
fmontesi/modal-axiom-l

Conversation

@fmontesi

Copy link
Copy Markdown
Collaborator

This PR proves the validity of Axiom L (Löb's theorem for modal logic) under the expected conditions (transitivity and converse well-foundedness). I've also refactored axiom statements to use an abbreviation (IsAxiom), since I started finding the previous way of doing it with manual quantifications cumbersome and error-prone.

@fmontesi

Copy link
Copy Markdown
Collaborator Author

Superceded by #799, which is reviewed.

@fmontesi fmontesi closed this Aug 19, 2026
lengyijun pushed a commit to awesome-lambda-calculus/cslib that referenced this pull request Aug 20, 2026
This PR develops a concept of modal reasoning for Lean theorems, powered
by the laws of modal logic. This development led to some polishing for
`Congruence` and some definitions for `Relation`.

Specifically, the PR:
- Introduces the first development where CSLib's modal logic is
instantiated with Lean's `Prop` as the type of atomic propositions. We
use this to construct models out of Lean predicates and containers and
show some general properties in terms of logical equivalence.
- Introduces a construction that, given any scalar multiplication
operator, builds an accessibility relation. If the operator is an action
of some kind (as defined in mathlib), this accessibility relation has
interesting properties (like transitivity or diamond) that are relevant
for modal reasoning.
- Develops an example of how this framework can be used to prove
mathematical theorems. In particular, we apply the new construction to
obtain an accessibility relation on `Ideal`s. In this interpretation,
membership of radicals of ideals is characterised by the diamond
connective in modal logic. This allows for applying modal logic to
proving properties about radicals.
- As examples, we show that `Ideal.radical_inf` and `Ideal.radical_idem`
from mathlib can be proven by applying modal logical equivalence.

This put the ergonomics and expressive power of our infrastructure for
modal logic, logical equivalence, relations, and congruence to the test.
This PR also:
- Polishes a bit the ergonomics of LawfulCongruence (e.g., by making
`Congruence.r` an `abbrev` so that typeclass resolution works in
proofs).
- Adds a `Preserves` property for relations.
- Defines and proves soundness and completeness of modal axioms for
relations with the diamond property.
- Refactors a bit LogicalEquivalence for modal logic so that it is more
fundamental (based on a single model instead of a set of models, and
then derives the latter on the first).

The last point not only helps with proofs, but also aligns logical
equivalence with how it is handled in HML. This means that we can start
working on a shared abstraction for this kind of logics, which would
then derive the natural notion of logical equivalence for free.

Depends on leanprover#788

---------

Co-authored-by: Thomas Krishna Waring <51426330+thomaskwaring@users.noreply.github.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.

4 participants