Skip to main content

Tipp

Weitere Artikel dieser Ausgabe durch Wischen aufrufen

Erschienen in: Journal of Automated Reasoning 2/2022

30.01.2022

A Bi-Directional Extensible Interface Between Lean and Mathematica

verfasst von: Robert Y. Lewis, Minchao Wu

Erschienen in: Journal of Automated Reasoning | Ausgabe 2/2022

Einloggen, um Zugang zu erhalten
share
TEILEN

Abstract

We implement a user-extensible ad hoc connection between the Lean proof assistant and the computer algebra system Mathematica. By reflecting the syntax of each system in the other and providing a flexible interface for extending translation, our connection allows for the exchange of arbitrary information between the two systems. We show how to make use of the Lean metaprogramming framework to verify certain Mathematica computations, so that the rigor of the proof assistant is not compromised. We also use Mathematica as an untrusted oracle to guide proof search in the proof assistant and interact with a Mathematica notebook from within a Lean session. In the other direction, we import and process Lean declarations from within Mathematica. The proof assistant library serves as a database of mathematical knowledge that the CAS can display and explore.

Sie möchten Zugang zu diesem Inhalt erhalten? Dann informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 69.000 Bücher
  • über 500 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt 90 Tage mit der neuen Mini-Lizenz testen!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 58.000 Bücher
  • über 300 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko





Jetzt 90 Tage mit der neuen Mini-Lizenz testen!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 50.000 Bücher
  • über 380 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe



 


Jetzt 90 Tage mit der neuen Mini-Lizenz testen!

