Module lambda

Module lambda 

Source
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

FunctionPurpose
lift_proper_nameLifts a proper name to a generalized quantifier
lift_quantifierCreates a quantifier lambda term
beta_reducePerforms beta reduction on applications
enumerate_scopingsGenerates all scope permutations respecting islands
enumerate_intensional_readingsGenerates de re / de dicto readings
to_event_semanticsConverts 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 operator
  • substitute_respecting_opacity: Blocks substitution inside intensional contexts

Structs§

ScopeIterator

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.