Skip to content

Commit

Permalink
Merge pull request #1471 from TKuh/manual_group_congruence
Browse files Browse the repository at this point in the history
`AddIsCongruentForMorphisms` for the groups example in the manual
  • Loading branch information
zickgraf authored Oct 3, 2023
2 parents 1ec4f9f + 920756f commit d726b24
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 2 deletions.
Binary file modified Manual/CAPManual.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions Manual/GAP_code/group_example/complete_example.g
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ grps := CreateCapCategory( "groups" );
AddPreCompose( grps, { cat, mor1, mor2 } -> mor1 * mor2 );
identity_func := { cat, grp } -> GroupHomomorphismByImages( grp, grp );
AddIdentityMorphism( grps, identity_func );
congruence_func := { cat, mor1, mor2 } -> mor1 = mor2;
AddIsCongruentForMorphisms( grps, congruence_func );
EnableAddForCategoricalOperations( grps );
Finalize( grps );
S3 := SymmetricGroup( 3 );
Expand Down
5 changes: 5 additions & 0 deletions Manual/GAP_tex/group_example/AddIsCongruentForMorphisms.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## gapcolor ##
gap> congruence_func := { cat, mor1, mor2 } -> mor1 = mor2;
function( grp ) ... end
gap> AddIsCongruentForMorphisms( grps, congruence_func );
## endgapcolor ##
20 changes: 20 additions & 0 deletions Manual/GAP_tex/group_example/AddIsCongruentForMorphisms.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
\documentclass[12pt]{amsart}
\usepackage{graphicx}
\usepackage{a4wide}
\usepackage{amssymb}
\usepackage{xcolor}
\usepackage{fancyvrb}

\title{GAP Code}
\author{}

\begin{document}
\maketitle

\begin{Verbatim}[commandchars=!@\%,frame=single]
!color@blue%@gap>%!color@red%@ congruence_func := { cat, mor1, mor2 } -> mor1 = mor2;%
function( grp ) ... end
!color@blue%@gap>%!color@red%@ AddIsCongruentForMorphisms( grps, congruence_func );%
\end{Verbatim}

\end{document}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
\begin{Verbatim}[commandchars=!@\%,frame=single]
!color@blue%@gap>%!color@red%@ congruence_func := { cat, mor1, mor2 } -> mor1 = mor2;%
function( grp ) ... end
!color@blue%@gap>%!color@red%@ AddIsCongruentForMorphisms( grps, congruence_func );%
\end{Verbatim}

2 changes: 1 addition & 1 deletion Manual/GAP_tex/group_example/AddPreCompose.g
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## gapcolor ##
gap> AddPreCompose( grps, \* );
gap> AddPreCompose( grps, { cat, mor1, mor2 } -> mor1 * mor2 );
## endgapcolor ##
2 changes: 1 addition & 1 deletion Manual/GAP_tex/group_example/AddPreCompose.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
\maketitle

\begin{Verbatim}[commandchars=!@\%,frame=single]
!color@blue%@gap>%!color@red%@ AddPreCompose( grps, \* );%
!color@blue%@gap>%!color@red%@ AddPreCompose( grps, { cat, mor1, mor2 } -> mor1 * mor2 );%
\end{Verbatim}

\end{document}
4 changes: 4 additions & 0 deletions Manual/Tutorial.tex
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ \section{The category of groups}\label{section:groups}
\input{GAP_tex/group_example/AddIdentityMorphism_main}

The command used above exactly creates the identity morphism of a group.
Additionally, we want to decide the mathematical equality of morphisms, which in CAP is called ``congruence of morphisms''.

\input{GAP_tex/group_example/AddIsCongruentForMorphisms_main}

Next, we tell \CapPkg that every output of a basic operation for the category \texttt{grps} should automatically be added to the category \texttt{grps}.
This step is necessary since in this example, we simply integrate already existing algorithms and data structures of \GAP to
\CapPkg's infrastructure.
Expand Down

0 comments on commit d726b24

Please sign in to comment.