• Aucun résultat trouvé

Formalizing Desargues' theorem in Coq using ranks in Coq

N/A
N/A
Protected

Academic year: 2021

Partager "Formalizing Desargues' theorem in Coq using ranks in Coq"

Copied!
7
0
0

Texte intégral

(1)

HAL Id: inria-00335719

https://hal.inria.fr/inria-00335719

Submitted on 30 Oct 2008

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

publics ou privés.

Formalizing Desargues’ theorem in Coq using ranks in

Coq

Nicolas Magaud, Julien Narboux, Pascal Schreck

To cite this version:

Nicolas Magaud, Julien Narboux, Pascal Schreck. Formalizing Desargues’ theorem in Coq using ranks

in Coq. 24th Annual ACM Symposium on Applied Computing, Xiao-Shan Gao, Robert Joan-Arinyo,

Dominique Michelucci, Mar 2009, Honolulu, United States. pp.1110-1115, �10.1145/1529282.1529527�.

�inria-00335719�

(2)

Formalizing Desargues’ theorem in Coq using ranks

Nicolas Magaud

LSIIT UMR 7005

CNRS-ULP

Université de Strasbourg

Nicolas.Magaud@dpt-info.u-strasbg.fr

Julien Narboux

LSIIT UMR 7005

CNRS-ULP

Université de Strasbourg

Julien.Narboux@dpt-info.u-strasbg.fr

Pascal Schreck

LSIIT UMR 7005

CNRS-ULP

Université de Strasbourg

Pascal.Schreck@dpt-info.u-strasbg.fr

ABSTRACT

FormalizinggeometrytheoremsinaproofassistantlikeCoq is hallenging. As emphasized inthe literature, the non-degenera y onditions leads to te hni al proofs. In addi-tion,when onsideringhigher-dimensions,theamountof in- iden erelations(e.g. point-line,point-plane,line-plane) in-du enumerouste hni allemmas. Inthispaper,wepresent anoriginalapproa hbasedonthenotionofrankwhi h al-lowsto des ribein iden eandnon-in iden erelations su h asequality, ollinearity and oplanarity homogeneously. It allowsto arryoutproofsinamoresystemati way. To val-idatethisapproa h,weformalizeinCoq(usingonlyranks) one of the fundamental theorems of the proje tive spa e, namelyDesargues'theorem.

Categories and Subject Descriptors

