FormalizingLandau’sGrundlageninCoqhornung/BachelorThesis/firstTalk.pdf · Grundlagen derAnalysis...

19
Grundlagen der Analysis Coq Formalization Well-Ordering-Theorem Future work Formalizing Landau’s Grundlagen in Coq Carsten Hornung August 27, 2010 Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Transcript of FormalizingLandau’sGrundlageninCoqhornung/BachelorThesis/firstTalk.pdf · Grundlagen derAnalysis...

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Formalizing Landau’s Grundlagen in Coq

Carsten Hornung

August 27, 2010

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Table of contents

1 Grundlagen der AnalysisWho was Edmund Landau?Landau’s Grundlagen der Analysis

2 CoqWhat is Coq?Proofs in Coq

3 FormalizationWhat has been done so far and what’s the goal?Natural Numbers NFractions

4 Well-Ordering-TheoremTheorem itselfTheorem in Coq

5 Future workOverview

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Who was Edmund Landau?Landau’s Grundlagen der Analysis

Edmund Landau

1877-1938

German mathematician

Grundlagen der Analysis (1930)

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Who was Edmund Landau?Landau’s Grundlagen der Analysis

Edmund Landau - Grundlagen der Analysis

Natural Numbers, Peano Axioms

Construction of

FractionsRationalsRealsComplex Numbers

Basic theorems and their proofs (about 300)

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What is Coq?Proofs in Coq

Coq - an interactive proof system

Calculus of Inductive Constructions

Specification language Gallina

Supports:

defining functions and typesstating mathematical theoremsproving

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What is Coq?Proofs in Coq

Proofs in Coq

Consider all proofs as typed terms

To prove means to find a term with the right type

Tactics

Similar to natural deduction

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What has been done so far and what’s the goal?Natural Numbers N

Fractions

What has been done so far and what’s the goal?

L. van Benthem Jutting: A translation of Landau’s

”Grundlagen” in Automath (1976)

C. E. Brown: Translation of the ”Grundlagen” from

Automath to Coq (2009)

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What has been done so far and what’s the goal?Natural Numbers N

Fractions

What has been done so far and what’s the goal?

L. van Benthem Jutting: A translation of Landau’s

”Grundlagen” in Automath (1976)

C. E. Brown: Translation of the ”Grundlagen” from

Automath to Coq (2009)

Goal of my work:

To give an elegant construction of the Real Numbers in Coq

Landau’s Grundlagen as a roadmap

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What has been done so far and what’s the goal?Natural Numbers N

Fractions

Natural Numbers N

N = {1, 2, 3 . . . }

Inductive nat : Type :=

| O : nat

| S : nat -> nat

O as origin or one

S as the successor function

Coercion bool → Prop, (leq : nat → nat → bool)

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What has been done so far and what’s the goal?Natural Numbers N

Fractions

Fractions

Fractions = {x1

x2: x1, x2 ∈ N}

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What has been done so far and what’s the goal?Natural Numbers N

Fractions

Fractions

Fractions = {x1

x2: x1, x2 ∈ N}

Definition (Equivalence of Fractions)

∀x1, x2, y1, y2 ∈ N :

x1

x2∼

y1

y2:⇔ x1 · y2 = y1 · x2

Definition (Order of Fractions)

∀x1, x2, y1, y2 ∈ N :

x1

x2<

y1

y2:⇔ x1 · y2 < y1 · x2

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What has been done so far and what’s the goal?Natural Numbers N

Fractions

Fractions - Example Theorems

Theorem

∀x1, x2,∈ N : ∃y1, y2 ∈ N :

y1

y2<

x1

x2

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What has been done so far and what’s the goal?Natural Numbers N

Fractions

Fractions - Example Theorems

Theorem

∀x1, x2, y1, y2 ∈ N :

x1

x2<

y1

y2→ ∃z1, z2 ∈ N :

x1

x2<

z1

z2<

y1

y2

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

What has been done so far and what’s the goal?Natural Numbers N

Fractions

Fractions - Example Theorems

Theorem

∀x1, x2, y1, y2 ∈ N :

x1

x2<

y1

y2→ ∃z1, z2 ∈ N :

x1

x2<

z1

z2<

y1

y2

Proof.

Let z1 = x1 + y1 and z2 = x2 + y2 such that

x1

x2<

x1 + y1

x2 + y2<

y1

y2

(in detail on the board)

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Theorem itselfTheorem in Coq

Well-Ordering-Theorem

Theorem

Every nonempty set P ⊆ N has a least element m. That is an

element with the following property:

m ∈ P ∧ ∀x ∈ P : m ≤ x

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Theorem itselfTheorem in Coq

Well-Ordering-Theorem in Coq

Proof (Non-constructive version).

Given a set P with ∅ 6= P ⊆ N.

1 Let M = {x ∈ N | ∀y ∈ P : x ≤ y}.

2 Prove O ∈ M.

3 Prove ¬∀x ∈ N : x ∈ M.

4 Conclude ∃x ∈ N : x ∈ M ∧ S x /∈ M. (XM)5 Let m be this x .

Conclude ∀x ∈ P : m ≤ x (because m ∈ M).Conclude m ∈ P . (XM)

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Theorem itselfTheorem in Coq

Well-Ordering-Theorem in Coq

Version without the explicit use of excluded middle

Sets as predicates p : nat → bool

Construction of first : (nat → bool) → nat → nat

Fixpoint first (p:nat->bool) (x:nat) :=

match x with

| O => O

| S x => if p (first p x) then first p x else S x

end.

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Overview

Future work

Construction of the Rational Numbers based on Fractions

Construction of Real Numbers based on Cuts

Carsten Hornung Formalizing Landau’s Grundlagen in Coq

Grundlagen der AnalysisCoq

FormalizationWell-Ordering-Theorem

Future work

Overview

References

E. Landau : Grundlagen der Analysis (1930)

G. Smolka, C. E. Brown : Introduction to Computational

Logic (Lecture Notes SS 2010)

Y. Bertot, P. Casteran : Interactive Theorem Proving and

Program Development: Coq’Art: The Calculus of

Inductive Constructions (2004)

J. Harrison : Theorem Proving with the Real Numbers

(1998)

Carsten Hornung Formalizing Landau’s Grundlagen in Coq