[Logic and Computational Theory] Introduction to the concept of λ-calculus and combinator logic

[Logic and Computational Theory] Introduction to the concept of λ-calculus and combinator logic

 

1. Introduction to the basic concepts of lambda calculus

1.

From our previous discussion, we can see that there are two kinds of functions, one is a special function that exists in first-order predicate logic-truth function; the other is a mathematical function that we are familiar with. By learning λ-calculus, we will learn another type of function: higher-order functions.

Let's start with first-order logic . For example, there is a sentence: (p → ~q) ∧ r

If we use P to represent this sentence at this time, we have the following equation: P = (p → ~q) ∧ r, which can be regarded as a function without independent variables. Therefore, using P itself can represent a truth value function that cannot affect the sentence; once such a function is established, we cannot change the truth value of the sentence’s internal components by assigning values ​​to variables. Therefore, a structure like P(x), rather than giving the function P a "window", on this "window", there is an alias (alias) corresponding to the internal components of the sentence, at this time, this proxy can be used Change the truth value of the internal components of the sentence to change the truth value of the entire sentence.
The above point of view is not the same as the concept of mathematical functions that we have learned in the past. It is a function that allows no variables and also allows variables that have nothing to do with the expression.

 

2.
If it is no longer limited to the truth function in logic, it can also have this feature for general functions. For example: f = x + y, are
these two functions equal to g = x + y ? Now I can only say: I don't know. Because we don’t know whether x and y have been assigned, if for f, x = 3 y = 1, and for g, x = 8 y = -1, then obviously f≠g, if x and y are not assigned Or there is only one function assignment, then whether f is equal to g can only be said to be undefined; f=g when and when

Guess you like

Origin blog.csdn.net/smilejiasmile/article/details/107828166