|
| 1 | +# Filters on posets |
| 2 | + |
| 3 | +```agda |
| 4 | +module order-theory.filters-posets where |
| 5 | +``` |
| 6 | + |
| 7 | +<details><summary>Imports</summary> |
| 8 | + |
| 9 | +```agda |
| 10 | +open import foundation.conjunction |
| 11 | +open import foundation.dependent-pair-types |
| 12 | +open import foundation.existential-quantification |
| 13 | +open import foundation.inhabited-subtypes |
| 14 | +open import foundation.propositions |
| 15 | +open import foundation.subtypes |
| 16 | +open import foundation.universe-levels |
| 17 | +
|
| 18 | +open import order-theory.lower-bounds-posets |
| 19 | +open import order-theory.posets |
| 20 | +open import order-theory.subposets |
| 21 | +``` |
| 22 | + |
| 23 | +</details> |
| 24 | + |
| 25 | +## Idea |
| 26 | + |
| 27 | +A {{#concept "filter" WDID=Q1052692 WD="filter" Agda=Filter-Poset}} of a |
| 28 | +[poset](order-theory.posets.md) `P` is a [subposet](order-theory.subposets.md) |
| 29 | +`F` of `P` with the following properties: |
| 30 | + |
| 31 | +- [Inhabitedness](foundation.inhabited-subtypes.md): `F` is inhabited. |
| 32 | +- Downward directedness: any two elements of `F` have a |
| 33 | + [lower bound](order-theory.lower-bounds-posets.md) in `F`. |
| 34 | +- Upward closure: if `x ∈ F`, `p ∈ P`, and `x ≤ p`, then `p ∈ F`. |
| 35 | + |
| 36 | +## Definition |
| 37 | + |
| 38 | +```agda |
| 39 | +module _ |
| 40 | + {l1 l2 l3 : Level} (P : Poset l1 l2) (F : Subposet l3 P) |
| 41 | + where |
| 42 | +
|
| 43 | + is-downward-directed-prop-Subposet : Prop (l1 ⊔ l2 ⊔ l3) |
| 44 | + is-downward-directed-prop-Subposet = |
| 45 | + Π-Prop |
| 46 | + ( type-Subposet P F) |
| 47 | + ( λ x → |
| 48 | + Π-Prop |
| 49 | + ( type-Subposet P F) |
| 50 | + ( λ y → |
| 51 | + ∃ ( type-Subposet P F) |
| 52 | + ( is-binary-lower-bound-Poset-Prop (poset-Subposet P F) x y))) |
| 53 | +
|
| 54 | + is-downward-directed-Subposet : UU (l1 ⊔ l2 ⊔ l3) |
| 55 | + is-downward-directed-Subposet = type-Prop is-downward-directed-prop-Subposet |
| 56 | +
|
| 57 | + is-upward-closed-prop-Subposet : Prop (l1 ⊔ l2 ⊔ l3) |
| 58 | + is-upward-closed-prop-Subposet = |
| 59 | + Π-Prop |
| 60 | + ( type-Subposet P F) |
| 61 | + ( λ (x , x∈F) → leq-prop-subtype (leq-prop-Poset P x) F) |
| 62 | +
|
| 63 | + is-upward-closed-Subposet : UU (l1 ⊔ l2 ⊔ l3) |
| 64 | + is-upward-closed-Subposet = type-Prop is-upward-closed-prop-Subposet |
| 65 | +
|
| 66 | + is-filter-prop-Subposet : Prop (l1 ⊔ l2 ⊔ l3) |
| 67 | + is-filter-prop-Subposet = |
| 68 | + is-inhabited-subtype-Prop F ∧ is-downward-directed-prop-Subposet ∧ |
| 69 | + is-upward-closed-prop-Subposet |
| 70 | +
|
| 71 | + is-filter-Subposet : UU (l1 ⊔ l2 ⊔ l3) |
| 72 | + is-filter-Subposet = type-Prop is-filter-prop-Subposet |
| 73 | +
|
| 74 | +Filter-Poset : |
| 75 | + {l1 l2 : Level} → (l : Level) → Poset l1 l2 → UU (l1 ⊔ l2 ⊔ lsuc l) |
| 76 | +Filter-Poset l P = type-subtype (is-filter-prop-Subposet {l3 = l} P) |
| 77 | +``` |
| 78 | + |
| 79 | +## External links |
| 80 | + |
| 81 | +- [Filter (mathematics)](<https://en.wikipedia.org/wiki/Filter_(mathematics)>) |
| 82 | + at Wikipedia |
| 83 | +- [filter](https://ncatlab.org/nlab/show/filter) at $n$Lab |
0 commit comments