OKlibrary  0.2.1.6
NullElements.mac
Go to the documentation of this file.
```00001 /* Oliver Kullmann, 14.1.2009 (Swansea) */
00002 /* Copyright 2009 Oliver Kullmann
00003 This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
00004 it and/or modify it under the terms of the GNU General Public License as published by
00005 the Free Software Foundation and included in this library; either version 3 of the
00006 License, or any later version. */
00007
00022 oklib_include("OKlib/ComputerAlgebra/DataStructures/Lisp/Lists.mac")\$
00023
00024 /* Check whether n is left-null for groupoid V: */
00025 leftnull_el_grd(V,n) := every_s(lambda([x],is(V[2](n,x)=n)), V[1])\$
00026 /* Check whether n is right-null for groupoid V: */
00027 rightnull_el_grd(V,n) := every_s(lambda([x],is(V[2](x,n)=n)), V[1])\$
00028 /* Check whether e is null for groupoid V: */
00029 null_el_grd(V,e) := leftnull_el_grd(V,e) and rightnull_el_grd(V,e)\$
00030 /* Remarks:
00031  - The above tests do not check whether elementp(n,V[1]) is true.
00032 */
00033
00034 /* Check whether groupoid V has a left-null element: */
00035 has_leftnull_el_grd(V) := some_s(lambda([x],leftnull_el_grd(V,x)), V[1])\$
00036 /* Check whether groupoid V has a right-null element: */
00037 has_rightnull_el_grd(V) := some_s(lambda([x],rightnull_el_grd(V,x)), V[1])\$
00038 /* Check whether groupoid V has a null element: */
00039 has_null_el_grd(V) := some_s(lambda([x],null_el_grd(V,x)), V[1])\$
00040
00041
```