If then else and unevaluated conditionals



Robert Dodier wrote:

> On 1/29/07, Michel Van den Bergh <michel.vandenbergh at uhasselt.be> wrote:
>
>> I am sort of wondering there should not be two different if then else's.
>> One which is a programming construct and which is handled by meval,
>> and one which it a  "mathematical concept" and which is handled by
>> the simplifier. Unevaluated conditionals should go into the latter and
>> not into the former I would say.
>
>
> It appears that only distinction you make here is that one form of if
> is evaluated and one is simplified. This is already the case in the
> boolsimp code -- if (the verb form) is evaluated & simplified
> and 'if (the noun form) is simplified. This treatment is analogous to
> other operators for which there exist noun & verb forms.
>
Well it's not to clear in my mind either. I am not trying to criticize
boolsimp which seems like a great piece of work (and which I use).

But I am just trying to do a mental exercise about the ideal maxima language
where there would be a clear separation between language
and data (the latter would be maxima expressions i.e essentially
s-expressions internally).

The language would of course have an if-then-else but
the data would have a mathematical if (or cond) expression.

Now I realize that if you think this thru there seems
to be a lot of duplication between language and data.
I.e. the language would have arrays (and a notation to extract an element
of it) and expressions can contain
indexed variables. Both seem similar but they look semantically different
to me (I guess Richard Fateman pointed this out).

When you program in lisp this distinction is clear (the lisp language is
distinct from the maxima s-expressions, please don't say its all lists).
So I wonder why it is supposed to be different on the maxima level.

Michel