T for true, and true for T (was Re: [Maxima] emaxima's macros bug?)
Subject: T for true, and true for T (was Re: [Maxima] emaxima's macros bug?)
From: Richard Fateman
Date: Sat, 15 Mar 2003 17:47:05 -0800
In lisp, T is short for the canonical truth value "true".
It seemed to work that way in Macsyma as well. Setting $T
to something else, or perhaps nothing, might fix it.
It used to be something like (makunbound '$T) would do
it in maclisp.
probably (make-unbound '$t) in ANSI CL.
I wouldn't guarantee this as a solution without some
testing.
RJF
Jay Belanger wrote:
> Valerij Pipin <pip@iszf.irk.ru> writes:
>
>
>>Hi,
>>
>>I'm writing an introduction to itensor with help of emaxima mode.
>>I found an unusual behaviour. Look in the attachment.
>>The name of tensor "t" was replaced by name "true" (lisp's caused??) after TeX
>>updation the cell. Everything is ok when another name is used.
>
>
> Maxima seems to interpret that particular "t" as "true". I don't
> think this is peculiar to emaxima mode; in an ordinary maxima session,
> I get the following:
> (C1) permut_ten(T([i],[l,m],p,q),covd);
>
> (D1) permut_ten(T([i], [l, m], p, q), covd)
> (C2) tex(%);
>
> $$\mathrm{permut\_ten}\left(\mathbf{true}\left(\left[ i \right]
> ,\linebreak[0]\left[ l,\linebreak[0]m \right] ,\linebreak[0]p
> ,\linebreak[0]q\right),\linebreak[0]\mathrm{covd}\right)$$
> (D2) FALSE
>
> After playing with it some, it seems that in t,T, and t(), the "t" is
> not interpreted as "true", but in T(), the "t" is interpreted as
> "true". Odd, I think, but I'm sure there's a good reason for it.
>
> (C17) t; T; t(); T();
>
> (D17) t
> (C18)
> (D18) T
> (C19)
> (D19) t()
> (C20)
> (D20) T()
> (C21) tex(t);tex(T);tex(t());tex(T());
>
> $$t$$
> (D21) FALSE
> (C22)
> $$T$$
> (D22) FALSE
> (C23)
> $$t\left(\right)$$
> (D23) FALSE
> (C24)
> $$\mathbf{true}\left(\right)$$
> (D24) FALSE
> (C25)
>
> Jay
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima