# HG changeset patch # User huffman # Date 1213977655 -7200 # Node ID de9a2fd0eab448144a5478bfb957194f91021dc9 # Parent 7be07972600980118c9a49f0760c36a4ecc2a950 added some lemmas; tuned proofs diff -r 7be079726009 -r de9a2fd0eab4 src/HOLCF/One.thy --- a/src/HOLCF/One.thy Fri Jun 20 17:58:16 2008 +0200 +++ b/src/HOLCF/One.thy Fri Jun 20 18:00:55 2008 +0200 @@ -22,29 +22,34 @@ text {* Exhaustion and Elimination for type @{typ one} *} lemma Exh_one: "t = \ \ t = ONE" -apply (unfold ONE_def) -apply (induct t) -apply simp -apply simp -done +unfolding ONE_def by (induct t) simp_all lemma oneE: "\p = \ \ Q; p = ONE \ Q\ \ Q" -apply (rule Exh_one [THEN disjE]) -apply fast -apply fast -done +unfolding ONE_def by (induct p) simp_all + +lemma one_induct: "\P \; P ONE\ \ P x" +by (cases x rule: oneE) simp_all lemma dist_less_one [simp]: "\ ONE \ \" -apply (unfold ONE_def) -apply simp -done +unfolding ONE_def by simp + +lemma less_ONE [simp]: "x \ ONE" +by (induct x rule: one_induct) simp_all + +lemma ONE_less_iff [simp]: "ONE \ x \ x = ONE" +by (induct x rule: one_induct) simp_all lemma dist_eq_one [simp]: "ONE \ \" "\ \ ONE" -apply (unfold ONE_def) -apply simp_all -done +unfolding ONE_def by simp_all -lemma compact_ONE [simp]: "compact ONE" +lemma one_neq_iffs [simp]: + "x \ ONE \ x = \" + "ONE \ x \ x = \" + "x \ \ \ x = ONE" + "\ \ x \ x = ONE" +by (induct x rule: one_induct) simp_all + +lemma compact_ONE: "compact ONE" by (rule compact_chfin) text {* Case analysis function for type @{typ one} *} @@ -54,8 +59,8 @@ "one_when = (\ a. strictify\(\ _. a))" translations - "case x of CONST ONE \ t" == "CONST one_when\t\x" - "\ (CONST ONE). t" == "CONST one_when\t" + "case x of XCONST ONE \ t" == "CONST one_when\t\x" + "\ (XCONST ONE). t" == "CONST one_when\t" lemma one_when1 [simp]: "(case \ of ONE \ t) = \" by (simp add: one_when_def) @@ -64,6 +69,6 @@ by (simp add: one_when_def) lemma one_when3 [simp]: "(case x of ONE \ ONE) = x" -by (rule_tac p=x in oneE, simp_all) +by (induct x rule: one_induct) simp_all end