variable: Declare a variable of the given mathematical sort

View source: R/core.R

variableR Documentation

Declare a variable of the given mathematical sort

Description

Declare a variable of the given mathematical sort.

Usage

variable(name, sort = "set")

Arguments

name

A mathematical identifier. Formula identifiers use ASCII letters, digits, underscores and dots, starting with a letter or underscore.

sort

One of set, ordinal, cardinal, class, real or natural. The finite evaluator accepts only set-sorted terms.

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 variable expression with the supplied name and sort.

Examples

variable("x")

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