|
| 1 | +# SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | +# FreydCategoriesForCAP: Freyd categories - Formal (co)kernels for additive categories |
| 3 | +# |
| 4 | +# Implementations |
| 5 | +# |
| 6 | + |
| 7 | +## |
| 8 | +InstallMethod( LinearClosure, |
| 9 | + [ IsCategoryOfRows, IsGroupAsCategory ], |
| 10 | + function( rows, group_as_category ) |
| 11 | + local compare_func; |
| 12 | + |
| 13 | + compare_func := function( g, h ) return UnderlyingGroupElement( g ) < UnderlyingGroupElement( h ); end;; |
| 14 | + |
| 15 | + return LinearClosure( rows, group_as_category, compare_func ); |
| 16 | + |
| 17 | +end ); |
| 18 | + |
| 19 | +## |
| 20 | +InstallMethod( TwistedLinearClosure, |
| 21 | + [ IsCategoryOfRows, IsGroupAsCategory, IsFunction ], |
| 22 | + function( rows, category, cocycle ) |
| 23 | + local compare_func; |
| 24 | + |
| 25 | + compare_func := function( g, h ) return UnderlyingGroupElement( g ) < UnderlyingGroupElement( h ); end;; |
| 26 | + |
| 27 | + return LINEAR_CLOSURE_CONSTRUCTOR_USING_CategoryOfRows( rows, category, cocycle, true, compare_func ); |
| 28 | + |
| 29 | +end ); |
| 30 | + |
| 31 | +## |
| 32 | +InstallMethod( LinearClosure, |
| 33 | + [ IsHomalgRing, IsGroupAsCategory ], |
| 34 | + function( ring, group_as_category ) |
| 35 | + local compare_func; |
| 36 | + |
| 37 | + compare_func := function( g, h ) return UnderlyingGroupElement( g ) < UnderlyingGroupElement( h ); end;; |
| 38 | + |
| 39 | + return LinearClosure( ring, group_as_category, compare_func ); |
| 40 | + |
| 41 | +end ); |
| 42 | + |
| 43 | +## |
| 44 | +InstallMethod( TwistedLinearClosure, |
| 45 | + [ IsHomalgRing, IsGroupAsCategory, IsFunction ], |
| 46 | + function( ring, category, cocycle ) |
| 47 | + local compare_func; |
| 48 | + |
| 49 | + compare_func := function( g, h ) return UnderlyingGroupElement( g ) < UnderlyingGroupElement( h ); end;; |
| 50 | + |
| 51 | + return LINEAR_CLOSURE_CONSTRUCTOR( ring, category, cocycle, true, compare_func ); |
| 52 | + |
| 53 | +end ); |
0 commit comments