• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
            • 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
              • Absdeclor
              • Strunispec
              • Stor-spec
              • Keyword-uscores
              • Align-spec
              • Label
              • Expr-option
              • Spec/qual
              • Lsuffix
              • Hex-frac-const
              • Desiniter
              • Tyname
              • 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
                • Univ-char-name-fix
                  • Univ-char-name-case
                  • Univ-char-name-equiv
                  • Univ-char-name-upcase-u
                  • Univ-char-name-p
                  • Univ-char-name-locase-u
                  • Univ-char-name-kind
                • 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
                • Expr-list
                • Enumer-list
                • Attrib-spec-list
                • Type-spec-list
                • Ident-list
                • Asm-qual-list
                • Asm-output-list
                • Asm-input-list
                • Asm-clobber-list
                • Stor-spec-list
                • Ident-set
                • Ident-option-set
                • 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
            • 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
    • Univ-char-name

    Univ-char-name-fix

    Fixing function for univ-char-name structures.

    Signature
    (univ-char-name-fix x) → new-x
    Arguments
    x — Guard (univ-char-name-p x).
    Returns
    new-x — Type (univ-char-name-p new-x).

    Definitions and Theorems

    Function: univ-char-name-fix$inline

    (defun univ-char-name-fix$inline (x)
     (declare (xargs :guard (univ-char-name-p x)))
     (let ((__function__ 'univ-char-name-fix))
      (declare (ignorable __function__))
      (mbe
       :logic
       (case (univ-char-name-kind x)
         (:locase-u (b* ((quad (hex-quad-fix (std::da-nth 0 (cdr x)))))
                      (cons :locase-u (list quad))))
         (:upcase-u (b* ((quad1 (hex-quad-fix (std::da-nth 0 (cdr x))))
                         (quad2 (hex-quad-fix (std::da-nth 1 (cdr x)))))
                      (cons :upcase-u (list quad1 quad2)))))
       :exec x)))

    Theorem: univ-char-name-p-of-univ-char-name-fix

    (defthm univ-char-name-p-of-univ-char-name-fix
      (b* ((new-x (univ-char-name-fix$inline x)))
        (univ-char-name-p new-x))
      :rule-classes :rewrite)

    Theorem: univ-char-name-fix-when-univ-char-name-p

    (defthm univ-char-name-fix-when-univ-char-name-p
      (implies (univ-char-name-p x)
               (equal (univ-char-name-fix x) x)))

    Function: univ-char-name-equiv$inline

    (defun univ-char-name-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (univ-char-name-p acl2::x)
                                  (univ-char-name-p acl2::y))))
      (equal (univ-char-name-fix acl2::x)
             (univ-char-name-fix acl2::y)))

    Theorem: univ-char-name-equiv-is-an-equivalence

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

    Theorem: univ-char-name-equiv-implies-equal-univ-char-name-fix-1

    (defthm univ-char-name-equiv-implies-equal-univ-char-name-fix-1
      (implies (univ-char-name-equiv acl2::x x-equiv)
               (equal (univ-char-name-fix acl2::x)
                      (univ-char-name-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: univ-char-name-fix-under-univ-char-name-equiv

    (defthm univ-char-name-fix-under-univ-char-name-equiv
      (univ-char-name-equiv (univ-char-name-fix acl2::x)
                            acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-univ-char-name-fix-1-forward-to-univ-char-name-equiv

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

    Theorem: equal-of-univ-char-name-fix-2-forward-to-univ-char-name-equiv

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

    Theorem: univ-char-name-equiv-of-univ-char-name-fix-1-forward

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

    Theorem: univ-char-name-equiv-of-univ-char-name-fix-2-forward

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

    Theorem: univ-char-name-kind$inline-of-univ-char-name-fix-x

    (defthm univ-char-name-kind$inline-of-univ-char-name-fix-x
      (equal (univ-char-name-kind$inline (univ-char-name-fix x))
             (univ-char-name-kind$inline x)))

    Theorem: univ-char-name-kind$inline-univ-char-name-equiv-congruence-on-x

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

    Theorem: consp-of-univ-char-name-fix

    (defthm consp-of-univ-char-name-fix
      (consp (univ-char-name-fix x))
      :rule-classes :type-prescription)