The Lean Theorem Prover



Similar documents
Indiana State Core Curriculum Standards updated 2009 Algebra I

Automated Theorem Proving - summary of lecture 1

ML for the Working Programmer

Deterministic Discrete Modeling

POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful

Functional Programming. Functional Programming Languages. Chapter 14. Introduction

Verifying Specifications with Proof Scores in CafeOBJ

LAKE ELSINORE UNIFIED SCHOOL DISTRICT

Full and Complete Binary Trees

The Factor Theorem and a corollary of the Fundamental Theorem of Algebra

MTH124: Honors Algebra I

Dependent Types at Work

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Bindings, mobility of bindings, and the -quantifier

The Relation between Two Present Value Formulae

Foundational Proof Certificates

Introduction to type systems

Verifying security protocols using theorem provers

Summary Last Lecture. Automated Reasoning. Outline of the Lecture. Definition sequent calculus. Theorem (Normalisation and Strong Normalisation)

Advanced Higher Mathematics Course Specification (C747 77)

Properties of Real Numbers

If n is odd, then 3n + 7 is even.

Handout #1: Mathematical Reasoning

ISU Department of Mathematics. Graduate Examination Policies and Procedures

Jieh Hsiang Department of Computer Science State University of New York Stony brook, NY 11794

M.S. Computer Science Program

µz An Efficient Engine for Fixed points with Constraints

Successful completion of Math 7 or Algebra Readiness along with teacher recommendation.

The Model Checker SPIN

FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z

System Description: The MathWeb Software Bus for Distributed Mathematical Reasoning

Linear-Quadratic Optimal Controller 10.3 Optimal Linear Control Systems

Georgia Department of Education Kathy Cox, State Superintendent of Schools 7/19/2005 All Rights Reserved 1

Answer Key for California State Standards: Algebra I

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

The program also provides supplemental modules on topics in geometry and probability and statistics.

ZQL. a cryptographic compiler for processing private data. George Danezis. Joint work with Cédric Fournet, Markulf Kohlweiss, Zhengqin Luo

A simple criterion on degree sequences of graphs

ALGEBRA 2 CRA 2 REVIEW - Chapters 1-6 Answer Section

Termination Checking: Comparing Structural Recursion and Sized Types by Examples

Access Code: RVAE4-EGKVN Financial Aid Code: 6A9DB-DEE3B-74F

Introduction to Algebraic Geometry. Bézout s Theorem and Inflection Points

How To Know If A Domain Is Unique In An Octempo (Euclidean) Or Not (Ecl)

Mathematics in Computer Science Curricula

So let us begin our quest to find the holy grail of real analysis.

26 Integers: Multiplication, Division, and Order

11 Ideals Revisiting Z

Software Engineering Transfer Degree

Computer-Assisted Theorem Proving for Assuring the Correct Operation of Software

Semester Review. CSC 301, Fall 2015

Mathematics Georgia Performance Standards

Firewall Builder Architecture Overview

Idris, a General Purpose Dependently Typed Programming Language: Design and Implementation

Precalculus REVERSE CORRELATION. Content Expectations for. Precalculus. Michigan CONTENT EXPECTATIONS FOR PRECALCULUS CHAPTER/LESSON TITLES

Lecture Notes on Polynomials

Discrete Math in Computer Science Homework 7 Solutions (Max Points: 80)

Overview. Essential Questions. Precalculus, Quarter 4, Unit 4.5 Build Arithmetic and Geometric Sequences and Series

Introducing Formal Methods. Software Engineering and Formal Methods

1.6 A LIBRARY OF PARENT FUNCTIONS. Copyright Cengage Learning. All rights reserved.

3. Mathematical Induction

Lecture 13 of 41. More Propositional and Predicate Logic

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)

Performance Level Descriptors Grade 6 Mathematics

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

Semantic Groundedness

Division of Mathematical Sciences

Static Program Transformations for Efficient Software Model Checking

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

Formal Verification and Linear-time Model Checking

MATH 22. THE FUNDAMENTAL THEOREM of ARITHMETIC. Lecture R: 10/30/2003

MATH. ALGEBRA I HONORS 9 th Grade ALGEBRA I HONORS

Nonlinear Algebraic Equations. Lectures INF2320 p. 1/88

Fixed-Point Logics and Computation

PROGRAM LOGICS FOR CERTIFIED COMPILERS

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

Unified Static and Runtime Verification of Object-Oriented Software

Zeros of Polynomial Functions

Domains and Competencies

Programming Languages & Tools

Notes on Determinant

Prentice Hall. California Edition of Algebra 1 - Classics Edition (Smith/Charles) Grade 8

For example, estimate the population of the United States as 3 times 10⁸ and the

Applications of formal verification for secure Cloud environments at CEA LIST

Microeconomics Sept. 16, 2010 NOTES ON CALCULUS AND UTILITY FUNCTIONS

Integer Operations. Overview. Grade 7 Mathematics, Quarter 1, Unit 1.1. Number of Instructional Days: 15 (1 day = 45 minutes) Essential Questions

MATH 2 Course Syllabus Spring Semester 2007 Instructor: Brian Rodas

Algebra I. In this technological age, mathematics is more important than ever. When students

Transcription:

The Lean Theorem Prover Jeremy Avigad Department of Philosophy and Department of Mathematical Sciences Carnegie Mellon University (Lean s principal developer is Leonardo de Moura, Microsoft Research, Redmond) September 2014

Automated theorem proving and formal verification Automated theorem proving: want powerful, fast methods Formal verification: want secure guarantees These pull in different directions

Automated theorem proving Domain general fast satisfiability methods equational theorem proving first-order theorem proving (resolution, tableau) Domain specific integer / linear arithmetic nonlinear real arithmetic numerical methods algebraic methods Combination methods aim to get the best of both worlds

Interactive theorem proving Some systems: Mizar, HOL, Isabelle, Coq, HOL-light, ACL2, PVS, Agda, The user works interactively with the system to construct a formal proof Design space: Logic: first-order, simple types, dependent types Classical vs constructive Interaction with computation (internal vs external)

Lean Aims to bring the two worlds together: An interactive theorem prover with powerful automation An automated reasoning tool that produces proofs, has a rich language, can be used interactively, and is built on a verified mathematical library

Lean The Lean theorem prover is being developed by Leonardo de Moura (Microsoft Research) Soonho Kong (CMU, a student of Ed s!) The Lean standard library is being developed by Jeremy Avigad (CMU) Floris van Doorn (CMU) Leonardo de Moura (Microsoft Research) Contributors Cody Roux (Draper) Robert Lewis (CMU) Parikshit Khanna (Indian Institute of Technology, Kanpur)

The logical framework Lean s default logical framework is a version of the Calculus of Constructions with: an impredicative, proof-irrelevant type Prop of propositions a non-cumulative hierarchy of universes, Type 1, Type 2, above Prop Features: universe polymorphism inductively defined types The core is constructive Can comfortably import classical logic Can work in homotopy type theory

inductive nat : Type := zero : nat, succ : nat nat namespace nat notation `N` := nat theorem zero_or_succ_pred (n : N) : n = 0 n = succ (pred n) := induction_on n (orinl rfl) (take m IH, orinr (show succ m = succ (pred (succ m)), from congr_arg succ pred_succ ¹))

inductive decidable (p : Prop) : Type := inl : p decidable p, inr : p decidable p theorem em (p : Prop) {H : decidable p} : p p := induction_on H (λ Hp, orinl Hp) (λ Hnp, orinr Hnp) theorem and_decidable [instance] {a b : Prop} (Ha : decidable a) (Hb : decidable b) : decidable (a b) theorem has_decidable_eq [instance] [protected] : decidable_eq N

The elaborator Can handle: Dependent type theory Implicit arguments, higher-order unification Overloading Coercions Type classes Features: No other proof system handles all of these The elaborator uses nonchronological backtracking It is really fast

The implementation Written in C++, for performance Functional data structures for backtracking, parallelization Small kernel (7,000 lines of C++ code) Lua bindings, for user-defined tactics and parser extensions

The user interface Features: text files, with unicode symbols emacs a Lean server tracking changes and answering queries flycheck checks in the background, highlights errors the ninja build system maintains dependencies the Lean server provides type information, goals robust autocompletion For a demo, see: https://asciinemaorg/a/12277

Short term goals A release in early 2015, with: A stable kernel and elaborator A stable user interface A basic tactic language Some automation (eg the term simplifier) The beginnings of a standard library: basic data types: nat, int, lists, algebraic structures: orderings, equivalence relations, groups, rings, categories, See: https://githubcom/leanprover/lean

Long terms goals A powerful system for reasoning about complex systems, reasoning about mathematics, and verifying claims about both