A certain enchanted forest is inhabited by talking birds.
Combinatory Forests are inhabited by talking birds, which speak words represented here by shapes, or groups of shapes delimited by parentheses. Avian dialog demonstrates that even without anything as crude as digits and operators, arithmetic and computation can emerge.
A talking bird, given some words, yields a combination of those words, we always listen to the left-most bird first.
▲( ◆ ●) • ◆ ● ▲ C(WK)x(yz)
▲ The Bekimet Forest
Within the Bekimet forest, we find the B, KI, M, and T birds. Each bird listens to a phrase, and answers with another. The first bird that we observe is the Mockingbird, which repeats the first word.
▲• ▲ ▲ W(WK)x
The second bird that we observe is the Kite, which discards the first word.
▲ ◆• ◆ K(WK)xy
The third bird that we observe is the Thrush, which swaps the first and second words, notice how parenthesized words count as a single word.
▲ ▲) ◆• ◆( ▲ ▲) C(WK)(xx)y
We can't quite make out the fourth bird, but we observe that it is the Bluebird, which is also found in the next forest, so let's continue.
|Mockingbird||x x y z||Duplicates the first word|
|Kite||y z||Discards the first word|
|Thrush||y x z||Swaps the first and second words|
◆ The Becekew Forest
Within the Becekew forest, we find the B, C, K, and W birds. The first bird that we observe is the Warbler, which repeats the second word. This bird's song is similar to the Mockingbird, which repeats the first word.
▲ ◆• ▲ ◆ ◆ Wxy
The second bird that we hear is the Kestrel, which discards the second word. This bird's song is similar to the Kite, which discards the first word. Here is the Kestrel, followed by the Warbler, notice how we always listen to birds in a sequence from the left-most bird first.
▲ ◆ ●• W ◆ ●• ◆ ● ● KWxyz
The third bird that we hear is the Cardinal, which swaps the second and third words. This bird's song is similar to the Thrush, which swaps the first and second words. Here is the Cardinal, followed by the Kestrel, notice how the effect of these two birds could be done by the Kite.
▲ ◆ ●• K ◆ ▲ ●• ◆ ● CKxyz
The elusive Bluebird takes three words, and parenthesizes the third word into the second word. It is used to "chain" words together, for example, something like "B (increment) (double) number", becomes "(increment (double number))".
▲( ◆ ◆)( ● ●) • ▲( ◆ ◆( ● ●)) Bx(yy)(zz)
|Warbler||x y y z||Duplicates the second word|
|Kestrel||x z||Discards the second word|
|Cardinal||x z y||Swaps the second and third words|
|Bluebird||x (y z)||Composition of x to y to z|
● The Sekei Forest
Within the Sekei forest, we find the S, K, and I birds. The simplest of these birds, appears to have no intelligence at all, and so it is called the Idiot bird since its response to hearing any word, is that same word.
▲ ◆) • ( ▲ ◆) (WK)(xy)
The Kestrel is also found in this forest, but we're already familiar with this one. Let's take a moment to see how words can be grouped by parentheses and transformed as if they were a single word. For instance, the Kestrel discards the second group of parenthesized words.
▲( ◆ ◆)( ● ●) • ▲( ● ●) Kx(yy)(zz)
The Starling applies the first and second words to the last, then applies the first result to the second result.
▲ ◆ ●• ▲( ●)( ◆( ●)) B(B(BW)C)(BB)xyz
|Idiot||x||x||Returns its word|
|Starling||x y z||x z (y z)||Returns x(z) applied to y(z).|
Although these birds have been investigated somewhat over the past eighty years, they have for the most part been viewed as rather obscure and irrelevant creatures. It is a challenge to find any way to translate their behavior into something suitable for human perception.
And for that I turned to programs, and began to study just what programs in the wild might do.~
The Ornithomicon is the infamous grimoire of Avian Arithmetic.
Before progressing deeper into the enchanted forests, you should be familiar with the 9 birds of the Bekimet, Becekew and Sekei forests.
Avian Truths & Lies
The Kestrel takes two words and discards the second word. In other words, it always keeps the first one, this is the word for True:
▲ ◆• ▲ Kxy
The Kite takes two words and discards the first word. In other words, it never keeps the first one, this is the word for False:
▲ ◆• ◆ KIxy
The Cardinal swaps the second and third words, it can turn a lie into a truth, and a truth into a lie, this is the word for Not:
▲ ◆• ▲ C(KI)(K)(KI)xy
The Mockingbird takes 2 words that can be either True or False, and says True if at least one of them is True, this is the word for Or:
▲ ◆• ▲ W(WK)(KI)(K)xy
Two Starlings and a Kestrel can work together to say True, when both words are True, this is the word for And:
▲ ◆• ◆ SSK(KI)(K)xy
Since the word for True keeps the first of 2 words, and False selects the second, we need a way to pass the second and third words to the first one. The Idiotbird is the equivalent to IfThenElse:
▲ ◆• ◆ I(KI)xy
Avian numerals are somewhat odd, the value of a number is equal to how many times a word applies itself on another. Considering that numbers are times a word is applied onto another, applying "2 sqr" to a number "3" would give "sqr (sqr 3)", or 81.
It looks like a Starling and Bluebird always give us the succeeding number, since "SB2" is 3 and "SB3" is 4.
5• 6 SB(SB(SB(SB(WB))))fx
Among its many talents, the Bluebird can also Multiply numbers, as "2(3f)" is the same as "6f", thus, "B(2)(3)" is the same as "6".
2 3• 6 B(2)(3)fx
Our old friend the Thrush is capable of calculating the Power of two numbers. The following example is essentially applying the word three (which itself applies a word 3 times) four times.
3 4• 81 C(WK)(3)(4)fx
As we travel deeper into the forest, we encounter the Nightingale, which applies a word to the result of the second and the fourth, and to the result of the third and the fourth:
■ ▲ ◆ ●• ■( ▲ ●)( ◆ ●) B(BS)Bfxyz
The Nightingale allows us to apply the first number onto the second, or effectively Add numbers together:
2 3• 5 B(BS)BB(2)(3)fx
The Ornithodex is the reference manual of common combinator birds.
Color-coded for the Bekimet, Becekew and Sekei forests.
|λabc.cab||V||Vireo (aka Pairing)||BCT|
|λa.a(λa)||Y||Why Bird (aka Sage Bird)||SLL|
|λab.ab||I*||Identity Bird Once Removed||S(SK)|
|λabc.abcc||W*||Warbler Once Removed||BW|
|λabcd.abdc||C*||Cardinal Once Removed||BC|
|λabcd.acdb||R*||Robin Once Removed||C*C*|
|λabcd.adcb||F*||Finch Once Removed||BC*R*|
|λabcd.acbd||V*||Vireo Once Removed||C*F*|
|λabcd.abcdd||W**||Warbler Twice Removed||B(BW)|
|λabcde.abced||C**||Cardinal Twice Removed||BC*|
|λabcde.abdec||R**||Robin Twice Removed||BR*|
|λabcde.abedc||F**||Finch Twice Removed||BF*|
|λabcde.abecd||V**||Vireo Twice Removed||BV*|
|λab.aa||C(KM)||Crossed Konstant Mocker||C(KM)|
Incoming: interaction nets reversible computing thue uxntal lambda