The Language Pt. 2
EXPRESSIONS
There are 9 types of expressions.
- Atomic
- Evaluation
- Lambda Abstraction
- List
- Tuple
- Set
- Selector-set
Unforunately it isn't presently possible to effectively work with the last four types of expressions.
ATOMIC EXPRESSIONS
An atomic expression is just an atom by itself.
EVALUATION EXPRESSIONS
An evaluation is any expression (the function) followed by a bracketed list of expressions. An operator with arguments counts as an evaluation. In this case the operator counts as the function. Some examples are:
- x+y
- S⊆T
- (f(X,g))((+))
- a=b+c
QUANTIFICATION EXPRESSIONS
A quantification is a quantifier followed by an atom, followed by an expression in brackets. The quantifiers are summarised in the following table.
Quantifier | Meaning |
∀ | Universal Quantifier |
∃ | Existential Quantifier |
∃! | Unique Existential Quantifier |
ι | Selector |
Some examples of Quantification Expressions are:
- ∀x(x+0=x)
- ∃!x(P(x)∧Q(y))
- ιx(x>y)
LAMBDA ABSTRACTION EXPRESSIONS
A lambda abstraction is the lambda symbol followed by a non-empty list
of atoms, followed by an expression in brackets. Some examples are
- λt(y(u,f(f(t))))
- λx,y(x>y∧P(x))
LIST
A List is a list of expressions in square brackets. Some examples are:
TUPLE
A tuple is a list of two or more expressions in square brackets. Some examples are:
SET
A set is a comma-separated list of expressions in curly brackets. Some examples are
- {}
- {1,2,3}
- {ιx(x>1000),ιx(x<-1000)}
SELECTOR-SET
A selector set is an atom and expression separated by a stick
with a pair of curly brackets. Some examples are
- {x | P(x)}
- {x | x ∈ N ∧ x>3 }