37
GeoProof: A user interface for formal proofs in geometry. Julien Narboux CNRS, LSIIT, Universit´ e de Strasbourg 2010, Castro Urdiales

GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

  • Upload
    lycong

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

GeoProof: A user interface for formal proofs ingeometry.

Julien Narboux

CNRS, LSIIT, Universite de Strasbourg

2010, Castro Urdiales

Page 2: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Outline

1 Related work and motivations

2 A general presentation of GeoProof

3 Proof related features

Page 3: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Dynamic Geometry.

There are quite many dynamic geometry software :

Baghera, Cabri Euclide, Cabri Geometer, CaR, Chypre, Cinderella,Declic, Defi, Dr. Geo, Euclid, Euklid DynaGeo, Eukleides, Gava,GCLC, GeoExp, GeoFlash, Geogebra, GeoLabo, Geometria,Geometrix, Geometry Explorer, Geometry Tutor, GeoPlanW,GeoSpaceW, GEUP, GeoView, GEX, GRACE, iGeom, KGeo, KIG,Non-Euclid, Sketchpad, Trace en poche, XCas . . .

Page 4: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Dynamic Geometry.

There are quite many dynamic geometry software :Baghera, Cabri Euclide, Cabri Geometer, CaR, Chypre, Cinderella,Declic, Defi, Dr. Geo, Euclid, Euklid DynaGeo, Eukleides, Gava,GCLC, GeoExp, GeoFlash, Geogebra, GeoLabo, Geometria,Geometrix, Geometry Explorer, Geometry Tutor, GeoPlanW,GeoSpaceW, GEUP, GeoView, GEX, GRACE, iGeom, KGeo, KIG,Non-Euclid, Sketchpad, Trace en poche, XCas . . .

Page 5: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Dynamic Geometry.

But few can deal with proofs :Baghera, Cabri Euclide, Cabri Geometer, CaR, Chypre, Cinderella,Declic, Defi, Dr. Geo, Euclid, Euklid DynaGeo, Eukleides, Gava,GCLC, GeoExp, GeoFlash, Geogebra, GeoLabo, Geometria,Geometrix, Geometry Explorer, Geometry Tutor, GeoPlanW,GeoSpaceW, GEUP, GeoView, GEX, GRACE, iGeom, KGeo, KIG,Non-Euclid, Sketchpad, Trace en poche, XCas . . .

Page 6: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

1 - Interactive proof systems using a base of lemmas

• Baghera,

• Cabri-Euclide,

• Chypre,

• Defi,

• Geometrix,

• Geometry Tutor

2 - Interfaces for an ATP

Cinderella Probalistic method, no proof shown.

GCLC Implementation of the area method, Wu’s methodand Groebner basis method.

Geometry Explorer Implementation of the full angle method usingprolog, and visualization of the proofs in adiagrammatic way.

GEX/Geometer Implementation of the area method, of Wu’smethod and of deductive database methods,visualization of statements and some visual proofs.

GeoView Uses GeoPlan and Pcoq to visualize statements .

Page 7: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

1 - Interactive proof systems using a base of lemmas

2 - Interfaces for an ATP

Cinderella Probalistic method, no proof shown.

GCLC Implementation of the area method, Wu’s methodand Groebner basis method.

Geometry Explorer Implementation of the full angle method usingprolog, and visualization of the proofs in adiagrammatic way.

GEX/Geometer Implementation of the area method, of Wu’smethod and of deductive database methods,visualization of statements and some visual proofs.

GeoView Uses GeoPlan and Pcoq to visualize statements .

Page 8: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

1 - Interactive proof systems using a base of lemmas

2 - Interfaces for an ATP

Cinderella Probalistic method, no proof shown.

GCLC Implementation of the area method, Wu’s methodand Groebner basis method.

Geometry Explorer Implementation of the full angle method usingprolog, and visualization of the proofs in adiagrammatic way.

GEX/Geometer Implementation of the area method, of Wu’smethod and of deductive database methods,visualization of statements and some visual proofs.

GeoView Uses GeoPlan and Pcoq to visualize statements .

Page 9: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

GeoProof combines these features:

• dynamic geometry

• automatic theorem proving

