feat(Logic): the description logic ALC as an instance of the modal framework #1166
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.49) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.49 · 343 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.349
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1166"
general
weight: 0.35
fmontesi
This PR adds the description logic ALC, built on the general modal logic framework of #863.
ALC is a notational variant of the multimodal logic $K_m$ [Schild 1991, Theorem 1]: role names act as
unary modal operators, concept names act as atoms,
∀R.Cisd[R]C, and∃R.Cisd⟨R⟩C. So ALCgets no syntax or semantics of its own here. Instead:
Concept Role ConceptNameisModal.Proposition (mkUnary Role) ConceptName.Interpretationis a DL interpretation(Δ, ·ᴵ), andInterpretation.toModalgives thecorresponding Kripke structure via
Frame.ofRelations.ALC[I,x ⊨ C]unfolds toModal[I.toModal,x ⊨ C].Schild's correspondence therefore holds by construction. The lemmas
alc_atom_iff,alc_exists_iffandalc_forall_iffrestate the usual DL semantics.TAxiom/TBox: concept inclusionsC ⊑ Dand equalitiesC ≡ D. An equality holds inIiff
CandDare logically equivalent (Proposition.Equiv) inI.toModal, so the congruencemachinery of the modal framework (
LawfulCongruence) can be used for terminological reasoning.IsModel,Entails(global consequence from a TBox), andAssertion/ABoxfor concept androle assertions about named individuals.
CslibTests/DescriptionLogic/Family.leanformalises the family TBox of[Baader et al. 2007, Fig. 2.2]. It shows:
Mother ⊑ PersonandGrandmother ⊑ Parent;LawfulCongruence;decide;MotherWithManyChildren(≥ 3 hasChild) is left out, since number restrictions are gradedmodalities and fall outside ALC.
Like HML, this is a client of the modal framework. ALC lives in a new
Cslib/Logics/DescriptionLogicdirectory, which leaves room for more expressive description logics later.
References:
Co-authored with Guilherme Lima.
AI disclosure: Claude Code (Anthropic's Claude Opus models) was used for this PR, interactively
and under the authors' direction. The authors chose the design: ALC as a client of the modal
framework, reusing its
Satisfiessemantics in the style of HML, rather than an independentset-based semantics. Claude drafted the Lean definitions, the lemmas and their proofs, and the
family TBox test, and checked them against the sources [Schild 1991; Baader et al. 2007]. It
also ran the local CI checks and drafted this description. The authors reviewed and revised the
code and the text.