|
| 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" ); |
0 commit comments