• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Abstract-syntax
          • Syntax-abstraction
          • Expression
          • Definition
          • Constraint
          • Definition-option
          • Abstract-syntax-operations
          • System
            • System-fix
              • System-equiv
              • Make-system
              • System->definitions
              • System->constraints
              • Change-system
              • Systemp
            • Convenience-constructors
            • System-result
            • Expression-result
            • Expression-list-result
            • Definition-result
            • Definition-list-result
            • Constraint-result
            • Constraint-list-result
            • Expression-list
            • Definition-list
            • Constraint-list
          • R1cs-subset
          • Semantics
          • 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
    • System

    System-fix

    Fixing function for system structures.

    Signature
    (system-fix x) → new-x
    Arguments
    x — Guard (systemp x).
    Returns
    new-x — Type (systemp new-x).

    Definitions and Theorems

    Function: system-fix$inline

    (defun system-fix$inline (x)
     (declare (xargs :guard (systemp x)))
     (let ((__function__ 'system-fix))
      (declare (ignorable __function__))
      (mbe
         :logic
         (b* ((definitions
                   (definition-list-fix (cdr (std::da-nth 0 (cdr x)))))
              (constraints
                   (constraint-list-fix (cdr (std::da-nth 1 (cdr x))))))
           (cons :system (list (cons 'definitions definitions)
                               (cons 'constraints constraints))))
         :exec x)))

    Theorem: systemp-of-system-fix

    (defthm systemp-of-system-fix
      (b* ((new-x (system-fix$inline x)))
        (systemp new-x))
      :rule-classes :rewrite)

    Theorem: system-fix-when-systemp

    (defthm system-fix-when-systemp
      (implies (systemp x)
               (equal (system-fix x) x)))

    Function: system-equiv$inline

    (defun system-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (systemp acl2::x)
                                  (systemp acl2::y))))
      (equal (system-fix acl2::x)
             (system-fix acl2::y)))

    Theorem: system-equiv-is-an-equivalence

    (defthm system-equiv-is-an-equivalence
      (and (booleanp (system-equiv x y))
           (system-equiv x x)
           (implies (system-equiv x y)
                    (system-equiv y x))
           (implies (and (system-equiv x y)
                         (system-equiv y z))
                    (system-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: system-equiv-implies-equal-system-fix-1

    (defthm system-equiv-implies-equal-system-fix-1
      (implies (system-equiv acl2::x x-equiv)
               (equal (system-fix acl2::x)
                      (system-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: system-fix-under-system-equiv

    (defthm system-fix-under-system-equiv
      (system-equiv (system-fix acl2::x)
                    acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-system-fix-1-forward-to-system-equiv

    (defthm equal-of-system-fix-1-forward-to-system-equiv
      (implies (equal (system-fix acl2::x) acl2::y)
               (system-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-system-fix-2-forward-to-system-equiv

    (defthm equal-of-system-fix-2-forward-to-system-equiv
      (implies (equal acl2::x (system-fix acl2::y))
               (system-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: system-equiv-of-system-fix-1-forward

    (defthm system-equiv-of-system-fix-1-forward
      (implies (system-equiv (system-fix acl2::x)
                             acl2::y)
               (system-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: system-equiv-of-system-fix-2-forward

    (defthm system-equiv-of-system-fix-2-forward
      (implies (system-equiv acl2::x (system-fix acl2::y))
               (system-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)