45
Inductive Formalization of PLCA Graduate School of Science and Technology, Kwansei Gakuin University Mizuki Goto

Inductive Formalization of PLCA

  • Upload
    sulwyn

  • View
    31

  • Download
    0

Embed Size (px)

DESCRIPTION

Inductive Formalization of PLCA. Graduate School of Science and Technology, Kwansei Gakuin University Mizuki G oto. Motivation. We proposed PLCA as qualitative spatial expression in lab and proved property satisfied PLCA. But, it was pen-and- peper proof - PowerPoint PPT Presentation

Citation preview

PowerPoint

Inductive Formalization of PLCAGraduate School of Science and Technology, Kwansei Gakuin University

Mizuki Goto1MotivationWe proposed PLCA as qualitative spatial expression in lab and proved property satisfied PLCA.But, it was pen-and-peper proofThe mistakes may exist in that proof

We check PLCA in theorem prover CoqMany theorem provers match inductive modelInductive PLCA 2013/11/219th theorem proving and Provers meeting22AgendaDefinition of PLCA

Inductive formalization

Proof of validity

Future work2013/11/2139th theorem proving and Provers meeting3PLCAPLCA expression is a kind of qualitative spatial reasoning

PLCA provides a symbolic representation for spatial data using the simple four objects (point, line, circuit and area)

For a given figure in a two-dimensional plane, there exists a PLCA expression, that is unique in its pattern of connections between regions.2013/11/2149th theorem proving and Provers meetingDisconnectintersectExternal connecte.g.tagential connectnon tagential connect4PLCAMeritsmall data sizeCompared to quantitative measurementIntuitive thinkingapplicationArtificial IntelligenceImage analysisGeometrical analysisAnother frameworkRCC (Region Connection Calculus)(Randell et al., 1992)2013/11/2159th theorem proving and Provers meeting5PLCAPointRepresents dot

LineRepresents line connecting two pointsAdding + or -, represents directed lineexample l ll.points means the set of point included linep1p1p2l = (p1, p2)l-+2013/11/2169th theorem proving and Provers meeting6PLCACircuitRepresents loop linesCircuit has directionclock-wise, counter clock-wise inner circuit, outer circuitl1l2l3l4l5l6c1 = [l1,l2,l3,l4,l5,l6 ]c1++++++2013/11/2179th theorem proving and Provers meetingl1 = (p1, p2), l2 = (p2,p3), ...... l6 = (p6, p1)c1 = [(p1,p2),(p2,p3),........(p6,p1) ]7PLCAAreaRepresents space divided by circuitthe outside space is not area

c1c2a1a1 = {c2,c3}a2 = {c4}c3c4a22013/11/2189th theorem proving and Provers meeting8PLCAoutermostThe outside circuit is called outermostThe instance of PLCA has only one outermostoutermost2013/11/2199th theorem proving and Provers meeting9PLCAoutermostoutermostoutermost2013/11/21109th theorem proving and Provers meeting10PLCAp1p2p3p4p5l1l2l3l4l5c1 = outermostc2c3c4a1a2P = {p1, p2, p3, p4, p5}l1 = (p1,p2) l2 = (p2,p3)l3 = (p3,p4) l4 = (p4,p1)l5 = (p5,p5) L = {l1, l2, l3, l4, l5}c1 = [l1,l4,l3,l2 ]c2 = [l1,l2,l3,l4 ]c3 = [l5 ]c4 = [l5 ] C = {c1, c2, c3, c4}----+++++-a1 = {c2,c3}a2 = {c4} A = {a1, a2}2013/11/21119th theorem proving and Provers meeting11PLCAP = {p1, p2, p3, p4, p5}L = {l1, l2, l3, l4, l5}C = {c1, c2, c3, c4}A = {a1, a2}E = p1p2p3p4p5l1l2l3l4l5c1 = outermostc2c3c4a1a22013/11/21129th theorem proving and Provers meeting12PLCANotificationThe lengths of lists circuit, area are more than one

