473,416 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Canonical Science Today, authoring system for science and mathematics (1st part)

The initial CanonMath program presented here

[http://canonicalscience.blogspot.com...anonmath.html]

was discussed with several specialists, including father of XML-MAIDEN
project (which provided many interesting ideas over original desing).
The initial CanonMath program (was abandoned) was presented at the w3c
mailing list for mathematics. There was little discussion but
subsequent discussion on others related MathML topics (formal structure
of Content MathML markup, script models, special entities, Unicode
composed diacritics vs <mover>, et cetera) benefited the development of
this new program.

Now the new CanonML approach is splinted into three modules:

i)
CanonText. This mainly a canonical expressions reformulation of the
initial Canontext module was based in XML in the old approach but now
is based in canonical expressions (modification of SEXPR).

ii)
CanonCode. This is a transformation/scripting/programming module. It
will be presented in next postings.

iii)
CanonFormal. It is the substitute of the old CanonMath, Canongraph, and
scientific modules. This is also based in canonical expressions now.
The change of name is justified because the language is used for
encoding of formal systems: either mathematical or scientific-technical
ones. Main features will be discussed here.

This new program substitutes to the old one. Ideas presented at

[http://canonicalscience.blogspot.com...anonmath.html]

are superseded by new ones. For example the initially chosen <over/>
tag is not already used for overscripts now and, therefore, we can
recover the TeX \over tag for fractions.
Formal structure]

The basic unit structure of a formal fragment is

[preargument1 ... \command postargument1 ...]

This is an infix notation and contrary to mainstream wisdom this is the
most general notation in formal systems. For example imagine that there
is not prearguments -i.e. preargument set is empty- then

[\command postargument1 ...]

That is, one recovers prefix notation as a special case. An example is

[\cos x]

Now imagine that there are not post arguments, then one obtains postfix
notation

[preargument1 ... \command]

A known case in mathematics is the factorial of a number

[23 \!]

The infix notation is preferred because easiness on writing by humans
and because contains others notations as special cases.

Both the infix notation and the formal canonical expressions design
unify the syntax doing parsing more easy for computers and the learning
more simple to users. The erratic TeX-like syntax (so critiqued in the
past by users) is avoided, but structure of mathematical markup is more
solid than that of ISO 12083 or MathML.

For instance, TeX commands

\stackrel{~}{f}

M_b

\sum_0^n

can be compared with their CanonFormal correspondences

[f \^^ ~]

[M \_ b]

[\sum \__ 0 \^^ n]

Note the erratic ordering of factors in TeX. For instance, the ordering
in the \stackrel command is overscript-base, but base-overscript in the
case of \sum. Note also that the TeX command "_" introduces subindices
when acting in M but introduces an underscript when applied to \sum. If
you want a subindex then you may consult your TeX manual (a TeX gurü
will work too ;-) for learning the way. In CanonFormal \_ always
introduces subindices whereas \__ introduces underscripts.

Note also that base is perfectly defined in CanonFormal. Problems on
parsing base of scripts and lack of any structural model for tensors or
prescripts are two sound weaknesses of TeX and similar models (e.g.
also of ASCIIMath). MathML or ISO 12083 improve this via specific
markup structures fixing bases. However, both approaches present
serious difficulties. MathML introduce bases as child of scripts
structures and this generate difficulties for extensibility of content
model, complicate the DTD a lot of at that point. Moreover, the MathML
script model returns CSS incompatibilities forcing an incorrect
implementation in browsers rendering engine.

All this is solved in CanonFormal; in a future posting we will see
detailed comparative review of script models in MathML, ASCIIMath,
LaTeX, amstex, ISO 12083 and CanonFormal, including illustrative
samples of code.
Computational advantages of postfix]

Due to his formal structure CanonFormal structures can be transformed
to either prefix or postfix (RPN) notation. In fact, there exist
standard algorithms for transforming infix notation to RPN: e.g. the
so-called shunting yard algorithm. In a future posting we will see how
an algorithm could be directly implemented in CanonCode: a
scripting-programming-transformation language based in own CanonML.

RPN has the computational advantage of being extremely easy to
computational analisis, increasing computer efficiency and speed. It is
also possible a better memory management.

For example the CanonFormal representation for (3 * 9) + 2 can be
easily transformed to

[[3 9 \*] 2 \+]

or even to

3 9 \* 2 \+.

This may be useful in computational science. E.g. the authors of
Biosystems 2003; 72(1-2); 159-76 presented a novel algorithm with RPN
design for reducing the computational cost.
Usage of invisible operators and others]

Invisible operators and special commands are useful for encoding
content, for computation and also for improving accessibility of
datuments.

For example, what do I mean by h(x+y)? The function h of (x+y) or maybe
the product of variables h and (x+y)?

TeX, IteX, ASCIIMath, or ISO 12083, between others, cannot disambiguate
the expression. In CanonFormal we can write

[h \function-of [x \+ y]]

or

[h \* [x \+ y]].

A search engine can discriminate between both expressions; aural
renderings for people with disabilities are those we wait, etc.

