Cookies disclaimer

I agree Our site saves small pieces of text information (cookies) on your device in order to deliver better content and for statistical purposes. You can disable the usage of cookies by changing the settings of your browser. By browsing our website without changing the browser settings you grant us permission to store that information on your device.

Homework 10

This is the task corresponding to homework 10.

Resources

Download Files

Definitions File

theory Defs
  imports "HOL-IMP.VCG"
begin

definition
  "POWER2 ≡
  ''x'' ::= N 1;;
  WHILE Less (N 0) (V ''n'') DO (
    ''x'' ::= Plus (V ''x'') (V ''x'');;
    ''n'' ::= Plus (V ''n'') (N (-1))
  )"

end

Template File

theory Submission
  imports Defs
begin

theorem POWER2_correct:
  "⊢ {λs. s ''n'' = n ∧ n ≥ 0}
      POWER2
     {λs. s ''x'' = 2 ^ nat n}"
  sorry


text ‹Please specify your table in some textual format here:›

text ‹



›

end

Check File

theory Check
  imports Submission
begin

theorem POWER2_correct:
"⊢ {λs. s ''n'' = n ∧ n ≥ 0}
    POWER2
   {λs. s ''x'' = 2 ^ nat n}"
  by (rule Submission.POWER2_correct)

end

Terms and Conditions