Translate a list of R1CS constraints to a list of PFCS constraints.

- Signature
(r1cs-constraints-to-pfcs x) → pconstrs

- Returns
`pconstrs`—Type (constraint-listp pconstrs) .

These are translated element-wise.

**Function: **

(defun r1cs-constraints-to-pfcs-exec (x acc) (declare (xargs :guard (r1cs::r1cs-constraint-listp x))) (let ((__function__ 'r1cs-constraints-to-pfcs-exec)) (declare (ignorable __function__)) (if (consp x) (r1cs-constraints-to-pfcs-exec (cdr x) (cons (r1cs-constraint-to-pfcs (car x)) acc)) acc)))

**Function: **

(defun r1cs-constraints-to-pfcs-nrev (x acl2::nrev) (declare (xargs :stobjs (acl2::nrev))) (declare (xargs :guard (r1cs::r1cs-constraint-listp x))) (let ((__function__ 'r1cs-constraints-to-pfcs-nrev)) (declare (ignorable __function__)) (if (atom x) (acl2::nrev-fix acl2::nrev) (let ((acl2::nrev (acl2::nrev-push (r1cs-constraint-to-pfcs (car x)) acl2::nrev))) (r1cs-constraints-to-pfcs-nrev (cdr x) acl2::nrev)))))

**Function: **

(defun r1cs-constraints-to-pfcs (x) (declare (xargs :guard (r1cs::r1cs-constraint-listp x))) (let ((__function__ 'r1cs-constraints-to-pfcs)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (cons (r1cs-constraint-to-pfcs (car x)) (r1cs-constraints-to-pfcs (cdr x))) nil) :exec (if (atom x) nil (acl2::with-local-nrev (r1cs-constraints-to-pfcs-nrev x acl2::nrev))))))

**Theorem: **

(defthm constraint-listp-of-r1cs-constraints-to-pfcs (b* ((pconstrs (r1cs-constraints-to-pfcs x))) (constraint-listp pconstrs)) :rule-classes :rewrite)

**Theorem: **

(defthm r1cs-constraints-to-pfcs-of-take (implies (<= (nfix acl2::n) (len acl2::x)) (equal (r1cs-constraints-to-pfcs (take acl2::n acl2::x)) (take acl2::n (r1cs-constraints-to-pfcs acl2::x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm set-equiv-congruence-over-r1cs-constraints-to-pfcs (implies (set-equiv acl2::x acl2::y) (set-equiv (r1cs-constraints-to-pfcs acl2::x) (r1cs-constraints-to-pfcs acl2::y))) :rule-classes ((:congruence)))

**Theorem: **

(defthm subsetp-of-r1cs-constraints-to-pfcs-when-subsetp (implies (subsetp acl2::x acl2::y) (subsetp (r1cs-constraints-to-pfcs acl2::x) (r1cs-constraints-to-pfcs acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm member-of-r1cs-constraint-to-pfcs-in-r1cs-constraints-to-pfcs (implies (member acl2::k acl2::x) (member (r1cs-constraint-to-pfcs acl2::k) (r1cs-constraints-to-pfcs acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm r1cs-constraints-to-pfcs-nrev-removal (equal (r1cs-constraints-to-pfcs-nrev acl2::x acl2::nrev) (append acl2::nrev (r1cs-constraints-to-pfcs acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm r1cs-constraints-to-pfcs-exec-removal (equal (r1cs-constraints-to-pfcs-exec acl2::x acl2::acc) (revappend (r1cs-constraints-to-pfcs acl2::x) acl2::acc)) :rule-classes ((:rewrite)))

**Theorem: **

(defthm r1cs-constraints-to-pfcs-of-rev (equal (r1cs-constraints-to-pfcs (rev acl2::x)) (rev (r1cs-constraints-to-pfcs acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm r1cs-constraints-to-pfcs-of-list-fix (equal (r1cs-constraints-to-pfcs (list-fix acl2::x)) (r1cs-constraints-to-pfcs acl2::x)) :rule-classes ((:rewrite)))

**Theorem: **

(defthm r1cs-constraints-to-pfcs-of-append (equal (r1cs-constraints-to-pfcs (append acl2::a acl2::b)) (append (r1cs-constraints-to-pfcs acl2::a) (r1cs-constraints-to-pfcs acl2::b))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm cdr-of-r1cs-constraints-to-pfcs (equal (cdr (r1cs-constraints-to-pfcs acl2::x)) (r1cs-constraints-to-pfcs (cdr acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm car-of-r1cs-constraints-to-pfcs (equal (car (r1cs-constraints-to-pfcs acl2::x)) (and (consp acl2::x) (r1cs-constraint-to-pfcs (car acl2::x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm r1cs-constraints-to-pfcs-under-iff (iff (r1cs-constraints-to-pfcs acl2::x) (consp acl2::x)) :rule-classes ((:rewrite)))

**Theorem: **

(defthm consp-of-r1cs-constraints-to-pfcs (equal (consp (r1cs-constraints-to-pfcs acl2::x)) (consp acl2::x)) :rule-classes ((:rewrite)))

**Theorem: **

(defthm len-of-r1cs-constraints-to-pfcs (equal (len (r1cs-constraints-to-pfcs acl2::x)) (len acl2::x)) :rule-classes ((:rewrite)))

**Theorem: **

(defthm true-listp-of-r1cs-constraints-to-pfcs (true-listp (r1cs-constraints-to-pfcs acl2::x)) :rule-classes :type-prescription)

**Theorem: **

(defthm r1cs-constraints-to-pfcs-when-not-consp (implies (not (consp acl2::x)) (equal (r1cs-constraints-to-pfcs acl2::x) nil)) :rule-classes ((:rewrite)))

**Theorem: **

(defthm r1cs-constraints-to-pfcs-of-cons (equal (r1cs-constraints-to-pfcs (cons acl2::a acl2::b)) (cons (r1cs-constraint-to-pfcs acl2::a) (r1cs-constraints-to-pfcs acl2::b))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm r1cs-constraint-listp-of-r1cs-constraints-to-pfcs (b* ((pconstrs (r1cs-constraints-to-pfcs x))) (r1cs-constraint-listp pconstrs)) :rule-classes :rewrite)