Skip to content

Commit b415c8b

Browse files
Dual construction of coherent unit laws (#1683)
1 parent 12fa484 commit b415c8b

File tree

1 file changed

+76
-14
lines changed

1 file changed

+76
-14
lines changed

src/foundation/unital-binary-operations.lagda.md

Lines changed: 76 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ open import foundation-core.identity-types
2222

2323
## Idea
2424

25-
A binary operation of type `A → A → A` is **unital** if there is a unit of type
26-
`A` that satisfies both the left and right unit laws. Furthermore, a binary
27-
operation is **coherently unital** if the proofs of the left and right unit laws
28-
agree on the case where both arguments of the operation are the unit.
25+
A binary operation of type `μ : A → A → A` is
26+
{{#concept "unital" Disambiguation="binary operation on type" Agda=is-unital}}
27+
if there is a unit element `e` of type `A` that satisfies both the left and
28+
right unit laws. Furthermore, a binary operation is
29+
{{#concept "coherently unital" Disambiguation="binary operation on type" Agda=is-coherently-unital}}
30+
if the proofs of the left and right unit laws agree on the case where both
31+
arguments of the operation are the unit.
32+
33+
We demonstrate that every unital binary operation may be upgraded to a coherent
34+
one in two dual ways. One by replacing the right unit law, and the other by
35+
replacing the left unit law.
2936

3037
## Definitions
3138

@@ -71,29 +78,84 @@ is-coherently-unital {A = A} μ = Σ A (coherent-unit-laws μ)
7178

7279
### The unit laws for an operation `μ` with unit `e` can be upgraded to coherent unit laws
7380

81+
#### Preserving the underlying left unit law
82+
83+
Given a pair of unit laws `λ` and `ρ` we construct a new coherent pair of unit
84+
laws where the left unit law is the same, `λ`, and the right unit law is
85+
replaced by `ρ'(x) := (ap (μ x (-)) (ρ(e)))⁻¹ ∙ ap (μ x (-)) (λ(e)) ∙ ρ(x)`.
86+
87+
Evaluating at the unit element we obtain
88+
89+
```text
90+
ρ'(e) ≐ (ap (μ e (-)) (ρ(e)))⁻¹ ∙ ap (μ e (-)) (λ(e)) ∙ ρ(e)
91+
```
92+
93+
which is equal to `λ(e)` by naturality of `λ` at `ρ(e)`.
94+
7495
```agda
7596
module _
7697
{l : Level} {A : UU l} (μ : A → A → A) {e : A}
7798
where
7899
79100
coherent-unit-laws-unit-laws : unit-laws μ e → coherent-unit-laws μ e
80-
pr1 (coherent-unit-laws-unit-laws (pair H K)) = H
81-
pr1 (pr2 (coherent-unit-laws-unit-laws (pair H K))) x =
82-
( inv (ap (μ x) (K e))) ∙ (( ap (μ x) (H e)) ∙ (K x))
83-
pr2 (pr2 (coherent-unit-laws-unit-laws (pair H K))) =
101+
pr1 (coherent-unit-laws-unit-laws (H , K)) =
102+
H
103+
pr1 (pr2 (coherent-unit-laws-unit-laws (H , K))) x =
104+
inv (ap (μ x) (K e)) ∙ (ap (μ x) (H e) ∙ K x)
105+
pr2 (pr2 (coherent-unit-laws-unit-laws (H , K))) =
84106
left-transpose-eq-concat
85107
( ap (μ e) (K e))
86108
( H e)
87-
( (ap (μ e) (H e)) ∙ (K e))
88-
( ( inv-nat-htpy-id (H) (K e)) ∙
89-
( right-whisker-concat (coh-htpy-id (H) e) (K e)))
109+
( ap (μ e) (H e) ∙ K e)
110+
( inv-nat-htpy-id H (K e) ∙ right-whisker-concat (coh-htpy-id H e) (K e))
90111
91112
module _
92113
{l : Level} {A : UU l} {μ : A → A → A}
93114
where
94115
95116
is-coherently-unital-is-unital : is-unital μ → is-coherently-unital μ
96-
pr1 (is-coherently-unital-is-unital (pair e H)) = e
97-
pr2 (is-coherently-unital-is-unital (pair e H)) =
98-
coherent-unit-laws-unit-laws μ H
117+
is-coherently-unital-is-unital (e , H) =
118+
( e , coherent-unit-laws-unit-laws μ H)
119+
```
120+
121+
#### Preserving the underlying right unit law
122+
123+
Given a pair of unit laws `λ` and `ρ` we construct a new coherent pair of unit
124+
laws where the right unit law is the same, `ρ`, and the left unit law is
125+
replaced by `λ'(x) := (ap (μ (-) x) (λ(e)))⁻¹ ∙ ap (μ (-) x) (ρ(e)) ∙ λ(x)`.
126+
127+
Evaluating at the unit element we obtain
128+
129+
```text
130+
λ'(e) ≐ (ap (μ (-) e) (λ(e)))⁻¹ ∙ ap (μ (-) e) (ρ(e)) ∙ λ(e)
131+
```
132+
133+
which is equal to `ρ(e)` by naturality of `ρ` at `λ(e)`.
134+
135+
```agda
136+
module _
137+
{l : Level} {A : UU l} (μ : A → A → A) {e : A}
138+
where
139+
140+
coherent-unit-laws-unit-laws' : unit-laws μ e → coherent-unit-laws μ e
141+
pr1 (coherent-unit-laws-unit-laws' (H , K)) x =
142+
inv (ap (λ y → μ y x) (H e)) ∙ (ap (λ y → μ y x) (K e) ∙ H x)
143+
pr1 (pr2 (coherent-unit-laws-unit-laws' (H , K))) =
144+
K
145+
pr2 (pr2 (coherent-unit-laws-unit-laws' (H , K))) =
146+
inv
147+
( left-transpose-eq-concat
148+
( ap (λ z → μ z e) (H e))
149+
( K e)
150+
( ap (λ y → μ y e) (K e) ∙ H e)
151+
( ( inv-nat-htpy-id K (H e)) ∙
152+
( right-whisker-concat (coh-htpy-id K e) (H e))))
153+
154+
module _
155+
{l : Level} {A : UU l} {μ : A → A → A}
156+
where
157+
158+
is-coherently-unital-is-unital' : is-unital μ → is-coherently-unital μ
159+
is-coherently-unital-is-unital' (e , H) =
160+
( e , coherent-unit-laws-unit-laws' μ H)
99161
```

0 commit comments

Comments
 (0)