Lambda calculus is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation that can be used to simulate any Turing machine. It forms the theoretical basis for functional programming languages like Lisp, Haskell, and F#.
1930 के दशक में अलोंजो चर्च द्वारा विकसित, लैम्डा कैलकुलस कार्यों को परिभाषित करने और लागू करने के लिए एक सरल लेकिन शक्तिशाली ढांचा प्रदान करता है। इसका संपूर्ण सिंटैक्स केवल तीन घटकों से मिलकर बना है: चर (जैसे, `x`), अमूर्तताएँ और अनुप्रयोग। एक अमूर्तता, या लैम्डा फ़ंक्शन, एक अनाम फ़ंक्शन परिभाषा है, जिसे [latex]lambda xM[/latex] के रूप में लिखा जाता है, जहाँ `x` इनपुट पैरामीटर है और `M` फ़ंक्शन का मुख्य भाग है। एक अनुप्रयोग, जिसे `MN` के रूप में लिखा जाता है, फ़ंक्शन `M` को तर्क `N` पर लागू करने का प्रतिनिधित्व करता है। लैम्डा कैलकुलस में गणना बीटा न्यूनीकरण नामक प्रक्रिया के माध्यम से आगे बढ़ती है, जहाँ एक तर्क पर लैम्डा फ़ंक्शन के अनुप्रयोग को फ़ंक्शन के मुख्य भाग में बाउंड चर के स्थान पर तर्क को प्रतिस्थापित करके हल किया जाता है। उदाहरण के लिए, `3` पर [latex](lambda x.x+1)[/latex] लागू करने पर `3+1` प्राप्त होता है।
Despite its sparse syntax, lambda calculus is Turing complete. It can represent numbers (Church numerals), booleans, data structures, and control flow (like recursion) purely through functions. This demonstrates that the concept of a function is sufficient for universal computation. This contrasts with the Turing machine model, which is based on state and mutation. The Church-Rosser theorem is a key property of lambda calculus, stating that the order in which reductions are applied does not change the final result, a property known as confluence. This makes reasoning about program behavior much simpler than in imperative models where the order of state changes is critical.
लैम्डा कैलकुलस का गहरा प्रभाव पड़ा है प्रोग्रामिंग भाषा लैम्डा कैलकुलस प्रोग्रामिंग का मूल आधार लैम्डा कैलकुलस ही है। कई भाषाओं में अब प्रचलित अवधारणाएँ, जैसे कि फर्स्ट-क्लास फंक्शन्स (फंक्शन्स को डेटा के रूप में मानना), हायर-ऑर्डर फंक्शन्स (अन्य फंक्शन्स को आर्गुमेंट के रूप में लेने वाले फंक्शन्स), क्लोज़र्स (अपने लेक्सिकल वातावरण को कैप्चर करने वाले फंक्शन्स) और करिंग, इन सभी की जड़ें लैम्डा कैलकुलस में हैं। लिस्प जैसी भाषाएँ इन विचारों को लागू करने वाली पहली भाषाओं में से थीं, और हास्केल से लेकर जावास्क्रिप्ट और पायथन तक की आधुनिक भाषाओं ने इन्हें अपने डिज़ाइन में गहराई से एकीकृत कर लिया है।
संबंधित विषय: लैम्डा कैलकुलस, फंक्शनल प्रोग्रामिंग, अलोंजो चर्च, बीटा रिडक्शन, हायर-ऑर्डर फंक्शन्स, लिस्प, हास्केल, फॉर्मल सिस्टम, कम्प्यूटेबिलिटी, टाइप थ्योरी।