File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,39 @@ cdef class Group(Parent):
186
186
"""
187
187
return self .order() != infinity
188
188
189
+ def is_trivial (self ):
190
+ r """
191
+ Return ``True`` if this group is the trivial group.
192
+
193
+ A group is trivial, if it consists only of the identity
194
+ element.
195
+
196
+ .. WARNING::
197
+
198
+ It is in principle undecidable whether a group is
199
+ trivial, for example, if the group is given by a finite
200
+ presentation. Thus, this method may not terminate.
201
+
202
+ EXAMPLES::
203
+
204
+ sage: groups. presentation. Cyclic( 1) . is_trivial( )
205
+ True
206
+
207
+ sage: G. <a,b> = FreeGroup( 'a, b')
208
+ sage: H = G / ( a^ 2, b^ 3, a* b* ~a* ~b)
209
+ sage: H. is_trivial( )
210
+ False
211
+
212
+ A non-trivial presentation of the trivial group::
213
+
214
+ sage: F. <a,b> = FreeGroup( )
215
+ sage: J = F / (( ~a) * b* a* ( ~b) ^ 2, ( ~b) * a* b* ( ~a) ^ 2)
216
+ sage: J. is_trivial( )
217
+ True
218
+ """
219
+ return self .order() == 1
220
+
221
+
189
222
def is_multiplicative (self ):
190
223
r """
191
224
Returns True if the group operation is given by \* ( rather than
You can’t perform that action at this time.
0 commit comments