• 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
          • Semantics-deeply-embedded
          • Lifting
          • Semantics-shallowly-embedded
            • Name-list-to-symbol-list
            • Name-to-symbol
            • Sesem-definition
            • Sesem-expression
            • Sesem-constraint
              • Sesem-gen-fep-terms
              • Sesem-expression-list
              • Sesem-definition-list
              • Sesem-constraint-list
              • Name-set-to-symbol-list
          • Abstract-syntax-operations
          • Indexed-names
          • Well-formedness
          • Concrete-syntax
          • R1cs-bridge
          • 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
    • Semantics-shallowly-embedded

    Sesem-constraint

    Shallowly embedded semantics of a constraint.

    Signature
    (sesem-constraint constr prime state) → term
    Arguments
    constr — Guard (constraintp constr).
    prime — Guard (symbolp prime).

    We turn an equality constraint into an ACL2 equality of the terms denoted by the left and right expressions. We turn a relation constraint into an ACL2 call of the relation on the terms denoted by the argument expressions. Note that we include the variable for the prime.

    Definitions and Theorems

    Function: sesem-constraint

    (defun sesem-constraint (constr prime state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (constraintp constr)
                                 (symbolp prime))))
     (let ((__function__ 'sesem-constraint))
      (declare (ignorable __function__))
      (constraint-case
           constr
           :equal
           (cons 'equal
                 (cons (sesem-expression constr.left prime state)
                       (cons (sesem-expression constr.right prime state)
                             'nil)))
           :relation
           (cons (name-to-symbol constr.name state)
                 (append (sesem-expression-list constr.args prime state)
                         (cons prime 'nil))))))