Function Repository Resource:

# ChurchCombinator

Evaluate the Church combinator

Contributed by: Wolfram Research
 ResourceFunction["ChurchCombinator"][n] gives a combinator corresponding to the n-th Church numeral where n is an integer. ResourceFunction["ChurchCombinator"][op] gives a combinator corresponding to the operator op.

## Details and Options

In ResourceFunction["ChurchCombinator"][op], op can be any of the operators Increment, Plus, Times or Power.
ResourceFunction["ChurchCombinator"] can take the following option:
 "SKGlyphs" {CombinatorS,CombinatorK} symbols used to specify combinators

## Examples

### Basic Examples (3)

Generate a combinator corresponding to the seventh Church numeral:

 In[1]:=
 Out[1]=

Apply combinator transformation rules to see the numeral itself:

 In[2]:=
 Out[2]=

Convert to an integer:

 In[3]:=
 Out[3]=

### Scope (4)

Combinator for the zeroth Church numeral:

 In[4]:=
 Out[4]=

Apply combinator transformation rules to see the numeral itself:

 In[5]:=
 Out[5]=
 In[6]:=
 Out[6]=

Increment a Church numeral combinator:

 In[7]:=
 Out[7]=
 In[8]:=
 Out[8]=
 In[9]:=
 Out[9]=

 In[10]:=
 Out[10]=
 In[11]:=
 Out[11]=
 In[12]:=
 Out[12]=

Multiply two Church numeral combinators:

 In[13]:=
 Out[13]=
 In[14]:=
 Out[14]=
 In[15]:=
 Out[15]=

Raise a Church numeral combinator to the power of another Church numeral combinator:

 In[16]:=
 Out[16]=
 In[17]:=
 Out[17]=
 In[18]:=
 Out[18]=

### Possible Issues (2)

ChurchCombinator is only defined for nonnegative integer n:

 In[19]:=
 Out[19]=

ChurchCombinator does not support all integer operations:

 In[20]:=
 Out[20]=

## Version History

• 1.0.0 – 05 January 2021