Skip to content

Commit 7403e40

Browse files
Order theory from @spcfox's modal logic (#1205)
Subset of #1146 #1170 --------- Co-authored-by: spcfox Co-authored-by: Egbert Rijke <e.m.rijke@gmail.com>
1 parent 8bedb22 commit 7403e40

13 files changed

+349
-106
lines changed

src/order-theory.lagda.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ open import order-theory.top-elements-posets public
107107
open import order-theory.top-elements-preorders public
108108
open import order-theory.total-orders public
109109
open import order-theory.total-preorders public
110+
open import order-theory.upper-bounds-chains-posets public
110111
open import order-theory.upper-bounds-large-posets public
111112
open import order-theory.upper-bounds-posets public
112113
open import order-theory.upper-sets-large-posets public
113114
open import order-theory.well-founded-orders public
114115
open import order-theory.well-founded-relations public
116+
open import order-theory.zorns-lemma public
115117
```

src/order-theory/chains-posets.lagda.md

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,49 @@ module order-theory.chains-posets where
77
<details><summary>Imports</summary>
88

99
```agda
10+
open import foundation.dependent-pair-types
11+
open import foundation.existential-quantification
12+
open import foundation.function-types
1013
open import foundation.propositions
14+
open import foundation.subtypes
1115
open import foundation.universe-levels
1216
1317
open import order-theory.chains-preorders
1418
open import order-theory.posets
19+
open import order-theory.subposets
1520
```
1621

1722
</details>
1823

1924
## Idea
2025

21-
A **chain** in a poset `P` is a subtype `S` of `P` such that the ordering of `P`
22-
restricted to `S` is linear.
26+
A {{#concept "chain" Disambiguation="in a poset" Agda=chain-Poset}} in a
27+
[poset](order-theory.posets.md) `P` is a [subtype](foundation-core.subtypes.md)
28+
`S` of `P` such that the ordering of `P` restricted to `S` is
29+
[linear](order-theory.total-orders.md).
2330

24-
## Definition
31+
## Definitions
32+
33+
### The predicate on subsets of posets to be a chain
2534

2635
```agda
2736
module _
28-
{l1 l2 : Level} (X : Poset l1 l2)
37+
{l1 l2 l3 : Level} (X : Poset l1 l2) (S : Subposet l3 X)
2938
where
3039
31-
is-chain-Subposet-Prop :
32-
{l3 : Level} (S : type-Poset X → Prop l3) → Prop (l1 ⊔ l2 ⊔ l3)
33-
is-chain-Subposet-Prop = is-chain-Subpreorder-Prop (preorder-Poset X)
40+
is-chain-prop-Subposet : Prop (l1 ⊔ l2 ⊔ l3)
41+
is-chain-prop-Subposet = is-chain-prop-Subpreorder (preorder-Poset X) S
42+
43+
is-chain-Subposet : UU (l1 ⊔ l2 ⊔ l3)
44+
is-chain-Subposet = is-chain-Subpreorder (preorder-Poset X) S
3445
35-
is-chain-Subposet :
36-
{l3 : Level} (S : type-Poset X → Prop l3) → UU (l1 ⊔ l2 ⊔ l3)
37-
is-chain-Subposet = is-chain-Subpreorder (preorder-Poset X)
46+
is-prop-is-chain-Subposet : is-prop is-chain-Subposet
47+
is-prop-is-chain-Subposet = is-prop-is-chain-Subpreorder (preorder-Poset X) S
48+
```
3849

39-
is-prop-is-chain-Subposet :
40-
{l3 : Level} (S : type-Poset X → Prop l3) →
41-
is-prop (is-chain-Subposet S)
42-
is-prop-is-chain-Subposet = is-prop-is-chain-Subpreorder (preorder-Poset X)
50+
### Chains in posets
4351

52+
```agda
4453
chain-Poset :
4554
{l1 l2 : Level} (l : Level) (X : Poset l1 l2) → UU (l1 ⊔ l2 ⊔ lsuc l)
4655
chain-Poset l X = chain-Preorder l (preorder-Poset X)
@@ -49,29 +58,40 @@ module _
4958
{l1 l2 l3 : Level} (X : Poset l1 l2) (C : chain-Poset l3 X)
5059
where
5160
52-
sub-preorder-chain-Poset : type-Poset X → Prop l3
53-
sub-preorder-chain-Poset =
54-
sub-preorder-chain-Preorder (preorder-Poset X) C
61+
subposet-chain-Poset : Subposet l3 X
62+
subposet-chain-Poset =
63+
subpreorder-chain-Preorder (preorder-Poset X) C
64+
65+
is-chain-subposet-chain-Poset :
66+
is-chain-Subposet X subposet-chain-Poset
67+
is-chain-subposet-chain-Poset =
68+
is-chain-subpreorder-chain-Preorder (preorder-Poset X) C
5569
5670
type-chain-Poset : UU (l1 ⊔ l3)
5771
type-chain-Poset = type-chain-Preorder (preorder-Poset X) C
5872
73+
inclusion-type-chain-Poset : type-chain-Poset → type-Poset X
74+
inclusion-type-chain-Poset =
75+
inclusion-subpreorder-chain-Preorder (preorder-Poset X) C
76+
5977
module _
60-
{l1 l2 : Level} (X : Poset l1 l2)
78+
{l1 l2 l3 l4 : Level} (X : Poset l1 l2)
79+
(C : chain-Poset l3 X) (D : chain-Poset l4 X)
6180
where
6281
63-
inclusion-chain-Poset-Prop :
64-
{l3 l4 : Level} → chain-Poset l3 X → chain-Poset l4 X →
65-
Prop (l1 ⊔ l3 ⊔ l4)
66-
inclusion-chain-Poset-Prop = inclusion-chain-Preorder-Prop (preorder-Poset X)
82+
inclusion-chain-prop-Poset : Prop (l1 ⊔ l3 ⊔ l4)
83+
inclusion-chain-prop-Poset =
84+
inclusion-prop-chain-Preorder (preorder-Poset X) C D
6785
68-
inclusion-chain-Poset :
69-
{l3 l4 : Level} → chain-Poset l3 X → chain-Poset l4 X → UU (l1 ⊔ l3 ⊔ l4)
70-
inclusion-chain-Poset = inclusion-chain-Preorder (preorder-Poset X)
86+
inclusion-chain-Poset : UU (l1 ⊔ l3 ⊔ l4)
87+
inclusion-chain-Poset = inclusion-chain-Preorder (preorder-Poset X) C D
7188
72-
is-prop-inclusion-chain-Poset :
73-
{l3 l4 : Level} (C : chain-Poset l3 X) (D : chain-Poset l4 X) →
74-
is-prop (inclusion-chain-Poset C D)
89+
is-prop-inclusion-chain-Poset : is-prop inclusion-chain-Poset
7590
is-prop-inclusion-chain-Poset =
76-
is-prop-inclusion-chain-Preorder (preorder-Poset X)
91+
is-prop-inclusion-chain-Preorder (preorder-Poset X) C D
7792
```
93+
94+
## External links
95+
96+
- [chain, in order theory](https://ncatlab.org/nlab/show/chain#in_order_theory)
97+
at $n$Lab

src/order-theory/chains-preorders.lagda.md

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,34 @@ open import order-theory.total-preorders
2121

2222
## Idea
2323

24-
A **chain** in a preorder `P` is a subtype `S` of `P` such that the ordering of
25-
`P` restricted to `S` is linear.
24+
A {{#concept "chain" Disambiguation="in a preorder" Agda=chain-Preorder}} in a
25+
[preorder](order-theory.preorders.md) `P` is a
26+
[subtype](foundation-core.subtypes.md) `S` of `P` such that the ordering of `P`
27+
restricted to `S` is [linear](order-theory.total-preorders.md).
2628

27-
## Definition
29+
## Definitions
30+
31+
### The predicate on subsets of preorders to be a chain
2832

2933
```agda
3034
module _
31-
{l1 l2 : Level} (X : Preorder l1 l2)
35+
{l1 l2 l3 : Level} (X : Preorder l1 l2) (S : Subpreorder l3 X)
3236
where
3337
34-
is-chain-Subpreorder-Prop :
35-
{l3 : Level} (S : type-Preorder X → Prop l3) → Prop (l1 ⊔ l2 ⊔ l3)
36-
is-chain-Subpreorder-Prop S =
38+
is-chain-prop-Subpreorder : Prop (l1 ⊔ l2 ⊔ l3)
39+
is-chain-prop-Subpreorder =
3740
is-total-Preorder-Prop (preorder-Subpreorder X S)
3841
39-
is-chain-Subpreorder :
40-
{l3 : Level} (S : type-Preorder X → Prop l3) → UU (l1 ⊔ l2 ⊔ l3)
41-
is-chain-Subpreorder S = type-Prop (is-chain-Subpreorder-Prop S)
42+
is-chain-Subpreorder : UU (l1 ⊔ l2 ⊔ l3)
43+
is-chain-Subpreorder = type-Prop is-chain-prop-Subpreorder
44+
45+
is-prop-is-chain-Subpreorder : is-prop is-chain-Subpreorder
46+
is-prop-is-chain-Subpreorder = is-prop-type-Prop is-chain-prop-Subpreorder
47+
```
4248

43-
is-prop-is-chain-Subpreorder :
44-
{l3 : Level} (S : type-Preorder X → Prop l3) →
45-
is-prop (is-chain-Subpreorder S)
46-
is-prop-is-chain-Subpreorder S =
47-
is-prop-type-Prop (is-chain-Subpreorder-Prop S)
49+
### Chains in preorders
4850

51+
```agda
4952
chain-Preorder :
5053
{l1 l2 : Level} (l : Level) (X : Preorder l1 l2) → UU (l1 ⊔ l2 ⊔ lsuc l)
5154
chain-Preorder l X =
@@ -55,32 +58,41 @@ module _
5558
{l1 l2 l3 : Level} (X : Preorder l1 l2) (C : chain-Preorder l3 X)
5659
where
5760
58-
sub-preorder-chain-Preorder : type-Preorder X → Prop l3
59-
sub-preorder-chain-Preorder = pr1 C
61+
subpreorder-chain-Preorder : Subpreorder l3 X
62+
subpreorder-chain-Preorder = pr1 C
63+
64+
is-chain-subpreorder-chain-Preorder :
65+
is-chain-Subpreorder X subpreorder-chain-Preorder
66+
is-chain-subpreorder-chain-Preorder = pr2 C
6067
6168
type-chain-Preorder : UU (l1 ⊔ l3)
62-
type-chain-Preorder = type-subtype sub-preorder-chain-Preorder
69+
type-chain-Preorder = type-subtype subpreorder-chain-Preorder
70+
71+
inclusion-subpreorder-chain-Preorder : type-chain-Preorder → type-Preorder X
72+
inclusion-subpreorder-chain-Preorder =
73+
inclusion-subtype subpreorder-chain-Preorder
6374
6475
module _
65-
{l1 l2 : Level} (X : Preorder l1 l2)
76+
{l1 l2 l3 l4 : Level} (X : Preorder l1 l2)
77+
(C : chain-Preorder l3 X) (D : chain-Preorder l4 X)
6678
where
6779
68-
inclusion-chain-Preorder-Prop :
69-
{l3 l4 : Level} → chain-Preorder l3 X → chain-Preorder l4 X →
70-
Prop (l1 ⊔ l3 ⊔ l4)
71-
inclusion-chain-Preorder-Prop C D =
72-
inclusion-Subpreorder-Prop X
73-
( sub-preorder-chain-Preorder X C)
74-
( sub-preorder-chain-Preorder X D)
80+
inclusion-prop-chain-Preorder : Prop (l1 ⊔ l3 ⊔ l4)
81+
inclusion-prop-chain-Preorder =
82+
inclusion-prop-Subpreorder X
83+
( subpreorder-chain-Preorder X C)
84+
( subpreorder-chain-Preorder X D)
7585
76-
inclusion-chain-Preorder :
77-
{l3 l4 : Level} → chain-Preorder l3 X → chain-Preorder l4 X →
78-
UU (l1 ⊔ l3 ⊔ l4)
79-
inclusion-chain-Preorder C D = type-Prop (inclusion-chain-Preorder-Prop C D)
86+
inclusion-chain-Preorder : UU (l1 ⊔ l3 ⊔ l4)
87+
inclusion-chain-Preorder = type-Prop inclusion-prop-chain-Preorder
8088
8189
is-prop-inclusion-chain-Preorder :
82-
{l3 l4 : Level} (C : chain-Preorder l3 X) (D : chain-Preorder l4 X) →
83-
is-prop (inclusion-chain-Preorder C D)
84-
is-prop-inclusion-chain-Preorder C D =
85-
is-prop-type-Prop (inclusion-chain-Preorder-Prop C D)
90+
is-prop inclusion-chain-Preorder
91+
is-prop-inclusion-chain-Preorder =
92+
is-prop-type-Prop inclusion-prop-chain-Preorder
8693
```
94+
95+
## External links
96+
97+
- [chain, in order theory](https://ncatlab.org/nlab/show/chain#in_order_theory)
98+
at $n$Lab

src/order-theory/finite-preorders.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ module _
173173
pr2 is-finite-preorder-Preorder-𝔽 = is-decidable-leq-Preorder-𝔽
174174
```
175175

