Skip to content

Commit

Permalink
Refactoring types with automorphisms/endomorphisms and descent data f…
Browse files Browse the repository at this point in the history
…or the circle (#812)

Co-authored-by: Fredrik Bakke <fredrbak@gmail.com>
  • Loading branch information
EgbertRijke and fredrik-bakke committed Oct 8, 2023
1 parent d486570 commit 9d15032
Show file tree
Hide file tree
Showing 29 changed files with 1,986 additions and 869 deletions.
6 changes: 3 additions & 3 deletions src/elementary-number-theory/integers.lagda.md
Expand Up @@ -126,9 +126,9 @@ pred-ℤ (inr (inl star)) = inl zero-ℕ
pred-ℤ (inr (inr zero-ℕ)) = inr (inl star)
pred-ℤ (inr (inr (succ-ℕ x))) = inr (inr x)

ℤ-Endo : Endo lzero
pr1 ℤ-Endo =
pr2 ℤ-Endo = succ-ℤ
ℤ-Type-With-Endomorphism : Type-With-Endomorphism lzero
pr1 ℤ-Type-With-Endomorphism =
pr2 ℤ-Type-With-Endomorphism = succ-ℤ
```

### The negative of an integer
Expand Down
6 changes: 3 additions & 3 deletions src/elementary-number-theory/modular-arithmetic.lagda.md
Expand Up @@ -166,9 +166,9 @@ succ-ℤ-Mod : (k : ℕ) → ℤ-Mod k → ℤ-Mod k
succ-ℤ-Mod zero-ℕ = succ-ℤ
succ-ℤ-Mod (succ-ℕ k) = succ-Fin (succ-ℕ k)

ℤ-Mod-Endo : (k : ℕ) Endo lzero
pr1 (ℤ-Mod-Endo k) = ℤ-Mod k
pr2 (ℤ-Mod-Endo k) = succ-ℤ-Mod k
ℤ-Mod-Type-With-Endomorphism : (k : ℕ) Type-With-Endomorphism lzero
pr1 (ℤ-Mod-Type-With-Endomorphism k) = ℤ-Mod k
pr2 (ℤ-Mod-Type-With-Endomorphism k) = succ-ℤ-Mod k

abstract
is-equiv-succ-ℤ-Mod : (k : ℕ) is-equiv (succ-ℤ-Mod k)
Expand Down
4 changes: 4 additions & 0 deletions src/structured-types.lagda.md
Expand Up @@ -15,6 +15,8 @@ open import structured-types.cyclic-types public
open import structured-types.dependent-products-h-spaces public
open import structured-types.dependent-products-pointed-types public
open import structured-types.dependent-products-wild-monoids public
open import structured-types.dependent-types-equipped-with-automorphisms public
open import structured-types.equivalences-types-equipped-with-automorphisms public
open import structured-types.equivalences-types-equipped-with-endomorphisms public
open import structured-types.faithful-pointed-maps public
open import structured-types.fibers-of-pointed-maps public
Expand All @@ -32,6 +34,7 @@ open import structured-types.magmas public
open import structured-types.mere-equivalences-types-equipped-with-endomorphisms public
open import structured-types.morphisms-h-spaces public
open import structured-types.morphisms-magmas public
open import structured-types.morphisms-types-equipped-with-automorphisms public
open import structured-types.morphisms-types-equipped-with-endomorphisms public
open import structured-types.morphisms-wild-monoids public
open import structured-types.noncoherent-h-spaces public
Expand All @@ -46,6 +49,7 @@ open import structured-types.pointed-sections public
open import structured-types.pointed-types public
open import structured-types.pointed-types-equipped-with-automorphisms public
open import structured-types.pointed-unit-type public
open import structured-types.sets-equipped-with-automorphisms public
open import structured-types.symmetric-elements-involutive-types public
open import structured-types.symmetric-h-spaces public
open import structured-types.types-equipped-with-automorphisms public
Expand Down
Expand Up @@ -19,14 +19,33 @@ open import structured-types.types-equipped-with-endomorphisms

## Idea

The cartesian product of `(A , f)` and `(B , g)` is defined as `(A × B , f × g)`
The **cartesian product** of two
[types equipped with an endomorphism](structured-types.types-equipped-with-endomorphisms.md)
`(A , f)` and `(B , g)` is defined as `(A × B , f × g)`

## Definitions

```agda
product-Endo :
{l1 l2 : Level} Endo l1 Endo l2 Endo (l1 ⊔ l2)
product-Endo A B =
(type-Endo A × type-Endo B) ,
map-prod (endomorphism-Endo A) (endomorphism-Endo B)
module _
{l1 l2 : Level}
(A : Type-With-Endomorphism l1) (B : Type-With-Endomorphism l2)
where

type-prod-Type-With-Endomorphism : UU (l1 ⊔ l2)
type-prod-Type-With-Endomorphism =
type-Type-With-Endomorphism A × type-Type-With-Endomorphism B

endomorphism-prod-Type-With-Endomorphism :
type-prod-Type-With-Endomorphism type-prod-Type-With-Endomorphism
endomorphism-prod-Type-With-Endomorphism =
map-prod
( endomorphism-Type-With-Endomorphism A)
( endomorphism-Type-With-Endomorphism B)

prod-Type-With-Endomorphism :
Type-With-Endomorphism (l1 ⊔ l2)
pr1 prod-Type-With-Endomorphism =
type-prod-Type-With-Endomorphism
pr2 prod-Type-With-Endomorphism =
endomorphism-prod-Type-With-Endomorphism
```
65 changes: 52 additions & 13 deletions src/structured-types/cyclic-types.lagda.md
Expand Up @@ -21,16 +21,18 @@ open import foundation.propositions
open import foundation.sets
open import foundation.surjective-maps
open import foundation.universe-levels

open import structured-types.sets-equipped-with-automorphisms
```

</details>

## Idea

A **cyclic set** consists of an [inhabited](foundation.inhabited-types.md)
[set](foundation.sets.md) `A` equipped with an
A **cyclic set** consists of a [set](foundation.sets.md) `A` equipped with an
[automorphism](foundation.automorphisms.md) `e : A ≃ A` which is _cyclic_ in the
sense that the map
sense that its underlying set is [inhabited](foundation.inhabited-types.md) and
the map

```text
k ↦ eᵏ x
Expand All @@ -43,31 +45,68 @@ equivalent ways are:
- A cyclic set is a
[connected set bundle](synthetic-homotopy-theory.connected-set-bundles-circle.md)
over the [circle](synthetic-homotopy-theory.circle.md).
- A cyclic set is a set equipped with a
[transitive](group-theory.transitive-group-actions.md) `ℤ`-action.
- A cyclic set is a set which is a [`C`-torsor](group-theory.torsors.md) for
some [cyclic group](group-theory.cyclic-groups.md) `C`.

Note that the [empty set](foundation.empty-types.md) equipped with the identity
automorphism is not considered to be a cyclic set, for reasons similar to those
of not considering empty group actions to be transitive.

## Definition

### The predicate of being a cyclic set

```agda
module _
{l : Level} (X : Set l) (e : type-Set X ≃ type-Set X)
{l : Level} (X : Set-With-Automorphism l)
where

is-cyclic-prop-Set : Prop l
is-cyclic-prop-Set =
is-cyclic-prop-Set-With-Automorphism : Prop l
is-cyclic-prop-Set-With-Automorphism =
prod-Prop
( trunc-Prop (type-Set X))
( trunc-Prop (type-Set-With-Automorphism X))
( Π-Prop
( type-Set X)
( type-Set-With-Automorphism X)
( λ x
is-surjective-Prop (λ k map-iterate-automorphism-ℤ k e x)))
is-surjective-Prop
( λ k
map-iterate-automorphism-ℤ k (aut-Set-With-Automorphism X) x)))

