equal
deleted
inserted
replaced
575 "((if b then y else error_if c e y) = None) = ((c \<longrightarrow> b) \<and> y = None)" |
575 "((if b then y else error_if c e y) = None) = ((c \<longrightarrow> b) \<and> y = None)" |
576 apply (simp add: abrupt_if_def) |
576 apply (simp add: abrupt_if_def) |
577 apply auto |
577 apply auto |
578 done |
578 done |
579 |
579 |
580 lemma raise_if_SomeD [dest!]: |
580 lemma error_if_SomeD [dest!]: |
581 "error_if c e y = Some z \<Longrightarrow> c \<and> z=(Error e) \<and> y=None \<or> (y=Some z)" |
581 "error_if c e y = Some z \<Longrightarrow> c \<and> z=(Error e) \<and> y=None \<or> (y=Some z)" |
582 apply (case_tac y) |
582 apply (case_tac y) |
583 apply (case_tac c) |
583 apply (case_tac c) |
584 apply (simp add: abrupt_if_def) |
584 apply (simp add: abrupt_if_def) |
585 apply (simp add: abrupt_if_def) |
585 apply (simp add: abrupt_if_def) |
771 |
771 |
772 lemma error_free_Some [simp,intro]: |
772 lemma error_free_Some [simp,intro]: |
773 "\<not> (\<exists> err. x=Error err) \<Longrightarrow> error_free ((Some x),s)" |
773 "\<not> (\<exists> err. x=Error err) \<Longrightarrow> error_free ((Some x),s)" |
774 by (auto simp add: error_free_def) |
774 by (auto simp add: error_free_def) |
775 |
775 |
776 lemma error_free_absorb [simp,intro]: |
776 lemma error_free_abupd_absorb [simp,intro]: |
777 "error_free s \<Longrightarrow> error_free (abupd (absorb j) s)" |
777 "error_free s \<Longrightarrow> error_free (abupd (absorb j) s)" |
778 by (cases s) |
778 by (cases s) |
779 (auto simp add: error_free_def absorb_def |
779 (auto simp add: error_free_def absorb_def |
780 split: split_if_asm) |
780 split: split_if_asm) |
781 |
781 |