• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
        • Proof-support
        • Semantics
        • Lifting
        • R1cs-subset
        • Indexed-names
        • Well-formedness
        • Abstract-syntax
          • Syntax-abstraction
          • Abstract-syntax-trees
          • Abstract-syntax-operations
            • Expression-var-list
            • Lookup-definition
            • Constrel
            • Constraint-constrels
            • Constraint-list-constrels
            • Constraint-rels
              • Constraint-list-rels
              • Expression-sub
              • Expression-const/var-listp
              • Expression-var-listp
              • Expression-neg
              • Expression-list-vars
              • Expression-vars
              • Definition-free-vars
              • Constraint-vars
              • Constraint-list-vars
              • Constrel-set
            • Convenience-constructors
          • Concrete-syntax
          • R1cs-bridge
          • Parser-interface
        • Wp-gen
        • Dimacs-reader
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Riscv
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • 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
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Abstract-syntax-operations

    Constraint-rels

    Set of (names of) relations in a constraint.

    Signature
    (constraint-rels constr) → rels
    Arguments
    constr — Guard (constraintp constr).
    Returns
    rels — Type (string-setp rels).

    This is the empty set for an equality constraint; for a relation constraint, it is the singleton with that constraint relation. This function is used to define constraint-list-rels.

    Definitions and Theorems

    Function: constraint-rels

    (defun constraint-rels (constr)
      (declare (xargs :guard (constraintp constr)))
      (let ((__function__ 'constraint-rels))
        (declare (ignorable __function__))
        (constraint-case constr
                         :equal nil
                         :relation (insert constr.name nil))))

    Theorem: string-setp-of-constraint-rels

    (defthm string-setp-of-constraint-rels
      (b* ((rels (constraint-rels constr)))
        (string-setp rels))
      :rule-classes :rewrite)

    Theorem: constraint-rels-of-constraint-fix-constr

    (defthm constraint-rels-of-constraint-fix-constr
      (equal (constraint-rels (constraint-fix constr))
             (constraint-rels constr)))

    Theorem: constraint-rels-constraint-equiv-congruence-on-constr

    (defthm constraint-rels-constraint-equiv-congruence-on-constr
      (implies (constraint-equiv constr constr-equiv)
               (equal (constraint-rels constr)
                      (constraint-rels constr-equiv)))
      :rule-classes :congruence)