1 / 45

Inductive Formalization of PLCA

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

sulwyn
Download Presentation

Inductive Formalization of PLCA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Inductive Formalization of PLCA Graduate School of Science and Technology, KwanseiGakuin University MizukiGoto

  2. Motivation • We proposed PLCA as qualitative spatial expression in lab and proved property satisfied PLCA. • But, it was pen-and-peper proof • The mistakes may exist in that proof • We check PLCA in theorem proverCoq • Many theorem provers match inductive model • Inductive PLCA 9th theorem proving and Provers meeting

  3. Agenda • Definition of PLCA • Inductive formalization • Proof of validity • Future work 9th theorem proving and Provers meeting

  4. PLCA • PLCA 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. intersect e.g. External connect non tagentialconnect tagential connect Disconnect 9th theorem proving and Provers meeting

  5. PLCA • Merit • small data size • Compared to quantitative measurement • Intuitive thinking • application • Artificial Intelligence • Image analysis • Geometrical analysis • Another framework • RCC (Region Connection Calculus)(Randell et al., 1992) 9th theorem proving and Provers meeting

  6. PLCA • Point • Represents dot • Line • Represents line connecting two points • Adding + or -, represents directed line • example: ll • l.pointsmeans the set of point included line p1 l p1 p2 l = (p1, p2) - + 9th theorem proving and Provers meeting

  7. PLCA • Circuit • Represents loop lines • Circuithas direction • clock-wise, counter clock-wise ⇔ inner circuit, outer circuit l6 c1 l1 c1 = [l1,l2,l3,l4,l5,l6 ] + + + + + + l1= (p1, p2), l2 = (p2,p3), ...... l6 = (p6, p1) l5 l2 c1 = [(p1,p2),(p2,p3),........(p6,p1) ] l4 l3 9th theorem proving and Provers meeting

  8. PLCA • Area • Represents space divided by circuit • the outside space is not area c1 a1 c2 a1 = {c2,c3} a2 = {c4} c3 c4 a2 9th theorem proving and Provers meeting

  9. PLCA • outermost • The outside circuit is called “outermost” • The instance of PLCA has only one outermost outermost 9th theorem proving and Provers meeting

  10. PLCA outermost outermost outermost 9th theorem proving and Provers meeting

  11. PLCA P = {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 = outermost l1 p1 p2 c2 c3 c4 a2 l4 l2 - - - - c1 = [l1,l4,l3,l2 ] c2 = [l1,l2,l3,l4 ] c3 = [l5 ] c4 = [l5 ] C = {c1, c2, c3, c4} p5 l5 a1 + + + + + p3 p4 - l3 a1 = {c2,c3} a2 = {c4} A = {a1, a2} 9th theorem proving and Provers meeting

  12. PLCA P = {p1, p2, p3, p4, p5} L = {l1, l2, l3, l4, l5} c1 = outermost l1 p1 p2 C = {c1, c2, c3, c4} c2 A = {a1, a2} c3 c4 a2 l4 l2 p5 l5 a1 p3 p4 E = <P, L, C, A, outermost> l3 9th theorem proving and Provers meeting

  13. PLCA • Notification • The lengths of lists circuit, area are more than one • Circuits in the same area don’t connect by point or line p l c = [l] a = [c] c a c1? c2? a2 a3 a1 9th theorem proving and Provers meeting

  14. PLCA • PLCAconnect • This predicate means relationship of PLCA objects • two arguments • PLCAconnect A B ∧ PLCAconnect B C iffPLCAconnect A C • PLCAconnect (point p) (Line l)iff p ∈ l.points • PLCAconnect (Line l)(Circuit c)iff l ∈ c.points • PLCAconnect (Circuit c)(Area a)iffc∈ a.points • PLCAconnect A B iffPLCAconnect B A 9th theorem proving and Provers meeting

  15. PLCA • Consistent PLCA • Consistency of Point-Line • ∀p ∈ P, ∃l ∈ L, p ∈ l.points • ∀ l ∈ L, p ∈ l.points→ p ∈ P • Consistency of Line-Circuit • ∀l ∈ L, ∃c ∈ C , l ∈ c.lines • ∀c ∈ C, l ∈ c.lines→ l∈ L • ∀l ∈ L, l ∈ c1.lines,l ∈ c2.lines → c1=c2 • Consistency of Circuit-Area • ∀c ∈ C, ∃a ∈ A , c∈ a.circuits • ∀a ∈ 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 9th theorem proving and Provers meeting

  16. PLCA • Consistent 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) 9th theorem proving and Provers meeting

  17. Agenda • Definition of PLCA • Inductive formalization • inductive PLCA • inductive PLCAconnect • Proof of validity • Future work 9th theorem proving and Provers meeting

  18. Inductive PLCA Definition 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. ← conditions + - l ⇔ l p ∈ l.points l ∈ L 16 9th theorem proving and Provers meeting

  19. Inductive PLCA all points all lines Inductive 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::y…………… start point end point trace lists nil_path step_path 9th theorem proving and Provers meeting

  20. Inductive PLCA Inductive 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) p1 l6 l1 p6 p2 l5 l2 p5 l3 l4 p3 p4 9th theorem proving and Provers meeting

  21. Inductive PLCA Inductive E : set Point → set Line → set Circuit → set Area → Type := | e_outermost : ………… | connect_circuit : ………. | isolate_circuit : ………… all points all lines all circuits all areas Three constructors 9th theorem proving and Provers meeting

  22. e_outermost basecase a1 c1 outermost 9th theorem proving and Provers meeting

  23. Inductive PLCA Inductive 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_circuitll))::nil)((((y,x)::ll)::nil)::nil) circuit conditions 9th theorem proving and Provers meeting

  24. connect_circuit basecase→ connect_circuit basecase c2 a1 c1 c1’ outermost 9th theorem proving and Provers meeting

  25. Inductive PLCA variables | 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 pxypyzpzx : list Point)(al lxylyzlzx : list Line),E P L C A→set_In a A→set_In c a → (last C nil) <> c →PATH pl c x y pxylxy→ PATH pl c y z pyzlyz→ PATH pl c z x pzxlzx→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_removeeq_listline_dec c C))(((lxy++((y,s)::al)++((e,z)::lzx))::(set_removeeq_listline_dec c a))::((((s,y)::lyz)++((z,e)::(reverse_circuit al)))::nil)::(set_removeeq_listcircuit_dec a A)) conditions all points all lines all circuits all areas 9th theorem proving and Provers meeting

  26. isolate_circuit basecase→ isolate_circuit→ connect_circuit Basecase→ isolate_circuit basecase c4 c4 c2 a3 c3 a2 a1 c1 outermost 19 9th theorem proving and Provers meeting

  27. Inductive PLCA variables | 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_removeeq_listcircuit_dec a A)). conditions all points all lines all circuits all areas 9th theorem proving and Provers meeting

  28. Inductive PLCAconnect • PLCAconnect • PLCAconnect A B ∧ PLCAconnect B C iffPLCAconnect A C • PLCAconnect (point p) (Line l)iff p ∈ l.points • PLCAconnect (Line l)(Circuit c)iff l ∈ c.points • PLCAconnect (Circuit c)(Area a)iffc∈ a.points • PLCAconnect A B iffPLCAconnect B A Inductive 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 → Prop 9th theorem proving and Provers meeting

  29. Inductive PLCAconnect Inductive 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 : 9th theorem proving and Provers meeting

  30. Inductive PLCAconnect Inductive 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) 9th theorem proving and Provers meeting

  31. Inductive PLCAconnect Inductive 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) 9th theorem proving and Provers meeting

  32. Inductive PLCAconnect Transitivity 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. 9th theorem proving and Provers meeting

  33. Inductive PLCAconnect Transitivity 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. 9th theorem proving and Provers meeting

  34. Agenda • Definition of PLCA • Inductive formalization • Proof of validity • Future work 9th theorem proving and Provers meeting

  35. Proof of validity • Planarity • Consistent PLCAconnected PLCA and |P| - |L| -|C| + 2 * |A| = 0 ⇔PLCA is planar (Takahashi et al,2008) • Inductive PLCA • Consistency • |P| - |L| -|C| + 2 * |A| = 0 • PLCAconnect Validity of PLCA 9th theorem proving and Provers meeting

  36. Consistency • Consistent PLCA • Consistency of Point-Line • ∀p ∈ P, ∃l ∈ L, p ∈ l.points • ∀ l ∈ L, p ∈ l.points→ p ∈ P • Consistency of Line-Circuit • ∀l ∈ L, ∃c ∈ C , l ∈ c.lines • ∀c ∈ C, l ∈ c.lines→ l∈ L • ∀l ∈ L, l ∈ c1.lines,l ∈ c2.lines → c1=c2 • Consistency of Circuit-Area • ∀c ∈ C, ∃a ∈ A , c∈ a.circuits • ∀a ∈ A, c ∈ a.circuits→ c∈ C • ∀c ∈ C, c ∈ a1.circuits, c ∈ a2.circuits → a1=a2 150 lines 100 lines 100 lines 1400 lines 9th theorem proving and Provers meeting

  37. Consistency Lemma 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_removeeq_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_removeeq_listline_dec c a)). Proved About 1000 lines 9th theorem proving and Provers meeting

  38. Proof of validity • Planarity • Consistent PLCAconnected PLCA and |P| - |L| -|C| + 2 * |A| = 0 ⇔PLCA is planar (Takahashi et al,2008) • Inductive PLCA • Consistency • PLCAconnect • |P| - |L| -|C| + 2 * |A| = 0 Validity of PLCA 9th theorem proving and Provers meeting

  39. PLCAconnect Theorem 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)). Proved About 1500 lines without lemmas 9th theorem proving and Provers meeting

  40. Proof of validity • Planarity • Consistent PLCAconnected PLCA and |P| - |L| -|C| + 2 * |A| = 0 ⇔PLCA is planar (Takahashi et al,2008) • Inductive PLCA • Consistency • PLCAconnect • |P| - |L| -|C| + 2 * |A| = 0 Validity of PLCA 9th theorem proving and Provers meeting

  41. The number of objects • |P| - |L| - |C| + 2 * |A| = 0 • point– line– Circuit+ 2 * Area = 0 • easy to prove by induction • Because the set is represented by list in order to count the number of objects c1 l1 p1 p2 c2 |P| = 5 |L| = 5 |C| = 4 |A| = 2 5 – 5 - 4 + 2 * 2 = 0 c3 c4 a2 l4 l2 p5 l5 a1 p3 p4 l3 9th theorem proving and Provers meeting

  42. The number of objects Theorem 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 doesn’t include negative numbers Proved About 100 lines 9th theorem proving and Provers meeting

  43. Proof of validity • Planarity • Consistent PLCAconnected PLCA and |P| - |L| -|C| + 2 * |A| = 0 ⇔PLCA is planar (Takahashi et al,2008) • Inductive PLCA • Consistency • PLCAconnect • |P| - |L| -|C| + 2 * |A| = 0 Validity of PLCA Inductive PLCA is planar? 9th theorem proving and Provers meeting

  44. Controversial definition • Sets of P, L, C, A are represented by lists • The reason is that proof of validity needs to count the number of objects • The arguments of inductive PLCA can’t permute elements of list • Original PLCA can permute elements because of set 9th theorem proving and Provers meeting

  45. Future work • Inductive PLCA has three validity, but don’t prove planarity • Consisntent , PLCAconnect and |P| - |L| -|C| + 2 * |A| = 0 → planarity • validity → Inductive PLCA • If proved, then validity and inductive PLCA are equivalent. • construct better inductive or another definition 9th theorem proving and Provers meeting

More Related