




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Group 2 Notes: Brett Downs & Ignacio Garcia
= ( x1, x2, x3,…, xn) Then f(x) = h(g1(x), g2(x), g3(x),…,gm(x)) is primitive recursive. **Recursion** -Suppose g and h are primitive recursive functions, where the domain of g is in **N** n^ and the domain of h is **N** n+2. Then the pair of equations: 1) f(x, 0 ) = g(x) Boundary Condition(Stop) 2) f(x, y+1) = h(x,y, f(x`,y)) Recursion equation Defines a primitive recursive function with domain N n+1. ExFormal Definition: ADD(X,0) = I(X) = P^11 (X) = X ADD(X,Y+1) = H`(X, Y, ADD(X,Y)) H(X,Y,Z) = S(P^33 (X, Y, ADD(X,Y)) ADD(2,3) = = S(P^33 (2,3,ADD(2,2))) = S(P^33 (2,3, S(P^33 (2,2, ADD(2,1))))) = S(P^33 (2,3, S(P^33 (2,2, S(P^33 (2,1, ADD(2,0))))))) = S(P^33 (2,3, S(P^33 (2,2, S(P^33 (2,1,2)))))) = S(P^33 (2,3, S(P^33 (2,2, S(2))))) = S(P^33 (2,3, S(P^33 (2,2,3)))) = S(P^33 (2,3, S(3))) = S(P^33 (2,3,4)) = S(4) = 5 Multiplication MUL(X,0) = Z(X) MUL(X, Y+1) = H(X,Y,MUL(X,Y)) H(X,Y,Z) = ADD(P^31 (X,Y,Z), P^33 (X,Y,Z)) Or ADD(X,Y,MUL(X,Y)) Factorial FAC(X) = X! FAC(0) = 1 FAC(X+1) = MUL(X+1,FAC(X)) Pred PRED(0) = Z(0) PRED(Y+1) = P^21 (Y, PRED(Y)) λ-Calculus -The goal of λ-calculus is to simplify the notion of computable functions. -A calculus is a notation that can be manipulated mechanically to achieve some end. -One reason for developing a calculus is that, by reducing some process to a set of simple mechanical rules, one decreases the chance of making errors. Scope
mI=1I nj=1 j + I - a | |________| | | | | | Scope of j | |______________| | Scope of I λ-Calculus -It is a theory of functions developed by Alonzo Church. -In 1920 Moses Schonfinkel developed a theory of functions base of “combinations” -From that in 1930 Haskell curry rediscovered and extended schonfinkel’s theory and showed that it was equivalent to λ-Calculus. -From there in 1930 Alonzo Church developed λ-Calculus. -From there in 1950 S.C. Kleene showed that λ-Calculus was a universal computing system(any computable function can be expressed and evaluated using λ-Calculus). -From there in 1950 John Mccarthy who was inspired by λ-Calculus, invented the programming language LISP.
-If V ranges over the class of (fE)[E/x]x*x f] (E`E)
Ex: (λx.λy.(x)2y) (λz.z+1)5 (λy.(λz.z+1)2y)5 ((λz.z+1)2*5) (λz.z+1)10 10+1 11 Ex: (λx.λy.yx)(+3 4) (λx.+x 2) (λy.y(+3 4)) (λx.+x 2) ((λx.+x 2)(+3 4)) +(+3 4)2 +7 2 9
(if c TF) Selects T if c is true (λTF.T) we always select True Selects F if c is false (λTF.F) we always select False Ex: (Less26)26 (True)26 (λTF.T)26 2