OKlibrary  0.2.1.6
Order.mac
Go to the documentation of this file.
00001 /* Oliver Kullmann, 2.6.2009 (Swansea) */
00002 /* Copyright 2009, 2010 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 
00024 
00025 kill(f)$
00026 
00027 okltest_lex_lessp_l(f) := (
00028   assert(f([],[]) = false),
00029   assert(f([1],[1]) = false),
00030   assert(f([1],[2]) = true),
00031   assert(f([2],[1]) = false),
00032   assert(f([1,1],[1,1]) = false),
00033   assert(f([1,1],[1,2]) = true),
00034   assert(f([1,1],[2,1]) = true),
00035   assert(f([1,2],[1,1]) = false),
00036   assert(f([1,2],[1,2]) = false),
00037   assert(f([1,2],[2,2]) = true),
00038   assert(f([1,2],[2,1]) = true),
00039   assert(f([],[0]) = true),
00040   assert(f([],[-1]) = true),
00041   assert(f([],[0,0,0]) = true),
00042   assert(f([0],[0,0]) = true),
00043   assert(f([0,0],[0,0]) = false),
00044   assert(f([0,0,0],[0,0]) = false),
00045   assert(f([0,1,2],[0,1,1,4]) = false),
00046   assert(f([0,1,2],[0,1,2,0]) = true),
00047   assert(f([0,-1,-2],[0,-2,0]) = false),
00048   assert(f([0,-1,-2],[0,-1,-1]) = true),
00049   true)$
00050 
00051 okltest_colex_lessp_l(f) := (
00052   assert(f([],[]) = false),
00053   assert(f([1],[1]) = false),
00054   assert(f([1],[2]) = true),
00055   assert(f([2],[1]) = false),
00056   assert(f([1,1],[1,1]) = false),
00057   assert(f([1,1],[1,2]) = true),
00058   assert(f([1,1],[2,1]) = true),
00059   assert(f([1,2],[1,1]) = false),
00060   assert(f([1,2],[1,2]) = false),
00061   assert(f([1,2],[2,2]) = true),
00062   assert(f([1,2],[2,1]) = false),
00063   assert(f([],[0]) = true),
00064   assert(f([],[0,0]) = true),
00065   assert(f([0],[0,0]) = true),
00066   assert(f([0,1],[0,2,3]) = true),
00067   assert(f([0,5],[0,4,5]) = true),
00068   assert(f([3,0,2],[3,2]) = true),
00069   assert(f([2,4,6],[3,7]) = true),
00070   assert(f([2,4,6],[1,2,3,4,5]) = false),
00071   assert(f([2],[1,1,1,1,1,1]) = false),
00072   assert(f([1,1,1,1,1,1],[2]) = true),
00073   true)$
00074 
00075