Skip to content

Commit 84dd0e6

Browse files
authored
Merge pull request #1554 from zickgraf/master
Prove that the additive closure of a preadditive category has a zero object
2 parents 47ef3fe + e620727 commit 84dd0e6

File tree

3 files changed

+131
-2
lines changed

3 files changed

+131
-2
lines changed

CompilerForCAP/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "CompilerForCAP",
1212
Subtitle := "Speed up and verify categorical algorithms",
13-
Version := "2023.12-24",
13+
Version := "2023.12-25",
1414
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
1515
License := "GPL-2.0-or-later",
1616

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
gap> START_TEST( "AdditiveClosure_has_a_zero_object" );
2+
3+
#
4+
gap> LoadPackage( "FreydCategoriesForCAP", false );
5+
true
6+
7+
#
8+
gap> dummy := DummyCategory( rec(
9+
> list_of_operations_to_install := [
10+
> "IsWellDefinedForObjects",
11+
> "IsWellDefinedForMorphismsWithGivenSourceAndRange",
12+
> "IsEqualForObjects",
13+
> "IsCongruentForMorphisms",
14+
> "ZeroMorphism",
15+
> ],
16+
> properties := [
17+
> "IsAbCategory",
18+
> ],
19+
> ) );;
20+
gap> cat := AdditiveClosure( dummy );;
21+
22+
# set a human readable name
23+
gap> cat!.Name := "the additive closure of a preadditive category";;
24+
25+
#
26+
gap> LoadPackage( "CompilerForCAP", false );
27+
true
28+
29+
#
30+
gap> CapJitEnableProofAssistantMode( );
31+
32+
#
33+
gap> StopCompilationAtPrimitivelyInstalledOperationsOfCategory( dummy );
34+
35+
#
36+
gap> StateProposition( cat, "has_zero_object" );
37+
Proposition:
38+
The additive closure of a preadditive category has a zero object.
39+
40+
# ZeroObject is well-defined
41+
gap> StateNextLemma( );
42+
43+
44+
Lemma 1:
45+
In the additive closure of a preadditive category, the zero object is an objec\
46+
t:
47+
We have
48+
function ( cat )
49+
return IsWellDefinedForObjects( cat, ZeroObject( cat ) );
50+
end
51+
gap> AttestValidInputs( );
52+
We let CompilerForCAP assume that all inputs are valid.
53+
gap> AssertLemma( );
54+
With this, the claim follows. ∎
55+
56+
# UniversalMorphismIntoZeroObject is well-defined
57+
gap> StateNextLemma( );
58+
59+
60+
Lemma 2:
61+
In the additive closure of a preadditive category, the universal morphism into\
62+
the zero objects defines a morphism:
63+
For an object A we have
64+
function ( cat, A )
65+
return IsWellDefinedForMorphismsWithGivenSourceAndRange( cat, A,
66+
UniversalMorphismIntoZeroObject( cat, A ), ZeroObject( cat ) );
67+
end
68+
gap> AttestValidInputs( );
69+
We let CompilerForCAP assume that all inputs are valid.
70+
gap> AssertLemma( );
71+
With this, the claim follows. ∎
72+
73+
# UniversalMorphismIntoZeroObject is unique
74+
gap> StateNextLemma( );
75+
76+
77+
Lemma 3:
78+
In the additive closure of a preadditive category, the universal morphism into\
79+
the zero object is unique:
80+
For an object A and a morphism u : A → ZeroObject( cat ) we have
81+
function ( cat, A, u )
82+
return
83+
IsCongruentForMorphisms( cat, UniversalMorphismIntoZeroObject( cat, A ),
84+
u );
85+
end
86+
This is immediate from the construction.
87+
88+
# UniversalMorphismFromZeroObject is well-defined
89+
gap> StateNextLemma( );
90+
91+
92+
Lemma 4:
93+
In the additive closure of a preadditive category, the universal morphism from\
94+
the zero objects defines a morphism:
95+
For an object B we have
96+
function ( cat, B )
97+
return IsWellDefinedForMorphismsWithGivenSourceAndRange( cat,
98+
ZeroObject( cat ), UniversalMorphismFromZeroObject( cat, B ), B );
99+
end
100+
gap> AttestValidInputs( );
101+
We let CompilerForCAP assume that all inputs are valid.
102+
gap> AssertLemma( );
103+
With this, the claim follows. ∎
104+
105+
# UniversalMorphismFromZeroObject is unique
106+
gap> StateNextLemma( );
107+
108+
109+
Lemma 5:
110+
In the additive closure of a preadditive category, the universal morphism from\
111+
the zero object is unique:
112+
For an object B and a morphism u : ZeroObject( cat ) → B we have
113+
function ( cat, B, u )
114+
return
115+
IsCongruentForMorphisms( cat, UniversalMorphismFromZeroObject( cat, B ),
116+
u );
117+
end
118+
This is immediate from the construction.
119+
gap> AssertProposition( );
120+
121+
122+
Summing up, we have shown:
123+
The additive closure of a preadditive category has a zero object. ∎
124+
125+
#
126+
gap> CapJitDisableProofAssistantMode( );
127+
128+
#
129+
gap> STOP_TEST( "AdditiveClosure_has_a_zero_object" );

CompilerForCAP/tst/300_proof_CategoryOfRows_has_kernels.tst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ gap> k!.RingElementFilter := IsHomalgRingElement;;
1616
#
1717
gap> cat := CategoryOfRows( k );;
1818

19-
# set a humand readable name
19+
# set a human readable name
2020
gap> cat!.Name := "a category of rows over a field";;
2121

2222
#

0 commit comments

Comments
 (0)