• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
        • Syntax-for-tools
        • Atc
        • Language
          • Abstract-syntax
            • Tyspecseq
            • Expr
            • Binop
            • Fileset
            • Obj-declor
            • Ident
            • Iconst
            • Obj-adeclor
            • Const
            • Fundef
            • Unop
            • File
              • File-fix
                • File-equiv
                • Make-file
                • File->declons
                • Change-file
                • Filep
              • 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
              • 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
        • 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
    • File

    File-fix

    Fixing function for file structures.

    Signature
    (file-fix x) → new-x
    Arguments
    x — Guard (filep x).
    Returns
    new-x — Type (filep new-x).

    Definitions and Theorems

    Function: file-fix$inline

    (defun file-fix$inline (x)
     (declare (xargs :guard (filep x)))
     (let ((__function__ 'file-fix))
      (declare (ignorable __function__))
      (mbe
        :logic
        (b*
         ((declons (ext-declon-list-fix (cdr (std::da-nth 0 (cdr x))))))
         (cons :file (list (cons 'declons declons))))
        :exec x)))

    Theorem: filep-of-file-fix

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

    Theorem: file-fix-when-filep

    (defthm file-fix-when-filep
      (implies (filep x)
               (equal (file-fix x) x)))

    Function: file-equiv$inline

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

    Theorem: file-equiv-is-an-equivalence

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

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

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

    Theorem: file-fix-under-file-equiv

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

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

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

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

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

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

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

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

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