Circuits in the same area dont connect by point or linec1?c2?a2a1a3lpcac = [l]a = [c]2013/11/21139th theorem proving and Provers meeting13PLCAconnectThis predicate means relationship of PLCA objectstwo argumentsPLCAconnect A B PLCAconnect B C iff PLCAconnect A CPLCAconnect (point p) (Line l) iff p l.pointsPLCAconnect (Line l)(Circuit c) iff l c.pointsPLCAconnect (Circuit c)(Area a) iff c a.pointsPLCAconnect A B iff PLCAconnect B A

PLCA2013/11/21149th theorem proving and Provers meetingPLCAConsistent PLCAConsistency of Point-Line p P, l L, p l.points l L, p l.points p PConsistency of Line-Circuitl L, c C , l c.linesc C, l c.lines l L l L, l c1.lines, l c2.lines c1 = c2 Consistency of Circuit-Areac C, a A , c a.circuitsa A, c a.circuits c C c C, c a1.circuits, c a2.circuits a1 = a2

If these properties are satisfied, then PLCA is consistent 2013/11/21159th theorem proving and Provers meeting15PLCAConsistent PLCAconnect PLCA and |P| - |L| -|C| + 2 * |A| = 0 PLCA is planar (Takahashi et al,2008)pen-and-paper proof

RxPLCAtool is implemented in java and prolog(Sumitomo et al., 2005)

2013/11/21169th theorem proving and Provers meeting16AgendaDefinition of PLCA

Inductive formalizationinductive PLCAinductive PLCAconnect

Proof of validity

Future work2013/11/21179th theorem proving and Provers meeting17Inductive PLCADefinition Point := nat.Definition Line := Point * Point.Definition Circuit := list Line.Definition Area := list Circuit.Definition reverse(l : Line) := (snd l, fst l).Definition Point_In_Line(p : Point)(l : Line) : Prop :=fst l = p snd l = p.Definition InL (l : Line)(L : set Line) : Prop :=set_In l L set_In (reverse l) L.

162013/11/21189th theorem proving and Provers meeting conditions p l.pointsl Ll l+-18Inductive PLCAInductive PATH (P : set Point)(L : set Line): Point Point list Point list Line Prop :=

| nil_path : trace lists = nil| step_path : trace lists = y trace lists = x::y2013/11/21199th theorem proving and Provers meetingall pointsall linesstart pointend pointtrace listsnil_pathstep_path19Inductive PATH (P : set Point)(L : set Line): Point Point list Point list Line Prop :=| nil_path : forall(p : Point),set_In p P PATH P L p p (p::nil) nil| step_path : forall(p1 p2 p3 : Point)(pl : list Point)(ll : list Line), PATH P L p2 p1 pl ll InL (p3, p2) L set_In p3 P ~In p3 pl PATH P L p3 p1 (p3::pl) ((p3, p2)::ll).

Circuit (list Line) = [l6::l5::l4::l1]InL l6 L PATH P L p6 p1 (p6::p5.p1) (l5::l4::l1)Inductive PLCAl1l2l5l6l3l4p1p2p3p4p5p62013/11/21209th theorem proving and Provers meetingInductive E : set Point set Line set Circuit set Area Type :=

