{"id":22390645,"url":"https://github.com/jjaassoonn/cc","last_synced_at":"2026-03-19T22:40:50.832Z","repository":{"id":101612529,"uuid":"480480285","full_name":"jjaassoonn/cc","owner":"jjaassoonn","description":"Čech cohomology on topological space","archived":false,"fork":false,"pushed_at":"2022-05-27T10:57:10.000Z","size":235,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T19:49:16.701Z","etag":null,"topics":["formalization","mathematics"],"latest_commit_sha":null,"homepage":"","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjaassoonn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-11T17:21:04.000Z","updated_at":"2023-03-02T09:32:57.000Z","dependencies_parsed_at":"2023-04-09T13:16:59.633Z","dependency_job_id":null,"html_url":"https://github.com/jjaassoonn/cc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jjaassoonn/cc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjaassoonn%2Fcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjaassoonn%2Fcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjaassoonn%2Fcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjaassoonn%2Fcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjaassoonn","download_url":"https://codeload.github.com/jjaassoonn/cc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjaassoonn%2Fcc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29015145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T14:58:54.169Z","status":"ssl_error","status_checked_at":"2026-02-02T14:58:51.285Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formalization","mathematics"],"created_at":"2024-12-05T03:41:36.017Z","updated_at":"2026-02-02T16:08:30.910Z","avatar_url":"https://github.com/jjaassoonn.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Čech cohomology\n\n## Open coverings\n\nLet $X$ be a topological space, an open covering for $X$ is a collection of open sets whose union is the whole $X$. In the case of Čech cohomology, we require the underlying set to be well ordered.\n\nLet $X$ be a topological space, an open covering for $X$ is a collection of open sets whose union is the whole $X$. In the case of Čech cohomology, we require the underlying set to be linearly ordered.\nIn Lean we express this as\n\n```lean\nstructure oc : Type (u+1) :=\n(ι : Type.{u})\n[lo : linear_order ι . tactic.apply_instance] \n(cover : ι → opens X)\n(is_cover : supr cover = ⊤)\n\nattribute [instance] oc.lo oc.wo\nattribute [simp] oc.is_cover\n```\n\nThen for two open covers $\\mathfrak A$ and $\\mathfrak B$ indexed by $I$ and $J$, respectively, we say $\\mathfrak A$ refines $\\mathfrak B$, if there is a strictly monotonic function $f : I \\to J$ such that $\\mathfrak A_i \\subseteq \\mathfrak B_{f(j)}$ for all $i ∈ I$. In Lean, this is\n\n``` lean\n@[ext] structure refines (𝔄 𝔅 : X.oc) : Type (u+1) :=\n(func : 𝔄.ι → 𝔅.ι)\n(is_refinement : ∀ i : 𝔄.ι, 𝔄.cover i ≤ 𝔅.cover (func i))\n```\n\n~~We temporarily fix the indexing set $ι$, then an $n$-simplex is simply a finite set of $ι$ with $n+1$ elements. In Lean, this is~~\n\n```lean\n-- @[ext] structure simplex (n : ℕ) extends finset ι :=\n-- (card_eq : to_finset.card = n.succ)\n```\n\n## Unordered\n\n```lean\ndef C.pre (n : ℕ) : Type* :=\nΠ (α : fin n → U.ι), 𝓕.1.obj (op $ face α)\n\nabbreviation C (n : ℕ) := AddCommGroup.of (C.pre 𝓕 U n)\n\nlemma d_def (f : C 𝓕 U n) (α : fin (n + 1) → U.ι) :\n  d 𝓕 U n f α =\n  ∑ (i : fin (n+1)), \n    (ite (even i.1) id has_neg.neg)\n      𝓕.1.map (hom_of_le $ face.le_ignore α i).op (f (ignore α i) := \n...\n\ndef Cech_complex_wrt_cover_unordered : cochain_complex Ab.{u} ℕ :=\n{ X := λ n, C 𝓕 U (n + 1),\n  d := λ i j, d_from_to 𝓕 U (i + 1) (j + 1),\n  shape' := λ i j h, ...,\n  d_comp_d' := λ i j k h1 h2, ... }\n```\n\n## Ordered\n\n```lean\nstructure vec_o (n : ℕ) : Type u :=\n(to_fun : fin n → U.ι)\n(is_strict_mono : strict_mono to_fun)\n\ndef C_o.pre (n : ℕ) : Type u :=\nΠ (α : vec_o U n), 𝓕.1.obj (op $ face α)\n\ndef C_o (n : ℕ) : Ab := AddCommGroup.of (C_o.pre 𝓕 U n)\n\ndef Cech_complex_wrt_cover_ordered : cochain_complex Ab.{u} ℕ :=\n{ X := λ n, C_o 𝓕 U (n + 1),\n  d := λ i j, d_o_from_to 𝓕 U _ _,\n  shape' := λ i j h, ...,\n  d_comp_d' := λ i j k h1 h2, ... }\n\ndef Cech_Cohomology_Group_wrt_cover_ordered_nth (n : ℕ) : Ab :=\n@homological_complex.homology ℕ Ab _ _ (complex_shape.up ℕ) (abelian.has_zero_object) _ _ _ (Cech_complex_wrt_cover_ordered 𝓕 U) n\n\n\ndef zeroth_Cech_Cohomology :\n  (Cech_Cohomology_Group_wrt_cover_ordered_nth 𝓕 U 0) ≅\n  𝓕.1.obj (op ⊤) :=\nex1 𝓕 U ≪≫ ex2 𝓕 U ≪≫ ex3 𝓕 U ≪≫ \n{ hom := (ex41 _ _).to_add_monoid_hom,\n  inv := (ex41 _ _).symm.to_add_monoid_hom,\n  hom_inv_id' := begin\n    ext f σ,\n    simp only [comp_apply, add_equiv.coe_to_add_monoid_hom, add_equiv.symm_apply_apply, id_apply],\n  end,\n  inv_hom_id' := begin\n    ext f σ,\n    simp only [comp_apply, add_equiv.coe_to_add_monoid_hom, add_equiv.apply_symm_apply, id_apply],\n  end }\n```\n\n## Morphism between Ordered and unordered chain\n\nI believe this is how it should be done\n\n```lean\ndef unordered_to_ordered.to_fun (n : ℕ) :\n  C 𝓕 U n → C_o 𝓕 U n :=\nλ f σ, f σ.to_fun\n\ndef ordered_to_unordered.to_fun (n : ℕ) :\n  C_o 𝓕 U n → C 𝓕 U n := λ f α, \ndite (function.injective α)\n(λ h, match signature α with\n  | sign.zero := 0 -- this will never occur\n  | sign.pos := 𝓕.1.map (eq_to_hom (face.vec2vec_o_eq h)).op (f (vec2vec_o_of_inj h))\n  | sign.neg := - 𝓕.1.map (eq_to_hom (face.vec2vec_o_eq h)).op (f (vec2vec_o_of_inj h))\n  end)\n(λ _, 0)\n\n```\n\n## FIXME\n\n~~Currently, I accidentally implemented the ordered chain as~~\n\n```math\n\\begin{CD}\n\\mathcal F(X) @\u003e\u003e\u003e \\prod_i \\mathcal F(U_i) @\u003e\u003e\u003e \\prod_{i_0\u003ci_1} \\mathcal F(U_i\\cap U_j) @\u003e\u003e\u003e \\cdots\n\\end{CD}\n```\n\n\n~~But we should not have included the first term. Similarly for unordered.~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjaassoonn%2Fcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjaassoonn%2Fcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjaassoonn%2Fcc/lists"}