• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
          • Circuits
            • Circuits-pfcs
            • Circuits-r1cs
            • Field-div-flagged
            • Boolean-assert-true
            • Field-inv-flagged
            • Boolean-assert
            • Field-div-unchecked
            • Field-neq
            • Boolean-not
            • Boolean-assert-all
              • Boolean-assert-all-lifting
              • Boolean-assert-all-circuit
              • Boolean-assert-all-circuit-body
                • Boolean-assert-all-spec
                • Boolean-assert-all-correctness
              • Boolean-if
              • Field-if
              • Boolean-xor
              • Boolean-or
              • Boolean-nor
              • Boolean-and
              • Boolean-nand
              • Boolean-neq
              • Boolean-eq
              • Field-div-checked
              • Field-inv-checked
              • Boolean-assert-neq
              • Boolean-assert-eq
              • Field-eq
              • Field-assert-neq
              • Field-assert-eq
              • Field-mul
              • Field-sub
              • Field-square
              • Field-neg
              • Field-double
              • Field-add
            • Language
          • Leo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Boolean-assert-all

    Boolean-assert-all-circuit-body

    Construct the defining body of the PFCS relation.

    Signature
    (boolean-assert-all-circuit-body xs) → constrs
    Arguments
    xs — Guard (name-listp xs).
    Returns
    constrs — Type (pfcs::constraint-listp constrs).

    This is the list of boolean-assert calls, applied to each parameter. To facilitate proofs by induction, we define this construction over an arbitrary list of variable names, which are then instantiated to (x[0] ... x[n-1]).

    Definitions and Theorems

    Function: boolean-assert-all-circuit-body

    (defun boolean-assert-all-circuit-body (xs)
      (declare (xargs :guard (name-listp xs)))
      (let ((__function__ 'boolean-assert-all-circuit-body))
        (declare (ignorable __function__))
        (cond ((endp xs) nil)
              (t (cons (pfcall (pfname "boolean_assert")
                               (pfvar (car xs)))
                       (boolean-assert-all-circuit-body (cdr xs)))))))

    Theorem: constraint-listp-of-boolean-assert-all-circuit-body

    (defthm constraint-listp-of-boolean-assert-all-circuit-body
      (b* ((constrs (boolean-assert-all-circuit-body xs)))
        (pfcs::constraint-listp constrs))
      :rule-classes :rewrite)

    Theorem: sr1cs-constraint-listp-of-boolean-assert-all-circuit-body

    (defthm sr1cs-constraint-listp-of-boolean-assert-all-circuit-body
      (b* ((constrs (boolean-assert-all-circuit-body xs)))
        (pfcs::sr1cs-constraint-listp constrs))
      :rule-classes :rewrite)

    Theorem: constraint-list-vars-of-boolean-assert-all-circuit-body

    (defthm constraint-list-vars-of-boolean-assert-all-circuit-body
     (equal
       (pfcs::constraint-list-vars (boolean-assert-all-circuit-body xs))
       (mergesort (name-list-fix xs))))