-
Notifications
You must be signed in to change notification settings - Fork 92
Complemented subsets #1805
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
Open
lowasser
wants to merge
5
commits into
UniMath:master
Choose a base branch
from
lowasser:complemented-subsets
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Complemented subsets #1805
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,19 @@ | ||
| # Measure theory | ||
|
|
||
| ```agda | ||
| module measure-theory where | ||
|
|
||
| open import measure-theory.apart-subtypes public | ||
| open import measure-theory.complemented-subtypes public | ||
| open import measure-theory.empty-complemented-subtypes public | ||
| open import measure-theory.full-complemented-subtypes public | ||
| open import measure-theory.intersections-complemented-subtypes public | ||
| open import measure-theory.large-poset-complemented-subtypes public | ||
| open import measure-theory.unions-complemented-subtypes public | ||
| ``` | ||
|
|
||
| ## References | ||
|
|
||
| Our setup for measure theory closely follows {{#cite Zeuner22}}. | ||
|
|
||
| {{#bibliography}} |
This file contains hidden or 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,48 @@ | ||
| # Apart subtypes | ||
|
|
||
| ```agda | ||
| module measure-theory.apart-subtypes where | ||
| ``` | ||
|
|
||
| <details><summary>Imports</summary> | ||
|
|
||
| ```agda | ||
| open import foundation.apartness-relations | ||
| open import foundation.propositions | ||
| open import foundation.subtypes | ||
| open import foundation.universe-levels | ||
| ``` | ||
|
|
||
| </details> | ||
|
|
||
| ## Idea | ||
|
|
||
| Two [subtypes](foundation.subtypes.md) `A` and `B` of a type `X` equipped with | ||
| an [apartness relation](foundation.apartness-relations.md) are | ||
| {{#concept "apart" Disambiguation="subtypes of a type equipped with an apartness relation" Agda=apart-subtype-Type-With-Apartness}} | ||
| if every one of their elements is apart. | ||
|
|
||
| ## Definition | ||
|
|
||
| ```agda | ||
| module _ | ||
| {l1 l2 l3 l4 : Level} | ||
| (X : Type-With-Apartness l1 l2) | ||
| (A : subtype l3 (type-Type-With-Apartness X)) | ||
| (B : subtype l4 (type-Type-With-Apartness X)) | ||
| where | ||
|
|
||
| apart-prop-subtype-Type-With-Apartness : Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4) | ||
| apart-prop-subtype-Type-With-Apartness = | ||
| Π-Prop | ||
| ( type-Type-With-Apartness X) | ||
| ( λ a → | ||
| Π-Prop | ||
| ( type-Type-With-Apartness X) | ||
| ( λ b → | ||
| A a ⇒ B b ⇒ rel-apart-Type-With-Apartness X a b)) | ||
|
|
||
| apart-subtype-Type-With-Apartness : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4) | ||
| apart-subtype-Type-With-Apartness = | ||
| type-Prop apart-prop-subtype-Type-With-Apartness | ||
| ``` |
This file contains hidden or 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,147 @@ | ||||||
| # Complemented subtypes | ||||||
|
|
||||||
| ```agda | ||||||
| module measure-theory.complemented-subtypes where | ||||||
| ``` | ||||||
|
|
||||||
| <details><summary>Imports</summary> | ||||||
|
|
||||||
| ```agda | ||||||
| open import foundation.apartness-relations | ||||||
| open import foundation.coproduct-types | ||||||
| open import foundation.dependent-pair-types | ||||||
| open import foundation.disjoint-subtypes | ||||||
| open import foundation.propositions | ||||||
| open import foundation.subtypes | ||||||
| open import foundation.universe-levels | ||||||
|
|
||||||
| open import measure-theory.apart-subtypes | ||||||
| ``` | ||||||
|
|
||||||
| </details> | ||||||
|
|
||||||
| ## Idea | ||||||
|
|
||||||
| A | ||||||
| {{#concept "complemented subtype" Disambiguation="of a type with apartness" Agda=complemented-subtype-Type-With-Apartness}} | ||||||
| of a type `X` equipped with an | ||||||
| [apartness relation](foundation.apartness-relations.md) is an ordered pair of | ||||||
| [subtypes](foundation-core.subtypes.md) `A` and `A'` of `X` that are | ||||||
| [apart](measure-theory.apart-subtypes.md). | ||||||
|
|
||||||
| This definition follows {{#cite Zeuner22}}.. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ## Definition | ||||||
|
|
||||||
| ```agda | ||||||
| module _ | ||||||
| {l1 l2 : Level} | ||||||
| (X : Type-With-Apartness l1 l2) | ||||||
| where | ||||||
|
|
||||||
| complemented-subtype-Type-With-Apartness : (l : Level) → UU (l1 ⊔ l2 ⊔ lsuc l) | ||||||
| complemented-subtype-Type-With-Apartness l = | ||||||
| Σ ( subtype l (type-Type-With-Apartness X)) | ||||||
| ( λ A → | ||||||
| Σ ( subtype l (type-Type-With-Apartness X)) | ||||||
| ( apart-subtype-Type-With-Apartness X A)) | ||||||
|
|
||||||
| module _ | ||||||
| {l1 l2 l : Level} | ||||||
| (X : Type-With-Apartness l1 l2) | ||||||
| (cA@(A , A' , A#A') : complemented-subtype-Type-With-Apartness X l) | ||||||
| where | ||||||
|
|
||||||
| subtype-complemented-subtype-Type-With-Apartness : | ||||||
| subtype l (type-Type-With-Apartness X) | ||||||
| subtype-complemented-subtype-Type-With-Apartness = A | ||||||
|
|
||||||
| complement-subtype-complemented-subtype-Type-With-Apartness : | ||||||
| subtype l (type-Type-With-Apartness X) | ||||||
| complement-subtype-complemented-subtype-Type-With-Apartness = A' | ||||||
|
|
||||||
| apart-subtype-complemented-subtype-Type-With-Apartness : | ||||||
| apart-subtype-Type-With-Apartness | ||||||
| ( X) | ||||||
| ( subtype-complemented-subtype-Type-With-Apartness) | ||||||
| ( complement-subtype-complemented-subtype-Type-With-Apartness) | ||||||
| apart-subtype-complemented-subtype-Type-With-Apartness = A#A' | ||||||
| ``` | ||||||
|
|
||||||
| ## Properties | ||||||
|
|
||||||
| ### The complement of a complemented subtype | ||||||
|
|
||||||
| ```agda | ||||||
| module _ | ||||||
| {l1 l2 : Level} | ||||||
| (X : Type-With-Apartness l1 l2) | ||||||
| where | ||||||
|
|
||||||
| complement-complemented-subtype-Type-With-Apartness : | ||||||
| {l : Level} → complemented-subtype-Type-With-Apartness X l → | ||||||
| complemented-subtype-Type-With-Apartness X l | ||||||
| complement-complemented-subtype-Type-With-Apartness (A , A' , A#A') = | ||||||
| ( A' , | ||||||
| A , | ||||||
| λ a' a a'∈A' a∈A → | ||||||
| symmetric-apart-Type-With-Apartness X a a' (A#A' a a' a∈A a'∈A')) | ||||||
| ``` | ||||||
|
|
||||||
| ### The subtype and complement subtype associated with a complemented subtype are disjoint | ||||||
|
|
||||||
| ```agda | ||||||
| module _ | ||||||
| {l1 l2 l : Level} | ||||||
| (X : Type-With-Apartness l1 l2) | ||||||
| (cA@(A , A' , A#A') : complemented-subtype-Type-With-Apartness X l) | ||||||
| where | ||||||
|
|
||||||
| abstract | ||||||
| disjoint-complement-subtype-complemented-subtype-Type-With-Apartness : | ||||||
| disjoint-subtype | ||||||
| ( subtype-complemented-subtype-Type-With-Apartness X cA) | ||||||
| ( complement-subtype-complemented-subtype-Type-With-Apartness X cA) | ||||||
| disjoint-complement-subtype-complemented-subtype-Type-With-Apartness | ||||||
| x (x∈A , x∈A') = | ||||||
| antirefl-apart-Type-With-Apartness X x (A#A' x x x∈A x∈A') | ||||||
| ``` | ||||||
|
|
||||||
| ### The total subtype associated with a complemented subtype | ||||||
|
|
||||||
| ```agda | ||||||
| module _ | ||||||
| {l1 l2 l : Level} | ||||||
| (X : Type-With-Apartness l1 l2) | ||||||
| (cA@(A , A' , A#A') : complemented-subtype-Type-With-Apartness X l) | ||||||
| where | ||||||
|
|
||||||
| is-in-total-subtype-complemented-subtype-Type-With-Apartness : | ||||||
| type-Type-With-Apartness X → UU l | ||||||
| is-in-total-subtype-complemented-subtype-Type-With-Apartness x = | ||||||
| is-in-subtype A x + is-in-subtype A' x | ||||||
|
|
||||||
| abstract | ||||||
| is-prop-is-in-total-subtype-complemented-subtype-Type-With-Apartness : | ||||||
| (x : type-Type-With-Apartness X) → | ||||||
| is-prop (is-in-total-subtype-complemented-subtype-Type-With-Apartness x) | ||||||
| is-prop-is-in-total-subtype-complemented-subtype-Type-With-Apartness x = | ||||||
| is-prop-coproduct | ||||||
| ( ev-pair | ||||||
| ( disjoint-complement-subtype-complemented-subtype-Type-With-Apartness | ||||||
| ( X) | ||||||
| ( cA) | ||||||
| ( x))) | ||||||
| ( is-prop-is-in-subtype A x) | ||||||
| ( is-prop-is-in-subtype A' x) | ||||||
|
|
||||||
| total-subtype-complemented-subtype-Type-With-Apartness : | ||||||
| subtype l (type-Type-With-Apartness X) | ||||||
| total-subtype-complemented-subtype-Type-With-Apartness x = | ||||||
| ( is-in-total-subtype-complemented-subtype-Type-With-Apartness x , | ||||||
| is-prop-is-in-total-subtype-complemented-subtype-Type-With-Apartness x) | ||||||
| ``` | ||||||
|
|
||||||
| ## References | ||||||
|
|
||||||
| {{#bibliography}} | ||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this choice of terminology a bit confusing, since it is certainly not a subtype with a complement, but a subtype equipped with a subtype of its complement. Maybe you can say something more about how these objects should be interpreted and what justifies the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should also be noted that this concept is not to be confused with "decidable subtypes", i.e., subtypes$X \subseteq A$ such that $(X \cup {(A\setminus X)}) = A$ , which appear in the literature under the name "complemented subtype".