OKlibrary  0.2.1.6
Idempotency.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 x is idempotent for groupoid V: */
00025 idempotent_el_grd(V,x) := is(V[2](x,x) = x)$
00026 
00027 /* Check whether groupoid V has an idempotent element: */
00028 has_idempotent_el_grd(V) := some_s(lambda([x],idempotent_el_grd(V,x)), V[1])$
00029 /* Check whether groupoid V is idempotent (i.e., every element is 
00030    idempotent): */
00031 idempotent_bydef_grd(V) := every_s(lambda([x],idempotent_el_grd(V,x)), V[1])$
00032 
00033 /* The set of idempotent elements of a groupoid: */
00034 idempotents_grd(V) := subset(V[1], lambda([x],idempotent_el_grd(V,x)))$
00035 
00036