310 likes | 404 Views
CSC 4504 : Langages formels et applications (La méthode Event-B) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public. it-sudparis.eu /~gibson/Teaching/Event-B/. OddEven http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/OddEven.pdf.
E N D
CSC 4504 : Langages formels et applications (La méthode Event-B) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/ OddEven http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/OddEven.pdf T&MSP-CSC 4504 : Langages formels et applications
Simple proofs on properties of odd and even numbers • Express as theorems and use RODIN to prove: • thm1. The addition of two even numbers is even • thm2. The difference between two odd numbers is even • thm3. The multiplication of an even number with an odd number is even • thm4. The multiplication of two odd numbers is odd T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Autoprovers T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even instantiate T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Remove selected hypothesis T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even repeat sequence for instantiation of b T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Don’t forget to save if you are making progress T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Add hypothesis and select for proof Using autoprover T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Repeat the same sequence for b T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Free existential variables T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Remove hypotheses (no longer needed) T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Try autoprover on original theorem T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Instantiate with y+y+y0+y0 Remove unnecessary hypotheses Add new hypothesis: T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Add abstract expression: y+y0 T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even This sequence leads to the final proof step Setting y1 to ae proves the theorem: can the automated prover do this? p0 fails but p1 manages it T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even Save and explore proof tree T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even The theorem has been marked as proved T&MSP-CSC 4504 : Langages formels et applications
1. The addition of two even numbers is even What if we change specification of EVEN? What if we change theorem to prove? … lets try theorem 3 with context1 T&MSP-CSC 4504 : Langages formels et applications
3. The multiplication of an even number with an odd number is even T&MSP-CSC 4504 : Langages formels et applications
3. The multiplication of an even number with an odd number is even Reset persepective context1 Enable/ Disable Post-tactic T&MSP-CSC 4504 : Langages formels et applications
3. The multiplication of an even number with an odd number is even Proof by contradiction (of goal) T&MSP-CSC 4504 : Langages formels et applications
3. The multiplication of an even number with an odd number is even Prune and run Post-tactics T&MSP-CSC 4504 : Langages formels et applications
3. The multiplication of an even number with an odd number is even Proof by contradiction (of hypothesis) T&MSP-CSC 4504 : Langages formels et applications
3. The multiplication of an even number with an odd number is even T&MSP-CSC 4504 : Langages formels et applications
3. The multiplication of an even number with an odd number is even Circular proof steps: Try to simplify proof tree, where possible T&MSP-CSC 4504 : Langages formels et applications
3. The multiplication of an even number with an odd number is even … try to complete it yourselves Proof for context2 T&MSP-CSC 4504 : Langages formels et applications
For Next Week: send to me (by email) before 20th March Prove theorem 2 or theorem 4 for context 2 T&MSP-CSC 4504 : Langages formels et applications