Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
37236bc
changed apostrophes to breves in incidence algebras file
djspacewhale Nov 16, 2024
ddca8ef
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Jan 20, 2025
a92bed5
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Jan 26, 2025
bf40188
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Jan 31, 2025
1d9d150
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Feb 8, 2025
3b712f0
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Feb 9, 2025
238428f
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Feb 15, 2025
ed86083
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Mar 6, 2025
518c706
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Mar 22, 2025
0c7d365
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Apr 17, 2025
0f3059a
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale May 5, 2025
3498aa5
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Jun 1, 2025
d58569f
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Jun 21, 2025
cf3a842
Merge branch 'master' of https://github.com/djspacewhale/agda-unimath…
djspacewhale Jun 26, 2025
7e45233
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Jul 16, 2025
9b17cfe
Merge branch 'master' of https://github.com/UniMath/agda-unimath
djspacewhale Jul 27, 2025
60d1878
punctuation
djspacewhale Jul 27, 2025
70672b7
added nodes of full binary trees
djspacewhale Jul 27, 2025
96931db
the combinator of full binary trees, and of labeled full binary trees
djspacewhale Jul 27, 2025
4d66fdd
labeled full binary trees
djspacewhale Jul 27, 2025
fb02671
the free magma on one generator (the hard direction is left!)
djspacewhale Jul 27, 2025
6c210aa
formatting
djspacewhale Jul 27, 2025
2448542
why can I not just apply f-preserves to the goal in htpy?...
djspacewhale Jul 27, 2025
cbdd7cc
formatting
djspacewhale Jul 27, 2025
81ab2d7
commented out one attempt. could still work, but may be useful to fac…
djspacewhale Jul 27, 2025
98ab6fe
pre-commit, with goals commented out, and pruned imports
djspacewhale Jul 27, 2025
c3d619e
for some reason, the termination checker really dislikes the recursiv…
djspacewhale Jul 27, 2025
89eec76
formatting
djspacewhale Jul 27, 2025
976e849
reopened goal
djspacewhale Jul 27, 2025
37f3ab0
so odd...
djspacewhale Jul 27, 2025
6411034
the free magma on one generator! its universal property is only prove…
djspacewhale Jul 27, 2025
8c77862
pre-commit hooks
djspacewhale Jul 27, 2025
7f824d3
formatting, removing free magma on a general type (for now, hopefully)
djspacewhale Jul 27, 2025
d218fe6
link to the free magma on one generator subarticle in the nLab
djspacewhale Jul 27, 2025
d932f1c
changed `M` to `type-Magma M` in Idea
djspacewhale Jul 27, 2025
a42eaf6
whoops
djspacewhale Jul 27, 2025
221cb10
deleted incomplete "free magmas on a type" file; termination checker …
djspacewhale Jul 27, 2025
927b88f
pre-commit hooks
djspacewhale Jul 27, 2025
e4dc26e
Merge branch 'master' into Free-magmas
djspacewhale Jul 29, 2025
901aa87
pruned unnecessary import
djspacewhale Aug 2, 2025
f2561a0
introducing free magmas on types (with terminating flags, and again o…
djspacewhale Aug 2, 2025
f48e783
pre-commit hooks
djspacewhale Aug 2, 2025
10801b6
Merge branch 'master' into Free-magmas
djspacewhale Aug 2, 2025
db5840d
s
djspacewhale Aug 2, 2025
84df00c
"
djspacewhale Aug 2, 2025
6d2b937
weights of full binary trees
djspacewhale Aug 3, 2025
d38c33c
the magma of a wild monoid
djspacewhale Aug 3, 2025
ddf6ba1
flattenings of labeled full binary trees to lists
djspacewhale Aug 3, 2025
5502c97
Merge branch 'master' into Free-magmas
djspacewhale Aug 3, 2025
34cd215
Merge branch 'Free-magmas' of https://github.com/djspacewhale/agda-un…
djspacewhale Aug 3, 2025
b372e5c
Apply suggestions from code review
djspacewhale Aug 3, 2025
9a8d5b2
workinonit
djspacewhale Aug 3, 2025
d434b64
Merge branch 'Free-magmas' of https://github.com/djspacewhale/agda-un…
djspacewhale Aug 3, 2025
91e551f
removed "abstract nonsense" quip
djspacewhale Aug 3, 2025
c02a011
adding helper modules for the proof
djspacewhale Aug 4, 2025
def5e23
the univerrsal property of the free magma on one generator!!
djspacewhale Aug 4, 2025
2fde9fe
abstracted out the lemma that combinating commutes with labeling
djspacewhale Aug 4, 2025
bea9e04
workinonit
djspacewhale Aug 4, 2025
3b9f6dd
pre-commit run to keep things sanitary
djspacewhale Aug 4, 2025
076b4e8
fixed function name in idea
djspacewhale Aug 4, 2025
57da257
pruning imports
djspacewhale Aug 4, 2025
026ddf0
workinonit
djspacewhale Aug 5, 2025
4c5ef35
continuing to build this but it's expanding the scope of this fork qu…
djspacewhale Aug 5, 2025
4f9c62b
characterizing identifications of full binary trees
djspacewhale Aug 9, 2025
15bb5bb
pre-commit hooks
djspacewhale Aug 10, 2025
2c405f3
removed the dead end
djspacewhale Aug 10, 2025
97274c3
workinonit
djspacewhale Aug 10, 2025
a396d95
characterizing identifications of labeled full binary trees
djspacewhale Aug 10, 2025
bc2794b
workinonit
djspacewhale Aug 10, 2025
b6091b7
Merge branch 'master' into Free-magmas
djspacewhale Aug 10, 2025
269a87b
workinonit
djspacewhale Aug 10, 2025
bdc04cf
propositional equality in full binary trees
djspacewhale Aug 10, 2025
d1410c8
commented out, for now
djspacewhale Aug 10, 2025
0b406fe
workinonit
djspacewhale Aug 10, 2025
42e3ded
going back to structure identity principle formalism. lots of cleanin…
djspacewhale Aug 11, 2025
ab59e76
workinonit
djspacewhale Aug 11, 2025
3a40463
Merge branch 'master' into Free-magmas
djspacewhale Aug 11, 2025
208bba2
Merge branch 'Free-magmas' of https://github.com/djspacewhale/agda-un…
djspacewhale Aug 11, 2025
13dfb88
workinonit
djspacewhale Aug 12, 2025
b5f85cf
refactoring everything to not use tr (hard to compute with!)
djspacewhale Aug 18, 2025
e139114
workinonit
djspacewhale Aug 18, 2025
a25cb11
workinonit
djspacewhale Aug 18, 2025
4302cc6
workinonit
djspacewhale Aug 18, 2025
f0fe1c9
workinonit
djspacewhale Aug 18, 2025
c74dec9
sigh
djspacewhale Aug 19, 2025
da7999d
notation in the free magmas on types file
djspacewhale Aug 19, 2025
5e533c4
Merge branch 'master' into Free-magmas
djspacewhale Aug 29, 2025
53efee0
Merge branch 'master' into Free-magmas
djspacewhale Aug 31, 2025
cb6e518
Merge branch 'master' into Free-magmas
djspacewhale Sep 3, 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
2 changes: 2 additions & 0 deletions src/foundation.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ open import foundation.0-images-of-maps public
open import foundation.0-maps public
open import foundation.1-types public
open import foundation.2-types public
open import foundation.action-on-binary-homotopies-binary-functions public
open import foundation.action-on-equivalences-functions public
open import foundation.action-on-equivalences-functions-out-of-subuniverses public
open import foundation.action-on-equivalences-type-families public
Expand Down Expand Up @@ -448,6 +449,7 @@ open import foundation.transport-along-equivalences public
open import foundation.transport-along-higher-identifications public
open import foundation.transport-along-homotopies public
open import foundation.transport-along-identifications public
open import foundation.transport-along-identifications-dependent-functions public
open import foundation.transport-split-type-families public
open import foundation.transposition-identifications-along-equivalences public
open import foundation.transposition-identifications-along-retractions public
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# The action on binary homotopies

```agda
module foundation.action-on-binary-homotopies-binary-functions where
```

<details><summary>Imports</summary>

```agda
open import foundation.action-on-identifications-binary-functions
open import foundation.action-on-identifications-functions
open import foundation.function-extensionality
open import foundation.homotopy-induction
open import foundation.universe-levels

open import foundation-core.homotopies
open import foundation-core.identity-types
```

</details>

## Definition

```agda
ap-binary-htpy :
{l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3}
{f g : A → B} (H : f ~ g) (m : B → B → C)
{x y : A} →
ap-binary m (H x) (H y) = ap (λ f → m (f x) (f y)) (eq-htpy H)
ap-binary-htpy {f = f} H m {x = x} {y = y} =
ind-htpy f
( λ g H → ap-binary m (H x) (H y) = ap (λ f → m (f x) (f y)) (eq-htpy H))
( inv
(ap (ap (λ f → m (f x) (f y))) (eq-htpy-refl-htpy _)))
( H)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Transport along identifications in dependent functions

```agda
module foundation.transport-along-identifications-dependent-functions where
```

<details><summary>Imports</summary>

```agda
open import foundation.universe-levels

open import foundation-core.identity-types
open import foundation-core.transport-along-identifications
```

</details>

## Definition

```agda
tr-Π :
{l1 l2 l3 : Level} {I : UU l1}
{A : UU l2} {B : I → A → UU l3}
{i j : I} (p : i = j) →
(f : (a : A) → B i a) →
(a : A) →
tr (λ f → (a : A) → B f a) p f a = tr (λ x → B x a) p (f a)
tr-Π refl f a = refl
```
1 change: 1 addition & 0 deletions src/lists.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ open import lists.concatenation-lists public
open import lists.dependent-sequences public
open import lists.equivalence-tuples-finite-sequences public
open import lists.finite-sequences public
open import lists.flattening-free-magmas-lists public
open import lists.flattening-lists public
open import lists.functoriality-finite-sequences public
open import lists.functoriality-lists public
Expand Down
137 changes: 137 additions & 0 deletions src/lists/flattening-free-magmas-lists.lagda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# The flattening morphisms from free magmas to free monoids

```agda
module lists.flattening-free-magmas-lists where
```

<details><summary>Imports</summary>

```agda
open import elementary-number-theory.addition-natural-numbers
open import elementary-number-theory.natural-numbers

open import foundation.action-on-identifications-binary-functions
open import foundation.coproduct-types
open import foundation.dependent-pair-types
open import foundation.identity-types
open import foundation.unit-type
open import foundation.universe-levels

open import foundation-core.function-types
open import foundation-core.homotopies

open import lists.concatenation-lists
open import lists.lists
open import lists.universal-property-lists-wild-monoids

open import structured-types.magmas
open import structured-types.morphisms-h-spaces
open import structured-types.morphisms-magmas
open import structured-types.morphisms-wild-monoids
open import structured-types.pointed-maps
open import structured-types.wild-monoids

open import trees.combinator-full-binary-trees
open import trees.free-magmas-on-types
open import trees.full-binary-trees
open import trees.labeled-full-binary-trees
```

</details>

## Idea

For any type `X`, there is a natural
[magma map](structured-types.morphisms-magmas.md) from
`labeled-full-binary-tree-Magma X`, the
[free magma on `X`](trees.free-magmas-on-types.md), to `list-Wild-Monoid X`, the
[free wild monoid on `X`](lists.universal-property-lists-wild-monoids.md), that
can be thought of as forgetting the tree structure and remembering the order
leaves are read off in. This map is universal among magma maps from
`labeled-full-binary-tree-Magma X` to
[wild monoids](structured-types.wild-monoids.md).

## Definition

```agda
module _
{l : Level} (X : UU l)
where

{-# TERMINATING #-}
flattening-map-free-Magma-free-Wild-Monoid :
type-Magma (labeled-full-binary-tree-Magma X) →
type-Wild-Monoid (list-Wild-Monoid X)
flattening-map-free-Magma-free-Wild-Monoid (leaf-full-binary-tree , label) =
cons (label star) nil
flattening-map-free-Magma-free-Wild-Monoid
(join-full-binary-tree L R , label) =
concat-list
( flattening-map-free-Magma-free-Wild-Monoid (L , λ z → label (inl z)))
( flattening-map-free-Magma-free-Wild-Monoid (R , (λ z → label (inr z))))

preserves-mul-flattening-map-free-Magma-free-Wild-Monoid :
preserves-mul-Magma (labeled-full-binary-tree-Magma X)
(magma-Wild-Monoid (list-Wild-Monoid X))
flattening-map-free-Magma-free-Wild-Monoid
preserves-mul-flattening-map-free-Magma-free-Wild-Monoid T U = refl

flattening-hom-free-Magma-free-Wild-Monoid :
hom-Magma (labeled-full-binary-tree-Magma X)
(magma-Wild-Monoid (list-Wild-Monoid X))
pr1 flattening-hom-free-Magma-free-Wild-Monoid =
flattening-map-free-Magma-free-Wild-Monoid
pr2 flattening-hom-free-Magma-free-Wild-Monoid =
preserves-mul-flattening-map-free-Magma-free-Wild-Monoid
```

## Properties

### The flattening map preserves weights

That is, the length of a flattened full binary tree `T` is equal to the weight
of `T`.

```agda
preserves-weight-flattening-hom-free-Magma-free-Wild-Monoid :
(T : labeled-full-binary-tree X) →
length-list (flattening-map-free-Magma-free-Wild-Monoid T) =
weight-labeled-full-binary-tree X T
preserves-weight-flattening-hom-free-Magma-free-Wild-Monoid
(leaf-full-binary-tree , label) =
refl
preserves-weight-flattening-hom-free-Magma-free-Wild-Monoid
(join-full-binary-tree L R , label) =
ap-binary add-ℕ refl refl
```

### The flattening map is the universal map from `labeled-full-binary-tree-Magma X` to a wild monoid

More precisely, for any wild monoid `M` and magma map
`f : labeled-full-binary-tree-Magma X → M`, the space of monoid maps
`list-Wild-Monoid X → M` commuting with the flattening map is contractible.

```agda
module _
{l1 l2 : Level} (X : UU l1) (M : Wild-Monoid l2)
where

extension-flattening-map-free-Magma-free-Wild-Monoid :
(f : hom-Magma (labeled-full-binary-tree-Magma X) (magma-Wild-Monoid M)) →
hom-Wild-Monoid (list-Wild-Monoid X) M
extension-flattening-map-free-Magma-free-Wild-Monoid f =
elim-list-Wild-Monoid M (label-of-leaf X (magma-Wild-Monoid M) f)

extension-flattening-map-commutes-free-Magma-free-Wild-Monoid :
(f : hom-Magma (labeled-full-binary-tree-Magma X) (magma-Wild-Monoid M)) →
map-hom-Magma (labeled-full-binary-tree-Magma X) (magma-Wild-Monoid M) f ~
map-hom-Wild-Monoid (list-Wild-Monoid X) M
(extension-flattening-map-free-Magma-free-Wild-Monoid f) ∘
flattening-map-free-Magma-free-Wild-Monoid X
extension-flattening-map-commutes-free-Magma-free-Wild-Monoid
(f , hom-f) (leaf-full-binary-tree , label) =
{! !}
extension-flattening-map-commutes-free-Magma-free-Wild-Monoid
(f , hom-f) (join-full-binary-tree L R , label) =
{! !}
```
Loading