Skip to content

Commit c6652a7

Browse files
Remove requirement for pattern matching in ×-comm and ×-assoc (plfa#1057)
* Update Connectives.lagda.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 810e13b commit c6652a7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/plfa/part1/Connectives.lagda.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ isomorphism_.
181181

182182
For commutativity, the `to` function swaps a pair, taking `⟨ x , y ⟩` to
183183
`⟨ y , x ⟩`, and the `from` function does the same (up to renaming).
184-
Instantiating the patterns correctly in `from∘to` and `to∘from` is essential.
185-
Replacing the definition of `from∘to` by `λ w → refl` will not work;
186-
and similarly for `to∘from`:
187184
```agda
188185
×-comm : ∀ {A B : Set} → A × B ≃ B × A
189186
×-comm =
@@ -210,8 +207,7 @@ former, corresponds to `⟨ aa , true ⟩`, which is a member of the latter.
210207

211208
For associativity, the `to` function reassociates two uses of pairing,
212209
taking `⟨ ⟨ x , y ⟩ , z ⟩` to `⟨ x , ⟨ y , z ⟩ ⟩`, and the `from` function does
213-
the inverse. Again, the evidence of left and right inverse requires
214-
matching against a suitable pattern to enable simplification:
210+
the inverse.
215211
```agda
216212
×-assoc : ∀ {A B C : Set} → (A × B) × C ≃ A × (B × C)
217213
×-assoc =
@@ -255,7 +251,7 @@ record ⊤ : Set where
255251
```
256252
Evidence that `` holds is of the form `tt`.
257253
The record construction `record {}` corresponds to the term `tt`. The
258-
constructor declaration allows us to write `tt`.
254+
constructor declaration allows us to write `tt`.
259255

260256
There is an introduction rule, but no elimination rule.
261257
Given evidence that `` holds, there is nothing more of interest we

0 commit comments

Comments
 (0)