• interactive theorem proving using a proof assistant (Coq)

Page 10: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

What is a proof assistant ?

• The correctness of a proof is decidable by definition.

• A proof assistant is a system to check that a proof is correct.

Page 11: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Motivations

• The use of a proof assistant provides a way to combinegeometrical proofs with larger proofs (involving induction forinstance).

• There are facts than can not be visualized graphically andthere are facts that are difficult to understand without beingvisualized.

• We should have both the ability to make arbitrarily complexproofs and use a base of known lemmas.

• The verification of the proofs by the proof assistant provides avery high level of confidence.

Page 12: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Motivations

• The use of a proof assistant provides a way to combinegeometrical proofs with larger proofs (involving induction forinstance).

• There are facts than can not be visualized graphically andthere are facts that are difficult to understand without beingvisualized.

• We should have both the ability to make arbitrarily complexproofs and use a base of known lemmas.

• The verification of the proofs by the proof assistant provides avery high level of confidence.

Page 13: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Motivations

• The use of a proof assistant provides a way to combinegeometrical proofs with larger proofs (involving induction forinstance).

• There are facts than can not be visualized graphically andthere are facts that are difficult to understand without beingvisualized.

• We should have both the ability to make arbitrarily complexproofs and use a base of known lemmas.

• The verification of the proofs by the proof assistant provides avery high level of confidence.

Page 14: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Motivations

• The use of a proof assistant provides a way to combinegeometrical proofs with larger proofs (involving induction forinstance).

• There are facts than can not be visualized graphically andthere are facts that are difficult to understand without beingvisualized.

• We should have both the ability to make arbitrarily complexproofs and use a base of known lemmas.

• The verification of the proofs by the proof assistant provides avery high level of confidence.

Page 15: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Automated theorem proving in geometry in Coq:

• the area method for euclidean plane geometry

• Grobner basis method (Loıc Pottier)

Page 16: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

A quick overview of GeoProof

A prototype:

• written usingocaml andlablgtk2,

• distributedunder theGPL2 licence,

• multi-platform.

http://home.gna.org/geoproof/

Page 17: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Dynamic geometry features

• points, lines, circles, vectors,segments, intersections,perpendicular lines,perpendicular bisectors,anglebisectors. . .

• central symmetry, translationand axial symmetry

• traces

• text labels with dynamicparts:

• measures of angles,distances and areas

• properties tests (collinear-ity,orthogonality,. . . )

• layers

• Computations use arbitraryprecision

• Input: XML

• Output: XML, naturallanguage, SVG, PNG, BMP,Eukleides (latex), Coq

Missing features:

• loci and conics

• macros

• animations

Page 18: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Proof related features

1 Automatic proof using an embedded ATP

2 Automatic proof using Coq

3 Interactive proof using Coq

Page 19: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Automatic proof using the embedded ATP

We need to perform a translation from a theory based on circles,lines and points to a theory based only on points.

Page 20: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

l passing through A and B P1(l) = A P2(l) = B

l parallel line to m passing through A P1(l) = A P2(l) = P2l

l perpendicular to m passing through A P1(l) = A P2(l) = P2l

l perpendicular bisector of A and B P1(l) = P1l P2(l) = P2l

c circle of center O passing through A O(c) = O P(c) = A

c circle passing through A,B and C O(c) = Oc P(c) = A

c circle whose diameter is A B O(c) = Oc P(c) = A

Page 21: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Point P on line l collinear(P,P1(l),P2(l))

I intersection of l1 and l2collinear(I ,P1(l1),P2(l1))∧collinear(I ,P1(l2),P2(l2))∧¬parallel(P1(l1),P2(l1),P1(l2),P2(l2))

l perpendicular bisector of ABP1(l)A = P1(l)B ∧ P2(l)A = P2(l)B∧P1(l) 6= P2(l) ∧ A 6= B

Page 22: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software
Page 23: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Dealing with non-degeneracy conditions

• Non degeneracy conditions play a crucial role in formalgeometry.

• GeoProof allows to build a formula not a model of thisformula.

• The user can define impossible figures.

Page 24: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software
Page 25: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Automatic proof using Coq

• Based on our formalization of the area method in Coq.

• Constructive theorems in euclidean plane geometry.

Page 26: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software
Page 27: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Interactive proof using Coq

Init // Construction // GoalDefinition

// Proof

• GeoProof loads the library (axioms and theorems) andupdates the interface.

• It translates each construction as an hypothesis in Coq syntax.

• It translates the conjecture into Coq syntax.

• It translates each construction into the application of a tacticto prove the existence of the newly introduced object.

Page 28: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Interactive proof using Coq

Init // Construction // GoalDefinition

// Proof

• GeoProof loads the library (axioms and theorems) andupdates the interface.

• It translates each construction as an hypothesis in Coq syntax.

• It translates the conjecture into Coq syntax.

• It translates each construction into the application of a tacticto prove the existence of the newly introduced object.

Page 29: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Interactive proof using Coq

Init // Construction // GoalDefinition

// Proof

• GeoProof loads the library (axioms and theorems) andupdates the interface.

• It translates each construction as an hypothesis in Coq syntax.

• It translates the conjecture into Coq syntax.

• It translates each construction into the application of a tacticto prove the existence of the newly introduced object.

Page 30: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Interactive proof using Coq

Init // Construction // GoalDefinition

// Proof

• GeoProof loads the library (axioms and theorems) andupdates the interface.

• It translates each construction as an hypothesis in Coq syntax.

• It translates the conjecture into Coq syntax.

• It translates each construction into the application of a tacticto prove the existence of the newly introduced object.

Page 31: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Interactive proof using Coq

Init // Construction // GoalDefinition

// Proof

• GeoProof loads the library (axioms and theorems) andupdates the interface.

• It translates each construction as an hypothesis in Coq syntax.

• It translates the conjecture into Coq syntax.

• It translates each construction into the application of a tacticto prove the existence of the newly introduced object.

Page 32: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

A possible framework for synchronizationbetween GUIs

Coq GeoProof

IsabellePG

Brokeroo PGIP //

ww

PGIP

77ooooooooooooooo

ggPGIP

''OOOOOOOOOOOOOOO

&&

PGIP

ffNNNNNNNNNNNNNN

//PGIPoo

88PGIP

xxpppppppppppppppp

PCoq

. . . CoqIDE

Page 33: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Another approach

Integrating the proof checker, the proving GUI, and the dynamicgeometry software in a single window.

Page 34: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Future work

• Diagrammatic proofs• in geometry and• in abstract term rewriting.

• Tighter integration between the gui and proof assistant.

• Two ways communication between the proof assistant and theDGS.

Page 35: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

My wishes

• A language/API to export/import statements.

• Statements should be relative to an axiom system.

• Statements should not impose a geometric construction.

• Non degeneracy conditions should not be overlooked.

Page 36: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Yves Bertot, Frederique Guilhot, and Loıc Pottier.Visualizing geometrical statements with GeoView.Electronic Notes in Theoretical Computer Science, 103:49–65,September 2003.

Xian-Shan Gao and Qiang Lin.MMP/Geometer - a software package for automated geometryreasoning.In F. Winkler, editor, Proceedings of ADG 2002, Lecture Notesin Computer Science, pages 44–46. Springer-Verlag, 2002.

Ulrich Kortenkamp.Foundations of Dynamic Geometry.PhD thesis, ETH Zurich, 1999.

Ulrich Kortenkamp and Jurgen Richter-Gebert.Using automatic theorem proving to improve the usability ofgeometry software.In Mathematical User Interface, 2004.

Page 37: GeoProof: A user interface for formal proofs in geometry.dpt-info.u-strasbg.fr/~narboux/slides/slides-narboux-bilbao.pdf · Dynamic Geometry. There are quitemanydynamic geometry software

Jurgen Richter-Gebert and Ulrich Kortenkamp.Die interaktive geometrie software cinderella book and cd-rom.

German school-edition of the Cinderella software, 1999.http://cinderella.de.

Jacob T. Schwartz.Probabilistic algorithms for verification of polynomialidentities.In Symbolic and algebraic computation, volume 72 of LectureNotes in Computer Science, pages 200–215, Marseille, 1979.Springer-Verlag.