let [pth_0g;pth_0l;pth_gg;pth_gl;pth_lg;pth_ll] =
(CONJUNCTS o prove)
(`((p = &0) ==> c > &0 ==> (c * p = &0)) /\
((p = &0) ==> c < &0 ==> (c * p = &0)) /\
(p > &0 ==> c > &0 ==> c * p > &0) /\
(p > &0 ==> c < &0 ==> c * p < &0) /\
(p < &0 ==> c > &0 ==> c * p < &0) /\
(p < &0 ==> c < &0 ==> c * p > &0)`,
SIMP_TAC[REAL_MUL_RZERO] THEN
REWRITE_TAC[REAL_ARITH `(x > &0 <=> &0 < x) /\ (x < &0 <=> &0 < --x)`;
REAL_ARITH `~(p = &0) <=> p < &0 \/ p > &0`] THEN
REWRITE_TAC[IMP_IMP] THEN
REPEAT CONJ_TAC THEN DISCH_THEN(MP_TAC o MATCH_MP REAL_LT_MUL) THEN
REAL_ARITH_TAC);;
(* }}} *)
(* }}} *)
(* }}} *)
(* }}} *)
(* }}} *)
(* }}} *)
(* }}} *)
(* }}} *)
(* }}} *)
(* }}} *)
(* }}} *)
let signs_lem003 = TAUT `a \/ b ==> (a ==> x) ==> (b ==> y) ==> (a /\ x \/ b /\ y)`;;
let sz_z_thm = ref TRUTH;;
let sz_nz_thm = ref TRUTH;;
let PULL_CASES_THM = prove
(`!a p p0 p1.
((a = &0) /\ (p <=> p0) \/ (a <> &0) /\ (p <=> p1)) <=> ((p <=> (a = &0) /\ p0 \/ a <> &0 /\ p1 ))`,
(* {{{ Proof *)
REPEAT STRIP_TAC THEN REWRITE_TAC[
NEQ] THEN MAP_EVERY BOOL_CASES_TAC [`p:bool`; `p0:bool`; `p1:bool`; `p2:bool`] THEN
ASM_REWRITE_TAC[] THEN REAL_ARITH_TAC);;
(* }}} *)
let signs_lem0003 = TAUT `a \/ b ==> (a ==> x) ==> (b ==> y) ==> (a /\ x \/ b /\ y)`;;
let PULL_CASES_THM_NZ = prove
(`!a p p1 p2.
(a <> &0) ==> ((a > &0 /\ (p <=> p1) \/ a < &0 /\ (p <=> p2)) <=>
((p <=> a > &0 /\ p1 \/ a < &0 /\ p2)))`,
(* {{{ Proof *)
REWRITE_TAC[
NEQ] THEN
REPEAT STRIP_TAC THEN
REWRITE_TAC[
NEQ] THEN
MAP_EVERY BOOL_CASES_TAC [`p:bool`; `p0:bool`; `p1:bool`; `p2:bool`] THEN
ASM_REWRITE_TAC[] THEN TRY (POP_ASSUM MP_TAC THEN REAL_ARITH_TAC)
);;
(* }}} *)