Why doesn't this proof require extensionality? (Agda)

Max*_*ber 3 equality theorem-proving agda

The following proves the equality of two functions:

?-? : ? {A B : Set} (f : A ? B) ? (? (x : A) ? f x) ? f
?-? f = refl
Run Code Online (Sandbox Code Playgroud)

Why doesn't it need extensionality? How does Agda know that the function to the left of the ? simplifies to f?

And*_*ács 5

(? x ? f x) ? f是函数定义相等的基本规则,称为 eta 规则。它内置于类型检查器中。类型理论的实现通常支持它。

  • Eta 相等是可判定的,外延相等是不可判定的,实际上也不是半可判定的。支持函数外延性作为“可证明”定理是另一回事。通常它是假设的,最近它在一些系统中得到证明,例如立方 Agda。 (3认同)
  • @MaxHeiber 听起来是正确的。我注意到 eta 相等性可以通过函数外延性进行命题证明,但是如果我们没有 funext 那么我们就无法从其他任何地方获得 eta,而且我认为我们得到了一个较弱的类型理论。不过它仍然可以使用。 (2认同)