Literatur
1.
3.
Zurück zum Zitat Bailey, D.H., Borwein, J.M., Kapoor, V., Weisstein, E.W.: Ten problems in experimental mathematics. Am. Math. Mon. 113(6), 481–509 (2006) MathSciNetCrossRef Bailey, D.H., Borwein, J.M., Kapoor, V., Weisstein, E.W.: Ten problems in experimental mathematics. Am. Math. Mon. 113(6), 481–509 (2006) MathSciNetCrossRef
4.
5.
Zurück zum Zitat Ballarin, C., Paulson, L.C.: A pragmatic approach to extending provers by computer algebra. Fund. Inform. 39(1–2), 1–20 (1999). Symbolic computation and related topics in artificial intelligence (Plattsburg, NY, 1998) Ballarin, C., Paulson, L.C.: A pragmatic approach to extending provers by computer algebra. Fund. Inform. 39(1–2), 1–20 (1999). Symbolic computation and related topics in artificial intelligence (Plattsburg, NY, 1998)
7.
Zurück zum Zitat Besson, F.: Fast reflexive arithmetic tactics the linear case and beyond. In: Altenkirch, T., McBride, C. (eds.) Types for Proofs and Programs, pp. 48–62. Springer, Berlin (2007) CrossRef Besson, F.: Fast reflexive arithmetic tactics the linear case and beyond. In: Altenkirch, T., McBride, C. (eds.) Types for Proofs and Programs, pp. 48–62. Springer, Berlin (2007) CrossRef
8.
Zurück zum Zitat Blanchette, J., Nipkow, T.: Nitpick: A counterexample generator for higher-order logic based on a relational model finder. Interactive Theorem Proving, pp. 131–146 (2010) Blanchette, J., Nipkow, T.: Nitpick: A counterexample generator for higher-order logic based on a relational model finder. Interactive Theorem Proving, pp. 131–146 (2010)
9.
Zurück zum Zitat Blanchette, J.C., Kaliszyk, C., Paulson, L.C., Urban, J.: Hammering towards QED. J. Formaliz. Reason. 9(1), 101–148 (2016) MathSciNetMATH Blanchette, J.C., Kaliszyk, C., Paulson, L.C., Urban, J.: Hammering towards QED. J. Formaliz. Reason. 9(1), 101–148 (2016) MathSciNetMATH
11.
Zurück zum Zitat Bronstein, M.: it-a strongly-typed embeddable computer algebra library. In: International Symposium on Design and Implementation of Symbolic Computation Systems, pp. 22–33. Springer (1996) Bronstein, M.: it-a strongly-typed embeddable computer algebra library. In: International Symposium on Design and Implementation of Symbolic Computation Systems, pp. 22–33. Springer (1996)
14.
Zurück zum Zitat Chyzak, F., Mahboubi, A., Sibut-Pinote, T., Tassi, E.: A computer-algebra-based formal proof of the irrationality of \(\zeta \)(3). In: Klein, G., Gamboa, R. (eds.) Interactive Theorem Proving, pp. 160–176. Springer International Publishing, Cham (2014) CrossRef Chyzak, F., Mahboubi, A., Sibut-Pinote, T., Tassi, E.: A computer-algebra-based formal proof of the irrationality of \(\zeta \)(3). In: Klein, G., Gamboa, R. (eds.) Interactive Theorem Proving, pp. 160–176. Springer International Publishing, Cham (2014) CrossRef
17.
Zurück zum Zitat Daly, T.: Axiom: The 30 year horizon. Lulu Incorporated (2005) Daly, T.: Axiom: The 30 year horizon. Lulu Incorporated (2005)
20.
Zurück zum Zitat van Doorn, F., Ebner, G., Lewis, R.Y.: Maintaining a library of formal mathematics. In: Benzmüller, C., Miller, B. (eds.) Intelligent Computer Mathematics, pp. 251–267. Springer International Publishing, Cham (2020) CrossRef van Doorn, F., Ebner, G., Lewis, R.Y.: Maintaining a library of formal mathematics. In: Benzmüller, C., Miller, B. (eds.) Intelligent Computer Mathematics, pp. 251–267. Springer International Publishing, Cham (2020) CrossRef
21.
Zurück zum Zitat Ebner, G., Ullrich, S., Roesch, J., Avigad, J., de Moura, L.: A metaprogramming framework for formal verification. Proc. ACM Program. Lang. 1(ICFP), 34 (2017) CrossRef Ebner, G., Ullrich, S., Roesch, J., Avigad, J., de Moura, L.: A metaprogramming framework for formal verification. Proc. ACM Program. Lang. 1(ICFP), 34 (2017) CrossRef
22.
Zurück zum Zitat Ford, I.: Semantic representation of general topology in the Wolfram Language. In: H. Geuvers, M. England, O. Hasan, F. Rabe, O. Teschke (eds.) Intelligent Computer Mathematics—10th International Conference, CICM 2017, Edinburgh, UK, July 17–21, Proceedings, Lecture Notes in Computer Science (2017). https://​doi.​org/​10.​1007/​978-3-319-62075-6_​12 Ford, I.: Semantic representation of general topology in the Wolfram Language. In: H. Geuvers, M. England, O. Hasan, F. Rabe, O. Teschke (eds.) Intelligent Computer Mathematics—10th International Conference, CICM 2017, Edinburgh, UK, July 17–21, Proceedings, Lecture Notes in Computer Science (2017). https://​doi.​org/​10.​1007/​978-3-319-62075-6_​12
26.
Zurück zum Zitat Kaliszyk, C., Wiedijk, F.: Certified computer algebra on top of an interactive theorem prover. In: Proceedings of the 14th Symposium on Towards Mechanized Mathematical Assistants: 6th International Conference, Calculemus ’07 / MKM ’07, pp. 94–105. Springer-Verlag, Berlin, Heidelberg (2007). https://​doi.​org/​10.​1007/​978-3-540-73086-6_​8 Kaliszyk, C., Wiedijk, F.: Certified computer algebra on top of an interactive theorem prover. In: Proceedings of the 14th Symposium on Towards Mechanized Mathematical Assistants: 6th International Conference, Calculemus ’07 / MKM ’07, pp. 94–105. Springer-Verlag, Berlin, Heidelberg (2007). https://​doi.​org/​10.​1007/​978-3-540-73086-6_​8
28.
Zurück zum Zitat Lewis, R.Y.: An extensible ad hoc interface between Lean and Mathematica. In: C. Dubois, B.W. Paleo (eds.) Proceedings of the Fifth Workshop on Proof eXchange for Theorem Proving, PxTP 2017, Brasília, Brazil, 23-24 September 2017, EPTCS, vol. 262, pp. 23–37 (2017). https://​doi.​org/​10.​4204/​EPTCS.​262.​4 Lewis, R.Y.: An extensible ad hoc interface between Lean and Mathematica. In: C. Dubois, B.W. Paleo (eds.) Proceedings of the Fifth Workshop on Proof eXchange for Theorem Proving, PxTP 2017, Brasília, Brazil, 23-24 September 2017, EPTCS, vol. 262, pp. 23–37 (2017). https://​doi.​org/​10.​4204/​EPTCS.​262.​4
32.
Zurück zum Zitat de Moura, L., Bjørner, N.: Z3: An efficient SMT solver. In: TACAS, pp. 337–340 (2008) de Moura, L., Bjørner, N.: Z3: An efficient SMT solver. In: TACAS, pp. 337–340 (2008)
33.
Zurück zum Zitat de Moura, L., Kong, S., Avigad, J., van Doorn, F., von Raumer, J.: The Lean theorem prover (system description). In: Felty, A.P., Middeldorp, A. (eds.) Automated Deduction - CADE-25, pp. 378–388. Springer International Publishing, Cham (2015) CrossRef de Moura, L., Kong, S., Avigad, J., van Doorn, F., von Raumer, J.: The Lean theorem prover (system description). In: Felty, A.P., Middeldorp, A. (eds.) Automated Deduction - CADE-25, pp. 378–388. Springer International Publishing, Cham (2015) CrossRef
34.
Zurück zum Zitat de Moura, L., Ullrich, S.: The Lean 4 theorem prover and programming language. In: Platzer, A., Sutcliffe, G. (eds.) Automated Deduction - CADE 28, pp. 625–635. Springer International Publishing, Cham (2021) CrossRef de Moura, L., Ullrich, S.: The Lean 4 theorem prover and programming language. In: Platzer, A., Sutcliffe, G. (eds.) Automated Deduction - CADE 28, pp. 625–635. Springer International Publishing, Cham (2021) CrossRef
36.
Zurück zum Zitat Rabe, F.: The MMT API: a generic MKM system. In: International Conference on Intelligent Computer Mathematics, pp. 339–343. Springer (2013) Rabe, F.: The MMT API: a generic MKM system. In: International Conference on Intelligent Computer Mathematics, pp. 339–343. Springer (2013)
37.
Zurück zum Zitat Schrijver, A.: Theory of linear and integer programming. Wiley-Interscience Series in Discrete Mathematics. John Wiley & Sons Ltd., Chichester. A Wiley-Interscience Publication (1986) Schrijver, A.: Theory of linear and integer programming. Wiley-Interscience Series in Discrete Mathematics. John Wiley & Sons Ltd., Chichester. A Wiley-Interscience Publication (1986)
39.
Zurück zum Zitat Ullrich, S., de Moura, L.: Beyond notations: Hygienic macro expansion for theorem proving languages. In: Peltier, N., Sofronie-Stokkermans, V. (eds.) Automated Reasoning, pp. 167–182. Springer International Publishing, Cham (2020) CrossRef Ullrich, S., de Moura, L.: Beyond notations: Hygienic macro expansion for theorem proving languages. In: Peltier, N., Sofronie-Stokkermans, V. (eds.) Automated Reasoning, pp. 167–182. Springer International Publishing, Cham (2020) CrossRef
40.
Zurück zum Zitat Williams, H.: Fourier’s method of linear programming and its dual. The American Mathematical Monthly 93(9), 681–695 (1986) Williams, H.: Fourier’s method of linear programming and its dual. The American Mathematical Monthly 93(9), 681–695 (1986)
Metadaten
Titel
A Bi-Directional Extensible Interface Between Lean and Mathematica
verfasst von
Robert Y. Lewis
Minchao Wu
Publikationsdatum
30.01.2022
Verlag
Springer Netherlands
Erschienen in
Journal of Automated Reasoning / Ausgabe 2/2022
Print ISSN: 0168-7433
Elektronische ISSN: 1573-0670
DOI
https://doi.org/10.1007/s10817-021-09611-1

Premium Partner