• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
              • Expr
              • Exprs/decls/stmts
              • Type-spec
              • Binop
              • Stmt
              • Amb-expr/tyname
              • Dirdeclor
              • Unop
              • Asm-stmt
              • Dec/oct/hex-const
              • Simple-escape
              • Attrib
              • Ident
              • Amb-decl/stmt
              • Dirabsdeclor
              • Decl-spec
              • Structdecl
              • Fundef
              • Transunit-ensemble
              • Asm-name-spec
              • Amb-declor/absdeclor
              • Param-declor
              • Declor
              • Type-qual
              • Tyname
              • Absdeclor
              • Struni-spec
              • Stor-spec
              • Keyword-uscores
              • Align-spec
              • Label
              • Expr-option
              • Spec/qual
              • Lsuffix
              • Hex-frac-const
              • Desiniter
              • Iconst
              • Dirabsdeclor-option
              • Dec-frac-const
              • Dec-core-fconst
              • Extdecl
              • Amb?-declor/absdeclor
              • Isuffix
              • Initdeclor
              • Hex-core-fconst
              • Const-expr-option
              • Attrib-spec
              • Structdeclor
              • Escape
              • Decl
              • Amb?-expr/tyname
              • Ident-option
              • Bin-expo
              • Absdeclor-option
              • Statassert
              • Param-declon
              • Member-designor
              • Initer-option
              • Initer
              • Fsuffix
              • Enumspec
              • Declor-option
              • Const
              • Hex-quad
              • Eprefix
              • Const-expr
              • Block-item
              • Oct-escape
              • Inc/dec-op
              • Fun-spec
              • Dec-expo
              • Cprefix-option
              • Asm-name-spec-option
              • Amb?-decl/stmt
              • S-char
              • Isuffix-option
              • Genassoc
              • Fundef-option
              • Fsuffix-option
              • Fconst
              • Eprefix-option
              • Dec-expo-option
              • Cprefix
              • C-char
              • Type-spec-option
              • Sign-option
              • Iconst-option
              • Asm-output
              • Asm-input
              • Const-option
              • Usuffix
              • Univ-char-name
              • Transunit
              • Hprefix
              • Enumer
              • Designor
              • Attrib-name
              • Sign
              • Asm-qual
              • Typequal/attribspec
              • Dec-expo-prefix
              • Bin-expo-prefix
              • Stringlit
              • Cconst
              • Expr/tyname
              • Decl/stmt
              • Declor/absdeclor
              • Asm-clobber
              • Typequal/attribspec-list
              • Decl-spec-list
              • Stringlit-list
              • Spec/qual-list
              • Inc/dec-op-list
              • Desiniter-list
              • S-char-list
              • Param-declon-list
              • Decl-list
              • C-char-list
              • Block-item-list
              • Typequal/attribspec-list-list
              • Structdeclor-list
              • Structdecl-list
              • Initdeclor-list
              • Genassoc-list
              • Filepath-transunit-map
              • Extdecl-list
              • Enumer-list
              • Attrib-spec-list
              • Type-spec-list
              • Ident-list
              • Expr-list
              • Asm-qual-list
              • Asm-output-list
              • Asm-input-list
              • Asm-clobber-list
              • Stor-spec-list
              • Ident-set
              • Ident-option-set
                • Ident-option-set-fix
                  • Ident-option-setp
                  • Ident-option-set-equiv
                • Eprefix-option-list
                • Designor-list
                • Attrib-list
              • Parser
              • Validator
              • Printer
              • Formalized-subset
              • Mapping-to-language-definition
              • Input-files
              • Defpred
              • Output-files
              • Abstract-syntax-operations
              • Validation-information
              • Implementation-environments
              • Concrete-syntax
              • Ascii-identifiers
              • Unambiguity
              • Preprocessing
              • Abstraction-mapping
              • Standard
              • Purity
            • Atc
            • Language
            • 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
    • Ident-option-set

    Ident-option-set-fix

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

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

    In the logic, we apply ident-option-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: ident-option-set-fix

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

    Theorem: ident-option-setp-of-ident-option-set-fix

    (defthm ident-option-setp-of-ident-option-set-fix
      (ident-option-setp (ident-option-set-fix x)))

    Theorem: ident-option-set-fix-when-ident-option-setp

    (defthm ident-option-set-fix-when-ident-option-setp
      (implies (ident-option-setp x)
               (equal (ident-option-set-fix x) x)))

    Theorem: emptyp-ident-option-set-fix

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

    Theorem: emptyp-of-ident-option-set-fix

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

    Function: ident-option-set-equiv$inline

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

    Theorem: ident-option-set-equiv-is-an-equivalence

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

    Theorem: ident-option-set-equiv-implies-equal-ident-option-set-fix-1

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

    Theorem: ident-option-set-fix-under-ident-option-set-equiv

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

    Theorem: equal-of-ident-option-set-fix-1-forward-to-ident-option-set-equiv

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

    Theorem: equal-of-ident-option-set-fix-2-forward-to-ident-option-set-equiv

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

    Theorem: ident-option-set-equiv-of-ident-option-set-fix-1-forward

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

    Theorem: ident-option-set-equiv-of-ident-option-set-fix-2-forward

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