# A one-combinator base for Concatenative Combinatory Logic Let's use the small base `{s',k}` as described in [1] ``` [B] [A] k = A [C] [B] [A] [X] s' = [[C] B] X [C] A ``` Following an approach similar to what we described in [2], we'll look for a combinator `base` such that ``` [base] base = k [[base] base] base = s' = [k] base ``` If such combinator exists, it is a base for the Concatenative Combinatory Logic. Let's define the combinator `triple`: ```[D] [C] [B] [A] triple = [C] [B] [A] D``` and let's assume that `base` has the form: ``` [𝛾] [𝛽] [𝛼] triple ``` We want to have `[k] base = s'`: ``` [k] base = [k] [𝛾] [𝛽] [𝛼] triple = [𝛾] [𝛽] [𝛼] k = [𝛾] 𝛼 = s' ``` To satisfy this equation we can simply set: ``` 𝛼 = i 𝛾 = s' ``` We want to have `[base] base = k` ``` [base] base = [[𝛾] [𝛽] [𝛼] triple] [𝛾] [𝛽] [𝛼] triple = [𝛾] [𝛽] [𝛼] [𝛾] [𝛽] [𝛼] triple = [𝛾] [𝛽] [𝛾] [𝛽] [𝛼] 𝛼 = k ``` Replacing in it the values for 𝛼 and 𝛾, we have: ``` k = [𝛾] [𝛽] [𝛾] [𝛽] [𝛼] 𝛼 = [s'] [𝛽] [s'] [𝛽] [i] i = [s'] [𝛽] [s'] [𝛽] i = [s'] [𝛽] [s'] 𝛽 ``` To satisfy this equation, we can set: ``` 𝛽 = [[[k] k] k] k ``` In fact: ``` [s'] [𝛽] [s'] 𝛽 = [s'] [𝛽] [s'] [[[k] k] k] k = [s'] [𝛽] [[k] k] k = [s'] [k] k = k ``` Which gives us a definition for the single-combinator base: ``` base = [s'] [[[[k] k] k] k] [i] triple ``` ## Bibliography [1] *The Theory of Concatenative Combinators*, Brent Kerby (bkerby at byu dot net). Completed June 19, 2002. Updated February 5, 2007. ([link](http://tunes.org/~iepos/joy.html)) [2] *A one-combinator base for Combinatory Logic*, rdentato@gmail.com. February 2022. ([link](https://hackmd.io/@qeHlwm2zQ62-hoUHOp_E5w/SyCXlWjCY))