Skip to content

Commit 40f0500

Browse files
committed
chore(Data/Rel): small fixes to SetRel docs (leanprover-community#40066)
Small grammar changes and a typo in the documented definition of `SetRel`. Follows on leanprover-community#39515 which fixed other typos. Co-authored-by: Kevin H Wilson <khwilson@gmail.com>
1 parent 4da511f commit 40f0500

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Mathlib/Data/Rel.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ operations on relations. For example:
5151
* map of a relation `R : α → β → Prop` under `f : α → γ`, `g : β → δ` is
5252
`Relation.Map R f g := fun c d ↦ ∃ a b, r a b ∧ f a = c ∧ g b = d`.
5353
54-
The latter approach is embodied by `SetRel α β`, with dedicated notation like `○` for composition.
54+
The latter approach is embodied by `SetRel α β`, with the dedicated notation `○` for composition.
55+
(Note that `○` is _not_ the same as function composition `∘`.)
5556
5657
Previously, `SetRel` suffered from the leakage of its definition as
5758
```
5859
def SetRel (α β : Type*) := α → β → Prop
5960
```
6061
The fact that `SetRel` wasn't an `abbrev` confuses automation.
61-
But simply making it an `abbrev` would
62-
have killed the point of having a separate less see-through type to perform relation operations on,
63-
so we instead redefined
62+
But simply making it an `abbrev` would have killed the point of having a separate less see-through
63+
type to perform relation operations on. So we instead redefined it as
6464
```
65-
def SetRel (α β : Type*) := Set (α × β) → Prop
65+
abbrev SetRel (α β : Type*) := Set (α × β)
6666
```
6767
This extra level of indirection guides automation correctly and prevents (some kinds of) leakage.
6868

0 commit comments

Comments
 (0)