So, here is the full problem (hopefully reproducible):
(%i1) comp_sl(L) := map("-", L)$
(%i2) clashp(A,B) := not emptyp(intersection(A,comp_sl(B)))$
(%i3) lunion(L) := tree_reduce(union,L,{})$
(%i4) or_cs2(F1,F2) :=
map(lunion,
subset(cartesian_product(F1,F2), lambda([P],not clashp(P[1],P[2]))))$
(%i5) or_cs([L]) := block([l : length(L)],
if l = 0 then {{}} elseif l = 1 then L[1]
else apply(or_cs, cons(or_cs2(L[1],L[2]), rest(L,2))))$
(%i6) dual_cs(F) := apply(or_cs,
map(lambda([C],map("{",C)), listify(F)))$
(%i7) S : dual_cs({{1}});
(%o7) {{1}}
(%i8) is(S = {{1}});
(%o8) false
The definitions on their own:
comp_sl(L) := map("-", L)$
clashp(A,B) := not emptyp(intersection(A,comp_sl(B)))$
lunion(L) := tree_reduce(union,L,{})$
or_cs2(F1,F2) :=
map(lunion,
subset(cartesian_product(F1,F2), lambda([P],not clashp(P[1],P[2]))))$
or_cs([L]) := block([l : length(L)],
if l = 0 then {{}} elseif l = 1 then L[1]
else apply(or_cs, cons(or_cs2(L[1],L[2]), rest(L,2))))$
dual_cs(F) := apply(or_cs,
map(lambda([C],map("{",C)), listify(F)))$
Oliver
On Fri, Dec 05, 2008 at 09:21:15PM +0000, Oliver Kullmann wrote:
> On Thu, Dec 04, 2008 at 05:16:03PM -0700, Robert Dodier wrote:
> > On Thu, Dec 4, 2008 at 11:21 AM, Oliver Kullmann
> > <O.Kullmann at swansea.ac.uk> wrote:
> >
> > > (%i313) S : dual_cs({{1}});
> > > (%o313) {{1}}
> > > (%i314) S;
> > > (%o314) {{1}}
> > > (%i315) is(S = {{1}});
> > > (%o315) false
> >
> > What is printed by:
> >
> > :lisp |$s| <--- NOTE: lowercase s
> >
> > and by:
> >
> > {{1}};
> > :lisp $%
> >
>
> As you guessed:
>
> (%i388) :lisp |$s|
> (($SET SIMP) ((${ SIMP) 1))
> (%i388) {{1}};
> (%o388) {{1}}
> (%i389) :lisp $%
> (($SET SIMP) (($SET SIMP) 1))
>
> > My first guess is that one of these is like (($SET) ...) and the
> > other is like ((${) ...). I seem to recall a bug that was fixed a
> > while ago --- in some circumstances {...} was parsed as
> > ((${) ...) and not as (($SET) ...). What does build_info(); report?
> >
>
> (%i389) build_info();
>
> Maxima version: 5.17.0
> Maxima build date: 16:58 12/4/2008
> host type: x86_64-unknown-linux-gnu
> lisp-implementation-type: CLISP
> lisp-implementation-version: 2.47 (2008-10-23) (built 3435932819) (memory 3437398720)
>
>
> I'll try now to extract some code to reproduce the error.
>
> Oliver
>
>
> --
> Dr. Oliver Kullmann
> Computer Science Department
> Swansea University
> Faraday Building, Singleton Park
> Swansea SA2 8PP, UK
> http://cs.swan.ac.uk/~csoliver/
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
--
Dr. Oliver Kullmann
Computer Science Department
Swansea University
Faraday Building, Singleton Park
Swansea SA2 8PP, UK
http://cs.swan.ac.uk/~csoliver/