Skip to content
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

Pushout draft #335

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a8ad651
Pushout draft
IanRay11 Jan 16, 2025
18382e3
Update
IanRay11 Jan 20, 2025
a07a47c
Update
IanRay11 Jan 20, 2025
6421ee9
Update
IanRay11 Jan 23, 2025
3352008
Update
IanRay11 Jan 25, 2025
4fe2e56
Updating comments
IanRay11 Jan 25, 2025
b328465
Giving UP, Ind and computation rules.
IanRay11 Jan 26, 2025
88314c2
Adding dependent universal property
IanRay11 Jan 28, 2025
dbc2be4
Updating dependent universal property, etc.
IanRay11 Jan 28, 2025
9281a21
Updating statement of universal property
IanRay11 Jan 28, 2025
2d39acd
Dependent universal property in record type
IanRay11 Jan 28, 2025
af9c2fb
Deriving induction and computation rules; first steps
IanRay11 Jan 29, 2025
16acc8e
Deriving everything from universal property
IanRay11 Jan 31, 2025
138bff7
Deriving induction from recursion and uniqueness
IanRay11 Feb 1, 2025
c5e5926
update
IanRay11 Feb 2, 2025
9f73462
update induction computation rules
IanRay11 Feb 3, 2025
7273aaa
Splitting files
IanRay11 Feb 7, 2025
6464833
Update... still need to fix unresolved contraints.
IanRay11 Feb 9, 2025
911580f
Update..
IanRay11 Feb 11, 2025
33ae051
Update with comments in case anyone wants to take a look
IanRay11 Feb 11, 2025
c5c90da
Fixing comments in Pushouts
IanRay11 Feb 11, 2025
23c40f3
Update
IanRay11 Feb 16, 2025
1d8f1cb
Update
IanRay11 Feb 16, 2025
56929c5
New comments for review...
IanRay11 Feb 17, 2025
c3cc160
Finally filled hole
IanRay11 Feb 18, 2025
9b4cf5d
getting closer to full induction computation rules
IanRay11 Feb 21, 2025
99a4920
More computation rules
IanRay11 Feb 24, 2025
fdb22bf
Computation rules continued...
IanRay11 Feb 24, 2025
24ba460
Still working on compatability
IanRay11 Feb 25, 2025
137cb78
Still working on compatability...
IanRay11 Feb 27, 2025
6b24faa
One step closer to induction glue computation rule
IanRay11 Mar 2, 2025
cef0e20
Update
IanRay11 Mar 2, 2025
9237ca5
Characterizing the identity of dependent cocones
IanRay11 Mar 6, 2025
bd26765
Update
IanRay11 Mar 12, 2025
49b82ac
One experiment complete
IanRay11 Mar 13, 2025
f87eafe
updating comments
IanRay11 Mar 13, 2025
a7a2df0
Removing second experiment
IanRay11 Mar 14, 2025
7c26d52
Removing remaining implicit errors and adding comments
IanRay11 Mar 16, 2025
d2f5c52
updating comments
IanRay11 Mar 16, 2025
98dbfa9
Fixing typos and indentation
IanRay11 Mar 16, 2025
b2b3d36
One last indentation fix
IanRay11 Mar 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions source/UF/Base.lagda
Original file line number Diff line number Diff line change
Expand Up @@ -502,3 +502,116 @@ ap-refl : {X : 𝓤 ̇ } {Y : 𝓥 ̇ } (f : X → Y) {x : X}
→ ap f (𝓻𝓮𝒻𝓵 x) = 𝓻𝓮𝒻𝓵 (f x)
ap-refl f = refl
\end{code}

Added by Ian Ray 18th Jan 2025

\begin{code}

apd-to-ap : {X : 𝓤 ̇ } {Y : 𝓥 ̇ } (f : X → Y) {x x' : X} (p : x = x')
→ apd f p = transport-const p ∙ ap f p
apd-to-ap f refl = refl

apd-from-ap : {X : 𝓤 ̇ } {Y : 𝓥 ̇ } (f : X → Y) {x x' : X} (p : x = x')
→ ap f p = transport-const p ⁻¹ ∙ apd f p
apd-from-ap f refl = refl

\end{code}

We will also add some helpful path algebra lemmas. Note that pattern matching
is not helpful here since the path concatenation by definition associates to
the left: l ∙ q ∙ s ≡ (l ∙ q) ∙ s (where ≡ is definitional). So, as you will
see below, we have to reassociate before applying on the left.

\begin{code}

ap-on-left-is-assoc : {X : 𝓤 ̇ } {x y z z' w : X} (l : x = y)
{p : y = z} {q : y = z'} {r : z = w} {s : z' = w}
→ p ∙ r = q ∙ s
→ (l ∙ p) ∙ r = (l ∙ q) ∙ s
ap-on-left-is-assoc l {p} {q} {r} {s} α = l ∙ p ∙ r =⟨ ∙assoc l p r ⟩
l ∙ (p ∙ r) =⟨ ap (l ∙_) α ⟩
l ∙ (q ∙ s) =⟨ ∙assoc l q s ⁻¹ ⟩
l ∙ q ∙ s ∎

ap-on-left-is-assoc' : {X : 𝓤 ̇ } {x y z z' : X} (l : x = y)
(p : y = z') (q : y = z) (s : z = z')
→ p = q ∙ s
→ l ∙ p = (l ∙ q) ∙ s
ap-on-left-is-assoc' l p q s α = l ∙ p =⟨ ap (l ∙_) α ⟩
l ∙ (q ∙ s) =⟨ ∙assoc l q s ⁻¹ ⟩
l ∙ q ∙ s ∎

ap-on-left-is-assoc'' : {X : 𝓤 ̇ } {x y z z' : X} (l : x = y)
(p : y = z) (q : y = z') (s : z = z')
→ p ∙ s = q
→ (l ∙ p) ∙ s = l ∙ q
ap-on-left-is-assoc'' l p q s α =
ap-on-left-is-assoc' l q p s (α ⁻¹) ⁻¹

ap-left-inverse : {X : 𝓤 ̇ } {x y z : X} (l : x = y)
{p : x = z} {q : y = z}
→ p = l ∙ q
→ l ⁻¹ ∙ p = q
ap-left-inverse l {p} {q} α =
l ⁻¹ ∙ p =⟨ ap-on-left-is-assoc' (l ⁻¹) p l q α ⟩
l ⁻¹ ∙ l ∙ q =⟨ ap (_∙ q) (left-inverse l) ⟩
refl ∙ q =⟨ refl-left-neutral ⟩
q ∎

ap-left-inverse' : {X : 𝓤 ̇ } {x y z : X} (l : x = y)
{p : x = z} {q : y = z}
→ l ⁻¹ ∙ p = q
→ p = l ∙ q
ap-left-inverse' l {p} {q} α =
p =⟨ refl-left-neutral ⁻¹ ⟩
refl ∙ p =⟨ ap (_∙ p) (sym-is-inverse' l) ⟩
l ∙ l ⁻¹ ∙ p =⟨ ap-on-left-is-assoc'' l (l ⁻¹) q p α ⟩
l ∙ q ∎

ap-right-inverse : {X : 𝓤 ̇ } {x y z : X} (r : y = z)
{p : x = z} {q : x = y}
→ p = q ∙ r
→ p ∙ r ⁻¹ = q
ap-right-inverse refl α = α

ap-right-inverse' : {X : 𝓤 ̇ } {x y z : X} (r : y = z)
{p : x = z} {q : x = y}
→ p ∙ r ⁻¹ = q
→ p = q ∙ r
ap-right-inverse' refl α = α

\end{code}

We will also add a result that says:
given two maps, a path in the domain and a path in the codomain between the
maps at the left endpoint then applying one map to the domain path and
transporting along that path at the codomain path is the same as following the
codomain path and applying the other map to the domain path.
(this may already exist!)

\begin{code}

transport-after-ap
: {X : 𝓤 ̇ } {Y : 𝓥 ̇ } {x x' : X}
→ (p : x = x')
→ (s s' : X → Y)
→ (q : s x = s' x)
→ ap s p ∙ transport (λ - → s - = s' -) p q = q ∙ ap s' p
transport-after-ap refl s s' q =
ap s refl ∙ q =⟨ ap (_∙ q) (ap-refl s) ⟩
refl ∙ q =⟨ refl-left-neutral ⟩
q ∙ refl =⟨ ap (q ∙_) (ap-refl s') ⟩
q ∙ ap s' refl ∎

transport-after-ap'
: {X : 𝓤 ̇ } {Y : 𝓥 ̇ } {x x' : X}
→ (p : x = x')
→ (s s' : X → Y)
→ (q : s x = s' x)
→ transport (λ - → s - = s' -) p q = ap s p ⁻¹ ∙ q ∙ ap s' p
transport-after-ap' refl s s' q =
q =⟨ refl-left-neutral ⁻¹ ⟩
refl ∙ q =⟨ refl ⟩
ap s refl ⁻¹ ∙ q ∙ ap s' refl ∎

\end{code}
Loading