Function:
(defun path-append (x y) (declare (xargs :guard (and (path-p x) (path-p y)))) (let ((__function__ 'path-append)) (declare (ignorable __function__)) (path-case x :wire (make-path-scope :subpath y :namespace x.name) :scope (make-path-scope :subpath (path-append x.subpath y) :namespace x.namespace))))
Theorem:
(defthm path-p-of-path-append (b* ((new-path (path-append x y))) (path-p new-path)) :rule-classes :rewrite)
Theorem:
(defthm path-append-of-path-fix-x (equal (path-append (path-fix x) y) (path-append x y)))
Theorem:
(defthm path-append-path-equiv-congruence-on-x (implies (path-equiv x x-equiv) (equal (path-append x y) (path-append x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm path-append-of-path-fix-y (equal (path-append x (path-fix y)) (path-append x y)))
Theorem:
(defthm path-append-path-equiv-congruence-on-y (implies (path-equiv y y-equiv) (equal (path-append x y) (path-append x y-equiv))) :rule-classes :congruence)