Lean4 Macros for Implementing Custom Quantifiers
jamesoswald.dev·3h·
Discuss: Hacker News
Flag this post

Recently I’ve been looking at implementing Higher Order Modal Logic in Lean4, particularly custom quantifiers. Isabelle/HOL makes this quite easy, with a built in binder notation mechanism for defining custom quantifiers. Lean4 does not have this feature, but it does have a powerful macro system that allows us to implement custom syntax and pretty printing to achieve the same effect. Mathlib’s ExistsUnique quantifier ∃! x, Φ x gave me a good starting point for this.

Example: Actualist Universal Quantifier for Quantified Modal Logic Link to heading

Lets say we want to implement an actualist universal quantifier …

Similar Posts

Loading similar posts...