% Description: This file contains a long list of examples demonstrating the abilities of % the translator. Most of these examples come straight from the MathML spec. They % are part of those used during the development of the interface and should all % be correctly translated into OpenMath. % % Type: on demo; in "examples.mathml"; then press return to see each expression % being translated % % Version 17 April 2000 % % Author: Luis Alvarez Sobreviela % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % These examples attempt to test the following aspects: % % - Types of arguments % - Containers % + sets % + vectors % + intervals % + matrices % - Sums, products % - Calculus % - Lambda expressions % - Limits % - Quantifiers % - Set functions % - MathML1 Relational operators % - Statistics % - Functions on Matrices % - Various general expressions % - Complex expressions % Expressing different types of numbers mml2om(); 6 3 mml2om(); 6 3 mml2om(); 6 % Containers. mml2om(); b 2 c mml2om(); b 2 c mml2om(); b a c mml2om(); b a c mml2om(); b a c mml2om(); b 2 c mml2om(); 1 2 3 x % Must make sure these elements translate % to the correct OpenMath symbols. % The MathML interval maps to different % OPenMath symbols. mml2om(); b 2 mml2om(); b 2 mml2om(); b 2 mml2om(); b 2 % Matrices mml2om(); 0 1 0 0 0 1 1 0 0 mml2om(); 0 1 0 0 0 1 1 0 0 % The following operators need to be carefully % monitored because OpenMath has different % representations for such elements. % sums, products mml2om(); x a b x y mml2om(); x a b f x mml2om(); x a b f x % Calculus mml2om(); x a b f x mml2om(); x x 2 mml2om(); x x mml2om(); x f x mml2om(); x 2 f x mml2om(); x 3 f x mml2om(); x 0 1 x 2 mml2om(); x 1 x mml2om(); x a b x mml2om(); x 2 f x % Lambda expressions mml2om(); x x % Limits mml2om(); x 0 x mml2om(); x x a x mml2om(); V V 0 S a V mml2om(); x 0 x mml2om(); x x a x % Quantifiers mml2om(); x y z n n 2 x n y n z n mml2om(); a a a % Set functions. mml2om(); A B mml2om(); b 2 c b r 2 4 c mml2om(); A B mml2om(); b 2 c b r 2 4 c % MathML1 relational operators. The attributes % are unecessary, and so the parser should ignore % them mml2om(); a A mml2om(); a A mml2om(); A B mml2om(); A B mml2om(); A B mml2om(); A B mml2om(); 2 2 2 mml2om(); 2 A u mml2om(); 2 2 mml2om(); 2 A mml2om(); 2 2 2 mml2om(); 2 A u mml2om(); 2 2 2 mml2om(); 2 A u mml2om(); 2 2 2 mml2om(); 2 A u mml2om(); 2 2 2 mml2om(); 2 A u % Statistics mml2om(); b r 2 4 c mml2om(); b r 2 4 c mml2om(); b r 2 4 c % Functions on matrices mml2om(); 3 1 5 7 0 2 1 7 8 mml2om(); 3 1 5 7 0 2 1 7 8 mml2om(); 1 2 3 4 1 mml2om(); 1 2 3 4 2 2 mml2om(); a 1 2 s mml2om(); 1 2 3 4 1 2 1 2 2 3 2 1 2 1 1 1 % A variety of different expressions mml2om(); x y 3 7 mml2om(); a b mml2om(); a b mml2om(); b 2 c mml2om(); b 2 c mml2om(); b 2 c mml2om(); x x 3 mml2om(); 2 x x x x 2 mml2om(); x x 3 mml2om(); x x 3 % Complex expressions mml2om(); x 1 x 1 mml2om(); x y x y 2 x y 2 2 x y 2 x y 2 x y 1 mml2om(); x root_of y x_ x_ x_ x_ y x_ y x_ tag_1 a x y mml2om(); x root_of x_ y x_ x_ y 1 x_ x_ x_ y 2 x_ x_ x_ y x_ tag_2 z y