In theory, presentation MathML 2.0 can also differentiate both
expressions via application of specific entities &ApplyFunction; and
&InvisibleTimes;. For instance, latter CanonFormal code may be
expressed in MathML 2.0 like

<mrow>
<mi>h</mi>
<mo>&InvisibleTimes;</mo>
<mfenced>
<mi>x</mi>
<mo>+</mo>
<mi>y</mi>
</mfenced>
</mrow>

But I remarked the "in theory" because in practice MathML is not
authored by hand due to its unusual verbosity and many popular tools
(including tools generating the MathML code used in some academic
journals as Living Reviews in Relativity (Hermes) and scientific blogs
such as Musings from J. Distler) are *not* using invisible operators.

Semantic correctness and accessibility of the real MathML code is being
served in the Internet is very limited.

Similar thoughts are applied to dx (encoded as [d \* x]) versus dx
(encoded as [\differential x]).

The situation in MathML documents served on the Internet is still poor.
The differential is not usually encoded via special entity and,
therefore, confounded with others d; a very basic concept such as the
"square of differential of s" is being incorrectly encoded as "two
times s times ds". This incorrect encoding is being served to the
Internet in several articles of HERMES - Living Reviews on relativity
journal and also in Distler's blog Musings on string theory and
related stuff. See

[http://canonicalscience.blogspot.com...nonml-is.html]

for further details and links to Distler's blog articles. In the next
HERMES generated document

[http://hermes.aei.mpg.de/2005/2/article.xhtml]

you can find the MathML 2.0 code

<mi>d</mi>
<msup>
<mrow>
<mi>s</mi>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</msup>

just after the section 2.1. It is obvious that accessibility,
structure, "semantics", encoding, and rendering of this code are all
wrong. Moreover, the HERMES generated code contains redundant <mrow>
tags. Mozilla developers carefully recommend avoiding redundant <mrow>
by technical motives: performance and memory consumption.

[http://www.mozilla.org/projects/mathml/authoring.html]

In a future posting we will see that there exist more problems with
redundant mrows than those are being listed in the mozilla page.

Even if you fix by hand the above weird MathML code, correct it, and
introduce the entity &DifferentialD;, the code will suffer from
additional difficulties. The MathML entity for differentials will be
visually rendered as a double-struck d, instead of the more usual roman
d.

David Carlisle in

[http://lists.w3.org/Archives/Public/...Apr/0051.html]

and others MathML WG folks replied that for visual rendering a roman d
the best way in MathML may be to use a simple d in the input file, for
example <mo>d</mo>.

But the own MathML 2.0 specification does not recommend that way!

Using something as <mo>d</mo> you obtain a not very convincing visual
rendering, incorrect aural rendering for people with disabilities, and
you confound search engines.

The second option is to use MathML recommended code
<mo>&Differential;</mo>, then search engines can recognize
differential, the aural rendering is correct, but one obtains a default
non-standard visual rendering cannot be modified as some folks worried
at the list.

All those problems are absent in CanonFormal. Search engines can
distinguish then a simple d from the \differential command. Aural
renderings read "differential of" for blinded users, and the visual
rendering of the command is set to a roman d by default but can be
changed by the user via "stylesheets" when desired.

Source:
http://canonicalscience.blogspot.com...ystem-for.html
--

Juan R.

Center for CANONICAL |SCIENCE)

May 10 '06 #1
1 1721

Juan R. ha escrito:
David Carlisle in

[http://lists.w3.org/Archives/Public/...Apr/0051.html]
That is wrong, the correct message is

[http://lists.w3.org/Archives/Public/...Apr/0052.html]

Source:
http://canonicalscience.blogspot.com...ystem-for.html


I have fixed this error on the source also.
Juan R.

Center for CANONICAL |SCIENCE)

May 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sugapablo | last post by:
My brain is frozen on a convenient way to figure out if today is the 1st, 2nd, 3rd, 4th, or last Thursday of the month. Basically I need something that will figure this out for any given day for...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
5
by: KevinGPO | last post by:
What's the difference between system("myGame.exe"); and system("start myGame.exe"); ?
1
by: Juan R. | last post by:
Introduction I am developing the CanonML language (version 1.0) as a way to generate, store, and publish canonical science documents on the Internet. This language will be the basis for the next...
0
by: Juan R. | last post by:
I have updated some basic requirements for a generic mathematical markup language for scientific requirements at the next link. ...
0
by: Brian Quinlan | last post by:
What's New? =========== The deadline for early-bird registration for the Vancouver Python Workshop is today! Early-bird registration is significantly discounted over normal registration, so...
0
by: Juan R. | last post by:
Since the idea of encoding mathematics using MathML is being very far from popular due to a number of factors -expensive tools, bad accesibility of generated code, unusual verbosity, lack of...
11
by: dydx31 | last post by:
Hey guys, I am a Computer Science student attending classes at the University of Michigan-Dearborn. I have been in college for a few years now, but I have some questions for you. I am really...
2
by: Jeffrey Walton | last post by:
Hi All, BMP Strings are a subset of Universal Strings.The BMP string uses approximately 65,000 code points from Universal String encoding. BMP Strings: ISO/IEC 10646, 2-octet canonical form,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.