Draft:Psychopath
Psychopath is an esoteric programming language by User:KaleidoscopeFive in 2026 birthed from his Dimethylmercury experiments. The goal of Psychopath is to make an aristocratic basis with Ψ (Psi).
Basis
Psychopath currently uses the IGΨ basis, where:
I x = x G x y z w = x w (y z) Ψ x y z w = x (y z) (y w)
The lack of a cancellative combinator makes the basis aristocratic and thus not complete.
Syntax
The syntax is based on that of Unlambda and PsiK', with the postfix ! being used to denote application and combinators being used in lowercase form. For example, the CC expression ΨT(ΨIT)II would become ψt!ψi!t!i!i!.
I/O model
The I/O model is copied from Crazy J.
Abstraction elimination rules
These rules serve to convert lambda expressions into the IGΨ basis, if the chosen expression can be represented in IGΨ.
Like other languages from this family (apparently), abstraction elimination starts from the innermost lambda expressions and goes outwards.
As always, eta conversion comes first.
\x.f x = f \x.x = I
TODO: Find other stuff like BCS or BCI to make abstraction elimination easier
Table of combinators
| Combinator | Bird name | Formula | Expression | Expression (CC) | Proof |
|---|---|---|---|---|---|
Q3
|
Quirky bird | Q3 x y z = z (x y)
|
gi!
|
GI
|
G I x y z I z (x y) z (x y) Q.E.D. |
T
|
Thrush | T x y = y x
|
gi!i
|
GII
|
G I I x y I y (I x) I y (x) y x Q.E.D. |
Examples
Cat program
Quite a short cat program right?
i is an alternative cat program.