| e_outermost : | connect_circuit : .| isolate_circuit : Inductive PLCA2013/11/21219th theorem proving and Provers meetingall pointsall linesall circuitsall areasThree constructorse_outermostbasecaseoutermostc1a12013/11/21229th theorem proving and Provers meeting22Inductive E : set Point set Line set Circuit set Area Type :=| e_outermost :forall(P : set Point)(L : set Line)(pl : list Point)(ll : list Line)(x y : Point), PATH P L x y pl ll InL (x, y) L length ll 2 Epl((y,x)::ll)(((y,x)::ll)::((x,y)::(reverse_circuit ll))::nil)((((y,x)::ll)::nil)::nil)Inductive PLCA2013/11/21239th theorem proving and Provers meetingcircuit conditionsconnect_circuitbasecaseoutermostc1a1basecase connect_circuitc2c12013/11/21249th theorem proving and Provers meeting24| connect_circuit :forall(P : set Point)(L : set Line)(C : set Circuit)(A : set Area)(c : Circuit)(a : Area)(l1 l2 : Line)(x y z s e : Point)(AP : set Point)(AL : set Line)(ap pl pxy pyz pzx : list Point)(al lxy lyz lzx : list Line),E P L C A set_In a A set_In c a (last C nil) c PATH pl c x y pxy lxy PATH pl c y z pyz lyz PATH pl c z x pzx lzx c = lxy ++ lyz ++ lzx PATH AP AL s e ap al length al >= 2 (forall(p : Point), In p ap -> ~In p P) E (ap++P)((y,s)::(e,z)::(al++L))((((s,y)::lyz)++((z,e)::(reverse_circuit al)))::(lxy++((y,s)::al)++((e,z)::lzx))::(set_remove eq_listline_dec c C))(((lxy++((y,s)::al)++((e,z)::lzx))::(set_remove eq_listline_dec c a))::((((s,y)::lyz)++((z,e)::(reverse_circuit al)))::nil)::(set_remove eq_listcircuit_dec a A))Inductive PLCA2013/11/21259th theorem proving and Provers meetingvariablesconditionsall pointsall linesall circuitsall areasisolate_circuitbasecaseoutermostc2Basecase isolate_circuitc1c3a1a2basecase isolate_circuit connect_circuitc4a3c4192013/11/21269th theorem proving and Provers meeting26| isolate_circuit :forall(P : set Point)(L : set Line)(C : set Circuit)(A : set Area)(a : Area)(x y : Point)(AP : set Point)(AL : set Line)(ap : list Point)(al : list Line),E P L C A set_In a A PATH AP AL x y ap al length al >= 2 (forall(p : Point), In p ap -> ~In p P) E(ap++P)(((y,x)::al)++L)(((y,x)::al)::((x,y)::(reverse_circuit al))::C)((((x,y)::(reverse_circuit al))::nil)::(((y,x)::al)::a)::(set_remove eq_listcircuit_dec a A)).

Inductive PLCA2013/11/21279th theorem proving and Provers meetingvariablesconditionsall pointsall linesall circuitsall areasPLCAconnectPLCAconnect A B PLCAconnect B C iff PLCAconnect A CPLCAconnect (point p) (Line l) iff p l.pointsPLCAconnect (Line l)(Circuit c) iff l c.pointsPLCAconnect (Circuit c)(Area a) iff c a.pointsPLCAconnect A B iff PLCAconnect B A

2013/11/219th theorem proving and Provers meeting28Inductive PLCAconnectInductive object :=| o_point : Point object| o_line : Line object| o_circuit : Circuit object| o_area : Area object.

e.g. PLCAconnect (o_point p) (o_line l)

PLCAconnect : object object Prop2013/11/219th theorem proving and Provers meeting29Inductive PLCAconnectInductive PLCAconnect(P : set Point)(L : set Line)(C : set Circuit)(A : set Area)(e : E P L C A) : object object Prop :=| PLcon :| LPcon :| LCcon :| CLcon :| CAcon :| ACcon :| OPcon :| OLcon : | OCcon :| OAcon :

2013/11/219th theorem proving and Provers meeting30Inductive PLCAconnectInductive PLCAconnect(P : set Point)(L : set Line)(C : set Circuit)(A : set Area)(e : E P L C A) : object object Prop :=| PLcon : forall(p : Point)(l : Line), In p P InL l L Point_In_Line p l PLCAconnect P L C A e (o_point p) (o_line l)

