27
OAF: An O pen A rchive of F ormalizations Mihnea Iancu Jacobs University Bremen April 12, 2013 1 / 22

OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

OAF: An Open Archive of Formalizations

Mihnea Iancu

Jacobs University Bremen

April 12, 2013

1 / 22

Page 2: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Motivation

numerous deduction systems exist

most have associated formal libraries

many notions and results formalized in several libraries

individual libraries already too large to oversee

need for integration and management

2 / 22

Page 3: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

OAFF : Goals

an Open Archive of (Flexi)Formalizations

universal archiving solution for formal math libraries

generic wrt. logics and implementationsaware of the semantics

to provide meaningful services

content integration (for formal libraries)

active documentscommenting/rating/refereeing

dissemination channelsaggregate journals of formalizations

3 / 22

Page 4: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

OAF Architecture

Backend

MMT KernelLATIN logic graph

Databaseversioned XML database (TNTBase)

Frontend

Drupal content management systemPlanetary framework

4 / 22

Page 5: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

OAF Architecture

5 / 22

Page 6: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Current State

Archives

around 50GB of data

urtheories, LATIN, MML, TPTP, OpenMath

Services/Applications

change management via MMT

interactive browsing via MMT/JOBAD

search via MathWebSearch

discussion forums, local comments via Drupal/Planetary

Integration between MMT and Planetary still limited

6 / 22

Page 7: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Current State

Archives

around 50GB of data

urtheories, LATIN, MML, TPTP, OpenMath

Services/Applications

change management via MMT

interactive browsing via MMT/JOBAD

search via MathWebSearch

discussion forums, local comments via Drupal/Planetary

Integration between MMT and Planetary still limited

6 / 22

Page 8: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Archives (Mizar Mathematical Library)

7 / 22

Page 9: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Mizar Project

started around 1973

based on a variant of first order logic

design goal was to be simultaneously readable by mathematicians andverifiable by computer software

complex statement level declarationsdefinition, theorem, lemma, scheme, registration, notation, reservation

8 / 22

Page 10: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Mizar Mathematical Library

based on build-in Mizar notions and Tarski-Grothendieck set theory

contains articles formally verified by the Mizar system

articles are collected and organized by a library committee

latest version (4.181.1147) includes:

1150 articles written by 241 authors51762 theorems, 10158 definitions, 787 schemes, 11008 registrations,7501 symbols.

9 / 22

Page 11: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

MML Import

based on Josef Urban’s XML exportbased on constructor level language

uses declaration patterns to preserve structure of Mizar statementse.g definition, theorem, scheme

grounded on formalization of Mizar logic in LF

currently have two versions (1132 and 1147)

can use OMDoc-based services for (OMDoc)MML

10 / 22

Page 12: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

MML Import

11 / 22

Page 13: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Services (Search and Change Management)

12 / 22

Page 14: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Search

MathWebSearch (MWS) formula search engine

crawler subsystemscollect data from archives, convert to MWS harvests

core systembuilds search index from harvests, processes queries

RESTful interfaceHTTP API for interacting with the system

well integrated with MMT

13 / 22

Page 15: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Search in Mizar

14 / 22

Page 16: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

MoC in MMT

Management of Change

MoC usually involves

detect changessee if/how something changed

compute affected itemsmaintain some notion of dependency

handle/identify conflictsin SE typically re-compile e.g. Eclipse

Goals of MMT MoC

semantic differencing

fine-grained dependencies

impact propagation

some form of a validity guarantee

15 / 22

Page 17: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

MoC in MMT

Management of Change

MoC usually involves

detect changessee if/how something changed

compute affected itemsmaintain some notion of dependency

handle/identify conflictsin SE typically re-compile e.g. Eclipse

Goals of MMT MoC

semantic differencing

fine-grained dependencies

impact propagation

some form of a validity guarantee

15 / 22

Page 18: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Mmt Example

Mmt Notions

theories contain constant declarations

constants have components (type and definiens)

components represented as Mmt/OpenMath terms

URIs for each theory/constant/component

Rev1

PL = {bool : type⇒ : bool → bool → bool∧ : bool → bool → bool⇔: bool → bool → bool

= λx .λy .(x ⇒ y) ∧ (y ⇒ x)}

Rev2

PL = {form : type¬ : form→ form∧ : bool → bool → bool⇔: bool → bool → bool

= λx .λy .(x ⇒ y) ∧ (y ⇒ x)}

16 / 22

Page 19: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Mmt Example

Mmt Notions

theories contain constant declarations

constants have components (type and definiens)

components represented as Mmt/OpenMath terms

URIs for each theory/constant/component

Rev1

PL = {bool : type⇒ : bool → bool → bool∧ : bool → bool → bool⇔: bool → bool → bool

= λx .λy .(x ⇒ y) ∧ (y ⇒ x)}

Rev2

PL = {form : type¬ : form→ form∧ : bool → bool → bool⇔: bool → bool → bool

= λx .λy .(x ⇒ y) ∧ (y ⇒ x)}

16 / 22

Page 20: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Semantic Differencing

we extend Mmt with a language of (strict) changes

add (A) and delete (D) constantsupdate (U) components

Diff ∆ ::= · | ∆, δChange δ ::= A(T , c : ω = ω′) | D(T , c : ω = ω′) |

U(T , c, o, ω, ω′)Component o ::= tp | defBox Terms ω ::= ω | · ∗

17 / 22

Page 21: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Pragmatic Changes

composition of strict onese.g. rename as pair of add and delete

carry impact semanticse.g. for a rename update references

defined computationally (implemented)when can they be constructed, what is their change propagation

constructed in a separate refinement step

18 / 22

Page 22: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Fine-grained dependencies

in Mmt, validation units are individual components (types anddefiniens)

we distinguish two types of dependenciessyntactic dependencies

declaration levelfoundation-independentoccurs-in relation

semantic dependencies

component levelfoundation-dependenttrace lookups during foundational validation

dependencies are indexed by MMT and are available at any time

19 / 22

Page 23: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Fine-grained dependencies

in Mmt, validation units are individual components (types anddefiniens)

we distinguish two types of dependenciessyntactic dependencies

declaration levelfoundation-independentoccurs-in relation

semantic dependencies

component levelfoundation-dependenttrace lookups during foundational validation

dependencies are indexed by MMT and are available at any time

19 / 22

Page 24: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Impact Propagation

key idea : propagation as diff enrichment process

impact propagation of a diff ∆ is another diff ∆ that :

marks impacted componentsby surrounding with OpenMath error terms

automatically propagates pragmatic changesusing impact semantics

Theorem

After all error terms are replaced with valid terms in G � ∆� ∆, theresulting theory graph is valid.

20 / 22

Page 25: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Impact Propagation

key idea : propagation as diff enrichment process

impact propagation of a diff ∆ is another diff ∆ that :

marks impacted componentsby surrounding with OpenMath error terms

automatically propagates pragmatic changesusing impact semantics

Theorem

After all error terms are replaced with valid terms in G � ∆� ∆, theresulting theory graph is valid.

20 / 22

Page 26: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Workflow Example (relative to a graph G)

∆′ ∆′,∆′

G′ G′′

Propagator

Diffs

Graphs

Refiner

x − G G � x

21 / 22

Page 27: OAF: An Open Archive of Formalizations · Mizar Project started around 1973 based on a variant of rst order logic design goal was to be simultaneously readable by mathematicians and

Conclusion

Open Archive of Formalizations

integrate of formal librariesshare existing knowledge, make it available to new systems

provide MKM serviceschange management, search, presentation, forum-based discussions

separation of concernsknowledge formalization vs service/application development

22 / 22