176-
### Decidable sub-preorders of finite preorders
176+
### Decidable subpreorders of finite preorders
177177

178178
```agda
179179
module _

src/order-theory/finitely-graded-posets.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ module _
403403
404404
is-top-element-Finitely-Graded-Poset-Prop : Prop (l1 ⊔ l2)
405405
is-top-element-Finitely-Graded-Poset-Prop =
406-
is-top-element-Poset-Prop
406+
is-top-element-prop-Poset
407407
( poset-Finitely-Graded-Poset X)
408408
( element-face-Finitely-Graded-Poset X x)
409409

src/order-theory/maximal-chains-preorders.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module _
3737
( λ D →
3838
function-Prop
3939
( inclusion-chain-Preorder X C D)
40-
( inclusion-chain-Preorder-Prop X D C))
40+
( inclusion-prop-chain-Preorder X D C))
4141
4242
is-maximal-chain-Preorder :
4343
{l3 : Level} → chain-Preorder l3 X → UU (l1 ⊔ l2 ⊔ lsuc l3)

src/order-theory/subposets.lagda.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ ordering on `P`, subposets have again the structure of a poset.
3030
### Subposets
3131

3232
```agda
33+
Subposet :
34+
{l1 l2 : Level} (l3 : Level) → Poset l1 l2 → UU (l1 ⊔ lsuc l3)
35+
Subposet l3 P = Subpreorder l3 (preorder-Poset P)
36+
3337
module _
34-
{l1 l2 l3 : Level} (X : Poset l1 l2) (S : type-Poset X → Prop l3)
38+
{l1 l2 l3 : Level} (X : Poset l1 l2) (S : Subposet l3 X)
3539
where
3640
3741
type-Subposet : UU (l1 ⊔ l3)
@@ -72,21 +76,20 @@ module _
7276
pr2 poset-Subposet = antisymmetric-leq-Subposet
7377
```
7478

75-
### Inclusion of sub-posets
79+
### Inclusion of subposets
7680

7781
```agda
7882
module _
7983
{l1 l2 : Level} (X : Poset l1 l2)
8084
where
8185
8286
module _
83-
{l3 l4 : Level} (S : type-Poset X → Prop l3)
84-
(T : type-Poset X → Prop l4)
87+
{l3 l4 : Level} (S : Subposet l3 X) (T : Subposet l4 X)
8588
where
8689
87-
inclusion-Subposet-Prop : Prop (l1 ⊔ l3 ⊔ l4)
88-
inclusion-Subposet-Prop =
89-
inclusion-Subpreorder-Prop (preorder-Poset X) S T
90+
inclusion-prop-Subposet : Prop (l1 ⊔ l3 ⊔ l4)
91+
inclusion-prop-Subposet =
92+
inclusion-prop-Subpreorder (preorder-Poset X) S T
9093
9194
inclusion-Subposet : UU (l1 ⊔ l3 ⊔ l4)
9295
inclusion-Subposet = inclusion-Subpreorder (preorder-Poset X) S T
@@ -96,23 +99,21 @@ module _
9699
is-prop-inclusion-Subpreorder (preorder-Poset X) S T
97100
98101
refl-inclusion-Subposet :
99-
{l3 : Level} (S : type-Poset X → Prop l3) →
100-
inclusion-Subposet S S
102+
{l3 : Level} (S : Subposet l3 X) → inclusion-Subposet S S
101103
refl-inclusion-Subposet = refl-inclusion-Subpreorder (preorder-Poset X)
102104
103105
transitive-inclusion-Subposet :
104-
{l3 l4 l5 : Level} (S : type-Poset X → Prop l3)
105-
(T : type-Poset X → Prop l4)
106-
(U : type-Poset X → Prop l5) →
106+
{l3 l4 l5 : Level}
107+
(S : Subposet l3 X) (T : Subposet l4 X) (U : Subposet l5 X) →
107108
inclusion-Subposet T U →
108109
inclusion-Subposet S T →
109110
inclusion-Subposet S U
110111
transitive-inclusion-Subposet =
111112
transitive-inclusion-Subpreorder (preorder-Poset X)
112113
113-
sub-poset-Preorder : (l : Level) → Preorder (l1 ⊔ lsuc l) (l1 ⊔ l)
114-
pr1 (sub-poset-Preorder l) = type-Poset X → Prop l
115-
pr1 (pr2 (sub-poset-Preorder l)) = inclusion-Subposet-Prop
116-
pr1 (pr2 (pr2 (sub-poset-Preorder l))) = refl-inclusion-Subposet
117-
pr2 (pr2 (pr2 (sub-poset-Preorder l))) = transitive-inclusion-Subposet
114+
subposet-Preorder : (l : Level) → Preorder (l1 ⊔ lsuc l) (l1 ⊔ l)
115+
pr1 (subposet-Preorder l) = Subposet l X
116+
pr1 (pr2 (subposet-Preorder l)) = inclusion-prop-Subposet
117+
pr1 (pr2 (pr2 (subposet-Preorder l))) = refl-inclusion-Subposet
118+
pr2 (pr2 (pr2 (subposet-Preorder l))) = transitive-inclusion-Subposet
118119
```

src/order-theory/subpreorders.lagda.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ module _
8282
(T : type-Preorder P → Prop l4)
8383
where
8484
85-
inclusion-Subpreorder-Prop : Prop (l1 ⊔ l3 ⊔ l4)
86-
inclusion-Subpreorder-Prop =
85+
inclusion-prop-Subpreorder : Prop (l1 ⊔ l3 ⊔ l4)
86+
inclusion-prop-Subpreorder =
8787
Π-Prop (type-Preorder P) (λ x → hom-Prop (S x) (T x))
8888
8989
inclusion-Subpreorder : UU (l1 ⊔ l3 ⊔ l4)
90-
inclusion-Subpreorder = type-Prop inclusion-Subpreorder-Prop
90+
inclusion-Subpreorder = type-Prop inclusion-prop-Subpreorder
9191
9292
is-prop-inclusion-Subpreorder : is-prop inclusion-Subpreorder
9393
is-prop-inclusion-Subpreorder =
94-
is-prop-type-Prop inclusion-Subpreorder-Prop
94+
is-prop-type-Prop inclusion-prop-Subpreorder
9595
9696
refl-inclusion-Subpreorder :
9797
{l3 : Level} → is-reflexive (inclusion-Subpreorder {l3})
@@ -108,7 +108,7 @@ module _
108108
109109
Sub-Preorder : (l : Level) → Preorder (l1 ⊔ lsuc l) (l1 ⊔ l)
110110
pr1 (Sub-Preorder l) = type-Preorder P → Prop l
111-
pr1 (pr2 (Sub-Preorder l)) = inclusion-Subpreorder-Prop
111+
pr1 (pr2 (Sub-Preorder l)) = inclusion-prop-Subpreorder
112112
pr1 (pr2 (pr2 (Sub-Preorder l))) = refl-inclusion-Subpreorder
113113
pr2 (pr2 (pr2 (Sub-Preorder l))) = transitive-inclusion-Subpreorder
114114
```

src/order-theory/top-elements-large-posets.lagda.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ open import order-theory.large-posets
1717

1818
## Idea
1919

20-
We say that a [large poset](order-theory.large-posets.md) `P` has a **largest
21-
element** if it comes equipped with an element `t : type-Large-Poset P lzero`
22-
such that `x ≤ t` holds for every `x : P`
20+
We say that a [large poset](order-theory.large-posets.md) `P` has a
21+
{{#concept "largest element" Disambiguation="in a large poset" WD="maximal and minimal elements" WDID=Q1475294 Agda=is-top-element-Large-Poset}}
22+
if it comes equipped with an element `t : type-Large-Poset P lzero` such that
23+
`x ≤ t` holds for every `x : P`
2324

2425
## Definition
2526

0 commit comments

Comments
 (0)