Skip to content

feat(Logic): General Modal Logic - #863

Open
fmontesi wants to merge 10 commits into
mainfrom
fmontesi/multimodal
Open

feat(Logic): General Modal Logic#863
fmontesi wants to merge 10 commits into
mainfrom
fmontesi/multimodal

Conversation

@fmontesi

@fmontesi fmontesi commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

This PR adds general modal logic (Modal/Basic.lean), formalising the approach in the reference textbook 'Modal Logic' by Blackburn et al. based on similarity types (operator signatures). The formalisation is actually a bit more general: operator signatures are formalised using polynomial functors (PFunctor), so the argument positions of different operators can be of different types, and there are no assumptions on finiteness of operator arities.

Basic modal logic, unary modal logics, dynamic modal logics, and HML are all recovered as special cases that impose assumptions on the operator signature. This allows for reusing proof infrastructure across all modal logics. All tests have been accordingly refactored to check that reuse works as intended and that abstractions do not leak too aggressively across specialisations of general modal logic.

@Shreyas4991 Shreyas4991 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems the unary poly functor stuff is useful even beyond modal logic and could be factored into a separate PR. This would shorten this PR.

public import Cslib.Init
public import Mathlib.Data.PFunctor.Univariate.Basic

/-! # Additional basic theory on polynomial functors -/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR seems a bit large. Maybe this API for PFunctors could be a separate PR. It seems fairly straightforward merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants