equal
deleted
inserted
replaced
23 "None \<le> y = True" | |
23 "None \<le> y = True" | |
24 "Some _ \<le> None = False" |
24 "Some _ \<le> None = False" |
25 |
25 |
26 definition less_option where "x < (y::'a option) = (x \<le> y \<and> \<not> y \<le> x)" |
26 definition less_option where "x < (y::'a option) = (x \<le> y \<and> \<not> y \<le> x)" |
27 |
27 |
28 lemma [simp]: "(x \<le> None) = (x = None)" |
28 lemma le_None[simp]: "(x \<le> None) = (x = None)" |
29 by (cases x) simp_all |
29 by (cases x) simp_all |
30 |
30 |
31 lemma [simp]: "(Some x \<le> u) = (\<exists>y. u = Some y \<and> x \<le> y)" |
31 lemma Some_le[simp]: "(Some x \<le> u) = (\<exists>y. u = Some y \<and> x \<le> y)" |
32 by (cases u) auto |
32 by (cases u) auto |
33 |
33 |
34 instance proof |
34 instance proof |
35 case goal1 show ?case by(rule less_option_def) |
35 case goal1 show ?case by(rule less_option_def) |
36 next |
36 next |