Use the proof calculus to construct proofs for the followingquestions.

Let Fac1 (x) be the program: а %3D т; y1; while (a >0){ y y* a; а —а — 1; } Show that tot {x > 0} Fac1(x) {y = x!} is valid 1. Write down a proper loop invariant which is useful for constructing the correctness proof. [2 marks] 2. Write down a proper variant which is useful for proving the termination of the program. [1 mark 3. Provide the full proof using proof rules. [4 marks 4. Justify the correct uses of the implied rule in three places of the proof in English. 3 marks Show transcribed image text Let Fac1 (x) be the program: а %3D т; y1; while (a >0){ y y* a; а —а — 1; } Show that tot {x > 0} Fac1(x) {y = x!} is valid 1. Write down a proper loop invariant which is useful for constructing the correctness proof. [2 marks] 2. Write down a proper variant which is useful for proving the termination of the program. [1 mark 3. Provide the full proof using proof rules. [4 marks 4. Justify the correct uses of the implied rule in three places of the proof in English. 3 marks

## Expert Answer

Answer to Use the proof calculus to construct proofs for the following questions….