@@ -374,6 +374,17 @@ InstallMethod( Preimage,
374
374
375
375
end );
376
376
377
+ # #
378
+ InstallMethod( ElementOfPreimage,
379
+ " for a CAP map of finite sets and a GAP object" ,
380
+ [ IsMorphismInCategoryOfFiniteSets, IsObject ] ,
381
+
382
+ function ( f, y )
383
+
384
+ return First( Source( f ), x -> IsEqualForElementsOfFinSets( f(x), y ) );
385
+
386
+ end );
387
+
377
388
# #
378
389
InstallMethod( ImageObject,
379
390
" for a CAP map of finite sets and a CAP finite set" ,
@@ -785,6 +796,43 @@ AddLift( category_of_finite_sets,
785
796
786
797
end );
787
798
799
+ # # beta \circ alpha^{-1} is again an ordinary function,
800
+ # # i.e., fibers of alpha are mapped under beta to the same element
801
+ AddIsColiftable( category_of_finite_sets,
802
+ function ( category_of_finite_sets, alpha, beta )
803
+
804
+ return ForAll( AsList( ImageObject( alpha ) ),
805
+ i -> Length( DuplicateFreeList( List( Preimage( alpha, FinSetNC( category_of_finite_sets, [ i ] ) ), beta ) ) ) = 1 );
806
+
807
+ end );
808
+
809
+ # #
810
+ AddColift( category_of_finite_sets,
811
+ function ( category_of_finite_sets, alpha, beta )
812
+ local S, T, im_alpha, elm_T, chi;
813
+
814
+ S := Range( alpha );
815
+ T := Range( beta );
816
+
817
+ im_alpha := AsList( ImageObject( alpha ) );
818
+
819
+ # # this is, e.g., implied by not IsInitial( S ), since we assume a colift exists
820
+ if not IsInitial( T ) then
821
+ elm_T := AsList( T )[ 1 ] ;
822
+ fi ;
823
+
824
+ chi :=
825
+ function ( y )
826
+ if not y in im_alpha then
827
+ return [ y, elm_T ] ;
828
+ fi ;
829
+ return [ y, beta( ElementOfPreimage( alpha, y ) ) ] ;
830
+ end ;
831
+
832
+ return MapOfFinSets( S, List( AsList( S ), chi ), T );
833
+
834
+ end );
835
+
788
836
# #
789
837
AddImageEmbedding( category_of_finite_sets,
790
838
function ( category_of_finite_sets, phi )
0 commit comments