-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* print mismatched names in Quote * fix after review * misc lemmas * fix endings * rename
- Loading branch information
1 parent
c95d1a0
commit bb0071b
Showing
5 changed files
with
87 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import prelude | ||
import basics.isotoequiv | ||
import data.truncation | ||
import paths.hlevel | ||
|
||
def prop/trunc (A : type) (A/prop : is-prop A) : equiv A (trunc A) = | ||
prop/equiv _ _ A/prop (trunc/prop A) | ||
(λ x → ret x) (elim [ ret a → a | glue (x → x/ih) (y → y/ih) i → A/prop x/ih y/ih i ]) | ||
|
||
def unique-choice (A : type) (P : A → type) | ||
(P/prop : (x : A) → is-prop (P x)) (P/trunc : (x : A) → trunc (P x)) | ||
: (x : A) → P x | ||
= | ||
λ x → coe 0 1 (P/trunc x) in symm^1 _ (ua _ _ (prop/trunc (P x) (P/prop x))) |