Introduction Church Numerals
Church Numerals
- Dr. Mattox Beckman
Church Numerals Dr. Mattox Beckman University of Illinois at - - PowerPoint PPT Presentation
Introduction Church Numerals Church Numerals Dr. Mattox Beckman University of Illinois at Urbana-Champaign Department of Computer Science Introduction Church Numerals Objectives You should be able to... Explain the form of a Church
Introduction Church Numerals
Introduction Church Numerals
Introduction Church Numerals
1 f0 = \f-> \x-> x 2 f1 = \f-> \x-> f x 3 f2 = \f-> \x-> f (f x) 4 f3 = \f-> \x-> f (f (f x)) 1 Prelude> let show m = m (+1) 0 2 Prelude> show (\f x -> f (f x)) 3 2
Introduction Church Numerals
1 finc = undefined
Introduction Church Numerals
1 finc = \m -> undefined
Introduction Church Numerals
1 finc = \m -> \f x -> undefined
Introduction Church Numerals
1 finc = \m -> \f x -> m f x
Introduction Church Numerals
1 finc = \m -> \f x -> f (m f x)
Introduction Church Numerals
1 fadd m n = \f x -> m f (n f x)