• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • 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
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • R1cs

    R1cs-holdsp

    Check whether a valuation satisifies an R1CS.

    ;; Check whether VALUATION satisifies R1CS.
    (defun r1cs-holdsp (r1cs valuation)
      (declare (xargs :guard (and (r1csp r1cs)
                                  (r1cs-valuationp valuation (r1cs->prime r1cs))
                                  ;; all of the variables in the r1cs should be bound in the valuation
                                  (subsetp-eq (r1cs->vars r1cs) (strip-cars valuation)))
                      :guard-hints (("Goal" :in-theory (enable r1csp
                                                               r1cs->constraints
                                                               r1cs->prime
                                                               r1cs->vars)))))
      (r1cs-constraints-holdp (r1cs->constraints r1cs)
                              valuation
                              (r1cs->prime r1cs)))