Expand description
Lambda calculus transformations for Montague-style compositional semantics.
This module provides functions for manipulating logical expressions using lambda abstraction and application. It supports:
- Quantifier raising via type-lifting (proper names → generalized quantifiers)
- Beta reduction for applying lambda abstractions
- Scope enumeration to generate all possible quantifier scopings
- Intensional contexts for opaque verbs (believes, seeks, wants)
- Event semantics transformation (Davidson-style)
§Key Functions
| Function | Purpose |
|---|---|
lift_proper_name | Lifts a proper name to a generalized quantifier |
lift_quantifier | Creates a quantifier lambda term |
beta_reduce | Performs beta reduction on applications |
enumerate_scopings | Generates all scope permutations respecting islands |
enumerate_intensional_readings | Generates de re / de dicto readings |
to_event_semantics | Converts predicate to neo-Davidsonian event form |
§Scope Islands
Quantifiers are assigned an island_id during parsing. The scoping algorithm
only permutes quantifiers within the same island. This prevents:
- Wh-extraction from relative clauses
- Quantifier raising out of adjuncts
- Other island constraint violations
§Intensionality
Opaque verbs create intensional contexts where substitution of co-referential terms may change truth value. The module provides:
make_intensional: Wraps an expression in an intensional operatorsubstitute_respecting_opacity: Blocks substitution inside intensional contexts
Structs§
Functions§
- apply_
adverb - Adds an adverbial modifier to an event.
- beta_
reduce - Performs beta reduction on lambda applications.
- enumerate_
intensional_ readings - enumerate_
scopings - Generates all possible quantifier scopings for an expression.
- is_
opaque_ verb - Checks if a verb creates an opaque (intensional) context.
- lift_
proper_ name - lift_
quantifier - make_
intensional - Wraps an expression in an intensional operator.
- substitute_
respecting_ opacity - Substitutes a variable with a replacement, respecting opacity boundaries.
- to_
event_ semantics - Converts a predicate to Neo-Davidsonian event semantics.