OKlibrary  0.2.1.6
PartialAssignments.mac
Go to the documentation of this file.
00001 /* Oliver Kullmann, 9.7.2008 (Swansea) */
00002 /* Copyright 2008 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/Satisfiability/Lisp/ClauseSets/PartialAssignments.mac")$
00023 
00024 
00025 /* *******************************
00026    * Boolean partial assignments *
00027    *******************************
00028 */
00029 
00030 /* The composition of partial assignments (which are here represented
00031    as clauses) is compo_pass.
00032 */
00033 
00034 /* The monoid of partial assignments over the set V of variables: */
00035 pass_mon(V) := [all_pass(V), compo_pass, {}]$
00036 /* The semigroup of partial assignments over the set V of variables: */
00037 pass_sgr(V) := [disjoin({},all_pass(V)), compo_pass]$
00038 
00039 /* The natural (faithful) operation of partial assignments over V on 
00040    V union {z,o}, where z represents 0 and o represents 1: */
00041 natop_pass(z,o) := buildq([z,o],
00042   lambda([phi,x], 
00043     if elementp(x,{z,o}) then x 
00044     elseif elementp(x,phi) then o 
00045     elseif elementp(-x,phi) then z 
00046     else x))$
00047