is-cyclic-Set-With-Automorphism : UU l
is-cyclic-Set-With-Automorphism =
type-Prop is-cyclic-prop-Set-With-Automorphism
```

is-cyclic-Set : UU l
is-cyclic-Set = type-Prop is-cyclic-prop-Set
### Cyclic sets

Cyclic-Set : (l : Level) UU (lsuc l)
```agda
Cyclic-Set :
(l : Level) UU (lsuc l)
Cyclic-Set l =
Σ (Set l) (λ X Σ (type-Set X ≃ type-Set X) (λ e is-cyclic-Set X e))
Σ (Set-With-Automorphism l) (λ X is-cyclic-Set-With-Automorphism X)

module _
{l : Level} (X : Cyclic-Set l)
where

set-with-automorphism-Cyclic-Set : Set-With-Automorphism l
set-with-automorphism-Cyclic-Set = pr1 X

set-Cyclic-Set : Set l
set-Cyclic-Set = set-Set-With-Automorphism set-with-automorphism-Cyclic-Set

type-Cyclic-Set : UU l
type-Cyclic-Set = type-Set-With-Automorphism set-with-automorphism-Cyclic-Set

is-set-type-Cyclic-Set : is-set type-Cyclic-Set
is-set-type-Cyclic-Set =
is-set-type-Set-With-Automorphism set-with-automorphism-Cyclic-Set

