can't deduce the numeral representation (church encoding) of a lambda expression λx.λy.x(xy) -


i have lambda expression: λx.λy.x(xy), , i'm supposed infer integer representation of it. i've read lot church encodings , church numerals can't find number is. can explain me in way 3 year old can understand or refer me resource better wikipedia?

church encoding of integers following:

  • "0" ≡ (λf.(λx.x)): think of (λf.(λx.x)) meaning: given function f , element x, result x: it's applying function f 0 times x.
  • "1" ≡ (λf.(λx.(fx))): think of (λf.(λx.(fx))) meaning: given function f , element x, result (fx): should thought of apply f x or, in more standard mathematical notation, f(x).
  • "2" ≡ (λf.(λx.(f(fx)))): think of (λf.(λx.(f(fx)))) meaning: given function f , element x, result (f(fx)): should thought of apply f x twice or, in more standard mathematical notation, f(f(x)).
  • "3" ≡ (λf.(λx.(f(f(fx))))): think of (λf.(λx.(f(f(fx))))) meaning: given function f , element x, result (f(f(fx))): should thought of apply f x three times or, in more standard mathematical notation, f(f(f(x))).

i hope see pattern (and logic behind). in case, (λx.(λy.(x(xy)))) church encoding of number 2 (using alpha-equivalence, of course).

the wikiped article quite clear. don't understand?


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -