diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1799f381a9..94db54052b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,7 +54,7 @@ jobs: ${{ runner.os }}-check-${{ github.ref }}-${{ matrix.agda }}- ${{ runner.os }}-check-refs/heads/master-${{ matrix.agda }}- - - name: Typecheck the whole formalization + - name: Typecheck library run: | cd master make check diff --git a/.github/workflows/clean-up.yaml b/.github/workflows/clean-up.yaml index d1905234d0..6ed7f6058c 100644 --- a/.github/workflows/clean-up.yaml +++ b/.github/workflows/clean-up.yaml @@ -1,4 +1,4 @@ -name: cleanup caches generated by pull requests +name: Clean up caches generated by pull requests on: pull_request: types: diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml index ef2bb396f3..0f1cefe472 100644 --- a/.github/workflows/pages.yaml +++ b/.github/workflows/pages.yaml @@ -1,4 +1,4 @@ -name: Formalization website +name: Build and deploy library website on: # To run this workflow manually workflow_dispatch: diff --git a/.github/workflows/profiling.yaml b/.github/workflows/profiling.yaml new file mode 100644 index 0000000000..6f2beafcd0 --- /dev/null +++ b/.github/workflows/profiling.yaml @@ -0,0 +1,78 @@ +name: Profile Library Typechecking + +on: + push: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + typecheck-performance: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + agda: ['2.6.4'] + + steps: + - name: Checkout our repository + uses: actions/checkout@v3 + with: + path: repo + + - name: Setup Agda + uses: wenkokke/setup-agda@v2.1.0 + with: + agda-version: ${{ matrix.agda }} + + - name: Typecheck library with profiling + run: | + cd repo + mkdir -p temp + make check-profile 2> temp/memory-results.txt | tee temp/benchmark-results.txt + + - name: Download previous typechecking profile + run: | + mkdir -p benchmark-cache + curl 'https://agda-unimath-benchmarks.netlify.app/data.json' -o benchmark-cache/data.json + # Stop if there is no initial data (the server gave us an HTML instead of a JSON) + (head -1 benchmark-cache/data.json | grep -v DOCTYPE) || { rm benchmark-cache/data.json; exit 0; } + curl 'https://agda-unimath-benchmarks.netlify.app/data.csv' -o benchmark-cache/data.csv + + - name: Process new profiling data + run: | + cd repo + python3 scripts/typechecking_profile_parser.py \ + temp/benchmark-results.txt temp/memory-results.txt \ + temp/benchmark-results.json ../benchmark-cache/data.csv \ + ${{ github.sha }} + + - name: Merge JSON profiling data + uses: rhysd/github-action-benchmark@v1 + with: + tool: 'customSmallerIsBetter' + # Location of the new data + output-file-path: './repo/temp/benchmark-results.json' + # Location of the aggregate data + external-data-json-path: './benchmark-cache/data.json' + + - name: Publish the profiling CSV as an artifact + uses: actions/upload-artifact@v4 + with: + name: 'Library profiling history' + path: './benchmark-cache/data.csv' + + - name: Prepare new revision of the profiling website + run: | + cd repo + mkdir -p benchmark-website + cp website/benchmarks/index.html benchmark-website/ + cp ../benchmark-cache/data.* benchmark-website/ + echo 'window.BENCHMARK_DATA =' | cat - ../benchmark-cache/data.json > benchmark-website/data.js + + - name: Deploy the new profiling website + run: | + npx netlify-cli deploy --dir=benchmark-website diff --git a/.gitignore b/.gitignore index ffbeeca2cb..7a4e564e4c 100644 --- a/.gitignore +++ b/.gitignore @@ -423,6 +423,7 @@ package-lock.json docs/ html/ book/ +temp/ src/temp/ src/everything.lagda.md SUMMARY.md diff --git a/Makefile b/Makefile index e2ed2f507d..91e96b4c5c 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ everythingOpts := --guardedness --cohesion --flat-split # use "$ export AGDAVERBOSE=-v20" if you want to see all AGDAVERBOSE ?= -v1 -AGDARTS := +RTS -M4.0G -RTS +AGDARTS := +RTS -M6.0G -RTS AGDAFILES := $(shell find src -name temp -prune -o -type f \( -name "*.lagda.md" -not -name "everything.lagda.md" \) -print) CONTRIBUTORS_FILE := CONTRIBUTORS.toml @@ -20,6 +20,7 @@ CONTRIBUTORS_FILE := CONTRIBUTORS.toml # at is at least in a proper code block with syntax highlighting, albeit without # the agda-unimath chrome. AGDAHTMLFLAGS ?= --html --html-highlight=auto --html-dir=docs --css=website/css/Agda.css --only-scope-checking +AGDAPROFILEFLAGS ?= --profile=modules +RTS -s -RTS AGDA ?= agda $(AGDAVERBOSE) $(AGDARTS) TIME ?= time @@ -70,6 +71,10 @@ src/everything.lagda.md: agdaFiles check: ./src/everything.lagda.md ${TIME} ${AGDA} $? +.PHONY: check-profile +check-profile: ./src/everything.lagda.md + ${AGDA} ${AGDAPROFILEFLAGS} $? + agda-html: ./src/everything.lagda.md @rm -rf ./docs/ @mkdir -p ./docs/ diff --git a/scripts/typechecking_profile_parser.py b/scripts/typechecking_profile_parser.py new file mode 100644 index 0000000000..6291b9ca8b --- /dev/null +++ b/scripts/typechecking_profile_parser.py @@ -0,0 +1,135 @@ +import json +import re +import argparse +import csv + + +def parse_memory_profiling_data(filepath): + results = dict() + + # Define patterns to match each line and their corresponding unit + patterns = { + "memory_allocated_in_heap": (r"(\d+(?:,\d+)*) bytes allocated in the heap", "B"), + "memory_copied_during_GC": (r"(\d+(?:,\d+)*) bytes copied during GC", "B"), + "maximum_residency": (r"(\d+(?:,\d+)*) bytes maximum residency", "B"), + "memory_maximum_slop": (r"(\d+(?:,\d+)*) bytes maximum slop", "B"), + "total_memory_in_use": (r"(\d+) MiB total memory in use", "MiB") + } + + with open(filepath, 'r') as file: + for line in file: + for key, (pattern, unit) in patterns.items(): + match = re.search(pattern, line) + if match: + value = int(match.group(1).replace(",", "")) + if key == "memory_maximum_slop": # Convert maximum slo to KiB and truncate + value //= 1024 + unit = "KiB" + elif unit == "B": # Convert bytes to MiB and truncate + value //= 1024 * 1024 + unit = "MiB" + results[key] = {"value": value, "unit": unit} + + return results + +def parse_benchmark_results(input_path): + benchmarks = dict() + with open(input_path, 'r') as file: + for line in file: + # Match lines that end with "ms" indicating a timing result + match = re.fullmatch(r'^\s*(\S+)\s+(\d+(?:,\d+)*)ms\s*$', line) + if match: + name = match.group(1).strip() + # Correctly parse and combine the number groups to handle commas in numbers + milliseconds = int(match.group(2).replace(',','')) + benchmarks[name] = {'value': milliseconds, 'unit':'ms'} + return benchmarks + + +def subdict(original_dict, keys_to_extract): + if keys_to_extract is None: + return original_dict + else: + return {key: original_dict[key] for key in keys_to_extract if key in original_dict} + +def convert_dict_to_list(data, keys_to_extract=None): + return [{'name': name, **details} for name, details in subdict(data, keys_to_extract).items()] + +def save_github_action_benchmark_json(output_path, benchmarks, memory_stats, benchmark_keys, memory_keys): + with open(output_path, 'w') as file: + json.dump(convert_dict_to_list(benchmarks, benchmark_keys) + convert_dict_to_list(memory_stats, memory_keys) , file, indent=2) + +def read_existing_csv_to_dict(csv_path, commit_hash): + # Initialize a dictionary to hold the CSV data + data_dict = {} + fieldnames = ['name', 'unit', commit_hash] + + try: + # Attempt to open the file, which will fail if the file doesn't exist + with open(csv_path, mode='r', newline='') as csvfile: + reader = csv.DictReader(csvfile) + # Update fieldnames with those found in the existing CSV, plus the new commit hash if necessary + fieldnames = reader.fieldnames + [commit_hash] if commit_hash not in reader.fieldnames else reader.fieldnames + for row in reader: + data_dict[row['name']] = row + except FileNotFoundError: + # File doesn't exist, proceed without modifying data_dict or fieldnames + pass + + return data_dict, fieldnames + +def update_csv_data(data_dict, benchmarks, memory_stats, commit_hash): + # Combine benchmarks and memory stats for easier processing + combined_data = {**memory_stats, **benchmarks} + + # Update the data_dict with new or updated values + for name, details in combined_data.items(): + if name not in data_dict: + data_dict[name] = {'name': name, 'unit': details['unit']} + data_dict[name][commit_hash] = int(details['value']) + +def write_csv_from_dict(csv_path, data_dict, fieldnames, commit_hash): + def custom_sort(item): + # Sort all items that do not have unit "ms" first, then sort based on whether the name is capitalized, and then based on worst newest benchmark + is_not_ms_unit = item['unit'] != "ms" + + if is_not_ms_unit: + # If the unit is not `ms`, preserve order + return (False, False, 0) + else: + # If the unit is `ms`, sort based on capitalization, then on newest benchmark + return (True , item['name'][0].islower(), 0 if commit_hash not in item.keys() else -item[commit_hash]) + + + + with open(csv_path, mode='w', newline='') as csvfile: + writer = csv.DictWriter(csvfile, fieldnames=fieldnames) + writer.writeheader() + # Sort the data based on the custom sort function before writing + sorted_data = sorted(data_dict.values(), key=custom_sort) + for row in sorted_data: + writer.writerow(row) + +def save_as_csv(benchmarks, memory_stats, csv_path, commit_hash): + data_dict, fieldnames = read_existing_csv_to_dict(csv_path, commit_hash) + update_csv_data(data_dict, benchmarks, memory_stats, commit_hash) + write_csv_from_dict(csv_path, data_dict, fieldnames, commit_hash) + +if __name__ == "__main__": + # Set up argument parsing + parser = argparse.ArgumentParser(description='Convert benchmark results to JSON format.') + parser.add_argument('input_times_path', help='Path to the input file containing typechecking times.') + parser.add_argument('input_memory_path', help='Path to the input file containing memory statistics.') + parser.add_argument('output_json_path', help='Path to the output JSON file.') + parser.add_argument('csv_path', help='Path to the profiling CSV file.') + parser.add_argument('commit_hash', help='Commit hash for current commit.') + + # Parse arguments from command line + args = parser.parse_args() + + # Use the provided command-line arguments + benchmarks = parse_benchmark_results(args.input_times_path) + memory_stats = parse_memory_profiling_data(args.input_memory_path) + + save_github_action_benchmark_json(args.output_json_path, benchmarks, memory_stats, ["Total",], ["total_memory_in_use",]) + save_as_csv(benchmarks, memory_stats, args.csv_path, args.commit_hash) diff --git a/src/category-theory/adjunctions-large-precategories.lagda.md b/src/category-theory/adjunctions-large-precategories.lagda.md index 0f3ddc0d82..d98a4ff347 100644 --- a/src/category-theory/adjunctions-large-precategories.lagda.md +++ b/src/category-theory/adjunctions-large-precategories.lagda.md @@ -160,7 +160,7 @@ module _ ( map-inv-equiv-is-adjoint-pair-Large-Precategory H X2 Y2) naturality-inv-equiv-is-adjoint-pair-Large-Precategory H {X1 = X1} {X2} {Y1} {Y2} f g = - coherence-square-maps-inv-equiv-horizontal + horizontal-inv-equiv-coherence-square-maps ( equiv-is-adjoint-pair-Large-Precategory H X1 Y1) ( λ h → comp-hom-Large-Precategory D diff --git a/src/finite-group-theory/delooping-sign-homomorphism.lagda.md b/src/finite-group-theory/delooping-sign-homomorphism.lagda.md index dbcbe3991e..cd43fb75bf 100644 --- a/src/finite-group-theory/delooping-sign-homomorphism.lagda.md +++ b/src/finite-group-theory/delooping-sign-homomorphism.lagda.md @@ -85,7 +85,7 @@ open import univalent-combinatorics.standard-finite-types ## Ideas The delooping of a group homomorphism `f : G → H` is a pointed map -`Bf : BG → BH` equiped with an homotopy witnessing that the following square +`Bf : BG → BH` equiped with a homotopy witnessing that the following square commutes : ```text diff --git a/src/foundation-core.lagda.md b/src/foundation-core.lagda.md index 5244d7271e..7f25f3e438 100644 --- a/src/foundation-core.lagda.md +++ b/src/foundation-core.lagda.md @@ -10,6 +10,7 @@ open import foundation-core.cartesian-product-types public open import foundation-core.coherently-invertible-maps public open import foundation-core.commuting-prisms-of-maps public open import foundation-core.commuting-squares-of-homotopies public +open import foundation-core.commuting-squares-of-identifications public open import foundation-core.commuting-squares-of-maps public open import foundation-core.commuting-triangles-of-maps public open import foundation-core.constant-maps public @@ -59,4 +60,6 @@ open import foundation-core.type-theoretic-principle-of-choice public open import foundation-core.univalence public open import foundation-core.universal-property-pullbacks public open import foundation-core.universal-property-truncation public +open import foundation-core.whiskering-homotopies-concatenation public +open import foundation-core.whiskering-identifications-concatenation public ``` diff --git a/src/foundation-core/coherently-invertible-maps.lagda.md b/src/foundation-core/coherently-invertible-maps.lagda.md index 177ec4b883..596c722080 100644 --- a/src/foundation-core/coherently-invertible-maps.lagda.md +++ b/src/foundation-core/coherently-invertible-maps.lagda.md @@ -7,49 +7,104 @@ module foundation-core.coherently-invertible-maps where
Imports ```agda +open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types +open import foundation.homotopy-algebra open import foundation.universe-levels +open import foundation.whiskering-higher-homotopies-composition open import foundation.whiskering-homotopies-composition +open import foundation-core.commuting-squares-of-homotopies open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types open import foundation-core.invertible-maps open import foundation-core.retractions open import foundation-core.sections +open import foundation-core.whiskering-homotopies-concatenation ```
## Idea -An [inverse](foundation-core.invertible-maps.md) for a map `f : A → B` is a map -`g : B → A` equipped with [homotopies](foundation-core.homotopies.md) -` (f ∘ g) ~ id` and `(g ∘ f) ~ id`. Such data, however is -[structure](foundation.structure.md) on the map `f`, and not generally a -[property](foundation-core.propositions.md). Therefore we include a coherence -condition for the homotopies of an inverse. A **coherently invertible map** -`f : A → B` is a map equipped with a two-sided inverse and this additional -coherence law. They are also called half-adjoint equivalences. +A [(two-sided) inverse](foundation-core.invertible-maps.md) for a map +`f : A → B` is a map `g : B → A` equipped with +[homotopies](foundation-core.homotopies.md) ` S : f ∘ g ~ id` and +`R : g ∘ f ~ id`. Such data, however is [structure](foundation.structure.md) on +the map `f`, and not generally a [property](foundation-core.propositions.md). +One way to make the type of inverses into a property is by adding a single +coherence condition between the homotopies of the inverse, asking that the +following diagram commmutes + +```text + S ·r f + ---------> + f ∘ g ∘ f f. + ---------> + f ·l R +``` + +We call such data a +{{#concept "coherently invertible map" Agda=coherently-invertible-map}}. I.e., a +coherently invertible map `f : A → B` is a map equipped with a two-sided inverse +and this additional coherence. + +There is also the alternative coherence condition we could add + +```text + R ·r g + ---------> + g ∘ f ∘ g g. + ---------> + g ·l S +``` + +We will colloquially refer to invertible maps equipped with this coherence for +_transpose coherently invertible maps_. + +**Note.** Coherently invertible maps are referred to as +{{#concept "half adjoint equivalences"}} in _Homotopy Type Theory – Univalent +Foundations of Mathematics_. + +On this page we will prove that every two-sided inverse `g` of `f` can be +promoted to a coherent two-sided inverse. Thus, for most properties of +coherently invertible maps, it suffices to consider the data of a two-sided +inverse. However, this coherence construction requires us to replace the section +homotopy (or retraction homotopy). For this reason we also give direct +constructions showing + +1. The identity map is coherently invertible. +2. The composite of two coherently invertible maps is coherently invertible. +3. The inverse of a coherently invertible map is coherently invertible. +4. Every map homotopic to a coherently invertible map is coherently invertible. +5. The 3-for-2 property of coherently invertible maps. + +Each of these constructions appropriately preserve the data of the underlying +two-sided inverse. ## Definition +### The predicate of being a coherently invertible map + ```agda module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} where coherence-is-coherently-invertible : - (f : A → B) (g : B → A) (G : (f ∘ g) ~ id) (H : (g ∘ f) ~ id) → UU (l1 ⊔ l2) - coherence-is-coherently-invertible f g G H = (G ·r f) ~ (f ·l H) + (f : A → B) (g : B → A) (G : f ∘ g ~ id) (H : g ∘ f ~ id) → UU (l1 ⊔ l2) + coherence-is-coherently-invertible f g G H = G ·r f ~ f ·l H is-coherently-invertible : (A → B) → UU (l1 ⊔ l2) is-coherently-invertible f = Σ ( B → A) - ( λ g → Σ ((f ∘ g) ~ id) - ( λ G → Σ ((g ∘ f) ~ id) - ( λ H → coherence-is-coherently-invertible f g G H))) + ( λ g → + Σ ( f ∘ g ~ id) + ( λ G → + Σ ( g ∘ f ~ id) + ( λ H → coherence-is-coherently-invertible f g G H))) module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} @@ -59,118 +114,1285 @@ module _ map-inv-is-coherently-invertible : B → A map-inv-is-coherently-invertible = pr1 H - is-retraction-is-coherently-invertible : - (f ∘ map-inv-is-coherently-invertible) ~ id - is-retraction-is-coherently-invertible = pr1 (pr2 H) + is-section-map-inv-is-coherently-invertible : + is-section f map-inv-is-coherently-invertible + is-section-map-inv-is-coherently-invertible = pr1 (pr2 H) - is-section-is-coherently-invertible : - (map-inv-is-coherently-invertible ∘ f) ~ id - is-section-is-coherently-invertible = pr1 (pr2 (pr2 H)) + is-retraction-map-inv-is-coherently-invertible : + is-retraction f map-inv-is-coherently-invertible + is-retraction-map-inv-is-coherently-invertible = pr1 (pr2 (pr2 H)) coh-is-coherently-invertible : coherence-is-coherently-invertible f ( map-inv-is-coherently-invertible) - ( is-retraction-is-coherently-invertible) - ( is-section-is-coherently-invertible) + ( is-section-map-inv-is-coherently-invertible) + ( is-retraction-map-inv-is-coherently-invertible) coh-is-coherently-invertible = pr2 (pr2 (pr2 H)) is-invertible-is-coherently-invertible : is-invertible f pr1 is-invertible-is-coherently-invertible = map-inv-is-coherently-invertible pr1 (pr2 is-invertible-is-coherently-invertible) = - is-retraction-is-coherently-invertible + is-section-map-inv-is-coherently-invertible pr2 (pr2 is-invertible-is-coherently-invertible) = - is-section-is-coherently-invertible + is-retraction-map-inv-is-coherently-invertible section-is-coherently-invertible : section f - pr1 section-is-coherently-invertible = map-inv-is-coherently-invertible - pr2 section-is-coherently-invertible = is-retraction-is-coherently-invertible + pr1 section-is-coherently-invertible = + map-inv-is-coherently-invertible + pr2 section-is-coherently-invertible = + is-section-map-inv-is-coherently-invertible retraction-is-coherently-invertible : retraction f - pr1 retraction-is-coherently-invertible = map-inv-is-coherently-invertible - pr2 retraction-is-coherently-invertible = is-section-is-coherently-invertible + pr1 retraction-is-coherently-invertible = + map-inv-is-coherently-invertible + pr2 retraction-is-coherently-invertible = + is-retraction-map-inv-is-coherently-invertible +``` + +We will show that `is-coherently-invertible` is a proposition in +[`foundation.coherently-invertible-maps`](foundation.coherently-invertible-maps.md). + +### The type of coherently invertible maps + +```agda +coherently-invertible-map : {l1 l2 : Level} → UU l1 → UU l2 → UU (l1 ⊔ l2) +coherently-invertible-map A B = Σ (A → B) (is-coherently-invertible) + +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : coherently-invertible-map A B) + where + + map-coherently-invertible-map : A → B + map-coherently-invertible-map = pr1 e + + is-coherently-invertible-map-coherently-invertible-map : + is-coherently-invertible map-coherently-invertible-map + is-coherently-invertible-map-coherently-invertible-map = pr2 e + + map-inv-coherently-invertible-map : B → A + map-inv-coherently-invertible-map = + map-inv-is-coherently-invertible + ( is-coherently-invertible-map-coherently-invertible-map) + + is-section-map-inv-coherently-invertible-map : + map-coherently-invertible-map ∘ map-inv-coherently-invertible-map ~ id + is-section-map-inv-coherently-invertible-map = + is-section-map-inv-is-coherently-invertible + ( is-coherently-invertible-map-coherently-invertible-map) + + is-retraction-map-inv-coherently-invertible-map : + map-inv-coherently-invertible-map ∘ map-coherently-invertible-map ~ id + is-retraction-map-inv-coherently-invertible-map = + is-retraction-map-inv-is-coherently-invertible + ( is-coherently-invertible-map-coherently-invertible-map) + + coh-coherently-invertible-map : + coherence-is-coherently-invertible + ( map-coherently-invertible-map) + ( map-inv-coherently-invertible-map) + ( is-section-map-inv-coherently-invertible-map) + ( is-retraction-map-inv-coherently-invertible-map) + coh-coherently-invertible-map = + coh-is-coherently-invertible + ( is-coherently-invertible-map-coherently-invertible-map) + + section-coherently-invertible-map : + section map-coherently-invertible-map + section-coherently-invertible-map = + section-is-coherently-invertible + ( is-coherently-invertible-map-coherently-invertible-map) + + retraction-coherently-invertible-map : + retraction map-coherently-invertible-map + retraction-coherently-invertible-map = + retraction-is-coherently-invertible + ( is-coherently-invertible-map-coherently-invertible-map) + + is-invertible-coherently-invertible-map : + is-invertible map-coherently-invertible-map + is-invertible-coherently-invertible-map = + is-invertible-is-coherently-invertible + ( is-coherently-invertible-map-coherently-invertible-map) + + invertible-map-coherently-invertible-map : invertible-map A B + pr1 invertible-map-coherently-invertible-map = + map-coherently-invertible-map + pr2 invertible-map-coherently-invertible-map = + is-invertible-coherently-invertible-map +``` + +### The predicate of being a transpose coherently invertible map + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + coherence-is-transpose-coherently-invertible : + (f : A → B) (g : B → A) (G : f ∘ g ~ id) (H : g ∘ f ~ id) → UU (l1 ⊔ l2) + coherence-is-transpose-coherently-invertible f g G H = H ·r g ~ g ·l G + + is-transpose-coherently-invertible : (A → B) → UU (l1 ⊔ l2) + is-transpose-coherently-invertible f = + Σ ( B → A) + ( λ g → + Σ ( f ∘ g ~ id) + ( λ G → + Σ ( g ∘ f ~ id) + ( λ H → coherence-is-transpose-coherently-invertible f g G H))) + +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + (H : is-transpose-coherently-invertible f) + where + + map-inv-is-transpose-coherently-invertible : B → A + map-inv-is-transpose-coherently-invertible = pr1 H + + is-section-map-inv-is-transpose-coherently-invertible : + f ∘ map-inv-is-transpose-coherently-invertible ~ id + is-section-map-inv-is-transpose-coherently-invertible = pr1 (pr2 H) + + is-retraction-map-inv-is-transpose-coherently-invertible : + map-inv-is-transpose-coherently-invertible ∘ f ~ id + is-retraction-map-inv-is-transpose-coherently-invertible = pr1 (pr2 (pr2 H)) + + coh-is-transpose-coherently-invertible : + coherence-is-transpose-coherently-invertible f + ( map-inv-is-transpose-coherently-invertible) + ( is-section-map-inv-is-transpose-coherently-invertible) + ( is-retraction-map-inv-is-transpose-coherently-invertible) + coh-is-transpose-coherently-invertible = pr2 (pr2 (pr2 H)) + + is-invertible-is-transpose-coherently-invertible : is-invertible f + pr1 is-invertible-is-transpose-coherently-invertible = + map-inv-is-transpose-coherently-invertible + pr1 (pr2 is-invertible-is-transpose-coherently-invertible) = + is-section-map-inv-is-transpose-coherently-invertible + pr2 (pr2 is-invertible-is-transpose-coherently-invertible) = + is-retraction-map-inv-is-transpose-coherently-invertible + + section-is-transpose-coherently-invertible : section f + pr1 section-is-transpose-coherently-invertible = + map-inv-is-transpose-coherently-invertible + pr2 section-is-transpose-coherently-invertible = + is-section-map-inv-is-transpose-coherently-invertible + + retraction-is-transpose-coherently-invertible : retraction f + pr1 retraction-is-transpose-coherently-invertible = + map-inv-is-transpose-coherently-invertible + pr2 retraction-is-transpose-coherently-invertible = + is-retraction-map-inv-is-transpose-coherently-invertible +``` + +We will show that `is-transpose-coherently-invertible` is a proposition in +[`foundation.coherently-invertible-maps`](foundation.coherently-invertible-maps.md). + +### The type of transpose coherently invertible maps + +```agda +transpose-coherently-invertible-map : + {l1 l2 : Level} → UU l1 → UU l2 → UU (l1 ⊔ l2) +transpose-coherently-invertible-map A B = + Σ (A → B) (is-transpose-coherently-invertible) + +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + (e : transpose-coherently-invertible-map A B) + where + + map-transpose-coherently-invertible-map : A → B + map-transpose-coherently-invertible-map = pr1 e + + is-transpose-coherently-invertible-map-transpose-coherently-invertible-map : + is-transpose-coherently-invertible map-transpose-coherently-invertible-map + is-transpose-coherently-invertible-map-transpose-coherently-invertible-map = + pr2 e + + map-inv-transpose-coherently-invertible-map : B → A + map-inv-transpose-coherently-invertible-map = + map-inv-is-transpose-coherently-invertible + ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map) + + is-section-map-inv-transpose-coherently-invertible-map : + ( map-transpose-coherently-invertible-map ∘ + map-inv-transpose-coherently-invertible-map) ~ + ( id) + is-section-map-inv-transpose-coherently-invertible-map = + is-section-map-inv-is-transpose-coherently-invertible + ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map) + + is-retraction-map-inv-transpose-coherently-invertible-map : + ( map-inv-transpose-coherently-invertible-map ∘ + map-transpose-coherently-invertible-map) ~ + ( id) + is-retraction-map-inv-transpose-coherently-invertible-map = + is-retraction-map-inv-is-transpose-coherently-invertible + ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map) + + coh-transpose-coherently-invertible-map : + coherence-is-transpose-coherently-invertible + ( map-transpose-coherently-invertible-map) + ( map-inv-transpose-coherently-invertible-map) + ( is-section-map-inv-transpose-coherently-invertible-map) + ( is-retraction-map-inv-transpose-coherently-invertible-map) + coh-transpose-coherently-invertible-map = + coh-is-transpose-coherently-invertible + ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map) + + section-transpose-coherently-invertible-map : + section map-transpose-coherently-invertible-map + section-transpose-coherently-invertible-map = + section-is-transpose-coherently-invertible + ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map) + + retraction-transpose-coherently-invertible-map : + retraction map-transpose-coherently-invertible-map + retraction-transpose-coherently-invertible-map = + retraction-is-transpose-coherently-invertible + ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map) + + is-invertible-transpose-coherently-invertible-map : + is-invertible map-transpose-coherently-invertible-map + is-invertible-transpose-coherently-invertible-map = + is-invertible-is-transpose-coherently-invertible + ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map) + + invertible-map-transpose-coherently-invertible-map : invertible-map A B + pr1 invertible-map-transpose-coherently-invertible-map = + map-transpose-coherently-invertible-map + pr2 invertible-map-transpose-coherently-invertible-map = + is-invertible-transpose-coherently-invertible-map +``` + +### Invertible maps that are coherent are coherently invertible maps + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + (H : is-invertible f) + where + + coherence-is-invertible : UU (l1 ⊔ l2) + coherence-is-invertible = + coherence-is-coherently-invertible + ( f) + ( map-inv-is-invertible H) + ( is-section-map-inv-is-invertible H) + ( is-retraction-map-inv-is-invertible H) + + transpose-coherence-is-invertible : UU (l1 ⊔ l2) + transpose-coherence-is-invertible = + coherence-is-transpose-coherently-invertible + ( f) + ( map-inv-is-invertible H) + ( is-section-map-inv-is-invertible H) + ( is-retraction-map-inv-is-invertible H) + + is-coherently-invertible-coherence-is-invertible : + coherence-is-invertible → is-coherently-invertible f + is-coherently-invertible-coherence-is-invertible coh = + ( map-inv-is-invertible H , + is-section-map-inv-is-invertible H , + is-retraction-map-inv-is-invertible H , + coh) + + is-transpose-coherently-invertible-transpose-coherence-is-invertible : + transpose-coherence-is-invertible → is-transpose-coherently-invertible f + is-transpose-coherently-invertible-transpose-coherence-is-invertible coh = + ( map-inv-is-invertible H , + is-section-map-inv-is-invertible H , + is-retraction-map-inv-is-invertible H , + coh) ``` ## Properties +### The inverse of a coherently invertible map is transpose coherently invertible and vice versa + +The inverse of a coherently invertible map is transpose coherently invertible. +Conversely, the inverse of a transpose coherently invertible map is coherently +invertible. Since these are defined by simply moving data around, they are +strict inverses to one another. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-transpose-coherently-invertible-map-inv-is-coherently-invertible : + {f : A → B} (H : is-coherently-invertible f) → + is-transpose-coherently-invertible (map-inv-is-coherently-invertible H) + is-transpose-coherently-invertible-map-inv-is-coherently-invertible {f} H = + ( f , + is-retraction-map-inv-is-coherently-invertible H , + is-section-map-inv-is-coherently-invertible H , + coh-is-coherently-invertible H) + + is-coherently-invertible-map-inv-is-transpose-coherently-invertible : + {f : A → B} (H : is-transpose-coherently-invertible f) → + is-coherently-invertible (map-inv-is-transpose-coherently-invertible H) + is-coherently-invertible-map-inv-is-transpose-coherently-invertible {f} H = + ( f , + is-retraction-map-inv-is-transpose-coherently-invertible H , + is-section-map-inv-is-transpose-coherently-invertible H , + coh-is-transpose-coherently-invertible H) + + transpose-coherently-invertible-map-inv-coherently-invertible-map : + coherently-invertible-map A B → transpose-coherently-invertible-map B A + transpose-coherently-invertible-map-inv-coherently-invertible-map e = + ( map-inv-coherently-invertible-map e , + is-transpose-coherently-invertible-map-inv-is-coherently-invertible + ( is-coherently-invertible-map-coherently-invertible-map e)) + + coherently-invertible-map-inv-transpose-coherently-invertible-map : + transpose-coherently-invertible-map A B → coherently-invertible-map B A + coherently-invertible-map-inv-transpose-coherently-invertible-map e = + ( map-inv-transpose-coherently-invertible-map e , + is-coherently-invertible-map-inv-is-transpose-coherently-invertible + ( is-transpose-coherently-invertible-map-transpose-coherently-invertible-map + ( e))) +``` + ### Invertible maps are coherently invertible -#### Lemma: A coherence for homotopies to an identity map +This result is known as +[Vogt's lemma](https://ncatlab.org/nlab/show/homotopy+equivalence#vogts_lemma) +in point-set topology. The construction follows Lemma 10.4.5 in _Introduction to +Homotopy Type Theory_. ```agda -coh-is-coherently-invertible-id : - {l : Level} {A : UU l} {f : A → A} (H : f ~ (λ x → x)) → - (x : A) → H (f x) = ap f (H x) -coh-is-coherently-invertible-id {_} {A} {f} H x = - is-injective-concat' (H x) - ( ( ap (concat (H (f x)) x) (inv (ap-id (H x)))) ∙ - ( nat-htpy H (H x))) +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} (H : is-invertible f) + where + + is-retraction-map-inv-is-coherently-invertible-is-invertible : + map-inv-is-invertible H ∘ f ~ id + is-retraction-map-inv-is-coherently-invertible-is-invertible = + is-retraction-map-inv-is-invertible H + + abstract + is-section-map-inv-is-coherently-invertible-is-invertible : + f ∘ map-inv-is-invertible H ~ id + is-section-map-inv-is-coherently-invertible-is-invertible = + ( ( inv-htpy (is-section-map-inv-is-invertible H)) ·r + ( f ∘ map-inv-is-invertible H)) ∙h + ( ( ( f) ·l + ( is-retraction-map-inv-is-invertible H) ·r + ( map-inv-is-invertible H)) ∙h + ( is-section-map-inv-is-invertible H)) + + abstract + inv-coh-is-coherently-invertible-is-invertible : + f ·l is-retraction-map-inv-is-coherently-invertible-is-invertible ~ + is-section-map-inv-is-coherently-invertible-is-invertible ·r f + inv-coh-is-coherently-invertible-is-invertible = + left-transpose-htpy-concat + ( ( is-section-map-inv-is-invertible H) ·r + ( f ∘ map-inv-is-invertible H ∘ f)) + ( f ·l is-retraction-map-inv-is-invertible H) + ( ( ( f) ·l + ( is-retraction-map-inv-is-invertible H) ·r + ( map-inv-is-invertible H ∘ f)) ∙h + ( is-section-map-inv-is-invertible H ·r f)) + ( ( ( nat-htpy (is-section-map-inv-is-invertible H ·r f)) ·r + ( is-retraction-map-inv-is-invertible H)) ∙h + ( right-whisker-concat-htpy + ( ( inv-preserves-comp-left-whisker-comp + ( f) + ( map-inv-is-invertible H ∘ f) + ( is-retraction-map-inv-is-invertible H)) ∙h + ( left-whisker-comp² + ( f) + ( inv-coh-htpy-id (is-retraction-map-inv-is-invertible H)))) + ( is-section-map-inv-is-invertible H ·r f))) + + abstract + coh-is-coherently-invertible-is-invertible : + coherence-is-coherently-invertible + ( f) + ( map-inv-is-invertible H) + ( is-section-map-inv-is-coherently-invertible-is-invertible) + ( is-retraction-map-inv-is-coherently-invertible-is-invertible) + coh-is-coherently-invertible-is-invertible = + inv-htpy inv-coh-is-coherently-invertible-is-invertible + + is-coherently-invertible-is-invertible : is-coherently-invertible f + is-coherently-invertible-is-invertible = + ( map-inv-is-invertible H , + is-section-map-inv-is-coherently-invertible-is-invertible , + is-retraction-map-inv-is-coherently-invertible-is-invertible , + coh-is-coherently-invertible-is-invertible) ``` -#### The proof that invertible maps are coherently invertible +We get the transpose version for free: + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} (H : is-invertible f) + where + + is-transpose-coherently-invertible-is-invertible : + is-transpose-coherently-invertible f + is-transpose-coherently-invertible-is-invertible = + is-transpose-coherently-invertible-map-inv-is-coherently-invertible + ( is-coherently-invertible-is-invertible + ( is-invertible-map-inv-is-invertible H)) +``` + +### Coherently invertible maps are injective + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + where + + is-injective-is-coherently-invertible : + (H : is-coherently-invertible f) {x y : A} → f x = f y → x = y + is-injective-is-coherently-invertible H = + is-injective-is-invertible + ( is-invertible-is-coherently-invertible H) + + is-injective-is-transpose-coherently-invertible : + (H : is-transpose-coherently-invertible f) {x y : A} → f x = f y → x = y + is-injective-is-transpose-coherently-invertible H = + is-injective-is-invertible + ( is-invertible-is-transpose-coherently-invertible H) +``` + +### Coherently invertible maps are embeddings + +We show that `is-injective-is-coherently-invertible` is a +[section](foundation-core.sections.md) and +[retraction](foundation-core.retractions.md) of `ap f`. ```agda module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + (H : is-coherently-invertible f) {x y : A} where abstract - is-section-map-inv-is-invertible : - (H : is-invertible f) → (f ∘ map-inv-is-invertible H) ~ id - is-section-map-inv-is-invertible H y = - ( inv (is-retraction-is-invertible H (f (map-inv-is-invertible H y)))) ∙ - ( ( ap f (is-section-is-invertible H (map-inv-is-invertible H y))) ∙ - ( is-retraction-is-invertible H y)) - - is-retraction-map-inv-is-invertible : - (H : is-invertible f) → (map-inv-is-invertible H ∘ f) ~ id - is-retraction-map-inv-is-invertible = is-section-is-invertible - - inv-coherence-map-inv-is-invertible : - (H : is-invertible f) → - f ·l is-retraction-map-inv-is-invertible H ~ - is-section-map-inv-is-invertible H ·r f - inv-coherence-map-inv-is-invertible H x = - left-transpose-eq-concat - ( is-retraction-is-invertible H (f (map-inv-is-invertible H (f x)))) - ( ap f (is-section-is-invertible H x)) - ( ( ap f - ( is-section-is-invertible H (map-inv-is-invertible H (f x)))) ∙ - ( is-retraction-is-invertible H (f x))) - ( ( nat-htpy - ( right-whisker-comp (is-retraction-is-invertible H) f) - ( is-section-is-invertible H x)) ∙ - ( ap - ( concat' _ (is-retraction-is-invertible H (f x))) - ( ( ap-comp f - ( map-inv-is-invertible H ∘ f) - ( is-section-is-invertible H x)) ∙ - ( inv - ( ap - ( ap f) - ( coh-is-coherently-invertible-id - ( is-section-is-invertible H) x)))))) - - coherence-map-inv-is-invertible : - ( H : is-invertible f) → - ( is-section-map-inv-is-invertible H ·r f) ~ - ( f ·l is-retraction-map-inv-is-invertible H) - coherence-map-inv-is-invertible H x = - inv (inv-coherence-map-inv-is-invertible H x) + is-section-is-injective-is-coherently-invertible : + ap f {x} {y} ∘ is-injective-is-coherently-invertible H ~ id + is-section-is-injective-is-coherently-invertible p = + ( ap-concat f + ( inv (is-retraction-map-inv-is-coherently-invertible H x)) + ( ( ap (map-inv-is-coherently-invertible H) p) ∙ + ( is-retraction-map-inv-is-coherently-invertible H y))) ∙ + ( ap-binary + ( _∙_) + ( ap-inv f (is-retraction-map-inv-is-coherently-invertible H x)) + ( ( ap-concat f + ( ap (map-inv-is-coherently-invertible H) p) + ( is-retraction-map-inv-is-coherently-invertible H y)) ∙ + ( ap-binary + ( _∙_) + ( inv (ap-comp f (map-inv-is-coherently-invertible H) p)) + ( inv (coh-is-coherently-invertible H y))))) ∙ + ( inv + ( left-transpose-eq-concat + ( ap f (is-retraction-map-inv-is-coherently-invertible H x)) + ( p) + ( ( ap (f ∘ map-inv-is-coherently-invertible H) p) ∙ + ( is-section-map-inv-is-coherently-invertible H (f y))) + ( ( ap-binary + ( _∙_) + ( inv (coh-is-coherently-invertible H x)) + ( inv (ap-id p))) ∙ + ( nat-htpy (is-section-map-inv-is-coherently-invertible H) p)))) + + abstract + is-retraction-is-injective-is-coherently-invertible : + is-injective-is-coherently-invertible H ∘ ap f {x} {y} ~ id + is-retraction-is-injective-is-coherently-invertible refl = + left-inv (is-retraction-map-inv-is-coherently-invertible H x) + + is-invertible-ap-is-coherently-invertible : is-invertible (ap f {x} {y}) + is-invertible-ap-is-coherently-invertible = + ( is-injective-is-coherently-invertible H , + is-section-is-injective-is-coherently-invertible , + is-retraction-is-injective-is-coherently-invertible) + + is-coherently-invertible-ap-is-coherently-invertible : + is-coherently-invertible (ap f {x} {y}) + is-coherently-invertible-ap-is-coherently-invertible = + is-coherently-invertible-is-invertible + ( is-invertible-ap-is-coherently-invertible) +``` + +### Coherently invertible maps are transpose coherently invertible + +The proof follows Lemma 4.2.2 in _Homotopy Type Theory – Univalent Foundations +of Mathematics_. + +**Proof.** By naturality of homotopies we have + +```text + gfRg + gfgfg --------------------> gfg + | | + Rgfg | nat-htpy R ·r (R ·r g) | Rg + ∨ ∨ + gfg ----------------------> g. + Rg +``` + +We can paste the homotopy + +```text + g (inv-coh-htpy-id S) ∙ gHg : Sgfg ~ gfSg ~ gfRg +``` + +along the top edge of this naturality square obtaining the coherence square + +```text + gfgS + gfgfg -------> gfg + | | + Rgfg | | Rg + ∨ ∨ + gfg ---------> g. + Rg +``` + +There is also the naturality square + +```text + gfgS + gfgfg --------------------> gfg + | | + Rgfg | nat-htpy (R ·r g) ·r S | Rg + ∨ ∨ + gfg ----------------------> g. + gS +``` + +Now, by pasting these along the common edge `Rgfg`, we obtain + +```text + gfgS gfgS + gfg <------- gfgfg -------> gfg + | | | + Rg | | Rgfg | Rg + ∨ ∨ ∨ + g <--------- gfg --------> gm + Rg gS +``` + +After cancelling `gfgS` and `Rg` with themselves, we are left with `Rg ~ gS` as +desired. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + (f : A → B) + (g : B → A) + (S : is-section f g) + (R : is-retraction f g) + (H : coherence-is-coherently-invertible f g S R) + where + + abstract + coh-transposition-coherence-is-coherently-invertible : + (g ∘ f ∘ g) ·l S ~ (g ∘ f) ·l R ·r g + coh-transposition-coherence-is-coherently-invertible = + ( inv-preserves-comp-left-whisker-comp g (f ∘ g) S) ∙h + ( left-whisker-comp² g (inv-coh-htpy-id S)) ∙h + ( double-whisker-comp² g H g) ∙h + ( preserves-comp-left-whisker-comp g f (R ·r g)) + + abstract + naturality-square-transposition-coherence-is-coherently-invertible : + coherence-square-homotopies + ( R ·r (g ∘ f ∘ g)) + ( (g ∘ f ∘ g) ·l S) + ( R ·r g) + ( R ·r g) + naturality-square-transposition-coherence-is-coherently-invertible = + ( ap-concat-htpy' + ( R ·r g) + ( coh-transposition-coherence-is-coherently-invertible)) ∙h + ( inv-htpy (nat-htpy R ·r (R ·r g))) ∙h + ( ap-concat-htpy + ( R ·r (g ∘ f ∘ g)) + ( left-unit-law-left-whisker-comp (R ·r g))) + + abstract + coherence-transposition-coherence-is-coherently-invertible : + coherence-is-transpose-coherently-invertible f g S R + coherence-transposition-coherence-is-coherently-invertible = + ( ap-concat-htpy' + ( R ·r g) + ( inv-htpy (left-inv-htpy ((g ∘ f ∘ g) ·l S)))) ∙h + ( assoc-htpy (inv-htpy ((g ∘ f ∘ g) ·l S)) ((g ∘ f ∘ g) ·l S) (R ·r g)) ∙h + ( ap-concat-htpy + ( inv-htpy ((g ∘ f ∘ g) ·l S)) + ( inv-htpy (nat-htpy (R ·r g) ·r S))) ∙h + ( inv-htpy + ( assoc-htpy + ( inv-htpy ((g ∘ f ∘ g) ·l S)) + ( R ·r (g ∘ f ∘ g)) + ( g ·l S))) ∙h + ( ap-concat-htpy' + ( g ·l S) + ( ( vertical-inv-coherence-square-homotopies + ( R ·r (g ∘ f ∘ g)) ((g ∘ f ∘ g) ·l S) (R ·r g) (R ·r g) + ( naturality-square-transposition-coherence-is-coherently-invertible)) ∙h + ( right-inv-htpy (R ·r g)))) +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + where + + coherence-transposition-is-coherently-invertible : + (H : is-coherently-invertible f) → + coherence-is-transpose-coherently-invertible + ( f) + ( map-inv-is-coherently-invertible H) + ( is-section-map-inv-is-coherently-invertible H) + ( is-retraction-map-inv-is-coherently-invertible H) + coherence-transposition-is-coherently-invertible + ( g , S , R , H) = + coherence-transposition-coherence-is-coherently-invertible f g S R H + + transposition-is-coherently-invertible : + is-coherently-invertible f → is-transpose-coherently-invertible f + transposition-is-coherently-invertible H = + is-transpose-coherently-invertible-transpose-coherence-is-invertible + ( is-invertible-is-coherently-invertible H) + ( coherence-transposition-is-coherently-invertible H) +``` + +### Transpose coherently invertible maps are coherently invertible + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + where + + coherence-transposition-is-transpose-coherently-invertible : + (H : is-transpose-coherently-invertible f) → + coherence-is-coherently-invertible + ( f) + ( map-inv-is-transpose-coherently-invertible H) + ( is-section-map-inv-is-transpose-coherently-invertible H) + ( is-retraction-map-inv-is-transpose-coherently-invertible H) + coherence-transposition-is-transpose-coherently-invertible H = + coherence-transposition-is-coherently-invertible + ( is-coherently-invertible-map-inv-is-transpose-coherently-invertible H) + + transposition-is-transpose-coherently-invertible : + is-transpose-coherently-invertible f → is-coherently-invertible f + transposition-is-transpose-coherently-invertible H = + is-coherently-invertible-coherence-is-invertible + ( is-invertible-is-transpose-coherently-invertible H) + ( coherence-transposition-is-transpose-coherently-invertible H) + +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + transposition-coherently-invertible-map : + coherently-invertible-map A B → transpose-coherently-invertible-map A B + transposition-coherently-invertible-map (f , H) = + ( f , transposition-is-coherently-invertible H) + + transposition-transpose-coherently-invertible-map : + transpose-coherently-invertible-map A B → coherently-invertible-map A B + transposition-transpose-coherently-invertible-map (f , H) = + ( f , transposition-is-transpose-coherently-invertible H) +``` + +### Coherently invertible maps are closed under homotopies + +**Proof.** Assume given a coherently invertible map `f` with inverse `g`, +homotopies `S : f ∘ g ~ id`, `R : g ∘ f ~ id` and coherence `C : Sf ~ fR`. +Moreover, assume the map `f'` is homotopic to `f` with homotopy `H : f' ~ f`. +Then `g` is also a two-sided inverse to `f'` via the homotopies + +```text + S' := Hg ∙ S : f' ∘ g ~ id and R' := gH ∙ R : g ∘ f' ~ id. +``` + +Moreover, these witnesses are part of a coherent inverse to `f'`. To show this, +we must construct a coherence `C'` of the square + +```text + Hgf' + f'gf' -----> f'gf + | | + f'gH | | Sf' + ∨ ∨ + f'gf -------> f'. + f'R +``` + +We begin by observing that `C` fits somewhere along the diagonal of this square +via the composite + +```text + Sf + HgH ------> H⁻¹ + f'gf' -----> fgf C f ----> f'. + ------> + fR +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f f' : A → B} (H : f' ~ f) + (g : B → A) (S : f ∘ g ~ id) (R : g ∘ f ~ id) (C : S ·r f ~ f ·l R) + where + + coh-coh-is-coherently-invertible-htpy : + horizontal-concat-htpy' (H ·r g) H ∙h (S ·r f ∙h inv-htpy H) ~ + horizontal-concat-htpy' (H ·r g) H ∙h (f ·l R ∙h inv-htpy H) + coh-coh-is-coherently-invertible-htpy = + left-whisker-concat-htpy + ( horizontal-concat-htpy' (H ·r g) H) + ( right-whisker-concat-htpy C (inv-htpy H)) +``` + +Now the problem is reduced to constructing two homotopies + +```text + Hgf' ∙ Sf' ~ HgH ∙ Sf ∙ H⁻¹ and f'gH ∙ f'R ~ HgH ∙ fR ∙ H⁻¹. +``` + +By the two equivalent constructions of the horizontal composite `HgH` + +```text + Hgf' ∙ fgH ~ HgH ~ f'gH ∙ Hgf +``` + +constructing the two homotopies is equivalent to constructing coherences of the +squares + +```text + fgH Hgf + fgf' -------> fgf f'gf -------> fgf + | | | | + Sf' | | Sf f'R | | fR + ∨ ∨ ∨ ∨ + f' ---------> f f' ---------> f + H H +``` + +However, these squares are naturality squares, so we are done. + +```agda + coh-section-is-coherently-invertible-htpy : + (H ·r g ∙h S) ·r f' ~ + horizontal-concat-htpy' (H ·r g) H ∙h ((S ·r f) ∙h inv-htpy H) + coh-section-is-coherently-invertible-htpy = + ( left-whisker-concat-htpy + ( H ·r (g ∘ f')) + ( right-transpose-htpy-concat (S ·r f') H ((f ∘ g) ·l H ∙h S ·r f) + ( ( ap-concat-htpy + ( S ·r f') + ( inv-htpy (left-unit-law-left-whisker-comp H))) ∙h + ( nat-htpy S ·r H)))) ∙h + ( ( ap-concat-htpy + ( H ·r (g ∘ f')) + ( assoc-htpy ((f ∘ g) ·l H) (S ·r f) (inv-htpy H))) ∙h + ( inv-htpy + ( assoc-htpy (H ·r (g ∘ f')) ((f ∘ g) ·l H) ((S ·r f) ∙h inv-htpy H)))) + + coh-retraction-is-coherently-invertible-htpy : + horizontal-concat-htpy' (H ·r g) H ∙h ((f ·l R) ∙h inv-htpy H) ~ + f' ·l ((g ·l H) ∙h R) + coh-retraction-is-coherently-invertible-htpy = + ( ap-concat-htpy' + ( f ·l R ∙h inv-htpy H) + ( coh-horizontal-concat-htpy (H ·r g) H)) ∙h + ( assoc-htpy ((f' ∘ g) ·l H) (H ·r (g ∘ f)) (f ·l R ∙h inv-htpy H)) ∙h + ( ap-concat-htpy + ( (f' ∘ g) ·l H) + ( inv-htpy (assoc-htpy (H ·r (g ∘ f)) (f ·l R) (inv-htpy H)))) ∙h + ( left-whisker-concat-htpy + ( (f' ∘ g) ·l H) + ( inv-htpy + ( right-transpose-htpy-concat (f' ·l R) H ((H ·r (g ∘ f) ∙h f ·l R)) + ( inv-htpy (nat-htpy H ·r R))))) ∙h + ( ap-concat-htpy' + ( f' ·l R) + ( inv-preserves-comp-left-whisker-comp f' g H)) ∙h + ( inv-htpy (distributive-left-whisker-comp-concat f' (g ·l H) R)) +``` + +Finally, we concatenate the three coherences to obtain our desired result. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f f' : A → B} + where + + abstract + coh-is-coherently-invertible-htpy : + (H : f' ~ f) (F : is-coherently-invertible f) → + coherence-is-coherently-invertible + ( f') + ( map-inv-is-coherently-invertible F) + ( is-section-map-inv-is-invertible-htpy + ( H) + ( is-invertible-is-coherently-invertible F)) + ( is-retraction-map-inv-is-invertible-htpy + ( H) + ( is-invertible-is-coherently-invertible F)) + coh-is-coherently-invertible-htpy H F = + ( coh-section-is-coherently-invertible-htpy H + ( map-inv-is-coherently-invertible F) + ( is-section-map-inv-is-coherently-invertible F) + ( is-retraction-map-inv-is-coherently-invertible F) + ( coh-is-coherently-invertible F)) ∙h + ( coh-coh-is-coherently-invertible-htpy H + ( map-inv-is-coherently-invertible F) + ( is-section-map-inv-is-coherently-invertible F) + ( is-retraction-map-inv-is-coherently-invertible F) + ( coh-is-coherently-invertible F)) ∙h + ( coh-retraction-is-coherently-invertible-htpy H + ( map-inv-is-coherently-invertible F) + ( is-section-map-inv-is-coherently-invertible F) + ( is-retraction-map-inv-is-coherently-invertible F) + ( coh-is-coherently-invertible F)) + + is-coherently-invertible-htpy : + f' ~ f → is-coherently-invertible f → is-coherently-invertible f' + is-coherently-invertible-htpy H F = + is-coherently-invertible-coherence-is-invertible + ( is-invertible-htpy H (is-invertible-is-coherently-invertible F)) + ( coh-is-coherently-invertible-htpy H F) + + is-coherently-invertible-inv-htpy : + f ~ f' → is-coherently-invertible f → is-coherently-invertible f' + is-coherently-invertible-inv-htpy H = + is-coherently-invertible-htpy (inv-htpy H) + +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + where + + is-coherently-invertible-htpy-coherently-invertible-map : + (e : coherently-invertible-map A B) → + f ~ map-coherently-invertible-map e → + is-coherently-invertible f + is-coherently-invertible-htpy-coherently-invertible-map (e , E) H = + is-coherently-invertible-htpy H E + + is-coherently-invertible-inv-htpy-coherently-invertible-map : + (e : coherently-invertible-map A B) → + map-coherently-invertible-map e ~ f → + is-coherently-invertible f + is-coherently-invertible-inv-htpy-coherently-invertible-map (e , E) H = + is-coherently-invertible-inv-htpy H E +``` + +### The identity map is coherently invertible + +```agda +module _ + {l : Level} {A : UU l} + where + + is-coherently-invertible-id : + is-coherently-invertible (id {A = A}) + is-coherently-invertible-id = + is-coherently-invertible-coherence-is-invertible is-invertible-id refl-htpy + + id-coherently-invertible-map : coherently-invertible-map A A + id-coherently-invertible-map = + ( id , is-coherently-invertible-id) + + is-transpose-coherently-invertible-id : + is-transpose-coherently-invertible (id {A = A}) + is-transpose-coherently-invertible-id = + is-transpose-coherently-invertible-map-inv-is-coherently-invertible + ( is-coherently-invertible-id) + + id-transpose-coherently-invertible-map : + transpose-coherently-invertible-map A A + id-transpose-coherently-invertible-map = + ( id , is-transpose-coherently-invertible-id) +``` + +### Inversion of coherently invertible maps + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-coherently-invertible-map-inv-is-coherently-invertible : + {f : A → B} (H : is-coherently-invertible f) → + is-coherently-invertible (map-inv-is-coherently-invertible H) + is-coherently-invertible-map-inv-is-coherently-invertible H = + is-coherently-invertible-map-inv-is-transpose-coherently-invertible + ( transposition-is-coherently-invertible H) + + is-transpose-coherently-invertible-map-inv-is-transpose-coherently-invertible : + {f : A → B} (H : is-transpose-coherently-invertible f) → + is-transpose-coherently-invertible + ( map-inv-is-transpose-coherently-invertible H) + is-transpose-coherently-invertible-map-inv-is-transpose-coherently-invertible + H = + transposition-is-coherently-invertible + ( is-coherently-invertible-map-inv-is-transpose-coherently-invertible H) + + inv-coherently-invertible-map : + coherently-invertible-map A B → coherently-invertible-map B A + inv-coherently-invertible-map (f , H) = + ( map-inv-is-coherently-invertible H , + is-coherently-invertible-map-inv-is-coherently-invertible H) + + inv-transpose-coherently-invertible-map : + transpose-coherently-invertible-map A B → + transpose-coherently-invertible-map B A + inv-transpose-coherently-invertible-map (f , H) = + ( map-inv-is-transpose-coherently-invertible H , + is-transpose-coherently-invertible-map-inv-is-transpose-coherently-invertible + ( H)) +``` + +### Composition of coherently invertible maps + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} + (g : B → C) (f : A → B) + (G : is-coherently-invertible g) + (F : is-coherently-invertible f) + where + + coh-is-coherently-invertible-comp : + coherence-is-coherently-invertible + ( g ∘ f) + ( map-inv-is-invertible-comp g f + ( is-invertible-is-coherently-invertible G) + ( is-invertible-is-coherently-invertible F)) + ( is-section-map-inv-is-invertible-comp g f + ( is-invertible-is-coherently-invertible G) + ( is-invertible-is-coherently-invertible F)) + ( is-retraction-map-inv-is-invertible-comp g f + ( is-invertible-is-coherently-invertible G) + ( is-invertible-is-coherently-invertible F)) + coh-is-coherently-invertible-comp = + ( ap-concat-htpy + ( ( g) ·l + ( is-section-map-inv-is-coherently-invertible F) ·r + ( map-inv-is-coherently-invertible G ∘ g ∘ f)) + ( coh-is-coherently-invertible G ·r f)) ∙h + ( right-whisker-comp² + ( ( nat-htpy (g ·l is-section-map-inv-is-coherently-invertible F)) ·r + ( is-retraction-map-inv-is-coherently-invertible G)) + ( f)) ∙h + ( ap-binary-concat-htpy + ( inv-preserves-comp-left-whisker-comp + ( g ∘ f) + ( map-inv-is-coherently-invertible F) + ( is-retraction-map-inv-is-coherently-invertible G ·r f)) + ( ( left-whisker-comp² g (coh-is-coherently-invertible F)) ∙h + ( preserves-comp-left-whisker-comp g f + ( is-retraction-map-inv-is-coherently-invertible F)))) ∙h + ( inv-htpy + ( distributive-left-whisker-comp-concat + ( g ∘ f) + ( ( map-inv-is-coherently-invertible F) ·l + ( is-retraction-map-inv-is-coherently-invertible G ·r f)) + ( is-retraction-map-inv-is-coherently-invertible F))) + + is-coherently-invertible-comp : is-coherently-invertible (g ∘ f) + is-coherently-invertible-comp = + is-coherently-invertible-coherence-is-invertible + ( is-invertible-comp g f + ( is-invertible-is-coherently-invertible G) + ( is-invertible-is-coherently-invertible F)) + ( coh-is-coherently-invertible-comp) + +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} + (g : B → C) (f : A → B) + (G : is-transpose-coherently-invertible g) + (F : is-transpose-coherently-invertible f) + where + + coh-is-transpose-coherently-invertible-comp : + coherence-is-transpose-coherently-invertible + ( g ∘ f) + ( map-inv-is-invertible-comp g f + ( is-invertible-is-transpose-coherently-invertible G) + ( is-invertible-is-transpose-coherently-invertible F)) + ( is-section-map-inv-is-invertible-comp g f + ( is-invertible-is-transpose-coherently-invertible G) + ( is-invertible-is-transpose-coherently-invertible F)) + ( is-retraction-map-inv-is-invertible-comp g f + ( is-invertible-is-transpose-coherently-invertible G) + ( is-invertible-is-transpose-coherently-invertible F)) + coh-is-transpose-coherently-invertible-comp = + coh-is-coherently-invertible-comp + ( map-inv-is-transpose-coherently-invertible F) + ( map-inv-is-transpose-coherently-invertible G) + ( is-coherently-invertible-map-inv-is-transpose-coherently-invertible F) + ( is-coherently-invertible-map-inv-is-transpose-coherently-invertible G) + + is-transpose-coherently-invertible-comp : + is-transpose-coherently-invertible (g ∘ f) + is-transpose-coherently-invertible-comp = + is-transpose-coherently-invertible-transpose-coherence-is-invertible + ( is-invertible-comp g f + ( is-invertible-is-transpose-coherently-invertible G) + ( is-invertible-is-transpose-coherently-invertible F)) + ( coh-is-transpose-coherently-invertible-comp) + +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} + where + + comp-coherently-invertible-map : + coherently-invertible-map B C → + coherently-invertible-map A B → + coherently-invertible-map A C + comp-coherently-invertible-map (g , G) (f , F) = + ( g ∘ f , is-coherently-invertible-comp g f G F) + + comp-transpose-coherently-invertible-map : + transpose-coherently-invertible-map B C → + transpose-coherently-invertible-map A B → + transpose-coherently-invertible-map A C + comp-transpose-coherently-invertible-map (g , G) (f , F) = + ( g ∘ f , is-transpose-coherently-invertible-comp g f G F) +``` + +### The 3-for-2 property of coherently invertible maps + +The +{{#concept "3-for-2 property" Disambiguation="of coherently invertible maps"}} +of coherently invertible maps asserts that for any +[commuting triangle](foundation-core.commuting-triangles-of-maps.md) of maps + +```text + h + A ------> B + \ / + f\ /g + \ / + V V + X, +``` + +if two of the three maps are coherently invertible, then so is the third. + +We also record special cases of the 3-for-2 property of coherently invertible +maps, where we only assume maps `g : B → X` and `h : A → B`. In this special +case, we set `f := g ∘ h` and the triangle commutes by `refl-htpy`. + +[André Joyal](https://en.wikipedia.org/wiki/André_Joyal) proposed calling this +property the 3-for-2 property, despite most mathematicians calling it the +_2-out-of-3 property_. The story goes that on the produce market is is common to +advertise a discount as "3-for-2". If you buy two apples, then you get the third +for free. Similarly, if you prove that two maps in a commuting triangle are +coherently invertible, then you get the third proof for free. + +#### The left map in a commuting triangle is coherently invertible if the other two maps are + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3} + (f : A → X) (g : B → X) (h : A → B) (T : f ~ g ∘ h) + where + + is-coherently-invertible-left-map-triangle : + is-coherently-invertible h → + is-coherently-invertible g → + is-coherently-invertible f + is-coherently-invertible-left-map-triangle H G = + is-coherently-invertible-htpy T (is-coherently-invertible-comp g h G H) +``` + +#### The right map in a commuting triangle is coherently invertible if the other two maps are + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3} + (f : A → X) (g : B → X) (h : A → B) (T : f ~ g ∘ h) + where + + is-coherently-invertible-right-map-triangle : + is-coherently-invertible f → + is-coherently-invertible h → + is-coherently-invertible g + is-coherently-invertible-right-map-triangle F H = + is-coherently-invertible-htpy + ( ( g ·l inv-htpy (is-section-map-inv-is-coherently-invertible H)) ∙h + ( inv-htpy T ·r map-inv-is-coherently-invertible H)) + ( is-coherently-invertible-comp + ( f) + ( map-inv-is-coherently-invertible H) + ( F) + ( is-coherently-invertible-map-inv-is-coherently-invertible H)) +``` + +#### The top map in a commuting triangle is coherently invertible if the other two maps are + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3} + (f : A → X) (g : B → X) (h : A → B) (T : f ~ g ∘ h) + where + + is-coherently-invertible-top-map-triangle : + is-coherently-invertible g → + is-coherently-invertible f → + is-coherently-invertible h + is-coherently-invertible-top-map-triangle G F = + is-coherently-invertible-htpy + ( ( inv-htpy (is-retraction-map-inv-is-coherently-invertible G) ·r h) ∙h + ( map-inv-is-coherently-invertible G ·l inv-htpy T)) + ( is-coherently-invertible-comp + ( map-inv-is-coherently-invertible G) + ( f) + ( is-coherently-invertible-map-inv-is-coherently-invertible G) + ( F)) +``` + +#### If a composite and its right factor are coherently invertible, then so is its left factor + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3} + where + + is-coherently-invertible-left-factor : + (g : B → X) (h : A → B) → + is-coherently-invertible (g ∘ h) → + is-coherently-invertible h → + is-coherently-invertible g + is-coherently-invertible-left-factor g h GH H = + is-coherently-invertible-right-map-triangle (g ∘ h) g h refl-htpy GH H +``` + +#### If a composite and its left factor are coherently invertible, then so is its right factor + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {X : UU l3} + where + + is-coherently-invertible-right-factor : + (g : B → X) (h : A → B) → + is-coherently-invertible g → + is-coherently-invertible (g ∘ h) → + is-coherently-invertible h + is-coherently-invertible-right-factor g h G GH = + is-coherently-invertible-top-map-triangle (g ∘ h) g h refl-htpy G GH +``` + +### Any section of a coherently invertible map is coherently invertible + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-coherently-invertible-is-section : + {f : A → B} {g : B → A} → + is-coherently-invertible f → f ∘ g ~ id → is-coherently-invertible g + is-coherently-invertible-is-section {f = f} {g} F H = + is-coherently-invertible-top-map-triangle id f g + ( inv-htpy H) + ( F) + ( is-coherently-invertible-id) +``` + +### Any retraction of a coherently invertible map is coherently invertible + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-coherently-invertible-is-retraction : + {f : A → B} {g : B → A} → + is-coherently-invertible f → (g ∘ f) ~ id → is-coherently-invertible g + is-coherently-invertible-is-retraction {f = f} {g} F H = + is-coherently-invertible-right-map-triangle id g f + ( inv-htpy H) + ( is-coherently-invertible-id) + ( F) +``` + +### If a section of `f` is coherently invertible, then `f` is coherently invertible + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) + where + + is-coherently-invertible-is-coherently-invertible-section : + (s : section f) → + is-coherently-invertible (map-section f s) → is-coherently-invertible f + is-coherently-invertible-is-coherently-invertible-section (g , G) S = + is-coherently-invertible-is-retraction S G +``` + +### If a retraction of `f` is coherently invertible, then `f` is coherently invertible + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) + where abstract - is-coherently-invertible-is-invertible : - (H : is-invertible f) → is-coherently-invertible f - pr1 (is-coherently-invertible-is-invertible H) = - map-inv-is-invertible H - pr1 (pr2 (is-coherently-invertible-is-invertible H)) = - is-section-map-inv-is-invertible H - pr1 (pr2 (pr2 (is-coherently-invertible-is-invertible H))) = - is-retraction-map-inv-is-invertible H - pr2 (pr2 (pr2 (is-coherently-invertible-is-invertible H))) = - coherence-map-inv-is-invertible H + is-coherently-invertible-is-coherently-invertible-retraction : + (r : retraction f) → + is-coherently-invertible (map-retraction f r) → is-coherently-invertible f + is-coherently-invertible-is-coherently-invertible-retraction (g , G) R = + is-coherently-invertible-is-section R G +``` + +### Any section of a coherently invertible map is homotopic to its inverse + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : coherently-invertible-map A B) + where + + htpy-map-inv-coherently-invertible-map-section : + (f : section (map-coherently-invertible-map e)) → + map-inv-coherently-invertible-map e ~ + map-section (map-coherently-invertible-map e) f + htpy-map-inv-coherently-invertible-map-section = + htpy-map-inv-invertible-map-section + ( invertible-map-coherently-invertible-map e) ``` +### Any retraction of a coherently invertible map is homotopic to its inverse + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : coherently-invertible-map A B) + where + + htpy-map-inv-coherently-invertible-map-retraction : + (f : retraction (map-coherently-invertible-map e)) → + map-inv-coherently-invertible-map e ~ + map-retraction (map-coherently-invertible-map e) f + htpy-map-inv-coherently-invertible-map-retraction = + htpy-map-inv-invertible-map-retraction + ( invertible-map-coherently-invertible-map e) +``` + +## References + +1. Egbert Rijke, _Introduction to Homotopy Type Theory_ (2022) + ([arXiv:2212.11082](https://arxiv.org/abs/2212.11082)) +2. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations + of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/), + [arXiv:1308.0729](https://arxiv.org/abs/1308.0729)) + ## See also - For the notion of biinvertible maps see @@ -179,3 +1401,9 @@ module _ [`foundation.contractible-maps`](foundation.contractible-maps.md). - For the notion of path-split maps see [`foundation.path-split-maps`](foundation.path-split-maps.md). + +## External links + +- [Adjoint equivalences](https://1lab.dev/1Lab.Equiv.HalfAdjoint.html) at 1lab +- [adjoint equivalence](https://ncatlab.org/nlab/show/adjoint+equivalence) at + $n$Lab diff --git a/src/foundation-core/commuting-squares-of-homotopies.lagda.md b/src/foundation-core/commuting-squares-of-homotopies.lagda.md index 1af11c0a1d..7c3e1c6877 100644 --- a/src/foundation-core/commuting-squares-of-homotopies.lagda.md +++ b/src/foundation-core/commuting-squares-of-homotopies.lagda.md @@ -8,9 +8,11 @@ module foundation-core.commuting-squares-of-homotopies where ```agda open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition -open import foundation-core.equivalences +open import foundation-core.commuting-squares-of-identifications open import foundation-core.homotopies +open import foundation-core.whiskering-homotopies-concatenation ``` @@ -51,3 +53,1638 @@ module _ coherence-square-homotopies' = top ∙h right ~ left ∙h bottom ``` + +### Horizontally constant squares + +{{#concept "Horizontally constant squares" Disambiguation="homotopies" Agda=horizontal-refl-coherence-square-homotopies}} +are commuting squares of homotopies of the form + +```text + refl-htpy + f ----------> f + | | + H | | H + ∨ ∨ + g ----------> g. + refl-htpy +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g : (x : A) → B x} (H : f ~ g) + where + + horizontal-refl-coherence-square-homotopies : + coherence-square-homotopies refl-htpy H H refl-htpy + horizontal-refl-coherence-square-homotopies x = + horizontal-refl-coherence-square-identifications (H x) +``` + +### Vertically constant squares + +{{#concept "Vertically constant squares" Disambiguation="homotopies" Agda=vertical-refl-coherence-square-homotopies}} +are commuting squares of homotopies of the form + +```text + H + f -----> g + | | + refl-htpy | | refl-htpy + ∨ ∨ + f -----> g. + H +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g : (x : A) → B x} (H : f ~ g) + where + + vertical-refl-coherence-square-homotopies : + coherence-square-homotopies H refl-htpy refl-htpy H + vertical-refl-coherence-square-homotopies x = + vertical-refl-coherence-square-identifications (H x) +``` + +## Operations + +### Inverting squares of homotopies horizontally + +Given a commuting square of homotopies + +```text + top + f -------> g + | | + left | | right + ∨ ∨ + h -------> i, + bottom +``` + +the square of homotopies + +```text + top⁻¹ + g ------------> f + | | + right | | left + ∨ ∨ + i ------------> h + bottom⁻¹ +``` + +commutes. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + where + + horizontal-inv-coherence-square-homotopies : + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + coherence-square-homotopies top left right bottom → + coherence-square-homotopies (inv-htpy top) right left (inv-htpy bottom) + horizontal-inv-coherence-square-homotopies top left right bottom H x = + horizontal-inv-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) +``` + +### Inverting squares of homotopies vertically + +Given a commuting square of homotopies + +```text + top + f -------> g + | | + left | | right + ∨ ∨ + h -------> i, + bottom +``` + +the square of homotopies + +```text + bottom + h -------> i + | | + left⁻¹ | | right⁻¹ + ∨ ∨ + f -------> g + top +``` + +commutes. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + where + + vertical-inv-coherence-square-homotopies : + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + coherence-square-homotopies top left right bottom → + coherence-square-homotopies bottom (inv-htpy left) (inv-htpy right) top + vertical-inv-coherence-square-homotopies top left right bottom H x = + vertical-inv-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) +``` + +### Functions acting on squares of homotopies + +Given a commuting square of homotopies + +```text + top + f -------> g + | | + left | | right + ∨ ∨ + h -------> i + bottom +``` + +in `(x : A) → B x`, and given a dependent map `F : {x : A} → B x → C x`, the +square of homotopies + +```text + F ·l top + f f -----------> f g + | | + F ·l left | | F ·l right + ∨ ∨ + h -------------> i + F ·l bottom +``` + +commutes. + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3} + {f g h i : (x : A) → B x} + (F : {x : A} → B x → C x) + where + + map-coherence-square-homotopies : + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + coherence-square-homotopies top left right bottom → + coherence-square-homotopies + ( F ·l top) + ( F ·l left) + ( F ·l right) + ( F ·l bottom) + map-coherence-square-homotopies top left right bottom H x = + map-coherence-square-identifications + ( F) + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) +``` + +Similarly we may whisker it on the right. + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : B → UU l3} + {f g h i : (y : B) → C y} + where + + right-whisker-comp-coherence-square-homotopies : + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + (F : A → B) → + coherence-square-homotopies top left right bottom → + coherence-square-homotopies + ( top ·r F) + ( left ·r F) + ( right ·r F) + ( bottom ·r F) + right-whisker-comp-coherence-square-homotopies top left right bottom F α = + α ·r F +``` + +### Concatenating homotopies of edges and coherences of commuting squares of homotopies + +Consider a commuting square of homotopies and a homotopy of one of the four +sides with another homotopy, as for example in the diagram below: + +```text + top + a ---------> b + | | | + left | right |~| right' + ∨ ∨ ∨ + c ---------> d. + bottom +``` + +Then any homotopy witnessing that the square commutes can be concatenated with +the homotopy on the side, to obtain a new commuting square of homotopies. + +**Note.** To avoid cyclic module dependencies we will give direct proofs that +concatenating homotopies of edges of a square with the coherence of its +commutativity is an equivalence. + +#### Concatenating homotopies of the top edge with a coherence of a commuting square of homotopies + +Consider a commuting diagram of homotopies + +```text + top' + -------> + f -------> g + | top | + left | | right + ∨ ∨ + h -------> i. + bottom +``` + +with a homotopy `top ~ top'`. Then we get maps back and forth + +```text + top top' + f -------> g f -------> g + | | | | + left | | right ↔ left | | right + ∨ ∨ ∨ ∨ + h -------> i h -------> i. + bottom bottom +``` + +We record that this construction is an equivalence in +[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md). + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + {top' : f ~ g} (s : top ~ top') + where + + concat-top-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom → + coherence-square-homotopies top' left right bottom + concat-top-homotopy-coherence-square-homotopies H x = + concat-top-identification-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( s x) + ( H x) + + inv-concat-top-homotopy-coherence-square-homotopies : + coherence-square-homotopies top' left right bottom → + coherence-square-homotopies top left right bottom + inv-concat-top-homotopy-coherence-square-homotopies H x = + inv-concat-top-identification-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( s x) + ( H x) +``` + +#### Concatenating homotopies of the left edge with a coherence of a commuting square of homotopies + +Consider a commuting diagram of homotopies + +```text + top + f -------> g + | | | + left' | | left | right + ∨ ∨ ∨ + h -------> i. + bottom +``` + +with a homotopy `left ~ left'`. Then we get maps back and forth + +```text + top top + f -------> g f -------> g + | | | | + left | | right ↔ left' | | right + ∨ ∨ ∨ ∨ + h -------> i h -------> i. + bottom bottom +``` + +We record that this construction is an equivalence in +[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md). + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + {left' : f ~ h} (s : left ~ left') + where + + concat-left-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom → + coherence-square-homotopies top left' right bottom + concat-left-homotopy-coherence-square-homotopies H x = + concat-left-identification-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( s x) + ( H x) + + inv-concat-left-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left' right bottom → + coherence-square-homotopies top left right bottom + inv-concat-left-homotopy-coherence-square-homotopies H x = + inv-concat-left-identification-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( s x) + ( H x) +``` + +#### Concatenating homotopies of the right edge with a coherence of a commuting square of homotopies + +Consider a commuting diagram of homotopies + +```text + top + f -------> g + | | | + left | right | | right' + ∨ ∨ ∨ + h -------> i. + bottom +``` + +with a homotopy `right ~ right'`. Then we get maps back and forth + +```text + top top + f -------> g f -------> g + | | | | + left | | right ↔ left | | right' + ∨ ∨ ∨ ∨ + h -------> i h -------> i. + bottom bottom +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + {right' : g ~ i} (s : right ~ right') + where + + concat-right-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom → + coherence-square-homotopies top left right' bottom + concat-right-homotopy-coherence-square-homotopies H x = + concat-right-identification-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( s x) + ( H x) + + inv-concat-right-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right' bottom → + coherence-square-homotopies top left right bottom + inv-concat-right-homotopy-coherence-square-homotopies H x = + inv-concat-right-identification-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( s x) + ( H x) +``` + +We record that this construction is an equivalence in +[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md). + +#### Concatenating homotopies of the bottom edge with a coherence of a commuting square of homotopies + +Consider a commuting diagram of homotopies + +```text + top + f -------> g + | | + left | | right + ∨ bottom ∨ + h -------> i. + -------> + bottom' +``` + +with a homotopy `bottom ~ bottom'`. Then we get maps back and forth + +```text + top top + f -------> g f -------> g + | | | | + left | | right ↔ left | | right + ∨ ∨ ∨ ∨ + h -------> i h -------> i. + bottom bottom' +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + {bottom' : h ~ i} (s : bottom ~ bottom') + where + + concat-bottom-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom → + coherence-square-homotopies top left right bottom' + concat-bottom-homotopy-coherence-square-homotopies H x = + concat-bottom-identification-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( s x) + ( H x) + + inv-concat-bottom-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom' → + coherence-square-homotopies top left right bottom + inv-concat-bottom-homotopy-coherence-square-homotopies H x = + inv-concat-bottom-identification-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( s x) + ( H x) +``` + +We record that this construction is an equivalence in +[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md). + +### Whiskering and splicing coherences of commuting squares of homotopies with respect to concatenation of homotopies + +Given a commuting square of homotopies + +```text + top + f -------> g + | | + left | | right + ∨ ∨ + h -------> i, + bottom +``` + +we may consider four ways of attaching new homotopies to it: + +1. Prepending `H : u ~ f` to the left gives us a commuting square + + ```text + H ∙h top + u -------> g + | | + H ∙h left | | right + ∨ ∨ + h -------> i. + bottom + ``` + + More precisely, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ ((H ∙h left) ∙h bottom ~ (H ∙h top) ∙h right). + ``` + +2. Appending a homotopy `H : i ~ u` to the right gives a commuting square of + homotopies + + ```text + top + f ------------> g + | | + left | | right ∙h H + ∨ ∨ + h ------------> u. + bottom ∙h H + ``` + + More precisely, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ (left ∙h (bottom ∙h H) ~ top ∙h (right ∙h H)). + ``` + +3. Splicing a homotopy `H : h ~ u` and its inverse into the middle gives a + commuting square of homotopies + + ```text + top + f --------------> g + | | + left ∙h H | | right + ∨ ∨ + u --------------> i. + H⁻¹ ∙h bottom + ``` + + More precisely, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ ((left ∙h H) ∙h (H⁻¹ ∙h bottom) ~ top ∙h right). + ``` + + Similarly, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ ((left ∙h H⁻¹) ∙h (H ∙h bottom) ~ top ∙h right). + ``` + +4. Splicing a homotopy `H : g ~ u` and its inverse into the middle gives a + commuting square of homotopies + + ```text + top ∙h H + f --------> u + | | + left | | H⁻¹ ∙h right + ∨ ∨ + h --------> i. + bottom + ``` + + More precisely, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ (left ∙h bottom ~ (top ∙h H) ∙h (H⁻¹ ∙h right)). + ``` + + Similarly, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ (left ∙h bottom ~ (top ∙h H⁻¹) ∙h (H ∙h right)). + ``` + +These operations are useful in proofs involving homotopy algebra, because taking +`equiv-right-whisker-concat-coherence-square-homotopies` as an example, it +provides us with two maps: the forward direction states +`(H ∙h r ~ K ∙h s) → (H ∙h (r ∙h t)) ~ K ∙h (s ∙h t))`, which allows one to +append a homotopy without needing to reassociate on the right, and the backwards +direction conversely allows one to cancel out a homotopy in parentheses. + +#### Left whiskering coherences of commuting squares of homotopies + +For any homotopy `H : u ~ f` we obtain maps back and forth + +```text + top H ∙h top + f -------> g u -------> g + | | | | + left | | right ↔ H ∙h left | | right + ∨ ∨ ∨ ∨ + h -------> i h -------> i + bottom bottom +``` + +of coherences of commuting squares of homotopies. We show in +[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md) +that these maps are equivalences. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + where + + left-whisker-concat-coherence-square-homotopies : + {u : (x : A) → B x} (H : u ~ f) + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + coherence-square-homotopies top left right bottom → + coherence-square-homotopies (H ∙h top) (H ∙h left) right bottom + left-whisker-concat-coherence-square-homotopies + H top left right bottom coh x = + left-whisker-concat-coherence-square-identifications + ( H x) + ( top x) + ( left x) + ( right x) + ( bottom x) + ( coh x) + + left-unwhisker-concat-coherence-square-homotopies : + {u : (x : A) → B x} (H : u ~ f) + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + coherence-square-homotopies (H ∙h top) (H ∙h left) right bottom → + coherence-square-homotopies top left right bottom + left-unwhisker-concat-coherence-square-homotopies + H top left right bottom coh x = + left-unwhisker-concat-coherence-square-identifications + ( H x) + ( top x) + ( left x) + ( right x) + ( bottom x) + ( coh x) +``` + +#### Right whiskering coherences of commuting squares of homotopies + +For any homotopy `H : i ~ u` we obtain maps back and forth + +```text + top top + f -------> g f ------------> g + | | | | + left | | right ↔ left | | right ∙h H + ∨ ∨ ∨ ∨ + h -------> i h ------------> i + bottom bottom ∙h H +``` + +of coherences of commuting squares of homotopies. We show in +[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md) +that these maps are equivalences. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + where + + right-whisker-concat-coherence-square-homotopies : + coherence-square-homotopies top left right bottom → + {u : (x : A) → B x} (H : i ~ u) → + coherence-square-homotopies top left (right ∙h H) (bottom ∙h H) + right-whisker-concat-coherence-square-homotopies coh H x = + right-whisker-concat-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( coh x) + ( H x) + + right-unwhisker-cohernece-square-homotopies : + {u : (x : A) → B x} (H : i ~ u) → + coherence-square-homotopies top left (right ∙h H) (bottom ∙h H) → + coherence-square-homotopies top left right bottom + right-unwhisker-cohernece-square-homotopies H coh x = + right-unwhisker-cohernece-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) + ( coh x) +``` + +### Double whiskering of commuting squares of homotopies + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h u v i : (x : A) → B x} + where + + double-whisker-coherence-square-homotopies : + (p : f ~ g) + (top : g ~ u) (left : g ~ h) (right : u ~ v) (bottom : h ~ v) + (s : v ~ i) → + coherence-square-homotopies top left right bottom → + coherence-square-homotopies + ( p ∙h top) + ( p ∙h left) + ( right ∙h s) + ( bottom ∙h s) + double-whisker-coherence-square-homotopies p top left right bottom q H = + left-whisker-concat-coherence-square-homotopies p top left + ( right ∙h q) + ( bottom ∙h q) + ( right-whisker-concat-coherence-square-homotopies + ( top) + ( left) + ( right) + ( bottom) + ( H) + ( q)) +``` + +#### Left splicing coherences of commuting squares of homotopies + +For any inverse pair of homotopies `H : g ~ u` and `K : u ~ g` equipped with +`α : inv-htpy H ~ K` we obtain maps back and forth + +```text + top top + f -------> g f -----------> g + | | | | + left | | right ↔ left ∙h H | | right + ∨ ∨ ∨ ∨ + h -------> i u -----------> i + bottom K ∙h bottom +``` + +of coherences of commuting squares of homotopies. We show in +[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md) +that these maps are equivalences. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + where + + left-splice-coherence-square-homotopies : + {u : (x : A) → B x} (H : h ~ u) (K : u ~ h) (α : inv-htpy H ~ K) → + coherence-square-homotopies top left right bottom → + coherence-square-homotopies top (left ∙h H) right (K ∙h bottom) + left-splice-coherence-square-homotopies H K α coh x = + left-splice-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) + ( K x) + ( α x) + ( coh x) + + left-unsplice-coherence-square-homotopies : + {u : (x : A) → B x} (H : h ~ u) (K : u ~ h) (α : inv-htpy H ~ K) → + coherence-square-homotopies top (left ∙h H) right (K ∙h bottom) → + coherence-square-homotopies top left right bottom + left-unsplice-coherence-square-homotopies H K α coh x = + left-unsplice-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) + ( K x) + ( α x) + ( coh x) +``` + +#### Right splicing coherences of commuting squares of homotopies + +For any inverse pair of homotopies `H : g ~ u` and `K : u ~ g` equipped with +`α : inv-htpy H ~ K` we obtain maps back and forth + +```text + top top ∙h H + f -------> g f --------> u + | | | | + left | | right ↔ left | | K ∙h right + ∨ ∨ ∨ ∨ + h -------> i h --------> i + bottom bottom +``` + +of coherences of commuting squares of homotopies. We show in +[`foundation.commuting-squares-of-homotopies`](foundation.commuting-squares-of-homotopies.md) +that these maps are equivalences. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + where + + right-splice-coherence-square-homotopies : + {u : (x : A) → B x} (H : g ~ u) (K : u ~ g) (α : inv-htpy H ~ K) → + coherence-square-homotopies top left right bottom → + coherence-square-homotopies (top ∙h H) left (inv-htpy H ∙h right) bottom + right-splice-coherence-square-homotopies H K α coh x = + right-splice-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) + ( K x) + ( α x) + ( coh x) + + right-unsplice-coherence-square-homotopies : + {u : (x : A) → B x} (H : g ~ u) (K : u ~ g) (α : inv-htpy H ~ K) → + coherence-square-homotopies (top ∙h H) left (inv-htpy H ∙h right) bottom → + coherence-square-homotopies top left right bottom + right-unsplice-coherence-square-homotopies H K α coh x = + right-unsplice-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) + ( K x) + ( α x) + ( coh x) +``` + +### Horizontally pasting squares of homotopies + +Consider two squares of homotopies as in the diagram + +```text + top-left top-right + a -------------> b -------------> c + | | | + left | | middle | right + ∨ ∨ ∨ + d -------------> e -------------> f + bottom-left bottom-right +``` + +with `H : left ∙h bottom-left ~ top-left ∙h middle` and +`K : middle ∙h bottom-right ~ top-right ∙h right`. Then the outer square +commutes. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {a b c d e f : (x : A) → B x} + (top-left : a ~ b) (top-right : b ~ c) + (left : a ~ d) (middle : b ~ e) (right : c ~ f) + (bottom-left : d ~ e) (bottom-right : e ~ f) + where + + horizontal-pasting-coherence-square-homotopies : + coherence-square-homotopies top-left left middle bottom-left → + coherence-square-homotopies top-right middle right bottom-right → + coherence-square-homotopies + (top-left ∙h top-right) left right (bottom-left ∙h bottom-right) + horizontal-pasting-coherence-square-homotopies H K x = + horizontal-pasting-coherence-square-identifications + ( top-left x) + ( top-right x) + ( left x) + ( middle x) + ( right x) + ( bottom-left x) + ( bottom-right x) + ( H x) + ( K x) +``` + +### Vertically pasting squares of homotopies + +Consider two squares of homotopies as in the diagram + +```text + top + a --------> b + | | + top-left | | top-right + ∨ middle ∨ + c --------> d + | | + bottom-left | | bottom-right + ∨ ∨ + e --------> f + bottom +``` + +with `H : top-left ∙h middle ~ top ∙h top-right` and +`K : bottom-left ∙h bottom ~ middle ∙h bottom-right`. Then the outer square +commutes. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {a b c d e f : (x : A) → B x} + (top : a ~ b) (top-left : a ~ c) (top-right : b ~ d) + (middle : c ~ d) (bottom-left : c ~ e) (bottom-right : d ~ f) + (bottom : e ~ f) + where + + vertical-pasting-coherence-square-homotopies : + coherence-square-homotopies top top-left top-right middle → + coherence-square-homotopies middle bottom-left bottom-right bottom → + coherence-square-homotopies + top (top-left ∙h bottom-left) (top-right ∙h bottom-right) bottom + vertical-pasting-coherence-square-homotopies H K x = + vertical-pasting-coherence-square-identifications + ( top x) + ( top-left x) + ( top-right x) + ( middle x) + ( bottom-left x) + ( bottom-right x) + ( bottom x) + ( H x) + ( K x) +``` + +## Properties + +### Left unit law for horizontal pasting of commuting squares of homotopies + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + where + + left-unit-law-horizontal-pasting-coherence-square-homotopies : + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + (H : coherence-square-homotopies top left right bottom) → + horizontal-pasting-coherence-square-homotopies + ( refl-htpy) + ( top) + ( left) + ( left) + ( right) + ( refl-htpy) + ( bottom) + ( horizontal-refl-coherence-square-homotopies left) + ( H) ~ + H + left-unit-law-horizontal-pasting-coherence-square-homotopies + top left right bottom H x = + left-unit-law-horizontal-pasting-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) +``` + +### Right unit law for horizontal pasting of commuting squares of homotopies + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + where + + right-unit-law-horizontal-pasting-coherence-square-homotopies : + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + (H : coherence-square-homotopies top left right bottom) → + horizontal-pasting-coherence-square-homotopies + ( top) + ( refl-htpy) + ( left) + ( right) + ( right) + ( bottom) + ( refl-htpy) + ( H) + ( horizontal-refl-coherence-square-homotopies right) ∙h + right-whisker-concat-htpy right-unit-htpy right ~ + left-whisker-concat-htpy left right-unit-htpy ∙h H + right-unit-law-horizontal-pasting-coherence-square-homotopies + top left right bottom H x = + right-unit-law-horizontal-pasting-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) +``` + +### Left unit law for vertical pasting of commuting squares of homotopies + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + where + + left-unit-law-vertical-pasting-coherence-square-homotopies : + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + (H : coherence-square-homotopies top left right bottom) → + vertical-pasting-coherence-square-homotopies + ( top) + ( refl-htpy) + ( refl-htpy) + ( top) + ( left) + ( right) + ( bottom) + ( vertical-refl-coherence-square-homotopies top) + ( H) ~ + H + left-unit-law-vertical-pasting-coherence-square-homotopies + top left right bottom H x = + left-unit-law-vertical-pasting-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) +``` + +### Right unit law for vertical pasting of commuting squares of homotopies + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + where + + right-unit-law-vertical-pasting-coherence-square-homotopies : + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + (H : coherence-square-homotopies top left right bottom) → + vertical-pasting-coherence-square-homotopies + ( top) + ( left) + ( right) + ( bottom) + ( refl-htpy) + ( refl-htpy) + ( bottom) + ( H) + ( vertical-refl-coherence-square-homotopies bottom) ∙h + left-whisker-concat-htpy top right-unit-htpy ~ + right-whisker-concat-htpy right-unit-htpy bottom ∙h H + right-unit-law-vertical-pasting-coherence-square-homotopies + top left right bottom H x = + right-unit-law-vertical-pasting-coherence-square-identifications + ( top x) + ( left x) + ( right x) + ( bottom x) + ( H x) +``` + +### Computing the right whiskering of a vertically constant square with a homotopy + +Consider the vertically constant square of homotopies + +```text + H + f -----> g + | | + refl | | refl + ∨ ∨ + f -----> g + H +``` + +at a homotopy `H : f ~ g`, and consider a homotopy `K : g ~ h`. Then the right +whiskering of the above square with `K` is the commuting square of homotopies + +```text + H + f -------> g + | | + refl | refl | K + ∨ ∨ + f -------> h + H ∙h K +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x} + where + + right-whisker-concat-vertical-refl-coherence-square-homotopies : + (H : f ~ g) (K : g ~ h) → + right-whisker-concat-coherence-square-homotopies H refl-htpy refl-htpy H + ( vertical-refl-coherence-square-homotopies H) + ( K) ~ + refl-htpy + right-whisker-concat-vertical-refl-coherence-square-homotopies H K x = + right-whisker-concat-vertical-refl-coherence-square-identifications + ( H x) + ( K x) +``` + +### Computing the right whiskering of a horizontally constant square with a homotopy + +Consider a horizontally constant commuting square of homotopies + +```text + refl-htpy + f ----------> f + | | + H | | H + ∨ ∨ + g ----------> g + refl-htpy +``` + +at a homotopy `H` and consider a homotopy `K : g ~ h`. Then the right whiskering +of the above square with `K` is the square + +```text + refl-htpy + f ----------> f + | | + H | refl-htpy | H ∙h K + ∨ ∨ + g ----------> h. + K +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x} + where + + right-whisker-concat-horizontal-refl-coherence-square-homotopies : + (H : f ~ g) (K : g ~ h) → + right-whisker-concat-coherence-square-homotopies refl-htpy H H refl-htpy + ( horizontal-refl-coherence-square-homotopies H) + ( K) ~ + refl-htpy + right-whisker-concat-horizontal-refl-coherence-square-homotopies H K x = + right-whisker-concat-horizontal-refl-coherence-square-identifications + ( H x) + ( K x) +``` + +### Computing the left whiskering of a horizontally constant square with a homotopy + +Consider a homotopy `H : f ~ g` and a horizontally constant commuting square of +homotopies + +```text + refl-htpy + g ----------> g + | | + K | | K + ∨ ∨ + h ----------> h + refl-htpy +``` + +at a homotopy `K : g ~ h`. The the left whiskering of the above square with `H` +is the commuting square + +```text + K ∙h refl-htpy + f -----------------------------------------------------------------> g + | | + K ∙h H | right-unit-htpy ∙h (right-whisker-concat-htpy right-unit-htpy H)⁻¹ | H + ∨ ∨ + h -----------------------------------------------------------------> h. + refl-htpy +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x} + where + + left-whisker-concat-horizontal-refl-coherence-square-homotopies : + (H : f ~ g) (K : g ~ h) → + left-whisker-concat-coherence-square-homotopies H refl-htpy K K refl-htpy + ( horizontal-refl-coherence-square-homotopies K) ∙h + right-whisker-concat-htpy right-unit-htpy K ~ + right-unit-htpy + left-whisker-concat-horizontal-refl-coherence-square-homotopies H K x = + left-whisker-concat-horizontal-refl-coherence-square-identifications + ( H x) + ( K x) + + left-whisker-concat-horizontal-refl-coherence-square-homotopies' : + (H : f ~ g) (K : g ~ h) → + left-whisker-concat-coherence-square-homotopies H refl-htpy K K refl-htpy + ( horizontal-refl-coherence-square-homotopies K) ~ + right-unit-htpy ∙h inv-htpy (right-whisker-concat-htpy right-unit-htpy K) + left-whisker-concat-horizontal-refl-coherence-square-homotopies' H K x = + left-whisker-concat-horizontal-refl-coherence-square-identifications' + ( H x) + ( K x) +``` + +### Computing the left whiskering of a vertically constant square with a homotopy + +Consider the vertically constant square of homotopies + +```text + K + g -----> h + | | + refl-htpy | | refl-htpy + ∨ ∨ + g -----> h + K +``` + +at a homotopy `K : g ~ h` and consider a homotopy `H : f ~ g`. Then the left +whiskering of the above square with `H` is the square + +```text + H ∙h K + f ----------------------------------------------------------> h + | | + H ∙h refl-htpy | right-whisker-concat-htpy right-unit-htpy K ∙h right-unit⁻¹ | refl-htpy + ∨ ∨ + g ----------------------------------------------------------> h. + K +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h : (x : A) → B x} + where + + left-whisker-concat-vertical-refl-coherence-square-homotopies : + (H : f ~ g) (K : g ~ h) → + left-whisker-concat-coherence-square-homotopies H K refl-htpy refl-htpy K + ( vertical-refl-coherence-square-homotopies K) ∙h + right-unit-htpy ~ + right-whisker-concat-htpy right-unit-htpy K + left-whisker-concat-vertical-refl-coherence-square-homotopies H K x = + left-whisker-concat-vertical-refl-coherence-square-identifications + ( H x) + ( K x) + + left-whisker-concat-vertical-refl-coherence-square-homotopies' : + (H : f ~ g) (K : g ~ h) → + left-whisker-concat-coherence-square-homotopies H K refl-htpy refl-htpy K + ( vertical-refl-coherence-square-homotopies K) ~ + right-whisker-concat-htpy right-unit-htpy K ∙h inv-htpy right-unit-htpy + left-whisker-concat-vertical-refl-coherence-square-homotopies' H K x = + left-whisker-concat-vertical-refl-coherence-square-identifications' + ( H x) + ( K x) +``` + +### Left whiskering horizontal concatenations of squares with homotopies + +Consider a commuting diagram of homotopies of the form + +```text + top-left top-right + a -------------> c -------------> e + | | | + left | | middle | right + ∨ ∨ ∨ + b -------------> d -------------> f + bottom-left bottom-right +``` + +and consider a homotopy `H : f ~ a`. Then the left whiskering of `H` and the +horizontal concatenation of coherences of commuting squares is up to +associativity the horizontal concatenation of the squares + +```text + H ∙h top-left top-right + u -------------> c -------------> e + | | | + H ∙h left | | middle | right + ∨ ∨ ∨ + b -------------> d -------------> f + bottom-left bottom-right +``` + +where the left square is the left whiskering of `H` and the original left +square. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + left-whisker-concat-horizontal-pasting-coherence-square-homotopies : + {u a b c d e f : (x : A) → B x} (H : u ~ a) + (top-left : a ~ c) (top-right : c ~ e) + (left : a ~ b) (middle : c ~ d) (right : e ~ f) + (bottom-left : b ~ d) (bottom-right : d ~ f) + (l : coherence-square-homotopies top-left left middle bottom-left) + (r : coherence-square-homotopies top-right middle right bottom-right) → + left-whisker-concat-coherence-square-homotopies H + ( top-left ∙h top-right) + ( left) + ( right) + ( bottom-left ∙h bottom-right) + ( horizontal-pasting-coherence-square-homotopies + ( top-left) + ( top-right) + ( left) + ( middle) + ( right) + ( bottom-left) + ( bottom-right) + ( l) + ( r)) ~ + horizontal-pasting-coherence-square-homotopies + ( H ∙h top-left) + ( top-right) + ( H ∙h left) + ( middle) + ( right) + ( bottom-left) + ( bottom-right) + ( left-whisker-concat-coherence-square-homotopies H + ( top-left) + ( left) + ( middle) + ( bottom-left) + ( l)) + ( r) ∙h + right-whisker-concat-htpy + ( assoc-htpy H top-left top-right) + ( right) + left-whisker-concat-horizontal-pasting-coherence-square-homotopies + H top-left top-right left middle right bottom-left bottom-right l r x = + left-whisker-concat-horizontal-pasting-coherence-square-identifications + ( H x) + ( top-left x) + ( top-right x) + ( left x) + ( middle x) + ( right x) + ( bottom-left x) + ( bottom-right x) + ( l x) + ( r x) +``` + +### Left whiskering vertical concatenations of squares with homotopies + +Consider two squares of homotopies as in the diagram + +```text + top + a --------> b + | | + top-left | | top-right + ∨ middle ∨ + c --------> d + | | + bottom-left | | bottom-right + ∨ ∨ + e --------> f + bottom +``` + +and consider a homotopy `H : f ~ a`. Then the left whiskering of `H` with the +vertical pasting of the two squares above is up to associativity the vertical +pasting of the squares + +```text + H ∙h top + u --------> b + | | + H ∙h top-left | | top-right + ∨ middle ∨ + c --------> d + | | + bottom-left | | bottom-right + ∨ ∨ + e --------> f. + bottom +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + left-whisker-concat-vertical-concat-coherence-square-homotopies : + {u a b c d e f : (x : A) → B x} (H : u ~ a) → + (top : a ~ b) (top-left : a ~ c) (top-right : b ~ d) (middle : c ~ d) + (bottom-left : c ~ e) (bottom-right : d ~ f) (bottom : e ~ f) + (t : coherence-square-homotopies top top-left top-right middle) → + (b : + coherence-square-homotopies middle bottom-left bottom-right bottom) → + right-whisker-concat-htpy (assoc-htpy H top-left bottom-left) bottom ∙h + left-whisker-concat-coherence-square-homotopies H + ( top) + ( top-left ∙h bottom-left) + ( top-right ∙h bottom-right) + ( bottom) + ( vertical-pasting-coherence-square-homotopies + ( top) + ( top-left) + ( top-right) + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( t) + ( b)) ~ + vertical-pasting-coherence-square-homotopies + ( H ∙h top) + ( H ∙h top-left) + ( top-right) + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( left-whisker-concat-coherence-square-homotopies H + ( top) + ( top-left) + ( top-right) + ( middle) + ( t)) + ( b) + left-whisker-concat-vertical-concat-coherence-square-homotopies + H top top-left top-right middle bottom-left bottom-right bottom t b x = + left-whisker-concat-vertical-concat-coherence-square-identifications + ( H x) + ( top x) + ( top-left x) + ( top-right x) + ( middle x) + ( bottom-left x) + ( bottom-right x) + ( bottom x) + ( t x) + ( b x) +``` + +### Right whiskering horizontal pastings of commuting squares of homotopies + +Consider a commuting diagram of homotopies of the form + +```text + top-left top-right + a -------------> c -------------> e + | | | + left | | middle | right + ∨ ∨ ∨ + b -------------> d -------------> f + bottom-left bottom-right +``` + +and consider a homotopy `K : f ~ g`. Then the right whiskering of the horizontal +pasting of the squares above is up to associativity the horizontal pasting of +the squares + +```text + top-left top-right + a -------------> c ------------------> e + | | | + left | | middle | right ∙h K + ∨ ∨ ∨ + b -------------> d ------------------> g + bottom-left bottom-right ∙h K +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + right-whisker-concat-horizontal-pasting-coherence-square-homotopies : + {a b c d e f g : (x : A) → B x} + (top-left : a ~ c) (top-right : c ~ e) + (left : a ~ b) (middle : c ~ d) (right : e ~ f) + (bottom-left : b ~ d) (bottom-right : d ~ f) + (l : coherence-square-homotopies top-left left middle bottom-left) → + (r : coherence-square-homotopies top-right middle right bottom-right) → + (K : f ~ g) → + right-whisker-concat-coherence-square-homotopies + ( top-left ∙h top-right) + ( left) + ( right) + ( bottom-left ∙h bottom-right) + ( horizontal-pasting-coherence-square-homotopies + ( top-left) + ( top-right) + ( left) + ( middle) + ( right) + ( bottom-left) + ( bottom-right) + ( l) + ( r)) + ( K) ~ + left-whisker-concat-htpy left (assoc-htpy bottom-left bottom-right K) ∙h + horizontal-pasting-coherence-square-homotopies + ( top-left) + ( top-right) + ( left) + ( middle) + ( right ∙h K) + ( bottom-left) + ( bottom-right ∙h K) + ( l) + ( right-whisker-concat-coherence-square-homotopies + ( top-right) + ( middle) + ( right) + ( bottom-right) + ( r) + ( K)) + right-whisker-concat-horizontal-pasting-coherence-square-homotopies + top-left top-right left middle right bottom-left bottom-right l r K x = + right-whisker-concat-horizontal-pasting-coherence-square-identifications + ( top-left x) + ( top-right x) + ( left x) + ( middle x) + ( right x) + ( bottom-left x) + ( bottom-right x) + ( l x) + ( r x) + ( K x) +``` + +### Right whiskering vertical concatenations of squares with homotopies + +Consider two squares of homotopies as in the diagram + +```text + top + a --------> b + | | + top-left | | top-right + ∨ middle ∨ + c --------> d + | | + bottom-left | | bottom-right + ∨ ∨ + e --------> f + bottom +``` + +and consider a homotopy `K : f ~ g`. Then the right whiskering of the vertical +pasting of the two squares above with `K` is up to associativity the vertical +pasting of the squares + +```text + top + a ------------> b + | | + top-left | | top-right + ∨ middle ∨ + c ------------> d + | | + bottom-left | | bottom-right ∙h K + ∨ ∨ + e ------------> g. + bottom ∙h K +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + right-whisker-concat-vertical-pasting-coherence-square-homotopies : + {a b c d e f g : (x : A) → B x} + (top : a ~ b) (top-left : a ~ c) (top-right : b ~ d) + (middle : c ~ d) + (bottom-left : c ~ e) (bottom-right : d ~ f) (bottom : e ~ f) + (t : coherence-square-homotopies top top-left top-right middle) → + (b : + coherence-square-homotopies middle bottom-left bottom-right bottom) → + (K : f ~ g) → + right-whisker-concat-coherence-square-homotopies + ( top) + ( top-left ∙h bottom-left) + ( top-right ∙h bottom-right) + ( bottom) + ( vertical-pasting-coherence-square-homotopies + ( top) + ( top-left) + ( top-right) + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( t) + ( b)) + ( K) ∙h + left-whisker-concat-htpy top (assoc-htpy top-right bottom-right K) ~ + vertical-pasting-coherence-square-homotopies + ( top) + ( top-left) + ( top-right) + ( middle) + ( bottom-left) + ( bottom-right ∙h K) + ( bottom ∙h K) + ( t) + ( right-whisker-concat-coherence-square-homotopies + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( b) + ( K)) + right-whisker-concat-vertical-pasting-coherence-square-homotopies + top top-left top-right middle bottom-left bottom-right bottom t b K x = + right-whisker-concat-vertical-pasting-coherence-square-identifications + ( top x) + ( top-left x) + ( top-right x) + ( middle x) + ( bottom-left x) + ( bottom-right x) + ( bottom x) + ( t x) + ( b x) + ( K x) +``` diff --git a/src/foundation-core/commuting-squares-of-identifications.lagda.md b/src/foundation-core/commuting-squares-of-identifications.lagda.md new file mode 100644 index 0000000000..a3d8f14744 --- /dev/null +++ b/src/foundation-core/commuting-squares-of-identifications.lagda.md @@ -0,0 +1,1579 @@ +# Commuting squares of identifications + +```agda +module foundation-core.commuting-squares-of-identifications where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.universe-levels + +open import foundation-core.function-types +open import foundation-core.identity-types +open import foundation-core.retractions +open import foundation-core.sections +open import foundation-core.whiskering-identifications-concatenation +``` + +
+ +## Idea + +A square of [identifications](foundation-core.identity-types.md) + +```text + top + x -------> y + | | + left | | right + ∨ ∨ + z -------> w + bottom +``` + +is said to be a +{{#concept "commuting square" Disambiguation="identifications" Agda=coherence-square-identifications}} +if there is an identification `left ∙ bottom = top ∙ right`. Such an +identification is called a +{{#concept "coherence" Disambiguation="commuting square of identifications" Agda=coherence-square-identifications}} +of the square. + +## Definitions + +### Commuting squares of identifications + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) + where + + coherence-square-identifications : UU l + coherence-square-identifications = left ∙ bottom = top ∙ right +``` + +### Horizontally constant squares + +{{#concept "Horizontally constant squares" Disambiguation="identifications" Agda=horizontal-refl-coherence-square-identifications}} +are commuting squares of identifications of the form + +```text + refl + a -----> a + | | + p | | p + ∨ ∨ + b -----> b. + refl +``` + +```agda +module _ + {l : Level} {A : UU l} {a b : A} (p : a = b) + where + + horizontal-refl-coherence-square-identifications : + coherence-square-identifications refl p p refl + horizontal-refl-coherence-square-identifications = right-unit +``` + +### Vertically constant squares + +{{#concept "Vertically constant squares" Disambiguation="identifications" Agda=vertical-refl-coherence-square-identifications}} +are commuting squares of identifications of the form + +```text + p + a -----> b + | | + refl | | refl + ∨ ∨ + a -----> b. + p +``` + +```agda +module _ + {l : Level} {A : UU l} {a b : A} (p : a = b) + where + + vertical-refl-coherence-square-identifications : + coherence-square-identifications p refl refl p + vertical-refl-coherence-square-identifications = inv right-unit +``` + +## Operations + +### Inverting squares of identifications horizontally + +Given a commuting square of identifications + +```text + top + x -------> y + | | + left | | right + ∨ ∨ + z -------> w, + bottom +``` + +the square of identifications + +```text + inv top + y ------------> x + | | + right | | left + ∨ ∨ + w ------------> z + inv bottom +``` + +commutes. + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + where + + horizontal-inv-coherence-square-identifications : + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → + coherence-square-identifications top left right bottom → + coherence-square-identifications (inv top) right left (inv bottom) + horizontal-inv-coherence-square-identifications refl left right bottom coh = + inv (right-transpose-eq-concat left bottom right coh) +``` + +### Inverting squares of identifications vertically + +Given a commuting square of identifications + +```text + top + x -------> y + | | + left | | right + ∨ ∨ + z -------> w, + bottom +``` + +the square of identifications + +```text + bottom + z -------> w + | | + inv left | | inv right + ∨ ∨ + x -------> y + top +``` + +commutes. + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + where + + vertical-inv-coherence-square-identifications : + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → + coherence-square-identifications top left right bottom → + coherence-square-identifications bottom (inv left) (inv right) top + vertical-inv-coherence-square-identifications top refl right bottom coh = + right-transpose-eq-concat top right (bottom) (inv coh) +``` + +### Functions acting on squares of identifications + +Given a commuting square of identifications + +```text + top + x -------> y + | | + left | | right + ∨ ∨ + z -------> w + bottom +``` + +in a type `A`, and given a map `f : A → B`, the square of identifications + +```text + ap f top + f x -----------> f y + | | + ap f left | | ap f right + ∨ ∨ + z -------------> w + ap f bottom +``` + +commutes. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {x y z w : A} (f : A → B) + where + + map-coherence-square-identifications : + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → + coherence-square-identifications top left right bottom → + coherence-square-identifications + ( ap f top) + ( ap f left) + ( ap f right) + ( ap f bottom) + map-coherence-square-identifications refl refl _ _ coh = ap (ap f) coh +``` + +### Concatenating identifications of edges and coherences of commuting squares of identifications + +Consider a commuting square of identifications and an identification of one of +the four sides with another identification, as for example in the diagram below: + +```text + top + a ---------> b + | | | + left | right |=| right' + ∨ ∨ ∨ + c ---------> d. + bottom +``` + +Then any identification witnessing that the square commutes can be concatenated +with the identification on the side, to obtain a new commuting square of +identifications. + +**Note.** To avoid cyclic module dependencies we will give direct proofs that +concatenating identifications of edges of a square with the coherence of its +commutativity is an equivalence. + +#### Concatenating identifications of the top edge with a coherence of a commuting square of identifications + +Consider a commuting diagram of identifications + +```text + top' + -------> + x -------> y + | top | + left | | right + ∨ ∨ + z -------> w. + bottom +``` + +with an identification `top = top'`. Then we get an equivalence + +```text + top top' + x -------> y x -------> y + | | | | + left | | right ≃ left | | right + ∨ ∨ ∨ ∨ + z -------> w z -------> w. + bottom bottom +``` + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) + {top' : x = y} (s : top = top') + where + + concat-top-identification-coherence-square-identifications : + coherence-square-identifications top left right bottom → + coherence-square-identifications top' left right bottom + concat-top-identification-coherence-square-identifications t = + t ∙ ap (concat' _ right) s + + inv-concat-top-identification-coherence-square-identifications : + coherence-square-identifications top' left right bottom → + coherence-square-identifications top left right bottom + inv-concat-top-identification-coherence-square-identifications t = + t ∙ inv (ap (concat' _ right) s) + + is-section-inv-concat-top-identification-coherence-square-identifications : + is-section + concat-top-identification-coherence-square-identifications + inv-concat-top-identification-coherence-square-identifications + is-section-inv-concat-top-identification-coherence-square-identifications = + is-section-inv-concat' (ap (concat' _ right) s) + + is-retraction-inv-concat-top-identification-coherence-square-identifications : + is-retraction + concat-top-identification-coherence-square-identifications + inv-concat-top-identification-coherence-square-identifications + is-retraction-inv-concat-top-identification-coherence-square-identifications = + is-retraction-inv-concat' (ap (concat' _ right) s) +``` + +We record that this construction is an equivalence in +[`foundation.commuting-squares-of-identifications`](foundation.commuting-squares-of-identifications.md). + +#### Concatenating identifications of the left edge with a coherence of a commuting square of identifications + +Consider a commuting diagram of identifications + +```text + top + x -------> y + | | | + left' | | left | right + ∨ ∨ ∨ + z -------> w. + bottom +``` + +with an identification `left = left'`. Then we get an equivalence + +```text + top top + x -------> y x -------> y + | | | | + left | | right ≃ left' | | right + ∨ ∨ ∨ ∨ + z -------> w z -------> w. + bottom bottom +``` + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) + {left' : x = z} (s : left = left') + where + + concat-left-identification-coherence-square-identifications : + coherence-square-identifications top left right bottom → + coherence-square-identifications top left' right bottom + concat-left-identification-coherence-square-identifications t = + inv (ap (concat' _ bottom) s) ∙ t + + inv-concat-left-identification-coherence-square-identifications : + coherence-square-identifications top left' right bottom → + coherence-square-identifications top left right bottom + inv-concat-left-identification-coherence-square-identifications t = + ap (concat' _ bottom) s ∙ t + + is-section-inv-concat-left-identification-coherence-square-identifications : + is-section + concat-left-identification-coherence-square-identifications + inv-concat-left-identification-coherence-square-identifications + is-section-inv-concat-left-identification-coherence-square-identifications = + is-retraction-inv-concat (ap (concat' _ bottom) s) + + is-retraction-inv-concat-left-identification-coherence-square-identifications : + is-retraction + concat-left-identification-coherence-square-identifications + inv-concat-left-identification-coherence-square-identifications + is-retraction-inv-concat-left-identification-coherence-square-identifications = + is-section-inv-concat (ap (concat' _ bottom) s) +``` + +We record that this construction is an equivalence in +[`foundation.commuting-squares-of-identifications`](foundation.commuting-squares-of-identifications.md). + +#### Concatenating identifications of the right edge with a coherence of a commuting square of identifications + +Consider a commuting diagram of identifications + +```text + top + x -------> y + | | | + left | right | | right' + ∨ ∨ ∨ + z -------> w. + bottom +``` + +with an identification `right = right'`. Then we get an equivalence + +```text + top top + x -------> y x -------> y + | | | | + left | | right ≃ left | | right' + ∨ ∨ ∨ ∨ + z -------> w z -------> w. + bottom bottom +``` + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) + {right' : y = w} (s : right = right') + where + + concat-right-identification-coherence-square-identifications : + coherence-square-identifications top left right bottom → + coherence-square-identifications top left right' bottom + concat-right-identification-coherence-square-identifications t = + t ∙ ap (concat top _) s + + inv-concat-right-identification-coherence-square-identifications : + coherence-square-identifications top left right' bottom → + coherence-square-identifications top left right bottom + inv-concat-right-identification-coherence-square-identifications t = + t ∙ inv (ap (concat top _) s) + + is-section-inv-concat-right-identification-coherence-square-identifications : + is-section + concat-right-identification-coherence-square-identifications + inv-concat-right-identification-coherence-square-identifications + is-section-inv-concat-right-identification-coherence-square-identifications = + is-section-inv-concat' (ap (concat top _) s) + + is-retraction-inv-concat-right-identification-coherence-square-identifications : + is-retraction + concat-right-identification-coherence-square-identifications + inv-concat-right-identification-coherence-square-identifications + is-retraction-inv-concat-right-identification-coherence-square-identifications = + is-retraction-inv-concat' (ap (concat top _) s) +``` + +We record that this construction is an equivalence in +[`foundation.commuting-squares-of-identifications`](foundation.commuting-squares-of-identifications.md). + +#### Concatenating identifications of the bottom edge with a coherence of a commuting square of identifications + +Consider a commuting diagram of identifications + +```text + top + x -------> y + | | + left | | right + ∨ bottom ∨ + z -------> w. + -------> + bottom' +``` + +with an identification `bottom = bottom'`. Then we get an equivalence + +```text + top top + x -------> y x -------> y + | | | | + left | | right ≃ left | | right + ∨ ∨ ∨ ∨ + z -------> w z -------> w. + bottom bottom' +``` + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) + {bottom' : z = w} (s : bottom = bottom') + where + + concat-bottom-identification-coherence-square-identifications : + coherence-square-identifications top left right bottom → + coherence-square-identifications top left right bottom' + concat-bottom-identification-coherence-square-identifications t = + inv (ap (concat left _) s) ∙ t + + inv-concat-bottom-identification-coherence-square-identifications : + coherence-square-identifications top left right bottom' → + coherence-square-identifications top left right bottom + inv-concat-bottom-identification-coherence-square-identifications t = + ap (concat left _) s ∙ t + + is-section-inv-concat-bottom-identification-coherence-square-identifications : + is-section + concat-bottom-identification-coherence-square-identifications + inv-concat-bottom-identification-coherence-square-identifications + is-section-inv-concat-bottom-identification-coherence-square-identifications = + is-retraction-inv-concat (ap (concat left _) s) + + is-retraction-inv-concat-bottom-identification-coherence-square-identifications : + is-retraction + concat-bottom-identification-coherence-square-identifications + inv-concat-bottom-identification-coherence-square-identifications + is-retraction-inv-concat-bottom-identification-coherence-square-identifications = + is-section-inv-concat (ap (concat left _) s) +``` + +We record that this construction is an equivalence in +[`foundation.commuting-squares-of-identifications`](foundation.commuting-squares-of-identifications.md). + +### Whiskering and splicing coherences of commuting squares of identifications + +Given a commuting square of identifications + +```text + top + x -------> y + | | + left | | right + ∨ ∨ + z -------> w, + bottom +``` + +we may consider four ways of attaching new identifications to it: + +1. Prepending `p : u = x` to the left gives us a commuting square + + ```text + p ∙ top + u -------> y + | | + p ∙ left | | right + ∨ ∨ + z -------> w. + bottom + ``` + + More precisely, we have an equivalence + + ```text + (left ∙ bottom = top ∙ right) ≃ ((p ∙ left) ∙ bottom = (p ∙ top) ∙ right). + ``` + +2. Appending an identification `p : w = u` to the right gives a commuting + square of identifications + + ```text + top + x ------------> y + | | + left | | right ∙ p + ∨ ∨ + z ------------> u. + bottom ∙ p + ``` + + More precisely, we have an equivalence + + ```text + (left ∙ bottom = top ∙ right) ≃ (left ∙ (bottom ∙ p) = top ∙ (right ∙ p)). + ``` + +3. Splicing an identification `p : z = u` and its inverse into the middle gives + a commuting square of identifications + + ```text + top + x --------------> y + | | + left ∙ p | | right + ∨ ∨ + u --------------> w. + p⁻¹ ∙ bottom + ``` + + More precisely, we have an equivalence + + ```text + (left ∙ bottom = top ∙ right) ≃ ((left ∙ p) ∙ (p⁻¹ ∙ bottom) = top ∙ right). + ``` + + Similarly, we have an equivalence + + ```text + (left ∙ bottom = top ∙ right) ≃ ((left ∙ p⁻¹) ∙ (p ∙ bottom) = top ∙ right). + ``` + +4. Splicing an identification `p : y = u` and its inverse into the middle gives + a commuting square of identifications + + ```text + top ∙ p + x --------> u + | | + left | | p⁻¹ ∙ right + ∨ ∨ + z --------> w. + bottom + ``` + + More precisely, we have an equivalence + + ```text + (left ∙ bottom = top ∙ right) ≃ (left ∙ bottom = (top ∙ p) ∙ (p⁻¹ ∙ right)). + ``` + + Similarly, we have an equivalence + + ```text + (left ∙ bottom = top ∙ right) ≃ (left ∙ bottom = (top ∙ p⁻¹) ∙ (p ∙ right)). + ``` + +These operations are useful in proofs involving path algebra, because taking +`equiv-right-whisker-concat-coherence-square-identifications` as an example, it +provides us with two maps: the forward direction states +`(p ∙ r = q ∙ s) → (p ∙ (r ∙ t)) = q ∙ (s ∙ t))`, which allows one to append +an identification without needing to reassociate on the right, and the backwards +direction conversely allows one to cancel out an identification in parentheses. + +#### Left whiskering coherences of commuting squares of identifications + +For any identification `p : u = x` we obtain an equivalence + +```text + top p ∙ top + x -------> y u -------> y + | | | | + left | | right ≃ p ∙ left | | right + ∨ ∨ ∨ ∨ + z -------> w z -------> w + bottom bottom +``` + +of coherences of commuting squares of identifications. + +```agda +module _ + {l : Level} {A : UU l} {x y z w u : A} + where + + left-whisker-concat-coherence-square-identifications : + (p : u = x) + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → + coherence-square-identifications top left right bottom → + coherence-square-identifications (p ∙ top) (p ∙ left) right bottom + left-whisker-concat-coherence-square-identifications + refl top left right bottom = + id + + left-unwhisker-concat-coherence-square-identifications : + (p : u = x) + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → + coherence-square-identifications (p ∙ top) (p ∙ left) right bottom → + coherence-square-identifications top left right bottom + left-unwhisker-concat-coherence-square-identifications + refl top left right bottom = + id +``` + +#### Right whiskering coherences of commuting squares of identifications + +For any identification `p : w = u` we obtain an equivalence + +```text + top top + x -------> y x ------------> y + | | | | + left | | right ≃ left | | right ∙ p + ∨ ∨ ∨ ∨ + z -------> w z ------------> w + bottom bottom ∙ p +``` + +of coherences of commuting squares of identifications. + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) + where + + right-whisker-concat-coherence-square-identifications : + coherence-square-identifications top left right bottom → + {u : A} (p : w = u) → + coherence-square-identifications top left (right ∙ p) (bottom ∙ p) + right-whisker-concat-coherence-square-identifications s refl = + concat-bottom-identification-coherence-square-identifications + ( top) + ( left) + ( right ∙ refl) + ( bottom) + ( inv right-unit) + ( concat-right-identification-coherence-square-identifications + ( top) + ( left) + ( right) + ( bottom) + ( inv right-unit) + ( s)) + + right-unwhisker-cohernece-square-identifications : + {u : A} (p : w = u) → + coherence-square-identifications top left (right ∙ p) (bottom ∙ p) → + coherence-square-identifications top left right bottom + right-unwhisker-cohernece-square-identifications refl = + ( inv-concat-right-identification-coherence-square-identifications + ( top) + ( left) + ( right) + ( bottom) + ( inv right-unit)) ∘ + ( inv-concat-bottom-identification-coherence-square-identifications + ( top) + ( left) + ( right ∙ refl) + ( bottom) + ( inv right-unit)) +``` + +### Double whiskering of commuting squares of identifications + +```agda +module _ + {l : Level} {A : UU l} {x y z u v w : A} + where + + double-whisker-coherence-square-identifications : + (p : x = y) + (top : y = u) (left : y = z) (right : u = v) (bottom : z = v) + (s : v = w) → + coherence-square-identifications top left right bottom → + coherence-square-identifications + ( p ∙ top) + ( p ∙ left) + ( right ∙ s) + ( bottom ∙ s) + double-whisker-coherence-square-identifications + p top left right bottom q H = + left-whisker-concat-coherence-square-identifications p top left + ( right ∙ q) + ( bottom ∙ q) + ( right-whisker-concat-coherence-square-identifications + ( top) + ( left) + ( right) + ( bottom) + ( H) + ( q)) +``` + +#### Left splicing coherences of commuting squares of identifications + +For any inverse pair of identifications `p : y = u` and `q : u = y` equipped +with `α : inv p = q` we obtain an equivalence + +```text + top top + x -------> y x -----------> y + | | | | + left | | right ≃ left ∙ p | | right + ∨ ∨ ∨ ∨ + z -------> w u -----------> w + bottom q ∙ bottom +``` + +of coherences of commuting squares of identifications. + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) + where + + left-splice-coherence-square-identifications : + {u : A} (p : z = u) (q : u = z) (α : inv p = q) → + coherence-square-identifications top left right bottom → + coherence-square-identifications top (left ∙ p) right (q ∙ bottom) + left-splice-coherence-square-identifications refl .refl refl = + concat-left-identification-coherence-square-identifications + ( top) + ( left) + ( right) + ( bottom) + ( inv right-unit) + + left-unsplice-coherence-square-identifications : + {u : A} (p : z = u) (q : u = z) (α : inv p = q) → + coherence-square-identifications top (left ∙ p) right (q ∙ bottom) → + coherence-square-identifications top left right bottom + left-unsplice-coherence-square-identifications refl .refl refl = + inv-concat-left-identification-coherence-square-identifications + ( top) + ( left) + ( right) + ( bottom) + ( inv right-unit) +``` + +#### Right splicing coherences of commuting squares of identifications + +For any inverse pair of identifications `p : y = u` and `q : u = y` equipped +with `α : inv p = q` we obtain an equivalence + +```text + top top ∙ p + x -------> y x --------> u + | | | | + left | | right ≃ left | | q ∙ right + ∨ ∨ ∨ ∨ + z -------> w z --------> w + bottom bottom +``` + +of coherences of commuting squares of identifications. + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) + where + + right-splice-coherence-square-identifications : + {u : A} (p : y = u) (q : u = y) (α : inv p = q) → + coherence-square-identifications top left right bottom → + coherence-square-identifications (top ∙ p) left (inv p ∙ right) bottom + right-splice-coherence-square-identifications refl .refl refl = + concat-top-identification-coherence-square-identifications + ( top) + ( left) + ( right) + ( bottom) + ( inv right-unit) + + right-unsplice-coherence-square-identifications : + {u : A} (p : y = u) (q : u = y) (α : inv p = q) → + coherence-square-identifications (top ∙ p) left (inv p ∙ right) bottom → + coherence-square-identifications top left right bottom + right-unsplice-coherence-square-identifications refl .refl refl = + inv-concat-top-identification-coherence-square-identifications + ( top) + ( left) + ( right) + ( bottom) + ( inv right-unit) +``` + +### Horizontally pasting squares of identifications + +Consider two squares of identifications as in the diagram + +```text + top-left top-right + a -------------> b -------------> c + | | | + left | | middle | right + ∨ ∨ ∨ + d -------------> e -------------> f + bottom-left bottom-right +``` + +with `s : left ∙ bottom-left = top-left ∙ middle` and +`t : middle ∙ bottom-right = top-right ∙ right`. Then the outer square +commutes. + +```agda +module _ + {l : Level} {A : UU l} {a b c d e f : A} + (top-left : a = b) (top-right : b = c) + (left : a = d) (middle : b = e) (right : c = f) + (bottom-left : d = e) (bottom-right : e = f) + where + + horizontal-pasting-coherence-square-identifications : + coherence-square-identifications top-left left middle bottom-left → + coherence-square-identifications top-right middle right bottom-right → + coherence-square-identifications + (top-left ∙ top-right) left right (bottom-left ∙ bottom-right) + horizontal-pasting-coherence-square-identifications s t = + ( right-whisker-concat-coherence-square-identifications + ( top-left) + ( left) + ( middle) + ( bottom-left) + ( s) + ( bottom-right)) ∙ + ( ( inv (assoc top-left middle bottom-right)) ∙ + ( left-whisker-concat-coherence-square-identifications + ( top-left) + ( top-right) + ( middle) + ( right) + ( bottom-right) + ( t))) +``` + +### Vertically pasting squares of identifications + +Consider two squares of identifications as in the diagram + +```text + top + a --------> b + | | + top-left | | top-right + ∨ middle ∨ + c --------> d + | | + bottom-left | | bottom-right + ∨ ∨ + e --------> f + bottom +``` + +with `s : top-left ∙ middle = top ∙ top-right` and +`t : bottom-left ∙ bottom = middle ∙ bottom-right`. Then the outer square +commutes. + +```agda +module _ + {l : Level} {A : UU l} {a b c d e f : A} + (top : a = b) (top-left : a = c) (top-right : b = d) + (middle : c = d) (bottom-left : c = e) (bottom-right : d = f) + (bottom : e = f) + where + + vertical-pasting-coherence-square-identifications : + coherence-square-identifications top top-left top-right middle → + coherence-square-identifications middle bottom-left bottom-right bottom → + coherence-square-identifications + top (top-left ∙ bottom-left) (top-right ∙ bottom-right) bottom + vertical-pasting-coherence-square-identifications s t = + ( left-whisker-concat-coherence-square-identifications + ( top-left) + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( t)) ∙ + ( ( assoc top-left middle bottom-right) ∙ + ( right-whisker-concat-coherence-square-identifications + ( top) + ( top-left) + ( top-right) + ( middle) + ( s) + ( bottom-right))) +``` + +## Properties + +### Left unit law for horizontal pasting of commuting squares of identifications + +```agda +module _ + {l : Level} {A : UU l} {a b c d : A} + where + + left-unit-law-horizontal-pasting-coherence-square-identifications : + (top : a = b) (left : a = c) (right : b = d) (bottom : c = d) + (s : coherence-square-identifications top left right bottom) → + horizontal-pasting-coherence-square-identifications + ( refl) + ( top) + ( left) + ( left) + ( right) + ( refl) + ( bottom) + ( horizontal-refl-coherence-square-identifications left) + ( s) = + s + left-unit-law-horizontal-pasting-coherence-square-identifications + refl refl right refl s = refl +``` + +### Right unit law for horizontal pasting of commuting squares of identifications + +```agda +module _ + {l : Level} {A : UU l} {a b c d : A} + where + + right-unit-law-horizontal-pasting-coherence-square-identifications : + (top : a = b) (left : a = c) (right : b = d) (bottom : c = d) + (s : coherence-square-identifications top left right bottom) → + horizontal-pasting-coherence-square-identifications + ( top) + ( refl) + ( left) + ( right) + ( right) + ( bottom) + ( refl) + ( s) + ( horizontal-refl-coherence-square-identifications right) ∙ + right-whisker-concat right-unit right = + left-whisker-concat left right-unit ∙ s + right-unit-law-horizontal-pasting-coherence-square-identifications + refl refl .refl refl refl = + refl +``` + +### Left unit law for vertical pasting of commuting squares of identifications + +```agda +module _ + {l : Level} {A : UU l} {a b c d : A} + where + + left-unit-law-vertical-pasting-coherence-square-identifications : + (top : a = b) (left : a = c) (right : b = d) (bottom : c = d) + (s : coherence-square-identifications top left right bottom) → + vertical-pasting-coherence-square-identifications + ( top) + ( refl) + ( refl) + ( top) + ( left) + ( right) + ( bottom) + ( vertical-refl-coherence-square-identifications top) + ( s) = + s + left-unit-law-vertical-pasting-coherence-square-identifications + refl refl .refl refl refl = refl +``` + +### Right unit law for vertical pasting of commuting squares of identifications + +```agda +module _ + {l : Level} {A : UU l} {a b c d : A} + where + + right-unit-law-vertical-pasting-coherence-square-identifications : + (top : a = b) (left : a = c) (right : b = d) (bottom : c = d) + (s : coherence-square-identifications top left right bottom) → + vertical-pasting-coherence-square-identifications + ( top) + ( left) + ( right) + ( bottom) + ( refl) + ( refl) + ( bottom) + ( s) + ( vertical-refl-coherence-square-identifications bottom) ∙ + left-whisker-concat top right-unit = + right-whisker-concat right-unit bottom ∙ s + right-unit-law-vertical-pasting-coherence-square-identifications + refl refl .(refl ∙ refl) refl refl = + refl +``` + +### Computing the right whiskering of a vertically constant square with an identification + +Consider the vertically constant square of identifications + +```text + p + x -----> y + | | + refl | | refl + ∨ ∨ + x -----> y + p +``` + +at an identification `p : x = y`, and consider an identification `q : y = z`. +Then the right whiskering of the above square with `q` is the commuting square +of identifications + +```text + p + x -------> y + | | + refl | refl | q + ∨ ∨ + x -------> z + p ∙ q +``` + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + right-whisker-concat-vertical-refl-coherence-square-identifications : + {x y z : A} (p : x = y) (q : y = z) → + right-whisker-concat-coherence-square-identifications p refl refl p + ( vertical-refl-coherence-square-identifications p) + ( q) = + refl + right-whisker-concat-vertical-refl-coherence-square-identifications + refl refl = + refl +``` + +### Computing the right whiskering of a horizontally constant square with an identification + +Consider a horizontally constant commuting square of identifications + +```text + refl + x -----> x + | | + p | | p + ∨ ∨ + y -----> y + refl +``` + +at an identification `p` and consider an identification `q : y = z`. Then the +right whiskering of the above square with `q` is the square + +```text + refl + x -----> x + | | + p | refl | p ∙ q + ∨ ∨ + y -----> z. + q +``` + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + right-whisker-concat-horizontal-refl-coherence-square-identifications : + {x y z : A} (p : x = y) (q : y = z) → + right-whisker-concat-coherence-square-identifications refl p p refl + ( horizontal-refl-coherence-square-identifications p) + ( q) = + refl + right-whisker-concat-horizontal-refl-coherence-square-identifications + refl refl = + refl +``` + +### Computing the left whiskering of a horizontally constant square with an identification + +Consider an identification `p : x = y` and a horizontally constant commuting +square of identifications + +```text + refl + y -----> y + | | + q | | q + ∨ ∨ + z -----> z + refl +``` + +at an identification `q : y = z`. The the left whiskering of the above square +with `p` is the commuting square + +```text + q ∙ refl + x ------------------------------------------------------> y + | | + q ∙ p | right-unit ∙ inv (right-whisker-concat right-unit p) | p + ∨ ∨ + z ------------------------------------------------------> z. + refl +``` + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + left-whisker-concat-horizontal-refl-coherence-square-identifications : + {x y z : A} (p : x = y) (q : y = z) → + left-whisker-concat-coherence-square-identifications p refl q q refl + ( horizontal-refl-coherence-square-identifications q) ∙ + right-whisker-concat right-unit q = + right-unit + left-whisker-concat-horizontal-refl-coherence-square-identifications + refl refl = + refl + + left-whisker-concat-horizontal-refl-coherence-square-identifications' : + {x y z : A} (p : x = y) (q : y = z) → + left-whisker-concat-coherence-square-identifications p refl q q refl + ( horizontal-refl-coherence-square-identifications q) = + right-unit ∙ inv (right-whisker-concat right-unit q) + left-whisker-concat-horizontal-refl-coherence-square-identifications' + refl refl = + refl +``` + +### Computing the left whiskering of a vertically constant square with an identification + +Consider the vertically constant square of identifications + +```text + q + y -----> z + | | + refl | | refl + ∨ ∨ + y -----> z + q +``` + +at an identification `q : y = z` and consider an identification `p : x = y`. +Then the left whiskering of the above square with `p` is the square + +```text + p ∙ q + x ---------------------------------------------------> z + | | + p ∙ refl | right-whisker-concat right-unit q ∙ inv right-unit | refl + ∨ ∨ + y ---------------------------------------------------> z. + q +``` + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + left-whisker-concat-vertical-refl-coherence-square-identifications : + {x y z : A} (p : x = y) (q : y = z) → + left-whisker-concat-coherence-square-identifications p q refl refl q + ( vertical-refl-coherence-square-identifications q) ∙ + right-unit = + right-whisker-concat right-unit q + left-whisker-concat-vertical-refl-coherence-square-identifications + refl refl = + refl + + left-whisker-concat-vertical-refl-coherence-square-identifications' : + {x y z : A} (p : x = y) (q : y = z) → + left-whisker-concat-coherence-square-identifications p q refl refl q + ( vertical-refl-coherence-square-identifications q) = + right-whisker-concat right-unit q ∙ inv right-unit + left-whisker-concat-vertical-refl-coherence-square-identifications' + refl refl = + refl +``` + +### Left whiskering horizontal concatenations of squares with identifications + +Consider a commuting diagram of identifications of the form + +```text + top-left top-right + a -------------> c -------------> e + | | | + left | | middle | right + ∨ ∨ ∨ + b -------------> d -------------> f + bottom-left bottom-right +``` + +and consider an identification `p : x = a`. Then the left whiskering of `p` and +the horizontal concatenation of coherences of commuting squares is up to +associativity the horizontal concatenation of the squares + +```text + p ∙ top-left top-right + x -------------> c -------------> e + | | | + p ∙ left | | middle | right + ∨ ∨ ∨ + b -------------> d -------------> f + bottom-left bottom-right +``` + +where the left square is the left whiskering of `p` and the original left +square. + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + left-whisker-concat-horizontal-pasting-coherence-square-identifications : + {x a b c d e f : A} (p : x = a) + (top-left : a = c) (top-right : c = e) + (left : a = b) (middle : c = d) (right : e = f) + (bottom-left : b = d) (bottom-right : d = f) + (l : coherence-square-identifications top-left left middle bottom-left) + (r : coherence-square-identifications top-right middle right bottom-right) → + left-whisker-concat-coherence-square-identifications p + ( top-left ∙ top-right) + ( left) + ( right) + ( bottom-left ∙ bottom-right) + ( horizontal-pasting-coherence-square-identifications + ( top-left) + ( top-right) + ( left) + ( middle) + ( right) + ( bottom-left) + ( bottom-right) + ( l) + ( r)) = + horizontal-pasting-coherence-square-identifications + ( p ∙ top-left) + ( top-right) + ( p ∙ left) + ( middle) + ( right) + ( bottom-left) + ( bottom-right) + ( left-whisker-concat-coherence-square-identifications p + ( top-left) + ( left) + ( middle) + ( bottom-left) + ( l)) + ( r) ∙ + right-whisker-concat + ( assoc p top-left top-right) + ( right) + left-whisker-concat-horizontal-pasting-coherence-square-identifications + refl top-left top-right left middle right bottom-left bottom-right l r = + inv right-unit +``` + +### Left whiskering vertical concatenations of squares with identifications + +Consider two squares of identifications as in the diagram + +```text + top + a --------> b + | | + top-left | | top-right + ∨ middle ∨ + c --------> d + | | + bottom-left | | bottom-right + ∨ ∨ + e --------> f + bottom +``` + +and consider an identification `p : x = a`. Then the left whiskering of `p` +with the vertical pasting of the two squares above is up to associativity the +vertical pasting of the squares + +```text + p ∙ top + x --------> b + | | + p ∙ top-left | | top-right + ∨ middle ∨ + c --------> d + | | + bottom-left | | bottom-right + ∨ ∨ + e --------> f. + bottom +``` + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + left-whisker-concat-vertical-concat-coherence-square-identifications : + {x a b c d e f : A} (p : x = a) → + (top : a = b) (top-left : a = c) (top-right : b = d) (middle : c = d) + (bottom-left : c = e) (bottom-right : d = f) (bottom : e = f) + (t : coherence-square-identifications top top-left top-right middle) → + (b : + coherence-square-identifications middle bottom-left bottom-right bottom) → + right-whisker-concat (assoc p top-left bottom-left) bottom ∙ + left-whisker-concat-coherence-square-identifications p + ( top) + ( top-left ∙ bottom-left) + ( top-right ∙ bottom-right) + ( bottom) + ( vertical-pasting-coherence-square-identifications + ( top) + ( top-left) + ( top-right) + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( t) + ( b)) = + vertical-pasting-coherence-square-identifications + ( p ∙ top) + ( p ∙ top-left) + ( top-right) + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( left-whisker-concat-coherence-square-identifications p + ( top) + ( top-left) + ( top-right) + ( middle) + ( t)) + ( b) + left-whisker-concat-vertical-concat-coherence-square-identifications + refl top top-left top-right middle bottom-left bottom-right bottom t b = + refl +``` + +### Right whiskering horizontal pastings of commuting squares of identifications + +Consider a commuting diagram of identifications of the form + +```text + top-left top-right + a -------------> c -------------> e + | | | + left | | middle | right + ∨ ∨ ∨ + b -------------> d -------------> f + bottom-left bottom-right +``` + +and consider an identification `q : f = y`. Then the right whiskering of the +horizontal pasting of the squares above is up to associativity the horizontal +pasting of the squares + +```text + top-left top-right + a -------------> c ------------------> e + | | | + left | | middle | right ∙ q + ∨ ∨ ∨ + b -------------> d ------------------> y + bottom-left bottom-right ∙ q +``` + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + right-whisker-concat-horizontal-pasting-coherence-square-identifications : + {a b c d e f y : A} + (top-left : a = c) (top-right : c = e) + (left : a = b) (middle : c = d) (right : e = f) + (bottom-left : b = d) (bottom-right : d = f) + (l : coherence-square-identifications top-left left middle bottom-left) → + (r : coherence-square-identifications top-right middle right bottom-right) → + (q : f = y) → + right-whisker-concat-coherence-square-identifications + ( top-left ∙ top-right) + ( left) + ( right) + ( bottom-left ∙ bottom-right) + ( horizontal-pasting-coherence-square-identifications + ( top-left) + ( top-right) + ( left) + ( middle) + ( right) + ( bottom-left) + ( bottom-right) + ( l) + ( r)) + ( q) = + left-whisker-concat left (assoc bottom-left bottom-right q) ∙ + horizontal-pasting-coherence-square-identifications + ( top-left) + ( top-right) + ( left) + ( middle) + ( right ∙ q) + ( bottom-left) + ( bottom-right ∙ q) + ( l) + ( right-whisker-concat-coherence-square-identifications + ( top-right) + ( middle) + ( right) + ( bottom-right) + ( r) + ( q)) + right-whisker-concat-horizontal-pasting-coherence-square-identifications + refl refl refl .refl .refl refl refl refl refl refl = + refl +``` + +### Right whiskering vertical concatenations of squares with identifications + +Consider two squares of identifications as in the diagram + +```text + top + a --------> b + | | + top-left | | top-right + ∨ middle ∨ + c --------> d + | | + bottom-left | | bottom-right + ∨ ∨ + e --------> f + bottom +``` + +and consider an identification `q : f = y`. Then the right whiskering of the +vertical pasting of the two squares above with `q` is up to associativity the +vertical pasting of the squares + +```text + top + a ------------> b + | | + top-left | | top-right + ∨ middle ∨ + c ------------> d + | | + bottom-left | | bottom-right ∙ q + ∨ ∨ + e ------------> y. + bottom ∙ q +``` + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + right-whisker-concat-vertical-pasting-coherence-square-identifications : + {a b c d e f y : A} + (top : a = b) (top-left : a = c) (top-right : b = d) + (middle : c = d) + (bottom-left : c = e) (bottom-right : d = f) (bottom : e = f) + (t : coherence-square-identifications top top-left top-right middle) → + (b : + coherence-square-identifications middle bottom-left bottom-right bottom) → + (q : f = y) → + right-whisker-concat-coherence-square-identifications + ( top) + ( top-left ∙ bottom-left) + ( top-right ∙ bottom-right) + ( bottom) + ( vertical-pasting-coherence-square-identifications + ( top) + ( top-left) + ( top-right) + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( t) + ( b)) + ( q) ∙ + left-whisker-concat top (assoc top-right bottom-right q) = + vertical-pasting-coherence-square-identifications + ( top) + ( top-left) + ( top-right) + ( middle) + ( bottom-left) + ( bottom-right ∙ q) + ( bottom ∙ q) + ( t) + ( right-whisker-concat-coherence-square-identifications + ( middle) + ( bottom-left) + ( bottom-right) + ( bottom) + ( b) + ( q)) + right-whisker-concat-vertical-pasting-coherence-square-identifications + refl refl .refl refl refl .refl refl refl refl refl = + refl +``` diff --git a/src/foundation-core/commuting-squares-of-maps.lagda.md b/src/foundation-core/commuting-squares-of-maps.lagda.md index 13c4b21118..92e9ba73f6 100644 --- a/src/foundation-core/commuting-squares-of-maps.lagda.md +++ b/src/foundation-core/commuting-squares-of-maps.lagda.md @@ -234,23 +234,23 @@ If the horizontal/vertical maps in a commuting square are both commuting if we invert those equivalences. ```agda -coherence-square-maps-inv-equiv-horizontal : +horizontal-inv-equiv-coherence-square-maps : {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} (top : A ≃ B) (left : A → X) (right : B → Y) (bottom : X ≃ Y) → coherence-square-maps (map-equiv top) left right (map-equiv bottom) → coherence-square-maps (map-inv-equiv top) right left (map-inv-equiv bottom) -coherence-square-maps-inv-equiv-horizontal top left right bottom H b = +horizontal-inv-equiv-coherence-square-maps top left right bottom H b = map-eq-transpose-equiv-inv ( bottom) ( ( ap right (inv (is-section-map-inv-equiv top b))) ∙ ( inv (H (map-inv-equiv top b)))) -coherence-square-maps-inv-equiv-vertical : +vertical-inv-equiv-coherence-square-maps : {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3} {Y : UU l4} (top : A → B) (left : A ≃ X) (right : B ≃ Y) (bottom : X → Y) → coherence-square-maps top (map-equiv left) (map-equiv right) bottom → coherence-square-maps bottom (map-inv-equiv left) (map-inv-equiv right) top -coherence-square-maps-inv-equiv-vertical top left right bottom H x = +vertical-inv-equiv-coherence-square-maps top left right bottom H x = map-eq-transpose-equiv ( right) ( ( inv (H (map-inv-equiv left x))) ∙ @@ -270,12 +270,12 @@ coherence-square-maps-inv-equiv : ( map-inv-equiv left) ( map-inv-equiv top) coherence-square-maps-inv-equiv top left right bottom H = - coherence-square-maps-inv-equiv-vertical + vertical-inv-equiv-coherence-square-maps ( map-inv-equiv top) ( right) ( left) ( map-inv-equiv bottom) - ( coherence-square-maps-inv-equiv-horizontal + ( horizontal-inv-equiv-coherence-square-maps ( top) ( map-equiv left) ( map-equiv right) diff --git a/src/foundation-core/contractible-maps.lagda.md b/src/foundation-core/contractible-maps.lagda.md index 46a3cecce5..624c850cd4 100644 --- a/src/foundation-core/contractible-maps.lagda.md +++ b/src/foundation-core/contractible-maps.lagda.md @@ -66,10 +66,9 @@ module _ ( ( inv ( contraction ( H (f x)) - ( pair - ( map-inv-is-contr-map H (f x)) + ( ( map-inv-is-contr-map H (f x)) , ( is-section-map-inv-is-contr-map H (f x))))) ∙ - ( contraction (H (f x)) (pair x refl))) + ( contraction (H (f x)) (x , refl))) abstract is-equiv-is-contr-map : is-contr-map f → is-equiv f @@ -93,14 +92,14 @@ module _ pr1 (center-fiber-is-coherently-invertible H y) = map-inv-is-coherently-invertible H y pr2 (center-fiber-is-coherently-invertible H y) = - is-retraction-is-coherently-invertible H y + is-section-map-inv-is-coherently-invertible H y contraction-fiber-is-coherently-invertible : (H : is-coherently-invertible f) → (y : B) → (t : fiber f y) → (center-fiber-is-coherently-invertible H y) = t - contraction-fiber-is-coherently-invertible H y (pair x refl) = + contraction-fiber-is-coherently-invertible H y (x , refl) = eq-Eq-fiber f y - ( is-section-is-coherently-invertible H x) + ( is-retraction-map-inv-is-coherently-invertible H x) ( ( right-unit) ∙ ( inv ( coh-is-coherently-invertible H x))) diff --git a/src/foundation-core/equivalences.lagda.md b/src/foundation-core/equivalences.lagda.md index 3d1af2c9bb..7cbf23c397 100644 --- a/src/foundation-core/equivalences.lagda.md +++ b/src/foundation-core/equivalences.lagda.md @@ -7,7 +7,6 @@ module foundation-core.equivalences where
Imports ```agda -open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.universe-levels @@ -181,18 +180,17 @@ module _ pr2 (pr2 (is-equiv-is-invertible' (g , H , K))) = K is-equiv-is-invertible : - (g : B → A) (H : (f ∘ g) ~ id) (K : (g ∘ f) ~ id) → is-equiv f + (g : B → A) (H : f ∘ g ~ id) (K : g ∘ f ~ id) → is-equiv f is-equiv-is-invertible g H K = is-equiv-is-invertible' (g , H , K) is-retraction-map-section-is-equiv : (H : is-equiv f) → is-retraction f (map-section-is-equiv H) is-retraction-map-section-is-equiv H = - ( ( ( inv-htpy - ( ( is-retraction-map-retraction-is-equiv H) ·r - ( map-section-is-equiv H))) ∙h - ( map-retraction-is-equiv H ·l is-section-map-section-is-equiv H)) ·r - ( f)) ∙h + ( ( inv-htpy + ( ( is-retraction-map-retraction-is-equiv H) ·r + ( map-section-is-equiv H ∘ f))) ∙h + ( map-retraction-is-equiv H ·l is-section-map-section-is-equiv H ·r f)) ∙h ( is-retraction-map-retraction-is-equiv H) is-invertible-is-equiv : is-equiv f → is-invertible f @@ -209,15 +207,26 @@ module _ where abstract - is-coherently-invertible-is-equiv : is-equiv f → is-coherently-invertible f + is-coherently-invertible-is-equiv : + is-equiv f → is-coherently-invertible f is-coherently-invertible-is-equiv = is-coherently-invertible-is-invertible ∘ is-invertible-is-equiv - abstract is-equiv-is-coherently-invertible : is-coherently-invertible f → is-equiv f is-equiv-is-coherently-invertible H = is-equiv-is-invertible' (is-invertible-is-coherently-invertible H) + + is-transpose-coherently-invertible-is-equiv : + is-equiv f → is-transpose-coherently-invertible f + is-transpose-coherently-invertible-is-equiv = + is-transpose-coherently-invertible-is-invertible ∘ is-invertible-is-equiv + + is-equiv-is-transpose-coherently-invertible : + is-transpose-coherently-invertible f → is-equiv f + is-equiv-is-transpose-coherently-invertible H = + is-equiv-is-invertible' + ( is-invertible-is-transpose-coherently-invertible H) ``` ### Structure obtained from being coherently invertible @@ -232,11 +241,13 @@ module _ is-section-map-inv-is-equiv : is-section f map-inv-is-equiv is-section-map-inv-is-equiv = - is-section-map-inv-is-invertible (is-invertible-is-equiv H) + is-section-map-inv-is-coherently-invertible-is-invertible + ( is-invertible-is-equiv H) is-retraction-map-inv-is-equiv : is-retraction f map-inv-is-equiv is-retraction-map-inv-is-equiv = - is-retraction-map-inv-is-invertible (is-invertible-is-equiv H) + is-retraction-map-inv-is-coherently-invertible-is-invertible + ( is-invertible-is-equiv H) coherence-map-inv-is-equiv : coherence-is-coherently-invertible f @@ -244,7 +255,7 @@ module _ ( is-section-map-inv-is-equiv) ( is-retraction-map-inv-is-equiv) coherence-map-inv-is-equiv = - coherence-map-inv-is-invertible (is-invertible-is-equiv H) + coh-is-coherently-invertible-is-invertible (is-invertible-is-equiv H) is-equiv-map-inv-is-equiv : is-equiv map-inv-is-equiv is-equiv-map-inv-is-equiv = @@ -415,12 +426,12 @@ module _ pr2 (is-equiv-comp g h (sh , rh) (sg , rg)) = retraction-comp g h rg rh - equiv-comp : (B ≃ X) → (A ≃ B) → (A ≃ X) - pr1 (equiv-comp g h) = (map-equiv g) ∘ (map-equiv h) + equiv-comp : B ≃ X → A ≃ B → A ≃ X + pr1 (equiv-comp g h) = map-equiv g ∘ map-equiv h pr2 (equiv-comp g h) = is-equiv-comp (pr1 g) (pr1 h) (pr2 h) (pr2 g) infixr 15 _∘e_ - _∘e_ : (B ≃ X) → (A ≃ B) → (A ≃ X) + _∘e_ : B ≃ X → A ≃ B → A ≃ X _∘e_ = equiv-comp ``` @@ -483,14 +494,12 @@ module _ is-equiv-htpy' (map-equiv e) H (is-equiv-map-equiv e) htpy-map-inv-is-equiv : - {f g : A → B} (G : f ~ g) (H : is-equiv f) (K : is-equiv g) → - map-inv-is-equiv H ~ map-inv-is-equiv K - htpy-map-inv-is-equiv G H K b = - ( inv - ( is-retraction-map-inv-is-equiv K (map-inv-is-equiv H b))) ∙ - ( ap (map-inv-is-equiv K) - ( ( inv (G (map-inv-is-equiv H b))) ∙ - ( is-section-map-inv-is-equiv H b))) + {f g : A → B} (H : f ~ g) (F : is-equiv f) (G : is-equiv g) → + map-inv-is-equiv F ~ map-inv-is-equiv G + htpy-map-inv-is-equiv H F G = + htpy-map-inv-is-invertible H + ( is-invertible-is-equiv F) + ( is-invertible-is-equiv G) ``` ### Any retraction of an equivalence is an equivalence @@ -523,16 +532,22 @@ module _ where abstract - is-equiv-section-is-equiv : - ( section-f : section f) → is-equiv (pr1 section-f) → is-equiv f - is-equiv-section-is-equiv (g , is-section-g) is-equiv-section-f = - is-equiv-htpy h - ( ( f ·l (inv-htpy (is-section-map-inv-is-equiv is-equiv-section-f))) ∙h - ( right-whisker-comp is-section-g h)) - ( is-equiv-map-inv-is-equiv is-equiv-section-f) - where - h : A → B - h = map-inv-is-equiv is-equiv-section-f + is-equiv-is-equiv-section : + (s : section f) → is-equiv (map-section f s) → is-equiv f + is-equiv-is-equiv-section (g , G) S = is-equiv-is-retraction S G +``` + +### If a retraction of `f` is an equivalence, then `f` is an equivalence + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) + where + + abstract + is-equiv-is-equiv-retraction : + (r : retraction f) → is-equiv (map-retraction f r) → is-equiv f + is-equiv-is-equiv-retraction (g , G) R = is-equiv-is-section R G ``` ### Any section of an equivalence is homotopic to its inverse @@ -662,38 +677,10 @@ module _ abstract is-emb-is-equiv : {f : A → B} → is-equiv f → (x y : A) → is-equiv (ap f {x} {y}) - is-emb-is-equiv {f} H x y = - is-equiv-is-invertible - ( λ p → - ( inv (is-retraction-map-inv-is-equiv H x)) ∙ - ( ( ap (map-inv-is-equiv H) p) ∙ - ( is-retraction-map-inv-is-equiv H y))) - ( λ p → - ( ap-concat f - ( inv (is-retraction-map-inv-is-equiv H x)) - ( ap (map-inv-is-equiv H) p ∙ is-retraction-map-inv-is-equiv H y)) ∙ - ( ( ap-binary - ( λ u v → u ∙ v) - ( ap-inv f (is-retraction-map-inv-is-equiv H x)) - ( ( ap-concat f - ( ap (map-inv-is-equiv H) p) - ( is-retraction-map-inv-is-equiv H y)) ∙ - ( ap-binary - ( λ u v → u ∙ v) - ( inv (ap-comp f (map-inv-is-equiv H) p)) - ( inv (coherence-map-inv-is-equiv H y))))) ∙ - ( inv - ( left-transpose-eq-concat - ( ap f (is-retraction-map-inv-is-equiv H x)) - ( p) - ( ( ap (f ∘ map-inv-is-equiv H) p) ∙ - ( is-section-map-inv-is-equiv H (f y))) - ( ( ap-binary - ( λ u v → u ∙ v) - ( inv (coherence-map-inv-is-equiv H x)) - ( inv (ap-id p))) ∙ - ( nat-htpy (is-section-map-inv-is-equiv H) p)))))) - ( λ where refl → left-inv (is-retraction-map-inv-is-equiv H x)) + is-emb-is-equiv H x y = + is-equiv-is-invertible' + ( is-invertible-ap-is-coherently-invertible + ( is-coherently-invertible-is-equiv H)) equiv-ap : (e : A ≃ B) (x y : A) → (x = y) ≃ (map-equiv e x = map-equiv e y) @@ -761,6 +748,12 @@ syntax step-equivalence-reasoning e Z f = e ≃ Z by f [`foundation.contractible-maps`](foundation.contractible-maps.md). - For the notion of path-split maps see [`foundation.path-split-maps`](foundation.path-split-maps.md). +- For the notion of finitely coherent equivalence, see + [`foundation.finitely-coherent-equivalence`)(foundation.finitely-coherent-equivalence.md). +- For the notion of finitely coherently invertible map, see + [`foundation.finitely-coherently-invertible-map`)(foundation.finitely-coherently-invertible-map.md). +- For the notion of infinitely coherent equivalence, see + [`foundation.infinitely-coherent-equivalences`](foundation.infinitely-coherent-equivalences.md). ### Table of files about function types, composition, and equivalences diff --git a/src/foundation-core/homotopies.lagda.md b/src/foundation-core/homotopies.lagda.md index fc6b8eb7de..9c53f25ce0 100644 --- a/src/foundation-core/homotopies.lagda.md +++ b/src/foundation-core/homotopies.lagda.md @@ -247,6 +247,20 @@ module _ ### Naturality of homotopies with respect to identifications +Given two maps `f g : A → B` and a homotopy `H : f ~ g`, then for every +identification `p : x = y` in `A`, we have a +[commuting square of identifications](foundation-core.commuting-squares-of-identifications.md) + +```text + ap f p + f x -------> f y + | | + H x | | H y + ∨ ∨ + g x -------> g y. + ap g p +``` + ```agda nat-htpy : {l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} (H : f ~ g) diff --git a/src/foundation-core/invertible-maps.lagda.md b/src/foundation-core/invertible-maps.lagda.md index 3392fd1794..0b7ba10a4c 100644 --- a/src/foundation-core/invertible-maps.lagda.md +++ b/src/foundation-core/invertible-maps.lagda.md @@ -7,12 +7,15 @@ module foundation-core.invertible-maps where
Imports ```agda +open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition open import foundation-core.cartesian-product-types open import foundation-core.function-types open import foundation-core.homotopies +open import foundation-core.identity-types open import foundation-core.retractions open import foundation-core.sections ``` @@ -39,11 +42,11 @@ module _ is-inverse f g = ((f ∘ g) ~ id) × ((g ∘ f) ~ id) is-section-is-inverse : - {f : A → B} {g : B → A} → is-inverse f g → (f ∘ g) ~ id + {f : A → B} {g : B → A} → is-inverse f g → f ∘ g ~ id is-section-is-inverse = pr1 is-retraction-is-inverse : - {f : A → B} {g : B → A} → is-inverse f g → (g ∘ f) ~ id + {f : A → B} {g : B → A} → is-inverse f g → g ∘ f ~ id is-retraction-is-inverse = pr2 ``` @@ -64,19 +67,19 @@ module _ is-inverse-map-inv-is-invertible : is-inverse f map-inv-is-invertible is-inverse-map-inv-is-invertible = pr2 g - is-retraction-is-invertible : (f ∘ map-inv-is-invertible) ~ id - is-retraction-is-invertible = pr1 is-inverse-map-inv-is-invertible + is-section-map-inv-is-invertible : f ∘ map-inv-is-invertible ~ id + is-section-map-inv-is-invertible = pr1 is-inverse-map-inv-is-invertible - is-section-is-invertible : (map-inv-is-invertible ∘ f) ~ id - is-section-is-invertible = pr2 is-inverse-map-inv-is-invertible + is-retraction-map-inv-is-invertible : map-inv-is-invertible ∘ f ~ id + is-retraction-map-inv-is-invertible = pr2 is-inverse-map-inv-is-invertible section-is-invertible : section f pr1 section-is-invertible = map-inv-is-invertible - pr2 section-is-invertible = is-retraction-is-invertible + pr2 section-is-invertible = is-section-map-inv-is-invertible retraction-is-invertible : retraction f pr1 retraction-is-invertible = map-inv-is-invertible - pr2 retraction-is-invertible = is-section-is-invertible + pr2 retraction-is-invertible = is-retraction-map-inv-is-invertible ``` ### The type of invertible maps @@ -100,37 +103,231 @@ module _ map-inv-invertible-map = map-inv-is-invertible ∘ is-invertible-map-invertible-map - is-section-map-invertible-map : + is-retraction-map-inv-invertible-map : (f : invertible-map A B) → - (map-inv-invertible-map f ∘ map-invertible-map f) ~ id - is-section-map-invertible-map = - is-section-is-invertible ∘ is-invertible-map-invertible-map + map-inv-invertible-map f ∘ map-invertible-map f ~ id + is-retraction-map-inv-invertible-map = + is-retraction-map-inv-is-invertible ∘ is-invertible-map-invertible-map - is-retraction-map-invertible-map : + is-section-map-inv-invertible-map : (f : invertible-map A B) → - (map-invertible-map f ∘ map-inv-invertible-map f) ~ id - is-retraction-map-invertible-map = - is-retraction-is-invertible ∘ is-invertible-map-invertible-map + map-invertible-map f ∘ map-inv-invertible-map f ~ id + is-section-map-inv-invertible-map = + is-section-map-inv-is-invertible ∘ is-invertible-map-invertible-map ``` ## Properties -### The invertible inverse of an invertible map +### The identity invertible map ```agda module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + {l1 : Level} {A : UU l1} + where + + is-inverse-id : is-inverse id (id {A = A}) + pr1 is-inverse-id = refl-htpy + pr2 is-inverse-id = refl-htpy + + is-invertible-id : is-invertible (id {A = A}) + pr1 is-invertible-id = id + pr2 is-invertible-id = is-inverse-id + + id-invertible-map : invertible-map A A + pr1 id-invertible-map = id + pr2 id-invertible-map = is-invertible-id +``` + +### The inverse of an invertible map + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-inverse-inv-is-inverse : + {f : A → B} {g : B → A} → is-inverse f g → is-inverse g f + pr1 (is-inverse-inv-is-inverse {f} {g} H) = + is-retraction-map-inv-is-invertible (g , H) + pr2 (is-inverse-inv-is-inverse {f} {g} H) = + is-section-map-inv-is-invertible (g , H) + + is-invertible-map-inv-is-invertible : + {f : A → B} (g : is-invertible f) → is-invertible (map-inv-is-invertible g) + pr1 (is-invertible-map-inv-is-invertible {f} g) = f + pr2 (is-invertible-map-inv-is-invertible {f} g) = + is-inverse-inv-is-inverse {f} (is-inverse-map-inv-is-invertible g) + + is-invertible-map-inv-invertible-map : + (f : invertible-map A B) → is-invertible (map-inv-invertible-map f) + is-invertible-map-inv-invertible-map f = + is-invertible-map-inv-is-invertible (is-invertible-map-invertible-map f) + + inv-invertible-map : invertible-map A B → invertible-map B A + pr1 (inv-invertible-map f) = map-inv-invertible-map f + pr2 (inv-invertible-map f) = is-invertible-map-inv-invertible-map f +``` + +### The inversion operation on invertible maps is a strict involution + +The inversion operation on invertible maps is a strict involution, where, by +strict involution, we mean that `inv-invertible-map (inv-invertible-map f) ≐ f` +syntactically. This can be observed by the fact that the type-checker accepts +`refl` as proof of this equation. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-involution-inv-invertible-map : + {f : invertible-map A B} → inv-invertible-map (inv-invertible-map f) = f + is-involution-inv-invertible-map = refl +``` + +### Composition of invertible maps + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} + (g : B → C) (f : A → B) (G : is-invertible g) (F : is-invertible f) + where + + map-inv-is-invertible-comp : C → A + map-inv-is-invertible-comp = + map-inv-is-invertible F ∘ map-inv-is-invertible G + + is-section-map-inv-is-invertible-comp : + is-section (g ∘ f) map-inv-is-invertible-comp + is-section-map-inv-is-invertible-comp = + is-section-map-section-comp g f + ( section-is-invertible F) + ( section-is-invertible G) + + is-retraction-map-inv-is-invertible-comp : + is-retraction (g ∘ f) map-inv-is-invertible-comp + is-retraction-map-inv-is-invertible-comp = + is-retraction-map-retraction-comp g f + ( retraction-is-invertible G) + ( retraction-is-invertible F) + + is-invertible-comp : is-invertible (g ∘ f) + is-invertible-comp = + ( map-inv-is-invertible-comp , + is-section-map-inv-is-invertible-comp , + is-retraction-map-inv-is-invertible-comp) + +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} where - inv-is-inverse : {g : B → A} → is-inverse f g → is-inverse g f - pr1 (inv-is-inverse {g} H) = is-section-is-invertible (g , H) - pr2 (inv-is-inverse {g} H) = is-retraction-is-invertible (g , H) + is-invertible-map-comp-invertible-map : + (g : invertible-map B C) (f : invertible-map A B) → + is-invertible (map-invertible-map g ∘ map-invertible-map f) + is-invertible-map-comp-invertible-map g f = + is-invertible-comp + ( map-invertible-map g) + ( map-invertible-map f) + ( is-invertible-map-invertible-map g) + ( is-invertible-map-invertible-map f) + + comp-invertible-map : + invertible-map B C → invertible-map A B → invertible-map A C + pr1 (comp-invertible-map g f) = map-invertible-map g ∘ map-invertible-map f + pr2 (comp-invertible-map g f) = is-invertible-map-comp-invertible-map g f +``` + +### Invertible maps are closed under homotopies + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + is-section-map-inv-is-invertible-htpy : + {f f' : A → B} (H : f' ~ f) (F : is-invertible f) → + is-section f' (map-inv-is-invertible F) + is-section-map-inv-is-invertible-htpy H (g , S , R) = H ·r g ∙h S + + is-retraction-map-inv-is-invertible-htpy : + {f f' : A → B} (H : f' ~ f) (F : is-invertible f) → + is-retraction f' (map-inv-is-invertible F) + is-retraction-map-inv-is-invertible-htpy H (g , S , R) = g ·l H ∙h R + + is-invertible-htpy : + {f f' : A → B} → f' ~ f → is-invertible f → is-invertible f' + is-invertible-htpy H F = + ( map-inv-is-invertible F , + is-section-map-inv-is-invertible-htpy H F , + is-retraction-map-inv-is-invertible-htpy H F) + + is-invertible-inv-htpy : + {f f' : A → B} → f ~ f' → is-invertible f → is-invertible f' + is-invertible-inv-htpy H = is-invertible-htpy (inv-htpy H) + + htpy-map-inv-is-invertible : + {f g : A → B} (H : f ~ g) (F : is-invertible f) (G : is-invertible g) → + map-inv-is-invertible F ~ map-inv-is-invertible G + htpy-map-inv-is-invertible H F G = + ( ( inv-htpy (is-retraction-map-inv-is-invertible G)) ·r + ( map-inv-is-invertible F)) ∙h + ( ( map-inv-is-invertible G) ·l + ( ( inv-htpy H ·r map-inv-is-invertible F) ∙h + ( is-section-map-inv-is-invertible F))) +``` + +### Any section of an invertible map is homotopic to its inverse + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : invertible-map A B) + where + + htpy-map-inv-invertible-map-section : + (f : section (map-invertible-map e)) → + map-inv-invertible-map e ~ + map-section (map-invertible-map e) f + htpy-map-inv-invertible-map-section (f , H) = + ( map-inv-invertible-map e ·l inv-htpy H) ∙h + ( is-retraction-map-inv-invertible-map e ·r f) +``` + +### Any retraction of an invertible map is homotopic to its inverse + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : invertible-map A B) + where + + htpy-map-inv-invertible-map-retraction : + (f : retraction (map-invertible-map e)) → + map-inv-invertible-map e ~ + map-retraction (map-invertible-map e) f + htpy-map-inv-invertible-map-retraction (f , H) = + ( inv-htpy H ·r map-inv-invertible-map e) ∙h + ( f ·l is-section-map-inv-invertible-map e) +``` + +### Invertible maps are injective + +The construction of the converse map of the +[action on identifications](foundation.action-on-identifications-functions.md) +is a rerun of the proof that maps with +[retractions](foundation-core.retractions.md) are +[injective](foundation-core.injective-maps.md) (`is-injective-retraction`). We +repeat the proof to avoid cyclic dependencies. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + (H : is-invertible f) {x y : A} + where - inv-is-invertible : - (g : is-invertible f) → is-invertible (map-inv-is-invertible g) - pr1 (inv-is-invertible g) = f - pr2 (inv-is-invertible g) = - inv-is-inverse (is-inverse-map-inv-is-invertible g) + is-injective-is-invertible : f x = f y → x = y + is-injective-is-invertible p = + ( inv (is-retraction-map-inv-is-invertible H x)) ∙ + ( ( ap (map-inv-is-invertible H) p) ∙ + ( is-retraction-map-inv-is-invertible H y)) ``` ## See also diff --git a/src/foundation-core/whiskering-homotopies-concatenation.lagda.md b/src/foundation-core/whiskering-homotopies-concatenation.lagda.md new file mode 100644 index 0000000000..8eae6bc964 --- /dev/null +++ b/src/foundation-core/whiskering-homotopies-concatenation.lagda.md @@ -0,0 +1,133 @@ +# Whiskering homotopies with respect to concatenation + +```agda +module foundation-core.whiskering-homotopies-concatenation where +``` + +
Imports + +```agda +open import foundation.universe-levels +open import foundation.whiskering-operations + +open import foundation-core.homotopies +open import foundation-core.whiskering-identifications-concatenation +``` + +
+ +## Idea + +Consider a homotopy `H : f ~ g` and a homotopy `K : I ~ J` between two +homotopies `I J : g ~ f`. The +{{#concept "left whiskering" Disambiguation="homotopies with respect to concatenation" Agda=left-whisker-concat-htpy}} +of `H` and `K` is a homotopy `H ∙h I ~ H ∙h J`. In other words, left whiskering +of homotopies with respect to concatenation is a +[whiskering operation](foundation.whiskering-operations.md) + +```text + (H : f ~ g) {I J : g ~ h} → I ~ J → H ∙h I ~ H ∙h K. +``` + +Similarly, we introduce +{{#concept "right whiskering" Disambiguation="homotopies with respect to concatenation" Agda=right-whisker-concat-htpy}} +to be an operation + +```text + {H I : f ~ g} → H ~ I → (J : g ~ h) → H ∙h J ~ I ∙h J. +``` + +## Definitions + +### Left whiskering of homotopies with respect to concatenation + +Left whiskering of homotopies with respect to concatenation is an operation + +```text + (H : f ~ g) {I J : g ~ h} → I ~ J → H ∙h I ~ H ∙h J. +``` + +We implement the left whiskering operation of homotopies with respect to +concatenation as an instance of a general left whiskering operation. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + left-whisker-concat-htpy : + left-whiskering-operation ((x : A) → B x) (_~_) (_∙h_) (_~_) + left-whisker-concat-htpy H K x = left-whisker-concat (H x) (K x) + + left-unwhisker-concat-htpy : + {f g h : (x : A) → B x} (H : f ~ g) {I J : g ~ h} → H ∙h I ~ H ∙h J → I ~ J + left-unwhisker-concat-htpy H K x = left-unwhisker-concat (H x) (K x) +``` + +### Right whiskering of homotopies with respect to concatenation + +Right whiskering of homotopies with respect to concatenation is an operation + +```text + {H I : f ~ g} → H ~ I → (J : g ~ h) → H ∙h J ~ I ∙h J. +``` + +We implement the right whiskering operation of homotopies with respect to +concatenation as an instance of a general right whiskering operation. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + right-whisker-concat-htpy : + right-whiskering-operation ((x : A) → B x) (_~_) (_∙h_) (_~_) + right-whisker-concat-htpy K J x = right-whisker-concat (K x) (J x) + + right-unwhisker-concat-htpy : + {f g h : (x : A) → B x} {H I : f ~ g} (J : g ~ h) → H ∙h J ~ I ∙h J → H ~ I + right-unwhisker-concat-htpy H K x = right-unwhisker-concat (H x) (K x) +``` + +## Properties + +### The unit and absorption laws for left whiskering of homotopies with respect to concatenation + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + left-unit-law-left-whisker-concat-htpy : + {f g : (x : A) → B x} {I J : f ~ g} (K : I ~ J) → + left-whisker-concat-htpy refl-htpy K ~ K + left-unit-law-left-whisker-concat-htpy K x = + left-unit-law-left-whisker-concat (K x) + + right-absorption-law-left-whisker-concat-htpy : + {f g h : (x : A) → B x} (H : f ~ g) {I : g ~ h} → + left-whisker-concat-htpy H (refl-htpy' I) ~ refl-htpy + right-absorption-law-left-whisker-concat-htpy H x = + right-absorption-law-left-whisker-concat (H x) _ +``` + +### The unit and absorption laws for right whiskering of homotopies with respect to concatenation + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} + where + + left-absorption-law-right-whisker-concat-htpy : + {f g h : (x : A) → B x} {H : f ~ g} (J : g ~ h) → + right-whisker-concat-htpy (refl-htpy' H) J ~ refl-htpy + left-absorption-law-right-whisker-concat-htpy J x = + left-absorption-law-right-whisker-concat _ (J x) + + right-unit-law-right-whisker-concat-htpy : + {f g : (x : A) → B x} {I J : f ~ g} (K : I ~ J) → + right-unit-htpy ∙h K ~ + right-whisker-concat-htpy K refl-htpy ∙h right-unit-htpy + right-unit-law-right-whisker-concat-htpy K x = + right-unit-law-right-whisker-concat (K x) +``` diff --git a/src/foundation-core/whiskering-identifications-concatenation.lagda.md b/src/foundation-core/whiskering-identifications-concatenation.lagda.md new file mode 100644 index 0000000000..9710a2cb0e --- /dev/null +++ b/src/foundation-core/whiskering-identifications-concatenation.lagda.md @@ -0,0 +1,333 @@ +# Whiskering identifications with respect to concatenation + +```agda +module foundation-core.whiskering-identifications-concatenation where +``` + +
Imports + +```agda +open import foundation.action-on-identifications-functions +open import foundation.universe-levels +open import foundation.whiskering-operations + +open import foundation-core.homotopies +open import foundation-core.identity-types +``` + +
+ +## Idea + +Consider two [identifications](foundation-core.identity-types.md) `p q : x = y` +in a type `A`. The whiskering operations are operations that take +identifications `p = q` to identifications `r ∙ p = r ∙ q` or to +identifications `p ∙ r = q ∙ r`. + +The +{{#concept "left whiskering" Disambiguation="identifications" Agda=left-whisker-concat}} +operation takes an identification `r : z = x` and an identification `p = q` to +an identification `r ∙ p = r ∙ q`. Similarly, the +{{#concept "right whiskering" Disambiguation="identifications" Agda=right-whisker-concat}} +operation takes an identification `r : y = z` and an identification `p = q` to +an identification `p ∙ r = q ∙ r`. + +The whiskering operations can be defined by the +[acion on identifications](foundation.action-on-identifications-functions.md) of +concatenation. Since concatenation on either side is an +[equivalence](foundation-core.equivalences.md), it follows that the whiskering +operations are equivalences. + +## Definitions + +### Left whiskering of identifications + +Left whiskering of identifications with respect to concatenation is an operation + +```text + (p : x = y) {q r : y = z} → q = r → p ∙ q = p ∙ r +``` + +on any type. + +```agda +module _ + {l : Level} {A : UU l} + where + + left-whisker-concat : left-whiskering-operation A (_=_) (_∙_) (_=_) + left-whisker-concat p β = ap (p ∙_) β + + left-unwhisker-concat : + {x y z : A} (p : x = y) {q r : y = z} → p ∙ q = p ∙ r → q = r + left-unwhisker-concat = is-injective-concat +``` + +### Right whiskering of identifications + +Right whiskering of identifications with respect to concatenation is an +operation + +```text + {p q : x = y} → p = q → (r : y = z) → p ∙ r = q ∙ r +``` + +on any type. + +```agda +module _ + {l : Level} {A : UU l} + where + + right-whisker-concat : right-whiskering-operation A (_=_) (_∙_) (_=_) + right-whisker-concat α q = ap (_∙ q) α + + right-unwhisker-concat : + {x y z : A} {p q : x = y} (r : y = z) → p ∙ r = q ∙ r → p = q + right-unwhisker-concat r = is-injective-concat' r +``` + +### Double whiskering of identifications + +```agda +module _ + {l : Level} {A : UU l} + {a b c d : A} (p : a = b) {r s : b = c} (t : r = s) (q : c = d) + where + + double-whisker-concat : (p ∙ r) ∙ q = (p ∙ s) ∙ q + double-whisker-concat = right-whisker-concat (left-whisker-concat p t) q + + double-whisker-concat' : p ∙ (r ∙ q) = p ∙ (s ∙ q) + double-whisker-concat' = left-whisker-concat p (right-whisker-concat t q) +``` + +## Properties + +### The unit and absorption laws for left whiskering of identifications + +```agda +module _ + {l : Level} {A : UU l} + where + + left-unit-law-left-whisker-concat : + {x y : A} {p p' : x = y} (α : p = p') → + left-whisker-concat refl α = α + left-unit-law-left-whisker-concat refl = refl + + right-absorption-law-left-whisker-concat : + {x y z : A} (p : x = y) (q : y = z) → + left-whisker-concat p (refl {x = q}) = refl + right-absorption-law-left-whisker-concat p q = refl +``` + +### The unit and absorption laws for right whiskering of identifications + +The right unit law for right whiskering of identifications with respect to +concatenation asserts that the square of identifications + +```text + right-whisker-concat α refl + p ∙ refl -----------------------------> p' ∙ refl + | | + right-unit | | + ∨ ∨ + p -------------------------------------> p' +``` + +commutes for any `α : p = p'`. Note that this law is slightly more complicated, +since concatenating with `refl` on the right does not compute to the identity +function. + +```agda +module _ + {l : Level} {A : UU l} + where + + right-unit-law-right-whisker-concat : + {x y : A} {p p' : x = y} (α : p = p') → + right-unit ∙ α = right-whisker-concat α refl ∙ right-unit + right-unit-law-right-whisker-concat {p = refl} refl = refl + + left-absorption-law-right-whisker-concat : + {x y z : A} (p : x = y) (q : y = z) → + right-whisker-concat (refl {x = p}) q = refl + left-absorption-law-right-whisker-concat p q = refl +``` + +### Commutativity of left and right whiskering of identifications + +Consider four identifications `p p' : x = y` and `q q' : y = z` in a type `A`. +Then the square of identifications + +```text + right-whisker α q + p ∙ q ---------------------> p' ∙ q + | | + left-whisker p β | | left-whisker p' β + ∨ ∨ + p ∙ q' --------------------> p' ∙ q' + right-whisker α q' +``` + +commutes. There are at least two natural ways in which this square is seen to +commute: + +1. The square commutes by naturality of the homotopy + `α ↦ left-whisker-concat α β`. +2. The transposed square commutes by the naturality of the homotopy + `β ↦ right-whisker-concat α β`. + +These two ways in which the square commutes are inverse to each other. + +**Note.** The following statements could have been formalized using +[commuting squares of identifications](foundation.commuting-squares-of-identifications.md). +However, in order to avoid cyclic module dependencies in the library we avoid +doing so. + +```agda +module _ + {l : Level} {A : UU l} {x y z : A} + where + + commutative-left-whisker-right-whisker-concat : + {q q' : y = z} (β : q = q') {p p' : x = y} (α : p = p') → + left-whisker-concat p β ∙ right-whisker-concat α q' = + right-whisker-concat α q ∙ left-whisker-concat p' β + commutative-left-whisker-right-whisker-concat β = + nat-htpy (λ α → left-whisker-concat α β) + + commutative-right-whisker-left-whisker-concat : + {p p' : x = y} (α : p = p') {q q' : y = z} (β : q = q') → + right-whisker-concat α q ∙ left-whisker-concat p' β = + left-whisker-concat p β ∙ right-whisker-concat α q' + commutative-right-whisker-left-whisker-concat α = + nat-htpy (right-whisker-concat α) + + compute-inv-commutative-left-whisker-right-whisker-concat : + {q q' : y = z} (β : q = q') {p p' : x = y} (α : p = p') → + inv (commutative-right-whisker-left-whisker-concat α β) = + commutative-left-whisker-right-whisker-concat β α + compute-inv-commutative-left-whisker-right-whisker-concat refl refl = + refl +``` + +### Swapping the order of left and right whiskering of identifications + +Consider a diagram of identifications + +```text + r + p -----> q + a -----> b -----> c -----> + s +``` + +with `t : r = s`. Then the square of identifications + +```text + assoc p r q + (p ∙ r) ∙ q -------------> p ∙ (r ∙ q) + | | + double-whisker p t q | | double-whisker' p t q + ∨ ∨ + (p ∙ s) ∙ q -------------> p ∙ (s ∙ q) + assoc p s q +``` + +commutes. + +```agda +module _ + {l1 : Level} {A : UU l1} + where + + swap-double-whisker-concat : + {a b c d : A} (p : a = b) {r s : b = c} (t : r = s) (q : c = d) → + double-whisker-concat p t q ∙ assoc p s q = + assoc p r q ∙ double-whisker-concat' p t q + swap-double-whisker-concat refl refl refl = refl +``` + +### The action on identifications of concatenating by `refl` on the right + +Consider an identification `r : p = q` between two identifications +`p q : x = y` in a type `A`. Then the square of identifications + +```text + right-whisker r refl + p ∙ refl ----------------------> q ∙ refl + | | + right-unit | | right-unit + ∨ ∨ + p -----------------------------> q + r +``` + +commutes. + +```agda +module _ + {l : Level} {A : UU l} {x y : A} {p q : x = y} + where + + compute-refl-right-whisker-concat : + (r : p = q) → + right-unit ∙ r = right-whisker-concat r refl ∙ right-unit + compute-refl-right-whisker-concat refl = right-unit +``` + +### Left whiskering of identifications distributes over concatenation + +```agda +module _ + {l : Level} {A : UU l} + where + + distributive-left-whisker-concat-concat : + {a b c : A} (p : a = b) {q r s : b = c} (α : q = r) (β : r = s) → + left-whisker-concat p (α ∙ β) = + left-whisker-concat p α ∙ left-whisker-concat p β + distributive-left-whisker-concat-concat p refl β = refl +``` + +### Right whiskering of identifications distributes over concatenation + +```agda +module _ + {l : Level} {A : UU l} + where + + distributive-right-whisker-concat-concat : + {a b c : A} {p q r : a = b} (α : p = q) (β : q = r) (s : b = c) → + right-whisker-concat (α ∙ β) s = + right-whisker-concat α s ∙ right-whisker-concat β s + distributive-right-whisker-concat-concat refl β s = refl +``` + +### Left whiskering of identifications commutes with inverses of identifications + +```agda +module _ + {l : Level} {A : UU l} + where + + compute-inv-left-whisker-concat : + {a b c : A} (p : a = b) {q r : b = c} (s : q = r) → + left-whisker-concat p (inv s) = inv (left-whisker-concat p s) + compute-inv-left-whisker-concat p s = ap-inv (concat p _) s +``` + +### Right whiskering of identifications commutes with inverses of identifications + +```agda +module _ + {l : Level} {A : UU l} + where + + compute-inv-right-whisker-concat : + {a b c : A} {p q : a = b} (s : p = q) (r : b = c) → + right-whisker-concat (inv s) r = inv (right-whisker-concat s r) + compute-inv-right-whisker-concat s r = ap-inv (concat' _ r) s +``` diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md index 00cfe1d5a0..827eff16f9 100644 --- a/src/foundation.lagda.md +++ b/src/foundation.lagda.md @@ -1,5 +1,9 @@ # Foundation +```agda +{-# OPTIONS --guardedness #-} +``` + ## Files in the foundation folder ```agda @@ -161,6 +165,8 @@ open import foundation.fibered-equivalences public open import foundation.fibered-involutions public open import foundation.fibered-maps public open import foundation.fibers-of-maps public +open import foundation.finitely-coherent-equivalences public +open import foundation.finitely-coherently-invertible-maps public open import foundation.full-subtypes public open import foundation.function-extensionality public open import foundation.function-types public @@ -195,6 +201,7 @@ open import foundation.implicit-function-types public open import foundation.impredicative-encodings public open import foundation.impredicative-universes public open import foundation.induction-principle-propositional-truncation public +open import foundation.infinitely-coherent-equivalences public open import foundation.inhabited-subtypes public open import foundation.inhabited-types public open import foundation.injective-maps public @@ -363,6 +370,8 @@ open import foundation.transport-along-homotopies public open import foundation.transport-along-identifications 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 +open import foundation.transposition-identifications-along-sections public open import foundation.transposition-span-diagrams public open import foundation.trivial-relaxed-sigma-decompositions public open import foundation.trivial-sigma-decompositions public diff --git a/src/foundation/action-on-higher-identifications-functions.lagda.md b/src/foundation/action-on-higher-identifications-functions.lagda.md index 1553a81b60..b09a5cf131 100644 --- a/src/foundation/action-on-higher-identifications-functions.lagda.md +++ b/src/foundation/action-on-higher-identifications-functions.lagda.md @@ -8,10 +8,10 @@ module foundation.action-on-higher-identifications-functions where ```agda open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-identifications open import foundation.path-algebra open import foundation.universe-levels +open import foundation-core.commuting-squares-of-identifications open import foundation-core.constant-maps open import foundation-core.function-types open import foundation-core.homotopies diff --git a/src/foundation/action-on-homotopies-functions.lagda.md b/src/foundation/action-on-homotopies-functions.lagda.md index cd4c2023db..0bb5100c4c 100644 --- a/src/foundation/action-on-homotopies-functions.lagda.md +++ b/src/foundation/action-on-homotopies-functions.lagda.md @@ -11,13 +11,13 @@ open import foundation.action-on-higher-identifications-functions open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.function-extensionality -open import foundation.homotopies open import foundation.homotopy-induction open import foundation.universe-levels open import foundation-core.constant-maps open import foundation-core.contractible-types open import foundation-core.function-types +open import foundation-core.homotopies open import foundation-core.identity-types ``` diff --git a/src/foundation/action-on-identifications-binary-functions.lagda.md b/src/foundation/action-on-identifications-binary-functions.lagda.md index 3de92507d4..d9d2b1d339 100644 --- a/src/foundation/action-on-identifications-binary-functions.lagda.md +++ b/src/foundation/action-on-identifications-binary-functions.lagda.md @@ -28,6 +28,23 @@ Given a binary operation `f : A → B → C` and we call this the {{#concept "binary action on identifications of binary functions" Agda=ap-binary}}. +There are a few different ways we can define `ap-binary`. We could define it by +pattern matching on both `p` and `q`, but this leads to restricted computational +behaviour. Instead, we define it as the upper concatenation in the Gray +interchanger diagram + +```text + ap (r ↦ f x r) q + f x y -------------> f x y' + | | + | | + ap (r ↦ f r y) p | | ap (r ↦ f r y') p + | | + ∨ ∨ + f x' y ------------> f x' y'. + ap (r ↦ f x' r) q +``` + ## Definition ### The binary action on identifications of binary functions @@ -39,7 +56,7 @@ module _ ap-binary : {x x' : A} (p : x = x') {y y' : B} (q : y = y') → f x y = f x' y' - ap-binary refl refl = refl + ap-binary {x} {x'} p {y} {y'} q = ap (λ r → f r y) p ∙ ap (f x') q ``` ## Properties @@ -51,13 +68,13 @@ of the [unary action on identifications of functions](foundation.action-on-identifications-functions.md): ```text - ap-binary f p q = ap (f (-) y) p ∙ ap (f x' (-)) q + ap-binary f p q = ap (r ↦ f r y) p ∙ ap (r ↦ f x' r) q ``` and ```text - ap-binary f p q = ap (f x (-)) q ∙ ap (f (-) y') p. + ap-binary f p q = ap (r ↦ f x r) q ∙ ap (r ↦ f r y') p. ``` ```agda @@ -67,12 +84,12 @@ module _ triangle-ap-binary : {x x' : A} (p : x = x') {y y' : B} (q : y = y') → - ap-binary f p q = ap (λ z → f z y) p ∙ ap (f x') q - triangle-ap-binary refl refl = refl + ap-binary f p q = ap (λ r → f r y) p ∙ ap (f x') q + triangle-ap-binary _ _ = refl triangle-ap-binary' : {x x' : A} (p : x = x') {y y' : B} (q : y = y') → - ap-binary f p q = ap (f x) q ∙ ap (λ z → f z y') p + ap-binary f p q = ap (f x) q ∙ ap (λ r → f r y') p triangle-ap-binary' refl refl = refl ``` @@ -89,10 +106,10 @@ module _ left-unit-ap-binary : {x : A} {y y' : B} (q : y = y') → ap-binary f refl q = ap (f x) q - left-unit-ap-binary refl = refl + left-unit-ap-binary _ = refl right-unit-ap-binary : - {x x' : A} (p : x = x') {y : B} → ap-binary f p refl = ap (λ z → f z y) p + {x x' : A} (p : x = x') {y : B} → ap-binary f p refl = ap (λ r → f r y) p right-unit-ap-binary refl = refl ``` @@ -120,7 +137,7 @@ module _ where ap-binary-diagonal : - {x x' : A} (p : x = x') → ap-binary f p p = ap (λ a → f a a) p + {x x' : A} (p : x = x') → ap-binary f p p = ap (λ r → f r r) p ap-binary-diagonal refl = refl ``` diff --git a/src/foundation/automorphisms.lagda.md b/src/foundation/automorphisms.lagda.md index bc5d12d351..183752d129 100644 --- a/src/foundation/automorphisms.lagda.md +++ b/src/foundation/automorphisms.lagda.md @@ -8,10 +8,10 @@ module foundation.automorphisms where ```agda open import foundation.dependent-pair-types -open import foundation.sets open import foundation.universe-levels open import foundation-core.equivalences +open import foundation-core.sets open import structured-types.pointed-types ``` diff --git a/src/foundation/coherently-invertible-maps.lagda.md b/src/foundation/coherently-invertible-maps.lagda.md index 9bc14bb139..d43a5f5702 100644 --- a/src/foundation/coherently-invertible-maps.lagda.md +++ b/src/foundation/coherently-invertible-maps.lagda.md @@ -15,15 +15,16 @@ open import foundation.equivalences open import foundation.identity-types open import foundation.type-arithmetic-dependent-pair-types open import foundation.universe-levels -open import foundation.whiskering-homotopies-composition +open import foundation.whiskering-higher-homotopies-composition +open import foundation-core.commuting-squares-of-homotopies open import foundation-core.contractible-maps open import foundation-core.contractible-types open import foundation-core.fibers-of-maps -open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.homotopies open import foundation-core.propositions +open import foundation-core.retractions open import foundation-core.sections open import foundation-core.type-theoretic-principle-of-choice ``` @@ -32,68 +33,100 @@ open import foundation-core.type-theoretic-principle-of-choice ## Properties +### Coherently invertible maps have a contractible type of sections + +**Proof:** Since coherently invertible maps are +[contractible maps](foundation.contractible-maps.md), and products of +[contractible types](foundation-core.contractible-types.md) are contractible, it +follows that the type + +```text + (b : B) → fiber f b +``` + +is contractible, for any coherently invertible map `f`. However, by the +[type theoretic principle of choice](foundation.type-theoretic-principle-of-choice.md) +it follows that this type is equivalent to the type + +```text + Σ (B → A) (λ g → (b : B) → f (g b) = b), +``` + +which is the type of [sections](foundation.sections.md) of `f`. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} + where + + abstract + is-contr-section-is-coherently-invertible : + {f : A → B} → is-coherently-invertible f → is-contr (section f) + is-contr-section-is-coherently-invertible {f} F = + is-contr-equiv' + ( (b : B) → fiber f b) + ( distributive-Π-Σ) + ( is-contr-Π (is-contr-map-is-coherently-invertible F)) +``` + ### Being coherently invertible is a property ```agda -abstract - is-prop-is-coherently-invertible : - {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → - is-prop (is-coherently-invertible f) - is-prop-is-coherently-invertible {A = A} {B} f = - is-prop-is-proof-irrelevant - ( λ H → - is-contr-equiv' - ( Σ ( section f) - ( λ s → - Σ ( ( map-section f s ∘ f) ~ id) - ( λ H → - ( right-whisker-comp (is-section-map-section f s) f) ~ - ( left-whisker-comp f H)))) - ( associative-Σ - ( B → A) - ( λ g → (f ∘ g) ~ id) - ( λ s → - Σ ( ( map-section f s ∘ f) ~ id) - ( λ H → - ( right-whisker-comp (is-section-map-section f s) f) ~ - ( left-whisker-comp f H)))) - ( is-contr-Σ - ( is-contr-section-is-equiv (is-equiv-is-coherently-invertible H)) - ( section-is-coherently-invertible H) - ( is-contr-equiv' - ( (x : A) → - Σ ( map-inv-is-coherently-invertible H (f x) = x) - ( λ p → - is-retraction-is-coherently-invertible H (f x) = ap f p)) - ( distributive-Π-Σ) - ( is-contr-Π - ( λ x → - is-contr-equiv' - ( fiber - ( ap f) - ( is-retraction-is-coherently-invertible H (f x))) - ( equiv-tot - ( λ p → - equiv-inv - ( ap f p) - ( is-retraction-is-coherently-invertible H (f x)))) - ( is-contr-map-is-equiv - ( is-emb-is-equiv - ( is-equiv-is-coherently-invertible H) - ( map-inv-is-coherently-invertible H (f x)) x) - ( is-retraction-is-coherently-invertible H (f x)))))))) - -abstract - is-equiv-is-coherently-invertible-is-equiv : - {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → - is-equiv (is-coherently-invertible-is-equiv {f = f}) - is-equiv-is-coherently-invertible-is-equiv f = - is-equiv-is-prop - ( is-property-is-equiv f) - ( is-prop-is-coherently-invertible f) - ( is-equiv-is-coherently-invertible) +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) + where + + abstract + is-proof-irrelevant-is-coherently-invertible : + is-proof-irrelevant (is-coherently-invertible f) + is-proof-irrelevant-is-coherently-invertible H = + is-contr-equiv' + ( _) + ( associative-Σ _ _ _) + ( is-contr-Σ + ( is-contr-section-is-coherently-invertible H) + ( section-is-coherently-invertible H) + ( is-contr-equiv' + ( _) + ( distributive-Π-Σ) + ( is-contr-Π + ( λ x → + is-contr-equiv' + ( _) + ( equiv-tot + ( λ p → + equiv-inv + ( ap f p) + ( is-section-map-inv-is-coherently-invertible H (f x)))) + ( is-contr-map-is-coherently-invertible + ( is-coherently-invertible-ap-is-coherently-invertible H) + ( is-section-map-inv-is-coherently-invertible H (f x))))))) + + abstract + is-prop-is-coherently-invertible : is-prop (is-coherently-invertible f) + is-prop-is-coherently-invertible = + is-prop-is-proof-irrelevant is-proof-irrelevant-is-coherently-invertible + + abstract + is-equiv-is-coherently-invertible-is-equiv : + is-equiv (is-coherently-invertible-is-equiv {f = f}) + is-equiv-is-coherently-invertible-is-equiv = + is-equiv-is-prop + ( is-property-is-equiv f) + ( is-prop-is-coherently-invertible) + ( is-equiv-is-coherently-invertible) ``` +### Being transpose coherently invertible is a property + +This remains to be formalized. + +## References + +1. Univalent Foundations Project, _Homotopy Type Theory – Univalent Foundations + of Mathematics_ (2013) ([website](https://homotopytypetheory.org/book/), + [arXiv:1308.0729](https://arxiv.org/abs/1308.0729)) + ## See also - For the notion of biinvertible maps see diff --git a/src/foundation/commuting-cubes-of-maps.lagda.md b/src/foundation/commuting-cubes-of-maps.lagda.md index 237b5b60df..ea104d58ec 100644 --- a/src/foundation/commuting-cubes-of-maps.lagda.md +++ b/src/foundation/commuting-cubes-of-maps.lagda.md @@ -17,11 +17,11 @@ open import foundation.homotopies open import foundation.path-algebra open import foundation.universe-levels open import foundation.whiskering-homotopies-composition -open import foundation.whiskering-identifications-concatenation open import foundation-core.function-types open import foundation-core.identity-types open import foundation-core.precomposition-functions +open import foundation-core.whiskering-identifications-concatenation ```
diff --git a/src/foundation/commuting-prisms-of-maps.lagda.md b/src/foundation/commuting-prisms-of-maps.lagda.md index de583eb4b9..0c374973c9 100644 --- a/src/foundation/commuting-prisms-of-maps.lagda.md +++ b/src/foundation/commuting-prisms-of-maps.lagda.md @@ -10,7 +10,6 @@ open import foundation-core.commuting-prisms-of-maps public ```agda open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-homotopies open import foundation.commuting-squares-of-maps open import foundation.commuting-triangles-of-maps open import foundation.composition-algebra @@ -22,6 +21,7 @@ open import foundation.precomposition-functions open import foundation.universe-levels open import foundation.whiskering-homotopies-composition +open import foundation-core.commuting-squares-of-homotopies open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.functoriality-dependent-function-types @@ -96,13 +96,22 @@ module _ ( right-whisker-concat-coherence-square-homotopies ( front-bottom ·r hA) ( bottom ·r hA' ·r hA) + ( hC' ·l mid ·r hA) + ( ( pasting-horizontal-coherence-square-maps + h' g' hA' hB' hC' h'' g'' left-bottom right-bottom) ·r + ( hA)) + ( prism-bottom ·r hA) ( hC' ·l ((g' ·l left-top) ∙h (right-top ·r h))) - ( prism-bottom ·r hA)) ∙h + ) ∙h ( ap-concat-htpy ( front-bottom ·r hA) ( ( map-coherence-square-homotopies hC' ( front-top) ( mid ·r hA) + (hC ·l top) + ( pasting-horizontal-coherence-square-maps h g hA hB hC h' g' + ( left-top) + ( right-top)) ( prism-top)) ∙h ( ap-concat-htpy ( hC' ·l front-top) diff --git a/src/foundation/commuting-squares-of-homotopies.lagda.md b/src/foundation/commuting-squares-of-homotopies.lagda.md index 5ae628881b..fa4657be1f 100644 --- a/src/foundation/commuting-squares-of-homotopies.lagda.md +++ b/src/foundation/commuting-squares-of-homotopies.lagda.md @@ -10,282 +10,534 @@ open import foundation-core.commuting-squares-of-homotopies public ```agda open import foundation.commuting-squares-of-identifications -open import foundation.functoriality-dependent-function-types +open import foundation.dependent-pair-types open import foundation.universe-levels -open import foundation.whiskering-homotopies-composition open import foundation-core.equivalences +open import foundation-core.functoriality-dependent-function-types open import foundation-core.homotopies +open import foundation-core.identity-types ```
## Idea -A square of [homotopies](foundation-core.homotopies.md) +A square of [homotopies](foundation-core.identity-types.md) ```text - top - f ------> g - | | - left | | right - v v - h ------> i - bottom + top + f -------> g + | | + left | | right + ∨ ∨ + h -------> i + bottom ``` -is said to be a {{#concept "commuting square" Disambiguation="homotopies"}} of -homotopies if there is a homotopy `left ∙h bottom ~ top ∙h right `. Such a -homotopy is called a +is said to be a +{{#concept "commuting square" Disambiguation="homotopies" Agda=coherence-square-homotopies}} +if there is a homotopy `left ∙h bottom ~ top ∙h right`. Such a homotopy is +called a {{#concept "coherence" Disambiguation="commuting square of homotopies" Agda=coherence-square-homotopies}} of the square. -### Right whiskering a commuting square of homotopies with respect to concatenation of homotopies +### Concatenating homotopies of edges and coherences of commuting squares of homotopies -Consider a -[commuting square of homotopies](foundation.commuting-squares-of-homotopies.md) +Consider a commuting square of homotopies and a homotopy of one of the four +sides with another homotopy, as for example in the diagram below: ```text - top - f ------> g - | | - left | | right - v v - h ------> i - bottom + top + a ---------> b + | | | + left | right |~| right' + ∨ ∨ ∨ + c ---------> d. + bottom ``` -and consider a homotopy `H : i ~ j`. Then there is an equivalence of commuting -squares of homotopies +Then any homotopy witnessing that the square commutes can be concatenated with +the homotopy on the side, to obtain a new commuting square of homotopies. + +#### Concatenating homotopies of the top edge with a coherence of a commuting square of homotopies + +Consider a commuting diagram of homotopies ```text - top top - f ------> g f -------------> g - | | | | - left | | right ≃ left | | right ∙h H - ∨ ∨ ∨ ∨ - h ------> i h -------------> j - bottom bottom ∙h H + top' + -------> + f -------> g + | top | + left | | right + ∨ ∨ + h -------> i. + bottom ``` -This is the -{{#concept "right whiskering" Disambiguation="commuting squares of homotopies with respect to concatenation" Agda=right-whisker-concat-coherence-square-homotopies}} -operation of commuting squares of homotopies with respect to concatenation. +with a homotopy `top ~ top'`. Then we get an equivalence + +```text + top top' + f -------> g f -------> g + | | | | + left | | right ≃ left | | right + ∨ ∨ ∨ ∨ + h -------> i h -------> i. + bottom bottom +``` ```agda module _ - { l1 l2 : Level} {A : UU l1} {B : UU l2} - { f g g' h k : A → B} - ( H : f ~ g) (H' : f ~ g') {K : g ~ h} {K' : g' ~ h} (L : h ~ k) + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + {top' : f ~ g} (s : top ~ top') where - equiv-right-whisker-concat-coherence-square-homotopies : - coherence-square-homotopies H H' K K' ≃ - coherence-square-homotopies H H' (K ∙h L) (K' ∙h L) - equiv-right-whisker-concat-coherence-square-homotopies = - equiv-Π-equiv-family - ( λ a → - equiv-right-whisker-concat-coherence-square-identifications - ( H a) - ( H' a) - ( K a) - ( K' a) - ( L a)) - - right-whisker-concat-coherence-square-homotopies : - coherence-square-homotopies H H' K K' → - coherence-square-homotopies H H' (K ∙h L) (K' ∙h L) - right-whisker-concat-coherence-square-homotopies = - map-equiv equiv-right-whisker-concat-coherence-square-homotopies - - right-unwhisker-concat-htpy-coherence-square-homotopies : - coherence-square-homotopies H H' (K ∙h L) (K' ∙h L) → - coherence-square-homotopies H H' K K' - right-unwhisker-concat-htpy-coherence-square-homotopies = - map-inv-equiv equiv-right-whisker-concat-coherence-square-homotopies + abstract + is-equiv-concat-top-homotopy-coherence-square-homotopies : + is-equiv + ( concat-top-homotopy-coherence-square-homotopies + top left right bottom s) + is-equiv-concat-top-homotopy-coherence-square-homotopies = + is-equiv-map-Π-is-fiberwise-equiv + ( λ x → + is-equiv-concat-top-identification-coherence-square-identifications + ( top x) (left x) (right x) (bottom x) (s x)) + + equiv-concat-top-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies top' left right bottom + pr1 equiv-concat-top-homotopy-coherence-square-homotopies = + concat-top-homotopy-coherence-square-homotopies top left right bottom s + pr2 equiv-concat-top-homotopy-coherence-square-homotopies = + is-equiv-concat-top-homotopy-coherence-square-homotopies ``` -### Left whiskering a commuting square of homotopies with respect to concatenation of homotopies +#### Concatenating homotopies of the left edge with a coherence of a commuting square of homotopies + +Consider a commuting diagram of homotopies + +```text + top + f -------> g + | | | + left' | | left | right + ∨ ∨ ∨ + h -------> i. + bottom +``` -Consider a -[commuting square of homotopies](foundation.commuting-squares-of-homotopies.md) +with a homotopy `left ~ left'`. Then we get an equivalence ```text - top - f ------> g - | | - left | | right - v v - h ------> i - bottom + top top + f -------> g f -------> g + | | | | + left | | right ≃ left' | | right + ∨ ∨ ∨ ∨ + h -------> i h -------> i. + bottom bottom ``` -and consider a homotopy `H : e ~ f`. Then there is an equivalence of commuting -squares of homotopies +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + {left' : f ~ h} (s : left ~ left') + where + + abstract + is-equiv-concat-left-homotopy-coherence-square-homotopies : + is-equiv + ( concat-left-homotopy-coherence-square-homotopies + top left right bottom s) + is-equiv-concat-left-homotopy-coherence-square-homotopies = + is-equiv-map-Π-is-fiberwise-equiv + ( λ x → + is-equiv-concat-left-identification-coherence-square-identifications + ( top x) (left x) (right x) (bottom x) (s x)) + + equiv-concat-left-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies top left' right bottom + pr1 equiv-concat-left-homotopy-coherence-square-homotopies = + concat-left-homotopy-coherence-square-homotopies top left right bottom s + pr2 equiv-concat-left-homotopy-coherence-square-homotopies = + is-equiv-concat-left-homotopy-coherence-square-homotopies +``` + +#### Concatenating homotopies of the right edge with a coherence of a commuting square of homotopies + +Consider a commuting diagram of homotopies ```text - top H ∙h top - f ------> g e ----------> g - | | | | - left | | right ≃ H ∙h left | | right - ∨ ∨ ∨ ∨ - h ------> i h ----------> i - bottom bottom + top + f -------> g + | | | + left | right | | right' + ∨ ∨ ∨ + h -------> i. + bottom ``` -This is the -{{#concept "left whiskering" Disambiguation="commuting squares of homotopies with respect to concatenation" Agda=left-whisker-concat-coherence-square-homotopies}} -operation of commuting squares of homotopies with respect to concatenation. +with a homotopy `right ~ right'`. Then we get an equivalence + +```text + top top + f -------> g f -------> g + | | | | + left | | right ≃ left | | right' + ∨ ∨ ∨ ∨ + h -------> i h -------> i. + bottom bottom +``` ```agda module _ - { l1 l2 : Level} {A : UU l1} {B : UU l2} - { f g g' h k : A → B} - ( L : k ~ f) {H : f ~ g} {H' : f ~ g'} {K : g ~ h} {K' : g' ~ h} + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + {right' : g ~ i} (s : right ~ right') where - equiv-left-whisker-concat-coherence-square-homotopies : - ( coherence-square-homotopies H H' K K') ≃ - ( coherence-square-homotopies (L ∙h H) (L ∙h H') K K') - equiv-left-whisker-concat-coherence-square-homotopies = - equiv-Π-equiv-family - ( λ a → - equiv-left-whisker-concat-coherence-square-identifications - ( L a) - ( H a) - ( H' a) - ( K a) - ( K' a)) - - left-whisker-concat-coherence-square-homotopies : - coherence-square-homotopies H H' K K' → - coherence-square-homotopies (L ∙h H) (L ∙h H') K K' - left-whisker-concat-coherence-square-homotopies = - map-equiv equiv-left-whisker-concat-coherence-square-homotopies - - left-unwhisker-concat-htpy-coherence-square-homotopies : - coherence-square-homotopies (L ∙h H) (L ∙h H') K K' → - coherence-square-homotopies H H' K K' - left-unwhisker-concat-htpy-coherence-square-homotopies = - map-inv-equiv equiv-left-whisker-concat-coherence-square-homotopies + abstract + is-equiv-concat-right-homotopy-coherence-square-homotopies : + is-equiv + ( concat-right-homotopy-coherence-square-homotopies + top left right bottom s) + is-equiv-concat-right-homotopy-coherence-square-homotopies = + is-equiv-map-Π-is-fiberwise-equiv + ( λ x → + is-equiv-concat-right-identification-coherence-square-identifications + ( top x) (left x) (right x) (bottom x) (s x)) + + equiv-concat-right-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies top left right' bottom + pr1 equiv-concat-right-homotopy-coherence-square-homotopies = + concat-right-homotopy-coherence-square-homotopies top left right bottom s + pr2 equiv-concat-right-homotopy-coherence-square-homotopies = + is-equiv-concat-right-homotopy-coherence-square-homotopies +``` + +#### Concatenating homotopies of the bottom edge with a coherence of a commuting square of homotopies + +Consider a commuting diagram of homotopies + +```text + top + f -------> g + | | + left | | right + ∨ bottom ∨ + h -------> i. + -------> + bottom' +``` + +with a homotopy `bottom ~ bottom'`. Then we get an equivalence + +```text + top top + f -------> g f -------> g + | | | | + left | | right ≃ left | | right + ∨ ∨ ∨ ∨ + h -------> i h -------> i. + bottom bottom' +``` + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + {bottom' : h ~ i} (s : bottom ~ bottom') + where + + is-equiv-concat-bottom-homotopy-coherence-square-homotopies : + is-equiv + ( concat-bottom-homotopy-coherence-square-homotopies + top left right bottom s) + is-equiv-concat-bottom-homotopy-coherence-square-homotopies = + is-equiv-map-Π-is-fiberwise-equiv + ( λ x → + is-equiv-concat-bottom-identification-coherence-square-identifications + ( top x) (left x) (right x) (bottom x) (s x)) + + equiv-concat-bottom-homotopy-coherence-square-homotopies : + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies top left right bottom' + pr1 equiv-concat-bottom-homotopy-coherence-square-homotopies = + concat-bottom-homotopy-coherence-square-homotopies top left right bottom s + pr2 equiv-concat-bottom-homotopy-coherence-square-homotopies = + is-equiv-concat-bottom-homotopy-coherence-square-homotopies +``` + +### Whiskering and splicing coherences of commuting squares of homotopies + +Given a commuting square of homotopies + +```text + top + f -------> g + | | + left | | right + ∨ ∨ + h -------> i, + bottom ``` -### Left whiskering a commuting square of homotopies with respect to concatenation of homotopies +we may consider four ways of attaching new homotopies to it: + +1. Prepending `p : u ~ f` to the left gives us a commuting square + + ```text + p ∙h top + u -------> g + | | + p ∙h left | | right + ∨ ∨ + h -------> i. + bottom + ``` + + More precisely, we have an equivalence -Consider a -[commuting square of homotopies](foundation.commuting-squares-of-homotopies.md) + ```text + (left ∙h bottom ~ top ∙h right) ≃ ((p ∙h left) ∙h bottom ~ (p ∙h top) ∙h right). + ``` + +2. Appending a homotopy `p : i ~ u` to the right gives a commuting square of + homotopies + + ```text + top + f ------------> g + | | + left | | right ∙h p + ∨ ∨ + h ------------> u. + bottom ∙h p + ``` + + More precisely, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ (left ∙h (bottom ∙h p) ~ top ∙h (right ∙h p)). + ``` + +3. Splicing a homotopy `p : h ~ u` and its inverse into the middle gives a + commuting square of homotopies + + ```text + top + f --------------> g + | | + left ∙h p | | right + ∨ ∨ + u --------------> i. + p⁻¹ ∙h bottom + ``` + + More precisely, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ ((left ∙h p) ∙h (p⁻¹ ∙h bottom) ~ top ∙h right). + ``` + + Similarly, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ ((left ∙h p⁻¹) ∙h (p ∙h bottom) ~ top ∙h right). + ``` + +4. Splicing a homotopy `p : g ~ u` and its inverse into the middle gives a + commuting square of homotopies + + ```text + top ∙h p + f --------> u + | | + left | | p⁻¹ ∙h right + ∨ ∨ + h --------> i. + bottom + ``` + + More precisely, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ (left ∙h bottom ~ (top ∙h p) ∙h (p⁻¹ ∙h right)). + ``` + + Similarly, we have an equivalence + + ```text + (left ∙h bottom ~ top ∙h right) ≃ (left ∙h bottom ~ (top ∙h p⁻¹) ∙h (p ∙h right)). + ``` + +These operations are useful in proofs involving homotopy algebra, because taking +`equiv-right-whisker-concat-coherence-square-homotopies` as an example, it +provides us with two maps: the forward direction states +`(p ∙h r ~ q ∙h s) → (p ∙h (r ∙h t)) ~ q ∙h (s ∙h t))`, which allows one to +append a homotopy without needing to reassociate on the right, and the backwards +direction conversely allows one to cancel out a homotopy in parentheses. + +#### Left whiskering coherences of commuting squares of homotopies + +For any homotopy `p : u ~ f` we obtain an equivalence ```text - top - f ------> g - | | - left | | right - v v - h ------> i - bottom + top p ∙h top + f -------> g u -------> g + | | | | + left | | right ≃ p ∙h left | | right + ∨ ∨ ∨ ∨ + h -------> i h -------> i + bottom bottom +``` + +of coherences of commuting squares of homotopies. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i u : (x : A) → B x} + where + + equiv-left-whisker-concat-coherence-square-homotopies : + (p : u ~ f) + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) → + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies (p ∙h top) (p ∙h left) right bottom + equiv-left-whisker-concat-coherence-square-homotopies + p top left right bottom = + equiv-Π-equiv-family + ( λ x → + equiv-left-whisker-concat-coherence-square-identifications + ( p x) (top x) (left x) (right x) (bottom x)) ``` -and consider a homotopy `H : e ~ f`. Then there is an equivalence of commuting -squares of homotopies +#### Right whiskering coherences of commuting squares of homotopies + +For any homotopy `p : i ~ u` we obtain an equivalence ```text - top H ∙h top - f ------> g e ----------> g - | | | | - left | | right ≃ H ∙h left | | right - ∨ ∨ ∨ ∨ - h ------> i h ----------> i - bottom bottom + top top + f -------> g f ------------> g + | | | | + left | | right ≃ left | | right ∙h p + ∨ ∨ ∨ ∨ + h -------> i h ------------> i + bottom bottom ∙h p ``` -This is the -{{#concept "double whiskering" Disambiguation="commuting squares of homotopies with respect to concatenation" Agda=double-whisker-coherence-square-homotopies}} -operation of commuting squares of homotopies with respect to concatenation. +of coherences of commuting squares of homotopies. ```agda module _ - { l1 l2 : Level} {A : UU l1} {B : UU l2} - { f g h h' k m : A → B} - ( H : f ~ g) {K : g ~ h} {K' : g ~ h'} {L : h ~ k} {L' : h' ~ k} (M : k ~ m) + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) where - equiv-double-whisker-coherence-square-homotopies : - ( coherence-square-homotopies K K' L L') ≃ - ( coherence-square-homotopies (H ∙h K) (H ∙h K') (L ∙h M) (L' ∙h M)) - equiv-double-whisker-coherence-square-homotopies = + equiv-right-whisker-concat-coherence-square-homotopies : + {u : (x : A) → B x} (p : i ~ u) → + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies top left (right ∙h p) (bottom ∙h p) + equiv-right-whisker-concat-coherence-square-homotopies p = equiv-Π-equiv-family - ( λ a → - equiv-double-whisker-square-identifications - ( H a) - ( K a) - ( K' a) - ( L a) - ( L' a) - ( M a)) - - double-whisker-coherence-square-homotopies : - ( coherence-square-homotopies K K' L L') → - ( coherence-square-homotopies (H ∙h K) (H ∙h K') (L ∙h M) (L' ∙h M)) - double-whisker-coherence-square-homotopies = - map-equiv equiv-double-whisker-coherence-square-homotopies - - double-unwhisker-concat-htpy-coherence-square-homotopies : - ( coherence-square-homotopies (H ∙h K) (H ∙h K') (L ∙h M) (L' ∙h M)) → - ( coherence-square-homotopies K K' L L') - double-unwhisker-concat-htpy-coherence-square-homotopies = - map-inv-equiv equiv-double-whisker-coherence-square-homotopies + ( λ x → + equiv-right-whisker-concat-coherence-square-identifications + ( top x) (left x) (right x) (bottom x) (p x)) ``` -### Whiskering a square of homotopies by a map +#### Left splicing coherences of commuting squares of homotopies -Given a square of homotopies +For any inverse pair of homotopies `p : g ~ u` and `q : u ~ g` equipped with +`α : inv-htpy p ~ q` we obtain an equivalence ```text - H - g -----> h - | | - H' | ⇗ | K - ∨ ∨ - h' -----> k - K' + top top + f -------> g f -----------> g + | | | | + left | | right ≃ left ∙h p | | right + ∨ ∨ ∨ ∨ + h -------> i u -----------> i + bottom q ∙h bottom +``` + +of coherences of commuting squares of homotopies. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) + where + + equiv-left-splice-coherence-square-homotopies : + {u : (x : A) → B x} (p : h ~ u) (q : u ~ h) (α : inv-htpy p ~ q) → + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies top (left ∙h p) right (q ∙h bottom) + equiv-left-splice-coherence-square-homotopies p q α = + equiv-Π-equiv-family + ( λ x → + equiv-left-splice-coherence-square-identifications + ( top x) (left x) (right x) (bottom x) (p x) (q x) (α x)) ``` -and a map `f`, we may whisker it by a map on the left into a square of -homotopies +#### Right splicing coherences of commuting squares of homotopies + +For any inverse pair of homotopies `p : g ~ u` and `q : u ~ g` equipped with +`α : inv-htpy p ~ q` we obtain an equivalence ```text - f ·l H - fg --------> fh - | | - f ·l H' | ⇗ |f ·l K - ∨ ∨ - fh' --------> fk, - f ·l K' + top top ∙h p + f -------> g f --------> u + | | | | + left | | right ≃ left | | q ∙h right + ∨ ∨ ∨ ∨ + h -------> i h --------> i + bottom bottom ``` -and similarly we may whisker it on the right. +of coherences of commuting squares of homotopies. ```agda module _ - { l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} - ( f : B → C) {g h h' k : A → B} - ( H : g ~ h) (H' : g ~ h') {K : h ~ k} {K' : h' ~ k} + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h i : (x : A) → B x} + (top : f ~ g) (left : f ~ h) (right : g ~ i) (bottom : h ~ i) where - map-coherence-square-homotopies : - coherence-square-homotopies H H' K K' → - coherence-square-homotopies (f ·l H) (f ·l H') (f ·l K) (f ·l K') - map-coherence-square-homotopies α a = - map-coherence-square-identifications f (H a) (H' a) (K a) (K' a) (α a) + equiv-right-splice-coherence-square-homotopies : + {u : (x : A) → B x} (p : g ~ u) (q : u ~ g) (α : inv-htpy p ~ q) → + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies (top ∙h p) left (inv-htpy p ∙h right) bottom + equiv-right-splice-coherence-square-homotopies p q α = + equiv-Π-equiv-family + ( λ x → + equiv-right-splice-coherence-square-identifications + ( top x) (left x) (right x) (bottom x) (p x) (q x) (α x)) +``` + +### Double whiskering of commuting squares of homotopies +```agda module _ - { l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} - { g h h' k : B → C} (H : g ~ h) (H' : g ~ h') {K : h ~ k} {K' : h' ~ k} - ( f : A → B) + {l1 l2 : Level} {A : UU l1} {B : A → UU l2} {f g h u v i : (x : A) → B x} where - right-whisker-comp-coherence-square-homotopies : - coherence-square-homotopies H H' K K' → - coherence-square-homotopies (H ·r f) (H' ·r f) (K ·r f) (K' ·r f) - right-whisker-comp-coherence-square-homotopies α = α ·r f + equiv-double-whisker-coherence-square-homotopies : + (p : f ~ g) + (top : g ~ u) (left : g ~ h) (right : u ~ v) (bottom : h ~ v) + (s : v ~ i) → + coherence-square-homotopies top left right bottom ≃ + coherence-square-homotopies + ( p ∙h top) + ( p ∙h left) + ( right ∙h s) + ( bottom ∙h s) + equiv-double-whisker-coherence-square-homotopies p top left right bottom q = + equiv-Π-equiv-family + ( λ x → + equiv-double-whisker-coherence-square-identifications + ( p x) (top x) (left x) (right x) (bottom x) (q x)) ``` diff --git a/src/foundation/commuting-squares-of-identifications.lagda.md b/src/foundation/commuting-squares-of-identifications.lagda.md index 8c537e89f2..75891f4367 100644 --- a/src/foundation/commuting-squares-of-identifications.lagda.md +++ b/src/foundation/commuting-squares-of-identifications.lagda.md @@ -2,21 +2,18 @@ ```agda module foundation.commuting-squares-of-identifications where + +open import foundation-core.commuting-squares-of-identifications public ```
Imports ```agda -open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.universe-levels -open import foundation.whiskering-identifications-concatenation open import foundation-core.equivalences -open import foundation-core.function-types open import foundation-core.identity-types -open import foundation-core.retractions -open import foundation-core.sections ```
@@ -42,197 +39,6 @@ identification is called a {{#concept "coherence" Disambiguation="commuting square of identifications" Agda=coherence-square-identifications}} of the square. -## Definitions - -### Commuting squares of identifications - -```agda -module _ - {l : Level} {A : UU l} {x y z w : A} - (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) - where - - coherence-square-identifications : UU l - coherence-square-identifications = left ∙ bottom = top ∙ right -``` - -### Horizontally constant squares - -{{#concept "Horizontally constant squares" Disambiguation="identifications" Agda=horizontal-refl-coherence-square-identifications}} -are commuting squares of identifications of the form - -```text - refl - a -----> a - | | - p | | p - ∨ ∨ - b -----> b. - refl -``` - -```agda -module _ - {l : Level} {A : UU l} {a b : A} (p : a = b) - where - - horizontal-refl-coherence-square-identifications : - coherence-square-identifications refl p p refl - horizontal-refl-coherence-square-identifications = right-unit -``` - -### Vertically constant squares - -{{#concept "Vertically constant squares" Disambiguation="identifications" Agda=vertical-refl-coherence-square-identifications}} -are commuting squares of identifications of the form - -```text - p - a -----> b - | | - refl | | refl - ∨ ∨ - a -----> b. - p -``` - -```agda -module _ - {l : Level} {A : UU l} {a b : A} (p : a = b) - where - - vertical-refl-coherence-square-identifications : - coherence-square-identifications p refl refl p - vertical-refl-coherence-square-identifications = inv right-unit -``` - -## Operations - -### Inverting squares of identifications horizontally - -Given a commuting square of identifications - -```text - top - x -------> y - | | - left | | right - ∨ ∨ - z -------> w, - bottom -``` - -the square of identifications - -```text - inv top - y ------------> x - | | - right | | left - ∨ ∨ - w ------------> z - inv bottom -``` - -commutes. - -```agda -module _ - {l : Level} {A : UU l} {x y z w : A} - where - - horizontal-inv-coherence-square-identifications : - (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → - coherence-square-identifications top left right bottom → - coherence-square-identifications (inv top) right left (inv bottom) - horizontal-inv-coherence-square-identifications refl refl right refl coh = - right-unit ∙ inv coh -``` - -### Inverting squares of identifications vertically - -Given a commuting square of identifications - -```text - top - x -------> y - | | - left | | right - ∨ ∨ - z -------> w, - bottom -``` - -the square of identifications - -```text - bottom - z -------> w - | | - inv left | | inv right - ∨ ∨ - x -------> y - top -``` - -commutes. - -```agda -module _ - {l : Level} {A : UU l} {x y z w : A} - where - - vertical-inv-coherence-square-identifications : - (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → - coherence-square-identifications top left right bottom → - coherence-square-identifications bottom (inv left) (inv right) top - vertical-inv-coherence-square-identifications refl refl refl refl refl = refl -``` - -### Functions acting on squares of identifications - -Given a commuting square of identifications - -```text - top - x -------> y - | | - left | | right - ∨ ∨ - z -------> w - bottom -``` - -in a type `A`, and given a map `f : A → B`, the square of identifications - -```text - ap f top - f x -----------> f y - | | - ap f left | | ap f right - ∨ ∨ - z -------------> w - ap f bottom -``` - -commutes. - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} {x y z w : A} (f : A → B) - where - - map-coherence-square-identifications : - (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → - coherence-square-identifications top left right bottom → - coherence-square-identifications - ( ap f top) - ( ap f left) - ( ap f right) - ( ap f bottom) - map-coherence-square-identifications refl refl right refl coh = ap (ap f) coh -``` - ### Concatenating identifications of edges and coherences of commuting squares of identifications Consider a commuting square of identifications and an identification of one of @@ -252,10 +58,6 @@ Then any identification witnessing that the square commutes can be concatenated with the identification on the side, to obtain a new commuting square of identifications. -**Note.** To avoid cyclic module dependencies we will give direct proofs that -concatenating identifications of edges of a square with the coherence of its -commutativity is an equivalence. - #### Concatenating identifications of the top edge with a coherence of a commuting square of identifications Consider a commuting diagram of identifications @@ -290,46 +92,26 @@ module _ {top' : x = y} (s : top = top') where - concat-top-identification-coherence-square-identifications : - coherence-square-identifications top left right bottom → - coherence-square-identifications top' left right bottom - concat-top-identification-coherence-square-identifications t = - t ∙ ap (concat' _ right) s - - inv-concat-top-identification-coherence-square-identifications : - coherence-square-identifications top' left right bottom → - coherence-square-identifications top left right bottom - inv-concat-top-identification-coherence-square-identifications t = - t ∙ inv (ap (concat' _ right) s) - - is-section-inv-concat-top-identification-coherence-square-identifications : - is-section - concat-top-identification-coherence-square-identifications - inv-concat-top-identification-coherence-square-identifications - is-section-inv-concat-top-identification-coherence-square-identifications = - is-section-inv-concat' (ap (concat' _ right) s) - - is-retraction-inv-concat-top-identification-coherence-square-identifications : - is-retraction - concat-top-identification-coherence-square-identifications - inv-concat-top-identification-coherence-square-identifications - is-retraction-inv-concat-top-identification-coherence-square-identifications = - is-retraction-inv-concat' (ap (concat' _ right) s) - abstract is-equiv-concat-top-identification-coherence-square-identifications : - is-equiv concat-top-identification-coherence-square-identifications + is-equiv + ( concat-top-identification-coherence-square-identifications + top left right bottom s) is-equiv-concat-top-identification-coherence-square-identifications = is-equiv-is-invertible - inv-concat-top-identification-coherence-square-identifications - is-section-inv-concat-top-identification-coherence-square-identifications - is-retraction-inv-concat-top-identification-coherence-square-identifications + ( inv-concat-top-identification-coherence-square-identifications + top left right bottom s) + ( is-section-inv-concat-top-identification-coherence-square-identifications + top left right bottom s) + ( is-retraction-inv-concat-top-identification-coherence-square-identifications + top left right bottom s) equiv-concat-top-identification-coherence-square-identifications : coherence-square-identifications top left right bottom ≃ coherence-square-identifications top' left right bottom pr1 equiv-concat-top-identification-coherence-square-identifications = concat-top-identification-coherence-square-identifications + top left right bottom s pr2 equiv-concat-top-identification-coherence-square-identifications = is-equiv-concat-top-identification-coherence-square-identifications ``` @@ -367,45 +149,26 @@ module _ {left' : x = z} (s : left = left') where - concat-left-identification-coherence-square-identifications : - coherence-square-identifications top left right bottom → - coherence-square-identifications top left' right bottom - concat-left-identification-coherence-square-identifications t = - inv (ap (concat' _ bottom) s) ∙ t - - inv-concat-left-identification-coherence-square-identifications : - coherence-square-identifications top left' right bottom → - coherence-square-identifications top left right bottom - inv-concat-left-identification-coherence-square-identifications t = - ap (concat' _ bottom) s ∙ t - - is-section-inv-concat-left-identification-coherence-square-identifications : - is-section - concat-left-identification-coherence-square-identifications - inv-concat-left-identification-coherence-square-identifications - is-section-inv-concat-left-identification-coherence-square-identifications = - is-retraction-inv-concat (ap (concat' _ bottom) s) - - is-retraction-inv-concat-left-identification-coherence-square-identifications : - is-retraction - concat-left-identification-coherence-square-identifications - inv-concat-left-identification-coherence-square-identifications - is-retraction-inv-concat-left-identification-coherence-square-identifications = - is-section-inv-concat (ap (concat' _ bottom) s) - - is-equiv-concat-left-identification-coherence-square-identifications : - is-equiv concat-left-identification-coherence-square-identifications - is-equiv-concat-left-identification-coherence-square-identifications = - is-equiv-is-invertible - inv-concat-left-identification-coherence-square-identifications - is-section-inv-concat-left-identification-coherence-square-identifications - is-retraction-inv-concat-left-identification-coherence-square-identifications + abstract + is-equiv-concat-left-identification-coherence-square-identifications : + is-equiv + ( concat-left-identification-coherence-square-identifications + top left right bottom s) + is-equiv-concat-left-identification-coherence-square-identifications = + is-equiv-is-invertible + ( inv-concat-left-identification-coherence-square-identifications + top left right bottom s) + ( is-section-inv-concat-left-identification-coherence-square-identifications + top left right bottom s) + ( is-retraction-inv-concat-left-identification-coherence-square-identifications + top left right bottom s) equiv-concat-left-identification-coherence-square-identifications : coherence-square-identifications top left right bottom ≃ coherence-square-identifications top left' right bottom pr1 equiv-concat-left-identification-coherence-square-identifications = concat-left-identification-coherence-square-identifications + top left right bottom s pr2 equiv-concat-left-identification-coherence-square-identifications = is-equiv-concat-left-identification-coherence-square-identifications ``` @@ -443,46 +206,26 @@ module _ {right' : y = w} (s : right = right') where - concat-right-identification-coherence-square-identifications : - coherence-square-identifications top left right bottom → - coherence-square-identifications top left right' bottom - concat-right-identification-coherence-square-identifications t = - t ∙ ap (concat top _) s - - inv-concat-right-identification-coherence-square-identifications : - coherence-square-identifications top left right' bottom → - coherence-square-identifications top left right bottom - inv-concat-right-identification-coherence-square-identifications t = - t ∙ inv (ap (concat top _) s) - - is-section-inv-concat-right-identification-coherence-square-identifications : - is-section - concat-right-identification-coherence-square-identifications - inv-concat-right-identification-coherence-square-identifications - is-section-inv-concat-right-identification-coherence-square-identifications = - is-section-inv-concat' (ap (concat top _) s) - - is-retraction-inv-concat-right-identification-coherence-square-identifications : - is-retraction - concat-right-identification-coherence-square-identifications - inv-concat-right-identification-coherence-square-identifications - is-retraction-inv-concat-right-identification-coherence-square-identifications = - is-retraction-inv-concat' (ap (concat top _) s) - abstract is-equiv-concat-right-identification-coherence-square-identifications : - is-equiv concat-right-identification-coherence-square-identifications + is-equiv + ( concat-right-identification-coherence-square-identifications + top left right bottom s) is-equiv-concat-right-identification-coherence-square-identifications = is-equiv-is-invertible - inv-concat-right-identification-coherence-square-identifications - is-section-inv-concat-right-identification-coherence-square-identifications - is-retraction-inv-concat-right-identification-coherence-square-identifications + ( inv-concat-right-identification-coherence-square-identifications + top left right bottom s) + ( is-section-inv-concat-right-identification-coherence-square-identifications + top left right bottom s) + ( is-retraction-inv-concat-right-identification-coherence-square-identifications + top left right bottom s) equiv-concat-right-identification-coherence-square-identifications : coherence-square-identifications top left right bottom ≃ coherence-square-identifications top left right' bottom pr1 equiv-concat-right-identification-coherence-square-identifications = concat-right-identification-coherence-square-identifications + top left right bottom s pr2 equiv-concat-right-identification-coherence-square-identifications = is-equiv-concat-right-identification-coherence-square-identifications ``` @@ -521,45 +264,25 @@ module _ {bottom' : z = w} (s : bottom = bottom') where - concat-bottom-identification-coherence-square-identifications : - coherence-square-identifications top left right bottom → - coherence-square-identifications top left right bottom' - concat-bottom-identification-coherence-square-identifications t = - inv (ap (concat left _) s) ∙ t - - inv-concat-bottom-identification-coherence-square-identifications : - coherence-square-identifications top left right bottom' → - coherence-square-identifications top left right bottom - inv-concat-bottom-identification-coherence-square-identifications t = - ap (concat left _) s ∙ t - - is-section-inv-concat-bottom-identification-coherence-square-identifications : - is-section - concat-bottom-identification-coherence-square-identifications - inv-concat-bottom-identification-coherence-square-identifications - is-section-inv-concat-bottom-identification-coherence-square-identifications = - is-retraction-inv-concat (ap (concat left _) s) - - is-retraction-inv-concat-bottom-identification-coherence-square-identifications : - is-retraction - concat-bottom-identification-coherence-square-identifications - inv-concat-bottom-identification-coherence-square-identifications - is-retraction-inv-concat-bottom-identification-coherence-square-identifications = - is-section-inv-concat (ap (concat left _) s) - is-equiv-concat-bottom-identification-coherence-square-identifications : - is-equiv concat-bottom-identification-coherence-square-identifications + is-equiv + ( concat-bottom-identification-coherence-square-identifications + top left right bottom s) is-equiv-concat-bottom-identification-coherence-square-identifications = is-equiv-is-invertible - inv-concat-bottom-identification-coherence-square-identifications - is-section-inv-concat-bottom-identification-coherence-square-identifications - is-retraction-inv-concat-bottom-identification-coherence-square-identifications + ( inv-concat-bottom-identification-coherence-square-identifications + top left right bottom s) + ( is-section-inv-concat-bottom-identification-coherence-square-identifications + top left right bottom s) + ( is-retraction-inv-concat-bottom-identification-coherence-square-identifications + top left right bottom s) equiv-concat-bottom-identification-coherence-square-identifications : coherence-square-identifications top left right bottom ≃ coherence-square-identifications top left right bottom' pr1 equiv-concat-bottom-identification-coherence-square-identifications = concat-bottom-identification-coherence-square-identifications + top left right bottom s pr2 equiv-concat-bottom-identification-coherence-square-identifications = is-equiv-concat-bottom-identification-coherence-square-identifications ``` @@ -668,7 +391,7 @@ we may consider four ways of attaching new identifications to it: ``` These operations are useful in proofs involving path algebra, because taking -`equiv-right-whisker-concat-coherence-square-identicications` as an example, it +`equiv-right-whisker-concat-coherence-square-identifications` as an example, it provides us with two maps: the forward direction states `(p ∙ r = q ∙ s) → (p ∙ (r ∙ t)) = q ∙ (s ∙ t))`, which allows one to append an identification without needing to reassociate on the right, and the backwards @@ -700,27 +423,9 @@ module _ (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → coherence-square-identifications top left right bottom ≃ coherence-square-identifications (p ∙ top) (p ∙ left) right bottom - equiv-left-whisker-concat-coherence-square-identifications refl - top left right bottom = - id-equiv - - left-whisker-concat-coherence-square-identifications : - (p : u = x) - (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → - coherence-square-identifications top left right bottom → - coherence-square-identifications (p ∙ top) (p ∙ left) right bottom - left-whisker-concat-coherence-square-identifications + equiv-left-whisker-concat-coherence-square-identifications refl top left right bottom = - id - - left-unwhisker-concat-coherence-square-identifications : - (p : u = x) - (top : x = y) (left : x = z) (right : y = w) (bottom : z = w) → - coherence-square-identifications (p ∙ top) (p ∙ left) right bottom → - coherence-square-identifications top left right bottom - left-unwhisker-concat-coherence-square-identifications - refl top left right bottom = - id + id-equiv ``` #### Right whiskering coherences of commuting squares of identifications @@ -762,43 +467,6 @@ module _ ( right) ( bottom) ( inv right-unit)) - - right-whisker-concat-coherence-square-identifications : - coherence-square-identifications top left right bottom → - {u : A} (p : w = u) → - coherence-square-identifications top left (right ∙ p) (bottom ∙ p) - right-whisker-concat-coherence-square-identifications s refl = - concat-bottom-identification-coherence-square-identifications - ( top) - ( left) - ( right ∙ refl) - ( bottom) - ( inv right-unit) - ( concat-right-identification-coherence-square-identifications - ( top) - ( left) - ( right) - ( bottom) - ( inv right-unit) - ( s)) - - right-unwhisker-cohernece-square-identifications : - {u : A} (p : w = u) → - coherence-square-identifications top left (right ∙ p) (bottom ∙ p) → - coherence-square-identifications top left right bottom - right-unwhisker-cohernece-square-identifications refl = - ( inv-concat-right-identification-coherence-square-identifications - ( top) - ( left) - ( right) - ( bottom) - ( inv right-unit)) ∘ - ( inv-concat-bottom-identification-coherence-square-identifications - ( top) - ( left) - ( right ∙ refl) - ( bottom) - ( inv right-unit)) ``` #### Left splicing coherences of commuting squares of identifications @@ -835,30 +503,6 @@ module _ ( right) ( bottom) ( inv right-unit) - - left-splice-coherence-square-identifications : - {u : A} (p : z = u) (q : u = z) (α : inv p = q) → - coherence-square-identifications top left right bottom → - coherence-square-identifications top (left ∙ p) right (q ∙ bottom) - left-splice-coherence-square-identifications refl .refl refl = - concat-left-identification-coherence-square-identifications - ( top) - ( left) - ( right) - ( bottom) - ( inv right-unit) - - left-unsplice-coherence-square-identifications : - {u : A} (p : z = u) (q : u = z) (α : inv p = q) → - coherence-square-identifications top (left ∙ p) right (q ∙ bottom) → - coherence-square-identifications top left right bottom - left-unsplice-coherence-square-identifications refl .refl refl = - inv-concat-left-identification-coherence-square-identifications - ( top) - ( left) - ( right) - ( bottom) - ( inv right-unit) ``` #### Right splicing coherences of commuting squares of identifications @@ -895,30 +539,6 @@ module _ ( right) ( bottom) ( inv right-unit) - - right-splice-coherence-square-identifications : - {u : A} (p : y = u) (q : u = y) (α : inv p = q) → - coherence-square-identifications top left right bottom → - coherence-square-identifications (top ∙ p) left (inv p ∙ right) bottom - right-splice-coherence-square-identifications refl .refl refl = - concat-top-identification-coherence-square-identifications - ( top) - ( left) - ( right) - ( bottom) - ( inv right-unit) - - right-unsplice-coherence-square-identifications : - {u : A} (p : y = u) (q : u = y) (α : inv p = q) → - coherence-square-identifications (top ∙ p) left (inv p ∙ right) bottom → - coherence-square-identifications top left right bottom - right-unsplice-coherence-square-identifications refl .refl refl = - inv-concat-top-identification-coherence-square-identifications - ( top) - ( left) - ( right) - ( bottom) - ( inv right-unit) ``` ### Double whiskering of commuting squares of identifications @@ -928,7 +548,7 @@ module _ {l : Level} {A : UU l} {x y z u v w : A} where - equiv-double-whisker-square-identifications : + equiv-double-whisker-coherence-square-identifications : (p : x = y) (top : y = u) (left : y = z) (right : u = v) (bottom : z = v) (s : v = w) → @@ -938,7 +558,8 @@ module _ ( p ∙ left) ( right ∙ s) ( bottom ∙ s) - equiv-double-whisker-square-identifications p top left right bottom q = + equiv-double-whisker-coherence-square-identifications + p top left right bottom q = equiv-left-whisker-concat-coherence-square-identifications p top left ( right ∙ q) ( bottom ∙ q) ∘e @@ -949,734 +570,3 @@ module _ ( bottom) ( q) ``` - -### Horizontally pasting squares of identifications - -Consider two squares of identifications as in the diagram - -```text - top-left top-right - a -------------> b -------------> c - | | | - left | | middle | right - ∨ ∨ ∨ - d -------------> e -------------> f - bottom-left bottom-right -``` - -with `s : left ∙ bottom-left = top-left ∙ middle` and t : middle ∙ bottom-right -= top-right ∙ right`. Then the outer square commutes. - -```agda -module _ - {l : Level} {A : UU l} {a b c d e f : A} - (top-left : a = b) (top-right : b = c) - (left : a = d) (middle : b = e) (right : c = f) - (bottom-left : d = e) (bottom-right : e = f) - where - - horizontal-pasting-coherence-square-identifications : - coherence-square-identifications top-left left middle bottom-left → - coherence-square-identifications top-right middle right bottom-right → - coherence-square-identifications - (top-left ∙ top-right) left right (bottom-left ∙ bottom-right) - horizontal-pasting-coherence-square-identifications s t = - ( right-whisker-concat-coherence-square-identifications - ( top-left) - ( left) - ( middle) - ( bottom-left) - ( s) - ( bottom-right)) ∙ - ( ( inv (assoc top-left middle bottom-right)) ∙ - ( left-whisker-concat-coherence-square-identifications - ( top-left) - ( top-right) - ( middle) - ( right) - ( bottom-right) - ( t))) -``` - -### Vertically pasting squares of identifications - -Consider two squares of identifications as in the diagram - -```text - top - a --------> b - | | - top-left | | top-right - ∨ middle ∨ - c --------> d - | | - bottom-left | | bottom-right - ∨ ∨ - e --------> f - bottom -``` - -with `s : top-left ∙ middle = top ∙ top-right` and -`t : bottom-left ∙ bottom = middle ∙ bottom-right`. Then the outer square -commutes. - -```agda -module _ - {l : Level} {A : UU l} {a b c d e f : A} - (top : a = b) (top-left : a = c) (top-right : b = d) - (middle : c = d) (bottom-left : c = e) (bottom-right : d = f) - (bottom : e = f) - where - - vertical-pasting-coherence-square-identifications : - coherence-square-identifications top top-left top-right middle → - coherence-square-identifications middle bottom-left bottom-right bottom → - coherence-square-identifications - top (top-left ∙ bottom-left) (top-right ∙ bottom-right) bottom - vertical-pasting-coherence-square-identifications p q = - ( left-whisker-concat-coherence-square-identifications - ( top-left) - ( middle) - ( bottom-left) - ( bottom-right) - ( bottom) - ( q)) ∙ - ( ( assoc top-left middle bottom-right) ∙ - ( right-whisker-concat-coherence-square-identifications - ( top) - ( top-left) - ( top-right) - ( middle) - ( p) - ( bottom-right))) -``` - -## Properties - -### Left unit law for horizontal pasting of commuting squares of identifications - -```agda -module _ - {l : Level} {A : UU l} {a b c d : A} - where - - left-unit-law-horizontal-pasting-coherence-square-identifications : - (top : a = b) (left : a = c) (right : b = d) (bottom : c = d) - (s : coherence-square-identifications top left right bottom) → - horizontal-pasting-coherence-square-identifications - ( refl) - ( top) - ( left) - ( left) - ( right) - ( refl) - ( bottom) - ( horizontal-refl-coherence-square-identifications left) - ( s) = - s - left-unit-law-horizontal-pasting-coherence-square-identifications - refl refl right refl s = refl -``` - -### Right unit law for horizontal pasting of commuting squares of identifications - -```agda -module _ - {l : Level} {A : UU l} {a b c d : A} - where - - right-unit-law-horizontal-pasting-coherence-square-identifications : - (top : a = b) (left : a = c) (right : b = d) (bottom : c = d) - (s : coherence-square-identifications top left right bottom) → - horizontal-pasting-coherence-square-identifications - ( top) - ( refl) - ( left) - ( right) - ( right) - ( bottom) - ( refl) - ( s) - ( horizontal-refl-coherence-square-identifications right) ∙ - right-whisker-concat right-unit right = - left-whisker-concat left right-unit ∙ s - right-unit-law-horizontal-pasting-coherence-square-identifications - refl refl .refl refl refl = - refl -``` - -### Left unit law for vertical pasting of commuting squares of identifications - -```agda -module _ - {l : Level} {A : UU l} {a b c d : A} - where - - left-unit-law-vertical-pasting-coherence-square-identifications : - (top : a = b) (left : a = c) (right : b = d) (bottom : c = d) - (s : coherence-square-identifications top left right bottom) → - vertical-pasting-coherence-square-identifications - ( top) - ( refl) - ( refl) - ( top) - ( left) - ( right) - ( bottom) - ( vertical-refl-coherence-square-identifications top) - ( s) = - s - left-unit-law-vertical-pasting-coherence-square-identifications - refl refl .refl refl refl = refl -``` - -### Right unit law for vertical pasting of commuting squares of identifications - -```agda -module _ - {l : Level} {A : UU l} {a b c d : A} - where - - right-unit-law-vertical-pasting-coherence-square-identifications : - (top : a = b) (left : a = c) (right : b = d) (bottom : c = d) - (s : coherence-square-identifications top left right bottom) → - vertical-pasting-coherence-square-identifications - ( top) - ( left) - ( right) - ( bottom) - ( refl) - ( refl) - ( bottom) - ( s) - ( vertical-refl-coherence-square-identifications bottom) ∙ - left-whisker-concat top right-unit = - right-whisker-concat right-unit bottom ∙ s - right-unit-law-vertical-pasting-coherence-square-identifications - refl refl .(refl ∙ refl) refl refl = - refl -``` - -### Computing the right whiskering of a vertically constant square with an identification - -Consider the vertically constant square of identifications - -```text - p - x -----> y - | | - refl | | refl - ∨ ∨ - x -----> y - p -``` - -at an identification `p : x = y`, and consider an identification `q : y = z`. -Then the right whiskering of the above square with `q` is the commuting square -of identifications - -```text - p - x -------> y - | | - refl | refl | q - ∨ ∨ - x -------> z - p ∙ q -``` - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - right-whisker-concat-vertical-refl-coherence-square-identifications : - {x y z : A} (p : x = y) (q : y = z) → - right-whisker-concat-coherence-square-identifications p refl refl p - ( vertical-refl-coherence-square-identifications p) - ( q) = - refl - right-whisker-concat-vertical-refl-coherence-square-identifications - refl refl = - refl -``` - -### Computing the right whiskering of a horizontally constant square with an identification - -Consider a horizontally constant commuting square of identifications - -```text - refl - x -----> x - | | - p | | p - ∨ ∨ - y -----> y - refl -``` - -at an identification `p` and consider an identification `q : y = z`. Then the -right whiskering of the above square with `q` is the square - -```text - refl - x -----> x - | | - p | refl | p ∙ q - ∨ ∨ - y -----> z. - q -``` - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - right-whisker-concat-horizontal-refl-coherence-square-identifications : - {x y z : A} (p : x = y) (q : y = z) → - right-whisker-concat-coherence-square-identifications refl p p refl - ( horizontal-refl-coherence-square-identifications p) - ( q) = - refl - right-whisker-concat-horizontal-refl-coherence-square-identifications - refl refl = - refl -``` - -### Computing the left whiskering of a horizontally constant square with an identification - -Consider an identification `p : x = y` and a horizontally constant commuting -square of identifications - -```text - refl - y -----> y - | | - q | | q - ∨ ∨ - z -----> z - refl -``` - -at an identification `q : y = z`. The the left whiskering of the above square -with `p` is the commuting square - -```text - q ∙ refl - x ------------------------------------------------------> y - | | - q ∙ p | right-unit ∙ inv (right-whisker-concat right-unit p) | p - ∨ ∨ - z ------------------------------------------------------> z. - refl -``` - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - left-whisker-concat-horizontal-refl-coherence-square-identifications : - {x y z : A} (p : x = y) (q : y = z) → - left-whisker-concat-coherence-square-identifications p refl q q refl - ( horizontal-refl-coherence-square-identifications q) ∙ - right-whisker-concat right-unit q = - right-unit - left-whisker-concat-horizontal-refl-coherence-square-identifications - refl refl = - refl - - left-whisker-concat-horizontal-refl-coherence-square-identifications' : - {x y z : A} (p : x = y) (q : y = z) → - left-whisker-concat-coherence-square-identifications p refl q q refl - ( horizontal-refl-coherence-square-identifications q) = - right-unit ∙ inv (right-whisker-concat right-unit q) - left-whisker-concat-horizontal-refl-coherence-square-identifications' - refl refl = - refl -``` - -### Computing the left whiskering of a vertically constant square with an identification - -Consider the vertically constant square of identifications - -```text - q - y -----> z - | | - refl | | refl - ∨ ∨ - y -----> z - q -``` - -at an identification `q : y = z` and consider an identification `p : x = y`. -Then the left whiskering of the above square with `p` is the square - -```text - p ∙ q - x ---------------------------------------------------> z - | | - p ∙ refl | right-whisker-concat right-unit q ∙ inv right-unit | refl - ∨ ∨ - y ---------------------------------------------------> z. - q -``` - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - left-whisker-concat-vertical-refl-coherence-square-identifications : - {x y z : A} (p : x = y) (q : y = z) → - left-whisker-concat-coherence-square-identifications p q refl refl q - ( vertical-refl-coherence-square-identifications q) ∙ - right-unit = - right-whisker-concat right-unit q - left-whisker-concat-vertical-refl-coherence-square-identifications - refl refl = - refl - - left-whisker-concat-vertical-refl-coherence-square-identifications' : - {x y z : A} (p : x = y) (q : y = z) → - left-whisker-concat-coherence-square-identifications p q refl refl q - ( vertical-refl-coherence-square-identifications q) = - right-whisker-concat right-unit q ∙ inv right-unit - left-whisker-concat-vertical-refl-coherence-square-identifications' - refl refl = - refl -``` - -### Left whiskering horizontal concatenations of squares with identifications - -Consider a commuting diagram of identifications of the form - -```text - top-left top-right - a -------------> c -------------> e - | | | - left | | middle | right - ∨ ∨ ∨ - b -------------> d -------------> f - bottom-left bottom-right -``` - -and consider an identification `p : x = a`. Then the left whiskering of `p` and -the horizontal concatenation of coherences of commuting squares is up to -associativity the horizontal concatenation of the squares - -```text - p ∙ top-left top-right - x -------------> c -------------> e - | | | - p ∙ left | | middle | right - ∨ ∨ ∨ - b -------------> d -------------> f - bottom-left bottom-right -``` - -where the left square is the left whiskering of `p` and the original left -square. - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - left-whisker-concat-horizontal-pasting-coherence-square-identifications : - {x a b c d e f : A} (p : x = a) - (top-left : a = c) (top-right : c = e) - (left : a = b) (middle : c = d) (right : e = f) - (bottom-left : b = d) (bottom-right : d = f) - (l : coherence-square-identifications top-left left middle bottom-left) - (r : coherence-square-identifications top-right middle right bottom-right) → - left-whisker-concat-coherence-square-identifications p - ( top-left ∙ top-right) - ( left) - ( right) - ( bottom-left ∙ bottom-right) - ( horizontal-pasting-coherence-square-identifications - ( top-left) - ( top-right) - ( left) - ( middle) - ( right) - ( bottom-left) - ( bottom-right) - ( l) - ( r)) = - horizontal-pasting-coherence-square-identifications - ( p ∙ top-left) - ( top-right) - ( p ∙ left) - ( middle) - ( right) - ( bottom-left) - ( bottom-right) - ( left-whisker-concat-coherence-square-identifications p - ( top-left) - ( left) - ( middle) - ( bottom-left) - ( l)) - ( r) ∙ - right-whisker-concat - ( assoc p top-left top-right) - ( right) - left-whisker-concat-horizontal-pasting-coherence-square-identifications - refl top-left top-right left middle right bottom-left bottom-right l r = - inv right-unit -``` - -### Left whiskering vertical concatenations of squares with identifications - -Consider two squares of identifications as in the diagram - -```text - top - a --------> b - | | - top-left | | top-right - ∨ middle ∨ - c --------> d - | | - bottom-left | | bottom-right - ∨ ∨ - e --------> f - bottom -``` - -and consider an identification `p : x = a`. Then the left whiskering of `p` -with the vertical pasting of the two squares above is up to associativity the -vertical pasting of the squares - -```text - p ∙ top - x --------> b - | | - p ∙ top-left | | top-right - ∨ middle ∨ - c --------> d - | | - bottom-left | | bottom-right - ∨ ∨ - e --------> f. - bottom -``` - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - left-whisker-concat-vertical-concat-coherence-square-identifications : - {x a b c d e f : A} (p : x = a) → - (top : a = b) (top-left : a = c) (top-right : b = d) (middle : c = d) - (bottom-left : c = e) (bottom-right : d = f) (bottom : e = f) - (t : coherence-square-identifications top top-left top-right middle) → - (b : - coherence-square-identifications middle bottom-left bottom-right bottom) → - right-whisker-concat (assoc p top-left bottom-left) bottom ∙ - left-whisker-concat-coherence-square-identifications p - ( top) - ( top-left ∙ bottom-left) - ( top-right ∙ bottom-right) - ( bottom) - ( vertical-pasting-coherence-square-identifications - ( top) - ( top-left) - ( top-right) - ( middle) - ( bottom-left) - ( bottom-right) - ( bottom) - ( t) - ( b)) = - vertical-pasting-coherence-square-identifications - ( p ∙ top) - ( p ∙ top-left) - ( top-right) - ( middle) - ( bottom-left) - ( bottom-right) - ( bottom) - ( left-whisker-concat-coherence-square-identifications p - ( top) - ( top-left) - ( top-right) - ( middle) - ( t)) - ( b) - left-whisker-concat-vertical-concat-coherence-square-identifications - refl top top-left top-right middle bottom-left bottom-right bottom t b = - refl -``` - -### Right whiskering horizontal pastings of commuting squares of identifications - -Consider a commuting diagram of identifications of the form - -```text - top-left top-right - a -------------> c -------------> e - | | | - left | | middle | right - ∨ ∨ ∨ - b -------------> d -------------> f - bottom-left bottom-right -``` - -and consider an identification `q : f = y`. Then the right whiskering of the -horizontal pasting of the squares above is up to associativity the horizontal -pasting of the squares - -```text - top-left top-right - a -------------> c ------------------> e - | | | - left | | middle | right ∙ q - ∨ ∨ ∨ - b -------------> d ------------------> y - bottom-left bottom-right ∙ q -``` - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - right-whisker-concat-horizontal-pasting-coherence-square-identifications : - {a b c d e f y : A} - (top-left : a = c) (top-right : c = e) - (left : a = b) (middle : c = d) (right : e = f) - (bottom-left : b = d) (bottom-right : d = f) - (l : coherence-square-identifications top-left left middle bottom-left) → - (r : coherence-square-identifications top-right middle right bottom-right) → - (q : f = y) → - right-whisker-concat-coherence-square-identifications - ( top-left ∙ top-right) - ( left) - ( right) - ( bottom-left ∙ bottom-right) - ( horizontal-pasting-coherence-square-identifications - ( top-left) - ( top-right) - ( left) - ( middle) - ( right) - ( bottom-left) - ( bottom-right) - ( l) - ( r)) - ( q) = - left-whisker-concat left (assoc bottom-left bottom-right q) ∙ - horizontal-pasting-coherence-square-identifications - ( top-left) - ( top-right) - ( left) - ( middle) - ( right ∙ q) - ( bottom-left) - ( bottom-right ∙ q) - ( l) - ( right-whisker-concat-coherence-square-identifications - ( top-right) - ( middle) - ( right) - ( bottom-right) - ( r) - ( q)) - right-whisker-concat-horizontal-pasting-coherence-square-identifications - refl refl refl .refl .refl refl refl refl refl refl = - refl -``` - -### Right whiskering vertical concatenations of squares with identifications - -Consider two squares of identifications as in the diagram - -```text - top - a --------> b - | | - top-left | | top-right - ∨ middle ∨ - c --------> d - | | - bottom-left | | bottom-right - ∨ ∨ - e --------> f - bottom -``` - -and consider an identification `q : f = y`. Then the right whiskering of the -vertical pasting of the two squares above with `q` is up to associativity the -vertical pasting of the squares - -```text - top - a ------------> b - | | - top-left | | top-right - ∨ middle ∨ - c ------------> d - | | - bottom-left | | bottom-right ∙ q - ∨ ∨ - e ------------> y. - bottom ∙ q -``` - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - right-whisker-concat-vertical-pasting-coherence-square-identifications : - {a b c d e f y : A} - (top : a = b) (top-left : a = c) (top-right : b = d) - (middle : c = d) - (bottom-left : c = e) (bottom-right : d = f) (bottom : e = f) - (t : coherence-square-identifications top top-left top-right middle) → - (b : - coherence-square-identifications middle bottom-left bottom-right bottom) → - (q : f = y) → - right-whisker-concat-coherence-square-identifications - ( top) - ( top-left ∙ bottom-left) - ( top-right ∙ bottom-right) - ( bottom) - ( vertical-pasting-coherence-square-identifications - ( top) - ( top-left) - ( top-right) - ( middle) - ( bottom-left) - ( bottom-right) - ( bottom) - ( t) - ( b)) - ( q) ∙ - left-whisker-concat top (assoc top-right bottom-right q) = - vertical-pasting-coherence-square-identifications - ( top) - ( top-left) - ( top-right) - ( middle) - ( bottom-left) - ( bottom-right ∙ q) - ( bottom ∙ q) - ( t) - ( right-whisker-concat-coherence-square-identifications - ( middle) - ( bottom-left) - ( bottom-right) - ( bottom) - ( b) - ( q)) - right-whisker-concat-vertical-pasting-coherence-square-identifications - refl refl .refl refl refl .refl refl refl refl refl = - refl -``` diff --git a/src/foundation/commuting-squares-of-maps.lagda.md b/src/foundation/commuting-squares-of-maps.lagda.md index aeaece94f2..cb2b53f6f1 100644 --- a/src/foundation/commuting-squares-of-maps.lagda.md +++ b/src/foundation/commuting-squares-of-maps.lagda.md @@ -9,26 +9,25 @@ open import foundation-core.commuting-squares-of-maps public
Imports ```agda -open import foundation.action-on-higher-identifications-functions open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-homotopies -open import foundation.commuting-squares-of-identifications open import foundation.commuting-triangles-of-maps open import foundation.function-extensionality -open import foundation.identity-types open import foundation.postcomposition-functions open import foundation.precomposition-functions open import foundation.transposition-identifications-along-equivalences open import foundation.universe-levels open import foundation.whiskering-higher-homotopies-composition open import foundation.whiskering-homotopies-composition -open import foundation.whiskering-identifications-concatenation open import foundation-core.commuting-prisms-of-maps +open import foundation-core.commuting-squares-of-homotopies +open import foundation-core.commuting-squares-of-identifications open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.homotopies +open import foundation-core.identity-types +open import foundation-core.whiskering-identifications-concatenation ```
@@ -175,7 +174,7 @@ module _ ( id) ( is-retraction-map-inv-equiv left) ( H) - ( coherence-square-maps-inv-equiv-vertical top left right bottom H) + ( vertical-inv-equiv-coherence-square-maps top left right bottom H) ( refl-htpy) ( is-retraction-map-inv-equiv right) left-inverse-law-pasting-vertical-coherence-square-maps H a = @@ -284,7 +283,7 @@ module _ ( id) ( id) ( is-section-map-inv-equiv left) - ( coherence-square-maps-inv-equiv-vertical top left right bottom H) + ( vertical-inv-equiv-coherence-square-maps top left right bottom H) ( H) ( refl-htpy) ( is-section-map-inv-equiv right) @@ -295,7 +294,7 @@ module _ ( H (map-inv-equiv left a)) ( ap ( map-equiv right) - ( coherence-square-maps-inv-equiv-vertical top left right bottom + ( vertical-inv-equiv-coherence-square-maps top left right bottom ( H) ( a))) ( is-section-map-inv-equiv right (bottom a))) ∙ @@ -570,8 +569,12 @@ module _ ( sq-left-bottom ·r left-top) ( mid-bottom ·l sq-left-top)) ∙h ( double-whisker-coherence-square-homotopies - ( bottom-right ·l (sq-left-bottom ·r left-top)) - ( right-bottom ·l (sq-right-top ·r top-left)) + ( bottom-right ·l sq-left-bottom ·r left-top) + ( sq-right-bottom ·r mid-left ·r left-top) + ( bottom-right ·l mid-bottom ·l sq-left-top) + ( right-bottom ·l mid-right ·l sq-left-top) + ( sq-right-bottom ·r mid-top ·r top-left) + ( right-bottom ·l sq-right-top ·r top-left) ( inv-htpy ( swap-nat-coherence-square-maps ( top-left) diff --git a/src/foundation/commuting-triangles-of-homotopies.lagda.md b/src/foundation/commuting-triangles-of-homotopies.lagda.md index 381b508986..d3f3b61b72 100644 --- a/src/foundation/commuting-triangles-of-homotopies.lagda.md +++ b/src/foundation/commuting-triangles-of-homotopies.lagda.md @@ -11,11 +11,11 @@ open import foundation.action-on-identifications-functions open import foundation.commuting-triangles-of-identifications open import foundation.universe-levels open import foundation.whiskering-homotopies-composition -open import foundation.whiskering-identifications-concatenation open import foundation-core.function-types open import foundation-core.homotopies open import foundation-core.identity-types +open import foundation-core.whiskering-identifications-concatenation ``` diff --git a/src/foundation/commuting-triangles-of-identifications.lagda.md b/src/foundation/commuting-triangles-of-identifications.lagda.md index a642df0ec7..6d2604ec6a 100644 --- a/src/foundation/commuting-triangles-of-identifications.lagda.md +++ b/src/foundation/commuting-triangles-of-identifications.lagda.md @@ -138,7 +138,7 @@ transformations are equivalences. These operations are useful in proofs involving [path algebra](foundation.path-algebra.md), because taking -`equiv-right-whisker-triangle-identicications` as an example, it provides us +`equiv-right-whisker-triangle-identifications` as an example, it provides us with two maps: the forward direction states `(p = q ∙ r) → (p ∙ s = q ∙ (r ∙ s))`, which allows one to append an identification without needing to reassociate on the right, and the backwards diff --git a/src/foundation/commuting-triangles-of-maps.lagda.md b/src/foundation/commuting-triangles-of-maps.lagda.md index d4163b847b..742618605e 100644 --- a/src/foundation/commuting-triangles-of-maps.lagda.md +++ b/src/foundation/commuting-triangles-of-maps.lagda.md @@ -17,11 +17,11 @@ open import foundation.identity-types open import foundation.postcomposition-functions open import foundation.precomposition-functions open import foundation.universe-levels -open import foundation.whiskering-identifications-concatenation open import foundation-core.commuting-squares-of-maps open import foundation-core.equivalences open import foundation-core.function-types +open import foundation-core.whiskering-identifications-concatenation ``` @@ -196,7 +196,7 @@ module _ coherence-htpy-triangle-maps : left ~ left' → right ~ right' → top ~ top' → UU (l1 ⊔ l2) coherence-htpy-triangle-maps L R T = - c ∙h horizontal-concat-htpy T R ~ L ∙h c' + c ∙h horizontal-concat-htpy R T ~ L ∙h c' ``` ### Pasting commuting triangles into commuting squares along homotopic diagonals diff --git a/src/foundation/computational-identity-types.lagda.md b/src/foundation/computational-identity-types.lagda.md index 2b19a54501..256a877232 100644 --- a/src/foundation/computational-identity-types.lagda.md +++ b/src/foundation/computational-identity-types.lagda.md @@ -53,13 +53,13 @@ but using the [Yoneda identity types](foundation.yoneda-identity-types.md) (`_=ʸ_`) as the underlying identity types: ```text - (x =ʲ y) := Σ (z : A) ((z =ʸ y) × (z =ʸ x)) + (x =ʸ y) := (z : A) → (z = x) → (z = y), ``` -The Yoneda identity types are defined as +hence, their definition is ```text - (x =ʸ y) := (z : A) → (z = x) → (z = y). + (x =ʲ y) := Σ (z : A) ((z =ʸ y) × (z =ʸ x)). ``` The Yoneda identity types are [equivalent](foundation-core.equivalences.md) to @@ -71,23 +71,22 @@ laws - `(p ∙ʲ q) ∙ʲ r ≐ p ∙ʲ (q ∙ʲ r)` - `reflʲ ∙ʲ p ≐ p` or `p ∙ʲ reflʲ ≐ p` -- `inv (inv p) ≐ p` -- `inv reflʲ ≐ reflʲ`. +- `invʲ (invʲ p) ≐ p` +- `invʲ reflʲ ≐ reflʲ`. While the last three equalities hold by the same computations as for the -strictly involutive identity types using the fact that `inv reflʸ ≐ reflʸ`, +strictly involutive identity types using the fact that `invʸ reflʸ ≐ reflʸ`, strict associativity relies on the strict associativity of the underlying Yoneda identity types. See the file about strictly involutive identity types for -further details on these computations. - -In addition to these strict algebraic laws, we also define a recursion principle +further details on computations related to the last three equalities. In +addition to these strict algebraic laws, we also define a recursion principle for the computational identity types that computes strictly. **Note.** The computational identity types do _not_ satisfy the strict laws - `reflʲ ∙ʲ p ≐ p` and `p ∙ʲ reflʲ ≐ p` simultaneously, -- `inv p ∙ʲ p ≐ reflʲ`, or -- `p ∙ʲ inv p ≐ reflʲ`, +- `invʲ p ∙ʲ p ≐ reflʲ`, or +- `p ∙ʲ invʲ p ≐ reflʲ`, and they do not have a strict computation property for their induction principle. This boils down to the fact that the Yoneda identity types do not @@ -116,7 +115,8 @@ module _ ### The computational identity types are equivalent to the Yoneda identity types -Similarly to the strictly involutive identity types, this equivalence is a +The computational identity types are equivalent to the Yoneda identity types, +and similarly to the strictly involutive identity types, this equivalence is a strict [retraction](foundation-core.retractions.md) and preserves the reflexivities strictly. @@ -129,7 +129,7 @@ module _ computational-eq-yoneda-eq {x} f = (x , f , reflʸ) yoneda-eq-computational-eq : {x y : A} → x =ʲ y → x =ʸ y - yoneda-eq-computational-eq (z , p , q) = inv-yoneda-Id q ∙ʸ p + yoneda-eq-computational-eq (z , p , q) = invʸ q ∙ʸ p is-retraction-yoneda-eq-computational-eq : {x y : A} → @@ -196,8 +196,9 @@ module _ ### The computational identity types are equivalent to the standard identity types -We define the equivalence as the composite `(x = y) ≃ (x =ʸ y) ≃ (x =ʲ y)`. -Since each of these equivalences preserve the groupoid structure weakly so does +By the composite equivalence `(x = y) ≃ (x =ʸ y) ≃ (x =ʲ y)`, the +computational identity types are equivalent to the standard identity types. +Since each of these equivalences preserve the groupoid structure weakly, so does the composite. For the same reason, it preserves the reflexivities strictly. ```agda @@ -326,6 +327,8 @@ module _ ( dependent-universal-property-identity-system-computational-Id B) ``` +### The strict recursion principle for the computational identity types + Using the fact that the recusion principles of both the Yoneda identity types and the strictly involutive identity types can be defined to compute strictly, we obtain a strictly computing recursion principle for the computational @@ -363,8 +366,8 @@ structure satisfies the following algebraic laws strictly - `(p ∙ʲ q) ∙ʲ r ≐ p ∙ʲ (q ∙ʲ r)` - `reflʲ ∙ʲ p ≐ p` or `p ∙ʲ reflʲ ≐ p` -- `inv (inv p) ≐ p` -- `inv reflʲ ≐ reflʲ`. +- `invʲ (invʲ p) ≐ p` +- `invʲ reflʲ ≐ reflʲ`. ### Inverting computational identifications @@ -381,18 +384,16 @@ module _ {l : Level} {A : UU l} where - inv-computational-Id : {x y : A} → x =ʲ y → y =ʲ x - inv-computational-Id (z , p , q) = (z , q , p) + invʲ : {x y : A} → x =ʲ y → y =ʲ x + invʲ (z , p , q) = (z , q , p) - compute-inv-computational-Id-refl : - {x : A} → - inv-computational-Id (reflʲ {x = x}) = - reflʲ - compute-inv-computational-Id-refl = refl + compute-inv-refl-computational-Id : + {x : A} → invʲ (reflʲ {x = x}) = reflʲ + compute-inv-refl-computational-Id = refl inv-inv-computational-Id : {x y : A} (p : x =ʲ y) → - inv-computational-Id (inv-computational-Id p) = p + invʲ (invʲ p) = p inv-inv-computational-Id p = refl ``` @@ -406,12 +407,12 @@ module _ preserves-inv-computational-eq-eq : (p : x = y) → - computational-eq-eq (inv p) = inv-computational-Id (computational-eq-eq p) + computational-eq-eq (inv p) = invʲ (computational-eq-eq p) preserves-inv-computational-eq-eq refl = refl preserves-inv-eq-computational-eq : (p : x =ʲ y) → - eq-computational-eq (inv-computational-Id p) = inv (eq-computational-eq p) + eq-computational-eq (invʲ p) = inv (eq-computational-eq p) preserves-inv-eq-computational-eq (z , f , g) = ( ap (g y) (left-unit-right-strict-concat)) ∙ ( distributive-inv-Id-yoneda-Id g f) ∙ @@ -421,14 +422,12 @@ module _ ### The concatenation operations on computational identifications There is both a strictly left unital and a strictly right unital concatenation -operation, while both are strictly associative. - -The strict one-sided unitality follows in both cases from the strict right -unitality of the concatenation operation on the Yoneda identifications, -following the same computation as for the strictly involutive identity types. - -For associativity on the other hand, we must use the strict associativity of the -Yoneda identity types. We will write out the explicit computation later. +operation, while both are strictly associative. The strict one-sided unitality +follows in both cases from the strict right unitality of the concatenation +operation on the Yoneda identifications, following the same computation as for +the strictly involutive identity types. For associativity on the other hand, we +must use the strict associativity of the Yoneda identity types. We will write +out the explicit computation later. **Observation.** Since the concatenation operations are strictly associative, every string of concatenations containing reflexivities will reduce aside from @@ -442,7 +441,7 @@ the strictly left unital concatenation operation for the strictly involutive identity types ```text - (w , p , q) ∙ʲ (w' , p' , q') := (w' , p' , q' ∙ʸ inv-yoneda-Id p ∙ʸ q) + (w , p , q) ∙ʲ (w' , p' , q') := (w' , p' , q' ∙ʸ invʸ p ∙ʸ q) ``` ```agda @@ -452,7 +451,7 @@ module _ infixl 15 _∙ʲ_ _∙ʲ_ : {x y z : A} → x =ʲ y → y =ʲ z → x =ʲ z - (w , p , q) ∙ʲ (w' , p' , q') = (w' , p' , q' ∙ʸ inv-yoneda-Id p ∙ʸ q) + (w , p , q) ∙ʲ (w' , p' , q') = (w' , p' , q' ∙ʸ invʸ p ∙ʸ q) concat-computational-Id : {x y : A} → x =ʲ y → (z : A) → y =ʲ z → x =ʲ z concat-computational-Id p z q = p ∙ʲ q @@ -517,7 +516,7 @@ module _ infixl 15 _∙ᵣʲ_ _∙ᵣʲ_ : {x y z : A} → x =ʲ y → y =ʲ z → x =ʲ z - (w , p , q) ∙ᵣʲ (w' , p' , q') = (w , p ∙ʸ inv-yoneda-Id q' ∙ʸ p' , q) + (w , p , q) ∙ᵣʲ (w' , p' , q') = (w , p ∙ʸ invʸ q' ∙ʸ p' , q) right-strict-concat-computational-Id : {x y : A} → x =ʲ y → (z : A) → y =ʲ z → x =ʲ z @@ -572,11 +571,11 @@ To see that `_∙ʲ_` is strictly associative, we unfold both `(P ∙ʲ Q) ∙ʲ ```text (P ∙ʲ Q) ∙ʲ R ≐ ((u , p , p') ∙ʲ (v , q , q')) ∙ʲ (w , r , r') - ≐ ((v , q , (q' ∙ʸ inv p) ∙ʸ p')) ∙ʲ (w , r , r') - ≐ (w , r , (r' ∙ʸ inv q) ∙ʸ ((q' ∙ʸ inv p) ∙ʸ p')) + ≐ ((v , q , (q' ∙ʸ invʸ p) ∙ʸ p')) ∙ʲ (w , r , r') + ≐ (w , r , (r' ∙ʸ invʸ q) ∙ʸ ((q' ∙ʸ invʸ p) ∙ʸ p')) - ≐ (w , r , (((r' ∙ʸ inv q) ∙ʸ q') ∙ʸ inv p) ∙ʸ p') - ≐ (u , p , p') ∙ʲ ((w , r , (r' ∙ʸ inv q) ∙ʸ q')) + ≐ (w , r , (((r' ∙ʸ invʸ q) ∙ʸ q') ∙ʸ invʸ p) ∙ʸ p') + ≐ (u , p , p') ∙ʲ ((w , r , (r' ∙ʸ invʸ q) ∙ʸ q')) ≐ (u , p , p') ∙ʲ ((v , q , q') ∙ʲ (w , r , r')) ≐ P ∙ʲ (Q ∙ʲ R). ``` @@ -608,35 +607,35 @@ module _ ( p) left-inv-concat-computational-Id : - (p : x =ʲ y) → inv-computational-Id p ∙ʲ p = reflʲ + (p : x =ʲ y) → invʲ p ∙ʲ p = reflʲ left-inv-concat-computational-Id (z , p , q) = ind-yoneda-Id ( λ _ p → - ( inv-computational-Id (z , p , q) ∙ʲ (z , p , q)) = + ( invʲ (z , p , q) ∙ʲ (z , p , q)) = ( reflʲ)) ( eq-pair-eq-fiber (eq-pair-eq-fiber (right-inv-yoneda-Id q))) ( p) right-inv-concat-computational-Id : - (p : x =ʲ y) → p ∙ʲ inv-computational-Id p = reflʲ + (p : x =ʲ y) → p ∙ʲ invʲ p = reflʲ right-inv-concat-computational-Id (z , p , q) = ind-yoneda-Id ( λ _ q → - ( (z , p , q) ∙ʲ inv-computational-Id (z , p , q)) = + ( (z , p , q) ∙ʲ invʲ (z , p , q)) = ( reflʲ)) ( eq-pair-eq-fiber (eq-pair-eq-fiber (right-inv-yoneda-Id p))) ( q) distributive-inv-concat-computational-Id : (p : x =ʲ y) {z : A} (q : y =ʲ z) → - inv-computational-Id (p ∙ʲ q) = - inv-computational-Id q ∙ʲ inv-computational-Id p + invʲ (p ∙ʲ q) = + invʲ q ∙ʲ invʲ p distributive-inv-concat-computational-Id p = ind-computational-Id ( λ _ q → - inv-computational-Id (p ∙ʲ q) = - inv-computational-Id q ∙ʲ inv-computational-Id p) - ( ap inv-computational-Id (right-unit-concat-computational-Id)) + invʲ (p ∙ʲ q) = + invʲ q ∙ʲ invʲ p) + ( ap invʲ (right-unit-concat-computational-Id)) ``` #### The groupoidal laws for the strictly right unital concatenation operation @@ -666,28 +665,21 @@ module _ left-unit-right-strict-concat-computational-Id : {p : x =ʲ y} → reflʲ ∙ᵣʲ p = p left-unit-right-strict-concat-computational-Id {z , p , q} = - ind-yoneda-Id - ( λ _ q → reflʲ ∙ᵣʲ (z , p , q) = (z , p , q)) - ( refl) - ( q) + ind-yoneda-Id (λ _ q → reflʲ ∙ᵣʲ (z , p , q) = (z , p , q)) refl q left-inv-right-strict-concat-computational-Id : - (p : x =ʲ y) → inv-computational-Id p ∙ᵣʲ p = reflʲ + (p : x =ʲ y) → invʲ p ∙ᵣʲ p = reflʲ left-inv-right-strict-concat-computational-Id (z , p , q) = ind-yoneda-Id - ( λ _ p → - ( inv-computational-Id (z , p , q) ∙ᵣʲ (z , p , q)) = - ( reflʲ)) + ( λ _ p → invʲ (z , p , q) ∙ᵣʲ (z , p , q) = reflʲ) ( eq-pair-eq-fiber (eq-pair (right-inv-yoneda-Id q) refl)) ( p) right-inv-right-strict-concat-computational-Id : - (p : x =ʲ y) → p ∙ᵣʲ inv-computational-Id p = reflʲ + (p : x =ʲ y) → p ∙ᵣʲ invʲ p = reflʲ right-inv-right-strict-concat-computational-Id (z , p , q) = ind-yoneda-Id - ( λ _ q → - ( (z , p , q) ∙ᵣʲ inv-computational-Id (z , p , q)) = - ( reflʲ)) + ( λ _ q → (z , p , q) ∙ᵣʲ invʲ (z , p , q) = reflʲ) ( eq-pair-eq-fiber (eq-pair (right-inv-yoneda-Id p) refl)) ( q) @@ -696,14 +688,10 @@ module _ where distributive-inv-right-strict-concat-computational-Id : - (p : x =ʲ y) {z : A} (q : y =ʲ z) → - inv-computational-Id (p ∙ᵣʲ q) = - inv-computational-Id q ∙ᵣʲ inv-computational-Id p + (p : x =ʲ y) {z : A} (q : y =ʲ z) → invʲ (p ∙ᵣʲ q) = invʲ q ∙ᵣʲ invʲ p distributive-inv-right-strict-concat-computational-Id p = ind-computational-Id - ( λ _ q → - inv-computational-Id (p ∙ᵣʲ q) = - inv-computational-Id q ∙ᵣʲ inv-computational-Id p) + ( λ _ q → invʲ (p ∙ᵣʲ q) = invʲ q ∙ᵣʲ invʲ p) ( inv left-unit-right-strict-concat-computational-Id) ``` @@ -726,10 +714,10 @@ module _ ap-computational-Id = computational-eq-yoneda-eq ∘ ap-yoneda-Id f ∘ yoneda-eq-computational-eq - compute-ap-reflʲ : + compute-ap-refl-computational-Id : {x : A} → ap-computational-Id (reflʲ {x = x}) = reflʲ - compute-ap-reflʲ = refl + compute-ap-refl-computational-Id = refl module _ {l1 : Level} {A : UU l1} @@ -754,9 +742,9 @@ module _ tr-computational-Id : {x y : A} → x =ʲ y → B x → B y tr-computational-Id = tr B ∘ eq-computational-eq - compute-tr-reflʲ : + compute-tr-refl-computational-Id : {x : A} → tr-computational-Id (reflʲ {x = x}) = id - compute-tr-reflʲ = refl + compute-tr-refl-computational-Id = refl ``` ### Function extensionality with respect to computational identifications diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md index 85b638587e..31ac2aad1d 100644 --- a/src/foundation/embeddings.lagda.md +++ b/src/foundation/embeddings.lagda.md @@ -10,7 +10,6 @@ open import foundation-core.embeddings public ```agda open import foundation.action-on-identifications-functions -open import foundation.commuting-squares-of-maps open import foundation.cones-over-cospan-diagrams open import foundation.dependent-pair-types open import foundation.equivalences @@ -23,6 +22,7 @@ open import foundation.truncated-maps open import foundation.universe-levels open import foundation-core.cartesian-product-types +open import foundation-core.commuting-squares-of-maps open import foundation-core.commuting-triangles-of-maps open import foundation-core.contractible-types open import foundation-core.fibers-of-maps @@ -407,7 +407,7 @@ module _ ( map-inv-is-equiv K) ( map-inv-is-equiv L) ( top) - ( coherence-square-maps-inv-equiv-vertical + ( vertical-inv-equiv-coherence-square-maps ( top) ( left , K) ( right , L) diff --git a/src/foundation/equivalences-arrows.lagda.md b/src/foundation/equivalences-arrows.lagda.md index 98c901b158..eac852d2c4 100644 --- a/src/foundation/equivalences-arrows.lagda.md +++ b/src/foundation/equivalences-arrows.lagda.md @@ -218,7 +218,7 @@ module _ ( equiv-domain-inv-equiv-arrow) ( equiv-codomain-inv-equiv-arrow) coh-inv-equiv-arrow = - coherence-square-maps-inv-equiv-horizontal + horizontal-inv-equiv-coherence-square-maps ( equiv-domain-equiv-arrow f g α) ( f) ( g) diff --git a/src/foundation/equivalences.lagda.md b/src/foundation/equivalences.lagda.md index 7bdc8ba6a1..e589682754 100644 --- a/src/foundation/equivalences.lagda.md +++ b/src/foundation/equivalences.lagda.md @@ -15,13 +15,10 @@ open import foundation.dependent-pair-types open import foundation.equivalence-extensionality open import foundation.function-extensionality open import foundation.functoriality-fibers-of-maps -open import foundation.identity-types -open import foundation.path-algebra open import foundation.transposition-identifications-along-equivalences open import foundation.truncated-maps open import foundation.universal-property-equivalences open import foundation.universe-levels -open import foundation.whiskering-identifications-concatenation open import foundation-core.commuting-triangles-of-maps open import foundation-core.contractible-maps @@ -31,6 +28,7 @@ open import foundation-core.fibers-of-maps open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.homotopies +open import foundation-core.identity-types open import foundation-core.injective-maps open import foundation-core.propositions open import foundation-core.pullbacks @@ -604,8 +602,8 @@ module _ is-pullback-swap-cone' f g c ( is-pullback-is-equiv-vertical-maps g f ( swap-cone f g c) - is-equiv-f - is-equiv-q) + ( is-equiv-f) + ( is-equiv-q)) ``` ## See also @@ -617,6 +615,12 @@ module _ [`foundation.contractible-maps`](foundation.contractible-maps.md). - For the notion of path-split maps see [`foundation.path-split-maps`](foundation.path-split-maps.md). +- For the notion of finitely coherent equivalence, see + [`foundation.finitely-coherent-equivalence`)(foundation.finitely-coherent-equivalence.md). +- For the notion of finitely coherently invertible map, see + [`foundation.finitely-coherently-invertible-map`)(foundation.finitely-coherently-invertible-map.md). +- For the notion of infinitely coherent equivalence, see + [`foundation.infinitely-coherent-equivalences`](foundation.infinitely-coherent-equivalences.md). ### Table of files about function types, composition, and equivalences diff --git a/src/foundation/finitely-coherent-equivalences.lagda.md b/src/foundation/finitely-coherent-equivalences.lagda.md new file mode 100644 index 0000000000..ad8dcd5167 --- /dev/null +++ b/src/foundation/finitely-coherent-equivalences.lagda.md @@ -0,0 +1,86 @@ +# Finitely coherent equivalences + +```agda +module foundation.finitely-coherent-equivalences where +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.identity-types +open import foundation.unit-type +open import foundation.universe-levels +``` + +
+ +## Idea + +The condition of being a +{{#concept "finitely coherent equivalence" Agda=is-finitely-coherent-equivalence}} +is introduced by induction on the +[natural numbers](elementary-number-theory.natural-numbers.md). In the base +case, we say that any map `f : A → B` is a +{{#concept "`0`-coherent equivalence" Agda=is-finitely-coherent-equivalence}}. +Recursively, we say that a map `f : A → B` is an +{{#concept "`n + 1`-coherent equivalence" Agda=is-finitely-coherent-equivalence}} +if it comes equipped with a map `g : B → A` and a family of maps + +```text + r x y : (f x = y) → (x = g y) +``` + +indexed by `x : A` and `y : B`, such that each `r x y` is an `n`-coherent +equivalence. + +By the equivalence of [retracting homotopies](foundation-core.retractions.md) +and +[transposition operations of identifications](foundation.transposition-identifications-along-retractions.md) +it therefore follows that a `1`-coherent equivalence is equivalently described +as a map equipped with a retraction. A `2`-coherent equivalence is a map +`f : A → B` equipped with `g : B → A` and for each `x : A` and `y : B` a map +`r x y : (f x = y) → (x = g y)`, equipped with + +```text + s x y : (x = g y) → (f x = y) +``` + +and for each `p : f x = y` and `q : x = g y` a map + +```text + t p q : (r x y p = q) → (p = s x y q). +``` + +This data is equivalent to the data of a +[coherently invertible map](foundation-core.coherently-invertible-maps.md) + +```text + r : (x : A) → g (f x) = x + s : (y : B) → f (g y) = y + t : (x : A) → ap f (r x) = s (f x). +``` + +The condition of being an `n`-coherent equivalence is a +[proposition](foundation-core.propositions.md) for each `n ≥ 2`, and this +proposition is equivalent to being an equivalence. + +## Definitions + +### The predicate of being an `n`-coherent equivalence + +```agda +data + is-finitely-coherent-equivalence + {l1 l2 : Level} {A : UU l1} {B : UU l2} : + (n : ℕ) (f : A → B) → UU (l1 ⊔ l2) + where + is-zero-coherent-equivalence : + (f : A → B) → is-finitely-coherent-equivalence 0 f + is-succ-coherent-equivalence : + (n : ℕ) + (f : A → B) (g : B → A) (H : (x : A) (y : B) → (f x = y) → (x = g y)) → + ((x : A) (y : B) → is-finitely-coherent-equivalence n (H x y)) → + is-finitely-coherent-equivalence (succ-ℕ n) f +``` diff --git a/src/foundation/finitely-coherently-invertible-maps.lagda.md b/src/foundation/finitely-coherently-invertible-maps.lagda.md new file mode 100644 index 0000000000..a48d827c1e --- /dev/null +++ b/src/foundation/finitely-coherently-invertible-maps.lagda.md @@ -0,0 +1,91 @@ +# Finitely coherently invertible maps + +```agda +module foundation.finitely-coherently-invertible-maps where +``` + +
Imports + +```agda +open import elementary-number-theory.natural-numbers + +open import foundation.identity-types +open import foundation.unit-type +open import foundation.universe-levels +``` + +
+ +## Idea + +We introduce the concept of being a +{{#concept "finitely coherently invertible map" Agda=is-finitely-coherently-invertible}} +by induction on the +[natural numbers](elementary-number-theory.natural-numbers.md). In the base +case, we say that a map `f : A → B` is a +{{#concept "`0`-coherently invertible map" Agda=is-finitely-coherently-invertible}} +if it comes equipped with a map `g : B → A`. Recursively, we say that a map +`f : A → B` is an +{{#concept "`n + 1`-coherently invertible map" Agda=is-finitely-coherently-invertible}} +if it comes equipped with map `g : B → A` and a family of maps + +```text + r x y : (f x = y) → (x = g y) +``` + +indexed by `x : A` and `y : B`, such that each `r x y` is `n`-coherently +invertible. + +A `1`-coherently invertible map `f : A → B` is therefore equivalently described +as a map equipped with an inverse `g : B → A` which is simultaneously a +[retraction](foundation-core.retractions.md) and a +[section](foundation-core.sections.md) of `f`. In other words, a `1`-coherently +invertible map is just an [invertible map](foundation-core.invertible-maps.md). + +A `2`-coherently invertible map `f : A → B` comes equipped with `g : B → A` and +for each `x : A` and `y : B` two maps + +```text + r : (f x = y) → (x = g y) + s : (x = g y) → (f x = y) +``` + +and for each `p : f x = y` and `q : x = g y` a map + +```text + t p q : (r p = q) → (p = s q) + u p q : (p = s q) → (r p = q). +``` + +This data is equivalent to the data of + +```text + r : (x : A) → g (f x) = x + s : (y : B) → f (g y) = y + t : (x : A) → ap f (r x) = s (f x) + u : (y : B) → ap g (s y) = r (f y). +``` + +The condition of being a `n`-coherently invertible map is not a +[proposition](foundation-core.propositions.md) for any `n`. In fact, for `n ≥ 1` +the type of all `n`-coherently invertible maps in a universe `𝒰` is equivalent +to the type of maps `sphere (n + 1) → 𝒰` of `n + 1`-spheres in the universe `𝒰`. + +## Definitions + +### The predicate of being an `n`-coherently invertible map + +```agda +data + is-finitely-coherently-invertible + {l1 l2 : Level} {A : UU l1} {B : UU l2} : + (n : ℕ) (f : A → B) → UU (l1 ⊔ l2) + where + is-zero-coherently-invertible : + (f : A → B) → (B → A) → is-finitely-coherently-invertible 0 f + is-succ-coherently-invertible : + (n : ℕ) + (f : A → B) (g : B → A) (H : (x : A) (y : B) → (f x = y) → (x = g y)) → + ((x : A) (y : B) → is-finitely-coherently-invertible n (H x y)) → + is-finitely-coherently-invertible (succ-ℕ n) f +``` diff --git a/src/foundation/fundamental-theorem-of-identity-types.lagda.md b/src/foundation/fundamental-theorem-of-identity-types.lagda.md index 9614810977..a82990327e 100644 --- a/src/foundation/fundamental-theorem-of-identity-types.lagda.md +++ b/src/foundation/fundamental-theorem-of-identity-types.lagda.md @@ -145,7 +145,7 @@ module _ ((x : A) → section (f x)) → is-fiberwise-equiv f fundamental-theorem-id-section f section-f x = - is-equiv-section-is-equiv + is-equiv-is-equiv-section ( f x) ( section-f x) ( fundamental-theorem-id-retraction diff --git a/src/foundation/homotopies.lagda.md b/src/foundation/homotopies.lagda.md index f047aafe53..124dac3bbf 100644 --- a/src/foundation/homotopies.lagda.md +++ b/src/foundation/homotopies.lagda.md @@ -13,7 +13,6 @@ open import foundation.action-on-higher-identifications-functions open import foundation.action-on-identifications-dependent-functions open import foundation.action-on-identifications-functions open import foundation.binary-equivalences -open import foundation.commuting-squares-of-identifications open import foundation.dependent-pair-types open import foundation.function-extensionality open import foundation.homotopy-induction @@ -21,13 +20,14 @@ open import foundation.identity-types open import foundation.path-algebra open import foundation.universe-levels open import foundation.whiskering-homotopies-composition -open import foundation.whiskering-identifications-concatenation +open import foundation-core.commuting-squares-of-identifications open import foundation-core.dependent-identifications open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.functoriality-dependent-function-types open import foundation-core.transport-along-identifications +open import foundation-core.whiskering-identifications-concatenation ``` diff --git a/src/foundation/homotopy-algebra.lagda.md b/src/foundation/homotopy-algebra.lagda.md index 43a59baced..80e83db492 100644 --- a/src/foundation/homotopy-algebra.lagda.md +++ b/src/foundation/homotopy-algebra.lagda.md @@ -7,7 +7,6 @@ module foundation.homotopy-algebra where
Imports ```agda -open import foundation.homotopy-induction open import foundation.universe-levels open import foundation.whiskering-homotopies-composition @@ -34,12 +33,12 @@ module _ {f f' : (x : A) → B x} {g g' : {x : A} → B x → C x} where - horizontal-concat-htpy : f ~ f' → ({x : A} → g {x} ~ g' {x}) → g ∘ f ~ g' ∘ f' - horizontal-concat-htpy F G = (g ·l F) ∙h (G ·r f') + horizontal-concat-htpy : ({x : A} → g {x} ~ g' {x}) → f ~ f' → g ∘ f ~ g' ∘ f' + horizontal-concat-htpy G F = (g ·l F) ∙h (G ·r f') horizontal-concat-htpy' : - f ~ f' → ({x : A} → g {x} ~ g' {x}) → g ∘ f ~ g' ∘ f' - horizontal-concat-htpy' F G = (G ·r f) ∙h (g' ·l F) + ({x : A} → g {x} ~ g' {x}) → f ~ f' → g ∘ f ~ g' ∘ f' + horizontal-concat-htpy' G F = (G ·r f) ∙h (g' ·l F) ``` ## Properties @@ -51,27 +50,43 @@ module _ {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3} where - coh-left-unit-horizontal-concat-htpy : + coh-right-unit-horizontal-concat-htpy : {f : (x : A) → B x} {g g' : {x : A} → B x → C x} (G : {x : A} → g {x} ~ g' {x}) → - horizontal-concat-htpy (refl-htpy' f) G ~ - horizontal-concat-htpy' (refl-htpy' f) G - coh-left-unit-horizontal-concat-htpy G = inv-htpy-right-unit-htpy + horizontal-concat-htpy G (refl-htpy' f) ~ + horizontal-concat-htpy' G (refl-htpy' f) + coh-right-unit-horizontal-concat-htpy G = inv-htpy-right-unit-htpy - coh-right-unit-horizontal-concat-htpy : + coh-left-unit-horizontal-concat-htpy : {f f' : (x : A) → B x} {g : {x : A} → B x → C x} (F : f ~ f') → - horizontal-concat-htpy F (refl-htpy' g) ~ - horizontal-concat-htpy' F (refl-htpy' g) - coh-right-unit-horizontal-concat-htpy F = right-unit-htpy + horizontal-concat-htpy (refl-htpy' g) F ~ + horizontal-concat-htpy' (refl-htpy' g) F + coh-left-unit-horizontal-concat-htpy F = right-unit-htpy +``` + +For the general case, we must construct a coherence of the square + +```text + g ·r F + gf -------> gf' + | | + G ·r f | | G ·r f' + ∨ ∨ + g'f ------> g'f' + g' ·r F +``` + +but this is an instance of naturality of `G` applied to `F`. + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : A → UU l2} {C : A → UU l3} + {f f' : (x : A) → B x} {g g' : {x : A} → B x → C x} + (G : {x : A} → g {x} ~ g' {x}) (F : f ~ f') + where coh-horizontal-concat-htpy : - {f f' : (x : A) → B x} {g g' : {x : A} → B x → C x} - (F : f ~ f') (G : {x : A} → g {x} ~ g' {x}) → - horizontal-concat-htpy F G ~ horizontal-concat-htpy' F G - coh-horizontal-concat-htpy {f} F G = - ind-htpy f - ( λ f' F → horizontal-concat-htpy F G ~ horizontal-concat-htpy' F G) - ( coh-left-unit-horizontal-concat-htpy G) - ( F) + horizontal-concat-htpy' G F ~ horizontal-concat-htpy G F + coh-horizontal-concat-htpy = nat-htpy G ·r F ``` diff --git a/src/foundation/infinitely-coherent-equivalences.lagda.md b/src/foundation/infinitely-coherent-equivalences.lagda.md new file mode 100644 index 0000000000..a650beffa9 --- /dev/null +++ b/src/foundation/infinitely-coherent-equivalences.lagda.md @@ -0,0 +1,362 @@ +# Infinitely coherent equivalences + +```agda +{-# OPTIONS --guardedness --lossy-unification #-} + +module foundation.infinitely-coherent-equivalences where +``` + +
Imports + +```agda +open import foundation.commuting-triangles-of-maps +open import foundation.dependent-pair-types +open import foundation.equivalences +open import foundation.function-types +open import foundation.homotopies +open import foundation.identity-types +open import foundation.propositions +open import foundation.retractions +open import foundation.sections +open import foundation.transposition-identifications-along-equivalences +open import foundation.universe-levels +``` + +
+ +## Idea + +An {{#concept "infinitely coherent equivalence" Agda=_≃∞_}} `e : A ≃∞ B` from +`A` to `B` consists of maps + +```text + f : A → B + g : B → A +``` + +and for each `x : A` and `y : B` an infinitely coherent equivalence + +```text + ∞-equiv-transpose-eq-∞-equiv : (f x = y) ≃∞ (x = g y). +``` + +Since this definition is infinite, it follows that for any `x : A` and `y : B` +we have maps + +```text + f' : (f x = y) → (x = g y) + g' : (x = g y) → (f x = y) +``` + +and for each `p : f x = y` and `q : g y = x` an infinitely coherent +equivalence + +```text +∞-equiv-transpose-eq-∞-equiv : (f' p = q) ≃∞ (p = g' q). +``` + +In particular, we have identifications + +```text + inv (f' x (f x) refl) : x = g (f x) + g' y (g y) refl : f (g y) = y, +``` + +which are the usual homotopies witnessing that `g` is a retraction and a section +of `f`. By infinitely imposing the structure of a coherent equivalence, we have +stated an infinite hierarchy of coherence conditions. In other words, the +infinite condition on infinitely coherent equivalences is a way of stating +infinite coherence for equivalences. + +Being an infinitely coherent equivalence is an inverse sequential limit of the +diagram + +```text + ... ---> is-finitely-coherent-equivalence 1 f ---> is-finitely-coherent-equivalence 0 f. +``` + +## Definitions + +### The predicate of being an infinitely coherent equivalence + +```agda +record is-∞-equiv + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) : UU (l1 ⊔ l2) + where + coinductive + field + map-inv-is-∞-equiv : B → A + map-transpose-is-∞-equiv : + (x : A) (y : B) → f x = y → x = map-inv-is-∞-equiv y + is-∞-equiv-map-transpose-is-∞-equiv : + (x : A) (y : B) → is-∞-equiv (map-transpose-is-∞-equiv x y) + +open is-∞-equiv public +``` + +### Infinitely coherent equivalences + +```agda +record + ∞-equiv + {l1 l2 : Level} (A : UU l1) (B : UU l2) : UU (l1 ⊔ l2) + where + coinductive + field + map-∞-equiv : A → B + map-inv-∞-equiv : B → A + ∞-equiv-transpose-eq-∞-equiv : + (x : A) (y : B) → ∞-equiv (map-∞-equiv x = y) (x = map-inv-∞-equiv y) + +open ∞-equiv public + +module _ + {l1 l2 : Level} (A : UU l1) (B : UU l2) + where + + infix 6 _≃∞_ + + _≃∞_ : UU (l1 ⊔ l2) + _≃∞_ = ∞-equiv A B + +∞-equiv-is-∞-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} → is-∞-equiv f → A ≃∞ B +map-∞-equiv (∞-equiv-is-∞-equiv {f = f} H) = f +map-inv-∞-equiv (∞-equiv-is-∞-equiv H) = map-inv-is-∞-equiv H +∞-equiv-transpose-eq-∞-equiv (∞-equiv-is-∞-equiv H) x y = + ∞-equiv-is-∞-equiv (is-∞-equiv-map-transpose-is-∞-equiv H x y) + +map-transpose-eq-∞-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃∞ B) → + (x : A) (y : B) → (map-∞-equiv e x = y) → (x = map-inv-∞-equiv e y) +map-transpose-eq-∞-equiv e x y = + map-∞-equiv (∞-equiv-transpose-eq-∞-equiv e x y) + +is-∞-equiv-∞-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃∞ B) → + is-∞-equiv (map-∞-equiv e) +map-inv-is-∞-equiv (is-∞-equiv-∞-equiv e) = + map-inv-∞-equiv e +map-transpose-is-∞-equiv (is-∞-equiv-∞-equiv e) = + map-transpose-eq-∞-equiv e +is-∞-equiv-map-transpose-is-∞-equiv (is-∞-equiv-∞-equiv e) x y = + is-∞-equiv-∞-equiv (∞-equiv-transpose-eq-∞-equiv e x y) + +is-∞-equiv-map-transpose-eq-∞-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃∞ B) (x : A) (y : B) → + is-∞-equiv (map-transpose-eq-∞-equiv e x y) +is-∞-equiv-map-transpose-eq-∞-equiv e x y = + is-∞-equiv-∞-equiv (∞-equiv-transpose-eq-∞-equiv e x y) +``` + +### Infinitely coherent identity equivalences + +```agda +is-∞-equiv-id : {l1 : Level} {A : UU l1} → is-∞-equiv (id {A = A}) +map-inv-is-∞-equiv is-∞-equiv-id = id +map-transpose-is-∞-equiv is-∞-equiv-id x y = id +is-∞-equiv-map-transpose-is-∞-equiv is-∞-equiv-id x y = is-∞-equiv-id + +id-∞-equiv : {l1 : Level} {A : UU l1} → A ≃∞ A +id-∞-equiv = ∞-equiv-is-∞-equiv is-∞-equiv-id +``` + +### Composition of infinitely coherent equivalences + +```agda +is-∞-equiv-comp : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} + {g : B → C} {f : A → B} + (G : is-∞-equiv g) + (F : is-∞-equiv f) → + is-∞-equiv (g ∘ f) +map-inv-is-∞-equiv (is-∞-equiv-comp G F) = + map-inv-is-∞-equiv F ∘ map-inv-is-∞-equiv G +map-transpose-is-∞-equiv (is-∞-equiv-comp G F) x z p = + map-transpose-is-∞-equiv F x _ (map-transpose-is-∞-equiv G _ z p) +is-∞-equiv-map-transpose-is-∞-equiv (is-∞-equiv-comp G F) x z = + is-∞-equiv-comp + ( is-∞-equiv-map-transpose-is-∞-equiv F x _) + ( is-∞-equiv-map-transpose-is-∞-equiv G _ z) + +comp-∞-equiv : + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} → + B ≃∞ C → A ≃∞ B → A ≃∞ C +comp-∞-equiv f e = + ∞-equiv-is-∞-equiv + ( is-∞-equiv-comp (is-∞-equiv-∞-equiv f) (is-∞-equiv-∞-equiv e)) +``` + +### Infinitely coherent equivalences obtained from equivalences + +Since +[transposing identifications along an equivalence](foundation.transposition-identifications-along-equivalences.md) +is an equivalence, it follows immediately that equivalences are infinitely +coherent equivalences. This argument does not require +[function extensionality](foundation.function-extensionality.md). + +```agda +is-∞-equiv-is-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} → + is-equiv f → is-∞-equiv f +map-inv-is-∞-equiv (is-∞-equiv-is-equiv H) = + map-inv-is-equiv H +map-transpose-is-∞-equiv (is-∞-equiv-is-equiv H) x y = + map-eq-transpose-equiv (_ , H) +is-∞-equiv-map-transpose-is-∞-equiv (is-∞-equiv-is-equiv H) x y = + is-∞-equiv-is-equiv (is-equiv-map-equiv (eq-transpose-equiv (_ , H) x y)) + +∞-equiv-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} → A ≃ B → A ≃∞ B +∞-equiv-equiv e = + ∞-equiv-is-∞-equiv (is-∞-equiv-is-equiv (is-equiv-map-equiv e)) +``` + +## Properties + +### Any map homotopic to an infinitely coherent equivalence is an infinitely coherent equivalence + +```agda +is-∞-equiv-htpy : + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f g : A → B} → + f ~ g → + is-∞-equiv f → is-∞-equiv g +map-inv-is-∞-equiv (is-∞-equiv-htpy H K) = + map-inv-is-∞-equiv K +map-transpose-is-∞-equiv (is-∞-equiv-htpy H K) x y = + map-transpose-is-∞-equiv K x y ∘ concat (H x) _ +is-∞-equiv-map-transpose-is-∞-equiv (is-∞-equiv-htpy H K) x y = + is-∞-equiv-comp + ( is-∞-equiv-map-transpose-is-∞-equiv K x y) + ( is-∞-equiv-is-equiv (is-equiv-concat (H x) _)) +``` + +### Homotopies of elements of type `is-∞-equiv f` + +Consider a map `f : A → B` and consider two elements + +```text + H K : is-∞-equiv f. +``` + +A {{#concept "homotopy of elments of type `is-∞-equiv`" Agda=htpy-is-∞-equiv}} +from `H := (h , s , H')` to `K := (k , t , K')` consists of a homotopy + +```text + α₀ : h ~ k, +``` + +for each `x : A` and `y : B` a homotopy `α₁` witnessing that the triangle + +```text + (f x = y) + / \ + s x y / \ t x y + / \ + ∨ ∨ + (x = h y) --------------> (x = k y) + p ↦ p ∙ α₀ y +``` + +commutes, and finally a homotopy of elements of type + +```text + is-infinitely-coherent-equivalence + ( is-∞-equiv-htpy α₁ + ( is-∞-equiv-comp + ( is-∞-equiv-is-equiv + ( is-equiv-concat' _ (α₀ y))) + ( H' x y)) + ( K' x y). +``` + +In other words, there are by the previous data two witnesses of the fact that +`t x y` is an infinitely coherent equivalence. The second (easiest) element is +the given element `K' x y`. The first element is from the homotopy witnessing +that the above triangle commutes. On the left we compose two infinitely coherent +equivalences, which results in an infinitely coherent equivalence, and the +element witnessing that the composite is an infinitely coherent equivalence +transports along the homotopy to a new element witnessing that `t x y` is an +infinitely coherent equivalence. + +```agda +record + htpy-is-∞-equiv + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) + (H K : is-∞-equiv f) : UU (l1 ⊔ l2) + where + coinductive + field + htpy-map-inv-htpy-is-∞-equiv : + map-inv-is-∞-equiv H ~ map-inv-is-∞-equiv K + htpy-map-transpose-htpy-is-∞-equiv : + (x : A) (y : B) → + coherence-triangle-maps + ( map-transpose-is-∞-equiv K x y) + ( concat' _ (htpy-map-inv-htpy-is-∞-equiv y)) + ( map-transpose-is-∞-equiv H x y) + infinitely-htpy-htpy-is-∞-equiv : + (x : A) (y : B) → + htpy-is-∞-equiv + ( map-transpose-is-∞-equiv K x y) + ( is-∞-equiv-htpy + ( inv-htpy (htpy-map-transpose-htpy-is-∞-equiv x y)) + ( is-∞-equiv-comp + ( is-∞-equiv-is-equiv (is-equiv-concat' _ _)) + ( is-∞-equiv-map-transpose-is-∞-equiv H x y))) + ( is-∞-equiv-map-transpose-is-∞-equiv K x y) +``` + +### Being an infinitely coherent equivalence implies being an equivalence + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + where + + is-equiv-is-∞-equiv : is-∞-equiv f → is-equiv f + is-equiv-is-∞-equiv H = + is-equiv-is-invertible + ( map-inv-is-∞-equiv H) + ( λ y → + map-inv-is-∞-equiv (is-∞-equiv-map-transpose-is-∞-equiv H _ y) refl) + ( λ x → inv (map-transpose-is-∞-equiv H x (f x) refl)) +``` + +### Computing the type `is-∞-equiv f` + +```agda +type-compute-is-∞-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → UU (l1 ⊔ l2) +type-compute-is-∞-equiv {A = A} {B} f = + Σ (B → A) (λ g → (x : A) (y : B) → Σ ((f x = y) → (x = g y)) is-∞-equiv) + +map-compute-is-∞-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → + type-compute-is-∞-equiv f → is-∞-equiv f +map-inv-is-∞-equiv (map-compute-is-∞-equiv f H) = + pr1 H +map-transpose-is-∞-equiv (map-compute-is-∞-equiv f H) x y = + pr1 (pr2 H x y) +is-∞-equiv-map-transpose-is-∞-equiv (map-compute-is-∞-equiv f H) x y = + pr2 (pr2 H x y) + +map-inv-compute-is-∞-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → + is-∞-equiv f → type-compute-is-∞-equiv f +pr1 (map-inv-compute-is-∞-equiv f H) = + map-inv-is-∞-equiv H +pr1 (pr2 (map-inv-compute-is-∞-equiv f H) x y) = + map-transpose-is-∞-equiv H x y +pr2 (pr2 (map-inv-compute-is-∞-equiv f H) x y) = + is-∞-equiv-map-transpose-is-∞-equiv H x y +``` + +### Being an infinitely coherent equivalence is a property + +```text +is-prop-is-∞-equiv : + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → + is-prop (is-∞-equiv f) +is-prop-is-∞-equiv = {!!} +``` diff --git a/src/foundation/invertible-maps.lagda.md b/src/foundation/invertible-maps.lagda.md index 6f2b2ec088..47fb7cca31 100644 --- a/src/foundation/invertible-maps.lagda.md +++ b/src/foundation/invertible-maps.lagda.md @@ -9,6 +9,7 @@ open import foundation-core.invertible-maps public
Imports ```agda +open import foundation.action-on-identifications-functions open import foundation.commuting-triangles-of-homotopies open import foundation.dependent-pair-types open import foundation.equality-cartesian-product-types @@ -22,7 +23,6 @@ open import foundation.homotopies open import foundation.homotopy-algebra open import foundation.homotopy-induction open import foundation.postcomposition-functions -open import foundation.propositions open import foundation.retractions open import foundation.sections open import foundation.structure-identity-principle @@ -31,9 +31,11 @@ open import foundation.universe-levels open import foundation.whiskering-homotopies-composition open import foundation-core.cartesian-product-types +open import foundation-core.coherently-invertible-maps open import foundation-core.function-types open import foundation-core.functoriality-dependent-pair-types open import foundation-core.identity-types +open import foundation-core.propositions open import foundation-core.torsorial-type-families open import foundation-core.truncated-types open import foundation-core.truncation-levels @@ -110,9 +112,9 @@ module _ ( is-torsorial-htpy (map-inv-is-invertible s)) ( map-inv-is-invertible s , refl-htpy) ( is-torsorial-Eq-structure - ( is-torsorial-htpy (is-retraction-is-invertible s)) - ( is-retraction-is-invertible s , refl-htpy) - (is-torsorial-htpy (is-section-is-invertible s))) + ( is-torsorial-htpy (is-section-map-inv-is-invertible s)) + ( is-section-map-inv-is-invertible s , refl-htpy) + (is-torsorial-htpy (is-retraction-map-inv-is-invertible s))) is-equiv-htpy-eq-is-invertible : (s t : is-invertible f) → is-equiv (htpy-eq-is-invertible s t) @@ -144,13 +146,13 @@ module _ map-inv-invertible-map s ~ map-inv-invertible-map t → UU (l1 ⊔ l2) coherence-htpy-invertible-map s t H I = ( coherence-triangle-homotopies - ( is-retraction-map-invertible-map s) - ( is-retraction-map-invertible-map t) - ( horizontal-concat-htpy I H)) × + ( is-section-map-inv-invertible-map s) + ( is-section-map-inv-invertible-map t) + ( horizontal-concat-htpy H I)) × ( coherence-triangle-homotopies - ( is-section-map-invertible-map s) - ( is-section-map-invertible-map t) - ( horizontal-concat-htpy H I)) + ( is-retraction-map-inv-invertible-map s) + ( is-retraction-map-inv-invertible-map t) + ( horizontal-concat-htpy I H)) htpy-invertible-map : (s t : invertible-map A B) → UU (l1 ⊔ l2) htpy-invertible-map s t = @@ -179,9 +181,9 @@ module _ ( is-torsorial-htpy (map-inv-invertible-map s)) ( map-inv-invertible-map s , refl-htpy) ( is-torsorial-Eq-structure - ( is-torsorial-htpy (is-retraction-map-invertible-map s)) - ( is-retraction-map-invertible-map s , refl-htpy) - ( is-torsorial-htpy (is-section-map-invertible-map s)))) + ( is-torsorial-htpy (is-section-map-inv-invertible-map s)) + ( is-section-map-inv-invertible-map s , refl-htpy) + ( is-torsorial-htpy (is-retraction-map-inv-invertible-map s)))) is-equiv-htpy-eq-invertible-map : (s t : invertible-map A B) → is-equiv (htpy-eq-invertible-map s t) @@ -375,6 +377,20 @@ module _ equiv-free-loop-equivalence-invertible-equivalence ``` +### The action of invertible maps on identifications is invertible + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} {f : A → B} + (H : is-invertible f) {x y : A} + where + + is-invertible-ap-is-invertible : is-invertible (ap f {x} {y}) + is-invertible-ap-is-invertible = + is-invertible-ap-is-coherently-invertible + ( is-coherently-invertible-is-invertible H) +``` + ## See also - For the coherent notion of invertible maps see diff --git a/src/foundation/path-algebra.lagda.md b/src/foundation/path-algebra.lagda.md index bb110a0312..f22f14f192 100644 --- a/src/foundation/path-algebra.lagda.md +++ b/src/foundation/path-algebra.lagda.md @@ -11,16 +11,16 @@ open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions open import foundation.binary-embeddings open import foundation.binary-equivalences -open import foundation.commuting-squares-of-identifications open import foundation.dependent-pair-types open import foundation.identity-types open import foundation.universe-levels -open import foundation.whiskering-identifications-concatenation +open import foundation-core.commuting-squares-of-identifications open import foundation-core.constant-maps open import foundation-core.equivalences open import foundation-core.function-types open import foundation-core.homotopies +open import foundation-core.whiskering-identifications-concatenation ```
@@ -142,7 +142,7 @@ vertical-concat-Id² α β = α ∙ β horizontal-concat-Id² : {l : Level} {A : UU l} {x y z : A} {p q : x = y} {u v : y = z} → - p = q → u = v → (p ∙ u) = (q ∙ v) + p = q → u = v → p ∙ u = q ∙ v horizontal-concat-Id² α β = ap-binary (_∙_) α β ``` @@ -174,17 +174,15 @@ right-unit-law-vertical-concat-Id² : vertical-concat-Id² α refl = α right-unit-law-vertical-concat-Id² = right-unit -left-unit-law-horizontal-concat-Id² : +compute-left-refl-horizontal-concat-Id² : {l : Level} {A : UU l} {x y z : A} {p : x = y} {u v : y = z} (γ : u = v) → - horizontal-concat-Id² (refl {x = p}) γ = - left-whisker-concat p γ -left-unit-law-horizontal-concat-Id² = left-unit-ap-binary (_∙_) + horizontal-concat-Id² refl γ = left-whisker-concat p γ +compute-left-refl-horizontal-concat-Id² = left-unit-ap-binary (_∙_) -right-unit-law-horizontal-concat-Id² : +compute-right-refl-horizontal-concat-Id² : {l : Level} {A : UU l} {x y z : A} {p q : x = y} (α : p = q) {u : y = z} → - horizontal-concat-Id² α (refl {x = u}) = - right-whisker-concat α u -right-unit-law-horizontal-concat-Id² = right-unit-ap-binary (_∙_) + horizontal-concat-Id² α refl = right-whisker-concat α u +compute-right-refl-horizontal-concat-Id² = right-unit-ap-binary (_∙_) ``` Horizontal concatenation satisfies an additional "2-dimensional" unit law (on @@ -204,17 +202,19 @@ module _ nat-sq-right-unit-Id² = ( ( horizontal-concat-Id² refl (inv (ap-id α))) ∙ ( nat-htpy htpy-right-unit α)) ∙ - ( horizontal-concat-Id² (inv (right-unit-law-horizontal-concat-Id² α)) refl) + ( horizontal-concat-Id² + ( inv (compute-right-refl-horizontal-concat-Id² α)) + ( refl)) nat-sq-left-unit-Id² : coherence-square-identifications - ( horizontal-concat-Id² (refl {x = refl}) α) + ( horizontal-concat-Id² refl α) ( left-unit) ( left-unit) ( α) nat-sq-left-unit-Id² = ( ( (inv (ap-id α) ∙ (nat-htpy htpy-left-unit α)) ∙ right-unit) ∙ - ( inv (left-unit-law-horizontal-concat-Id² α))) ∙ + ( inv (compute-left-refl-horizontal-concat-Id² α))) ∙ ( inv right-unit) ``` @@ -227,7 +227,7 @@ module _ {l : Level} {A : UU l} {x y : A} {p p' : x = y} where - horizontal-inv-Id² : p = p' → (inv p) = (inv p') + horizontal-inv-Id² : p = p' → inv p = inv p' horizontal-inv-Id² = ap inv ``` @@ -284,33 +284,49 @@ interchange-Id² : ( vertical-concat-Id² ( horizontal-concat-Id² α γ) ( horizontal-concat-Id² β δ)) -interchange-Id² refl refl refl refl = refl +interchange-Id² refl _ refl _ = refl + +inner-interchange-Id² : + {l : Level} {A : UU l} {x y z : A} {p r : x = y} {u v : y = z} + (β : p = r) (γ : u = v) → + ( horizontal-concat-Id² β γ) = + ( vertical-concat-Id² (left-whisker-concat p γ) (right-whisker-concat β v)) +inner-interchange-Id² {u = refl} β refl = + compute-right-refl-horizontal-concat-Id² β + +outer-interchange-Id² : + {l : Level} {A : UU l} {x y z : A} {p q : x = y} {u w : y = z} + (α : p = q) (δ : u = w) → + ( horizontal-concat-Id² α δ) = + ( vertical-concat-Id² (right-whisker-concat α u) (left-whisker-concat q δ)) +outer-interchange-Id² {p = refl} refl δ = + compute-left-refl-horizontal-concat-Id² δ unit-law-α-interchange-Id² : {l : Level} {A : UU l} {x y z : A} {p q : x = y} (α : p = q) (u : y = z) → ( ( interchange-Id² α refl (refl {x = u}) refl) ∙ - ( right-unit ∙ right-unit-law-horizontal-concat-Id² α)) = - ( ( right-unit-law-horizontal-concat-Id² (α ∙ refl)) ∙ + ( right-unit ∙ compute-right-refl-horizontal-concat-Id² α)) = + ( ( compute-right-refl-horizontal-concat-Id² (α ∙ refl)) ∙ ( ap (λ s → right-whisker-concat s u) right-unit)) -unit-law-α-interchange-Id² refl u = refl +unit-law-α-interchange-Id² refl _ = refl unit-law-β-interchange-Id² : {l : Level} {A : UU l} {x y z : A} {p q : x = y} (β : p = q) (u : y = z) → interchange-Id² refl β (refl {x = u}) refl = refl -unit-law-β-interchange-Id² refl u = refl +unit-law-β-interchange-Id² refl _ = refl unit-law-γ-interchange-Id² : {l : Level} {A : UU l} {x y z : A} (p : x = y) {u v : y = z} (γ : u = v) → ( ( interchange-Id² (refl {x = p}) refl γ refl) ∙ - ( right-unit ∙ left-unit-law-horizontal-concat-Id² γ)) = - ( ( left-unit-law-horizontal-concat-Id² (γ ∙ refl)) ∙ + ( right-unit ∙ compute-left-refl-horizontal-concat-Id² γ)) = + ( ( compute-left-refl-horizontal-concat-Id² (γ ∙ refl)) ∙ ( ap (left-whisker-concat p) right-unit)) -unit-law-γ-interchange-Id² p refl = refl +unit-law-γ-interchange-Id² _ refl = refl unit-law-δ-interchange-Id² : {l : Level} {A : UU l} {x y z : A} (p : x = y) {u v : y = z} (δ : u = v) → interchange-Id² (refl {x = p}) refl refl δ = refl -unit-law-δ-interchange-Id² p refl = refl +unit-law-δ-interchange-Id² _ refl = refl ``` ## Properties of 3-paths @@ -375,13 +391,13 @@ left-unit-law-y-concat-Id³ : {l : Level} {A : UU l} {x y : A} {p q r : x = y} {α : p = q} {γ δ : q = r} {τ : γ = δ} → y-concat-Id³ (refl {x = α}) τ = left-whisker-concat α τ -left-unit-law-y-concat-Id³ {τ = τ} = left-unit-law-horizontal-concat-Id² τ +left-unit-law-y-concat-Id³ {τ = τ} = compute-left-refl-horizontal-concat-Id² τ right-unit-law-y-concat-Id³ : {l : Level} {A : UU l} {x y : A} {p q r : x = y} {α β : p = q} {γ : q = r} {σ : α = β} → y-concat-Id³ σ (refl {x = γ}) = right-whisker-concat σ γ -right-unit-law-y-concat-Id³ {σ = σ} = right-unit-law-horizontal-concat-Id² σ +right-unit-law-y-concat-Id³ {σ = σ} = compute-right-refl-horizontal-concat-Id² σ left-unit-law-z-concat-Id³ : {l : Level} {A : UU l} {x y z : A} {p q : x = y} {u v : y = z} diff --git a/src/foundation/postcomposition-dependent-functions.lagda.md b/src/foundation/postcomposition-dependent-functions.lagda.md index 137f0f6cca..7e35bf5c87 100644 --- a/src/foundation/postcomposition-dependent-functions.lagda.md +++ b/src/foundation/postcomposition-dependent-functions.lagda.md @@ -102,7 +102,7 @@ module _ ( eq-htpy) ( ap (postcomp-Π A f)) compute-eq-htpy-ap-postcomp-Π = - coherence-square-maps-inv-equiv-vertical + vertical-inv-equiv-coherence-square-maps ( ap (postcomp-Π A f)) ( equiv-funext) ( equiv-funext) diff --git a/src/foundation/precomposition-dependent-functions.lagda.md b/src/foundation/precomposition-dependent-functions.lagda.md index 9ef0b0863b..a4ef43be00 100644 --- a/src/foundation/precomposition-dependent-functions.lagda.md +++ b/src/foundation/precomposition-dependent-functions.lagda.md @@ -91,7 +91,7 @@ module _ ( eq-htpy) ( ap (precomp-Π f C) {g} {h}) compute-eq-htpy-ap-precomp-Π = - coherence-square-maps-inv-equiv-vertical + vertical-inv-equiv-coherence-square-maps ( ap (precomp-Π f C)) ( equiv-funext) ( equiv-funext) diff --git a/src/foundation/precomposition-functions.lagda.md b/src/foundation/precomposition-functions.lagda.md index c695bf66bd..eba63757e6 100644 --- a/src/foundation/precomposition-functions.lagda.md +++ b/src/foundation/precomposition-functions.lagda.md @@ -206,7 +206,7 @@ module _ ( eq-htpy) ( ap (precomp f C)) compute-eq-htpy-ap-precomp = - coherence-square-maps-inv-equiv-vertical + vertical-inv-equiv-coherence-square-maps ( ap (precomp f C)) ( equiv-funext) ( equiv-funext) diff --git a/src/foundation/retractions.lagda.md b/src/foundation/retractions.lagda.md index a58a62b32d..b412a82210 100644 --- a/src/foundation/retractions.lagda.md +++ b/src/foundation/retractions.lagda.md @@ -97,25 +97,7 @@ pr2 ```agda abstract is-injective-retraction : - {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → retraction f → - is-injective f - is-injective-retraction f (h , H) {x} {y} p = (inv (H x)) ∙ (ap h p ∙ H y) -``` - -### Transposing identifications along retractions - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) - where - - transpose-eq-retraction : - (g : B → A) (H : (g ∘ f) ~ id) {x : B} {y : A} → - x = f y → g x = y - transpose-eq-retraction g H refl = H _ - - transpose-eq-retraction' : - (g : B → A) (H : (g ∘ f) ~ id) {x : A} {y : B} → - f x = y → x = g y - transpose-eq-retraction' g H refl = inv (H _) + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → + retraction f → is-injective f + is-injective-retraction f (h , H) {x} {y} p = inv (H x) ∙ (ap h p ∙ H y) ``` diff --git a/src/foundation/sections.lagda.md b/src/foundation/sections.lagda.md index 15ba000b59..9a000d7e96 100644 --- a/src/foundation/sections.lagda.md +++ b/src/foundation/sections.lagda.md @@ -187,21 +187,3 @@ is-injective-map-section-family : is-injective (map-section-family b) is-injective-map-section-family b = ap pr1 ``` - -### Transposing identifications along sections - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) - where - - transpose-eq-section : - (g : B → A) (H : (f ∘ g) ~ id) {x : A} {y : B} → - x = g y → f x = y - transpose-eq-section g H refl = H _ - - transpose-eq-section' : - (g : B → A) (H : (f ∘ g) ~ id) {x : B} {y : A} → - g x = y → x = f y - transpose-eq-section' g H refl = inv (H _) -``` diff --git a/src/foundation/strictly-involutive-identity-types.lagda.md b/src/foundation/strictly-involutive-identity-types.lagda.md index 4038f825c2..0484a7fb0a 100644 --- a/src/foundation/strictly-involutive-identity-types.lagda.md +++ b/src/foundation/strictly-involutive-identity-types.lagda.md @@ -44,15 +44,15 @@ whose elements we call family is [equivalent](foundation-core.equivalences.md) to the standard identity types, but satisfies the strict laws -- `inv (inv p) ≐ p` -- `inv reflⁱ ≐ reflⁱ` +- `invⁱ (invⁱ p) ≐ p` +- `invⁱ reflⁱ ≐ reflⁱ` where we use a superscript `i` to distinguish the strictly involutive identity type from the standard identity type. In addition, we maintain the following strict laws -- `inv reflⁱ ≐ reflⁱ` +- `invⁱ reflⁱ ≐ reflⁱ` - `reflⁱ ∙ p ≐ p` or `p ∙ reflⁱ ≐ p` - `ind-Idⁱ B f reflⁱ ≐ f reflⁱ` @@ -248,24 +248,21 @@ groupoidal structure on types. We have an inversion operation on `involutive-Id` defined by swapping the position of the identifications. This operation satisfies the strict laws -- `inv (inv p) ≐ p`, and -- `inv reflⁱ ≐ reflⁱ`. +- `invⁱ (invⁱ p) ≐ p`, and +- `invⁱ reflⁱ ≐ reflⁱ`. ```agda module _ {l : Level} {A : UU l} where - inv-involutive-Id : {x y : A} → x =ⁱ y → y =ⁱ x - inv-involutive-Id (z , p , q) = (z , q , p) + invⁱ : {x y : A} → x =ⁱ y → y =ⁱ x + invⁱ (z , p , q) = (z , q , p) - compute-inv-involutive-Id-refl : - {x : A} → - inv-involutive-Id (reflⁱ {x = x}) = reflⁱ - compute-inv-involutive-Id-refl = refl + compute-refl-inv-involutive-Id : {x : A} → invⁱ (reflⁱ {x = x}) = reflⁱ + compute-refl-inv-involutive-Id = refl - inv-inv-involutive-Id : - {x y : A} (p : x =ⁱ y) → inv-involutive-Id (inv-involutive-Id p) = p + inv-inv-involutive-Id : {x y : A} (p : x =ⁱ y) → invⁱ (invⁱ p) = p inv-inv-involutive-Id p = refl ``` @@ -279,12 +276,12 @@ module _ preserves-inv-involutive-eq-eq : {x y : A} (p : x = y) → - involutive-eq-eq (inv p) = inv-involutive-Id (involutive-eq-eq p) + involutive-eq-eq (inv p) = invⁱ (involutive-eq-eq p) preserves-inv-involutive-eq-eq refl = refl preserves-inv-eq-involutive-eq : {x y : A} (p : x =ⁱ y) → - eq-involutive-eq (inv-involutive-Id p) = inv (eq-involutive-eq p) + eq-involutive-eq (invⁱ p) = inv (eq-involutive-eq p) preserves-inv-eq-involutive-eq (z , p , q) = ap (inv p ∙_) (inv (inv-inv q)) ∙ inv (distributive-inv-concat (inv q) p) ``` @@ -439,8 +436,7 @@ module _ where assoc-involutive-Id : - (p : x =ⁱ y) (q : y =ⁱ z) (r : z =ⁱ w) → - ((p ∙ⁱ q) ∙ⁱ r) = (p ∙ⁱ (q ∙ⁱ r)) + (p : x =ⁱ y) (q : y =ⁱ z) (r : z =ⁱ w) → (p ∙ⁱ q) ∙ⁱ r = p ∙ⁱ (q ∙ⁱ r) assoc-involutive-Id (_ , p , q) (_ , p' , q') (_ , p'' , q'') = eq-pair-eq-fiber ( eq-pair-eq-fiber @@ -470,18 +466,17 @@ module _ eq-pair-eq-fiber (eq-pair-eq-fiber left-unit-right-strict-concat) left-inv-involutive-Id : - (p : x =ⁱ y) → inv-involutive-Id p ∙ⁱ p = reflⁱ + (p : x =ⁱ y) → invⁱ p ∙ⁱ p = reflⁱ left-inv-involutive-Id (.y , refl , q) = eq-pair-eq-fiber (eq-pair-eq-fiber (right-inv-right-strict-concat q)) right-inv-involutive-Id : - (p : x =ⁱ y) → p ∙ⁱ inv-involutive-Id p = reflⁱ + (p : x =ⁱ y) → p ∙ⁱ invⁱ p = reflⁱ right-inv-involutive-Id (.x , p , refl) = eq-pair-eq-fiber (eq-pair-eq-fiber (right-inv-right-strict-concat p)) distributive-inv-concat-involutive-Id : - (p : x =ⁱ y) {z : A} (q : y =ⁱ z) → - inv-involutive-Id (p ∙ⁱ q) = inv-involutive-Id q ∙ⁱ inv-involutive-Id p + (p : x =ⁱ y) {z : A} (q : y =ⁱ z) → invⁱ (p ∙ⁱ q) = invⁱ q ∙ⁱ invⁱ p distributive-inv-concat-involutive-Id (.y , refl , q') (.y , p' , refl) = eq-pair-eq-fiber ( eq-pair @@ -497,8 +492,7 @@ module _ where assoc-right-strict-concat-involutive-Id : - (p : x =ⁱ y) (q : y =ⁱ z) (r : z =ⁱ w) → - ((p ∙ᵣⁱ q) ∙ᵣⁱ r) = (p ∙ᵣⁱ (q ∙ᵣⁱ r)) + (p : x =ⁱ y) (q : y =ⁱ z) (r : z =ⁱ w) → (p ∙ᵣⁱ q) ∙ᵣⁱ r = p ∙ᵣⁱ (q ∙ᵣⁱ r) assoc-right-strict-concat-involutive-Id ( _ , p , q) (_ , p' , q') (_ , p'' , q'') = eq-pair-eq-fiber @@ -524,18 +518,18 @@ module _ right-unit-right-strict-concat-involutive-Id = refl left-inv-right-strict-concat-involutive-Id : - (p : x =ⁱ y) → inv-involutive-Id p ∙ᵣⁱ p = reflⁱ + (p : x =ⁱ y) → invⁱ p ∙ᵣⁱ p = reflⁱ left-inv-right-strict-concat-involutive-Id (.y , refl , q) = eq-pair-eq-fiber (eq-pair (right-inv-right-strict-concat q) refl) right-inv-right-strict-concat-involutive-Id : - (p : x =ⁱ y) → p ∙ᵣⁱ inv-involutive-Id p = reflⁱ + (p : x =ⁱ y) → p ∙ᵣⁱ invⁱ p = reflⁱ right-inv-right-strict-concat-involutive-Id (.x , p , refl) = eq-pair-eq-fiber (eq-pair (right-inv-right-strict-concat p) refl) distributive-inv-right-strict-concat-involutive-Id : (p : x =ⁱ y) {z : A} (q : y =ⁱ z) → - inv-involutive-Id (p ∙ᵣⁱ q) = inv-involutive-Id q ∙ᵣⁱ inv-involutive-Id p + invⁱ (p ∙ᵣⁱ q) = invⁱ q ∙ᵣⁱ invⁱ p distributive-inv-right-strict-concat-involutive-Id ( .y , refl , q) (.y , p' , refl) = eq-pair-eq-fiber diff --git a/src/foundation/strictly-right-unital-concatenation-identifications.lagda.md b/src/foundation/strictly-right-unital-concatenation-identifications.lagda.md index f3f4dce0d8..e28331de4b 100644 --- a/src/foundation/strictly-right-unital-concatenation-identifications.lagda.md +++ b/src/foundation/strictly-right-unital-concatenation-identifications.lagda.md @@ -17,9 +17,9 @@ open import foundation-core.identity-types ## Idea -The -{{#concept "concatenation operation on identifications" Agda=_∙_ Agda=_∙'_ Agda=concat}} -is a family of binary operations +The concatenation operation on +[identifications](foundation-core.identity-types.md) is a family of binary +operations ```text _∙_ : x = y → y = z → x = z diff --git a/src/foundation/transposition-identifications-along-equivalences.lagda.md b/src/foundation/transposition-identifications-along-equivalences.lagda.md index ac314a0ee5..140374a3ff 100644 --- a/src/foundation/transposition-identifications-along-equivalences.lagda.md +++ b/src/foundation/transposition-identifications-along-equivalences.lagda.md @@ -8,8 +8,11 @@ module foundation.transposition-identifications-along-equivalences where ```agda open import foundation.action-on-identifications-functions +open import foundation.commuting-triangles-of-identifications +open import foundation.dependent-pair-types open import foundation.identity-types open import foundation.universe-levels +open import foundation.whiskering-homotopies-composition open import foundation.whiskering-identifications-concatenation open import foundation-core.equivalences @@ -37,7 +40,21 @@ constructing this equivalence. One way uses the fact that `e⁻¹` is a (e x = y) ≃ (e x = e e⁻¹ y) ≃ (x = e⁻¹ y). ``` -The other way uses the fact that `e⁻¹` is a +In other words, the transpose of an identification `p : e x = y` along `e` is +the unique identification `q : x = e⁻¹ y` equipped with an identification +witnessing that the triangle + +```text + ap e q + e x ------> e (e⁻¹ y) + \ / + p \ / is-section-map-inv-equiv e y + \ / + ∨ ∨ + y +``` + +commutes. The other way uses the fact that `e⁻¹` is a [retraction](foundation-core.retractions.md) of `e`, resulting in the equivalence @@ -86,16 +103,21 @@ module _ map-eq-transpose-equiv' {x} {y} = map-equiv (eq-transpose-equiv' x y) ``` +### Transposing identifications of reversed identity types along equivalences + It is sometimes useful to consider identifications `y = e x` instead of `e x = y`, so we include an inverted equivalence for that as well. ```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) + where + eq-transpose-equiv-inv : (x : A) (y : B) → (y = map-equiv e x) ≃ (map-inv-equiv e y = x) eq-transpose-equiv-inv x y = - ( equiv-inv x (map-inv-equiv e y)) ∘e - ( eq-transpose-equiv x y) ∘e - ( equiv-inv y (map-equiv e x)) + ( inv-equiv (equiv-ap e _ _)) ∘e + ( equiv-concat (is-section-map-inv-equiv e y) _) map-eq-transpose-equiv-inv : {a : A} {b : B} → b = map-equiv e a → map-inv-equiv e b = a @@ -109,7 +131,33 @@ It is sometimes useful to consider identifications `y = e x` instead of ## Properties -### Computation rules for transposing equivalences +### Computing transposition of reflexivity along equivalences + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) + where + + compute-refl-eq-transpose-equiv : + {x : A} → + map-eq-transpose-equiv e refl = inv (is-retraction-map-inv-equiv e x) + compute-refl-eq-transpose-equiv = + map-eq-transpose-equiv-inv + ( equiv-ap e _ (map-inv-equiv e _)) + ( ap inv (coherence-map-inv-equiv e _) ∙ + inv (ap-inv (map-equiv e) _)) + + compute-refl-eq-transpose-equiv-inv : + {x : A} → + map-eq-transpose-equiv-inv e refl = is-retraction-map-inv-equiv e x + compute-refl-eq-transpose-equiv-inv {x} = + map-eq-transpose-equiv-inv + ( equiv-ap e _ _) + ( ( right-unit) ∙ + ( coherence-map-inv-equiv e _)) +``` + +### The two definitions of transposing identifications along equivalences are homotopic We begin by showing that the two equivalences stated above are homotopic. @@ -118,10 +166,10 @@ module _ {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) where - htpy-map-eq-transpose-equiv : + compute-map-eq-transpose-equiv : {x : A} {y : B} → map-eq-transpose-equiv e {x} {y} ~ map-eq-transpose-equiv' e - htpy-map-eq-transpose-equiv {x} refl = + compute-map-eq-transpose-equiv {x} refl = ( map-eq-transpose-equiv-inv ( equiv-ap e x _) ( ( ap inv (coherence-map-inv-equiv e x)) ∙ @@ -129,102 +177,87 @@ module _ ( inv right-unit) ``` -Transposing a composition of paths fits into a triangle with a transpose of the -left factor. - -```agda - triangle-eq-transpose-equiv-concat : - {x : A} {y z : B} (p : map-equiv e x = y) (q : y = z) → - ( map-eq-transpose-equiv e (p ∙ q)) = - ( map-eq-transpose-equiv e p ∙ ap (map-inv-equiv e) q) - triangle-eq-transpose-equiv-concat refl refl = inv right-unit -``` +### The defining commuting triangles of transposed identifications Transposed identifications fit in [commuting triangles](foundation.commuting-triangles-of-identifications.md) with the original identifications. ```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) + where + triangle-eq-transpose-equiv : {x : A} {y : B} (p : map-equiv e x = y) → - ( ( ap (map-equiv e) (map-eq-transpose-equiv e p)) ∙ - ( is-section-map-inv-equiv e y)) = - ( p) + coherence-triangle-identifications' + ( p) + ( is-section-map-inv-equiv e y) + ( ap (map-equiv e) (map-eq-transpose-equiv e p)) triangle-eq-transpose-equiv {x} {y} p = ( right-whisker-concat ( is-section-map-inv-equiv ( equiv-ap e x (map-inv-equiv e y)) ( p ∙ inv (is-section-map-inv-equiv e y))) ( is-section-map-inv-equiv e y)) ∙ - ( ( assoc - ( p) - ( inv (is-section-map-inv-equiv e y)) - ( is-section-map-inv-equiv e y)) ∙ - ( ( left-whisker-concat p - ( left-inv (is-section-map-inv-equiv e y))) ∙ - ( right-unit))) + ( is-section-inv-concat' (is-section-map-inv-equiv e y) p) triangle-eq-transpose-equiv-inv : {x : A} {y : B} (p : y = map-equiv e x) → - ( (is-section-map-inv-equiv e y) ∙ p) = - ( ap (map-equiv e) (map-eq-transpose-equiv-inv e p)) + coherence-triangle-identifications' + ( ap (map-equiv e) (map-eq-transpose-equiv-inv e p)) + ( p) + ( is-section-map-inv-equiv e y) triangle-eq-transpose-equiv-inv {x} {y} p = - map-inv-equiv - ( equiv-ap - ( equiv-inv (map-equiv e (map-inv-equiv e y)) (map-equiv e x)) - ( (is-section-map-inv-equiv e y) ∙ p) - ( ap (map-equiv e) (map-eq-transpose-equiv-inv e p))) - ( ( distributive-inv-concat (is-section-map-inv-equiv e y) p) ∙ - ( ( inv - ( right-transpose-eq-concat - ( ap (map-equiv e) (inv (map-eq-transpose-equiv-inv e p))) - ( is-section-map-inv-equiv e y) - ( inv p) - ( ( right-whisker-concat - ( ap - ( ap (map-equiv e)) - ( inv-inv - ( map-inv-equiv - ( equiv-ap e x (map-inv-equiv e y)) - ( ( inv p) ∙ - ( inv (is-section-map-inv-equiv e y)))))) - ( is-section-map-inv-equiv e y)) ∙ - ( triangle-eq-transpose-equiv (inv p))))) ∙ - ( ap-inv (map-equiv e) (map-eq-transpose-equiv-inv e p)))) + inv + ( is-section-map-inv-equiv + ( equiv-ap e _ _) + ( is-section-map-inv-equiv e y ∙ p)) triangle-eq-transpose-equiv' : {x : A} {y : B} (p : map-equiv e x = y) → - ( is-retraction-map-inv-equiv e x ∙ map-eq-transpose-equiv e p) = - ( ap (map-inv-equiv e) p) + coherence-triangle-identifications' + ( ap (map-inv-equiv e) p) + ( map-eq-transpose-equiv e p) + ( is-retraction-map-inv-equiv e x) triangle-eq-transpose-equiv' {x} refl = ( left-whisker-concat ( is-retraction-map-inv-equiv e x) - ( htpy-map-eq-transpose-equiv refl)) ∙ + ( compute-map-eq-transpose-equiv e refl)) ∙ ( is-section-inv-concat (is-retraction-map-inv-equiv e x) refl) triangle-eq-transpose-equiv-inv' : {x : A} {y : B} (p : y = map-equiv e x) → - ( map-eq-transpose-equiv-inv e p) = - ( ap (map-inv-equiv e) p ∙ is-retraction-map-inv-equiv e x) + coherence-triangle-identifications + ( map-eq-transpose-equiv-inv e p) + ( is-retraction-map-inv-equiv e x) + ( ap (map-inv-equiv e) p) triangle-eq-transpose-equiv-inv' {x} refl = - inv - ( right-transpose-eq-concat - ( is-retraction-map-inv-equiv e x) - ( map-eq-transpose-equiv e refl) - ( refl) - ( triangle-eq-transpose-equiv' refl)) + compute-refl-eq-transpose-equiv-inv e right-inverse-eq-transpose-equiv : {x : A} {y : B} (p : y = map-equiv e x) → ( ( map-eq-transpose-equiv e (inv p)) ∙ ( ap (map-inv-equiv e) p ∙ is-retraction-map-inv-equiv e x)) = ( refl) - right-inverse-eq-transpose-equiv {x} p = - inv - ( map-inv-equiv - ( equiv-left-transpose-eq-concat' - ( refl) - ( map-eq-transpose-equiv e (inv p)) - ( ap (map-inv-equiv e) p ∙ is-retraction-map-inv-equiv e x)) - ( right-unit ∙ triangle-eq-transpose-equiv-inv' p)) + right-inverse-eq-transpose-equiv {x} refl = + ( right-whisker-concat (compute-refl-eq-transpose-equiv e) _) ∙ + ( left-inv (is-retraction-map-inv-equiv e _)) +``` + +### Transposing concatenated identifications along equivalences + +Transposing concatenated identifications into a triangle with a transpose of the +left factor. + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) + where + + triangle-eq-transpose-equiv-concat : + {x : A} {y z : B} (p : map-equiv e x = y) (q : y = z) → + ( map-eq-transpose-equiv e (p ∙ q)) = + ( map-eq-transpose-equiv e p ∙ ap (map-inv-equiv e) q) + triangle-eq-transpose-equiv-concat refl refl = inv right-unit ``` diff --git a/src/foundation/transposition-identifications-along-retractions.lagda.md b/src/foundation/transposition-identifications-along-retractions.lagda.md new file mode 100644 index 0000000000..2dfe11e3cb --- /dev/null +++ b/src/foundation/transposition-identifications-along-retractions.lagda.md @@ -0,0 +1,111 @@ +# Transposing identifications along retractions + +```agda +module foundation.transposition-identifications-along-retractions where +``` + +
+ +```agda +open import foundation.action-on-identifications-functions +open import foundation.dependent-pair-types +open import foundation.function-extensionality +open import foundation.universe-levels + +open import foundation-core.equivalences +open import foundation-core.function-types +open import foundation-core.homotopies +open import foundation-core.identity-types +open import foundation-core.retractions +``` + +
+ +## Idea + +Consider a map `f : A → B` and a map `g : B → A` in the converse direction. Then +there is an [equivalence](foundation-core.equivalences.md) + +```text + is-retraction f g ≃ ((x : A) (y : B) → (f x = y) ≃ (x = g y)) +``` + +In other words, any [retracting homotopy](foundation-core.retractions.md) +`g ∘ f ~ id` induces a unique family of +{{#concept "transposition" Disambiguation="identifications along retractions" Agda=eq-transpose-is-retraction}} +maps + +```text + f x = y → x = g y +``` + +indexed by `x : A` and `y : B`. + +## Definitions + +### Transposing identifications along retractions + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) (g : B → A) + where + + eq-transpose-is-retraction : + is-retraction f g → {x : B} {y : A} → x = f y → g x = y + eq-transpose-is-retraction H {x} {y} p = ap g p ∙ H y + + eq-transpose-is-retraction' : + is-retraction f g → {x : A} {y : B} → f x = y → x = g y + eq-transpose-is-retraction' H {x} refl = inv (H x) +``` + +## Properties + +### The map that assings to each retracting homotopy a family of transposition functions of identifications is an equivalence + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) (g : B → A) + where + + is-retraction-eq-transpose : + ({x : B} {y : A} → x = f y → g x = y) → is-retraction f g + is-retraction-eq-transpose H x = H refl + + is-retraction-eq-transpose' : + ({x : A} {y : B} → f x = y → x = g y) → is-retraction f g + is-retraction-eq-transpose' H x = inv (H refl) + + is-retraction-is-retraction-eq-transpose : + is-retraction-eq-transpose ∘ eq-transpose-is-retraction f g ~ id + is-retraction-is-retraction-eq-transpose H = refl + + htpy-is-section-is-retraction-eq-transpose : + (H : {x : B} {y : A} → x = f y → g x = y) + (x : B) (y : A) → + eq-transpose-is-retraction f g (is-retraction-eq-transpose H) {x} {y} ~ + H {x} {y} + htpy-is-section-is-retraction-eq-transpose H x y refl = refl + + abstract + is-section-is-retraction-eq-transpose : + eq-transpose-is-retraction f g ∘ is-retraction-eq-transpose ~ id + is-section-is-retraction-eq-transpose H = + eq-htpy-implicit + ( λ x → + eq-htpy-implicit + ( λ y → eq-htpy (htpy-is-section-is-retraction-eq-transpose H x y))) + + is-equiv-eq-transpose-is-retraction : + is-equiv (eq-transpose-is-retraction f g) + is-equiv-eq-transpose-is-retraction = + is-equiv-is-invertible + ( is-retraction-eq-transpose) + ( is-section-is-retraction-eq-transpose) + ( is-retraction-is-retraction-eq-transpose) + + equiv-eq-transpose-is-retraction : + is-retraction f g ≃ ({x : B} {y : A} → x = f y → g x = y) + equiv-eq-transpose-is-retraction = + ( eq-transpose-is-retraction f g , is-equiv-eq-transpose-is-retraction) +``` diff --git a/src/foundation/transposition-identifications-along-sections.lagda.md b/src/foundation/transposition-identifications-along-sections.lagda.md new file mode 100644 index 0000000000..9cffc6452a --- /dev/null +++ b/src/foundation/transposition-identifications-along-sections.lagda.md @@ -0,0 +1,109 @@ +# Transposing identifications along sections + +```agda +module foundation.transposition-identifications-along-sections where +``` + +
+ +```agda +open import foundation.action-on-identifications-functions +open import foundation.dependent-pair-types +open import foundation.function-extensionality +open import foundation.universe-levels + +open import foundation-core.equivalences +open import foundation-core.function-types +open import foundation-core.homotopies +open import foundation-core.identity-types +open import foundation-core.sections +``` + +
+ +## Idea + +Consider a map `f : A → B` and a map `g : B → A` in the converse direction. Then +there is an [equivalence](foundation-core.equivalences.md) + +```text + is-section f g ≃ ((x : A) (y : B) → (x = g y) ≃ (f x = y)) +``` + +In other words, any [section homotopy](foundation-core.sections.md) `f ∘ g ~ id` +induces a unique family of +{{#concept "transposition" Disambiguation="identifications along sections" Agda=eq-transpose-is-section}} +maps + +```text + x = g y → f x = y +``` + +indexed by `x : A` and `y : B`. + +### Transposing identifications along sections + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) (g : B → A) + where + + eq-transpose-is-section : + f ∘ g ~ id → {x : A} {y : B} → x = g y → f x = y + eq-transpose-is-section H {x} {y} p = ap f p ∙ H y + + eq-transpose-is-section' : + f ∘ g ~ id → {x : B} {y : A} → g x = y → x = f y + eq-transpose-is-section' H {x} refl = inv (H x) +``` + +## Properties + +### The map that assings to each section homotopy a family of transposition functions of identifications is an equivalence + +```agda +module _ + {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) (g : B → A) + where + + is-section-eq-transpose : + ({x : A} {y : B} → x = g y → f x = y) → f ∘ g ~ id + is-section-eq-transpose H x = H refl + + is-section-eq-transpose' : + ({x : B} {y : A} → g x = y → x = f y) → f ∘ g ~ id + is-section-eq-transpose' H x = inv (H refl) + + is-retraction-is-section-eq-transpose : + is-section-eq-transpose ∘ eq-transpose-is-section f g ~ id + is-retraction-is-section-eq-transpose H = refl + + htpy-is-section-is-section-eq-transpose : + (H : {x : A} {y : B} → x = g y → f x = y) → + (x : A) (y : B) → + eq-transpose-is-section f g (is-section-eq-transpose H) {x} {y} ~ H {x} {y} + htpy-is-section-is-section-eq-transpose H x y refl = refl + + abstract + is-section-is-section-eq-transpose : + eq-transpose-is-section f g ∘ is-section-eq-transpose ~ id + is-section-is-section-eq-transpose H = + eq-htpy-implicit + ( λ x → + eq-htpy-implicit + ( λ y → + eq-htpy (htpy-is-section-is-section-eq-transpose H x y))) + + is-equiv-eq-transpose-is-section : + is-equiv (eq-transpose-is-section f g) + is-equiv-eq-transpose-is-section = + is-equiv-is-invertible + ( is-section-eq-transpose) + ( is-section-is-section-eq-transpose) + ( is-retraction-is-section-eq-transpose) + + equiv-eq-transpose-is-section : + (f ∘ g ~ id) ≃ ({x : A} {y : B} → x = g y → f x = y) + equiv-eq-transpose-is-section = + (eq-transpose-is-section f g , is-equiv-eq-transpose-is-section) +``` diff --git a/src/foundation/whiskering-higher-homotopies-composition.lagda.md b/src/foundation/whiskering-higher-homotopies-composition.lagda.md index eb981d65af..2970a34a1e 100644 --- a/src/foundation/whiskering-higher-homotopies-composition.lagda.md +++ b/src/foundation/whiskering-higher-homotopies-composition.lagda.md @@ -38,8 +38,7 @@ by ``` Similarly, the {{#concept "right whiskering" Disambiguation="2-homotopies with -respect to composition" Agda=right-whisker-comp²]} is defined to be the -operation +respect to composition" Agda=right-whisker-comp²}} is defined to be the operation ```text (H ~ H') → (h : (x : A) → B x) → (H ·r h ~ H' ·r h) @@ -81,3 +80,20 @@ module _ (α : {x : A} → H {x} ~ H' {x}) (h : (x : A) → B x) → H ·r h ~ H' ·r h right-whisker-comp² α h = α ·r h ``` + +### Double whiskering higher homotopies + +```agda +module _ + {l1 l2 l3 l4 : Level} {A : UU l1} {B : A → UU l2} + {C : (x : A) → B x → UU l3} {D : (x : A) → B x → UU l4} + {f g : {x : A} (y : B x) → C x y} {H H' : {x : A} → f {x} ~ g {x}} + where + + double-whisker-comp² : + (left : {x : A} {y : B x} → C x y → D x y) + (α : {x : A} → H {x} ~ H' {x}) + (right : (x : A) → B x) → + left ·l H ·r right ~ left ·l H' ·r right + double-whisker-comp² left α right = double-whisker-comp (ap left) α right +``` diff --git a/src/foundation/whiskering-homotopies-composition.lagda.md b/src/foundation/whiskering-homotopies-composition.lagda.md index 12a6729411..2715167d25 100644 --- a/src/foundation/whiskering-homotopies-composition.lagda.md +++ b/src/foundation/whiskering-homotopies-composition.lagda.md @@ -235,11 +235,18 @@ module _ {A : UU l1} {B : A → UU l2} {C : A → UU l3} {D : A → UU l4} where + inv-preserves-comp-left-whisker-comp : + ( k : {x : A} → C x → D x) (h : {x : A} → B x → C x) {f g : (x : A) → B x} + ( H : f ~ g) → + (k ∘ h) ·l H ~ k ·l (h ·l H) + inv-preserves-comp-left-whisker-comp k h H x = ap-comp k h (H x) + preserves-comp-left-whisker-comp : ( k : {x : A} → C x → D x) (h : {x : A} → B x → C x) {f g : (x : A) → B x} ( H : f ~ g) → k ·l (h ·l H) ~ (k ∘ h) ·l H - preserves-comp-left-whisker-comp k h H x = inv (ap-comp k h (H x)) + preserves-comp-left-whisker-comp k h H = + inv-htpy (inv-preserves-comp-left-whisker-comp k h H) module _ { l1 l2 l3 l4 : Level} @@ -271,8 +278,8 @@ module _ coh-htpy-id : H ·r f ~ f ·l H coh-htpy-id x = is-injective-concat' (H x) (nat-htpy-id H (H x)) - inv-htpy-coh-htpy-id : f ·l H ~ H ·r f - inv-htpy-coh-htpy-id = inv-htpy coh-htpy-id + inv-coh-htpy-id : f ·l H ~ H ·r f + inv-coh-htpy-id = inv-htpy coh-htpy-id ``` ## See also diff --git a/src/foundation/whiskering-homotopies-concatenation.lagda.md b/src/foundation/whiskering-homotopies-concatenation.lagda.md index 9803a73be7..dffb6ea28b 100644 --- a/src/foundation/whiskering-homotopies-concatenation.lagda.md +++ b/src/foundation/whiskering-homotopies-concatenation.lagda.md @@ -2,17 +2,19 @@ ```agda module foundation.whiskering-homotopies-concatenation where + +open import foundation-core.whiskering-homotopies-concatenation public ```
Imports ```agda -open import foundation.functoriality-dependent-function-types open import foundation.universe-levels open import foundation.whiskering-identifications-concatenation open import foundation.whiskering-operations open import foundation-core.equivalences +open import foundation-core.functoriality-dependent-function-types open import foundation-core.homotopies ``` @@ -32,57 +34,13 @@ of homotopies with respect to concatenation is a ``` Similarly, we introduce -{{#concept "right whiskering" Disambiguation="homotopies with respect to concatenation' Agda=right-whisker-concat-htpy}} +{{#concept "right whiskering" Disambiguation="homotopies with respect to concatenation" Agda=right-whisker-concat-htpy}} to be an operation ```text {H I : f ~ g} → H ~ I → (J : g ~ h) → H ∙h J ~ I ∙h J. ``` -## Definitions - -### Left whiskering of homotopies with respect to concatenation - -Left whiskering of homotopies with respect to concatenation is an operation - -```text - (H : f ~ g) {I J : g ~ h} → I ~ J → H ∙h I ~ H ∙h K. -``` - -We implement the left whiskering operation of homotopies with respect to -concatenation as an instance of a general left whiskering operation. - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : A → UU l2} - where - - left-whisker-concat-htpy : - left-whiskering-operation ((x : A) → B x) (_~_) (_∙h_) (_~_) - left-whisker-concat-htpy H K x = left-whisker-concat (H x) (K x) -``` - -### Right whiskering of homotopies with respect to concatenation - -Right whiskering of homotopies with respect to concatenation is an operation - -```text - {H I : f ~ g} → H ~ I → (J : g ~ h) → H ∙h J ~ I ∙h J. -``` - -We implement the right whiskering operation of homotopies with respect to -concatenation as an instance of a general right whiskering operation. - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : A → UU l2} - where - - right-whisker-concat-htpy : - right-whiskering-operation ((x : A) → B x) (_~_) (_∙h_) (_~_) - right-whisker-concat-htpy K J x = right-whisker-concat (K x) (J x) -``` - ## Properties ### Left whiskering of homotopies with respect to concatenation is an equivalence @@ -114,44 +72,3 @@ module _ is-equiv-map-Π-is-fiberwise-equiv ( λ x → is-equiv-right-whisker-concat (J x)) ``` - -### The unit and absorption laws for left whiskering of homotopies with respect to concatenation - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : A → UU l2} - where - - left-unit-law-left-whisker-concat-htpy : - {f g : (x : A) → B x} {I J : f ~ g} (K : I ~ J) → - left-whisker-concat-htpy refl-htpy K ~ K - left-unit-law-left-whisker-concat-htpy K x = - left-unit-law-left-whisker-concat (K x) - - right-absorption-law-left-whisker-concat-htpy : - {f g h : (x : A) → B x} (H : f ~ g) {I : g ~ h} → - left-whisker-concat-htpy H (refl-htpy' I) ~ refl-htpy - right-absorption-law-left-whisker-concat-htpy H x = - right-absorption-law-left-whisker-concat (H x) _ -``` - -### The unit and absorption laws for right whiskering of homotopies with respect to concatenation - -```agda -module _ - {l1 l2 : Level} {A : UU l1} {B : A → UU l2} - where - - left-absorption-law-right-whisker-concat-htpy : - {f g h : (x : A) → B x} {H : f ~ g} (J : g ~ h) → - right-whisker-concat-htpy (refl-htpy' H) J ~ refl-htpy - left-absorption-law-right-whisker-concat-htpy J x = - left-absorption-law-right-whisker-concat _ (J x) - - right-unit-law-right-whisker-concat-htpy : - {f g : (x : A) → B x} {I J : f ~ g} (K : I ~ J) → - right-unit-htpy ∙h K ~ - right-whisker-concat-htpy K refl-htpy ∙h right-unit-htpy - right-unit-law-right-whisker-concat-htpy K x = - right-unit-law-right-whisker-concat (K x) -``` diff --git a/src/foundation/whiskering-identifications-concatenation.lagda.md b/src/foundation/whiskering-identifications-concatenation.lagda.md index 661b2b9c4e..c2e632249a 100644 --- a/src/foundation/whiskering-identifications-concatenation.lagda.md +++ b/src/foundation/whiskering-identifications-concatenation.lagda.md @@ -2,6 +2,8 @@ ```agda module foundation.whiskering-identifications-concatenation where + +open import foundation-core.whiskering-identifications-concatenation public ```
Imports @@ -41,62 +43,6 @@ concatenation. Since concatenation on either side is an [equivalence](foundation-core.equivalences.md), it follows that the whiskering operations are equivalences. -## Definitions - -### Left whiskering of identifications - -Left whiskering of identifications with respect to concatenation is an operation - -```text - (p : x = y) {q r : y = z} → q = r → p ∙ q = p ∙ r -``` - -on any type. - -```agda -module _ - {l : Level} {A : UU l} - where - - left-whisker-concat : left-whiskering-operation A (_=_) (_∙_) (_=_) - left-whisker-concat p β = ap (p ∙_) β -``` - -### Right whiskering of identifications - -Right whiskering of identifications with respect to concatenation is an -operation - -```text - {p q : x = y} → p = q → (r : y = z) → p ∙ r = q ∙ r -``` - -on any type. - -```agda -module _ - {l : Level} {A : UU l} - where - - right-whisker-concat : right-whiskering-operation A (_=_) (_∙_) (_=_) - right-whisker-concat α q = ap (_∙ q) α -``` - -### Double whiskering of identifications - -```agda -module _ - {l : Level} {A : UU l} - {a b c d : A} (p : a = b) {r s : b = c} (t : r = s) (q : c = d) - where - - double-whisker-concat : (p ∙ r) ∙ q = (p ∙ s) ∙ q - double-whisker-concat = right-whisker-concat (left-whisker-concat p t) q - - double-whisker-concat' : p ∙ (r ∙ q) = p ∙ (s ∙ q) - double-whisker-concat' = left-whisker-concat p (right-whisker-concat t q) -``` - ## Properties ### Left whiskering of identifications is an equivalence @@ -136,231 +82,3 @@ module _ pr2 equiv-right-whisker-concat = is-equiv-right-whisker-concat ``` - -### The unit and absorption laws for left whiskering of identifications - -```agda -module _ - {l : Level} {A : UU l} - where - - left-unit-law-left-whisker-concat : - {x y : A} {p p' : x = y} (α : p = p') → - left-whisker-concat refl α = α - left-unit-law-left-whisker-concat refl = refl - - right-absorption-law-left-whisker-concat : - {x y z : A} (p : x = y) (q : y = z) → - left-whisker-concat p (refl {x = q}) = refl - right-absorption-law-left-whisker-concat p q = refl -``` - -### The unit and absorption laws for right whiskering of identifications - -The right unit law for right whiskering of identifications with respect to -concatenation asserts that the square of identifications - -```text - right-whisker-concat α refl - p ∙ refl -----------------------------> p' ∙ refl - | | - right-unit | | - ∨ ∨ - p -------------------------------------> p' -``` - -commutes for any `α : p = p'`. Note that this law is slightly more complicated, -since concatenating with `refl` on the right does not compute to the identity -function. - -```agda -module _ - {l : Level} {A : UU l} - where - - right-unit-law-right-whisker-concat : - {x y : A} {p p' : x = y} (α : p = p') → - right-unit ∙ α = right-whisker-concat α refl ∙ right-unit - right-unit-law-right-whisker-concat {p = refl} refl = refl - - left-absorption-law-right-whisker-concat : - {x y z : A} (p : x = y) (q : y = z) → - right-whisker-concat (refl {x = p}) q = refl - left-absorption-law-right-whisker-concat p q = refl -``` - -### Commutativity of left and right whiskering of identifications - -Consider four identifications `p p' : x = y` and `q q' : y = z` in a type `A`. -Then the square of identifications - -```text - right-whisker α q - p ∙ q ---------------------> p' ∙ q - | | - left-whisker p β | | left-whisker p' β - ∨ ∨ - p ∙ q' --------------------> p' ∙ q' - right-whisker α q' -``` - -commutes. There are at least two natural ways in which this square is seen to -commute: - -1. The square commutes by naturality of the homotopy - `α ↦ left-whisker-concat α β`. -2. The transposed square commutes by the naturality of the homotopy - `β ↦ right-whisker-concat α β`. - -These two ways in which the square commutes are inverse to each other. - -**Note.** The following statements could have been formalized using -[commuting squares of identifications](foundation.commuting-squares-of-identifications.md). -However, in order to avoid cyclic module dependencies in the library we avoid -doing so. - -```agda -module _ - {l : Level} {A : UU l} {x y z : A} - where - - commutative-left-whisker-right-whisker-concat : - {q q' : y = z} (β : q = q') {p p' : x = y} (α : p = p') → - left-whisker-concat p β ∙ right-whisker-concat α q' = - right-whisker-concat α q ∙ left-whisker-concat p' β - commutative-left-whisker-right-whisker-concat β = - nat-htpy (λ α → left-whisker-concat α β) - - commutative-right-whisker-left-whisker-concat : - {p p' : x = y} (α : p = p') {q q' : y = z} (β : q = q') → - right-whisker-concat α q ∙ left-whisker-concat p' β = - left-whisker-concat p β ∙ right-whisker-concat α q' - commutative-right-whisker-left-whisker-concat α = - nat-htpy (right-whisker-concat α) - - compute-inv-commutative-left-whisker-right-whisker-concat : - {q q' : y = z} (β : q = q') {p p' : x = y} (α : p = p') → - inv (commutative-right-whisker-left-whisker-concat α β) = - commutative-left-whisker-right-whisker-concat β α - compute-inv-commutative-left-whisker-right-whisker-concat refl refl = - refl -``` - -### Swapping the order of left and right whiskering of identifications - -Consider a diagram of identifications - -```text - r - p -----> q - a -----> b -----> c -----> - s -``` - -with `t : r = s`. Then the square of identifications - -```text - assoc p r q - (p ∙ r) ∙ q -------------> p ∙ (r ∙ q) - | | - double-whisker p t q | | double-whisker' p t q - ∨ ∨ - (p ∙ s) ∙ q -------------> p ∙ (s ∙ q) - assoc p s q -``` - -commutes. - -```agda -module _ - {l1 : Level} {A : UU l1} - where - - swap-double-whisker-concat : - {a b c d : A} (p : a = b) {r s : b = c} (t : r = s) (q : c = d) → - double-whisker-concat p t q ∙ assoc p s q = - assoc p r q ∙ double-whisker-concat' p t q - swap-double-whisker-concat refl refl refl = refl -``` - -### The action on identifications of concatenating by `refl` on the right - -Consider an identification `r : p = q` between two identifications -`p q : x = y` in a type `A`. Then the square of identifications - -```text - right-whisker r refl - p ∙ refl ----------------------> q ∙ refl - | | - right-unit | | right-unit - ∨ ∨ - p -----------------------------> q - r -``` - -commutes. - -```agda -module _ - {l : Level} {A : UU l} {x y : A} {p q : x = y} - where - - compute-refl-right-whisker-concat : - (r : p = q) → - right-unit ∙ r = right-whisker-concat r refl ∙ right-unit - compute-refl-right-whisker-concat refl = right-unit -``` - -### Left whiskering of identifications distributes over concatenation - -```agda -module _ - {l : Level} {A : UU l} - where - - distributive-left-whisker-concat-concat : - {a b c : A} (p : a = b) {q r s : b = c} (α : q = r) (β : r = s) → - left-whisker-concat p (α ∙ β) = - left-whisker-concat p α ∙ left-whisker-concat p β - distributive-left-whisker-concat-concat p refl β = refl -``` - -### Right whiskering of identifications distributes over concatenation - -```agda -module _ - {l : Level} {A : UU l} - where - - distributive-right-whisker-concat-concat : - {a b c : A} {p q r : a = b} (α : p = q) (β : q = r) (s : b = c) → - right-whisker-concat (α ∙ β) s = - right-whisker-concat α s ∙ right-whisker-concat β s - distributive-right-whisker-concat-concat refl β s = refl -``` - -### Left whiskering of identifications commutes with inverses of identifications - -```agda -module _ - {l : Level} {A : UU l} - where - - compute-inv-left-whisker-concat : - {a b c : A} (p : a = b) {q r : b = c} (s : q = r) → - left-whisker-concat p (inv s) = inv (left-whisker-concat p s) - compute-inv-left-whisker-concat p s = ap-inv (concat p _) s -``` - -### Right whiskering of identifications commutes with inverses of identifications - -```agda -module _ - {l : Level} {A : UU l} - where - - compute-inv-right-whisker-concat : - {a b c : A} {p q : a = b} (s : p = q) (r : b = c) → - right-whisker-concat (inv s) r = inv (right-whisker-concat s r) - compute-inv-right-whisker-concat s r = ap-inv (concat' _ r) s -``` diff --git a/src/foundation/yoneda-identity-types.lagda.md b/src/foundation/yoneda-identity-types.lagda.md index c5ee6d9b9a..081408e0ba 100644 --- a/src/foundation/yoneda-identity-types.lagda.md +++ b/src/foundation/yoneda-identity-types.lagda.md @@ -7,6 +7,7 @@ module foundation.yoneda-identity-types where
Imports ```agda +open import foundation.action-on-identifications-binary-functions open import foundation.action-on-identifications-functions open import foundation.dependent-pair-types open import foundation.function-extensionality @@ -61,7 +62,7 @@ concretely, the reflexivity is given by the identity function, and path concatenation is given by function composition. In addition to these strictness laws, we can make the type satisfy the strict -law `inv reflʸ ≐ reflʸ`. Moreover, while the induction principle of the Yoneda +law `invʸ reflʸ ≐ reflʸ`. Moreover, while the induction principle of the Yoneda identity types does not in general satisfy the computation rule strictly, we can define its recursion principle such that does. @@ -426,7 +427,7 @@ concatenation operation on the underlying identity type respectively. In contrast to the latter, the former enjoys the computational property ```text - inv reflʸ ≐ reflʸ, + invʸ reflʸ ≐ reflʸ, ``` hence it will be preferred going forward. @@ -438,17 +439,15 @@ module _ {l : Level} {A : UU l} where - inv-yoneda-Id : {x y : A} → x =ʸ y → y =ʸ x - inv-yoneda-Id {x} f z p = p ∙ᵣ inv (f x refl) + invʸ : {x y : A} → x =ʸ y → y =ʸ x + invʸ {x} f z p = p ∙ᵣ inv (f x refl) - compute-inv-yoneda-Id-refl : - {x : A} → - inv-yoneda-Id (reflʸ {x = x}) = reflʸ - compute-inv-yoneda-Id-refl = refl + compute-inv-refl-yoneda-Id : + {x : A} → invʸ (reflʸ {x = x}) = reflʸ + compute-inv-refl-yoneda-Id = refl inv-inv-yoneda-Id : - {x y : A} (f : x =ʸ y) → - inv-yoneda-Id (inv-yoneda-Id f) = f + {x y : A} (f : x =ʸ y) → invʸ (invʸ f) = f inv-inv-yoneda-Id {x} f = eq-multivariable-htpy 2 ( λ _ p → @@ -467,20 +466,17 @@ module _ where preserves-inv-yoneda-eq-eq' : - {x y : A} (p : x = y) → - yoneda-eq-eq (inv p) = inv-yoneda-Id (yoneda-eq-eq' p) + {x y : A} (p : x = y) → yoneda-eq-eq (inv p) = invʸ (yoneda-eq-eq' p) preserves-inv-yoneda-eq-eq' p = refl preserves-inv-yoneda-eq-eq : - {x y : A} (p : x = y) → - yoneda-eq-eq (inv p) = inv-yoneda-Id (yoneda-eq-eq p) + {x y : A} (p : x = y) → yoneda-eq-eq (inv p) = invʸ (yoneda-eq-eq p) preserves-inv-yoneda-eq-eq p = eq-multivariable-htpy 2 ( λ _ q → ap (λ r → q ∙ᵣ inv r) (inv left-unit-right-strict-concat)) preserves-inv-eq-yoneda-eq : - {x y : A} (f : x =ʸ y) → - eq-yoneda-eq (inv-yoneda-Id f) = inv (eq-yoneda-eq f) + {x y : A} (f : x =ʸ y) → eq-yoneda-eq (invʸ f) = inv (eq-yoneda-eq f) preserves-inv-eq-yoneda-eq f = left-unit-right-strict-concat ``` @@ -582,6 +578,8 @@ module _ ### The groupoidal laws for the Yoneda identity types +As we may now observe, associativity and the unit laws hold by `refl`. + ```agda module _ {l : Level} {A : UU l} {x y : A} @@ -599,9 +597,14 @@ module _ right-unit-yoneda-Id : {f : x =ʸ y} → f ∙ʸ reflʸ = f right-unit-yoneda-Id = refl +``` + +In addition, we show a range of basic algebraic laws for the Yoneda identity +types. +```agda left-inv-yoneda-Id : - (f : x =ʸ y) → inv-yoneda-Id f ∙ʸ f = reflʸ + (f : x =ʸ y) → invʸ f ∙ʸ f = reflʸ left-inv-yoneda-Id f = eq-multivariable-htpy 2 ( λ _ p → @@ -617,7 +620,7 @@ module _ ( ap (p ∙_) (compute-inv-Id-yoneda-Id f) ∙ right-unit)) right-inv-yoneda-Id : - (f : x =ʸ y) → f ∙ʸ inv-yoneda-Id f = reflʸ + (f : x =ʸ y) → f ∙ʸ invʸ f = reflʸ right-inv-yoneda-Id f = eq-multivariable-htpy 2 ( λ _ p → @@ -641,7 +644,7 @@ module _ distributive-inv-concat-yoneda-Id : (f : x =ʸ y) {z : A} (g : y =ʸ z) → - inv-yoneda-Id (f ∙ʸ g) = inv-yoneda-Id g ∙ʸ inv-yoneda-Id f + invʸ (f ∙ʸ g) = invʸ g ∙ʸ invʸ f distributive-inv-concat-yoneda-Id f g = eq-multivariable-htpy 2 ( λ _ p → @@ -688,16 +691,14 @@ module _ ap-yoneda-Id : {x y : A} → x =ʸ y → f x =ʸ f y ap-yoneda-Id = yoneda-eq-eq ∘ eq-ap-yoneda-Id - compute-ap-reflʸ : - {x : A} → ap-yoneda-Id (reflʸ {x = x}) = reflʸ - compute-ap-reflʸ = refl + compute-ap-refl-yoneda-Id : {x : A} → ap-yoneda-Id (reflʸ {x = x}) = reflʸ + compute-ap-refl-yoneda-Id = refl module _ {l1 : Level} {A : UU l1} where - compute-ap-id-yoneda-Id : - {x y : A} (p : x =ʸ y) → ap-yoneda-Id id p = p + compute-ap-id-yoneda-Id : {x y : A} (p : x =ʸ y) → ap-yoneda-Id id p = p compute-ap-id-yoneda-Id {x} p = eq-multivariable-htpy 2 ( λ _ q → @@ -705,6 +706,47 @@ module _ ( inv (commutative-preconcatr-refl-Id-yoneda-Id p q))) ``` +### Action of binary functions on Yoneda identifications + +We obtain an action of binary functions on Yoneda identifications that computes +on both arguments using one of the two sides in the Gray interchanger diagram + +```text + ap (r ↦ f x r) q + f x y -------------> f x y' + | | + | | + ap (r ↦ f r y) p | | ap (r ↦ f r y') p + | | + ∨ ∨ + f x' y ------------> f x' y'. + ap (r ↦ f x' r) q +``` + +and the fact that the concatenation operation on Yoneda identifications is +two-sided strictly unital. + +```agda +module _ + {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} (f : A → B → C) + where + + ap-binary-yoneda-Id : + {x x' : A} (p : x =ʸ x') {y y' : B} (q : y =ʸ y') → f x y =ʸ f x' y' + ap-binary-yoneda-Id {x} {x'} p {y} {y'} q = + ap-yoneda-Id (λ z → f z y) p ∙ʸ ap-yoneda-Id (f x') q + + left-unit-ap-binary-Id : + {x : A} {y y' : B} (q : y =ʸ y') → + ap-binary-yoneda-Id reflʸ q = ap-yoneda-Id (f x) q + left-unit-ap-binary-Id q = refl + + right-unit-ap-binary-Id : + {x x' : A} (p : x =ʸ x') {y : B} → + ap-binary-yoneda-Id p reflʸ = ap-yoneda-Id (λ z → f z y) p + right-unit-ap-binary-Id p = refl +``` + ### Transport along Yoneda identifications ```agda @@ -715,12 +757,11 @@ module _ tr-yoneda-Id : {x y : A} → x =ʸ y → B x → B y tr-yoneda-Id = tr B ∘ eq-yoneda-eq - compute-tr-reflʸ : - {x : A} → tr-yoneda-Id (reflʸ {x = x}) = id - compute-tr-reflʸ = refl + compute-tr-refl-yoneda-Id : {x : A} → tr-yoneda-Id (reflʸ {x = x}) = id + compute-tr-refl-yoneda-Id = refl ``` -### Function extensionality with respect to Yoneda identifications +### Standard function extensionality with respect to Yoneda identifications ```agda module _ @@ -743,7 +784,7 @@ module _ funext-yoneda-Id = is-equiv-map-equiv equiv-htpy-yoneda-eq ``` -### Univalence with respect to Yoneda identifications +### Standard univalence with respect to Yoneda identifications ```agda module _ @@ -772,6 +813,129 @@ module _ is-equiv-yoneda-eq-equiv = is-equiv-map-equiv equiv-yoneda-eq-equiv ``` +### Whiskering of Yoneda identifications + +```agda +module _ + {l : Level} {A : UU l} {x y z : A} + where + + left-whisker-concat-yoenda-Id : + (p : x =ʸ y) {q r : y =ʸ z} → q =ʸ r → p ∙ʸ q =ʸ p ∙ʸ r + left-whisker-concat-yoenda-Id p β = ap-yoneda-Id (p ∙ʸ_) β + + right-whisker-concat-yoenda-Id : + {p q : x =ʸ y} → p =ʸ q → (r : y =ʸ z) → p ∙ʸ r =ʸ q ∙ʸ r + right-whisker-concat-yoenda-Id α r = ap-yoneda-Id (_∙ʸ r) α +``` + +### Horizontal concatenation of Yoneda identifications + +We define horizontal concatenation in such a way that it computes as left +whiskering when the left-hand argument is `refl`, and computes as right +whiskering when the right-hand argument is `refl`. + +```agda +module _ + {l : Level} {A : UU l} {x y z : A} + where + + horizontal-concat-yoneda-Id² : + {p q : x =ʸ y} → p =ʸ q → {u v : y =ʸ z} → u =ʸ v → p ∙ʸ u =ʸ q ∙ʸ v + horizontal-concat-yoneda-Id² = ap-binary-yoneda-Id (_∙ʸ_) + + compute-left-horizontal-concat-yoneda-Id² : + {p : x =ʸ y} {u v : y =ʸ z} (β : u =ʸ v) → + horizontal-concat-yoneda-Id² reflʸ β = + left-whisker-concat-yoenda-Id p β + compute-left-horizontal-concat-yoneda-Id² β = refl + + compute-right-horizontal-concat-yoneda-Id² : + {p q : x =ʸ y} (α : p =ʸ q) {u : y =ʸ z} → + horizontal-concat-yoneda-Id² α (reflʸ {x = u}) = + right-whisker-concat-yoenda-Id α u + compute-right-horizontal-concat-yoneda-Id² α = refl + +module _ + {l : Level} {A : UU l} {x y : A} + where + + left-unit-horizontal-concat-yoneda-Id² : + {p q : x =ʸ y} (α : p =ʸ q) → + horizontal-concat-yoneda-Id² reflʸ α = α + left-unit-horizontal-concat-yoneda-Id² = compute-ap-id-yoneda-Id + + right-unit-horizontal-concat-yoneda-Id² : + {p q : x =ʸ y} (α : p =ʸ q) → + horizontal-concat-yoneda-Id² α (reflʸ {x = reflʸ}) = α + right-unit-horizontal-concat-yoneda-Id² = compute-ap-id-yoneda-Id +``` + +Since concatenation on Yoneda identifications is strictly associative, the +composites + +```text + horizontal-concat-yoneda-Id² (horizontal-concat-yoneda-Id² α β) γ +``` + +and + +```text + horizontal-concat-yoneda-Id² α (horizontal-concat-yoneda-Id² β γ) +``` + +inhabit the same type. Therefore, we can pose the question of whether the +horizontal concatenation operation is associative, which it is, albeit weakly: + +```agda +module _ + {l : Level} {A : UU l} {x y z w : A} + where + + assoc-horizontal-concat-yoneda-Id² : + {p p' : x =ʸ y} (α : p =ʸ p') + {q q' : y =ʸ z} (β : q =ʸ q') + {r r' : z =ʸ w} (γ : r =ʸ r') → + horizontal-concat-yoneda-Id² (horizontal-concat-yoneda-Id² α β) γ = + horizontal-concat-yoneda-Id² α (horizontal-concat-yoneda-Id² β γ) + assoc-horizontal-concat-yoneda-Id² α {q} β {r} = + ind-yoneda-Id + ( λ _ γ → + ( horizontal-concat-yoneda-Id² (horizontal-concat-yoneda-Id² α β) γ) = + ( horizontal-concat-yoneda-Id² α (horizontal-concat-yoneda-Id² β γ))) + ( ind-yoneda-Id + ( λ _ β → + ( horizontal-concat-yoneda-Id² + ( horizontal-concat-yoneda-Id² α β) + ( reflʸ {x = r})) = + ( horizontal-concat-yoneda-Id² + ( α) + ( horizontal-concat-yoneda-Id² β (reflʸ {x = r})))) + ( ind-yoneda-Id + ( λ _ α → + ( horizontal-concat-yoneda-Id² + ( horizontal-concat-yoneda-Id² α (reflʸ {x = q})) + ( reflʸ {x = r})) = + ( horizontal-concat-yoneda-Id² + ( α) + ( horizontal-concat-yoneda-Id² (reflʸ {x = q}) (reflʸ {x = r})))) + ( refl) + ( α)) + ( β)) +``` + +### Vertical concatenation of Yoneda identifications + +```agda +module _ + {l : Level} {A : UU l} {x y : A} + where + + vertical-concat-yoneda-Id² : + {p q r : x =ʸ y} → p =ʸ q → q =ʸ r → p =ʸ r + vertical-concat-yoneda-Id² α β = α ∙ʸ β +``` + ## See also - [The strictly involutive identity types](foundation.strictly-involutive-identity-types.md) diff --git a/src/group-theory/conjugation.lagda.md b/src/group-theory/conjugation.lagda.md index e07bdb3b39..e1534c847c 100644 --- a/src/group-theory/conjugation.lagda.md +++ b/src/group-theory/conjugation.lagda.md @@ -19,6 +19,8 @@ open import foundation.identity-types open import foundation.retractions open import foundation.sections open import foundation.subtypes +open import foundation.transposition-identifications-along-retractions +open import foundation.transposition-identifications-along-sections open import foundation.universe-levels open import group-theory.group-actions @@ -333,7 +335,7 @@ module _ {x y z : type-Group G} → y = conjugation-Group G (inv-Group G x) z → conjugation-Group G x y = z transpose-eq-conjugation-Group {x} {y} {z} = - transpose-eq-section + eq-transpose-is-section ( conjugation-Group G x) ( conjugation-Group G (inv-Group G x)) ( is-section-conjugation-inv-Group x) @@ -342,7 +344,7 @@ module _ {x y z : type-Group G} → conjugation-Group G (inv-Group G x) y = z → y = conjugation-Group G x z transpose-eq-conjugation-Group' {x} {y} {z} = - transpose-eq-section' + eq-transpose-is-section' ( conjugation-Group G x) ( conjugation-Group G (inv-Group G x)) ( is-section-conjugation-inv-Group x) @@ -351,7 +353,7 @@ module _ {x y z : type-Group G} → y = conjugation-Group G x z → conjugation-Group G (inv-Group G x) y = z transpose-eq-conjugation-inv-Group {x} {y} {z} = - transpose-eq-retraction + eq-transpose-is-retraction ( conjugation-Group G x) ( conjugation-Group G (inv-Group G x)) ( is-retraction-conjugation-inv-Group x) @@ -360,7 +362,7 @@ module _ {x y z : type-Group G} → conjugation-Group G x y = z → y = conjugation-Group G (inv-Group G x) z transpose-eq-conjugation-inv-Group' {x} {y} {z} = - transpose-eq-retraction' + eq-transpose-is-retraction' ( conjugation-Group G x) ( conjugation-Group G (inv-Group G x)) ( is-retraction-conjugation-inv-Group x) diff --git a/src/group-theory/equivalences-group-actions.lagda.md b/src/group-theory/equivalences-group-actions.lagda.md index 87c300fea4..cabae428b7 100644 --- a/src/group-theory/equivalences-group-actions.lagda.md +++ b/src/group-theory/equivalences-group-actions.lagda.md @@ -199,7 +199,7 @@ module _ (e : equiv-action-Group G X Y) → preserves-action-Group G Y X (map-inv-equiv-action-Group e) preserves-action-map-inv-equiv-action-Group (e , H) g = - coherence-square-maps-inv-equiv-horizontal + horizontal-inv-equiv-coherence-square-maps ( e) ( mul-action-Group G X g) ( mul-action-Group G Y g) diff --git a/src/orthogonal-factorization-systems/factorizations-of-maps.lagda.md b/src/orthogonal-factorization-systems/factorizations-of-maps.lagda.md index 860b38a002..8dc962ca58 100644 --- a/src/orthogonal-factorization-systems/factorizations-of-maps.lagda.md +++ b/src/orthogonal-factorization-systems/factorizations-of-maps.lagda.md @@ -161,7 +161,7 @@ module _ UU (l1 ⊔ l2) coherence-htpy-factorization-through F E R L = ( is-factorization-factorization-through F) ~ - ( horizontal-concat-htpy L R ∙h is-factorization-factorization-through E) + ( horizontal-concat-htpy R L ∙h is-factorization-factorization-through E) htpy-factorization-through : (F E : factorization-through f X) → UU (l1 ⊔ l2 ⊔ l3) diff --git a/src/structured-types/equivalences-types-equipped-with-endomorphisms.lagda.md b/src/structured-types/equivalences-types-equipped-with-endomorphisms.lagda.md index d5a4a65454..3b8b45fb50 100644 --- a/src/structured-types/equivalences-types-equipped-with-endomorphisms.lagda.md +++ b/src/structured-types/equivalences-types-equipped-with-endomorphisms.lagda.md @@ -158,7 +158,7 @@ inv-equiv-Type-With-Endomorphism : pr1 (inv-equiv-Type-With-Endomorphism X Y e) = inv-equiv (equiv-equiv-Type-With-Endomorphism X Y e) pr2 (inv-equiv-Type-With-Endomorphism X Y e) = - coherence-square-maps-inv-equiv-horizontal + horizontal-inv-equiv-coherence-square-maps ( equiv-equiv-Type-With-Endomorphism X Y e) ( endomorphism-Type-With-Endomorphism X) ( endomorphism-Type-With-Endomorphism Y) diff --git a/src/structured-types/pointed-equivalences.lagda.md b/src/structured-types/pointed-equivalences.lagda.md index bebbf39ced..6805e8bfd8 100644 --- a/src/structured-types/pointed-equivalences.lagda.md +++ b/src/structured-types/pointed-equivalences.lagda.md @@ -606,6 +606,8 @@ pr2 (equiv-precomp-pointed-map C f) = ### Postcomposing by pointed equivalences is a pointed equivalence +#### The predicate of being an equivalence by postcomposition of pointed maps + ```agda module _ {l1 l2 : Level} {A : Pointed-Type l1} {B : Pointed-Type l2} (f : A →∗ B) @@ -614,121 +616,145 @@ module _ is-equiv-postcomp-pointed-map : UUω is-equiv-postcomp-pointed-map = {l : Level} (X : Pointed-Type l) → is-equiv (postcomp-pointed-map f X) - - is-pointed-equiv-is-equiv-postcomp-pointed-map : - is-equiv-postcomp-pointed-map → is-pointed-equiv f - is-pointed-equiv-is-equiv-postcomp-pointed-map = {!!} ``` -```text - is-equiv-is-equiv-comp-pointed-map : - ({l : Level} (X : Pointed-Type l) → is-equiv (comp-pointed-map {A = X} f)) → - is-pointed-equiv f - is-equiv-is-equiv-comp-pointed-map H = {!!} +#### Any pointed map that is an equivalence by postcomposition is a pointed equivalence -{- - is-equiv-is-invertible - ( map-pointed-map g) - ( pr1 G) - ( htpy-eq - ( ap pr1 - ( ap pr1 - ( eq-is-contr - ( is-contr-map-is-equiv (H A) f) - { pair - ( g ∘∗ f) - ( eq-pointed-htpy - ( f ∘∗ (g ∘∗ f)) - ( f) - ( concat-pointed-htpy - ( f ∘∗ (g ∘∗ f)) - ( (f ∘∗ g) ∘∗ f) - ( f) - ( inv-associative-comp-pointed-map f g f) - ( concat-pointed-htpy - ( (f ∘∗ g) ∘∗ f) - ( id-pointed-map ∘∗ f) - ( f) - ( right-whisker-pointed-htpy - ( f ∘∗ g) - ( id-pointed-map) - ( G) - ( f)) - ( left-unit-law-comp-pointed-map f))))} - { pair - ( id-pointed-map) - ( eq-pointed-htpy - ( f ∘∗ id-pointed-map) - ( f) - ( right-unit-law-comp-pointed-map f))})))) - where - g : B →∗ A - g = pr1 (center (is-contr-map-is-equiv (H B) id-pointed-map)) - G : (f ∘∗ g) ~∗ id-pointed-map - G = map-equiv - ( extensionality-pointed-map - ( f ∘∗ g) - ( id-pointed-map)) - ( pr2 (center (is-contr-map-is-equiv (H B) id-pointed-map))) -} - - is-equiv-comp-is-pointed-equiv : - is-pointed-equiv f → - {l : Level} (X : Pointed-Type l) → is-equiv (comp-pointed-map {A = X} f) - is-equiv-comp-is-pointed-equiv E X = {!!} - -{- - pair - ( pair - ( g ∘∗_) - ( λ k → - eq-pointed-htpy - ( f ∘∗ (g ∘∗ k)) - ( k) - ( concat-pointed-htpy - ( f ∘∗ (g ∘∗ k)) - ( (f ∘∗ g) ∘∗ k) - ( k) - ( inv-associative-comp-pointed-map f g k) - ( concat-pointed-htpy - ( (f ∘∗ g) ∘∗ k) - ( id-pointed-map ∘∗ k) - ( k) - ( right-whisker-pointed-htpy - ( f ∘∗ g) - ( id-pointed-map) - ( G) - ( k)) - ( left-unit-law-comp-pointed-map k))))) - ( pair - ( h ∘∗_) - ( λ k → - eq-pointed-htpy - ( h ∘∗ (f ∘∗ k)) - ( k) +```agda +module _ + {l1 l2 : Level} {A : Pointed-Type l1} {B : Pointed-Type l2} (f : A →∗ B) + (H : is-equiv-postcomp-pointed-map f) + where + + pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map : B →∗ A + pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map = + map-inv-is-equiv (H B) id-pointed-map + + map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map : + type-Pointed-Type B → type-Pointed-Type A + map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map = + map-pointed-map + ( pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + + is-pointed-section-pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map : + is-pointed-section f + ( pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + is-pointed-section-pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map = + pointed-htpy-eq + ( f ∘∗ pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + ( id-pointed-map) + ( is-section-map-inv-is-equiv (H B) id-pointed-map) + + is-section-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map : + is-section + ( map-pointed-map f) + ( map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + is-section-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map = + htpy-pointed-htpy + ( is-pointed-section-pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + + is-pointed-retraction-pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map : + is-pointed-retraction f + ( pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + is-pointed-retraction-pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map = + pointed-htpy-eq + ( pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map ∘∗ f) + ( id-pointed-map) + ( is-injective-is-equiv + ( H A) + ( eq-pointed-htpy + ( ( f) ∘∗ + ( ( pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) ∘∗ + ( f))) + ( f ∘∗ id-pointed-map) + ( concat-pointed-htpy + ( inv-associative-comp-pointed-map f _ f) ( concat-pointed-htpy - ( h ∘∗ (f ∘∗ k)) - ( (h ∘∗ f) ∘∗ k) - ( k) - ( inv-associative-comp-pointed-map h f k) + ( right-whisker-pointed-htpy + ( f ∘∗ _) + ( id-pointed-map) + ( is-pointed-section-pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + ( f)) ( concat-pointed-htpy - ( (h ∘∗ f) ∘∗ k) - ( id-pointed-map ∘∗ k) - ( k) - ( right-whisker-pointed-htpy - ( h ∘∗ f) - ( id-pointed-map) - ( H) - ( k)) - ( left-unit-law-comp-pointed-map k))))) - where - I : is-pointed-iso f - I = is-iso-is-pointed-equiv f E - g : B →∗ A - g = pr1 (pr1 I) - G : (f ∘∗ g) ~∗ id-pointed-map - G = pr2 (pr1 I) - h : B →∗ A - h = pr1 (pr2 I) - H : (h ∘∗ f) ~∗ id-pointed-map - H = pr2 (pr2 I) -} + ( left-unit-law-comp-pointed-map f) + ( inv-pointed-htpy (right-unit-law-comp-pointed-map f))))))) + + is-retraction-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map : + is-retraction + ( map-pointed-map f) + ( map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + is-retraction-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map = + htpy-pointed-htpy + ( is-pointed-retraction-pointed-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + + is-pointed-equiv-is-equiv-postcomp-pointed-map : is-pointed-equiv f + is-pointed-equiv-is-equiv-postcomp-pointed-map = + is-equiv-is-invertible + ( map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + ( is-section-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) + ( is-retraction-map-inv-is-pointed-equiv-is-equiv-postcomp-pointed-map) +``` + +#### Any pointed equivalence is an equivalence by postcomposition + +```agda +module _ + {l1 l2 : Level} {A : Pointed-Type l1} {B : Pointed-Type l2} (f : A →∗ B) + (H : is-pointed-equiv f) + where + + map-inv-is-equiv-postcomp-is-pointed-equiv : + {l : Level} (X : Pointed-Type l) → (X →∗ B) → (X →∗ A) + map-inv-is-equiv-postcomp-is-pointed-equiv = + postcomp-pointed-map (pointed-map-inv-is-pointed-equiv f H) + + is-section-map-inv-is-equiv-postcomp-is-pointed-equiv : + {l : Level} (X : Pointed-Type l) → + is-section + ( postcomp-pointed-map f X) + ( map-inv-is-equiv-postcomp-is-pointed-equiv X) + is-section-map-inv-is-equiv-postcomp-is-pointed-equiv X h = + eq-pointed-htpy + ( f ∘∗ (pointed-map-inv-is-pointed-equiv f H ∘∗ h)) + ( h) + ( concat-pointed-htpy + ( inv-associative-comp-pointed-map f + ( pointed-map-inv-is-pointed-equiv f H) + ( h)) + ( concat-pointed-htpy + ( right-whisker-pointed-htpy + ( f ∘∗ pointed-map-inv-is-pointed-equiv f H) + ( id-pointed-map) + ( is-pointed-section-pointed-map-inv-is-pointed-equiv f H) + ( h)) + ( left-unit-law-comp-pointed-map h))) + + is-retraction-map-inv-is-equiv-postcomp-is-pointed-equiv : + {l : Level} (X : Pointed-Type l) → + is-retraction + ( postcomp-pointed-map f X) + ( map-inv-is-equiv-postcomp-is-pointed-equiv X) + is-retraction-map-inv-is-equiv-postcomp-is-pointed-equiv X h = + eq-pointed-htpy + ( pointed-map-inv-is-pointed-equiv f H ∘∗ (f ∘∗ h)) + ( h) + ( concat-pointed-htpy + ( inv-associative-comp-pointed-map + ( pointed-map-inv-is-pointed-equiv f H) + ( f) + ( h)) + ( concat-pointed-htpy + ( right-whisker-pointed-htpy + ( pointed-map-inv-is-pointed-equiv f H ∘∗ f) + ( id-pointed-map) + ( is-pointed-retraction-pointed-map-inv-is-pointed-equiv f H) + ( h)) + ( left-unit-law-comp-pointed-map h))) + + is-equiv-postcomp-is-pointed-equiv : is-equiv-postcomp-pointed-map f + is-equiv-postcomp-is-pointed-equiv X = + is-equiv-is-invertible + ( map-inv-is-equiv-postcomp-is-pointed-equiv X) + ( is-section-map-inv-is-equiv-postcomp-is-pointed-equiv X) + ( is-retraction-map-inv-is-equiv-postcomp-is-pointed-equiv X) ``` diff --git a/src/synthetic-homotopy-theory/descent-circle-function-types.lagda.md b/src/synthetic-homotopy-theory/descent-circle-function-types.lagda.md index 6bf5b5fd8c..c0454fa477 100644 --- a/src/synthetic-homotopy-theory/descent-circle-function-types.lagda.md +++ b/src/synthetic-homotopy-theory/descent-circle-function-types.lagda.md @@ -100,6 +100,7 @@ module _ pr2 eq-descent-data-circle-function-type h = ( eq-htpy ( horizontal-concat-htpy + ( coherence-square-family-with-descent-data-circle B) ( h ·l inv-htpy ( coherence-square-maps-inv-equiv @@ -109,8 +110,7 @@ module _ ( family-family-with-descent-data-circle A) ( loop-free-loop l)) ( equiv-family-with-descent-data-circle A) - ( coherence-square-family-with-descent-data-circle A))) - ( coherence-square-family-with-descent-data-circle B))) ∙ + ( coherence-square-family-with-descent-data-circle A))))) ∙ ( inv ( ( tr-function-type ( family-family-with-descent-data-circle A) diff --git a/src/synthetic-homotopy-theory/double-loop-spaces.lagda.md b/src/synthetic-homotopy-theory/double-loop-spaces.lagda.md index a756011d87..03c7e352fa 100644 --- a/src/synthetic-homotopy-theory/double-loop-spaces.lagda.md +++ b/src/synthetic-homotopy-theory/double-loop-spaces.lagda.md @@ -42,7 +42,7 @@ module _ Ω² A = iterated-loop-space 2 A type-Ω² : {A : UU l} (a : A) → UU l - type-Ω² a = Id (refl {x = a}) (refl {x = a}) + type-Ω² a = refl {x = a} = refl {x = a} refl-Ω² : {A : UU l} {a : A} → type-Ω² a refl-Ω² = refl @@ -70,23 +70,21 @@ module _ where left-unit-law-vertical-concat-Ω² : - {a : A} {α : type-Ω² a} → - Id (vertical-concat-Ω² refl-Ω² α) α + {a : A} {α : type-Ω² a} → vertical-concat-Ω² refl-Ω² α = α left-unit-law-vertical-concat-Ω² = left-unit right-unit-law-vertical-concat-Ω² : - {a : A} {α : type-Ω² a} → - Id (vertical-concat-Ω² α refl-Ω²) α + {a : A} {α : type-Ω² a} → vertical-concat-Ω² α refl-Ω² = α right-unit-law-vertical-concat-Ω² = right-unit left-unit-law-horizontal-concat-Ω² : {a : A} {α : type-Ω² a} → - Id (horizontal-concat-Ω² refl-Ω² α) α + horizontal-concat-Ω² refl-Ω² α = α left-unit-law-horizontal-concat-Ω² {α = α} = - ( left-unit-law-horizontal-concat-Id² α) ∙ (ap-id α) + compute-left-refl-horizontal-concat-Id² α ∙ ap-id α naturality-right-unit : - {x y : A} {p q : Id x y} (α : Id p q) → + {x y : A} {p q : x = y} (α : p = q) → coherence-square-identifications ( right-unit) ( right-whisker-concat α refl) @@ -95,25 +93,21 @@ module _ naturality-right-unit {p = refl} refl = refl naturality-right-unit-Ω² : - {x : A} (α : type-Ω² x) → - right-whisker-concat α refl = α + {x : A} (α : type-Ω² x) → right-whisker-concat α refl = α naturality-right-unit-Ω² α = inv right-unit ∙ naturality-right-unit α right-unit-law-horizontal-concat-Ω² : - {a : A} {α : type-Ω² a} → - Id (horizontal-concat-Ω² α refl-Ω²) α + {a : A} {α : type-Ω² a} → horizontal-concat-Ω² α refl-Ω² = α right-unit-law-horizontal-concat-Ω² {α = α} = - ( right-unit-law-horizontal-concat-Id² α) ∙ (naturality-right-unit-Ω² α) + compute-right-refl-horizontal-concat-Id² α ∙ naturality-right-unit-Ω² α left-unit-law-left-whisker-Ω² : - {a : A} (α : type-Ω² a) → - left-whisker-concat (refl-Ω (pair A a)) α = α + {a : A} (α : type-Ω² a) → left-whisker-concat (refl-Ω (A , a)) α = α left-unit-law-left-whisker-Ω² α = left-unit-law-left-whisker-concat α right-unit-law-right-whisker-Ω² : - {a : A} (α : type-Ω² a) → - right-whisker-concat α (refl-Ω (pair A a)) = α + {a : A} (α : type-Ω² a) → right-whisker-concat α (refl-Ω (A , a)) = α right-unit-law-right-whisker-Ω² α = inv (right-unit-law-right-whisker-concat α ∙ right-unit) ``` @@ -126,7 +120,7 @@ interchange-Ω² : Id ( horizontal-concat-Ω² (vertical-concat-Ω² α β) (vertical-concat-Ω² γ δ)) ( vertical-concat-Ω² (horizontal-concat-Ω² α γ) (horizontal-concat-Ω² β δ)) -interchange-Ω² α β γ δ = interchange-Id² α β γ δ +interchange-Ω² = interchange-Id² ``` ## Properties @@ -140,8 +134,7 @@ module _ where pointed-equiv-2-loop-pointed-identity : - Ω (pair (point-Pointed-Type A = x) p) ≃∗ Ω² A + Ω (point-Pointed-Type A = x , p) ≃∗ Ω² A pointed-equiv-2-loop-pointed-identity = - pointed-equiv-Ω-pointed-equiv - ( pointed-equiv-loop-pointed-identity A p) + pointed-equiv-Ω-pointed-equiv (pointed-equiv-loop-pointed-identity A p) ``` diff --git a/src/synthetic-homotopy-theory/eckmann-hilton-argument.lagda.md b/src/synthetic-homotopy-theory/eckmann-hilton-argument.lagda.md index f9557cc714..34728cf419 100644 --- a/src/synthetic-homotopy-theory/eckmann-hilton-argument.lagda.md +++ b/src/synthetic-homotopy-theory/eckmann-hilton-argument.lagda.md @@ -1,4 +1,4 @@ -# The Eckmann-Hilton Argument +# The Eckmann-Hilton argument ```agda module synthetic-homotopy-theory.eckmann-hilton-argument where @@ -29,18 +29,22 @@ open import synthetic-homotopy-theory.triple-loop-spaces ## Idea There are two classical statements of the Eckmann-Hilton argument. The first -states that a group object in the category of groups is abelian. The second -states that `π₂ (X)` is abelian, for any space `X`. The former is an algebraic -statement, while the latter is a homotopy theoretic statment. As it turns out, -the two are equivalent. See the following -[wikipedia article](https://en.wikipedia.org/wiki/Eckmann%E2%80%93Hilton_argument#Two-dimensional_proof). +states that a group object in the +[category of groups](group-theory.category-of-groups.md) is +[abelian](group-theory.abelian-groups.md). The second states that `π₂(X)` is +abelian, for any space `X`. The former is an algebraic statement, while the +latter is a homotopy theoretic statment. As it turns out, the two are +[equivalent](foundation.logical-equivalences.md). See the following +[Wikipedia article](https://en.wikipedia.org/wiki/Eckmann%E2%80%93Hilton_argument#Two-dimensional_proof). + +Both of these phrasings, however, are about [set](foundation-core.sets.md) level +structures. Since we have access to untruncated types, it is more natural to +consider untruncated analogs of the above two statements. Thus, we will work +with the following statement of the Eckmann-Hilton argument: -Both these phrasing, however, are about set level structures. Since we have -access to untruncated types, it is more natural to prove untruncated analogs of -the above two statements. Thus, we will work with the following statement of the -Eckmann-Hilton argument: - -`(α β : Ω² X) → α ∙ β = β ∙ α` +```text + (α β : Ω² X) → α ∙ β = β ∙ α +``` For fixed 2-loops, we will call the resulting identification "the Eckmann-Hilton identification". In this file we will give two different constructions of this @@ -61,41 +65,41 @@ is a group homomorphism of in each variable. ```agda -outer-eckmann-hilton-interchange-connection-Ω² : - {l : Level} {A : UU l} {a : A} (α δ : type-Ω² a) → - Id (horizontal-concat-Ω² α δ) (vertical-concat-Ω² α δ) -outer-eckmann-hilton-interchange-connection-Ω² α δ = - ( z-concat-Id³ (inv right-unit) (inv left-unit)) ∙ - ( ( interchange-Ω² α refl refl δ) ∙ - ( y-concat-Id³ - ( right-unit-law-horizontal-concat-Ω² {α = α}) - ( left-unit-law-horizontal-concat-Ω² {α = δ}))) - -inner-eckmann-hilton-interchange-connection-Ω² : - {l : Level} {A : UU l} {a : A} (β γ : type-Ω² a) → - Id ( horizontal-concat-Ω² β γ) (vertical-concat-Ω² γ β) -inner-eckmann-hilton-interchange-connection-Ω² β γ = - ( z-concat-Id³ (inv left-unit) (inv right-unit)) ∙ - ( ( interchange-Ω² refl β γ refl) ∙ - ( y-concat-Id³ - ( left-unit-law-horizontal-concat-Ω² {α = γ}) - ( right-unit-law-horizontal-concat-Ω² {α = β}))) - -eckmann-hilton-interchange-Ω² : - {l : Level} {A : UU l} {a : A} (α β : type-Ω² a) → - Id (α ∙ β) (β ∙ α) -eckmann-hilton-interchange-Ω² α β = - ( inv (outer-eckmann-hilton-interchange-connection-Ω² α β)) ∙ - ( inner-eckmann-hilton-interchange-connection-Ω² α β) - -interchange-concat-Ω² : - {l : Level} {A : UU l} {a : A} (α β γ δ : type-Ω² a) → - ((α ∙ β) ∙ (γ ∙ δ)) = ((α ∙ γ) ∙ (β ∙ δ)) -interchange-concat-Ω² = - interchange-law-commutative-and-associative - ( _∙_) - ( eckmann-hilton-interchange-Ω²) - ( assoc) +module _ + {l : Level} {A : UU l} {a : A} + where + + outer-eckmann-hilton-interchange-connection-Ω² : + (α δ : type-Ω² a) → + horizontal-concat-Ω² α δ = vertical-concat-Ω² α δ + outer-eckmann-hilton-interchange-connection-Ω² α δ = + ( z-concat-Id³ {α = α} {γ = δ} (inv right-unit) (inv left-unit)) ∙ + ( ( interchange-Ω² α refl refl δ) ∙ + ( y-concat-Id³ {β = α} {δ = δ} + ( right-unit-law-horizontal-concat-Ω² {α = α}) + ( left-unit-law-horizontal-concat-Ω² {α = δ}))) + + inner-eckmann-hilton-interchange-connection-Ω² : + (β γ : type-Ω² a) → horizontal-concat-Ω² β γ = vertical-concat-Ω² γ β + inner-eckmann-hilton-interchange-connection-Ω² β γ = + ( z-concat-Id³ {α = β} {β} {γ} (inv left-unit) (inv right-unit)) ∙ + ( ( interchange-Ω² refl β γ refl) ∙ + ( y-concat-Id³ {β = γ} {δ = β} + ( left-unit-law-horizontal-concat-Ω² {α = γ}) + ( right-unit-law-horizontal-concat-Ω² {α = β}))) + + eckmann-hilton-interchange-Ω² : (α β : type-Ω² a) → α ∙ β = β ∙ α + eckmann-hilton-interchange-Ω² α β = + ( inv (outer-eckmann-hilton-interchange-connection-Ω² α β)) ∙ + ( inner-eckmann-hilton-interchange-connection-Ω² α β) + + interchange-concat-Ω² : + (α β γ δ : type-Ω² a) → (α ∙ β) ∙ (γ ∙ δ) = (α ∙ γ) ∙ (β ∙ δ) + interchange-concat-Ω² = + interchange-law-commutative-and-associative + ( _∙_) + ( eckmann-hilton-interchange-Ω²) + ( assoc) ``` ### Constructing the Eckmann-Hilton identification using the naturality condition of the operation of whiskering a fixed 2-path by a 1-path @@ -170,19 +174,13 @@ module _ eckmann-hilton-Ω² : (α β : type-Ω² (point-Pointed-Type A)) → α ∙ β = β ∙ α - eckmann-hilton-Ω² α β = equational-reasoning_ - (α ∙ β) = - ( left-whisker-concat refl α) ∙ - ( right-whisker-concat β refl) - by ( inv + eckmann-hilton-Ω² α β = + ( inv ( horizontal-concat-Id² ( left-unit-law-left-whisker-Ω² α) - ( right-unit-law-right-whisker-Ω² β))) - = ( right-whisker-concat β refl) ∙ - ( left-whisker-concat refl α) - by ( commutative-left-whisker-right-whisker-concat α β) - = β ∙ α - by ( horizontal-concat-Id² + ( right-unit-law-right-whisker-Ω² β))) ∙ + ( commutative-left-whisker-right-whisker-concat α β) ∙ + ( horizontal-concat-Id² ( right-unit-law-right-whisker-Ω² β) ( left-unit-law-left-whisker-Ω² α)) ``` @@ -197,7 +195,7 @@ braids `α` under `β`. This difference shows up nicely in the type theory. The first version uses the naturality of the operation of whiskering on the left, while the second version uses the naturality of the operation of whiskering on the right. Based on the intution of braiding, we should expect these two version -of the Eckmann-Hilton identification to naturally "undo" each other, which the +of the Eckmann-Hilton identification to naturally "undo" each other, which they do. Thus, we will refer to this alternate construction of Eckmann-Hilton as "the inverse Eckmann-Hilton argument", and the corresponding identification "the inverse Eckmann-Hilton identification". @@ -207,23 +205,17 @@ module _ {l : Level} {A : Pointed-Type l} where - eckmann-hilton-inverse-Ω² : + inv-eckmann-hilton-Ω² : (α β : type-Ω² (point-Pointed-Type A)) → α ∙ β = β ∙ α - eckmann-hilton-inverse-Ω² α β = equational-reasoning_ - (α ∙ β) - = ( right-whisker-concat α refl) ∙ - ( left-whisker-concat refl β) - by ( inv + inv-eckmann-hilton-Ω² α β = + ( inv ( horizontal-concat-Id² ( right-unit-law-right-whisker-Ω² α) - ( left-unit-law-left-whisker-Ω² β))) - = ( left-whisker-concat refl β) ∙ - ( right-whisker-concat α refl) - by commutative-right-whisker-left-whisker-concat α β - = β ∙ α - by ( horizontal-concat-Id² - ( left-unit-law-left-whisker-Ω² β)) - ( right-unit-law-right-whisker-Ω² α) + ( left-unit-law-left-whisker-Ω² β))) ∙ + ( commutative-right-whisker-left-whisker-concat α β) ∙ + ( horizontal-concat-Id² + ( left-unit-law-left-whisker-Ω² β) + ( right-unit-law-right-whisker-Ω² α)) ``` We now prove that this Eckmann-Hilton identification "undoes" the previously @@ -231,66 +223,37 @@ constructed Eckmann-Hilton identification. If we think of braiding `α` over `β then braiding `β` under `α`, we should end up with the trivial braid. Thus, we should have -`eckmann-hilton-Ω² α β ∙ eckman-hilton-inverse-Ω² β α = refl` +`eckmann-hilton-Ω² α β ∙ inv-eckmann-hilton-Ω² β α = refl` This is equivalent to, -`inv eckman-hilton-inverse-Ω² β α = eckmann-hilton-Ω² α β` +`inv inv-eckmann-hilton-Ω² β α = eckmann-hilton-Ω² α β` + +which is what we prove. -which is what we prove. Note that the above property is distinct from syllepsis, -since it concerns two different construction of the Eckmann-Hilton -identification. Further, it works for all 2-loops, not just 3-loops. +**Note.** that the above property is distinct from syllepsis, since it concerns +two different construction of the Eckmann-Hilton identification. Further, it +works for all 2-loops, not just 3-loops. ```agda module _ {l : Level} {A : Pointed-Type l} where - eckmann-hilton-inverse-Ω²-undoes-eckmann-hilton-Ω² : + compute-inv-inv-eckmann-hilton-Ω² : (α β : type-Ω² (point-Pointed-Type A)) → - inv (eckmann-hilton-inverse-Ω² β α) = (eckmann-hilton-Ω² α β) - eckmann-hilton-inverse-Ω²-undoes-eckmann-hilton-Ω² α β = equational-reasoning_ - ( inv (eckmann-hilton-inverse-Ω² β α)) - = concat - ( inv - ( horizontal-concat-Id² - ( left-unit-law-left-whisker-Ω² α) - ( right-unit-law-right-whisker-Ω² β))) - ( _) - ( inv - ( concat - ( inv - ( horizontal-concat-Id² - ( right-unit-law-right-whisker-Ω² β) - ( left-unit-law-left-whisker-Ω² α))) - ( _) - ( commutative-right-whisker-left-whisker-concat β α))) - by distributive-inv-concat - ( concat - ( inv + inv (inv-eckmann-hilton-Ω² β α) = eckmann-hilton-Ω² α β + compute-inv-inv-eckmann-hilton-Ω² α β = + ( distributive-inv-concat + ( ( inv ( horizontal-concat-Id² ( right-unit-law-right-whisker-Ω² β) - ( left-unit-law-left-whisker-Ω² α))) - ( _) + ( left-unit-law-left-whisker-Ω² α))) ∙ ( commutative-right-whisker-left-whisker-concat β α)) ( horizontal-concat-Id² ( left-unit-law-left-whisker-Ω² α) - ( right-unit-law-right-whisker-Ω² β)) - = concat - ( inv - ( horizontal-concat-Id² - ( left-unit-law-left-whisker-Ω² α) - ( right-unit-law-right-whisker-Ω² β))) - ( _) - ( concat - ( inv (commutative-right-whisker-left-whisker-concat β α)) - ( _) - ( inv - ( inv - ( horizontal-concat-Id² - ( right-unit-law-right-whisker-Ω² β) - ( left-unit-law-left-whisker-Ω² α))))) - by left-whisker-concat + ( right-unit-law-right-whisker-Ω² β))) ∙ + ( left-whisker-concat ( inv ( horizontal-concat-Id² ( left-unit-law-left-whisker-Ω² α) @@ -300,20 +263,8 @@ module _ ( horizontal-concat-Id² ( right-unit-law-right-whisker-Ω² β) ( left-unit-law-left-whisker-Ω² α))) - ( commutative-right-whisker-left-whisker-concat β α)) - = concat - ( inv - ( horizontal-concat-Id² - ( left-unit-law-left-whisker-Ω² α) - ( right-unit-law-right-whisker-Ω² β))) - ( _) - ( concat - ( commutative-left-whisker-right-whisker-concat α β) - ( _) - ( horizontal-concat-Id² - ( right-unit-law-right-whisker-Ω² β) - ( left-unit-law-left-whisker-Ω² α))) - by left-whisker-concat + ( commutative-right-whisker-left-whisker-concat β α))) ∙ + ( left-whisker-concat ( inv ( horizontal-concat-Id² ( left-unit-law-left-whisker-Ω² α) @@ -323,10 +274,9 @@ module _ ( inv-inv ( horizontal-concat-Id² ( right-unit-law-right-whisker-Ω² β) - ( left-unit-law-left-whisker-Ω² α)))) - = eckmann-hilton-Ω² α β - by inv ( - assoc + ( left-unit-law-left-whisker-Ω² α))))) ∙ + ( inv + ( assoc ( inv ( horizontal-concat-Id² ( left-unit-law-left-whisker-Ω² α) @@ -334,31 +284,29 @@ module _ ( commutative-left-whisker-right-whisker-concat α β) ( horizontal-concat-Id² ( right-unit-law-right-whisker-Ω² β) - ( left-unit-law-left-whisker-Ω² α))) + ( left-unit-law-left-whisker-Ω² α)))) ``` ## Properties -### We can apply each `eckmann-hilton-Ω²` and `eckmann-hilton-inverse-Ω²` to a single 2-loop to obtain a 3-loop +### We can apply each `eckmann-hilton-Ω²` and `inv-eckmann-hilton-Ω²` to a single 2-loop to obtain a 3-loop ```agda module _ {l : Level} {A : UU l} {a : A} (s : type-Ω² a) where - 3-loop-eckmann-hilton-Ω² : - type-Ω³ a + 3-loop-eckmann-hilton-Ω² : type-Ω³ a 3-loop-eckmann-hilton-Ω² = map-pointed-equiv ( pointed-equiv-2-loop-pointed-identity (Ω (A , a)) (s ∙ s)) ( eckmann-hilton-Ω² s s) - 3-loop-eckmann-hilton-inverse-Ω² : - type-Ω³ a - 3-loop-eckmann-hilton-inverse-Ω² = + inv-3-loop-eckmann-hilton-Ω² : type-Ω³ a + inv-3-loop-eckmann-hilton-Ω² = map-pointed-equiv ( pointed-equiv-2-loop-pointed-identity (Ω (A , a)) (s ∙ s)) - ( eckmann-hilton-inverse-Ω² s s) + ( inv-eckmann-hilton-Ω² s s) ``` ### The above two 3-loops are inverses @@ -368,19 +316,26 @@ module _ {l : Level} {A : UU l} {a : A} (s : type-Ω² a) where - Id-inv-3-loop-eckmann-hilton-inverse-Ω²-3-loop-eckmann-hilton-Ω² : - inv (3-loop-eckmann-hilton-inverse-Ω² s) = 3-loop-eckmann-hilton-Ω² s - Id-inv-3-loop-eckmann-hilton-inverse-Ω²-3-loop-eckmann-hilton-Ω² = - concat - ( inv - ( preserves-inv-map-Ω - ( pointed-map-pointed-equiv - ( pointed-equiv-loop-pointed-identity (Ω (A , a)) (s ∙ s))) - (eckmann-hilton-inverse-Ω² s s))) - ( _) - ( ap - ( map-Ω - ( pointed-map-pointed-equiv - ( pointed-equiv-loop-pointed-identity (Ω (A , a)) (s ∙ s)))) - ( eckmann-hilton-inverse-Ω²-undoes-eckmann-hilton-Ω² s s)) + compute-inv-inv-3-loop-eckmann-hilton-Ω² : + inv (inv-3-loop-eckmann-hilton-Ω² s) = 3-loop-eckmann-hilton-Ω² s + compute-inv-inv-3-loop-eckmann-hilton-Ω² = + ( inv + ( preserves-inv-map-Ω + ( pointed-map-pointed-equiv + ( pointed-equiv-loop-pointed-identity (Ω (A , a)) (s ∙ s))) + (inv-eckmann-hilton-Ω² s s))) ∙ + ( ap + ( map-Ω + ( pointed-map-pointed-equiv + ( pointed-equiv-loop-pointed-identity (Ω (A , a)) (s ∙ s)))) + ( compute-inv-inv-eckmann-hilton-Ω² s s)) ``` + +## External links + +- [The Eckmann-Hilton argument](https://1lab.dev/Algebra.Magma.Unital.EckmannHilton.html) + at 1lab. +- [Eckmann-Hilton argument](https://ncatlab.org/nlab/show/Eckmann-Hilton+argument) + at $n$Lab. +- [Eckmann-Hilton argument](https://en.wikipedia.org/wiki/Eckmann%E2%80%93Hilton_argument) + at Wikipedia. diff --git a/src/synthetic-homotopy-theory/equivalences-sequential-diagrams.lagda.md b/src/synthetic-homotopy-theory/equivalences-sequential-diagrams.lagda.md index d399a7affc..b82afe8957 100644 --- a/src/synthetic-homotopy-theory/equivalences-sequential-diagrams.lagda.md +++ b/src/synthetic-homotopy-theory/equivalences-sequential-diagrams.lagda.md @@ -140,7 +140,7 @@ module _ pr1 inv-equiv-sequential-diagram n = inv-equiv (equiv-equiv-sequential-diagram B e n) pr2 inv-equiv-sequential-diagram n = - coherence-square-maps-inv-equiv-vertical + vertical-inv-equiv-coherence-square-maps ( map-sequential-diagram A n) ( equiv-equiv-sequential-diagram B e n) ( equiv-equiv-sequential-diagram B e (succ-ℕ n)) diff --git a/src/synthetic-homotopy-theory/functoriality-sequential-colimits.lagda.md b/src/synthetic-homotopy-theory/functoriality-sequential-colimits.lagda.md index b03ced31dd..61cd54ef3b 100644 --- a/src/synthetic-homotopy-theory/functoriality-sequential-colimits.lagda.md +++ b/src/synthetic-homotopy-theory/functoriality-sequential-colimits.lagda.md @@ -336,11 +336,22 @@ module _ ( ( map-sequential-colimit-hom-sequential-diagram up-c c'' ( comp-hom-sequential-diagram A B C g f)) ·l ( coherence-cocone-sequential-diagram c n)) - ( _) + ( coherence-cocone-sequential-diagram + ( map-cocone-hom-sequential-diagram + ( comp-hom-sequential-diagram A B C g f) + ( c'')) + ( n)) + ( ( htpy-htpy-cocone-map-sequential-colimit-hom-sequential-diagram + ( up-c) + ( c'') + ( comp-hom-sequential-diagram A B C g f) + ( succ-ℕ n)) ·r + ( map-sequential-diagram A n)) ( coherence-htpy-cocone-map-sequential-colimit-hom-sequential-diagram up-c ( c'') ( comp-hom-sequential-diagram A B C g f) - ( n))) ∙h + ( n)) + ( _)) ∙h ( ap-concat-htpy ( htpy-htpy-cocone-map-sequential-colimit-hom-sequential-diagram up-c c'' ( comp-hom-sequential-diagram A B C g f) diff --git a/src/synthetic-homotopy-theory/triple-loop-spaces.lagda.md b/src/synthetic-homotopy-theory/triple-loop-spaces.lagda.md index 755771796b..cdb70b73bf 100644 --- a/src/synthetic-homotopy-theory/triple-loop-spaces.lagda.md +++ b/src/synthetic-homotopy-theory/triple-loop-spaces.lagda.md @@ -106,7 +106,7 @@ left-unit-law-z-concat-Ω³ : left-unit-law-z-concat-Ω³ α = ( left-unit-law-z-concat-Id³ α) ∙ ( ( inv right-unit) ∙ - ( ( inv-nat-htpy (λ ω → left-unit-law-horizontal-concat-Id² ω) α) ∙ + ( ( inv-nat-htpy (λ ω → compute-left-refl-horizontal-concat-Id² ω) α) ∙ ( ( inv right-unit) ∙ ( ( inv-nat-htpy ap-id α) ∙ ( ap-id α))))) @@ -129,7 +129,7 @@ right-unit-law-z-concat-Ω³ α = -} {- ( ( inv right-unit) ∙ - ( ( inv-nat-htpy (λ ω → right-unit-law-horizontal-concat-Id² ω) α) ∙ + ( ( inv-nat-htpy (λ ω → compute-right-refl-horizontal-concat-Id² ω) α) ∙ ( left-unit ∙ ( ( inv right-unit) ∙ ( ( inv-nat-htpy diff --git a/website/benchmarks/index.html b/website/benchmarks/index.html new file mode 100644 index 0000000000..eb3f31ca72 --- /dev/null +++ b/website/benchmarks/index.html @@ -0,0 +1,281 @@ + + + + + + + Benchmarks + + + + +
+ + + + + + +