17
Linking HOL Light to Mathematica using OpenMath August26, 2014 Supervised by: Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by: Ons Seddiki

Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Embed Size (px)

Citation preview

Page 1: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Linking HOL Light to Mathematica using OpenMath

August26, 2014

Supervised by: Dr. Sofiène Tahar

Department of Electrical and Computer Engineering

Presented by: Ons Seddiki

Page 2: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Introduction

Proposed Methodology

Applications and Demo

Conclusion

Outline

Page 3: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Introduction

3

HOL Light

Mathematical Standard

OpenMath

 

Returned result

Numerical approaches:

Matlab

 

Theorem Provers:

Lego, Coq

 

Computer Algebra Systems:

Mathematica, Maple

 

Mathematica

Page 4: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

OpenMath

4

OpenMath

XML standard

Mathematical objects + semantic

Exchange between programs

Storage in databases

Publication in worldwide web

Page 5: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

OpenMath Architecture

OpenMath Object

EncodingObject

EncodingObject

OpenMath Object

A-Specific Rep

Program A

B-Specific Rep

Program B

Phrasebook A+CD

General Transport Layer

Phrasebook B+CD

OpenMath Encoding

OpenMath Encoding

5

Dalams (1997) An OpenMath 1.0 Implementation.

Page 6: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Proposed Methodology

Phrasebook*

HOL Light TranslatorOpenMath

Content Dictionaries

OpenMath to HOL LightHOL Light to OpenMath

Mathematica to OpenMathOpenMath to Mathematica

HOL Light

Mathematica

6

* Caprotti (2000) JAVA Phrasebooks for Computer Algebra and automated Deduction.

Page 7: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Proposed Methodology

Java Application

 

OCaml Units

 

 

HOL Light

Mathematica

HOL Light Input HOL Light Output

Parser & Splitter Parser & Collector

OpenMath-Mathematica Phrasebook

Mathematica Input Mathematica Output

OpenMathContent

Dictionaries

OpenMath

Object Input

OpenMath

Object Output

7

Page 8: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

OpenMath Input

HOL Light Input

Parser & Splitter

OpenMathContent

Dictionaries

OpenMath Object Input

Parsing HOL Light input

 Mapping to OpenMath objects

HOL Light Expression

‘‘string’’

Mathematica Function ‘‘string’’

Parser & Splitter

8

∫1

10

(𝑥3+2𝑥2−2𝑥+𝑦)

Page 9: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

OpenMath Output

OpenMath-Mathematica Phrasebook

OpenMath-Mathematica Phrasebook

9

OpenMathContent

Dictionaries

OpenMathObject Input

OpenMath Object Output

Parsing XML file

Mapping to Mathematica

Calling Mathematica kernel

Mapping to OpenMath Object

Page 10: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Parser & Collector

10

Parser & Collector

OpenMathContent

Dictionaries

OpenMath Object Output

Parsing XML file

 Mapping to HOL Light

HOL Light Output theorem

Execution time = 2.433s

Page 11: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Applications and Demo

Factoringpolynomials

11

Execution time = 2.355s

Page 12: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Execution time = 2.677s

Applications and Demo

Computation of Eigenvalues and Eigenvectors of a general matrix 2x2

12

Execution time = 2.296s

Page 13: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Boundary Condition of an Optical Interface

Applications and Demo

13

• The electromagnetic field satisfies the boundary condition

• Cross product between the normal to the interface and the summation of the electric fields and the magnetic fields at the interface

Page 14: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Boundary Condition of an Optical Interface

Applications and Demo

14

Execution time = 2.891s

Page 15: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Applications and Demo

15

Page 16: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki

Conclusion

Tool linking HOL Light to Mathematica using OpenMath

Improve and extend the grammar of the HOL Light translator

Implement a web service to access Mathematica

Implement connection to an open source CAS

16

HOL Light

Mathematical Standard

OpenMath

 

Returned result

Numerical approaches:

Matlab

 

Theorem Provers:

Lego, Coq

 Computer Algebra

Systems:Mathematica, Maple

 

Mathematica

Page 17: Linking HOL Light to Mathematica using OpenMath Supervised by:Dr. Sofiène Tahar Department of Electrical and Computer Engineering Presented by:Ons Seddiki