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 08.1

This is the task corresponding to the first part of homework 8.

Resources

Download Files

Definitions File

theory Defs
  imports "HOL-IMP.Small_Step" "HOL-IMP.Live_True"
begin

fun bury :: "com ⇒ vname set ⇒ com" where
"bury SKIP X = SKIP" |
"bury (x ::= a) X = (if x ∈ X then x ::= a else SKIP)" |
"bury (c⇩1;; c⇩2) X = (bury c⇩1 (L c⇩2 X);; bury c⇩2 X)" |
"bury (IF b THEN c⇩1 ELSE c⇩2) X = IF b THEN bury c⇩1 X ELSE bury c⇩2 X" |
"bury (WHILE b DO c) X = WHILE b DO bury c (L (WHILE b DO c) X)"

end

Template File

theory Submission
  imports Defs
begin

theorem lfp_eq: "⟦ mono f; mono g; lfp f ⊆ U; lfp g ⊆ U;
  ⋀X. X ⊆ U ⟹ f X = g X ⟧ ⟹ lfp f = lfp g"
  sorry

lemmas [simp] = L.simps(5)
lemmas L_mono2 = L_mono[unfolded mono_def]

theorem L_bury[simp]: "X ⊆ Y ⟹ L (bury c Y) X = L c X"
proof(induction c arbitrary: X Y)
case SKIP
  then show ?case sorry
next
case (Assign x1 x2)
  then show ?case sorry
next
case (Seq c1 c2)
  then show ?case sorry
next
case (If x1 c1 c2)
  then show ?case sorry
next
case (While x1 c)
  then show ?case sorry
qed

theorem bury_bury: "X ⊆ Y ⟹ bury (bury c Y) X = bury c X"
  sorry

corollary "bury (bury c X) X = bury c X"
  by (simp add: bury_bury)

end

Check File

theory Check
  imports Submission
begin

theorem lfp_eq: "⟦ mono f; mono g; lfp f ⊆ U; lfp g ⊆ U;
  ⋀X. X ⊆ U ⟹ f X = g X ⟧ ⟹ lfp f = lfp g"
  by (rule Submission.lfp_eq)

theorem L_bury: "X ⊆ Y ⟹ L (bury c Y) X = L c X"
  by (rule Submission.L_bury)

theorem bury_bury: "X ⊆ Y ⟹ bury (bury c Y) X = bury c X"
  by (rule Submission.bury_bury)

end

Terms and Conditions