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:
Related Book For
Posted Date:
Students also viewed these programming questions
-
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 obstetrician knew that there were more live births during the week than on weekends and wanted to discover whether the distribution for number of births was the same for each of the 5 days of the...
-
Sketch a graph of a function f continuous on [0, 4] satisfying the given properties. f'(1) and f'(3) are undefined; f'(2) = 0; f has a local maximum at x = 1; f has a local minimum at x = 2; f has an...
-
Rockstar Games, a subsidiary of Take-Two Interactive, released the video game Grand Theft Auto V in 2013. The game features a character named Lacey Jonas, a self-proclaimed actress slash singer and...
-
Fair Value and Equity Method Compared) Gregory Inc. acquired 20% of the outstanding common stock of Henderson Inc. on December 31, 2010. The purchase price was $1,250,000 for 50,000 shares. Henderson...
-
Suppose you have 135 households in your neighborhood, can you use "=RAND()" function in Excel to randomly select 20 of them to send a survey? a) Write down the codes you would use. b) Show your work...
-
Cecil C. Seymour is a 64-year-old widower. He had income for 2022 as follows: The cost of the annuity was $46,800, and Cecil was expected to receive a total of 260 monthly payments of $450. Cecil has...
-
Questions for Lesser Antilles (A), (B), and (C) Read all three parts of the case and prepare your answers to the following questions. Lesser Antilles (A) Appraise LAL's past pricing strategy. Can...
-
What do you think of the Major Medical Center's financial status? What are the strengths and weaknesses of the Major Medical Center? Are any concerns or red flags raised? What would you recommend to...
-
The function is f(x)=2000(0.881)^(x), where x is the time in years, models a declining lemming population. How many lemmings will there be in 6 years?
-
The Civil War was fought because of slavery and the breakup of the Union. The Southern slave owners would argue that they were ghting to keep states' rights, meaning they were dependent on a slave...
-
You have the following information on three stocks: H&J Jewelry, CompTech, and JadCo, as well as information on the Market index and the reference riskfree asset. Your personal financial analyst, who...
-
Informational Technology and Information Systems What do you think it means when it is said that information systems help collaboration and help companies gain a competitive advantage? provide...
-
A student wonders, "Will changing the volume of alcohol in a boiling point experiment change the boiling point of the liquid?" Identify what would be a valid method for testing this research...
-
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...
-
A second-order dynamic system is modeled as \[9 \ddot{x}+6 \dot{x}+\frac{10}{9} x=14 \delta(t), \quad x(0)=0, \quad \dot{x}(0)=-\frac{1}{4}\] a. Find the response \(x(t)\) in closed form. b. Plot the...
-
Consider a first-order system with time constant \(\tau\) and zero initial condition. Find the system's unit-step response for \(\tau=\frac{1}{3}\) and \(\frac{2}{3}\), plot the two curves versus \(0...
-
a. Identify the damping type and find the free response. b. Plot the free response by using the initial command. \(\ddot{x}+3 \dot{x}+4 x=0, \quad x(0)=\frac{2}{5}, \quad \dot{x}(0)=0\)
Study smarter with the SolutionInn App