Fix 和 Self 在构造微积分上的确切区别是什么?

What is the exact difference between Fix and Self on the Calculus of Constructions?

Self Types for Dependently Typed Lambda Encodings paper (by Peng Fu and Aaron Stump) proposes self types, which are, supposedly, sufficient to encode the induction principle and Scott-encoded datatypes on the Calculus of Constructions,不会使系统不一致或引入悖论。

那篇论文的符号太重了,我无法完全理解如何实现它。

确切地说,Fix 和 Self 的主要区别是什么?或者,换句话说:在哪些点上应该限制天真实现的 Fix,以便它不会在核心演算上留下不一致?

这是我浏览论文后的理解。

一个Fix类型满足类型等价(假设等递归类型)

G |- M : Fix x. t   <=>     G |- M : t{Fix x. t / x}

即您可以在其自身上展开类型。请注意术语 M 在这里没有任何作用。如果使用等递归类型,M 会应用一些同构(例如 Haskell 的 newtype 构造函数),但这并不重要。

相反,Self 类型满足以下条件

G |- M : Self x. t   <=>     G |- M : t{M / x}

现在,x不是类型变量,而是术语变量。术语在类型中得到 "moved"。这根本不是递归类型。