Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update introduction to Relations.lagda.md #1008

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/plfa/part1/Relations.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ permalink : /Relations/
module plfa.part1.Relations where
```

After having defined operations such as addition and multiplication,
the next step is to define relations, such as _less than or equal_.
In this chapter, we will define the _less than or equal_ relation and
explore its properties. In Agda, there are two approaches to defining
relations. The first approach, similar to how we defined operations
such as addition and multiplication, defines a function that
_computes_ whether the relation holds. The second approach, which is
the topic of this chapter, represents a relation as an inductive data
type of _evidence_ that the relation holds. In the upcoming Chapter
[Decidable](/Decidable/) we will revisit the _less than or equal_
relation, show how to define the function that computes it and then
proceed to unify these two approaches, showing that they are 'two
sides of the same coin'.

## Imports

Expand Down Expand Up @@ -159,14 +168,6 @@ either the left or right, as it makes no sense to parse `1 ≤ 2 ≤ 3` as
either `(1 ≤ 2) ≤ 3` or `1 ≤ (2 ≤ 3)`.


## Decidability

Given two numbers, it is straightforward to compute whether or not the
first is less than or equal to the second. We don't give the code for
doing so here, but will return to this point in
Chapter [Decidable](/Decidable/).


## Inversion

In our definitions, we go from smaller things to larger things.
Expand Down
Loading