/usr/share/gap/lib/monoid.gd is in gap-libs 4r6p5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | #############################################################################
##
#W monoid.gd GAP library Thomas Breuer
##
##
#Y Copyright (C) 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany
#Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland
#Y Copyright (C) 2002 The GAP Group
##
## This file contains the declaration of operations for monoids.
##
#############################################################################
##
#P IsMonoid( <D> )
##
## <#GAPDoc Label="IsMonoid">
## <ManSection>
## <Prop Name="IsMonoid" Arg='D'/>
##
## <Description>
## A <E>monoid</E> is a magma-with-one (see <Ref Chap="Magmas"/>)
## with associative multiplication.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareSynonymAttr( "IsMonoid", IsMagmaWithOne and IsAssociative );
#############################################################################
##
#F Monoid( <gen1>, <gen2> ... )
#F Monoid( <gens> )
#F Monoid( <gens>, <id> )
##
## <#GAPDoc Label="Monoid">
## <ManSection>
## <Heading>Monoid</Heading>
## <Func Name="Monoid" Arg='gen1, gen2 ...'
## Label="for various generators"/>
## <Func Name="Monoid" Arg='gens[, id]' Label="for a list"/>
##
## <Description>
## In the first form, <Ref Func="Monoid" Label="for various generators"/>
## returns the monoid generated by the arguments <A>gen1</A>, <A>gen2</A>,
## <M>\ldots</M>,
## that is, the closure of these elements under multiplication and taking
## the 0-th power.
## In the second form, <Ref Func="Monoid" Label="for a list"/> returns
## the monoid generated by the elements in the homogeneous list <A>gens</A>;
## a square matrix as only argument is treated as one generator,
## not as a list of generators.
## In the second form, the identity element <A>id</A> may be given as the
## second argument.
## <P/>
## It is <E>not</E> checked whether the underlying multiplication is
## associative, use <Ref Func="MagmaWithOne"/> and
## <Ref Func="IsAssociative"/>
## if you want to check whether a magma-with-one is in fact a monoid.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "Monoid" );
#############################################################################
##
#F Submonoid( <M>, <gens> ) . . . . . . submonoid of <M> generated by <gens>
#F SubmonoidNC( <M>, <gens> )
##
## <#GAPDoc Label="Submonoid">
## <ManSection>
## <Func Name="Submonoid" Arg='M, gens'/>
## <Func Name="SubmonoidNC" Arg='M, gens'/>
##
## <Description>
## are just synonyms of <Ref Func="SubmagmaWithOne"/>
## and <Ref Func="SubmagmaWithOneNC"/>, respectively.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareSynonym( "Submonoid", SubmagmaWithOne );
DeclareSynonym( "SubmonoidNC", SubmagmaWithOneNC );
#############################################################################
##
#O MonoidByGenerators( <gens>[, <one>] ) . . . . monoid generated by <gens>
##
## <#GAPDoc Label="MonoidByGenerators">
## <ManSection>
## <Oper Name="MonoidByGenerators" Arg='gens[, one]'/>
##
## <Description>
## is the underlying operation of <Ref Func="Monoid" Label="for a list"/>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "MonoidByGenerators", [ IsCollection ] );
#############################################################################
##
#A AsMonoid( <C> ) . . . . . . . . . . . . collection <C> regarded as monoid
##
## <#GAPDoc Label="AsMonoid">
## <ManSection>
## <Attr Name="AsMonoid" Arg='C'/>
##
## <Description>
## If <A>C</A> is a collection whose elements form a monoid
## (see <Ref Func="IsMonoid"/>)
## then <Ref Func="AsMonoid"/> returns this monoid.
## Otherwise <K>fail</K> is returned.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "AsMonoid", IsCollection );
#############################################################################
##
#O AsSubmonoid( <D>, <C> )
##
## <#GAPDoc Label="AsSubmonoid">
## <ManSection>
## <Oper Name="AsSubmonoid" Arg='D, C'/>
##
## <Description>
## Let <A>D</A> be a domain and <A>C</A> a collection.
## If <A>C</A> is a subset of <A>D</A> that forms a monoid then
## <Ref Func="AsSubmonoid"/>
## returns this monoid, with parent <A>D</A>.
## Otherwise <K>fail</K> is returned.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "AsSubmonoid", [ IsDomain, IsCollection ] );
#############################################################################
##
#A GeneratorsOfMonoid( <M> ) . . . . . . . monoid generators of monoid <M>
##
## <#GAPDoc Label="GeneratorsOfMonoid">
## <ManSection>
## <Attr Name="GeneratorsOfMonoid" Arg='M'/>
##
## <Description>
## Monoid generators of a monoid <A>M</A> are the same as
## magma-with-one generators
## (see <Ref Func="GeneratorsOfMagmaWithOne"/>).
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareSynonymAttr( "GeneratorsOfMonoid", GeneratorsOfMagmaWithOne );
#############################################################################
##
#A TrivialSubmonoid( <M> ) . . . . . . . . . trivial submonoid of monoid <M>
##
## <#GAPDoc Label="TrivialSubmonoid">
## <ManSection>
## <Attr Name="TrivialSubmonoid" Arg='M'/>
##
## <Description>
## is just a synonym for <Ref Func="TrivialSubmagmaWithOne"/>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareSynonymAttr( "TrivialSubmonoid", TrivialSubmagmaWithOne );
#############################################################################
##
#F FreeMonoid( [<wfilt>,]<rank> )
#F FreeMonoid( [<wfilt>,]<rank>, <name> )
#F FreeMonoid( [<wfilt>,]<name1>, <name2>, ... )
#F FreeMonoid( [<wfilt>,]<names> )
#F FreeMonoid( [<wfilt>,]infinity, <name>, <init> )
##
## <#GAPDoc Label="FreeMonoid">
## <ManSection>
## <Heading>FreeMonoid</Heading>
## <Func Name="FreeMonoid" Arg='[wfilt, ]rank[, name]'
## Label="for given rank"/>
## <Func Name="FreeMonoid" Arg='[wfilt, ]name1, name2, ...'
## Label="for various names"/>
## <Func Name="FreeMonoid" Arg='[wfilt, ]names'
## Label="for a list of names"/>
## <Func Name="FreeMonoid" Arg='[wfilt, ]infinity, name, init'
## Label="for infinitely many generators"/>
##
## <Description>
## Called with a positive integer <A>rank</A>,
## <Ref Func="FreeMonoid" Label="for given rank"/> returns
## a free monoid on <A>rank</A> generators.
## If the optional argument <A>name</A> is given then the generators are
## printed as <A>name</A><C>1</C>, <A>name</A><C>2</C> etc.,
## that is, each name is the concatenation of the string <A>name</A> and an
## integer from <C>1</C> to <A>range</A>.
## The default for <A>name</A> is the string <C>"m"</C>.
## <P/>
## Called in the second form,
## <Ref Func="FreeMonoid" Label="for various names"/> returns
## a free monoid on as many generators as arguments, printed as
## <A>name1</A>, <A>name2</A> etc.
## <P/>
## Called in the third form,
## <Ref Func="FreeMonoid" Label="for a list of names"/> returns
## a free monoid on as many generators as the length of the list
## <A>names</A>, the <M>i</M>-th generator being printed as
## <A>names</A><C>[</C><M>i</M><C>]</C>.
## <P/>
## Called in the fourth form,
## <Ref Func="FreeMonoid" Label="for infinitely many generators"/>
## returns a free monoid on infinitely many generators, where the first
## generators are printed by the names in the list <A>init</A>,
## and the other generators by <A>name</A> and an appended number.
## <P/>
## If the extra argument <A>wfilt</A> is given, it must be either
## <Ref Func="IsSyllableWordsFamily"/> or <Ref Func="IsLetterWordsFamily"/>
## or <Ref Func="IsWLetterWordsFamily"/> or
## <Ref Func="IsBLetterWordsFamily"/>.
## This filter then specifies the representation used for the elements of
## the free monoid
## (see <Ref Sect="Representations for Associative Words"/>).
## If no such filter is given, a letter representation is used.
## <P/>
## Also see Chapter <Ref Chap="Monoids"/>.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "FreeMonoid" );
#############################################################################
##
#E
|