File: fpmon.gd

package info (click to toggle)
gap 4r4p10-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 29,224 kB
  • ctags: 7,084
  • sloc: ansic: 98,591; sh: 3,284; perl: 2,263; makefile: 467; awk: 6
file content (142 lines) | stat: -rw-r--r-- 4,884 bytes parent folder | download | duplicates (4)
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
#############################################################################
##
#W  fpmon.gd           GAP library        										Isabel Araujo
##
#H  @(#)$Id: fpmon.gd,v 4.5 2002/04/15 10:04:40 sal Exp $
##
#Y  Copyright (C)  1997,  Lehrstuhl D fuer 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 declarations for finitely presented monoids. 
##
Revision.fpmon_gd :=
    "@(#)$Id: fpmon.gd,v 4.5 2002/04/15 10:04:40 sal Exp $";

#############################################################################
##
#C  IsElementOfFpMonoid(<elm>)
##
##	returns true if <elm> is an element of a finitely presented monoid. 
##
DeclareCategory( "IsElementOfFpMonoid",
    IsMultiplicativeElementWithOne and IsAssociativeElement);

#############################################################################
##
#C  IsElementOfFpMonoidCollection(<e>)
##
##  Created now so that lists of things in the category IsElementOfFpMonoid
##  are given the category CategoryCollections(IsElementOfFpMonoid)
##  Otherwise these lists (and other collections) won't create the 
##  collections category. See CollectionsCategory in the manual.
##   
DeclareCategoryCollections("IsElementOfFpMonoid");

#############################################################################
##
#A  IsSubmonoidFpMonoid( <t> )
##  
##	true if <t> is a finitely presented monoid or a 
##	submonoid of a finitely presented monoid 
##	(generally speaking, such a semigroup can be constructed
##	with `Monoid(<gens>)', where <gens> is a list of elements
##	of a finitely presented monoid).
##
##	A submonoid of a monoid has the same identity as the monoid.
##
DeclareSynonymAttr( "IsSubmonoidFpMonoid", 
	IsMonoid and IsElementOfFpMonoidCollection );

#############################################################################
##  
#C  IsElementOfFpMonoidFamily
##
DeclareCategoryFamily( "IsElementOfFpMonoid" );

#############################################################################
##
#F  FactorFreeMonoidByRelations( <f>, <rels> )
##
##  <f> is a free monoid and <rels> is a list of
##  pairs of elements of <f>. Returns the fp monoid which
##  is the quotient of <f> by the least congruence on <f> generated by
##  the pairs in <rels>.
##
DeclareGlobalFunction("FactorFreeMonoidByRelations");

#############################################################################
##  
#O  ElementOfFpMonoid( <fam>, <word> )
##  
##  If <fam> is the elements family of a finitely presented monoid and <word>
##  is a word in the free generators underlying this finitely presented
##  monoid, this operation creates the element with the representative <word>
##  in the free monoid.
##
DeclareOperation( "ElementOfFpMonoid",
    [ IsElementOfFpMonoidFamily, IsAssocWordWithOne ] );

#############################################################################
##
#O  FpMonoidOfElementOfFpMonoid( <elm> )
##
##  returns the fp monoid to which <elm> belongs to
##
DeclareOperation( "FpMonoidOfElementOfFpMonoid",[IsElementOfFpMonoid]);

#############################################################################
##
#P  IsFpMonoid(<m>)
##
##  is a synonym for `IsSubmonoidFpMonoid(<m>)' and 
##  `IsWholeFamily(<m>)' (this is because a submonoid 
##  of a finitely presented monoid is not necessarily finitely presented).
##
DeclareSynonym( "IsFpMonoid",IsSubmonoidFpMonoid and IsWholeFamily);

#############################################################################
## 
#A  FreeGeneratorsOfFpMonoid( <m> )
## 
##  returns the underlying free generators corresponding to the 
##	generators of the finitely presented monoid <m>.  
## 
DeclareAttribute("FreeGeneratorsOfFpMonoid",  IsFpMonoid);

#############################################################################
## 
#A  FreeMonoidOfFpMonoid( <m> )
## 
##	returns the underlying free monoid for the finitely presented 
##	monoid <m>, ie, the free monoid over which <m> is defined 
##	as a quotient
##	(this is the free monoid generated by the free generators provided 
##	by `FreeGeneratorsOfFpMonoid(<m>)').
##
DeclareAttribute("FreeMonoidOfFpMonoid", IsFpMonoid);

############################################################################
##
#A  RelationsOfFpMonoid(<m>)
##
##  returns the relations of the finitely presented monoid <m> as
##  pairs of words in the free generators provided by
##  `FreeGeneratorsOfFpMonoid(<m>)'.
##
DeclareAttribute("RelationsOfFpMonoid",IsFpMonoid);

############################################################################
##
#A  IsomorphismFpMonoid(<m>)
##
##  for a monoid <m> returns an isomorphism from <m> to an fp monoid.
##
DeclareAttribute("IsomorphismFpMonoid",IsMonoid);



#############################################################################
##
#E