OKlibrary  0.2.1.6
Homomorphisms.mac
Go to the documentation of this file.
```00001 /* Oliver Kullmann, 12.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/TestSystem/Lisp/Asserts.mac")\$
00023 oklib_include("OKlib/ComputerAlgebra/Algebra/Lisp/Groupoids/Semigroups/BasicExamples.mac")\$
00024 oklib_include("OKlib/ComputerAlgebra/Algebra/Lisp/Groupoids/Groups/CyclicGroups.mac")\$
00025 oklib_include("OKlib/ComputerAlgebra/Algebra/Lisp/Groupoids/BasicNotions.mac")\$
00026
00027 kill(f)\$
00028
00029
00030 /* ***********************
00031    * Fundamental notions *
00032    ***********************
00033 */
00034
00035 okltest_homomorphism_bydef_grd(f) := block([h, compo],
00036   assert(f(h,empty_sgr,compo) = true),
00037   assert(f(identity,singleton_sgr,singleton_sgr[2]) = true),
00038   assert(f(identity,singleton_sgr,null_sgr({0,1},0)[2]) = false),
00039   /* XXX */
00040   true)\$
00041
00042 okltest_homomorphism_bydef_ugrd(f) := (
00043   assert(f(identity,singleton_mon,singleton_mon[2],singleton_mon[3]) = true),
00044   assert(f(identity,singleton_mon,cyclic_ugrp(2)[2],cyclic_ugrp(2)[3]) = false),
00045   assert(f(lambda([x],0),singleton_mon,cyclic_ugrp(2)[2],cyclic_ugrp(2)[3]) = true),
00046   /* XXX */
00047   true)\$
00048
00049 okltest_induced_congruence_grd(f) := (
00050   /* XXX */
00051   true)\$
00052
00053
00054 /* ***********************
00055    * Isomorphism testing *
00056    ***********************
00057 */
00058
00059 okltest_is_isomorphic_bydef_grd(f) := (
00060   assert(f(empty_sgr,empty_sgr) = true),
00061   assert(f(empty_sgr,singleton_sgr) = false),
00062   assert(f(null_sgr({1,2,3},1),null_sgr({1,2,3},2)) = true),
00063   /* XXX */
00064   true)\$
00065
00066 okltest_transport_grd(f) := block([h],
00067   assert(grd_equalp(f(empty_sgr,h),empty_sgr) = true),
00068   assert(grd_equalp(f(null_sgr({1,2,3},1),lambda([x],x+1)), null_sgr({2,3,4},2)) = true),
00069   /* XXX */
00070   true)\$
00071
00072 okltest_transport3_grd(f) := block([h1,h2,h3],
00073   assert(grd_equalp(f(empty_sgr,h1,h2,h3),empty_sgr) = true),
00074   /* XXX */
00075   true)\$
00076
00077
```