aut-Cyclic-Set : Aut type-Cyclic-Set
aut-Cyclic-Set = aut-Set-With-Automorphism set-with-automorphism-Cyclic-Set

map-Cyclic-Set : type-Cyclic-Set type-Cyclic-Set
map-Cyclic-Set = map-Set-With-Automorphism set-with-automorphism-Cyclic-Set
```
@@ -0,0 +1,196 @@
# Dependent types equipped with automorphisms

```agda
module structured-types.dependent-types-equipped-with-automorphisms where
```

<details><summary>Imports</summary>

```agda
open import foundation.commuting-squares-of-maps
open import foundation.contractible-types
open import foundation.dependent-pair-types
open import foundation.equality-dependent-function-types
open import foundation.equality-dependent-pair-types
open import foundation.equivalence-extensionality
open import foundation.equivalences
open import foundation.function-types
open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.identity-types
open import foundation.structure-identity-principle
open import foundation.transport-along-identifications
open import foundation.univalence
open import foundation.universe-levels

open import structured-types.types-equipped-with-automorphisms
```

</details>

## Idea

Consider a
[type equipped with an automorphism](structured-types.types-equipped-with-automorphisms.md)
`(X,e)`. A **dependent type equipped with an automorphism** over `(X,e)`
consists of a dependent type `Y` over `X` and for each `x : X` an
[equivalence](foundation-core.equivalences.md) `Y x ≃ Y (e x)`.

## Definitions

### Dependent types equipped with automorphisms

```agda
Dependent-Type-With-Automorphism :
{l1 : Level} (l2 : Level)
Type-With-Automorphism l1 UU (l1 ⊔ lsuc l2)
Dependent-Type-With-Automorphism l2 P =
Σ ( type-Type-With-Automorphism P UU l2)
( λ R equiv-fam R (R ∘ (map-Type-With-Automorphism P)))

module _
{ l1 l2 : Level} (P : Type-With-Automorphism l1)
( Q : Dependent-Type-With-Automorphism l2 P)
where

family-Dependent-Type-With-Automorphism :
type-Type-With-Automorphism P UU l2
family-Dependent-Type-With-Automorphism =
pr1 Q

dependent-automorphism-Dependent-Type-With-Automorphism :
equiv-fam
( family-Dependent-Type-With-Automorphism)
( family-Dependent-Type-With-Automorphism ∘ map-Type-With-Automorphism P)
dependent-automorphism-Dependent-Type-With-Automorphism = pr2 Q

map-Dependent-Type-With-Automorphism :
{ x : type-Type-With-Automorphism P}
( family-Dependent-Type-With-Automorphism x)
( family-Dependent-Type-With-Automorphism (map-Type-With-Automorphism P x))
map-Dependent-Type-With-Automorphism {x} =
map-equiv (dependent-automorphism-Dependent-Type-With-Automorphism x)
```

### Equivalences of dependent types equipped with automorphisms

```agda
module _
{ l1 l2 l3 : Level} (P : Type-With-Automorphism l1)
where

equiv-Dependent-Type-With-Automorphism :
Dependent-Type-With-Automorphism l2 P
Dependent-Type-With-Automorphism l3 P
UU (l1 ⊔ l2 ⊔ l3)
equiv-Dependent-Type-With-Automorphism Q T =
Σ ( equiv-fam
( family-Dependent-Type-With-Automorphism P Q)
( family-Dependent-Type-With-Automorphism P T))
( λ H
( x : type-Type-With-Automorphism P)
coherence-square-maps
( map-equiv (H x))
( map-Dependent-Type-With-Automorphism P Q)
( map-Dependent-Type-With-Automorphism P T)
( map-equiv (H (map-Type-With-Automorphism P x))))

module _
{ l1 l2 l3 : Level} (P : Type-With-Automorphism l1)
( Q : Dependent-Type-With-Automorphism l2 P)
( T : Dependent-Type-With-Automorphism l3 P)
( α : equiv-Dependent-Type-With-Automorphism P Q T)
where

equiv-equiv-Dependent-Type-With-Automorphism :
equiv-fam
( family-Dependent-Type-With-Automorphism P Q)
( family-Dependent-Type-With-Automorphism P T)
equiv-equiv-Dependent-Type-With-Automorphism = pr1 α

