OKlibrary  0.2.1.6
Graphs.mac
Go to the documentation of this file.
```00001 /* Oliver Kullmann, 27.11.2011 (Swansea) */
00002 /* Copyright 2011 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 kill(f)\$
00023
00024 okltest_resolutiongraph_cs2g(f) := (
00025   assert(f({}) = [{},{}]),
00026   assert(f({{}}) = [{{}},{}]),
00027   assert(f({{1}}) = [{{1}},{}]),
00028   assert(f({{1},{-1}}) = [{{1},{-1}},{{{1},{-1}}}]),
00029   assert(f({{1,2},{-1,-2}}) = [{{1,2},{-1,-2}},{}]),
00030   assert(f({{1,2},{-1,2},{1,-2},{-1,-2}}) = [{{1,2},{-1,2},{1,-2},{-1,-2}}, {{{1,2},{-1,2}},{{1,2},{1,-2}},{{-1,-2},{1,-2}},{{-1,-2},{-1,2}}}]),
00031   true)\$
00032
00033 okltest_cc_resolutiongraph_cs(f) := (
00034   assert(f({}) = {}),
00035   assert(f({{}}) = {{{}}}),
00036   assert(f({{1},{2},{-1},{-2}}) = {{{1},{-1}},{{2},{-2}}}),
00037   assert(f({{1,2},{-1,2},{1,-2},{-1,-2}}) = {{{1,2},{-1,2},{1,-2},{-1,-2}}}),
00038   assert(f({{1,2},{-1,-2}}) = {{{1,2}},{{-1,-2}}}),
00039   true)\$
00040
00041 okltest_subresolutiongraph_cs2g(f) := (
00042   assert(f({}) = [{},{}]),
00043   assert(f({{}}) = [{{}},{}]),
00044   assert(f({{1}}) = [{{1}},{}]),
00045   assert(f({{1},{-1}}) = [{{1},{-1}},{{{1},{-1}}}]),
00046   assert(f({{1,2},{-1,-2}}) = [{{1,2},{-1,-2}},{}]),
00047   assert(f({{1,2},{-1,2},{1,-2},{-1,-2}}) = [{{1,2},{-1,2},{1,-2},{-1,-2}}, {{{1,2},{-1,2}},{{1,2},{1,-2}},{{-1,-2},{1,-2}},{{-1,-2},{-1,2}}}]),
00048   assert(f({{1,2},{-2,3},{1,3}}) = [{{1,2},{-2,3},{1,3}}, {}]),
00049   assert(f({{1,2},{-2,3},{1,3},{-3,2}}) = [{{1,2},{-2,3},{1,3},{-3,2}}, {}]),
00050   true)\$
00051
00052 okltest_cc_subresolutiongraph_cs(f) := (
00053   assert(f({}) = {}),
00054   assert(f({{}}) = {{{}}}),
00055   assert(f({{1},{2},{-1},{-2}}) = {{{1},{-1}},{{2},{-2}}}),
00056   assert(f({{1,2},{-1,2},{1,-2},{-1,-2}}) = {{{1,2},{-1,2},{1,-2},{-1,-2}}}),
00057   assert(f({{1,2},{-1,-2}}) = {{{1,2}},{{-1,-2}}}),
00058   assert(f({{1,2},{-2,3},{1,3},{-3,2}}) = {{{1,2}},{{-2,3}},{{1,3}},{{-3,2}}}),
00059   true)\$
00060
00061
```