Restoring Natural Language as a Computerised Mathematics Input - - PowerPoint PPT Presentation

restoring natural language as a computerised mathematics
SMART_READER_LITE
LIVE PREVIEW

Restoring Natural Language as a Computerised Mathematics Input - - PowerPoint PPT Presentation

Restoring Natural Language as a Computerised Mathematics Input Method Robert Lamar joint work with Fairouz Kamareddine Manuel Maarek J. B. Wells ULTRA group, Heriot-Watt University http://www.macs.hw.ac.uk/ultra/ 30 June 2007 Mathematical


slide-1
SLIDE 1

Restoring Natural Language as a Computerised Mathematics Input Method

Robert Lamar

joint work with Fairouz Kamareddine Manuel Maarek

  • J. B. Wells

ULTRA group, Heriot-Watt University http://www.macs.hw.ac.uk/ultra/

30 June 2007 Mathematical Knowledge Management conference RISC, Hagenburg, Austria

slide-2
SLIDE 2

A Bit of Mathematics

CML There is an element −a in R such that a + (−a) = 0 for all a in R.

slide-3
SLIDE 3

A Bit of Mathematics

In a variety of languages

CML There is an element −a in R such that a + (−a) = 0 for all a in R. Mizar ex b being Element of R st a + b = 0. Isar a ∈ R = ⇒ -a ∈ R ∧ a + -a = 0 . Omega (inverse-exist R op (struct-unit R op)).

slide-4
SLIDE 4

A Bit of Mathematics

In a variety of languages

CML There is an element −a in R such that a + (−a) = 0 for all a in R. Mizar ex b being Element of R st a + b = 0. Isar a ∈ R = ⇒ -a ∈ R ∧ a + -a = 0 . Omega (inverse-exist R op (struct-unit R op)). Goal: Smoothing and strengthening transitions.

slide-5
SLIDE 5

MathLang grammatical categories

term Common mathematical objects. “R”, “0”, “a + b” set Sets of mathematical objects. “R” noun Categories to classify terms “ring” adjective Modifiers for nouns “Abelian” statement Assertions of truth “a = b” declaration Type signature designations “Addition is denoted a + b” definition New symbol introductions “A ring is. . . ” step A group of mathematical “We have. . . assertions. . . . and also. . . ” context Assertions preliminary to a step “Given a ring R, . . . ”

slide-6
SLIDE 6

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-7
SLIDE 7

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-8
SLIDE 8

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-9
SLIDE 9

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-10
SLIDE 10

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-11
SLIDE 11

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-12
SLIDE 12

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-13
SLIDE 13

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-14
SLIDE 14

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-15
SLIDE 15

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-16
SLIDE 16

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-17
SLIDE 17

Example

There is an element - a in R such that a + ( - a ) = 0 for all a in R .

slide-18
SLIDE 18

Anatomy of a box

<interp>contents

Color Grammatical category Contents Original mathematics <interp> Logical interpretation

slide-19
SLIDE 19

Anatomy of a box

<interp>contents

Color Grammatical category Contents Original mathematics <interp> Logical interpretation Examples:

<equal> a is equal to b <equal> a = b <ident> a = b <A>A <reals>R <inter> <apples>A ∩ <oranges>O

slide-20
SLIDE 20

Another Example

a = b = c

slide-21
SLIDE 21

Another Example

a = b = c

slide-22
SLIDE 22

Another Example

a = b = c

slide-23
SLIDE 23

Another Example

a = b = c What next?

slide-24
SLIDE 24

Another Example

a = b b = c ?

slide-25
SLIDE 25

Another Example

a = b b = c ?

slide-26
SLIDE 26

What does this mean?

How do we cope?

a = b = c

slide-27
SLIDE 27

What does this mean?

How do we cope?

a = b = c

◮ Compound statement ◮ Short for “a = b and b = c” ◮ Must be translated before computerisation

slide-28
SLIDE 28

The ULTRA Solution

Syntax Sugaring

Syntax sugaring:

◮ Common in many computer languages ◮ Used for pretty-printing ◮ Eases human use of languages ◮ Always: nice for computers −

→ nice for humans

slide-29
SLIDE 29

The ULTRA Solution

Syntax Sugaring vs. Syntax Souring

Syntax sugaring:

◮ Common in many computer languages ◮ Used for pretty-printing ◮ Eases human use of languages ◮ Always: nice for computers −

→ nice for humans Syntax souring:

◮ A new transformation: Syntax souring ◮ Syntax souring solves the problem of a = b = c. ◮ Other direction: nice for humans −

→ nice for computers

slide-30
SLIDE 30

The ULTRA Solution

Another look at the problem

a = b = c

◮ The relation “=” is binary: it takes two arguments ◮ The term “b”:

◮ Appears only once ◮ Is actually provided as argument twice ◮ Is “shared”

◮ Goal: tell = to be nice and share

slide-31
SLIDE 31

The ULTRA Solution

a = b = c

slide-32
SLIDE 32

The ULTRA Solution

a = b = c

slide-33
SLIDE 33

The ULTRA Solution

a = b = c

slide-34
SLIDE 34

The ULTRA Solution

a =

<share> b

= c

slide-35
SLIDE 35

The ULTRA Solution

a =

<share> b

= c a = b b = c

slide-36
SLIDE 36

Kinds of Souring

share Natural splitting of single argument chain More flexible forwarding of entities fold Recursion upon lists map Iteration over lists position Reordering of arguments

  • Duplication
  • List operations
  • Reordering
slide-37
SLIDE 37

Kinds of Souring: Duplication

share • chain • fold • map • position

<eq> a <shared> b <eq> c souring

− − − − → <eq> a b

<eq> b c

slide-38
SLIDE 38

Kinds of Souring: Duplication

share • chain • fold • map • position

and and eq w = hook x eq loop = hook y eq loop = z and and eq w x eq x y eq y z

slide-39
SLIDE 39

Kinds of Souring: Lists

share • chain • fold • map • position

fold-right forall for all list a a, b b in R R base eq a + b = b + a forall a R forall b R eq a + b = b + a fold-right abstrλ list x , y . base x + y . abstrλ x . abstrλ y . x + y

slide-40
SLIDE 40

Kinds of Souring: Lists

share • chain • fold • map • position

map Let list aa and bb belong to Ra ring R a R b R

slide-41
SLIDE 41

Kinds of Souring: Reordering

share • chain • fold • map • position

in position 2 RR

contains

position 1 aa in a R

slide-42
SLIDE 42

Conclusion

◮ Five kinds of souring:

share • chain • fold • map • position

◮ Common goal: elucidating the intent of language ◮ Future Work:

◮ Look for other souring needs ◮ Automate the annotation process ◮ Identify appropriate granularity for annotation ◮ Arrive at recommendations/conventions for annotation ◮ Cope with ellipsis.

n times

  • x + . . . + x

22...2 1 1 +

1 1+···

slide-43
SLIDE 43

Text and Symbol Box Annotation Souring annotation Souring Examples Conclusion