map-equiv-Dependent-Type-With-Automorphism :
{ x : type-Type-With-Automorphism P}
( family-Dependent-Type-With-Automorphism P Q x)
( family-Dependent-Type-With-Automorphism P T x)
map-equiv-Dependent-Type-With-Automorphism {x} =
map-equiv (equiv-equiv-Dependent-Type-With-Automorphism x)

coherence-square-equiv-Dependent-Type-With-Automorphism :
( x : type-Type-With-Automorphism P)
coherence-square-maps
( map-equiv-Dependent-Type-With-Automorphism)
( map-Dependent-Type-With-Automorphism P Q)
( map-Dependent-Type-With-Automorphism P T)
( map-equiv-Dependent-Type-With-Automorphism)
coherence-square-equiv-Dependent-Type-With-Automorphism = pr2 α
```

## Properties

### Characterization of the identity type of dependent descent data for the circle

```agda
module _
{ l1 l2 : Level} (P : Type-With-Automorphism l1)
where

id-equiv-Dependent-Type-With-Automorphism :
( Q : Dependent-Type-With-Automorphism l2 P)
equiv-Dependent-Type-With-Automorphism P Q Q
pr1 (id-equiv-Dependent-Type-With-Automorphism Q) =
id-equiv-fam (family-Dependent-Type-With-Automorphism P Q)
pr2 (id-equiv-Dependent-Type-With-Automorphism Q) x = refl-htpy

equiv-eq-Dependent-Type-With-Automorphism :
( Q T : Dependent-Type-With-Automorphism l2 P)
Q = T equiv-Dependent-Type-With-Automorphism P Q T
equiv-eq-Dependent-Type-With-Automorphism Q .Q refl =
id-equiv-Dependent-Type-With-Automorphism Q

is-contr-total-equiv-Dependent-Type-With-Automorphism :
( Q : Dependent-Type-With-Automorphism l2 P)
is-contr
( Σ ( Dependent-Type-With-Automorphism l2 P)
( equiv-Dependent-Type-With-Automorphism P Q))
is-contr-total-equiv-Dependent-Type-With-Automorphism Q =
is-contr-total-Eq-structure
( λ R K H
( x : type-Type-With-Automorphism P)
coherence-square-maps
( map-equiv (H x))
( map-Dependent-Type-With-Automorphism P Q)
( map-equiv (K x))
( map-equiv (H (map-Type-With-Automorphism P x))))
( is-contr-total-equiv-fam (family-Dependent-Type-With-Automorphism P Q))
( family-Dependent-Type-With-Automorphism P Q ,
id-equiv-fam (family-Dependent-Type-With-Automorphism P Q))
( is-contr-total-Eq-Π
( λ x K
( map-Dependent-Type-With-Automorphism P Q) ~
( map-equiv K))
( λ x
is-contr-total-htpy-equiv
( dependent-automorphism-Dependent-Type-With-Automorphism P Q x)))

is-equiv-equiv-eq-Dependent-Type-With-Automorphism :
( Q T : Dependent-Type-With-Automorphism l2 P)
is-equiv (equiv-eq-Dependent-Type-With-Automorphism Q T)
is-equiv-equiv-eq-Dependent-Type-With-Automorphism Q =
fundamental-theorem-id
( is-contr-total-equiv-Dependent-Type-With-Automorphism Q)
( equiv-eq-Dependent-Type-With-Automorphism Q)

extensionality-Dependent-Type-With-Automorphism :
(Q T : Dependent-Type-With-Automorphism l2 P)
(Q = T) ≃ equiv-Dependent-Type-With-Automorphism P Q T
pr1 (extensionality-Dependent-Type-With-Automorphism Q T) =
equiv-eq-Dependent-Type-With-Automorphism Q T
pr2 (extensionality-Dependent-Type-With-Automorphism Q T) =
is-equiv-equiv-eq-Dependent-Type-With-Automorphism Q T

eq-equiv-Dependent-Type-With-Automorphism :
( Q T : Dependent-Type-With-Automorphism l2 P)
equiv-Dependent-Type-With-Automorphism P Q T Q = T
eq-equiv-Dependent-Type-With-Automorphism Q T =
map-inv-is-equiv (is-equiv-equiv-eq-Dependent-Type-With-Automorphism Q T)
```

0 comments on commit 9d15032

Please sign in to comment.