• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Prime-field-constraint-systems
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Java
        • C
        • Syntheto
        • Number-theory
        • Cryptography
          • R1cs
            • R1cs-verification-with-axe
            • R1cs-constraintp
            • Dot-product
            • R1csp
            • R1cs-constraint-holdsp
            • Sparse-vectorp
            • R1cs-holdsp
            • R1cs-constraints-holdp
              • R1cs-constraint-listp
              • Pseudo-varp
              • Pseudo-var-listp
            • Interfaces
            • Sha-2
            • Keccak
            • Kdf
            • Mimc
            • Padding
            • Hmac
            • Elliptic-curves
            • Attachments
            • Elliptic-curve-digital-signature-algorithm
          • Lists-light
          • File-io-light
          • Json
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • R1cs

    R1cs-constraints-holdp

    Check whether a valuation satisfies a list of R1CS constraints

    ;; Check whether the valuation satisfies all of the constraints.
    (defun r1cs-constraints-holdp (constraints valuation prime)
      (declare (xargs :guard (and (primep prime)
                                  (r1cs-constraint-listp constraints)
                                  (r1cs-valuationp valuation prime)
                                  (good-r1cs-constraint-listp constraints (strip-cars valuation)))))
      (if (endp constraints)
          t
        (and (r1cs-constraint-holdsp (first constraints) valuation prime)
             (r1cs-constraints-holdp (rest constraints) valuation prime))))