I.2.4 [COMPUTING METHODOLOGIES℄: Knowl-edge Representation Formalisms and Methods; G.4 [MA-THEMATICAL SOFTWARE℄: Certi ation and test-ing

Keywords

formalization,Desargues,rank,proje tivegeometry,Coq

1.

INTRODUCTION

ThispaperdealswithformallyprovinginCoqDesargues' theorem inat least3-dimensional proje tive geometry us-ingthe on eptofrank. Inthelongerterm,theunderlying obje tiveofthepresentedwork onsistsindesigninga geo-metri formalproverabletohandlethenon-degenera y on-ditionsingeometry, andespe iallyingeometri onstraint solving[12,11℄.

Indeed,whendesigninganobje tbythemeanof geomet-ri onstraints,onehasto orre tlyand ompletelyspe ify theshapeofthe obje t. The orresponding onstraint sys-tem anlead to ontradi tions and degenerate aseswhi h

partiallysupportedbytheresear hproje tGalapagos.

This is the author’s version of the work. It is posted here by permission of

ACM for you personal use. Not for redistribution. The definitive version

was published in the proceedings of SAC 2009.

SAC’09 March 8-12, 2009, Honolulu, Hawaii, U.S.A.

Copyright 2009 ACM 978-1-60558-166-8/09/03 ...$5.00.

mustbe handled properly by the solver as shown in [20℄. The stru tural ontradi tions are easy to dete t, whereas thoseresulting from geometri theoremsare more di ult todealwith.

We fo us on proje tive geometry whi h is a simplebut powerfulenoughsettingtoexpressarbitrarily omplex prob-lems as shownin[16℄. Moreover, in3D (orhigher) proofs be ome mu hmore di ult than in 2D: rst, Desargues' propertybe omesatheorem and onsequentlyall the pro-je tive spa es arisefrom a division eld; se ond in iden e geometry has to deal not only with points and lines, but also with planes or, more generally, ats; third there is a ombinatori explosionof ases.

We propose to use the on ept of rank, whi h pro-vides a generi way to des ribe in iden e relations. In-formally, ranks allow to distinguish between equal/non-equal points, ollinear/non- ollinear points, oplanar/non- oplanarpoints,et . Tovalidatethisapproa h,we arryout ame hanizedproof(usingonlyranks)ofoneofthe funda-mentaltheoremsoftheproje tivespa e,namelyDesargues' theorem.

Related work Proof assistantshavealready beenusedin the ontextofgeometry. Numerouspapershaveemphasized theimportan eoftheproblemofdegenerate asesinformal geometry[8,15,10,19℄. BrandtandS hneiderstudiedhow tohandledegenerate asesfortheorientationpredi atesin omputationalgeometryusingthreevaluedlogi [3℄. Bezem andHendri ksformalizedHessenberg'stheoreminCoq[2℄. GuilhothasformalizedinCoqaproofofDesargues'theorem inanegeometry[10℄. NarbouxhasformalizedinCoqthe areamethodofChou,GaoandZhang[5,18℄andappliedit toobtainaproofofDesargues'theoreminanegeometry. Kusak has formalized inMizar Desargues' theorem in the Fanoian proje tive at least 3-dimensional spa e [13℄. The assumption that the spa e is Fanoian makes the theorem more spe ialized thanours. We have performed a formal-ization ofproje tiveplane geometryinCoq [14℄. Theidea ofprovingproje tivespa etheoremswithranksissuggested byMi helu iandS hre kin[17℄.

OutlineThepaperisorganizedasfollows. Inse tion2,we presenttheaxiomsfortheproje tiveatleast3-dimensional spa e. In se tion 3,weintrodu e the on ept of rank and anotheraxiomsystemto aptureproje tivegeometryusing ranks. Weshowhownon-degenera y onditions anbe ex-pressed ni ely usingthe notion of rank. In se tion 4, we proposeaproofofDesargues'theorempurelybasedonthe on eptofrank. Inse tion5,wepresenttheme hanization oftheproofusingtheCoqproofassistant[1,6℄.

(3)

2.

AXIOM SYSTEM

Proje tivegeometryisageneralsettinginthehierar hyof geometrieswhi hassumesthattwolinesinaplane always meet [7, 4℄. We rst assume that we have two kinds of obje ts(pointsandlines)

1

.Wethen onsiderarelation(

) between elements of thesetwo sets. Thefollowing axioms des ribeproje tiveatleast3-dimensionalspa e:

Line-Existen e

∀A B : P oint, ∃l : Line, A ∈ l ∧ B ∈ l

Pas h

∀A B C D : P oint, ∀l

AB

l

CD

l

AC

l

BD

: Line,

A

6= B ∧ A 6= C ∧ A 6= D ∧ B 6= C ∧ B 6= D ∧ C 6= D∧

A

∈ l

AB

∧ B ∈ l

AB

∧ C ∈ l

CD

∧ D ∈ l

CD

A

∈ l

AC

∧ C ∈ l

AC

∧ B ∈ l

BD

∧ D ∈ l

BD

(∃I : P oint, I ∈ l

AB

∧ I ∈ l

CD

)

(∃J : P oint, J ∈ l

AC

∧ J ∈ l

BD

)

Three-Points

∀l : Line, ∃A B C : P oint,

A

6= B ∧ B 6= C ∧ A 6= C ∧ A ∈ l ∧ B ∈ l ∧ C ∈ l

Uniqueness

∀A B : P oint, ∀l m : Line,

A

∈ l ∧ B ∈ l ∧ A ∈ m ∧ B ∈ m ⇒ A = B ∨ l = m

Lower-Dimension

∃l m : Line, ∀p : P oint, p 6∈ l ∨ p 6∈ m

Pas h's axiom ensures that two o-planar lines always meet. We presented this standard axiomsystem as a ref-eren e,buttoeasetheformalizationinCoq,weproposean alternativeaxiomsystembasedonthenotionofrank.

3.

RANKS

The on eptofrankisageneralnotionofmatroidtheory. Anintegerfun tion

rk

on

E

istherankfun tionofamatroid ifandonlyifthefollowing onditions aresatised:

R1

∀X ⊆ E, 0 ≤ rk(X) ≤ |X|

(nonnegativeandsub ardinal) R2

∀XY ⊆ E, X ⊆ Y ⇒ rk(X) ≤ rk(Y )

(nonde reasing) R3

∀XY ⊆ E, rk(X ∪ Y ) + rk(X ∩ Y ) ≤ rk(X) + rk(Y )

(submodular)

Inproje tivegeometry,we andenearankfun tiononsets ofpointswhi hverifytheaxioms above: aatbeingaset of points losed by the ollinearity relation, the rank of a setofpoints

A

isthe ardinalofasmallestsetgenerating

A

(seegure1forexamples).

rk{A, B} = 1

A

= B

rk{A, B} = 2

A

6= B

rk{A, B, C} = 2

A, B, C

are ollinear

withatleasttwoofthemdistin t

rk{A, B, C} ≤ 2

A, B, C

are ollinear

rk{A, B, C} = 3

A, B, C

arenot ollinear

rk{A, B, C, D} = 3

A, B, C, D

are o-planar, notall ollinear

rk{A, B, C, D} = 4

A, B, C, D

arenot o-planar

rk{A, B, C, D, E} ≤ 2 A, B, C, D, E

areall ollinear

Figure 1: Rank statements and their geometri in-terpretations

1

Planesarenotbasi obje ts inthisaxiomsystem,butare

Usingthisdenition,one anshowthateveryproje tive spa ehasamatroidstru ture,butthe onverseisnottrue. Inthenextse tion,weintrodu eadditionalaxiomsto ap-ture3Dorhigherproje tivegeometry.

3.1

A rank-based axiom system

Contrarytotheaxiomsystemshowninse tion2,we as-sumethatwehaveonlyonekindofobje ts,namelypoints. To apturethewholeproje tivespa e,weneedtoaddsome newaxiomstothematroid'sones:

Rk-Singleton

∀P : P oint, rk{P } ≥ 1

Rk-Couple

∀P Q : P oint, P 6= Q ⇒ rk{P, Q} ≥ 2

Rk-Pas h

∀A B C D, rk{A, B, C, D} ≤ 3 ⇒

∃J, rk{A, B, J} = rk{C, D, J} = 2

Rk-Three-Points

∀A B, ∃C, rk{A, B, C} = rk{B, C} = rk{A, C} = 2

Rk-Lower-Dimension

∃A B C D, rk{A, B, C, D} ≥ 4

The rsttwo ones ensure that the rank fun tionis not degenerate. Rk-Pas histhetranslationofPas h'saxiom:

rk{A, B, C, D} ≤ 3

meansthese points are oplanar, thus thatthetwolines

AB

and

CD

interse t.

Usingthisaxiomsystemweformallyprovedalltheaxioms of se tion 2. Inparti ular the following Rk-Uniqueness lemmais derivable and anbeusedtoprovethe Unique-nessaxiom: Lemma1 (Rk-Uniqueness).

∀ABCDM P,

0

B

B

B

B

B

B

B

@

rk{A, B} = 2

rk{C, D} = 2

rk{A, B, M } ≤ 2

rk{C, D, M } ≤ 2

rk{A, B, P } ≤ 2

rk{C, D, P } ≤ 2

rk{A, B, C, D} ≥ 3

1

C

C

C

C

C

C

C

A

⇒ rk{M, P } = 1

Proof. Seese tion 6.

We analsoderivealemmawhi hexpresses on iselythat foreverypointthereexistsonewhi hisdierent,forevery linethereexistsapointnotonthislineandforeveryplane thereexistsapointnotonthisplane:

Lemma2 (Constru tion).

∀E, rk(E) ≤ 3 ⇒ ∃P, rk(E ∪ {P }) = rk(E) + 1

Overall, this axiomsystem is onvenient as rst it only deals with pointsand hen e the theory is dimension-inde-pendent,se ondranksallowtosummarizebothpositiveand negativeassumptionsaboutsetsofpointshomogeneously.

3.2

Proof techniques using ranks

Inthis se tion we des ribe two proofs te hniques whi h aresimplebutimportanttosimplifyformalproofs.

First, all equalities about ranks(say

rk(a) = rk(b)

) are usuallyprovedintwosteps: rstshowingthat

rk(a)

≤ rk(b)

andthenthat

rk(a)

≥ rk(b)

. Consequently,whenstatinga lemma,itisworthbeing autiousaboutwhetherthea tual equalityisrequiredorifoneofthetwoinequalitiesisenough

(4)

proofsintheCoqproofassistant.

Se ond,intheprovingpro ess,wemakeoftenuseof ax-iomR3. Forinstan e,ifweneedtoproveastatementlike:

rk{A, B, C, D, I} + rk{I} ≤ rk{A, B, I} + rk{C, D, I}

we ould be tempted to instantiate axiomR3 with

X

:=

{A, B, I}

and

Y

:=

{C, D, I}

. Butunfortunately,this state-ment is not a dire t onsequen e of axiom R3. For in-stan e

A

maybeequalto

C

and onsequently

{A, B, I} ∩

{C, D, I} = {A, I}

. Determiningtheinterse tionoftwo -nite sets of points requires to distinguish ases about the equality of these points. This leads to intri ate proofs in Coq. Therefore, inthe rest of this paper, we shall never onsidertherealsettheoreti alinterse tionbutalower ap-proximationoftheinterse tion(noted

).

Definition1 (Literalinterse tion). Let

L

1

and

L

2

be two sets of points. By denition

L

1

⊓ L

2

is the in-terse tion ofthetwosetsofpoints onsideredsynta ti ally.

Usingliteralinterse tionwe anderiveamore onvenient versionofaxiomR3whi hleadstofewer ase distin tions:

Lemma3 (R3-lit).

∀XY, rk(X ∪ Y ) + rk(X ⊓ Y ) ≤ rk(X) + rk(Y )

InCoq,itis notpossibletodene thelitteralinterse tion. To apturetheintentofthislemmaweratheruse:

Lemma4 (R3-alt).

∀XY I, I ⊆ X ∩ Y ⇒ rk(X ∪ Y ) + rk(I) ≤ rk(X) + rk(Y )

Thislemmawillbeusedheavilyinthenextse tions.

4.

DESARGUES’ THEOREM

Desargues'theoremstatesthat:

let E be a 3D or higher proje tive spa e and

A

,

B

,

C

,

A

,

B

,

C

bepointsin

E

,ifthethreelines joining the orresponding verti es of triangles

ABC

and

A

B

C

all meet in a point

O

, then the three interse tions of pairsof orresponding sides

α

,

β

and

γ

lieonaline.

b A b B b C bO b C' b A' b B' b b b

β

γ

α

Even though it an be expressed, it is not provable when E is a plane (thisis oherent with the fa tthat there are non-Desarguesianproje tiveplanes).

4.1

Proving Desargues’ Theorem

Theidea ofthe proof is lassi : we rst prove aversion ofthetheoremwherethetwotrianglesarenot oplanar,we allit Desargues 3D (see se tion 4.2) and then we dedu e fromitaversionwhere

A

,

B

,

C

,

A

,

B

and

C

lieonasame

ranktheproofofthe3Dversionisstraightforwardand spe- ial ases anbe handledsmoothly. Inse tion 4.3,wewill showhowwea tuallybuildthe2Dversionand on ludethe proofoftheoriginaltheorem.

4.2

A 3D version of Desargues’ Theorem

Inthisse tion,weproveDesargues' 3Dtheorem.

Theorem 1 (Desargues3D). Let's onsider two (nondegenerate) triangles

ABC

and

abc

su hthat theyare perspe tivefrom agivenpoint

O

:

rk{A, B, C} = rk{a, b, c} = 3

rk{a, A, O} = rk{b, B, O} = rk{c, C, O} = 2

Weassume thisformsanonplanargure:

rk{A, B, C, a, b, c} ≥ 4

anddenethree points

α

,

β

,

γ

su hthat:

rk{A, B, γ} = rk{a, b, γ} = 2

rk{A, C, β} = rk{a, c, β} = 2

rk{B, C, α} = rk{b, c, α} = 2

Undertheseassumptions,

rk{α, β, γ} ≤ 2

holds. Proof ofDesargues3D.

Lemma 5.

rk{A, B, C, α} = 3

Proof. Byassumption

rk{A, B, C} = 3

,hen eusing ax-iom R2,

rk{A, B, C, α} ≥ 3

. Moreover using R3-alt we have:

rk{A, B, C, α} + rk{B, C} ≤ rk{A, B, C} + rk{α, B, C}

rk{A, B, C, α} + 2 ≤ 3 + 2

Hen e, we an on lude that

rk{A, B, C, α} = 3

. Similar proofs anbedonewith

β

and

γ

.

Lemma 6.

rk{A, B, C, α, β} = 3

Proof. First, using axiom R2 and lemma 5 we have

rk{A, B, C, α, β} ≥ 3

. Se ond,usingR3-altwehave:

rk{A, B, C, α, β} + rk{A, B, C}

≤ rk{A, B, C, α} + rk{A, B, C, β}

rk{A, B, C, α, β} + 3 ≤ 3 + 3

Hen e,we an on ludethat

rk{A, B, C, α, β} = 3

. Lemma 7.

rk{A, B, C, α, β, γ} = rk{a, b, c, α, β, γ} = 3

Proof. Theproofissimilartolemma6.

Lemma 8.

rk{A, B, C, a, b, c, α, β, γ} ≥ 4

Proof. Byassumption

rk{A, B, C, a, b, c} ≥ 4

,hen e us-ingaxiomR2,

rk{A, B, C, a, b, c, α, β, γ} ≥ 4

.

Usingtheselemmaswe an on ludetheproof: FromR3-altweknowthat:

rk{A, B, C, a, b, c, α, β, γ} + rk{α, β, γ}

≤ rk{A, B, C, α, β, γ} + rk{a, b, c, α, β, γ}

Hen e,usinglemmas7and8

rk{α, β, γ} ≤ 2

holds.

4.3

Lifting from 2D to 3D

(5)

4.3.1

Statement

Mostassumptionsarethesameasinthe3Dversion. Let's onsidertwotriangles

ABC

and

A

B

C

su hthattheyare perspe tivefromagivenpoint

O

:

rk{A, B, C} = rk{A

, B

, C

} = 3

rk{A

, A, O} = rk{B

, B, O} = rk{C

, C, O} = 2

Wedenethreepoints

α

,

β

,

γ

su hthat:

rk{A, B, γ} = rk{A

, B

, γ} = 2

rk{A, C, β} = rk{A

, C

, β} = 2

rk{B, C, α} = rk{B

, C

, α} = 2

Contrary to the 3D ase, we assume this forms a planar gure:

rk{A, B, C, A

, B

, C

, O} = 3

Inadditionto these assumptionswhi h are losely related to those of Desargues' 3D theorem, the following non-degenera y onditionsarerequired:

rk{A, B, O} = rk{A, C, O} = rk{B, C, O} = 3

rk{A, A

} = rk{B, B

} = rk{C, C

} = 2

Desargues'theoremstatesthat,undertheseassumptions,

rk{α, β, γ} ≤ 2

holds.

b

A

b

B

b

C

b

O

b

C'

b

A'

b

B'

b

P

b

o

b

b

a

b

b b b b

β

γ

α

Figure 2: Desargues' theorem (3D extrusion)

A

,

B

,

C

,

A

,

B

,

C

,

O

,

α

,

β

and

γ

are o-planar. If

P

isthe sun,triangle

abc

then asts itsshadowin

A

B

C

.

4.3.2

Informal Proof

We haveto lift triangle

A

B

C

into anew triangle

abc

whi his not oplanar with triangle

ABC

inorderto have a onguration of pointsin whi hDesargues' 3D theorem anbeapplied. The onstru tionisshowningure2.Here arethe mainsteps: werst onstru t apoint

P

whi hlies outsidethe planeformedby

A, B, C, A

, B

, C

and

O

. We know su ha point

P

exists thanksto lemma 2. We then build a line in ident to

P

and

O

(the point from whi h triangles

ABC

and

A

B

C

are perspe tive) and onsider athird point

o

onthis line (axiomRk-Three-Points en-suressu hapoint exists and is dierent fromboth

O

and

P

). We onstru tanewpoint

a

astheinterse tion oflines

P A

and

oA

. Weknowthesetwolinesinterse tbe auseof

Pas h'saxiomandthefa tthatlines

AA

and

P o

interse t in

O

. Wedothesameto onstru tpoints

b

and

c

. Applying Desargues' 3D theorem to

ABC

and

abc

requiresto make surewehaveanon-degenerate 3Dgure andthat

abc

is a non-degenerate triangle. Wealso haveto makesure

α

de-ned asthe interse tionof lines

BC

and

B

C

isthe same asthe

α

ofDesargues'3Dtheoremwhi histheinterse tion of

BC

and

bc

. Thisrequirement anbesatised bysimply provingthat

α

isin identto

bc

. Thesamerequirement ap-plies for

β

and

γ

. Overall,we haveto provethe following statementswhi hare requirementstoapply Desargues'3D version (proofs are given inappendix B). Note thatwhen applyingthetheorem,thepoint

o

playstheroleofpoint

O

.

rk{A, B, C} = rk{a, b, c} = 3

rk{A, B, C, a, b, c} ≥ 4

rk{a, b, γ} = rk{a, c, β} = rk{b, c, α} = 2

rk{A, B, γ} = rk{A, C, β} = rk{B, C, α} = 2

4.3.3

General Lemmas

Most proofs are fairly te hni al, simply using the ma-troid axiomsofrank. However,somelemmas anbe high-lighted,espe iallyfortheirgeneri ityandtheirpervasiveuse throughouttheproofs. Amongthem,somestabilitylemmas statethatoneofthepointsofaset hara terizingaat(e.g aplaneorthewholespa e) anberepla edbyanotherone belongingtothisat.

Lemma9 (Planerepresentation hange) .

0

B

B

@

rk{A, B, C} = 3

rk{A, B, C, M } = 3

rk{B, C, M } = 3

rk{A, B, C, P } = 4

1

C

C

A

⇒ rk{M, B, C, P } = 4

This lemma is heavily used to prove all possible state-ments expressing that

P

lies outside the plane formed by

A, B, C, A

, B, C

, O

.

Other lemmas about oplanarity and also upper bound onrankswhenmergingaplaneandalineare onvenientas well. They ouldformthebasisofanautomationpro edure whendoing omputer- he kedformalproofs.

5.

FORMALIZATION IN COQ

Weme hanizetheproofofDesargues' theoremusingthe Coq proof assistant whi himplementsahigherorder intu-itionisti logi basedontypetheory. Insu haproof assis-tant, every step of reasoning is proposed by the user but he kedby the system. It dramati ally in reases the reli-ability of the proofs omparedto paper-and-pen ilproofs. Inaddition,duringthe developmentpro ess,being able to hange theaxiomsystem easilyis very onvenient. Proofs anbeautomati ally re he kedbythesystemand hanges onlyrequireminorrewritingoftheproofs.

The formalization in Coq of our axiom system is quite straightforward

2

. To in rease reusability of the proofs we deneitasamoduletypeofCoq'smodulesystem(see g-ure 3). Thismodule dependson

DecP oints

whi hdenes thetypeofpointswithade idableequality.

InCoq,Desargues'theorem anbestatedasfollows: TheoremDesargues xD' :

A' B' C' ABC Oalpha beta gamma : Point, rk (tripleABC)=3

rk (tripleA'B'C')=3

2

(6)

alDe idableType). ...

Parameterrk: set of points

nat. Axiommatroid1 a :

X,rk X

0.

Axiommatroid1 b :

X,rk X

ardinalX.

Axiommatroid2:

X Y,SubsetX Y

rk X

rk Y. Axiommatroid3:

X Y,

rk(union X Y)+rk(inter X Y)

rk X +rk Y. Axiomrk singleton :

P,rk (singletonP)

1.

Axiomrk ouple :

P Q,P

6=

Q

rk( ouple PQ)

2. Axiompas h:

AB C D,rk (quadrupleABC D)

3

J,rk (tripleAB J)=2

rk (triple C D J)=2. Axiomthree points :

AB,

C,

rk (tripleAB C)=2

rk ( ouple BC)=2

rk ( ouple AC)=2.

ParameterP0 P1 P2 P3 : Point.

Axiomlower dim: rk (quadruple P0 P1 P2 P3)

4. EndRankProje tiveSpa e.

Figure 3: Denition of proje tive spa e geometry withranksin Coq

rk (tripleABO)=3

rk (tripleACO)=3

rk (tripleBCO)=3

rk (tripleAA'O)=2

rk (tripleBB'O)=2

rk (tripleCC'O)=2

rk ( oupleAA')=2

rk ( oupleBB')=2

rk ( oupleCC')=2

rk (tripleABgamma)=2

rk (tripleA'B'gamma)=2

rk (tripleACbeta)=2

rk (tripleA'C'beta)=2

rk (tripleBCalpha)=2

rk (tripleB'C'alpha)=2

rk (triple alphabeta gamma)

2.

On the te hni al side, dening our axiomsystem based onranksrequiresaformaldes riptionofthe on eptofsets ofpoints.Asourdevelopmentmanipulatesonlynitesets, weusethedevelopmentFSetsofFilliâtreandLetouzey[9℄. Sin etheprovidedsetequalitydiersfromstandard (Leib-niz)Coq equality,wehavetoprovethat

rk

isamorphism withrespe ttosetequality.

Overall,ourdevelopment onsistsofmorethan6000lines and200lemmasandtheirformalproofsorganizedasshown inthe gures below. Theproof of Desargues' theorem in itself is relatively on ise be ause we proved some generi lemmasandreusedtheme ientlytakingadvantageofthe symmetriesinthestatementofDesargues'theorem.

3D 2D Framework Total linesofCoqspe s 215 450 777 1442 linesofCoqproofs 963 976 2331 4670

6.

CONCLUSIONS

We proposed a new way to express ni ely in iden e re-lations in a 3D setting thanks to ranks and designed an axiomsystem to apture proje tive geometry usingranks. Wesu essfullyappliedittoproveDesargues'theorem. We presentedproofengineeringte hniqueswhi hallowtohave proofs of reasonable size. In the future, we plan to study howthenotionofrank anbeusedtoautomati allyderive in iden eproperties. Webelieve that thegeneri ity ofthe notationwillhelptheautomationpro ess.

Availability ThefullCoq development isavailableatthe

A knowledgmentsWewishtothankNegarGholamizadeh Behbahaniwhostudiedsomelemmasduringaninternship.

7.

REFERENCES

[1℄ Y.BertotandP.Castéran. Intera tiveTheorem ProvingandProgram Development,Coq'Art: The Cal ulusofIndu tive Constru tions.Springer,2004. [2℄ M. BezemandD.Hendriks.OntheMe hanizationof

theProofofHessenberg'sTheoreminCoherentLogi . J.ofAutomated Reasoning,40(1):6185,2008. [3℄ J.BrandtandK.S hneider.Usingthree-valuedlogi

tospe ifyandverifyalgorithmsof omputational geometry.InICFEM,volume3785ofLNCS,pages 405420.Springer-Verlag,2005.

[4℄ F.Buekenhout,editor.Handbook ofIn iden e Geometry.NorthHolland,1995.

[5℄ S.-C.Chou,X.-S.Gao,andJ.-Z.Zhang.Ma hine ProofsinGeometry. WorldS ienti ,1994. [6℄ Coqdevelopmentteam.The CoqProofAssistant

Referen e Manual,Version8.2.LogiCalProje t,2008. [7℄ H.S.M.Coxeter.Proje tiveGeometry.Springer,1987. [8℄ C.Dehlinger,J.-F.Dufourd,andP.S hre k.

Higher-OrderIntuitionisti FormalizationandProofs inHilbert'sElementaryGeometry.InADG'00,volume 2061 ofLNAI,pages306324.Springer-Verlag,2000. [9℄ J.-C.FilliâtreandP.Letouzey.Fun torsforProofs

andPrograms.InESOP'2004,volume2986 ofLNCS, pages370384.Springer-Verlag,2004.

[10℄ F.Guilhot.Formalisation enCoqetvisualisationd'un oursdegéométriepourlely ée.TSI,24:11131138, 2005.Infren h.

[11℄ C.M.HomannandR.Joan-Arinyo.Handbookof Computer AidedGeometri Design, hapter

Parametri Modeling,pages519541.Elsevier,2002. [12℄ C.Jermann,G.Trombettoni,B.Neveu,and

P.Mathis.De ompositionofgeometri onstraint systems: asurvey.InternationalJ.ofComputational GeometryandAppli ation,16(5-6):379414, 2006. [13℄ E.Kusak.Desarguestheoreminproje tive3-spa e.J.

of FormalizedMathemati s,2,1990.

[14℄ N.Magaud,J.Narboux,andP.S hre k.Formalizing Proje tivePlaneGeometryinCoq.a eptedfor presentationatADG'08,September2008. [15℄ L. MeikleandJ.Fleuriot.FormalizingHilbert's

GrundlageninIsabelle/Isar.InTheoremProvingin HigherOrderLogi s, pages319334,2003.

[16℄ D.Mi helu i, S.Foufou,L. Lamarque,and P.S hre k.Geometri onstraintssolving: some tra ks.InSPM'06,pages185196.ACMPress, 2006. [17℄ D.Mi helu i andP.S hre k.In iden eConstraints:

aCombinatorialApproa h.InternationalJ.of Computational GeometryandAppli ation, 16(5-6):443460, 2006.

[18℄ J.Narboux.Ade isionpro edureforgeometryin Coq.InTPHOLs'04,volume3223ofLNCS,pages 225240.Springer-Verlag,2004.

[19℄ J.Narboux.Me hani altheoremprovinginTarski's geometry.InADG'06,volume4869 ofLNAI,pages 139156.Springer-Verlag,2007.

[20℄ P.S hre k.RobustnessinCADGeometri

(7)

APPENDIX

A.

PROOFS RELEVANT TO THE FIRST

SECTION

Lemma10 (Rk-Uniqueness).

∀ABCDM P,

0

B

B

B

B

B

B

B

@

rk{A, B} = 2

rk{C, D} = 2

rk{A, B, M } ≤ 2

rk{C, D, M } ≤ 2

rk{A, B, P } ≤ 2

rk{C, D, P } ≤ 2

rk{A, B, C, D} ≥ 3

1

C

C

C

C

C

C

C

A

⇒ rk{M, P } = 1

Proof. UsingR3-altwehave:

rk{A, B, M, P } + rk{A, B} ≤ rk{A, B, M } + rk{A, B, P }

Hen e

rk{A, B, M, P } = 2

, similarly we an show that

rk{C, D, M, P } = 2

. Moreover

rk{A, B, C, D, M, P } ≥ 3

as

rk{A, B, C, D} ≥ 3

and

{A, B, C, D} ⊆ {A, B, C, D, M, P }

. Finally,usingR3-altwehave:

rk{A, B, C, D, M, P } + rk{M, P }

≤ rk{A, B, M, P } + rk{C, D, M, P }

Hen e:

3 + rk{M, P } ≤ 2 + 2

.

OurdevelopmentisbasedonmatroidaxiomsR1,R2and R3. Butone anprovethat theyareequivalenttothe fol-lowingsetofaxioms:

R1'

rk(∅) = 0

R2'

rk(X)

≤ rk(X ∪ {x}) ≤ rk(X) + 1

R3'

rk(X

∪ {y}) = rk(X ∪ {z}) = rk(X) ⇒ rk(X) =

rk(X

∪ {y, z})

Lemma11 (LowerDimension).

∃ABCD, ∀M, rk{A, B, M } 6= 2 ∨ rk{C, D, M } 6= 2

Proof. UsingaxiomRk-Lower-Dimension,weobtain

A

,

B

,

C

and

D

su hthat

rk{A, B, C, D} = 4

.

Supposethat

rk{A, B, M } = 2

and

rk{C, D, M } = 2

. UsingR3-altwehavethat:

rk{A, B, C, D, M } + rk{M } ≤ rk{A, B, M } + rk{C, D, M }

Hen e

rk{A, B, C, D, M } ≤ 3

,whi hisin ontradi tionwith

rk{A, B, C, D} = 4

.

Lemma12 (Constru tion).

∀E, rk(E) ≤ 3 ⇒ ∃P, rk(E ∪ {P }) = rk(E) + 1

Proof. Consider

E

su hthat

rk(E)

≤ 3

. Using axiom Rk-Lower-Dimensionweobtain

A

,

B

,

C

and

D

su hthat

rk{A, B, C, D} = 4

. Using R2' we know that

rk(E)

rk(E

∪ {A}) ≤ rk(E) + 1

and similarly for

B

,

C

and

D

. Suppose that

rk(E

∪ {A}) = rk(E ∪ {B}) = rk(E ∪

{C}) = rk(E ∪ {D}) = rk(E)

, then we would obtain

rk(E

∪ {A, B, C, D}) = rk(E)

by repeated appli ations of R3'. Thisisin ontradi tionwith

rk{A, B, C, D} = 4

sin e

rk(E)

≤ 3

. Hen ethereexistsa

P

su hthat

rk(E

∪ {P }) =

rk(E) + 1

.

B.

PROVING DESARGUES’ 2D THEOREM

Weremindthereaderofthepropertiesweneedtoprove inordertoapplyDesargues'3D theorem,namely:

rk{A, B, C} = rk{a, b, c} = 3

rk{A, B, C, a, b, c} ≥ 4

rk{a, b, γ} = rk{a, c, β} = rk{b, c, α} = 2

rk{A, B, γ} = rk{A, C, β} = rk{B, C, α} = 2

Statements

rk{A, B, γ} = rk{A, C, β} = rk{B, C, α} = 2

and

rk{A, B, C} = 3

areassumptionsoftheDesargues'2D theorem,thereforetheirproofsare immediate.

B.1

Preliminary Lemmas

We remind the reader that

A, B, C, A

, B

, C

and

O

lie inthe same plane.

P

is apoint outside this plane.

o

is a third point onthe line

OP

. Thepoint

a

is dened as the interse tionoflines

P A

and

oA

. Points

b

and

c

aredened inasimilarway. Inthissetting,thefollowinglemmashold:

Lemma 13.

rk{A

,B

,O} = rk{A

,C

,O} = rk{B

,C

,O} = 3

Lemma 14.

rk{A

, B

, O, P

} = rk{A

, B

, O, o} = 4

Lemma 15.

rk{A, B, O, a} ≥ 4

rk{A, A

, C, a} ≥ 4

Lemma 16.

rk{A, B, O, b} ≥ 4

rk{A, B, O, c} ≥ 4

Lemma 17.

rk{o, a} = rk{o, b} = rk{o, c} = 2

Lemma 18.

rk{a, c, A, C, β} = rk{a, c, A

, C

, β} = 3

B.2

Proving Desargues’ 3D assumptions

Lemma 19.

rk{A, B, C, a, b, c} ≥ 4

Proof. By lemma 16, we have

rk{A, B, O, b} >= 4

, hen e

rk{A, B, C, O, b} ≥ 4

. UsingaxiomR3-alt,wehave:

rk{A, B, C, b} + rk{A, B, C, O}

≥ rk{A, B, C, O, b} + rk{A, B, C}

rk{A, B, C, b} + 3 ≥ 4 + 3

Consequentlywehave

rk{A, B, C, b} ≥ 4

andapplying ax-iomR2twi e,itleadsto

rk{A, B, C, a, b, c} ≥ 4

.

Lemma 20.

rk{a, b, c} = 3

Proof. ByaxiomR1wehave

rk{a, b, c} ≤ 3

. Let'sprove

rk{a, b, c} ≥ 3

.

ByaxiomR3-alt,wehave:

rk{a, b, c, o, A, B} + rk{o, C, c}

≥ rk{A, B, C, o, a, b, c} + rk{o, c}

rk{a, b, c, o, A, B} + 2 ≥ 4 + 2

,hen e

rk{a, b, c, o, A, B} ≥ 4

. Again,usingaxiomR3-altwehave:

rk{a, b, c, o, A} + rk{o, B, b} ≥ rk{a, b, c, o, A, B} + rk{o, b}

rk{a, b, c, o, A} + 2 >= 4 + 2

,hen e

rk{a, b, c, o, A} ≥ 4

. ApplyingaxiomR3-altonelasttimeyields:

rk{a, b, c} + rk{o, A, a} ≥ rk{a, b, c, o, A} + rk{a}

rk{a, b, c} + 2 ≥ 4 + 1

,hen e

rk{a, b, c} ≥ 3

.

Notethatthisproofreliesonthefa tsthat

rk{o, b} = 2

and

rk{o, c} = 2

whi hare provedaslemma17.

Lemma 21.

rk{a, b, γ} = rk{a, c, β} = rk{b, c, α} = 2

Proof. UsingaxiomR3-alt,wehave:

rk{a, c, A, C, β} + rk{a, c, A

, C

, β}

≥ rk{a, c, A, C, A

, C

, β} + rk{a, c, β}

We have

rk{a, c, A, C, A

, C

, β} ≥ 4

using axiomR2 and lemma 15. Using lemma 18, we obtain

rk{a, c, β} ≤ 2

. As

rk{a, c} = 2

(be ause

rk{a, b, c} = 3

), we on lude

Figure

Figure 1: Rank statements and their geometri in-
Figure 2: Desargues' theorem (3D extrusion)

Références

Documents relatifs

5.2 A version of the Harthong-Reeb line based on Ω-numbers An instantiation of the minimal axiom system for non-standard arith- metic All properties of our minimal axiom system

The Grassmann-Cayley algebra G n is defined by adding a second product, the meet product, to the Grassmann algebra (or exterior algebra) of a vector space of dimension n, V , over

λΠMod equipped with a set of rules and equations (R fo , E fo , R ho ) satisfying our assumptions is Church-Rosser mod- ulo E fo on untyped terms if its critical pairs

Access and use of this website and the material on it are subject to the Terms and Conditions set forth at Analysis of Privacy and Non-Repudiation on Pay-TV Systems Song,

In order for a reflexive tactic based on a SAT solver to deal with the full propositional fragment of Coq’s logic, it needs to be able to take any arbi- trary formula in input

Results of the linear mixed effect models testing for a relationship between the Gompertz parameters a and b, breeding type (“breed”: parental, outbred) and genetic diversity

Sur et autour de la prairie ( 617’950 / 128’400 ), nous sommes dans un milieu proche du Berberidion bien représenté dans cette région et riche en buissons xérothermophiles ; nous

Cependant, on peut généralement supposer qu'il n'y a pas de bois à l'épreuve des attaques, s'il est placé dans des conditions favorables à la croissance des champignons,