Serious mathematicians ask:

What is a function?

2021 James B. Wilson, Colorado State University

 

\(\lambda\)

\(SKI\)-combinators

\((x,y),(x,z)\in F\Rightarrow y=z\)

I learned this in Set Theory

(Was my teach wrong?)

Popular when learning Set Theory

A function \(f:A\to B\) is a subset \(f\subset A\times B\) where 

  • Domain \(\forall x\in A,\exists y\in B, (x,y)\in f\)
  • Well-defined \(\forall (x,y),(x,z)\in f,(y=z)\)

So \((x,y)\in f\) means \(y\) is unique to \(x\) can we call it the output denoted \[f(x)=y.\]

Can't start with functions as sets

  • What is \(A\times B\)?
  • Is it \(\{(a,b)\mid a\in A, b\in B\}\)? So what is \((a,b)\)?
  • \((a,b)\) is gadget you can get both \(a\) and \(b\) from, i.e. there is a function \((a,b)\mapsto a\)...
  • Circular to define functions as subsets of \(A\times B\)
  • Axiom of Specification: all \(\{x\mid S(x)\}\) are sets.  Set Theory axioms assume functions already exist.
  • Cardinality, functors, and more are functions but by Russell's paradox their domains are not sets.

Two views on first functions

Replace variables

\(f(x)=x+2\)

If \(P\) and \(P\Rightarrow Q\) then \(Q\)

 

In \(\lambda\)-notation

\(\lambda x.2x\)

Compose atomic functions

CMP AX BX
DIV CX DX
JMP RX

println(toString(541));

 

In combinator notation

\(S(BBS)(KK)\)

Replace variables

Church (1930) \(\lambda\)-calculus

 

  • Laws of substitution

Compose atomic functions

Schoenfinkel (1920)

Curry (1927) Combinators

 

  • Three primitive functions, Identity \(I\), Constant \(K\), and Strong composition \(S\)

Where do we go from here

  • Choose a side: substitution or primitive functions.
  • Define reductions:  a means to evaluate functions to an outcome.
  • Prove reductions terminate in the same answer, Its Normal Form, though some will refuse.
  • Add types to make it clear which class of functions have normal forms and that the theory is consistent.

References

  • Hindley-Seldin Lambda-Calculus and Combinators, Cambridge, 2008