• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
              • Tyspecseq
              • Expr
              • Binop
              • Fileset
              • Obj-declor
              • Ident
              • Iconst
              • Obj-adeclor
              • Const
              • Fundef
              • Unop
              • File
              • Tag-declon
              • Fun-declor
              • Obj-declon
              • Iconst-length
              • Abstract-syntax-operations
              • Label
              • Struct-declon
              • Initer
              • Ext-declon
              • Fun-adeclor
              • Expr-option
              • Iconst-base
              • Initer-option
              • Iconst-option
              • Tyspecseq-option
              • Stmt-option
              • Scspecseq
                • Scspecseq-case
                • Scspecseq-fix
                  • Scspecseq-equiv
                  • Scspecseqp
                  • Scspecseq-none
                  • Scspecseq-extern
                  • Scspecseq-kind
                • Param-declon
                • Obj-declon-option
                • File-option
                • Tyname
                • Transunit
                • Fun-declon
                • Transunit-result
                • Param-declon-list
                • Struct-declon-list
                • Expr-list
                • Tyspecseq-list
                • Ident-set
                • Ident-list
                • Ext-declon-list
                • Unop-list
                • Tyname-list
                • Fundef-list
                • Fun-declon-list
                • Binop-list
                • Stmt-fixtypes
                • Expr-fixtypes
              • Integer-ranges
              • Implementation-environments
              • Dynamic-semantics
              • Static-semantics
              • Grammar
              • Integer-formats
              • Types
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Computation-states
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Scspecseq

    Scspecseq-fix

    Fixing function for scspecseq structures.

    Signature
    (scspecseq-fix x) → new-x
    Arguments
    x — Guard (scspecseqp x).
    Returns
    new-x — Type (scspecseqp new-x).

    Definitions and Theorems

    Function: scspecseq-fix$inline

    (defun scspecseq-fix$inline (x)
      (declare (xargs :guard (scspecseqp x)))
      (let ((__function__ 'scspecseq-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (case (scspecseq-kind x)
               (:none (cons :none (list)))
               (:extern (cons :extern (list))))
             :exec x)))

    Theorem: scspecseqp-of-scspecseq-fix

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

    Theorem: scspecseq-fix-when-scspecseqp

    (defthm scspecseq-fix-when-scspecseqp
      (implies (scspecseqp x)
               (equal (scspecseq-fix x) x)))

    Function: scspecseq-equiv$inline

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

    Theorem: scspecseq-equiv-is-an-equivalence

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

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

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

    Theorem: scspecseq-fix-under-scspecseq-equiv

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

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

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

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

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

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

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

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

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

    Theorem: scspecseq-kind$inline-of-scspecseq-fix-x

    (defthm scspecseq-kind$inline-of-scspecseq-fix-x
      (equal (scspecseq-kind$inline (scspecseq-fix x))
             (scspecseq-kind$inline x)))

    Theorem: scspecseq-kind$inline-scspecseq-equiv-congruence-on-x

    (defthm scspecseq-kind$inline-scspecseq-equiv-congruence-on-x
      (implies (scspecseq-equiv x x-equiv)
               (equal (scspecseq-kind$inline x)
                      (scspecseq-kind$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: consp-of-scspecseq-fix

    (defthm consp-of-scspecseq-fix
      (consp (scspecseq-fix x))
      :rule-classes :type-prescription)