OKlibrary  0.2.1.6
Associativity.mac
Go to the documentation of this file.
00001 /* Oliver Kullmann, 6.7.2008 (Swansea) */
00002 /* Copyright 2008 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 /* Testing whether a groupoid is associative, just using the definition: */
00023 associative_bydef_grd(V) := block([counterexample : false],
00024  for x in V[1] unless counterexample do
00025   for y in V[1] unless counterexample do
00026    for z in V[1] unless counterexample do
00027      if V[2](V[2](x,y),z) # V[2](x,V[2](y,z)) then counterexample : true,
00028  return(not counterexample))$
00029