OKlibrary  0.2.1.6
InvertibleElements.mac
Go to the documentation of this file.
```00001 /* Oliver Kullmann, 14.1.2009 (Swansea) */
00002 /* Copyright 2009, 2012 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/TestSystem/Lisp/Asserts.mac")\$
00023 oklib_include("OKlib/ComputerAlgebra/Algebra/Lisp/Groupoids/Semigroups/BasicExamples.mac")\$
00024 oklib_include("OKlib/ComputerAlgebra/Algebra/Lisp/Groupoids/BasicNotions.mac")\$
00025 oklib_include("OKlib/ComputerAlgebra/Algebra/Lisp/Groupoids/Constructions.mac")\$
00026 oklib_include("OKlib/ComputerAlgebra/Algebra/Lisp/Groupoids/Groups/CyclicGroups.mac")\$
00027
00028 kill(f)\$
00029
00030
00031 /* **********
00032    * Basics *
00033    **********
00034 */
00035
00036 okltest_leftinvertible_el_ugrd(f) := block([V],
00037   assert(f(singleton_mon,1) = true),
00038   V : endcons(1,m2grd(matrix([1,2,3],[2,3,1],[3,2,1]))),
00039   assert(f(V,1) = true),
00040   assert(f(V,2) = false),
00041   assert(f(V,3) = true),
00042   /* XXX */
00043   true)\$
00044
00045 okltest_rightinvertible_el_ugrd(f) := block([V],
00046   assert(f(singleton_mon,1) = true),
00047   V : endcons(1,m2grd(matrix([1,2,3],[2,3,1],[3,2,1]))),
00048   assert(f(V,1) = true),
00049   assert(f(V,2) = true),
00050   assert(f(V,3) = true),
00051   /* XXX */
00052   true)\$
00053
00054 okltest_invertible_el_ugrd(f) := block([V],
00055   assert(f(singleton_mon,1) = true),
00056   V : endcons(1,m2grd(matrix([1,2,3],[2,3,1],[3,2,1]))),
00057   assert(f(V,1) = true),
00058   assert(f(V,2) = false),
00059   assert(f(V,3) = true),
00060   /* XXX */
00061   true)\$
00062
00063 okltest_leftinversion_ugrd(f) := block([V],
00064   assert(f(singleton_mon,identity) = true),
00065   V : endcons(1,m2grd(matrix([1,2,3],[2,2,2],[3,1,1]))),
00066   assert(f(V, lambda([x], if x=1 then 1 else 3)) = true),
00067   assert(f(V, identity) = false),
00068   /* XXX */
00069   true)\$
00070
00071 okltest_rightinversion_ugrd(f) := (
00072   assert(f(singleton_mon,identity) = true),
00073   okltest_leftinversion_ugrd(buildq([f], lambda([V,h], f(transposed_ugrd(V),h)))),
00074   /* XXX */
00075   true)\$
00076
00077 okltest_inversion_ugrd(f) := (
00078   assert(f(singleton_mon,identity) = true),
00079   for n : 1 thru cokltl(5,20) do block([G : cyclic_ugrp(n)],
00080     assert(f(G,"-") = true)),
00081   /* XXX */
00082   true)\$
00083
00084
00085 /* ***************
00086    * Involutions *
00087    ***************
00088 */
00089
00090 okltest_involutions_ugrd(f) := (
00091   for n : 1 thru cokltl(5,20) do
00092     assert(f(cyclic_ugrp(n)) = if evenp(n) then {n/2} else {}),
00093   /* XXX */
00094   true)\$
00095
00096
```