Skip to content

Commit c98b767

Browse files
added SubobjectClassifier for SkeletalFinSets
1 parent dba1952 commit c98b767

File tree

4 files changed

+68
-1
lines changed

4 files changed

+68
-1
lines changed

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 := "FinSetsForCAP",
1212
Subtitle := "The elementary topos of (skeletal) finite sets",
13-
Version := "2020.11-12",
13+
Version := "2020.11-13",
1414

1515
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
1616
License := "GPL-2.0-or-later",

doc/Doc.autodoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,6 @@
119119

120120
@Subsection Skeletal topos properties
121121
@InsertChunk SkeletalTopos
122+
123+
@Subsection Skeletal Subobject Classifier
124+
@InsertChunk SkeletalSubobjectClassifier
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#! @Chunk SkeletalSubobjectClassifier
2+
3+
LoadPackage( "FinSetsForCAP" );
4+
5+
# Below we see that the internal logic
6+
# of the category SkeletalFinSets is classical logic,
7+
# i.e., the topos SkeletalFinSets is Boolean.
8+
9+
#! @Example
10+
Display( SubobjectClassifier( SkeletalFinSets ) );
11+
#! 2
12+
Display( TruthMorphismOfTrue( SkeletalFinSets ) );
13+
#! [ 1, [ 1 ], 2 ]
14+
Display( TruthMorphismOfFalse( SkeletalFinSets ) );
15+
#! [ 1, [ 2 ], 2 ]
16+
Display( TruthMorphismOfNot( SkeletalFinSets ) );
17+
#! [ 2, [ 2, 1 ], 2 ]
18+
Display( CartesianSquareOfSubobjectClassifier( SkeletalFinSets ) );
19+
#! 4
20+
Display( TruthMorphismOfAnd( SkeletalFinSets ) );
21+
#! [ 4, [ 1, 2, 2, 2 ], 2 ]
22+
Display( TruthMorphismOfOr( SkeletalFinSets ) );
23+
#! [ 4, [ 1, 1, 1, 2 ], 2 ]
24+
Display( TruthMorphismOfImplies( SkeletalFinSets ) );
25+
#! [ 4, [ 1, 2, 1, 1 ], 2 ]
26+
S := FinSet( 5 );
27+
#! <An object in SkeletalFinSets>
28+
A := FinSet( 2 );
29+
#! <An object in SkeletalFinSets>
30+
m := MapOfFinSets( A, [ 1, 5 ], S );
31+
#! <A morphism in SkeletalFinSets>
32+
Display( ClassifyingMorphismOfSubobject( m ) );
33+
#! [ 5, [ 1, 2, 2, 2, 1 ], 2 ]
34+
#! @EndExample

gap/SkeletalFinSetsForCAP.gi

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,36 @@ AddCartesianEvaluationMorphismWithGivenSource( SkeletalFinSets,
777777

778778
end );
779779

780+
##
781+
AddSubobjectClassifier( SkeletalFinSets,
782+
function ( cat )
783+
784+
return FinSet( cat, 2 );
785+
786+
end );
787+
788+
##
789+
AddClassifyingMorphismOfSubobjectWithGivenSubobjectClassifier( SkeletalFinSets,
790+
function ( cat, monomorphism, Omega )
791+
local range, images;
792+
793+
range := Range( monomorphism );
794+
795+
images := List( range,
796+
function ( x )
797+
798+
if x in AsList( monomorphism ) then
799+
return 1;
800+
fi;
801+
802+
return 2;
803+
804+
end );
805+
806+
return MapOfFinSets( range, images, Omega );
807+
808+
end );
809+
780810
end );
781811

782812
##

0 commit comments

Comments
 (0)