Skip to content

Commit 8723a07

Browse files
AddCartesianCoevaluationMorphismWithGivenRange( SkeletalFinSets, ... )
1 parent e594f0a commit 8723a07

File tree

6 files changed

+84
-1
lines changed

6 files changed

+84
-1
lines changed

doc/Doc.autodoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@
112112
@Subsection Skeletal Pushout
113113
@InsertChunk SkeletalPushout
114114

115+
@Subsection Skeletal Cartesian Lambda Introduction
116+
@InsertChunk SkeletalCartesianLambdaIntroduction
117+
115118
@Subsection Skeletal Lift
116119
@InsertChunk SkeletalLift
117120

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#! @Chunk SkeletalCartesianLambdaIntroduction
2+
3+
LoadPackage( "FinSetsForCAP" );
4+
5+
#! @Example
6+
S := FinSet( 3 );
7+
#! <An object in SkeletalFinSets>
8+
R := FinSet( 2 );
9+
#! <An object in SkeletalFinSets>
10+
f := MapOfFinSets( S, [ 2, 2, 1 ], R );
11+
#! <A morphism in SkeletalFinSets>
12+
IsWellDefined( f );
13+
#! true
14+
T := TerminalObject( SkeletalFinSets );
15+
#! <An object in SkeletalFinSets>
16+
IsTerminal( T );
17+
#! true
18+
lf := CartesianLambdaIntroduction( f );
19+
#! <A split monomorphism in SkeletalFinSets>
20+
Source( lf ) = T;
21+
#! true
22+
Display( Range( lf ) );
23+
#! 8
24+
Display( lf );
25+
#! [ 1, [ 7 ], 8 ]
26+
elf := CartesianLambdaElimination( S, R, lf );
27+
#! <A morphism in SkeletalFinSets>
28+
elf = f;
29+
#! true
30+
#! @EndExample

examples/SkeletalTopos.g

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,20 @@ CartesianBraidingInverse( M, N );;
3131
ExponentialOnObjects( M, N );;
3232
ExponentialOnMorphisms( f, g );;
3333
CartesianEvaluationMorphism( M, N );;
34+
CartesianCoevaluationMorphism( M, N );;
35+
DirectProductToExponentialAdjunctionMap( M, N,
36+
UniversalMorphismIntoTerminalObject( DirectProduct( M, N ) )
37+
);;
38+
ExponentialToDirectProductAdjunctionMap( M, N,
39+
UniversalMorphismFromInitialObject( ExponentialOnObjects( M, N ) )
40+
);;
41+
42+
M := FinSet( 2 );;
43+
N := FinSet( 2 );;
44+
P := FinSet( 1 );;
45+
Q := FinSet( 2 );;
46+
CartesianPreComposeMorphism( M, N, P );;
47+
CartesianPostComposeMorphism( M, N, P );;
48+
DirectProductExponentialCompatibilityMorphism( [ M, N, P, Q ] );;
3449

3550
#! @EndExample

examples/Topos.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ P := FinSet( [ "*" ] );;
4545
Q := FinSet( [ "§", "&" ] );;
4646
CartesianPreComposeMorphism( M, N, P );;
4747
CartesianPostComposeMorphism( M, N, P );;
48-
DirectProductExponentialCompatibilityMorphism( [ M, N, P, Q ] );;
48+
DirectProductExponentialCompatibilityMorphism( [ M, N, P, Q ] );;
4949

5050
#! @EndExample

gap/SkeletalFinSetsForCAP.gi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,18 @@ AddCartesianEvaluationMorphismWithGivenSource( SkeletalFinSets,
841841

842842
end );
843843

844+
##
845+
AddCartesianCoevaluationMorphismWithGivenRange( SkeletalFinSets,
846+
function ( cat, M, N, HN_MxN )
847+
local m, n;
848+
849+
m := Length( M );
850+
n := Length( N );
851+
852+
return MapOfFinSets( M, List( [ 0 .. m - 1 ], i -> 1 + Sum( [ 0 .. n - 1 ], j -> ( i * n + j ) * (m*n)^(n - j - 1) ) ), HN_MxN );
853+
854+
end );
855+
844856
##
845857
AddSubobjectClassifier( SkeletalFinSets,
846858
function ( cat )

gap/precompiled_categories/CategoryOfSkeletalFinSetsPrecompiled.gi

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,29 @@ end
2222

2323
, 100 );
2424

25+
##
26+
AddCartesianCoevaluationMorphismWithGivenRange( cat,
27+
28+
########
29+
function ( cat_1, a_1, b_1, r_1 )
30+
local hoisted_1_1, hoisted_2_1, hoisted_3_1, deduped_4_1, deduped_5_1;
31+
deduped_5_1 := Length( b_1 );
32+
deduped_4_1 := Length( a_1 );
33+
hoisted_3_1 := [ 0 .. deduped_5_1 - 1 ];
34+
hoisted_2_1 := deduped_4_1 * deduped_5_1;
35+
hoisted_1_1 := deduped_5_1;
36+
return MapOfFinSets( a_1, List( [ 0 .. deduped_4_1 - 1 ], function ( i_2 )
37+
local hoisted_1_2;
38+
hoisted_1_2 := i_2 * hoisted_1_1;
39+
return 1 + Sum( hoisted_3_1, function ( j_3 )
40+
return (hoisted_1_2 + j_3) * hoisted_2_1 ^ (hoisted_1_1 - j_3 - 1);
41+
end );
42+
end ), r_1 );
43+
end
44+
########
45+
46+
, 100 );
47+
2548
##
2649
AddCartesianEvaluationMorphismWithGivenSource( cat,
2750

0 commit comments

Comments
 (0)