Compute the given substitutions. Just substitute the expression for the value; you don't need to simplify...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Compute the given substitutions. Just substitute the expression for the value; you don't need to simplify anything further. Recall that you may need to perform a-conversions to avoid variable capture. Show the intermediate steps of substitution when quantifiers are involved, as we did in class. a) [y+2/y3z.V.(x+y≥z+y) b) [y+2/x].Va.(x + y ≥z+y) c) [x+2/y]3z.V.(z+y ≥z+y) d) [z/x] (x2z→ (3z.Vx.x+y2z+y) ^ y > z) e) [2/2] (12z→ (3x+y2z+y) Ay> z) 3 Proofs and Proof Outlines Task 3.1 (Written, 20 points). a) Write a program in IMP that given an array a of size two, returns its maximum element in variable m. b) Write a partial correctness triple to state that your program does what is described in part (a). c) Prove your partial correctness triple in Hoare logic using either proof trees or Hilbert-stlye proofs. d) Write a proof outline for your partial correctness triple. You can use either rule for if that we discussed in class. Task 3.2 (Written, 7 points). Convert the following proof outline to a Hilbert-style proof. The remainder operator z%y returns the remainder when z is divided by y.. {z ≥0) if(z%3=0) then 8:=3 (x20x%3=0} (820A8%3=0} = {s%3=0} {z 20^x%3#0} else if (2%3= 1) then {z 20^z%3/0A2%3=1}{r-120Ar-1%3=0} 8:12-1 8:=x-2 fi else fi {s20s%3=0} = {s%3=0} {a 20A z%3#0A2%31) ⇒ (x-2 ≥ 0^x-2%3=0} {$20 As%3=0} = {s%3=0} → {8%3=0} {s%3=0} Compute the given substitutions. Just substitute the expression for the value; you don't need to simplify anything further. Recall that you may need to perform a-conversions to avoid variable capture. Show the intermediate steps of substitution when quantifiers are involved, as we did in class. a) [y+2/y3z.V.(x+y≥z+y) b) [y+2/x].Va.(x + y ≥z+y) c) [x+2/y]3z.V.(z+y ≥z+y) d) [z/x] (x2z→ (3z.Vx.x+y2z+y) ^ y > z) e) [2/2] (12z→ (3x+y2z+y) Ay> z) 3 Proofs and Proof Outlines Task 3.1 (Written, 20 points). a) Write a program in IMP that given an array a of size two, returns its maximum element in variable m. b) Write a partial correctness triple to state that your program does what is described in part (a). c) Prove your partial correctness triple in Hoare logic using either proof trees or Hilbert-stlye proofs. d) Write a proof outline for your partial correctness triple. You can use either rule for if that we discussed in class. Task 3.2 (Written, 7 points). Convert the following proof outline to a Hilbert-style proof. The remainder operator z%y returns the remainder when z is divided by y.. {z ≥0) if(z%3=0) then 8:=3 (x20x%3=0} (820A8%3=0} = {s%3=0} {z 20^x%3#0} else if (2%3= 1) then {z 20^z%3/0A2%3=1}{r-120Ar-1%3=0} 8:12-1 8:=x-2 fi else fi {s20s%3=0} = {s%3=0} {a 20A z%3#0A2%31) ⇒ (x-2 ≥ 0^x-2%3=0} {$20 As%3=0} = {s%3=0} → {8%3=0} {s%3=0}
Expert Answer:
Answer rating: 100% (QA)
Lets solve each of the given substitutions step by step a y2yexists ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
12 12 Design a four-bar mechanism so that = 70 and = 50. Length of fixed link is 4 cm. Input and output links rotate anti-clockwise.
-
Need help with C programming. Write code to do allowing you to store these smaller floating point numbers in a 32-bit integer. INPUT: you will read in a program and call your functions to implement...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
When my niece Michelle told me she had learned to read, she was bursting with pride. How might reflecting on this accomplishment affect how Michelle thinks about herself?
-
An FCC iron-carbon alloy initially containing 0.35 wt% C is exposed to an oxygen-rich and virtually carbon-free atmosphere at 1400 K (1127C). Under these circumstances the carbon diffuses from the...
-
The Centennial Chemical Corp. announced that, for the period ending March 31, 2013, it had earned income after taxes worth $2,768,028.25 on revenues of $13,144,680. The company's costs (excluding...
-
Develop a brief answer to each of the following questions: 1. Under what condition would all four methods of inventory pricing produce exactly the same results? 2. Under the perpetual inventory...
-
The following trial balance pertains to Benjis Grocery as of January 1, 2016: The following events occurred in 2016. Assume that Benjis uses the periodic inventory method. 1. Purchased land for...
-
Please solve this question I want with graph. \f
-
Consider the theoretical impact of a trade war, with increased tariffs imposed by all major countries in the world. Suppose that the trade war's main effect is to reduce the benefits of comparative...
-
Sam bought three folders and one notebook from the office store and spent $8.25. He went back the next day and bought two more folders and three more notebooks and spent $16. If the prices did not...
-
Alan is a general partner in ADK Partnership. His partnership Schedule K-1 reports $50,000 ordinary business income, $22,000 guaranteed payment, $5,000 long-term capital gain, and $400 dividend...
-
Was/Is the organizational culture strong and identifiable? 2-What is/was the organizational culture like?
-
Assume that TDW Corporation (calendar-year-end) has 2023 taxable income of $682,000 for purposes of computing the 179 expense. The company acquired the following assets during 2023: (Use MACRS Table...
-
The Greensboro Performing Arts Center (GPAC) has a total capacity of 9,100 seats: 2,500 center seats, 3,000 side seats, and 3,600 balcony seats. The budgeted and actual tickets sold for a Broadway...
-
1. USE your homework 3 SOLUTIONS and calculate the VARIABLE cost/Mclam and Clamp for the year AND USE ACTUAL numbers. HINT: identify WHICH MOH costs are FIXED, and which are VARIABLE (and I discuss...
-
Last month when Holiday Creations, Incorporated, sold 39,000 units, total sales were $156,000, total variable expenses were $131,040, and fixed expenses were $39,600. Required: 1. What is the...
-
For each of the following reactions, express the equilibrium constant: a) H20 (I) H2 (g) + 02 (g) Ke = 1.0x107 b) Fe2 (g) 2F (g) Ke= 4.9 x 10-21 c) C (s) + O2 (g) d) H2 (g) + C2H4 (g) C2H6 (g) Ke =...
-
What is the amount of 10 equal annual deposits that can provide five annual withdrawals? A first withdrawal of $12,000 is made at the end of year 11 and subsequent withdrawals increase at the rate of...
-
The J&J Construction Company is evaluating an investment project to build a golf resort complex on a particular land site. J&J can obtain a one-year option to buy the required parcel of land, and if...
-
A special-purpose machine tool set would cost $20,000. The tool set will be financed by a $10,000 bank loan repayable in two equal annual installments at 10% compounded annually. The tool is expected...
-
Separation of Duties. Aurello Pellegrini, Dottore Commercialista (CONSOB), is approached by his client who has just reorganized his medium-sized manufacturing company to make it more structured by...
-
Proper Documentation. Properly designed and utilized forms facilitate adherence to prescribed internal control structure policies and procedures. One such form might be a multicopy purchase order,...
-
Separation of Duties. The division of the following duties is meant to provide the best possible controls for the Ma Foi Magasin, a small wholesale store in Dijon, France. 1 V Assemble supporting...
Study smarter with the SolutionInn App