Check that a message is not self-addressed.
The certificate's author, who is the sender, must differ from the destination, who is the recipient.
Function:
(defun message-noselfp (msg) (declare (xargs :guard (messagep msg))) (let ((__function__ 'message-noselfp)) (declare (ignorable __function__)) (not (equal (certificate->author (message->certificate msg)) (message->destination msg)))))
Theorem:
(defthm booleanp-of-message-noselfp (b* ((yes/no (message-noselfp msg))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm message-noselfp-of-message-fix-msg (equal (message-noselfp (message-fix msg)) (message-noselfp msg)))
Theorem:
(defthm message-noselfp-message-equiv-congruence-on-msg (implies (message-equiv msg msg-equiv) (equal (message-noselfp msg) (message-noselfp msg-equiv))) :rule-classes :congruence)