Skip to content

Commit f7f94e9

Browse files
committed
Add a sentence to motivate eta-equality
Addresses #1099.
1 parent d1ffbc4 commit f7f94e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/plfa/part1/Connectives.lagda.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,15 @@ holds---how to _use_ the connective.[^from-wadler-2015]
8484

8585
Applying each destructor and reassembling the results with the
8686
constructor is the identity over products:
87+
8788
```agda
8889
η-× : ∀ {A B : Set} (w : A × B) → ⟨ proj₁ w , proj₂ w ⟩ ≡ w
8990
η-× w = refl
9091
```
92+
93+
In the general sense, for a record, apply projections to all fields, and
94+
then apply the record constructor; the result is the original record.
95+
This concept is known as the *η-equality* (hence we name it `η-×`).
9196
For record types, η-equality holds *by definition*.
9297
While proving `η-×`, we do not have to
9398
pattern match on `w` to know that η-equality holds.

0 commit comments

Comments
 (0)