• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Abstract-syntax
        • R1cs-subset
        • Semantics
        • Abstract-syntax-operations
        • Indexed-names
        • Well-formedness
        • Concrete-syntax
        • R1cs-bridge
          • R1cs-constraints-to-pfcs
          • R1cs-vec-elem-to-pfcs
          • R1cs-vector-to-pfcs
          • R1cs-to-pfcs
            • R1cs-constraint-to-pfcs
          • Parser-interface
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • R1cs-bridge

    R1cs-to-pfcs

    Translate an R1CS to a PFCS.

    Signature
    (r1cs-to-pfcs r1cs) → sys
    Arguments
    r1cs — Guard (r1cs::r1csp r1cs).
    Returns
    sys — Type (systemp sys).

    An R!CS is formalized as consisting of a prime, a list of variables, and a list of constraints. We translate this to a PFCS with no definitions and whose constraints are the ones of the R1CS (translated). We ignore the prime in the R1CS, because PFCSes do not include primes, syntactically.

    Definitions and Theorems

    Function: r1cs-to-pfcs

    (defun r1cs-to-pfcs (r1cs)
     (declare (xargs :guard (r1cs::r1csp r1cs)))
     (let ((__function__ 'r1cs-to-pfcs))
       (declare (ignorable __function__))
       (make-system
            :definitions nil
            :constraints
            (r1cs-constraints-to-pfcs (r1cs::r1cs->constraints r1cs)))))

    Theorem: systemp-of-r1cs-to-pfcs

    (defthm systemp-of-r1cs-to-pfcs
      (b* ((sys (r1cs-to-pfcs r1cs)))
        (systemp sys))
      :rule-classes :rewrite)

    Theorem: r1cs-systemp-of-r1cs-to-pfcs

    (defthm r1cs-systemp-of-r1cs-to-pfcs
      (b* ((sys (r1cs-to-pfcs r1cs)))
        (r1cs-systemp sys))
      :rule-classes :rewrite)