473,554 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

The initial CanonMath program presented here


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:

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).

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

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


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

[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




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 incompatibiliti es 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

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]]


[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 &ApplyFuncti on; and
&InvisibleTimes ;. For instance, latter CanonFormal code may be
expressed in MathML 2.0 like

<mo>&InvisibleT imes;</mo>

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


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


you can find the MathML 2.0 code


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.


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

David Carlisle in


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>&Differenti al;</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 "differenti al 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 "stylesheet s" when desired.


Juan R.


May 10 '06 #1
1 1727

Juan R. ha escrito:
David Carlisle in

That is wrong, the correct message is



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


May 10 '06 #2

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

Similar topics

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 any given month. date() has everything BUT a 0-5 return for this. -- Sugapablo - russpghREMOVE@stargate.net http://www.sugapablo.com | ICQ:...
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 capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it...
by: KevinGPO | last post by:
What's the difference between system("myGame.exe"); and system("start myGame.exe"); ?
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 version 2.0 of the website of the Center for CANONICAL |SCIENCE). The current preliminary version -in proof stage- has been developed on XHTML 1.1 +...
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. http://canonicalscience.blogspot.com/2006/04/scientific-language-canonml-is.html] Some requirements fit into the XML model and could be considered for debate for the future mathML specifications. Other...
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 register now at: http://www.vanpyz.org/conference/registration.html
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 adequate support, special fonts, namespaces, special plugins, backward incompatiblity of MathML with other internet technologies, duplication of code,...
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 struggling with my programming classes. Its hard to describe...I can understand small scale programs, but when it comes to designing an application...
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, Universal String: ISO/ IEC 10646, 4-octet canonical form. An excellent discussion occured with respect to BMP Strings and .Net (see...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.