map international spring sch l on formalization of
play

MAP INTERNATIONAL SPRING SCH L ON FORMALIZATION OF MATHEMATICS - PowerPoint PPT Presentation

SSReflect - Logics & Basic tactics Laurence Rideau 12 March MAP INTERNATIONAL SPRING SCH L ON FORMALIZATION OF MATHEMATICS 2012 SOPHIA ANTIPOLIS, FRANCE / 12-16 MARCH SSR Tactics Structure SSReflect Reminder (SSR = Small Scale


  1. SSReflect - Logics & Basic tactics Laurence Rideau 12 March MAP INTERNATIONAL SPRING SCH L ON FORMALIZATION OF MATHEMATICS 2012 SOPHIA ANTIPOLIS, FRANCE / 12-16 MARCH

  2. SSR Tactics Structure SSReflect – Reminder (SSR = Small Scale Reflection ) SSReflect : extension of Coq developed while formalizing the Four Color Theorem (2004), now used for the Odd Order Theorem. Laurence Rideau SSReflect - Logics & Basic tactics

  3. SSR Tactics Structure SSReflect – Reminder (SSR = Small Scale Reflection ) SSReflect : extension of Coq developed while formalizing the Four Color Theorem (2004), now used for the Odd Order Theorem. Changes with standard Coq : Vernacular (Commands) and Gallina are mostly unchanged (e.g., Definition , Lemma , forall , match with ); standard tactics are still available some tactics are superseded (e.g., apply , rewrite ) new libraries are provided (e.g., nat , seq ) Laurence Rideau SSReflect - Logics & Basic tactics

  4. SSR Tactics Structure Design Decisions Simplify and generalize the syntax of tactics. Laurence Rideau SSReflect - Logics & Basic tactics

  5. SSR Tactics Structure Design Decisions Simplify and generalize the syntax of tactics. Add some ways to structure the scripts, so that breakages are easier to understand. Laurence Rideau SSReflect - Logics & Basic tactics

  6. SSR Tactics Structure Design Decisions Simplify and generalize the syntax of tactics. Add some ways to structure the scripts, so that breakages are easier to understand. Force the user to explicitly name things. Laurence Rideau SSReflect - Logics & Basic tactics

  7. SSR Tactics Structure Design Decisions Simplify and generalize the syntax of tactics. Add some ways to structure the scripts, so that breakages are easier to understand. Force the user to explicitly name things. Ease the use of boolean reflection. Laurence Rideau SSReflect - Logics & Basic tactics

  8. SSR Tactics Structure Outline Logics 1 Tactics, Tacticals 2 Proof Structure 3 Laurence Rideau SSReflect - Logics & Basic tactics

  9. SSR Tactics Structure FOL Bool Outline Logics 1 First Order Logic Booleans Tactics, Tacticals 2 Proof Structure 3 Laurence Rideau SSReflect - Logics & Basic tactics

  10. SSR Tactics Structure FOL Bool Minimal Propositional Logic Propositional variables: P Q R . . . Propositions: (even 4) (x < 10) (7 <= 2) Implication: -> Formulas: (P -> Q) -> (Q -> R) -> P -> R Laurence Rideau SSReflect - Logics & Basic tactics

  11. SSR Tactics Structure FOL Bool Minimal Propositional Logic Propositional variables: P Q R . . . Propositions: (even 4) (x < 10) (7 <= 2) Implication: -> Formulas: (P -> Q) -> (Q -> R) -> P -> R Propositional are of sort Prop : (P : Prop) . Declaring variables: Variables P Q R :Prop. Laurence Rideau SSReflect - Logics & Basic tactics

  12. SSR Tactics Structure FOL Bool Minimal Propositional Logic Propositional variables: P Q R . . . Propositions: (even 4) (x < 10) (7 <= 2) Implication: -> Formulas: (P -> Q) -> (Q -> R) -> P -> R Propositional are of sort Prop : (P : Prop) . Declaring variables: Variables P Q R :Prop. Any term of type P (p : P) is a proof of P . Laurence Rideau SSReflect - Logics & Basic tactics

  13. SSR Tactics Structure FOL Bool State and Proof a theorem Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *) Laurence Rideau SSReflect - Logics & Basic tactics

  14. SSR Tactics Structure FOL Bool State and Proof a theorem Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *)  . . .     P : Prop named hypotheses (Context) Q : Prop     R : Prop ( P → Q ) → ( Q → R ) → P → R } current goal � �� � ���� Assumptions Conclusion Laurence Rideau SSReflect - Logics & Basic tactics

  15. SSR Tactics Structure FOL Bool State and Proof a theorem Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *)  . . .     P : Prop named hypotheses (Context) Q : Prop     R : Prop ( P → Q ) → ( Q → R ) → P → R } current goal � �� � ���� Assumptions Conclusion Tactic: any operation that allows the simplification, decomposition into subgoals, or resolution of a goal. Laurence Rideau SSReflect - Logics & Basic tactics

  16. SSR Tactics Structure FOL Bool Proof Theorem command: Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *) move=> Hpq. P : Prop Q : Prop R : Prop Hpq : ( P → Q ) ( Q → R ) → P → R Laurence Rideau SSReflect - Logics & Basic tactics

  17. SSR Tactics Structure FOL Bool Proof Theorem command: Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *) move=> Hpq Hqr p. P : Prop Q : Prop R : Prop Hpq : ( P → Q ) Hqr : ( Q → R ) p : P R Laurence Rideau SSReflect - Logics & Basic tactics

  18. SSR Tactics Structure FOL Bool Proof Theorem command: Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *) move=> Hpq Hqr p. apply: Hqr. P : Prop Q : Prop R : Prop Hpq : ( P → Q ) p : P Q Laurence Rideau SSReflect - Logics & Basic tactics

  19. SSR Tactics Structure FOL Bool Proof Theorem command: Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *) move=> Hpq Hqr p. apply: Hqr. apply: (Hpq). P : Prop Q : Prop R : Prop Hpq : ( P → Q ) p : P P Laurence Rideau SSReflect - Logics & Basic tactics

  20. SSR Tactics Structure FOL Bool Proof Theorem command: Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *) move=> Hpq Hqr p. apply: Hqr. apply: Hpq. exact: p. Proof completed. Laurence Rideau SSReflect - Logics & Basic tactics

  21. SSR Tactics Structure FOL Bool Proof Theorem command: Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *) move=> Hpq Hqr p. apply: Hqr. exact: (Hpq p). Proof completed. Laurence Rideau SSReflect - Logics & Basic tactics

  22. SSR Tactics Structure FOL Bool Proof Theorem command: Lemma imp_trans :(P -> Q) -> (Q -> R) -> P -> R. Proof. (* start the proof of a Lemma *) move=> Hpq Hqr p. apply: Hqr. exact: (Hpq p). Qed. Laurence Rideau SSReflect - Logics & Basic tactics

  23. SSR Tactics Structure FOL Bool Minimal Propositional Logic with universal quantifier forall (P Q R :Prop), (P ->Q)-> (Q -> R) -> P -> R Laurence Rideau SSReflect - Logics & Basic tactics

  24. SSR Tactics Structure FOL Bool Minimal Propositional Logic with universal quantifier forall (P Q R :Prop), (P ->Q)-> (Q -> R) -> P -> R as a goal: move=> P Q R. Laurence Rideau SSReflect - Logics & Basic tactics

  25. SSR Tactics Structure FOL Bool Minimal Propositional Logic with universal quantifier forall (P Q R :Prop), (P ->Q)-> (Q -> R) -> P -> R as a goal: move=> P Q R. as an hypothesis named H : apply: (H A B) . or . . . apply: H. Laurence Rideau SSReflect - Logics & Basic tactics

  26. SSR Tactics Structure FOL Bool Minimal Propositional Logic with universal quantifier forall (P Q R :Prop), (P ->Q)-> (Q -> R) -> P -> R as a goal: move=> P Q R. as an hypothesis named H : apply: (H A B) . or . . . apply: H. forall n:nat, 0 <= n Laurence Rideau SSReflect - Logics & Basic tactics

  27. SSR Tactics Structure FOL Bool Minimal Propositional Logic with universal quantifier forall (P Q R :Prop), (P ->Q)-> (Q -> R) -> P -> R as a goal: move=> P Q R. as an hypothesis named H : apply: (H A B) . or . . . apply: H. forall n:nat, 0 <= n move=> n. Laurence Rideau SSReflect - Logics & Basic tactics

  28. SSR Tactics Structure FOL Bool Minimal Propositional Logic with universal quantifier forall (P Q R :Prop), (P ->Q)-> (Q -> R) -> P -> R as a goal: move=> P Q R. as an hypothesis named H : apply: (H A B) . or . . . apply: H. forall n:nat, 0 <= n move=> n. apply: H. apply: (H a). Laurence Rideau SSReflect - Logics & Basic tactics

  29. SSR Tactics Structure FOL Bool Propositional Logic, Conjunction Conjunction : A /\ B Laurence Rideau SSReflect - Logics & Basic tactics

  30. SSR Tactics Structure FOL Bool Propositional Logic, Conjunction Conjunction : A /\ B case: ab. (* Break the (ab : A /\ B) hypothesis *) Laurence Rideau SSReflect - Logics & Basic tactics

  31. SSR Tactics Structure FOL Bool Propositional Logic, Conjunction Conjunction : A /\ B case: ab. (* Break the (ab : A /\ B) hypothesis *) ab : A /\ B → G A -> B -> G Laurence Rideau SSReflect - Logics & Basic tactics

  32. SSR Tactics Structure FOL Bool Propositional Logic, Conjunction Conjunction : A /\ B case: ab. (* Break the (ab : A /\ B) hypothesis *) ab : A /\ B → G A -> B -> G split. (* Prove a conjunction :A /\B *) Laurence Rideau SSReflect - Logics & Basic tactics

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend