-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds strict β-laws for the standard pushouts in a new module `synthetic-homotopy-theory.rewriting-pushouts`. ### Todo - [x] Wait for #885. - [x] ~Refactor postulates of universal properties to be phrased in terms of coherently invertible maps.~ - [x] Add separate file for rewrites `synthetic-homotopy-theory.rewriting-pushouts`.
- Loading branch information
1 parent
bc8998a
commit 378ff01
Showing
17 changed files
with
1,316 additions
and
183 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
name: agda-unimath | ||
include: src | ||
flags: --without-K --exact-split --no-import-sorts --auto-inline | ||
flags: --without-K --exact-split --no-import-sorts --auto-inline -WnoWithoutKFlagPrimEraseEquality |
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,47 @@ | ||
# Erasing equality | ||
|
||
```agda | ||
module reflection.erasing-equality where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import foundation.universe-levels | ||
|
||
open import foundation-core.identity-types | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
Agda's builtin primitive `primEraseEquality` is a special construct on | ||
[identifications](foundation-core.identity-types.md) that for every | ||
identification `x = y` gives an identification `x = y` with the following | ||
reduction behaviour: | ||
|
||
- If the two end points `x = y` normalize to the same term, `primEraseEquality` | ||
reduces to `refl`. | ||
|
||
For example, `primEraseEquality` applied to the loop of the | ||
[circle](synthetic-homotopy-theory.circle.md) will compute to `refl`, while | ||
`primEraseEquality` applied to the nontrivial identification in the | ||
[interval](synthetic-homotopy-theory.interval-type.md) will not reduce. | ||
|
||
This primitive is useful for [rewrite rules](reflection.rewriting.md), as it | ||
ensures that the identification used in defining the rewrite rule also computes | ||
to `refl`. Concretely, if the identification `β` defines a rewrite rule, and `β` | ||
is defined via `primEraseEqaulity`, then we have the strict equality `β ≐ refl`. | ||
|
||
## Primitives | ||
|
||
```agda | ||
primitive | ||
primEraseEquality : {l : Level} {A : UU l} {x y : A} → x = y → x = y | ||
``` | ||
|
||
## External links | ||
|
||
- [Built-ins#Equality](https://agda.readthedocs.io/en/latest/language/built-ins.html#equality) | ||
at Agda's documentation pages |
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,49 @@ | ||
# Rewriting | ||
|
||
```agda | ||
{-# OPTIONS --rewriting #-} | ||
|
||
module reflection.rewriting where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import foundation-core.identity-types | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
Agda's rewriting functionality allows us to add new strict equalities to our | ||
type theory. Given an [identification](foundation-core.identity-types.md) | ||
`β : x = y`, then adding a rewrite rule for `β` with | ||
|
||
```text | ||
{-# REWRITE β #-} | ||
``` | ||
|
||
will make it so `x` rewrites to `y`, i.e., `x ≐ y`. | ||
|
||
**Warning.** Rewriting is by nature a very unsafe tool so we advice exercising | ||
abundant caution when defining such rules. | ||
|
||
## Definitions | ||
|
||
We declare to Agda that the | ||
[standard identity relation](foundation.identity-types.md) may be used to define | ||
rewrite rules. | ||
|
||
```agda | ||
{-# BUILTIN REWRITE _=_ #-} | ||
``` | ||
|
||
## See also | ||
|
||
- [Erasing equality](reflection.erasing-equality.md) | ||
|
||
## External links | ||
|
||
- [Rewriting](https://agda.readthedocs.io/en/latest/language/rewriting.html) at | ||
Agda's documentation pages |
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.