Re: Using content-MathML for computation and analysis in Science and Engineering

On 20/03/2012 22:10, Paul Libbrecht wrote:
>
> Le 20 mars 2012 à 08:12, Andreas Strotmann a écrit :
>>
>> More to the point, a sequence of assignments would therefore
>> 'naturally' be expressed as nested lambda expressions in MathML to
>>  preserve semantics.
>>
>
> My personal opinion, as a mathematician, is that this way of writing
>  might be well-founded in terms of expressivity or logic, it remains
>  fully opaque to most mathematicians except logicians.
>
> The concept of binding is understandable, and even that of mapping,
> but having to enter everything within lambda terms tends to be a real
> readability problem.
>
> paul


I'd agree with Paul here. Also, expressing the assignments via lambda
binding limits (in most natural encodings) the scope of the assignment
to a single expression, which may be too limiting.

While Andreas is right that a term encoding like MathML's (or
equivalently) OpenMath's has its roots in functional encodings and
lambda expressions, I don't see anything wrong with having symbols
denoting imperative assignments and, if necessary other imperative
constructs.
<apply><csymbol>defequal</csymbol><ci>x</ci><cn>1</cm></apply>

can be given a perfectly well defined meaning as

x := 1

and can be defined to have scope a containing element, or the current
math expression, or the entire document, depending on the needs of the
application.



I came across this old article of Gaston Gonnet on a programming CD for
OpenMath

http://www.inf.ethz.ch/personal/gonnet/ContDict/Progr.html

(The OpenMath examples are written in an old lispish linear syntax
pre-dating xml and no longer supported in OpenMath, but the basic ideas
are independent of syntax)

I was actually looking for this one

http://www.openmath.org/cd/prog1.xhtml

That encodes assignment as well as for and while loops etc, and is part
of the current xml cd collection (although classed as experimental)

David

Received on Tuesday, 20 March 2012 22:46:59 UTC