Presentation is loading. Please wait.

Presentation is loading. Please wait.

2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul.

Similar presentations


Presentation on theme: "2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul."— Presentation transcript:

1 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public.it-sudparis.eu/~gibson/Teaching/MAT7003/ Proofs With RODIN http://www-public.it-sudparis.eu/~gibson/Teaching/MAT7003/L8-ProofsWithRodin.pdf

2 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.2 Working with RODIN: different proof techniques Proof by exhaustion, establishes the conclusion by dividing it into a finite number of cases and proving each one separately. Proof by contradiction (reductio ad absurdum) - it is shown that if some statement were true then a logical contradiction occurs, hence the statement must be false. Proof by transposition (contrapositive) establishes the conclusion "if p then q" by proving the equivalent statement "if not q then not p". Proof by mathematical induction establishes a "base case" and then an "induction rule" is used to prove a series of, possibly infinite, other cases Proof by construction, or proof by example, is the construction of a concrete example with a property to show that something having that property exists A nonconstructive proof establishes that a certain mathematical object must exist without explaining how such an object can be found. Often, this uses a proof by contradiction in which the nonexistence of the object is proven to be impossible.

3 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.3 The proving perspective (Rodin User Manual) http://wiki.event-b.org/index.php/The_Proving_Perspective_(Rodin_User_Manual)

4 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.4 The proving perspective (Rodin User Manual) http://wiki.event-b.org/index.php/The_Proving_Perspective_(Rodin_User_Manual) Decoration The leaves of the tree are decorated with one of three icons: means that this leaf is discharged, means that this leaf is not discharged, means that this leaf has been reviewed.

5 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.5 The proving perspective (Rodin User Manual) http://wiki.event-b.org/index.php/The_Proving_Perspective_(Rodin_User_Manual)

6 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.6 The proving perspective (Rodin User Manual) http://wiki.event-b.org/index.php/The_Proving_Perspective_(Rodin_User_Manual)

7 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.7 The proving perspective (Rodin User Manual) http://wiki.event-b.org/index.php/The_Proving_Perspective_(Rodin_User_Manual) Proof Control View

8 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.8 The proving perspective (Rodin User Manual) http://wiki.event-b.org/index.php/The_Proving_Perspective_(Rodin_User_Manual) Search HypothesesView

9 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.9 The proving perspective (Rodin User Manual) http://wiki.event-b.org/index.php/The_Proving_Perspective_(Rodin_User_Manual)

10 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.10 Example 1: odd and even integers 1.How would you specify the sets of odd and even integers? 2.What interesting properties should we be able to prove? 3.Does the structure of the specification help/hinder the proof process? We can examine how to do this using Rodin

11 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.11 OddEven : proposed solution 1 Q: Can you explain the axioms and theorems ?

12 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.12 OddEven 1: proving 2 is even Why can’t the tool do this automatically? Interactive proof – the red bits provide interaction points

13 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.13 OddEven 1: proving 2 is even A good start is to simplify by removing the axioms that are not relevant in the proof

14 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.14 OddEven 1: proving 2 is even We know 2 is even because 2 = 1 + 1 … so we need to tell the tool by using the forall axiom. But we can separate the as we only need it in 1 direction. This rewrites the equivalence as 2 implications

15 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.15 OddEven 1: proving 2 is even NOTE: The proof tree is updated Which of two forall axioms do we no longer need?

16 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.16 OddEven 1: proving 2 is even Now, we want to instantiate x with the value 2 and apply modus ponens (by clicking on the => ) This gives a goal which is immediately provable by instantiation of y to 1

17 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.17 OddEven 1: proving 2 is even Now, dont forget to save the proof

18 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.18 OddEven 1: proving 4 is even Follow the same reasoning as for proving 2 is even

19 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.19 OddEven 1: proving 3 is odd The goal seems obvious, but why is it not proven automatically? In order not to waste time we can mark it as reviewed

20 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.20 OddEven 1: proving 3 is odd

21 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.21 OddEven 1: proving 5 is odd We can do the same for 5

22 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.22 OddEven 1: proving even+even = even Can you do the proof yourselves?

23 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.23 OddEven : proposed solution 2 Q: Can you explain the axioms and theorems ? Think about why certain are more easily proven than others … try to prove axm5 and review axiom7

24 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.24 OddEven : proposed solution 3 Q: Can you explain the axioms and theorems ? Think about why certain are more easily proven than others … try to prove axm10

25 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.25 OddEven : proposed solution 3 We start the proof by considering the simplest cases where a=0 or b = 0 … dc a = 0 dc b = 0

26 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.26 OddEven : proposed solution 3 We can then add hypotheses to help in the proof QUESTION: But, are we missing something critical?

27 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.27 Arrays in Event-B Some of you asked about specifying arrays. These are simply a function from integer indexes to array element values

28 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.28 Another Event-B Example : Purse Behaviour

29 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.29 Another Event-B Example : Purse Behaviour

30 2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.30 Another Event-B Example : Purse Behaviour Modelling a change of state to a Purse: adding a coin Question: can you model the removal of a coin?


Download ppt "2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul."

Similar presentations


Ads by Google