Recognizer for cgraph.
(cgraph-p x) → *
Function:
(defun cgraph-p (x) (declare (xargs :guard t)) (let ((__function__ 'cgraph-p)) (declare (ignorable __function__)) (if (atom x) (eq x nil) (and (consp (car x)) (fgl-object-p (caar x)) (cgraph-edgelist-p (cdar x)) (cgraph-p (cdr x))))))
Theorem:
(defthm cgraph-p-of-revappend (equal (cgraph-p (revappend x y)) (and (cgraph-p (list-fix x)) (cgraph-p y))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-remove (implies (cgraph-p x) (cgraph-p (remove a x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-last (implies (cgraph-p (double-rewrite x)) (cgraph-p (last x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-nthcdr (implies (cgraph-p (double-rewrite x)) (cgraph-p (nthcdr n x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-butlast (implies (cgraph-p (double-rewrite x)) (cgraph-p (butlast x n))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-update-nth (implies (cgraph-p (double-rewrite x)) (iff (cgraph-p (update-nth n y x)) (and (and (consp y) (fgl-object-p (car y)) (cgraph-edgelist-p (cdr y))) (or (<= (nfix n) (len x)) (and (consp nil) (fgl-object-p (car nil)) (cgraph-edgelist-p (cdr nil))))))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-repeat (iff (cgraph-p (acl2::repeat n x)) (or (and (consp x) (fgl-object-p (car x)) (cgraph-edgelist-p (cdr x))) (zp n))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-take (implies (cgraph-p (double-rewrite x)) (iff (cgraph-p (take n x)) (or (and (consp nil) (fgl-object-p (car nil)) (cgraph-edgelist-p (cdr nil))) (<= (nfix n) (len x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-union-equal (equal (cgraph-p (union-equal x y)) (and (cgraph-p (list-fix x)) (cgraph-p (double-rewrite y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-intersection-equal-2 (implies (cgraph-p (double-rewrite y)) (cgraph-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-intersection-equal-1 (implies (cgraph-p (double-rewrite x)) (cgraph-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-set-difference-equal (implies (cgraph-p x) (cgraph-p (set-difference-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-when-subsetp-equal (and (implies (and (subsetp-equal x y) (cgraph-p y)) (equal (cgraph-p x) (true-listp x))) (implies (and (cgraph-p y) (subsetp-equal x y)) (equal (cgraph-p x) (true-listp x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-rcons (iff (cgraph-p (acl2::rcons a x)) (and (and (consp a) (fgl-object-p (car a)) (cgraph-edgelist-p (cdr a))) (cgraph-p (list-fix x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-append (equal (cgraph-p (append a b)) (and (cgraph-p (list-fix a)) (cgraph-p b))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-rev (equal (cgraph-p (rev x)) (cgraph-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-duplicated-members (implies (cgraph-p x) (cgraph-p (acl2::duplicated-members x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-difference (implies (cgraph-p x) (cgraph-p (set::difference x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-intersect-2 (implies (cgraph-p y) (cgraph-p (set::intersect x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-intersect-1 (implies (cgraph-p x) (cgraph-p (set::intersect x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-union (iff (cgraph-p (set::union x y)) (and (cgraph-p (set::sfix x)) (cgraph-p (set::sfix y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-mergesort (iff (cgraph-p (set::mergesort x)) (cgraph-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-delete (implies (cgraph-p x) (cgraph-p (set::delete k x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-insert (iff (cgraph-p (set::insert a x)) (and (cgraph-p (set::sfix x)) (and (consp a) (fgl-object-p (car a)) (cgraph-edgelist-p (cdr a))))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-sfix (iff (cgraph-p (set::sfix x)) (or (cgraph-p x) (not (set::setp x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-list-fix (implies (cgraph-p x) (cgraph-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-when-cgraph-p-compound-recognizer (implies (cgraph-p x) (true-listp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm cgraph-p-when-not-consp (implies (not (consp x)) (equal (cgraph-p x) (not x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-cdr-when-cgraph-p (implies (cgraph-p (double-rewrite x)) (cgraph-p (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-cons (equal (cgraph-p (cons a x)) (and (and (consp a) (fgl-object-p (car a)) (cgraph-edgelist-p (cdr a))) (cgraph-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-remove-assoc (implies (cgraph-p x) (cgraph-p (remove-assoc-equal name x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-put-assoc (implies (and (cgraph-p x)) (iff (cgraph-p (put-assoc-equal name acl2::val x)) (and (fgl-object-p name) (cgraph-edgelist-p acl2::val)))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-fast-alist-clean (implies (cgraph-p x) (cgraph-p (fast-alist-clean x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-hons-shrink-alist (implies (and (cgraph-p x) (cgraph-p y)) (cgraph-p (hons-shrink-alist x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-p-of-hons-acons (equal (cgraph-p (hons-acons a n x)) (and (fgl-object-p a) (cgraph-edgelist-p n) (cgraph-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm cgraph-edgelist-p-of-cdr-of-hons-assoc-equal-when-cgraph-p (implies (cgraph-p x) (iff (cgraph-edgelist-p (cdr (hons-assoc-equal k x))) (or (hons-assoc-equal k x) (cgraph-edgelist-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-cgraph-p-rewrite (implies (cgraph-p x) (alistp x)) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-cgraph-p (implies (cgraph-p x) (alistp x)) :rule-classes :tau-system)
Theorem:
(defthm cgraph-edgelist-p-of-cdar-when-cgraph-p (implies (cgraph-p x) (iff (cgraph-edgelist-p (cdar x)) (or (consp x) (cgraph-edgelist-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm fgl-object-p-of-caar-when-cgraph-p (implies (cgraph-p x) (iff (fgl-object-p (caar x)) (or (consp x) (fgl-object-p nil)))) :rule-classes ((:rewrite)))