Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3241046
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:09:14+00:00 2026-05-17T18:09:14+00:00

I am working through SICP, and the problem 2.6 has put me in something

  • 0

I am working through SICP, and the problem 2.6 has put me in something of a quandary. In dealing with Church numerals, the concept of encoding zero and 1 to be arbitrary functions that satisfy certain axioms seems to make sense. Additionally, deriving the direct formulation of individual numbers using the definition of zero, and an add-1 function makes sense. I do not understand how a plus operator can be formed.

Thus far I have this.

(define zero (lambda (f) (lambda (x) x)))
(define (add-1 n)
  (lambda (f) (lambda (x) (f ((n f) x)))))

(define one (lambda (f) (lambda (x) (f x))))
(define two (lambda (f) (lambda (x) (f (f x)))))

Looking through the wikipedia entry for lambda calculus, I found that the definition of plus was PLUS := λmnfx.m f (n f x). Using that definition I was able to formulate the following procedure.

(define (plus n m)
  (lambda (f) (lambda (x) ((m f) ((n f) x)))))

What I don’t understand, is how that procedure can be derived directly using only the information given by the previously derived procedures. Can anyone answer this in some kind of rigorous proof-like form? Intuitively, I think I understand what’s going on, but as Richard Feynman once said, “If I can’t build it, I can’t understand it…”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:09:15+00:00Added an answer on May 17, 2026 at 6:09 pm

    It’s actually pretty simple. This will probably be viewed as flamebait, but the parens make it harder to see — a better way to see what happens is either imagine that you’re in a curried language, or just use the fact that Scheme has multi-argument functions and embrace that… Here’s an explanation that uses lambdas and multiple argument where convenient:

    • Every number N is encoded as

      (lambda (f x) ...apply (f (f (f ... (f x)))) N times...)
      
    • This means that the encoding of N is actually

      (lambda (f x) (f^N x))
      

      where f^N is functional exponentiation.

    • A simpler way to say this (assuming currying): the number N is encoded as

      (lambda (f) f^N)
      

      so N is actually a “raise to the power of N” function

    • Now take your expression (looking inside the lambdas here):

      ((m f) ((n f) x))
      

      since n is is an encoding of a number, it’s that exponentiation, so this is actually:

      ((m f) (f^n x))
      

      and the same for m:

      (f^m (f^n x))
      

      and the rest should be obvious… You have m applications of f applied on n applications of f applied on x.

    • Finally, to leave some fun — here’s another way to define plus:

      (define plus (lambda (m) (lambda (n) ((m add1) n))))
      

      (Well, not too much fun, since this one is probably more obvious.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One long term project I have is working through all the exercises of SICP.
I'm working through SICP on my own, so I don't have an instructor to
I'm working my way through SICP, using both the Ableson/Sussman lectures and the Berkeley
I am working through SICP using Dr Scheme. How do I load external libraries
I am currently working through SICP using Guile as my primary language for the
Am new to clojure and learning it by working through SICP. I cannot get
I'm new to programming, working my way through SICP, and loving it. Though I'm
I'm working through SICP. Currently, in the first chapter, I'm having problems getting Racket
As an exercise for myself, I'm implementing the Miller-Rabin test. (Working through SICP). I
I'm working through Peter Mularien's Spring Security 3, and am having a problem setting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.