-
Notifications
You must be signed in to change notification settings - Fork 199
Add additive categories infrastructure #2304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Extracting AdditiveCategories.v from stable categories formalization (HoTT#2288). **Provides:** - `AdditiveCategory`: Categories with zero objects, biproducts, and abelian group structure on hom-sets - Helper functions for accessing biproduct components - Universal property operations with uniqueness (both product and coproduct) - `AdditiveFunctor`: Preserves zero objects, biproducts, and morphism addition - Main theorem: `additive_functor_preserves_zero_morphisms` - Identity and composition of additive functors **Changes from original:** - Fixed imports (removed non-existent ZeroMorphismLemmas.v) - Changed to `Class` with implicit `ZeroObject` instance - Added complete abelian group structure on hom-sets: - `add_morphism` operation with commutativity, associativity - Zero morphism as identity, existence of inverses - Bilinearity of composition (distributivity) - Removed 8 unused wrapper lemmas (e.g., `add_beta_l`, `add_mixed_r`) - Added `add_prod_unique` for product/coproduct duality - Updated transport lemma names to match Core.v - Applied HoTT style conventions Depends on: HoTT#2293 (ZeroObjects), HoTT#2300 (Biproducts) @jdchristensen The main new addition (no pun intended) is the abelian group structure on hom-sets, which makes this a proper additive category (not just a category with zero objects and biproducts). Also I have probably overlooked a few things. Will be looking over again, but wanted to get the PR submitted.
- Add addition_via_biproduct_axiom to AdditiveCategory class - Add new AdditionViaBiproducts section with: - diagonal: X → X⊕X - codiagonal: X⊕X → X - biproduct_mor: general biproduct morphism (f⊕g) - addition_via_biproducts theorem - Shows our abstract add_morphism equals the standard definition ∇∘(f⊕g)∘Δ from category theory
|
Thanks @CharlesCNorton ! I just pushed a commit that shows that |
| Class AdditiveCategory := { | ||
| cat : PreCategory; | ||
| add_zero :: ZeroObject cat; | ||
| add_biproduct : forall (X Y : object cat), Biproduct X Y; |
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.
I'm confused by this class. The three fields above are already enough to show that cat has a unique enrichment over commutative monoids. That means that eight of the remaining nine fields are redundant. You only need to assume that inverses exist.
Here's an idea: Have a file, maybe called "SemiAdditive.v", which has a class with just the above three fields. In that file, prove that in every SemiAdditive category, the hom sets are commutative monoids in a way compatible with composition. It's probably best to use IsCommutativeMonoid from Classes/interfaces/abstract_algebra.v, which should then give you access to lots of lemmas (and notations) that hold for commutative monoids. Then, in Additive.v, you add the axiom that the commutative monoid structure defined in SemiAdditive.v has inverses. Then you can in fact say that the hom sets are abelian groups, using Algebra/AbGroups/AbelianGroup.v.
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.
I'm confused by this class. The three fields above are already enough to show that
cathas a unique enrichment over commutative monoids. That means that eight of the remaining nine fields are redundant. You only need to assume that inverses exist.Here's an idea: Have a file, maybe called "SemiAdditive.v", which has a class with just the above three fields. In that file, prove that in every SemiAdditive category, the hom sets are commutative monoids in a way compatible with composition. It's probably best to use
IsCommutativeMonoidfrom Classes/interfaces/abstract_algebra.v, which should then give you access to lots of lemmas (and notations) that hold for commutative monoids. Then, in Additive.v, you add the axiom that the commutative monoid structure defined in SemiAdditive.v has inverses. Then you can in fact say that the hom sets are abelian groups, using Algebra/AbGroups/AbelianGroup.v.
Just checking in - working on this, but it's taking some sweat. Will put a PR in soon.
Extracting SemiAdditive.v from additive categories work per PR HoTT#2304 review. **Provides:** - `SemiAdditiveCategory`: Class with just cat, zero object, and biproducts - Derives `IsCommutativeMonoid` structure on morphisms using biproducts - Addition defined as: f + g = ∇ ∘ (f ⊕ g) ∘ Δ - Proves identity laws, commutativity, associativity from biproduct axioms - Bilinearity of composition (distributivity) **Note:** The file is almost 1000 lines), especially the associativity proof. This was the only way I could get it to work - would very much appreciate help simplifying and identifying which helper lemmas can be removed. The associativity proof in particular requires many intermediate lemmas about how biproducts interact. It took me an entire week of 16 hour days to get here, but I assume there is a much more elegant method. Addresses review feedback from HoTT#2304. Next step is to update AdditiveCategories.v to build on this, adding only the inverse axiom.
Extracting AdditiveCategories.v from stable categories formalization (#2288).
Provides:
AdditiveCategory: Categories with zero objects, biproducts, and abelian group structure on hom-setsAdditiveFunctor: Preserves zero objects, biproducts, and morphism addition (newpreserves_additionfield)additive_functor_preserves_zero_morphismspreserves_addition)Changes from original:
Classwith implicitZeroObjectinstanceadd_morphismoperation with commutativity, associativityadd_beta_l,add_mixed_r)add_prod_uniquefor product/coproduct dualitytransport_compose_both_inverse→transport_compose_middle)Depends on: #2293 (ZeroObjects), #2300 (Biproducts)
@jdchristensen The main new addition (no pun intended) is the abelian group structure on hom-sets, which makes this a proper additive category (not just a category with zero objects and biproducts). Also I have probably overlooked a few things. Will be looking over again, but wanted to get the PR submitted.