Semantics of prose value notations.
(tree-match-prose-val-p tree prose-val) → yes/no
Formally speaking, any tree matches prose, because prose has no formal semantics. When a rule includes prose, its meaning can be formalized via external predicates on trees.
Function:
(defun tree-match-prose-val-p (tree prose-val) (declare (xargs :guard (and (treep tree) (prose-val-p prose-val)))) t)
Theorem:
(defthm booleanp-of-tree-match-prose-val-p (b* ((yes/no (tree-match-prose-val-p tree prose-val))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm tree-match-prose-val-p-of-tree-fix-tree (equal (tree-match-prose-val-p (tree-fix tree) prose-val) (tree-match-prose-val-p tree prose-val)))
Theorem:
(defthm tree-match-prose-val-p-tree-equiv-congruence-on-tree (implies (tree-equiv tree tree-equiv) (equal (tree-match-prose-val-p tree prose-val) (tree-match-prose-val-p tree-equiv prose-val))) :rule-classes :congruence)
Theorem:
(defthm tree-match-prose-val-p-of-prose-val-fix-prose-val (equal (tree-match-prose-val-p tree (prose-val-fix prose-val)) (tree-match-prose-val-p tree prose-val)))
Theorem:
(defthm tree-match-prose-val-p-prose-val-equiv-congruence-on-prose-val (implies (prose-val-equiv prose-val prose-val-equiv) (equal (tree-match-prose-val-p tree prose-val) (tree-match-prose-val-p tree prose-val-equiv))) :rule-classes :congruence)