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

  • SEARCH
  • Home
  • 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 954645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:14:57+00:00 2026-05-16T00:14:57+00:00

All, Below is the lambda expression which I am finding difficult to reduce i.e.

  • 0

All,

Below is the lambda expression which I am finding difficult to reduce i.e. I am not able to understand how to go about this problem.

(λm λn λa λb . m (n a b) b) (λ f x. x) (λ f x. f x)

This is what I tried, but I am stuck:

Considering the above expression as : (λm. E) M equates to

E = (λn λa λb. m (n a b) b)  
M = (λf x. x) (λ f x. f x)  

 => (λn λa λb. (λ f x. x) (λ f x. f x) (n a b) b)  

Considering the above expression as (λn. E) M equates to

E = (λa λb. (λ f x. x) (λ f x. f x) (n a b) b)  
M = ??  

.. and I am lost!!

Can anyone please help me understand that, for ANY lambda calculus expression, what should be the steps to perform reduction?

  • 1 1 Answer
  • 1 View
  • 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-16T00:14:57+00:00Added an answer on May 16, 2026 at 12:14 am

    You can follow the following steps to reduce lambda expressions:

    1. Fully parenthesize the expression to avoid mistakes and make it more obvious where function application takes place.
    2. Find a function application, i.e. find an occurrence of the pattern (λX. e1) e2 where X can be any valid identifier and e1 and e2 can be any valid expressions.
    3. Apply the function by replacing (λx. e1) e2 with e1' where e1' is the result of replacing each free occurrence of x in e1 with e2.
    4. Repeat 2 and 3 until the pattern no longer occurs. Note that this can lead to an infinite loop for non-normalizing expressions, so you should stop after 1000 iterations or so 😉

    So for your example we start with the expression

    ((λm. (λn. (λa. (λb. (m ((n a) b)) b)))) (λf. (λx. x))) (λf. (λx. (f x)))
    

    Here the subexpression (λm. (λn. (λa. (λb. (m ((n a) b)) b)))) (λf. (λx. x)) fits our pattern with X = m, e1 = (λn. (λa. (λb. (m ((n a) b)) b)))) and e2 = (λf. (λx. x)). So after substitution we get (λn. (λa. (λb. ((λf. (λx. x)) ((n a) b)) b))), which makes our whole expression:

    (λn. (λa. (λb. ((λf. (λx. x)) ((n a) b)) b))) (λf. (λx. (f x)))
    

    Now we can apply the pattern to the whole expression with X = n, e1 = (λa. (λb. ((λf. (λx. x)) ((n a) b)) b)) and e2 = (λf. (λx. (f x))). So after substituting we get:

    (λa. (λb. ((λf. (λx. x)) (((λf. (λx. (f x))) a) b)) b))
    

    Now ((λf. (λx. (f x))) a) fits our pattern and becomes (λx. (a x)), which leads to:

    (λa. (λb. ((λf. (λx. x)) ((λx. (a x)) b)) b))
    

    This time we can apply the pattern to ((λx. (a x)) b), which reduces to (a b), leading to:

    (λa. (λb. ((λf. (λx. x)) (a b)) b))
    

    Now apply the pattern to ((λf. (λx. x)) (a b)), which reduces to (λx. x) and get:

    (λa. (λb. b))
    

    Now we’re done.

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

Sidebar

Related Questions

Hi All below is the code which i use. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML
All of the names below are generic and not the actual names used. I
I'm not even sure if this is possible, but I've exhausted all of my
I would expect all below comparisons to be bool (true) but they are not.
To this day, I have not found a great article about expressions - and
Hi was I hoping someone would help understand this behaviour of the below code.
the problem in short we have a lambda expression used in the Where clause,
I need a cakephp route which will catch all urls if not matched in
Below all my code, * Model * Below is Model code, public class MyViewModel
I'm being a little lazy here but are these (below) all the default Backbone

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.