-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The decidable total order on a standard finite type (#844)
Defines the decidable total order on a standard finite type. Also does a littlebit of refactoring of infix binary comparison operators. --------- Co-authored-by: Egbert Rijke <[email protected]>
- Loading branch information
1 parent
245488e
commit c674508
Showing
15 changed files
with
134 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/elementary-number-theory/decidable-total-order-standard-finite-types.lagda.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# The decidable total order of a standard finite type | ||
|
||
```agda | ||
module elementary-number-theory.decidable-total-order-standard-finite-types where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import elementary-number-theory.inequality-natural-numbers | ||
open import elementary-number-theory.inequality-standard-finite-types | ||
open import elementary-number-theory.natural-numbers | ||
|
||
open import foundation.dependent-pair-types | ||
open import foundation.propositional-truncations | ||
open import foundation.universe-levels | ||
|
||
open import order-theory.decidable-total-orders | ||
open import order-theory.total-orders | ||
|
||
open import univalent-combinatorics.standard-finite-types | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
The [standard finite type](univalent-combinatorics.standard-finite-types.md) of | ||
order `k` [equipped](foundation.structure.md) with its | ||
[standard ordering relation](elementary-number-theory.inequality-standard-finite-types.md) | ||
forms a [decidable total order](order-theory.decidable-total-orders.md). | ||
|
||
## Definition | ||
|
||
```agda | ||
is-total-leq-Fin : (k : ℕ) → is-total-Poset (Fin-Poset k) | ||
is-total-leq-Fin k n m = unit-trunc-Prop (linear-leq-Fin k n m) | ||
|
||
Fin-Total-Order : ℕ → Total-Order lzero lzero | ||
pr1 (Fin-Total-Order k) = Fin-Poset k | ||
pr2 (Fin-Total-Order k) = is-total-leq-Fin k | ||
|
||
Fin-Decidable-Total-Order : ℕ → Decidable-Total-Order lzero lzero | ||
pr1 (Fin-Decidable-Total-Order k) = Fin-Poset k | ||
pr1 (pr2 (Fin-Decidable-Total-Order k)) = is-total-leq-Fin k | ||
pr2 (pr2 (Fin-Decidable-Total-Order k)) = is-decidable-leq-Fin k | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.