Inductive PLCAconnectInductive PLCAconnect(P : set Point)(L : set Line)(C : set Circuit)(A : set Area)(e : E P L C A) : object object Prop :=| PLcon : forall(p : Point)(l : Line), In p P InL l L Point_In_Line p l PLCAconnect P L C A e (o_point p) (o_line l)| LPcon : forall(p : Point)(l : Line), In p P InL l L Point_In_Line p l PLCAconnect P L C A e (o_line l) (o_point p)| LCcon : forall(l : Line)(c : Circuit), InL l L In c C InL l PLCAconnect P L C A e (o_line l) (o_circuit c)| CLcon : forall(l : Line)(c : Circuit), InL l L In c C InL l c PLCAconnect P L C A e (o_circuit c) (o_line l)| CAcon : forall(c : Circuit)(a : Area), In c C In a A In c a PLCAconnect P L C A e (o_circuit c) (o_area a)| ACcon : forall(c : Circuit)(a : Area), In c C In a A In c a PLCAconnect P L C A e (o_area a) (o_circuit c)

2013/11/21319th theorem proving and Provers meeting31| OPcon : forall(p : Point)(o1 o2 : object), In p P PLCAconnect P L C A e o1 (o_point p) PLCAconnect P L C A e (o_point p) o2 PLCAconnect P L C A e o1 o2| OLcon : forall(l : Line)(o1 o2 : object), InL l L PLCAconnect P L C A e o1 (o_line l) PLCAconnect P L C A e (o_line l) o2 PLCAconnect P L C A e o1 o2| OCcon : forall(c : Circuit)(o1 o2 : object), In c C PLCAconnect P L C A e o1 (o_circuit c) PLCAconnect P L C A e (o_circuit c) o2 PLCAconnect P L C A e o1 o2| OAcon : forall(a : Area)(o1 o2 : object), In a A PLCAconnect P L C A e o1 (o_area a) PLCAconnect P L C A e (o_area a) o2 PLCAconnect P L C A e o1 o2.

Inductive PLCAconnect2013/11/21329th theorem proving and Provers meetingTransitivity of PLCAconnect| OPcon : forall(p : Point)(o1 o2 : object), In p P PLCAconnect P L C A e o1 (o_point p) PLCAconnect P L C A e (o_point p) o2 PLCAconnect P L C A e o1 o2| OLcon : forall(l : Line)(o1 o2 : object), InL l L PLCAconnect P L C A e o1 (o_line l) PLCAconnect P L C A e (o_line l) o2 PLCAconnect P L C A e o1 o2| OCcon : forall(c : Circuit)(o1 o2 : object), In c C PLCAconnect P L C A e o1 (o_circuit c) PLCAconnect P L C A e (o_circuit c) o2 PLCAconnect P L C A e o1 o2| OAcon : forall(a : Area)(o1 o2 : object), In a A PLCAconnect P L C A e o1 (o_area a) PLCAconnect P L C A e (o_area a) o2 PLCAconnect P L C A e o1 o2.

Inductive PLCAconnect2013/11/21339th theorem proving and Provers meetingTransitivity of PLCAconnectAgendaDefinition of PLCA

Inductive formalization

Proof of validity

Future work2013/11/21349th theorem proving and Provers meeting34Proof of validityPlanarityConsistent PLCAconnected PLCA and |P| - |L| -|C| + 2 * |A| = 0 PLCA is planar (Takahashi et al,2008)

Inductive PLCAConsistency|P| - |L| -|C| + 2 * |A| = 0PLCAconnect2013/11/21359th theorem proving and Provers meetingValidity of PLCA35ConsistencyConsistent PLCAConsistency of Point-Line p P, l L, p l.points l L, p l.points p PConsistency of Line-Circuitl L, c C , l c.linesc C, l c.lines l L l L, l c1.lines, l c2.lines c1 = c2 Consistency of Circuit-Areac C, a A , c a.circuitsa A, c a.circuits c C c C, c a1.circuits, c a2.circuits a1 = a2

