From ff4943023082f4d21cee9e54acfff4424faa98cc Mon Sep 17 00:00:00 2001 From: Mohamed Barakat Date: Sat, 26 Feb 2022 13:15:51 +0100 Subject: [PATCH] test Limit --- doc/Doc.autodoc | 6 ++++++ examples/Limit.g | 18 ++++++++++++++++++ examples/SkeletalLimit.g | 18 ++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 examples/Limit.g create mode 100644 examples/SkeletalLimit.g diff --git a/doc/Doc.autodoc b/doc/Doc.autodoc index c654fd4a..9d15c5a1 100644 --- a/doc/Doc.autodoc +++ b/doc/Doc.autodoc @@ -46,6 +46,9 @@ @Subsection Pushout @InsertChunk Pushout +@Subsection Limit +@InsertChunk Limit + @Subsection Cartesian Lambda Introduction @InsertChunk CartesianLambdaIntroduction @@ -112,6 +115,9 @@ @Subsection Skeletal Pushout @InsertChunk SkeletalPushout +@Subsection Skeletal Limit +@InsertChunk SkeletalLimit + @Subsection Skeletal Cartesian Lambda Introduction @InsertChunk SkeletalCartesianLambdaIntroduction diff --git a/examples/Limit.g b/examples/Limit.g new file mode 100644 index 00000000..c3399d4f --- /dev/null +++ b/examples/Limit.g @@ -0,0 +1,18 @@ +#! @Chunk Limit + +LoadPackage( "FinSetsForCAP" ); + +#! @Example +m := FinSet( [ 1 .. 3 ] ); +#! +f := MapOfFinSets( m, [ [ 1, 3 ], [ 2, 2 ], [ 3, 1 ] ], m ); +#! +l := Limit( [ m ], [ [ 1, f, 1 ] ] ); +#! +Display( l ); +#! [ [ 2 ] ] +e := ProjectionInFactorOfLimit( [ m ], [ [ 1, f, 1 ] ], 1 ); +#! +Display( e ); +#! [ [ [ 2 ] ], [ [ [ 2 ], 2 ] ], [ 1 .. 3 ] ] +#! @EndExample diff --git a/examples/SkeletalLimit.g b/examples/SkeletalLimit.g new file mode 100644 index 00000000..66e6aeaf --- /dev/null +++ b/examples/SkeletalLimit.g @@ -0,0 +1,18 @@ +#! @Chunk SkeletalLimit + +LoadPackage( "FinSetsForCAP" ); + +#! @Example +m := FinSet( 3 ); +#! +f := MapOfFinSets( m, [ 3, 2, 1 ], m ); +#! +l := Limit( [ m ], [ [ 1, f, 1 ] ] ); +#! +Display( l ); +#! 1 +e := ProjectionInFactorOfLimit( [ m ], [ [ 1, f, 1 ] ], 1 ); +#! +Display( e ); +#! [ 1, [ 2 ], 3 ] +#! @EndExample