用α约简来减少λ演算

时间:2018-11-26 20:52:55

标签: lambda calculus reduction

我正在尝试完成lambda演算的减少,但我无法在此之后继续。我必须减小值“两个两个”,其中“两个=λfx.f(f x)”

我开始写以下内容:

(λfx.f (f x) two) = λx.two (two x)
                  = λa.two(λfx.f(f x) a)
                  = two(λx.a(a x))
                  = (λfx.f (f x) (λx.a(a x)))

那一步之后,我开始感到非常困惑,我不确定如何继续。我是否必须将第二个lambda项应用于第一个lambda项的f变量?我尝试过,但没有结果。

1 个答案:

答案 0 :(得分:0)

/** * * @author blj0011 */ public class DataFrame { private char id; private String date; private double total; private double val; public DataFrame(char id, String date, double total, double val) { this.id = id; this.date = date; this.total = total; this.val = val; } public double getVal() { return val; } public void setVal(double val) { this.val = val; } public char getId() { return id; } public void setId(char id) { this.id = id; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public double getTotal() { return total; } public void setTotal(double total) { this.total = total; } @Override public String toString() { return id + ", " + date + ", " + total + ", " + date + ", " + val; } } ,请注意

const { promisify } = require('util');
const ttl = promisify(client.ttl).bind(client);
client.set('key', 'value!', 'EX', 10);
const remaingTime = await ttl('key');

因此

2 := λfx.f (f x)