Skip to content

Commit

Permalink
Merge pull request #731 from zickgraf/misc
Browse files Browse the repository at this point in the history
Miscellaneous changes
  • Loading branch information
zickgraf authored Oct 26, 2021
2 parents c26875a + 84f819b commit f9ee7cb
Show file tree
Hide file tree
Showing 62 changed files with 1,507 additions and 838 deletions.
34 changes: 34 additions & 0 deletions ActionsForCAP/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/doc/chap*.html
/doc/chap*.txt
/doc/*.css
/doc/*.js
/doc/chooser.html
/doc/*.aux
/doc/*.bbl
/doc/*.blg
/doc/*.brf
/doc/*.idx
/doc/*.ilg
/doc/*.ind
/doc/*.lab
/doc/*.log
/doc/*.out
/doc/*.pnr
/doc/*.six
/doc/*.tex
/doc/*.toc
/doc/manual.pdf
/doc/_*.xml

/bin/
/gen/
/Makefile

/tmp/
/gh-pages/

/coverage.json
/doc/*.xml
/doc_tmp/
/stats
/tst/actionsforcap*.tst
339 changes: 339 additions & 0 deletions ActionsForCAP/LICENSE

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions ActionsForCAP/PackageInfo.g
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ActionsForCAP: Actions and Coactions for CAP
#
# This file contains package meta data. For additional information on
Expand All @@ -11,15 +11,7 @@ SetPackageInfo( rec(
PackageName := "ActionsForCAP",
Subtitle := "Actions and Coactions for CAP",

Version := Maximum( [
"2019.09-16", ## Mohamed's version
## this line prevents merge conflicts
"2015.08-19", ## Sebas' version
## this line prevents merge conflicts
"2017.01-11", ## Sepp's version
## this line prevents merge conflicts
"2020.10-01", ## Fabian's version
] ),
Version := "2021.10-01",

Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
License := "GPL-2.0-or-later",
Expand Down
File renamed without changes.
6 changes: 2 additions & 4 deletions ActionsForCAP/doc/clean
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/bash
rm -f *.{six,aux,lab,log,dvi,ps,pdf,bbl,ilg,ind,idx,out,html,tex,pnr,txt,blg,toc,six,brf,xml,xml.bib,css,js}
rm -f ../maketest.g ../VERSION ../public_html.version

#!/bin/sh
rm -f *.{aux,bbl,blg,brf,css,html,idx,ilg,ind,js,lab,log,out,pdf,pnr,six,tex,toc,txt,xml,xml.bib}
24 changes: 19 additions & 5 deletions ActionsForCAP/examples/ActionsTest.g
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
LoadPackage( "ActionsForCAP" );
LoadPackage( "LinearAlgebraForCAP" );
Q := HomalgFieldOfRationals();
vec := MatrixCategory( Q );
u := TensorUnit( vec );
#! @Chapter Examples and tests

#! @Section Tests

#! @Example

LoadPackage( "ActionsForCAP", false );
#! true
LoadPackage( "LinearAlgebraForCAP", false );
#! true

Q := HomalgFieldOfRationals();;
vec := MatrixCategory( Q );;
u := TensorUnit( vec );;
cat := LeftActionsCategory( u );
#! Category of left actions of <A vector space object over Q of dimension 1>
V := VectorSpaceObject( 2, Q );
#! <A vector space object over Q of dimension 2>
alpha := VectorSpaceMorphism( TensorProductOnObjects( u, V ), HomalgMatrix( [ [ 0, 1 ], [ -1, 0 ] ], 2, 2, Q ), V );
#! <A morphism in Category of matrices over Q>

#! @EndExample
121 changes: 55 additions & 66 deletions ActionsForCAP/examples/CategoryWithAttributesTest.g
Original file line number Diff line number Diff line change
@@ -1,116 +1,105 @@
LoadPackage( "ActionsForCAP" );
LoadPackage( "LinearAlgebraForCAP" );
#! @Chapter Examples and tests

#! @Section Tests

#! @Example

LoadPackage( "ActionsForCAP", false );
#! true
LoadPackage( "LinearAlgebraForCAP", false );
#! true

## Category and Type of Objects
##
DeclareCategory( "IsObjectWithEndo",
IsCategoryWithAttributesObject );
IsCategoryWithAttributesObject );;

DeclareRepresentation( "IsObjectWithEndoRep",
IsObjectWithEndo and IsAttributeStoringRep,
[ ] );
[ ] );;

BindGlobal( "TheFamilyOfObjectsWithEndo",
NewFamily( "TheFamilyOfObjectsWithEndo" ) );
NewFamily( "TheFamilyOfObjectsWithEndo" ) );;

BindGlobal( "TheTypeOfObjectsWithEndo",
NewType( TheFamilyOfObjectsWithEndo,
IsObjectWithEndoRep ) );
IsObjectWithEndoRep ) );;

## Category and Type of Morphisms
##
DeclareCategory( "IsMorphismWithEndo",
IsCategoryWithAttributesMorphism );
IsCategoryWithAttributesMorphism );;

DeclareRepresentation( "IsMorphismWithEndoRep",
IsMorphismWithEndo and IsAttributeStoringRep,
[ ] );
[ ] );;

BindGlobal( "TheFamilyOfMorphismsWithEndo",
NewFamily( "TheFamilyOfMorphismsWithEndo" ) );
NewFamily( "TheFamilyOfMorphismsWithEndo" ) );;

BindGlobal( "TheTypeOfMorphismsWithEndo",
NewType( TheFamilyOfMorphismsWithEndo,
IsMorphismWithEndoRep ) );
IsMorphismWithEndoRep ) );;


##
Q := HomalgFieldOfRationals();
vec := MatrixCategory( Q );

category_with_endo_record := rec(
underlying_category := vec,
object_type := TheTypeOfObjectsWithEndo,
morphism_type := TheTypeOfMorphismsWithEndo,

ZeroObject :=
Q := HomalgFieldOfRationals();;
vec := MatrixCategory( Q );;

category_with_endo_record := rec( );;

category_with_endo_record.underlying_category := vec;;
category_with_endo_record.object_type := TheTypeOfObjectsWithEndo;;
category_with_endo_record.morphism_type := TheTypeOfMorphismsWithEndo;;

category_with_endo_record.ZeroObject :=
function( zero_object )

return [ IdentityMorphism( zero_object ) ];

end,

DirectSum :=
return [ IdentityMorphism( zero_object ) ]; end;;

category_with_endo_record.DirectSum :=
function( obj_list, underlying_direct_sum )
local attr_list;

attr_list := List( obj_list, obj -> ObjectAttributesAsList( obj )[1] );

return [ DirectSumFunctorial( attr_list ) ];
end,

Lift :=
return [ DirectSumFunctorial( List( obj_list, obj -> ObjectAttributesAsList( obj )[1] ) ) ]; end;;

category_with_endo_record.Lift :=
function( mono, range )
local range_endo, composition;

range_endo := ObjectAttributesAsList( range )[1];

composition := PreCompose( mono, range_endo );

return [ LiftAlongMonomorphism( mono, composition ) ];

end,

Colift :=
return [ LiftAlongMonomorphism( mono, PreCompose( mono, ObjectAttributesAsList( range )[1] ) ) ]; end;;

category_with_endo_record.Colift :=
function( epi, source )
local source_endo, composition;

source_endo := ObjectAttributesAsList( source )[1];

composition := PreCompose( source_endo, epi );

return [ ColiftAlongEpimorphism( epi, composition ) ];
end,

TensorProductOnObjects :=
return [ ColiftAlongEpimorphism( epi, PreCompose( ObjectAttributesAsList( source )[1], epi ) ) ]; end;;

category_with_endo_record.TensorProductOnObjects :=
function( obj1, obj2, underlying_tensor_product )
local endo1, endo2;

endo1 := ObjectAttributesAsList( obj1 )[1];

endo2 := ObjectAttributesAsList( obj2 )[1];

return [ TensorProductOnMorphisms( endo1, endo2 ) ];

end,

TensorUnit :=
return [ TensorProductOnMorphisms( ObjectAttributesAsList( obj1 )[1], ObjectAttributesAsList( obj2 )[1] ) ]; end;;

category_with_endo_record.TensorUnit :=
function( unit )

return [ IdentityMorphism( unit ) ];

end
);

return [ IdentityMorphism( unit ) ]; end;;

triple := EnhancementWithAttributes( category_with_endo_record );
triple := EnhancementWithAttributes( category_with_endo_record );;
endo_cat := triple[1];
#! Category with attributes of Category of matrices over Q
## not finalized yet
ObjConstr := triple[2];
#! function( object, attributes ) ... end

V := VectorSpaceObject( 3, Q );
#! <A vector space object over Q of dimension 3>
endV := IdentityMorphism( V );
#! <An identity morphism in Category of matrices over Q>
VwithEndo := ObjConstr( V, [ endV ] );
#! <An object in Category with attributes of Category of matrices over Q>

MorConstr := triple[3];
#! function( source, morphism, range ) ... end

alpha := MorConstr( VwithEndo, VectorSpaceMorphism( V, HomalgMatrix( [ [ 1, -1, 1 ], [ 1, 1, 1 ], [ 0, 0 , 0 ] ], 3, 3, Q ), V ), VwithEndo );
#! <A morphism in Category with attributes of Category of matrices over Q>

#! @EndExample
Loading

0 comments on commit f9ee7cb

Please sign in to comment.