Generate lemma instances to prove the fixing of an argument.
(deffixequiv-sk-lemma-insts-arg fn-rule fn-witness bvars args-names arg-name arg-fix) → lemma-instances
Each argument of the function has some associated lemma instances,
which are then used in the hints to prove the fixing of the argument.
This code generates the lemma instances for the argument
whose name is
Function:
(defun deffixequiv-sk-lemma-insts-arg (fn-rule fn-witness bvars args-names arg-name arg-fix) (declare (xargs :guard (and (symbolp fn-rule) (symbolp fn-witness) (symbol-listp bvars) (symbol-listp args-names) (symbolp arg-name) (symbolp arg-fix)))) (declare (xargs :guard (not (eq fn-witness 'quote)))) (let ((__function__ 'deffixequiv-sk-lemma-insts-arg)) (declare (ignorable __function__)) (b* ((call1 (acl2::fcons-term fn-witness args-names)) (call2 (acl2::fcons-term fn-witness (subst (list arg-fix arg-name) arg-name args-names))) (instance1 (cons ':instance (cons fn-rule (cons (cons arg-name (cons (cons arg-fix (cons arg-name 'nil)) 'nil)) (if (= (len bvars) 1) (list (list (car bvars) call1)) (deffixequiv-sk-lemma-inst-subst bvars 0 call1)))))) (instance2 (cons ':instance (cons fn-rule (if (= (len bvars) 1) (list (list (car bvars) call2)) (deffixequiv-sk-lemma-inst-subst bvars 0 call2)))))) (list instance1 instance2))))
Theorem:
(defthm true-list-listp-of-deffixequiv-sk-lemma-insts-arg (b* ((lemma-instances (deffixequiv-sk-lemma-insts-arg fn-rule fn-witness bvars args-names arg-name arg-fix))) (true-list-listp lemma-instances)) :rule-classes :rewrite)