White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

36
White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated? Rein Prank University of Tartu (Estonia) [email protected]

description

White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?. Rein Prank University of T a rtu (Estonia ) r [email protected]. - PowerPoint PPT Presentation

Transcript of White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Page 1: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

White-Box/Black-Box Principle in Expression Manipulation: How Much

Can Be Automated?

Rein PrankUniversity of Tartu (Estonia)

[email protected]

Page 2: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

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.

Page 3: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Content

1. White Box/Black Box Principle and expression manipulation dialog schemes

2. Results about decidability of equivalence of expressions

3. Existence of complete set of rules

Page 4: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

1. White Box/Black Box Principle and

expression manipulation dialog schemes

Page 5: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Prof Buchberger proposed in 1990 White Box/Black Box Principle for using symbolic mathematics software in teaching/learning of mathematics

Page 6: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

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.

Page 7: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

• 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

Page 8: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

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

Page 9: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Work with rule-based program MathXpertThe student has marked a subexpression and the program displays menu with applicable rules.

Page 10: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

• 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

Page 11: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

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

Page 12: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Work with input-based program Aplusix

The student has copied the expression to next line and changes now 10x+14 to 2(5x+7). The crossed out sign of equality indicates that the expressions are at the moment not yet equivalent.

Page 13: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Theoretical 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

Page 14: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Theoretical 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

Page 15: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

2. Results about decidability of equivalence of expressions

• Negative results• Positive results• Testing by evaluation

Page 16: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

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

Page 17: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Positive resultsP1. First-order theory of structure R; 0, 1, +, -, ,

< 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 decidableThe original solution algorithm of Tarski is essentially

improved - Caviness, Johnson (ed.), 1998

Page 18: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

P2. Identity problem is solvable for expressions in exponential ring N; 0, 1, +, -, , ,<

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.

Page 19: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

P3. If Schanuel’s Conjecture (for R) is true then first order theory R; 0, 1, +, -, , exp,< isdecidable. (Macintyre, Wilkie 1996)

Schanuel’s Conjecture: If z1,...,zn are real numbers linearly independent

over Q, then the extension fieldQ(z1,..., zn, exp(z1),...,exp(zn))

has transcendence degree of at least n (over Q).

Page 20: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Negative 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 π, - addition, subtraction, multiplication, sin, abs.

Then equivalence of expressions in F is undecidable.

Page 21: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Corollary:Trigonometry 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.

Page 22: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

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

Page 23: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Testing 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 3*ln(640320)/sqrt(163). It differs from less than 10-15.

Page 24: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

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

Page 25: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Testing 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 1000–x where the sample values can be too small for discovering the difference.

Page 26: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Equivalence of logical expressionsEquivalence 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.

Page 27: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

3. Existence of complete set of rules

Page 28: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Polynomials

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.

Page 29: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Tarski’s High School Algebra Problem

Consider the structure N+; 1, +, , , where N+ is set of positive natural numbers.

Already Dedekind’s monograph from 1888 “Was sind und was sollen die Zahlen?” contains basic identities for this structure:

Page 30: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

High School Identities

1. x+y = y+x,2. x+(y+z) = (x+y)+z,3. x1= x,4. xy = yx,5. x(yz) = (xy)z,6. x(y+z) = xy+xz,

7. 1 x = 1, 8. x 1 = x,9. x y+z = x yx z, 10. (xy) z = x zy z,11. (x y) z = x yz.

Tarski asked in sixties whether these identities allow to prove all valid in N+ equalities

Page 31: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

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

Page 32: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

Wilkie’s identity

In 1980 A.J.Wilkie built the following identity W(x,y) and proved that it cannot be derived from (1)-(11):

((1+x)y + (1+x+x2)y)x ((1+x3)x + (1+x2+x4)x)y = = ((1+x)x + (1+x+x2)x)y ((1+x3)y + (1+x2+x4)y)x

Wilkie used proof-theoretical methods in his proof. R. Gurevič 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.

Page 33: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

How 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:

1. R. Gurevič proved in [1990] that there is no finite set of identities that axiomatises the identities of N+; 1, +, , .

2. But it follows from Macintyre [ 1981] that the identities of N+; 1, +, , are decidable.

Page 34: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

References

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

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

3. W. S. Brown. Rational Exponential Expressions and a Conjecture Concerning π and e. The American Mathematical Monthly, Vol. 76, No. 1, 1969, 28-34.

4. S. Burris, K.Yeats, The Saga of the High School Identities, Algebra Universalis, 52, No.2–3, (2004), pp.325–342,

5. B. F. Caviness. On Canonical Forms and Simplification. Journal of ACM, Vol. 17, No. 2. 1970, 385-396.

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

7. J. H. Davenport: Equality in Computer Algebra and Beyond. Journal of Symbolic Computation, 34(4): 259-270 (2002)

8. M.Davis, H.Putnam, J.Robinson. The decision problem for exponential Diophantine equations. Annals of Mathematics, 74 (1961), 425-436.

Page 35: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

9. R. Di Cosmo, T. Dufour. The Equational Theory of N, 0, 1, +, ×, ↑ Is Decidable, but Not Finitely Axiomatisable. LNAI, 3452, 2005, 240-256.

10. J. Doner, A. Tarski. An extended arithmetic of ordinal numbers. Fundamenta Mathematica, 65, 95–127, 1969.

11. T.Fisher. Probabilistic Checks for the Equivalence of Mathematical. A Senior Thesis by. Travis Fisher. 1999

12. www.cse.unl.edu/~sscott/students/tfisher.pdf13. 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.

14. R. Gurevič. Equational theory of positive numbers with exponentiation. Proceedings of the American Mathematical Society, 94, No 1, 1985, 135-141.

15. R. Gurevič. Equational Theory of Positive Numbers with Exponentiation is Not Finitely Axiomatizable Annals of Pure and Applied Logic, 49, 1, 1990, 1-30.

16. A.Macintyre. The laws of exponentiation. Lecture Notes in Mathematics, 890, 1981, 185-197.

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

Page 36: White-Box/Black-Box Principle in Expression Manipulation: How Much Can Be Automated?

18. D.Richardson. Some unsolvable problems involving elementary functions of a real variable. J.Symbolic Logic 33 (1968), 514-520.

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

20. D. Richardson. The Uniformity Conjecture. Lecture Notes in Computer Science, 2064, 2000, 253-272.

21. D. Richardson, A. El-Sonbaty. Counterexamples to the uniformity conjecture. Comput. Geom. 33(1-2), 58-64 (2006)

22. A.Tarski. A decision method for elementary algebra and geometry. University of California Press, Berkeley. 1951.