Check if a byte array is a hex-prefix encoding.
This is a declarative, non-executable definition, which essentially characterizes the image of hp-encode.
Theorem:
(defthm hp-encoding-p-suff (implies (and (nibble-listp nibbles) (booleanp flag) (equal (hp-encode nibbles flag) (byte-list-fix encoding))) (hp-encoding-p encoding)))
Theorem:
(defthm booleanp-of-hp-encoding-p (b* ((yes/no (hp-encoding-p encoding))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm hp-encoding-p-of-byte-list-fix-encoding (equal (hp-encoding-p (byte-list-fix encoding)) (hp-encoding-p encoding)))
Theorem:
(defthm hp-encoding-p-byte-list-equiv-congruence-on-encoding (implies (byte-list-equiv encoding encoding-equiv) (equal (hp-encoding-p encoding) (hp-encoding-p encoding-equiv))) :rule-classes :congruence)