parse_formula: Parse bounded S-expressions: '(forall x (implies (P x) (P...

View source: R/core.R

parse_formulaR Documentation

Parse bounded S-expressions: '(forall x (implies (P x) (P x)))'

Description

Parse bounded S-expressions: '(forall x (implies (P x) (P x)))'.

Usage

parse_formula(source, max_tokens = 10000L)

Arguments

source

Source text for the parser, or a symbolic source/model label for a specification.

max_tokens

Maximum number of parser tokens; excessively deep inputs are also rejected.

Details

Expressions are sorted syntactic trees. Normalization changes bound names only, not logical content. Substitution avoids capture. A theory context is a declaration. Integers beyond 2^53-1 must use canonical decimal strings in ordinal terms. Serialization accepts bounded finite JSON data and never evaluates code. Typed deserialization validates against the current catalogue where applicable.

Input errors inherit from largecardinals_error and expose a code. No function publishes data or accesses the network.

Value

A typed expression parsed from the documented bounded prefix syntax.

Examples

parse_formula("(forall x (implies (P x) (P x)))")

largecardinals documentation built on Nov. 25, 2026, 5:09 p.m.