OKlibrary  0.2.1.6
VanderWaerden.mac
Go to the documentation of this file.
00001 /* Oliver Kullmann, 23.10.2010 (Swansea) */
00002 /* Copyright 2010, 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 
00021 oklib_include("OKlib/ComputerAlgebra/Hypergraphs/Lisp/Generators/VanderWaerden.mac")$
00022 oklib_include("OKlib/ComputerAlgebra/Hypergraphs/Lisp/Generators/tests/VanderWaerden.mac")$
00023 oklib_include("OKlib/ComputerAlgebra/Hypergraphs/Lisp/Homomorphisms.mac")$
00024 
00025 
00026 /* ***************************
00027    * Arithmetic progressions *
00028    ***************************
00029 */
00030 
00031 okltest_arpr(arpr);
00032 
00033 okltest_arithmetic_progression_p(arithmetic_progression_p);
00034 okltest_arithmetic_progression_d_p(arithmetic_progression_d_p);
00035 
00036 
00037 /* ***************************************************
00038    * Standard hypergraphs of arithmetic progressions *
00039    ***************************************************
00040 */
00041 
00042 okltest_arithprog_finish(arithprog_finish);
00043 
00044 okltest_arithprog_ohg(arithprog_ohg);
00045 okltest_arithprog_hg(arithprog_hg);
00046 
00047 okltest_nver_arithprog_hg(nver_arithprog_hg);
00048 okltest_nver_arithprog_ohg(nver_arithprog_ohg);
00049 okltest_nhyp_arithprog_hg(nhyp_arithprog_hg);
00050 okltest_nhyp_arithprog_ohg(nhyp_arithprog_ohg);
00051 
00052 okltest_arithprog_ohg(lambda([k,n],
00053  block([V:create_list(i,i,1,n),E:[],H:first_colex_arithprog(k)],
00054   if k=0 then E : cons(H,E)
00055   else while last(H) <= n do (
00056     E : cons(H,E),
00057     H : next_colex_arithprog(H)
00058   ),
00059   return([V,map(setify,reverse(E))]))));
00060 
00061 /* ******************************************************
00062    * Generalised hypergraphs of arithmetic progressions *
00063    ******************************************************
00064 */
00065 
00066 okltest_arithmetic_progressions(arithmetic_progressions);
00067 
00068 okltest_arithprog_list_ohg(arithprog_list_ohg);
00069 okltest_arithprog_list_hg(arithprog_list_hg);
00070 
00071 okltest_has_arithprog(has_arithprog);
00072 
00073 /* ************
00074    * Symmetry *
00075    ************
00076 */
00077 
00078 okltest_mirrorfold_vdw(mirrorfold_vdw);
00079 okltest_mirrorfold_vdw(lambda([n],mirrorfold(1,n)));
00080 
00081 okltest_palindromise_vdw_ohg(palindromise_vdw_ohg);
00082 okltest_palindromise_vdw_hg(palindromise_vdw_hg);
00083 
00084 okltest_arithprog_pd_hg(arithprog_pd_hg);
00085