2013/11/21369th theorem proving and Provers meeting150 lines100 lines100 lines1400 lines36Lemma six_consistent :forall{P : set Point}{L : set Line}{C : set Circuit}{A : set Area}(e : E P L C A), (forall(a : Area)(c : Circuit), set_In a A In c a set_In c C) (forall(c : Circuit)(l : Line), set_In c C In l c InL l L) (forall(p : Point)(l : Line), set_In l L Point_In_Line p l set_In p P) (forall(a : Area), ~set_In a (set_remove eq_listcircuit_dec a A)) (forall(c : Circuit)(a1 a2 : Area), c (outermost e) set_In a1 A set_In a2 A In c a1 In c a2 a1 = a2) (forall(a : Area)(c : Circuit), set_In a A ~In c (set_remove eq_listline_dec c a)).

ConsistencyProvedAbout 1000 lines2013/11/21379th theorem proving and Provers meetingProof of validityPlanarityConsistent PLCAconnected PLCA and |P| - |L| -|C| + 2 * |A| = 0 PLCA is planar (Takahashi et al,2008)

Inductive PLCAConsistencyPLCAconnect|P| - |L| -|C| + 2 * |A| = 02013/11/21389th theorem proving and Provers meetingValidity of PLCA38PLCAconnectTheorem I_PLCA_connect :forall(P : set Point)(L : set Line)(C : set Circuit)(A : set Area)(e : E P L C A), (forall(p : Point)(l : Line), In p P InL l L PLCAconnect P L C A e (o_point p) (o_line l))(forall(l : Line)(c : Circuit), InL l L In c C PLCAconnect P L C A e (o_line l) (o_circuit c))(forall(c : Circuit)(a : Area), In c C In a A PLCAconnect P L C A e (o_circuit c) (o_area a)).ProvedAbout 1500 lines without lemmas2013/11/21399th theorem proving and Provers meeting39Proof of validityPlanarityConsistent PLCAconnected PLCA and |P| - |L| -|C| + 2 * |A| = 0 PLCA is planar (Takahashi et al,2008)

Inductive PLCAConsistencyPLCAconnect|P| - |L| -|C| + 2 * |A| = 02013/11/21409th theorem proving and Provers meetingValidity of PLCA40The number of objects|P| - |L| - |C| + 2 * |A| = 0point line Circuit + 2 * Area = 0easy to prove by inductionBecause the set is represented by list in order to count the number of objectsp1p2p3p4p5l1l2l3l4l5c1c2c3c4a1a2|P| = 5|L| = 5|C| = 4|A| = 25 5 - 4 + 2 * 2 = 02013/11/21419th theorem proving and Provers meeting41Theorem PLCArelation :forall(P : set Point)(L : set Line)(C : set Circuit)(A : set Area)(e : E P L C A),length P + 2 * length A - length L - length C = 0.

This theorem permutes position of 2 * legnth A because nat doesnt include negative numbers

The number of objectsProvedAbout 100 lines2013/11/21429th theorem proving and Provers meetingProof of validityPlanarityConsistent PLCAconnected PLCA and |P| - |L| -|C| + 2 * |A| = 0 PLCA is planar (Takahashi et al,2008)

Inductive PLCAConsistencyPLCAconnect|P| - |L| -|C| + 2 * |A| = 02013/11/21439th theorem proving and Provers meetingValidity of PLCAInductive PLCA is planar?43Controversial definitionSets of P, L, C, A are represented by listsThe reason is that proof of validity needs to count the number of objects

The arguments of inductive PLCA cant permute elements of listOriginal PLCA can permute elements because of set2013/11/21449th theorem proving and Provers meeting44Future workInductive PLCA has three validity, but dont prove planarityConsisntent , PLCAconnect and |P| - |L| -|C| + 2 * |A| = 0 planarity

validity Inductive PLCAIf proved, then validity and inductive PLCA are equivalent.

construct better inductive or another definition

2013/11/21459th theorem proving and Provers meeting45