-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Categories of (non-negatively graded) chain complexes
- Loading branch information
Showing
2 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
src/Experiments/Category/Instance/NonNegativeChainComplexes.agda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{-# OPTIONS --without-K --safe #-} | ||
|
||
|
||
open import Categories.Category.Core | ||
open import Experiments.Category.Abelian | ||
|
||
module Experiments.Category.Instance.NonNegativeChainComplexes {o ℓ e} {𝒜 : Category o ℓ e} (abelian : Abelian 𝒜) where | ||
|
||
open import Level | ||
|
||
open import Data.Nat using (ℕ) | ||
|
||
open import Categories.Morphism.Reasoning 𝒜 | ||
|
||
open Category 𝒜 | ||
open Abelian abelian | ||
|
||
open HomReasoning | ||
open Equiv | ||
|
||
record ChainComplex : Set (o ⊔ ℓ ⊔ e) where | ||
field | ||
Chain : ℕ → Obj | ||
boundary : ∀ (n : ℕ) → Chain (ℕ.suc n) ⇒ Chain n | ||
bounary-zero : ∀ {n} → boundary n ∘ boundary (ℕ.suc n) ≈ zero⇒ | ||
|
||
record ChainMap (V W : ChainComplex) : Set (ℓ ⊔ e) where | ||
private | ||
module V = ChainComplex V | ||
module W = ChainComplex W | ||
field | ||
hom : ∀ (n : ℕ) → V.Chain n ⇒ W.Chain n | ||
commute : ∀ {n : ℕ} → (hom n ∘ V.boundary n) ≈ (W.boundary n ∘ hom (ℕ.suc n)) | ||
|
||
ChainComplexes : Category (o ⊔ ℓ ⊔ e) (ℓ ⊔ e) e | ||
ChainComplexes = record | ||
{ Obj = ChainComplex | ||
; _⇒_ = ChainMap | ||
; _≈_ = λ f g → | ||
let module f = ChainMap f | ||
module g = ChainMap g | ||
in ∀ {n : ℕ} → f.hom n ≈ g.hom n | ||
; id = record | ||
{ hom = λ _ → id | ||
; commute = id-comm-sym | ||
} | ||
; _∘_ = λ {U} {V} {W} f g → | ||
let module U = ChainComplex U | ||
module V = ChainComplex V | ||
module W = ChainComplex W | ||
module f = ChainMap f | ||
module g = ChainMap g | ||
in record | ||
{ hom = λ n → f.hom n ∘ g.hom n | ||
; commute = λ {n} → begin | ||
(f.hom n ∘ g.hom n) ∘ U.boundary n ≈⟨ pullʳ g.commute ⟩ | ||
f.hom n ∘ V.boundary n ∘ g.hom (ℕ.suc n) ≈⟨ extendʳ f.commute ⟩ | ||
W.boundary n ∘ f.hom (ℕ.suc n) ∘ g.hom (ℕ.suc n) ∎ | ||
} | ||
; assoc = assoc | ||
; sym-assoc = sym-assoc | ||
; identityˡ = identityˡ | ||
; identityʳ = identityʳ | ||
; identity² = identity² | ||
; equiv = record | ||
{ refl = refl | ||
; sym = λ eq → sym eq | ||
; trans = λ eq₁ eq₂ → trans eq₁ eq₂ | ||
} | ||
; ∘-resp-≈ = λ eq₁ eq₂ → ∘-resp-≈ eq₁ eq₂ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6fe3c13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My feeling is that
ChainComplex
belongs inCategories.Data.ChainComplex
and its morphisms asCategories.Data.ChainComplex.Morphism
where both id and composition should be defined. Then theCategory
instance you have would belong exactly where you have it.6fe3c13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable to me. I haven't been thinking to much about organization here, will clean when I start chunking work off of it.