Title: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?
1White-Box/Black-Box Principle in Expression
Manipulation How Much Can Be Automated?
- Rein Prank
- University of Tartu (Estonia)
- rein.prank_at_ut.ee
2- The paper analyzes known theoretical results
concerning the possibility to construct necessary
computational kernels forinput-based and
rule-based learning environments in step-by-step
expression manipulation.
3Content
- White Box/Black Box Principle and expression
manipulation dialog schemes - Results about decidability of equivalence of
expressions - Existence of complete set of rules
41. White Box/Black Box Principle andexpression
manipulation dialog schemes
5- Prof Buchberger proposed in 1990 White Box/Black
Box Principle for using symbolic mathematics
software in teaching/learning of mathematics
6- The Principle divides learning of area X into two
stages - In the stage where area X is new to the students
. Students have to study the area thoroughly,
i.e. they should study problems, basic concepts,
theorems, proofs, algorithms based on the
theorems, examples, hand calculations. - In the stage where area X has been thoroughly
studied, when hand calculations for simple
examples become routine and hand calculations for
complex examples become intractable, students
should be allowed and encouraged to use the
respective algorithms available in the symbolic
software systems.
7- The paper of 1990 does not speak about creating
of special programs for computer aided
teaching/learning - General-purpose mathematics software (CAS)
divides the roles between user and computer
corresponding to Black-Box stage of Principle. - But the White-Box stage seems to be left in 1
to traditional technology. - If we examine the situation today then we
discover that the expression manipulation
scenarios for both stages of Principle have been
implemented in educational software
8Black-Box Stage Rule-based dialog
- In 1990 B.Buchberger had in mind computer algebra
systems as software for Black-Box. But CASs tend
to have small number of too powerful rules - There exists at least one big program that
implements the Black-Box work better -MathXpert
Calculus Assistant (M.Beeson).The rules of this
program are approppriate for building of
step-by-step solutions
9Work with rule-based program MathXpert
- The student has marked a subexpression and the
program displays menu with applicable rules.
10- For White-Box learning stage not all the
activities can be computerized. - But hand calculations containing expression
manipulation can be- conversion of expressions
to required form, - solution of equations etc
11White-Box Stage Input-based dialog
- At White-Box stage the student should do
everything himself, having also possibility to do
mistakes. - This corresponds to Input-based dialog.
- Most well-known input-based learning program is
probably Aplusix (Nicaud et al, Grenoble
University)
12Work with input-based program Aplusix
- The student has copied the expression to next
line and changes now 10x14 to 2(5x7). The
crossed out sign of equality indicates that the
expressions are at the moment not yet equivalent.
13Theoretical requirements Input-based dialog
(White-Box )
- White-Box computerization of expression
manipulation has sense if the computer
provides feedback about correctness of the steps - Most important component of correctness is
equivalence with previous line - The program should contain an algorithm for
testing of equivalence (expressions, equations,
) - This is possible if equivalence is decidable
14Theoretical requirements for rule based dialog
(Black-Box)
- Assigned problems should be solvable using the
rules from the menu - Theoretical requirement existence of complete
set of rules is necessary
152. Results about decidability of equivalence of
expressions
- Negative results
- Positive results
- Testing by evaluation
16Definition of equivalence
- A(x1,,xn) and B(x1,,xn) are equivalent
?they represent identical functions i. e.
A(x1,,xn) and B(x1,,xn) are defined at the
same points and are equal wherever they are
defined - Some operations do not preserve equivalence
(reducing algebraic fractions )
17Positive results
- P1. First-order theory of structure ?R 0, 1, ,
-, ?, lt? is decidable (Tarski, 1951) - White-Box-related questions
- - whether two expressions are equivalent on R,
- whether an equation or equation system has
solution in R, - - whether two equations/inequalities/equation
systems are equivalent, - can be expressed by corresponding first-order
formulas ? are decidable - The original solution algorithm of Tarski is
essentially improved - Caviness, Johnson (ed.),
1998
18P2. Identity problem is solvable for expressions
in exponential ring ?N 0, 1, , -, ?, ?,lt?
- Richardson 1969,
- Macintyre 1981,
- Gurevic 1985.
- Main idea of testing the equivalence is
estimation of upper bound of the number of roots
of difference of two expressions - This allows make conclusion about equivalence if
the difference is zero in sufficiently many
points.
19P3. If Schanuels Conjecture (for R) is true then
first order theory ?R 0, 1, , -, ?, exp,lt?
isdecidable. (Macintyre, Wilkie 1996)
- Schanuels Conjecture
- If z1,...,zn are real numbers linearly
independent - over Q, then the extension field
- Q(z1,..., zn, exp(z1),...,exp(zn))
- has transcendence degree of at least n (over Q).
20Negative result
- N1. (Richardson 1968 Matiyasevich 1970).
- Let F denote the class of functions in one real
variable that can be defined by
expressionsconstructed from- variable x, -
integers and p, - addition, subtraction,
multiplication, sin, abs. - Then equivalence of expressions in F is
undecidable.
21CorollaryTrigonometry does not fit into White
Box
- We do not use abs very frequently. But abs can be
expressed by - x sqrt(x2)
- This means that the White-Box approach as it is
implemented in Aplusix cannot be generalized to
whole secondary school mathematics, especially to
trigonometry.
22Testing the equivalence by evaluation
- It is quite natural to compute for testing of
equivalence the values of two functions in some
sample of points, and to compare them - Some concretization of this approach is described
in Gonnet, 1984 and used in testeq procedure of
Maple. - It is also available a description of educational
application in University of Nebraska-Lincoln by
Fisher, 1999.
23Testing equivalence by evaluation (2)
- The key point of checking by evaluation is zero
testing of values of numerical expressions - The warning example is the value of quite simple
expression 3ln(640320)/sqrt(163). It differs
from ? less than 10-15.
24Testing equivalence by evaluation (3)
- One attempt to estimate the necessary precision
was made under name Uniformity Conjecture for
expressions composed from integers using four
arithmetical operations, roots, exp and log
Richardson, 2000. - The conjecture stated that the necessary amount
of base S precision is proportional to the length
of expanded expression - Counterexamples were found in subsequent studies
Richardson and El-Sonbathy, 2006. They have
1000 equal decimal digits for expressions of
length about 100 symbols. The ideas came from
higher order approximation methods.
25Testing equivalence by evaluation (4)
- Checking by evaluation does not discover the
differences that occur only inside of a set of
measure zero - Fisher warns also about expressions like
abs(1000-x) and 1000x where the sample values
can be too small for discovering the difference.
26Equivalence of logical expressions
- Equivalence problem for propositional formulas
can be solved using truth-tables. - A.Church proved in 1936 that there exists no
algorithm for decision of Entscheidungsproblem
(question whether a formula of predicate logic is
a consequence of a finite set of axioms). This
means also that there is no algorithm for
checking of equivalence in predicate logic. - In predicate logic the most well-known class of
expressions that has decidable equivalence
problem, is monadic logic (where the formulas
contain only predicates with one argument). - Corollary. Input-based expression manipulation
environment is possible for propositional logic
but not for predicate logic.
273. Existence of complete set of rules
28Polynomials
- Usual laws of ring together with numerical
calculations are sufficient for transformation of
every expression containing rational numbers,
variables, plus, minus, multiplication and
exponentiation by integer to any equivalent
expression. - This follows from the fact that any such
expression can be transformed to canonical form.
29Tarskis High School Algebra Problem
- Consider the structure ? N 1, , ?, ?? ,
where N is set of positive natural numbers. - Already Dedekinds monograph from 1888 Was sind
und was sollen die Zahlen? contains basic
identities for this structure
30High School Identities
- xy yx,
- x(yz) (xy)z,
- x?1 x,
- x?y y?x,
- x?(y?z) (x?y)?z,
- x?(yz) x?yx?z,
- 1 x 1,
- x 1 x,
- x yz x y?x z,
- (x?y) z x z?y z,
- (x y) z x y?z.
Tarski asked in sixties whether these identities
allow to prove all valid in N equalities
31- The answer is trivially positive for first six
basic identities and for equalities without
exponentiation. - Following research proved that the answer for
full system is negative.
32Wilkies identity
- In 1980 A.J.Wilkie built the following identity
W(x,y) and proved that it cannot be derived from
(1)-(11) - ((1x)y (1xx2)y)x ? ((1x3)x (1x2x4)x)y
- ((1x)x (1xx2)x)y ? ((1x3)y
(1x2x4)y)x - Wilkie used proof-theoretical methods in his
proof. - R. Gurevic constructed in 1985 a finite model of
axioms (1)-(11) containing 59 elements where
W(x,y) does not hold. - The paper of Burris and Yeats (2004) contains
countermodel with only 12 elements.
33How to build learning environment for ? N 1,
, ?, ?? ?
- Standard situation input-based design is
impossible but it is possible to build rule-based
environment. - Here we have reversed situation
- R. Gurevic proved in 1990 that there is no
finite set of identities that axiomatises the
identities of ? N 1, , ?, ?? . - But it follows from Macintyre 1981 that the
identities of ? N 1, , ?, ?? are
decidable.
34References
- M.Beeson. Design Principles of Mathpert Software
to support education in algebra and calculus, in
Kajler, N. (ed.) Computer-Human Interaction in
Symbolic Computation, pp. 89-115,
Springer-Verlag, Berlin/ Heidelberg/ New York
(1998). - M.Beeson. The mechanization of mathematics. In
Teuscher, C. (ed.) Alan Turing Life and Legacy
of a Great Thinker, pp. 77-134. Springer-Verlag,
Berlin Heidelberg New York, 2003. - W. S. Brown. Rational Exponential Expressions and
a Conjecture Concerning p and e. The American
Mathematical Monthly, Vol. 76, No. 1, 1969,
28-34. - S. Burris, K.Yeats, The Saga of the High School
Identities, Algebra Universalis, 52, No.23,
(2004), pp.325342, - B. F. Caviness. On Canonical Forms and
Simplification. Journal of ACM, Vol. 17, No. 2.
1970, 385-396. - B.F.Caviness, J.R.Johnson (eds.). Quantifier
Elimination and Cylindrical Algebraic
Decomposition. Springer, 1998. A.Church. A note
on Entscheidungsproblem. Journal of Symbolic
Logic, 1, 1936, 40-41. - J. H. Davenport Equality in Computer Algebra and
Beyond. Journal of Symbolic Computation, 34(4)
259-270 (2002) - M.Davis, H.Putnam, J.Robinson. The decision
problem for exponential Diophantine equations.
Annals of Mathematics, 74 (1961), 425-436.
35- R. Di Cosmo, T. Dufour. The Equational Theory of
?N, 0, 1, , , ?? Is Decidable, but Not Finitely
Axiomatisable. LNAI, 3452, 2005, 240-256. - J. Doner, A. Tarski. An extended arithmetic of
ordinal numbers. Fundamenta Mathematica, 65,
95127, 1969. - T.Fisher. Probabilistic Checks for the
Equivalence of Mathematical. A Senior Thesis by.
Travis Fisher. 1999 - www.cse.unl.edu/sscott/students/tfisher.pdf
- G. H. Gonnet. Determining Equivalence of
Expressions in Random Polynomial Time.
Proceedings of the 16th ACM Symposium on the
Theory of Computing, 1984, 334-341. - R. Gurevic. Equational theory of positive numbers
with exponentiation. Proceedings of the American
Mathematical Society, 94, No 1, 1985, 135-141. - R. Gurevic. Equational Theory of Positive
Numbers with Exponentiation is Not Finitely
Axiomatizable Annals of Pure and Applied Logic,
49, 1, 1990, 1-30. - A.Macintyre. The laws of exponentiation. Lecture
Notes in Mathematics, 890, 1981, 185-197. - A. Macintyre, A.J.Wilkie. On the decidability of
the real exponential field. P. Odifreddi (ed.)
Kreiseliana about and around Georg Kreisel.
A.K.Peters, 1996. 441-467. -
36- D.Richardson. Some unsolvable problems involving
elementary functions of a real variable.
J.Symbolic Logic 33 (1968), 514-520. - D.Richardson. Solution of the Identity Problem
for Integral Exponential Functions. Zeitschrift
für mathematical Logik und Grundlagen der
Mathematik. Vol. 15, 1969, 333-340. - D. Richardson. The Uniformity Conjecture.
Lecture Notes in Computer Science, 2064, 2000,
253-272. - D. Richardson, A. El-Sonbaty. Counterexamples to
the uniformity conjecture. Comput. Geom. 33(1-2),
58-64 (2006) - A.Tarski. A decision method for elementary
algebra and geometry. University of California
Press, Berkeley. 1951.