|
| Untyped.Term | | Stability | experimental | | Maintainer | thanos@sians.org |
|
|
|
|
|
| Description |
| Terms of the untyped system.
|
|
| Synopsis |
|
|
|
|
| Data types
|
|
|
Definition of terms for this calculus.
Beware: this, as an instance of Eq, never heard of the alpha-conversion.
Use (@=) if you need to check for alpha-equivalence.
| | Constructors | | TmUnit | Unit value.
| | TmTrue | Boolean value true.
| | TmFalse | Boolean value false.
| | TmIf Term Term Term | Branching.
| | TmZero | Natural number zero.
| | TmSucc Term | Successor.
| | TmPred Term | Predecessor.
| | TmIsZero Term | Zero test.
| | TmVar String | Variable.
| | TmAbs String Term | Lambda abstraction.
| | TmApp Term Term | Term application.
| | TmStop | Stop of evaluation meta-term.
| | TmLoop | A term that loops infinitely.
|
| Instances | |
|
|
|
| A list of terms that represent a program.
|
|
| Relations
|
|
|
| alpha-conversion equivalence.
|
|
| Subterms and variables
|
|
|
| List of all subterms of the given term.
|
|
|
| All variables that occur in the given term.
|
|
|
| All variables that occur free in the given term.
|
|
|
| Handy shortcut for "x in FV(t)".
|
|
|
| "x not in FV(t)". What; this is handy too!
|
|
| Properties of terms
|
|
|
| Checks if the given term is a unit value.
|
|
|
| Checks if the given term is a natural number value.
|
|
|
| Checks if the given term is a boolean value.
|
|
|
| Checks if the given term is an abstraction value.
|
|
|
| Checks if the given term is a value.
|
|
| Supplamentary creators
|
|
|
| Turn an integral number to the corresponding Nat term.
|
|
|
| Lambda-abstract a given variable term in a given term.
|
|
|
| Turn a list of terms into a single application term.
(Like foldr1 TmApp types but returns unit if empty.)
|
|
| Substitutions
|
|
|
Substitution in lambda-calculus terms.
(x |-> s) t is the term we get if we replace every free occurrence
of x in t with s.
|
|
|
Renaming in the spirit of the alpha-conversion of lambda-calculus.
BEWARE! This isn't safe: w must be correctly picked before-hand.
In fact, this is the most brain-dead substitution implementation.
|
|
| Produced by Haddock version 2.4.2 |