Module transpile

Module transpile 

Source
Expand description

Transpilation from AST to first-order logic notation.

This module converts the internal AST representation to human-readable logical formulas in various output formats.

§Output Formats

FormatExampleUse Case
Unicode∀x(Cat(x) → Sleeps(x))Terminal display
LaTeX\forall x(Cat(x) \to Sleeps(x))Academic papers
ASCIIAx(Cat(x) -> Sleeps(x))Plain text
Kripke□(P) @w0Modal logic diagrams

§Neo-Davidsonian Events

Verb semantics use event variables following Davidson’s event semantics:

"John loves Mary"
→ ∃e(Love(e) ∧ Agent(e, john) ∧ Theme(e, mary))

This representation enables reasoning about event modification, aspect, and temporal relations.

Functions§

capitalize_first
Capitalizes the first character of a string.