• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Prime-field-constraint-systems
          • Proof-support
          • R1cs-subset
          • Semantics
          • Abstract-syntax
          • Well-formedness
            • Definition-list-wfp
            • Definition-wfp
            • Constraint-wfp
            • Constraint-list-wfp
            • System-wfp
            • Abstract-syntax-operations
            • R1cs-bridge
            • Concrete-syntax
            • Prime-field-library-extensions
            • R1cs-library-extensions
          • Soft
          • Bv
          • Imp-language
          • Event-macros
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Java
          • C
          • Syntheto
          • Number-theory
          • Cryptography
          • Lists-light
          • File-io-light
          • Json
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Well-formedness

    System-wfp

    Check if a system is well-formed.

    Signature
    (system-wfp sys) → yes/no
    Arguments
    sys — Guard (systemp sys).
    Returns
    yes/no — Type (booleanp yes/no).

    The list of definitions must be well-formed, and the list of constraints must be well-formed with respect to the list of definitions.

    Definitions and Theorems

    Function: system-wfp

    (defun
     system-wfp (sys)
     (declare (xargs :guard (systemp sys)))
     (let
      ((__function__ 'system-wfp))
      (declare (ignorable __function__))
      (b* (((system sys) sys))
          (and (definition-list-wfp sys.definitions)
               (constraint-list-wfp sys.constraints sys.definitions)))))

    Theorem: booleanp-of-system-wfp

    (defthm booleanp-of-system-wfp
            (b* ((yes/no (system-wfp sys)))
                (booleanp yes/no))
            :rule-classes :rewrite)

    Theorem: system-wfp-of-system-fix-sys

    (defthm system-wfp-of-system-fix-sys
            (equal (system-wfp (system-fix sys))
                   (system-wfp sys)))

    Theorem: system-wfp-system-equiv-congruence-on-sys

    (defthm system-wfp-system-equiv-congruence-on-sys
            (implies (system-equiv sys sys-equiv)
                     (equal (system-wfp sys)
                            (system-wfp sys-equiv)))
            :rule-classes :congruence)