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.

Exercise 2

This is the task corresponding to exercise 2.

Resources

Download Files

Definitions File

theory Defs
  imports "HOL-Library.Tree"
begin

consts asc :: "('a::linorder) tree \<Rightarrow> 'a list"

end

Template File

theory Submission
  imports Defs
begin

fun asc :: "('a::linorder) tree \<Rightarrow> 'a list" where
  "asc _ = undefined"

lemma set_asc: "set (asc t) = set_tree t"
  sorry

lemma sorted_asc: "heap t \<Longrightarrow> sorted (asc t)"
  sorry

end

Check File

theory Check
  imports Submission
begin

lemma set_asc: "set(asc t) = set_tree t"
  by (rule Submission.set_asc)

lemma sorted_asc: "heap t \<Longrightarrow> sorted (asc t)"
  by (rule Submission.sorted_asc)

end

Terms and Conditions