Olga Caprotti
Jordi Saludes
OpenMath workshop 2012, Bremen, July 2012
Basic math objects from some Content Dictionaries.
15 languages so far: mathbar
Available at svn://molto-project.eu/mgl
Simple drills.
Queries/Answers to/from a CAS.
Modeling and solving simple word problems.
abs : ValNum -> ValNum ; -- the absolute value of z
times : [ValNum] -> ValNum ; -- the product of x, y and z
unary_minus : ValNum -> ValNum ; -- minus x
Compute : (k: Kind) -> Value k -> Command ;
Assign : (k: Kind) -> Variable k -> Value k -> Command ;
Assert : Prop -> Command ;
Approximate : ValNum -> Command ;
BeginBlock : String -> Command ;
EndBlock : String -> Command ;
ValNum
, ValSet
, ValTensor
... = MathObj
= Noun Phrase (NP
)ValFun
= MathFunc
= NP
+ Extra infoVarNum
, VarSet
, ... = Symbol
(= String in most languages)Prop
= Clause with polarityFullProp
= Sentence abs : ValNum -> ValNum
abs : NP -> NP
value_N : N = mkN "value" ;
absolute_A : A = mkA "absolute" ; -- In LexiconEng
abs_value_CN : CN = mkCN absolute_A value_N ; -- In LexiconX
mkNP the_Art (mkCN abs_value_CN (mkAdv possess_Prep obj)) ; -- In Arith1I
CN
)NP
) using the "of" preposition. It gives a CN
;NP
.In German:
absolute_A : A = mkA "absolut" ;
value_N : N = mkN "Wert" "Werte" masculine ; -- In LexiconGer
abs_value_CN : CN = mkCN absolute_A value_N ; -- In LexiconX
mkNP the_Art (mkCN abs_value_CN (mkAdv possess_Prep obj)) ; -- In Arith1I
plus : [ValNum] -> ValNum
plus : ListNP -> NP
DefGenCN sum_CN (mkNP and_Conj terms)
ConsNP
).BaseNP x y
[ValNum]
ListNP
is basically a list of NP
which knows if there is 2 or more elements in it:
BaseValNum x y
ConsValNum x (BaseValNum y z)
ListNP
with the "and" conjunction to get a new NP
MathFunc
= Kind + Variable + NP
"Compute the integral of the function mapping x to the square of x from minus infinity to infinity."
Compute Num (fromNum (
defint_interval (lambda x (power2 (Var2Num x))) nums1_minus_infinity nums1_infinity))
Compute Num (fromNum (
defint_interval (lambda x (power2 (Var2Num x))) (unary_minus nums1_infinity) nums1_infinity))
power2
must be power (int2num 2)
(unary_minus nums1_infinity)
must be nums1_minus_infinity
(maybe?)defint_interval
must be defint
on interval_cc
:
Modifying the abstract tree.
GF is very limited on this (def
judgments).
The mgl GF library provides parsing/linearizing between 15 natural languages and an abstract representation similar to OpenMath. Tested for 3 languages.
Lexicon
LLexiconX
to support M