Recognizer for signed-format structures.
(signed-formatp x) → *
Function:
(defun signed-formatp (x) (declare (xargs :guard t)) (let ((__function__ 'signed-formatp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :sign-magnitude)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :ones-complement) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :twos-complement) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-signed-formatp (implies (signed-formatp x) (consp x)) :rule-classes :compound-recognizer)