Refactoring of Theory Graphs in Knowledge Representation Systems Bachelor Thesis in Computer Science Navid Roux navid.roux@fau.de Advisors: Prof. Dr. Michael Kohlhase, PD Dr. Florian Rabe Friedrich-Alexander-Universität Erlangen-Nürnberg Dear online visitor, want to dig into this topic? Have a look at the reading guide at the end: Jump to Reading Guide N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 1 / 46 15 th July 2019 15 th July 2019
Plan 1 Introduction 2 MMT 3 Framework for Generalization Refactorings 4 App-Gen 5 Conclusion N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 2 / 46 15 th July 2019
Refactorings “Improve internal structure without changing observable behavior.” “Neither add nor remove features.” N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 3 / 46 15 th July 2019
Refactorings “Improve internal structure without changing observable behavior.” “Neither add nor remove features.” N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 3 / 46 15 th July 2019
Refactorings on Theory Graphs Objective: Help in creation & maintenance of formalizations Reason: need for formalization verify pen & paper theorems feed MKM N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 4 / 46 15 th July 2019
Need For Formalization Four Color Theorem N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 5 / 46 Source: Inductiveload on Wikimedia Commons, CC BY-SA 3.0 15 th July 2019
Need For Formalization Kepler Conjecture N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 6 / 46 Source: Mike Licht on Flickr, CC BY 2.0 15 th July 2019
Need For Formalization Feit-Thompson Theorem N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 7 / 46 Source: A. W. Walker on awwalker.com 15 th July 2019
Need For Formalization – MKM Perspective Operations on mathematical knowledge cataloguing retrieval refactoring change propagation Overcome One-Brain-Barrier & drive data analytics ⇒ need for formalization Generalization Refactorings improve induced knowledge space N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 8 / 46 15 th July 2019
Need For Formalization – MKM Perspective Operations on mathematical knowledge cataloguing retrieval refactoring change propagation Overcome One-Brain-Barrier & drive data analytics ⇒ need for formalization Generalization Refactorings improve induced knowledge space N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 8 / 46 15 th July 2019
Contribution Focussing on refactorings to generalize, provide Framework for generalization refactorings Two principles App-Gen “application of ex. generalization” Theory Splitting omitted in presentation IntelliJ plugin GUI for App-Gen on top of the MMT plugin N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 9 / 46 15 th July 2019
Plan 1 Introduction 2 MMT 3 Framework for Generalization Refactorings 4 App-Gen 5 Conclusion N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 10 / 46 15 th July 2019
⇒ Organize knowledge into theories and morphisms MMT What is it? Scalable module system for knowledge representation esp. formal knowledge Theoretical framework and implemented system “MMT” vs. “MMT system” Goals Foundation independence Minimalistic design Standardized representation format N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 11 / 46 15 th July 2019
⇒ Organize knowledge into theories and morphisms MMT What is it? Scalable module system for knowledge representation esp. formal knowledge Theoretical framework and implemented system “MMT” vs. “MMT system” Goals Foundation independence Minimalistic design Standardized representation format N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 11 / 46 15 th July 2019
⇒ Organize knowledge into theories and morphisms MMT What is it? Scalable module system for knowledge representation esp. formal knowledge Theoretical framework and implemented system “MMT” vs. “MMT system” Goals Foundation independence Minimalistic design Standardized representation format N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 11 / 46 15 th July 2019
⇒ Organize knowledge into theories and morphisms MMT What is it? Scalable module system for knowledge representation esp. formal knowledge Theoretical framework and implemented system “MMT” vs. “MMT system” Goals Foundation independence Minimalistic design Standardized representation format N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 11 / 46 15 th July 2019
⇒ Organize knowledge into theories and morphisms MMT What is it? Scalable module system for knowledge representation esp. formal knowledge Theoretical framework and implemented system “MMT” vs. “MMT system” Goals Foundation independence Minimalistic design Standardized representation format N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 11 / 46 15 th July 2019
MMT What is it? Scalable module system for knowledge representation esp. formal knowledge Theoretical framework and implemented system “MMT” vs. “MMT system” Goals Foundation independence Minimalistic design Standardized representation format ⇒ Organize knowledge into theories and morphisms N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 11 / 46 15 th July 2019
MMT Theories N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 12 / 46 theory Monoid = include ?LF ❙ include ?NatDed ❙ U: type ❙ e: U ❙ op: U ⟶ U ⟶ U ❘ # #1 ∘ #2 ❙ associative: ⊦ ∀ [a: U] ∀ [b: U] ∀ [c: U] (a ∘ b) ∘ c ≐ a ∘ (b ∘ c) ❙ neutral: U ⟶ prop ❘ = [e'] ∀ [a: U] (a ∘ e' ≐ a) ∧ (e' ∘ a ≐ a) ❙ e_neutral: ⊦ neutral e ❙ e_unique: ⊦ ∀ [e': U] (neutral e') ⟹ e' ≐ e ❘ = … ❙ /T Proof omitted ❙ ❚ 15 th July 2019
MMT Morphisms Primer Refactoring Theory Graphs N. Roux (FAU Erlangen-Nürnberg) 13 / 46 Morphisms 𝑇 ⇝ 𝑈 assign every 𝑇 -declaration a 𝑈 -expression Consider theory Monoid = theory Nat = U: type ❙ ℕ: type ❙ e: U ❙ 0: ℕ ❙ op: U ⟶ U ⟶ U ❙ s: ℕ ⟶ ℕ ❙ associative: … ❙ /T Peano axioms … ❙ neutral: … ❘ = … ❙ e_neutral: … ❙ plus: ℕ ⟶ ℕ ⟶ ℕ ❘ = … ❙ e_unique: … ❘ = … ❙ ❚ One possibility: U ↦ ℕ , e ↦ 0 , op ↦ plus , … 15 th July 2019
MMT Morphisms Primer (cont.) Only need assignment to undefjned declarations Gives rise to homomorphic extension 𝜏 ∶ Obj ( Monoid ) → Obj ( Nat ) N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 14 / 46 view σ : Monoid -> Nat = U = ℕ ❙ e = 0 ❙ op = plus ❙ associative = … ❙ e_neutral = … ❙ ❚ 15 th July 2019
MMT Morphisms Truth Preservation Refactoring Theory Graphs N. Roux (FAU Erlangen-Nürnberg) Morphisms translate theorems to theorems. Corollary (Truth Preservation) 𝜏( e _ unique ) Then we get 15 / 46 Assume well-typedness everywhere. theory Monoid = // … ❙ e_unique: ⊦ ∀ [e': U] (neutral e') ⟹ e' ≐ e ❘ = … ❙ /T Proof omitted ❙ ❚ : ⊦ ∀ [n: ℕ] (neutral n) ⟹ n ≐ 0 = … 15 th July 2019
MMT Morphisms Truth Preservation Refactoring Theory Graphs N. Roux (FAU Erlangen-Nürnberg) Morphisms translate theorems to theorems. Corollary (Truth Preservation) 𝜏( e _ unique ) Then we get 15 / 46 Assume well-typedness everywhere. theory Monoid = // … ❙ e_unique: ⊦ ∀ [e': U] (neutral e') ⟹ e' ≐ e ❘ = … ❙ /T Proof omitted ❙ ❚ : ⊦ ∀ [n: ℕ] (neutral n) ⟹ n ≐ 0 = … 15 th July 2019
MMT Morphisms Meaning They represent syntactically translation specialization refjnement from poorer into richer theories. Model-theoretically they represent model induction of more general models every Nat -model induces a Monoid -model. TopologicalSpace ⇝ MetricSpace ⇝ NormedVectorSpace ⇝ HilbertSpace N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 16 / 46 15 th July 2019
MMT Morphisms Meaning They represent syntactically translation specialization refjnement from poorer into richer theories. Model-theoretically they represent model induction of more general models every Nat -model induces a Monoid -model. TopologicalSpace ⇝ MetricSpace ⇝ NormedVectorSpace ⇝ HilbertSpace N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 16 / 46 15 th July 2019
MMT Morphisms Meaning They represent syntactically translation specialization refjnement from poorer into richer theories. Model-theoretically they represent model induction of more general models every Nat -model induces a Monoid -model. TopologicalSpace ⇝ MetricSpace ⇝ NormedVectorSpace ⇝ HilbertSpace N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 16 / 46 15 th July 2019
MMT Morphisms Meaning They represent syntactically translation specialization refjnement from poorer into richer theories. Model-theoretically they represent model induction of more general models every Nat -model induces a Monoid -model. TopologicalSpace ⇝ MetricSpace ⇝ NormedVectorSpace ⇝ HilbertSpace N. Roux (FAU Erlangen-Nürnberg) Refactoring Theory Graphs 16 / 46 15 th July 2019
Recommend
More recommend