• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
            • Printer
            • Output-files
            • Abstract-syntax-operations
            • Implementation-environments
            • Abstract-syntax
            • Concrete-syntax
              • Grammar
              • Files
              • File-paths
                • Filepath-option
                • Filepath
                • Irr-filepath
                • Filepath-set
                  • Filepath-set-fix
                    • Filepath-setp
                    • Filepath-set-equiv
                  • Filepath-list
                • Grammar-characters
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Filepath-set

    Filepath-set-fix

    (filepath-set-fix x) is a usual ACL2::fty set fixing function.

    Signature
    (filepath-set-fix x) → *
    Arguments
    x — Guard (filepath-setp x).

    In the logic, we apply filepath-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.

    Definitions and Theorems

    Function: filepath-set-fix

    (defun filepath-set-fix (x)
      (declare (xargs :guard (filepath-setp x)))
      (mbe :logic (if (filepath-setp x) x nil)
           :exec x))

    Theorem: filepath-setp-of-filepath-set-fix

    (defthm filepath-setp-of-filepath-set-fix
      (filepath-setp (filepath-set-fix x)))

    Theorem: filepath-set-fix-when-filepath-setp

    (defthm filepath-set-fix-when-filepath-setp
      (implies (filepath-setp x)
               (equal (filepath-set-fix x) x)))

    Theorem: emptyp-filepath-set-fix

    (defthm emptyp-filepath-set-fix
      (implies (or (emptyp x) (not (filepath-setp x)))
               (emptyp (filepath-set-fix x))))

    Theorem: emptyp-of-filepath-set-fix

    (defthm emptyp-of-filepath-set-fix
      (equal (emptyp (filepath-set-fix x))
             (or (not (filepath-setp x))
                 (emptyp x))))

    Function: filepath-set-equiv$inline

    (defun filepath-set-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (filepath-setp acl2::x)
                                  (filepath-setp acl2::y))))
      (equal (filepath-set-fix acl2::x)
             (filepath-set-fix acl2::y)))

    Theorem: filepath-set-equiv-is-an-equivalence

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

    Theorem: filepath-set-equiv-implies-equal-filepath-set-fix-1

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

    Theorem: filepath-set-fix-under-filepath-set-equiv

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

    Theorem: equal-of-filepath-set-fix-1-forward-to-filepath-set-equiv

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

    Theorem: equal-of-filepath-set-fix-2-forward-to-filepath-set-equiv

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

    Theorem: filepath-set-equiv-of-filepath-set-fix-1-forward

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

    Theorem: filepath-set-equiv-of-filepath-set-fix-2-forward

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

    Theorem: filepath-set-fix-of-filepath-set-fix-x

    (defthm filepath-set-fix-of-filepath-set-fix-x
      (equal (filepath-set-fix (filepath-set-fix x))
             (filepath-set-fix x)))

    Theorem: filepath-set-fix-filepath-set-equiv-congruence-on-x

    (defthm filepath-set-fix-filepath-set-equiv-congruence-on-x
      (implies (filepath-set-equiv x x-equiv)
               (equal (filepath-set-fix x)
                      (filepath-set-fix x-equiv)))
      :rule-classes :congruence)