Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

The following proves the equality of two functions:

η-→ : ∀ {A B : Set} (f : A → B) → (λ (x : A) → f x) ≡ f
η-→ f = refl

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

like image 926
Max Heiber Avatar asked Apr 07 '26 00:04

Max Heiber


1 Answers

(λ x → f x) ≡ f is a basic rule of definitional equality for functions, called the eta rule. It's built into the type checker. Implementations of type theory commonly support it.

like image 163
András Kovács Avatar answered Apr 08 '26 15:04

András Kovács



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!