• 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
              • Abstract-syntax-trees
                • Expr
                • Type-spec
                • Exprs/decls/stmts
                • Binop
                • Stmt
                • Unop
                • Amb-expr/tyname
                • Dirdeclor
                • Asm-stmt
                • Dec/oct/hex-const
                • Simple-escape
                • Fsuffix
                • Ident
                • Attrib
                • Amb-declon/stmt
                • Dirabsdeclor
                • Type-qual
                • Fundef
                • Decl-spec
                • Struct-declon
                • Asm-name-spec
                • Amb-declor/absdeclor
                • Struni-spec
                • Param-declor
                • Declor
                • Stor-spec
                • Transunit-ensemble
                • Init-declor
                • Absdeclor
                • Tyname
                • Keyword-uscores
                • Label
                • Align-spec
                • Expr-option
                • Attrib-name
                • Spec/qual
                • Lsuffix
                • Hex-frac-const
                • Desiniter
                • Param-declon
                • Iconst
                • Dirabsdeclor-option
                • Dec-frac-const
                • Dec-core-fconst
                • Comp-stmt
                • Ext-declon
                • Const-expr-option
                • Amb?-declor/absdeclor
                • Isuffix
                • Hex-core-fconst
                • Attrib-spec
                • Struct-declor
                • Escape
                • Declon
                • Amb?-expr/tyname
                • Initer
                • Ident-option
                • Enum-spec
                • Block-item
                • Bexpo
                • Absdeclor-option
                • Statassert
                • Member-designor
                • Initer-option
                • Declor-option
                • Const
                • Hex-quad
                • Eprefix
                • Const-expr
                • Oct-escape
                • Inc/dec-op
                • Fun-spec
                • Dexpo
                • Cprefix-option
                • Asm-name-spec-option
                • Amb?-declon/stmt
                • S-char
                • Isuffix-option
                • Genassoc
                • Fsuffix-option
                • Fconst
                • Eprefix-option
                • Dexpo-option
                • Cprefix
                • C-char
                • Type-spec-option
                • Sign-option
                • Sign
                • Q-char
                • Iconst-option
                • H-char
                • Fundef-option
                • Asm-output
                • Asm-input
                • Designor
                • Const-option
                • Usuffix
                • Univ-char-name
                • Hprefix
                • Enumer
                • Transunit
                • Asm-qual
                • Typequal/attribspec
                • Stringlit
                • Dexprefix
                • Bexprefix
                • Header-name
                • Cconst
                • Expr/tyname
                • Declor/absdeclor
                • Declon/stmt
                  • Declon/stmt-fix
                  • Declon/stmt-case
                  • Declon/stmt-equiv
                  • Declon/stmt-stmt
                  • Declon/stmt-declon
                    • Declon/stmt-declon->declon
                      • Make-declon/stmt-declon
                      • Change-declon/stmt-declon
                    • Declon/stmt-p
                    • Declon/stmt-kind
                  • Asm-clobber
                  • Typequal/attribspec-list
                  • Decl-spec-list
                  • Stringlit-list
                  • Spec/qual-list
                  • Inc/dec-op-list
                  • Desiniter-list
                  • Attrib-spec-list
                  • S-char-list
                  • Q-char-list
                  • Param-declon-list
                  • H-char-list
                  • Declon-list
                  • C-char-list
                  • Typequal/attribspec-list-list
                  • Struct-declor-list
                  • Struct-declon-list
                  • Init-declor-list
                  • Genassoc-list
                  • Ext-declon-list
                  • Block-item-list
                  • Enumer-list
                  • Ident-list
                  • Filepath-transunit-map
                  • Expr-list
                  • Asm-qual-list
                  • Asm-output-list
                  • Asm-input-list
                  • Asm-clobber-list
                  • Type-spec-list
                  • Stor-spec-list
                  • Ident-set
                  • Ident-option-set
                  • Ident-list-list
                  • Eprefix-option-list
                  • Designor-list
                  • Attrib-list
                • Abstract-syntax-irrelevants
                • Type-specifier-lists
                • Ascii-identifiers
                • Abstraction-mapping
                • Standard
                • Storage-specifier-lists
                • Code-ensembles
                • Purity
                • Make-self-code-ensemble
              • Concrete-syntax
              • 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
    • Declon/stmt-declon

    Declon/stmt-declon->declon

    Get the declon field from a declon/stmt-declon.

    Signature
    (declon/stmt-declon->declon x) → declon
    Arguments
    x — Guard (declon/stmt-p x).
    Returns
    declon — Type (declonp declon).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: declon/stmt-declon->declon$inline

    (defun declon/stmt-declon->declon$inline (x)
      (declare (xargs :guard (declon/stmt-p x)))
      (declare (xargs :guard (equal (declon/stmt-kind x) :declon)))
      (mbe :logic
           (b* ((x (and (equal (declon/stmt-kind x) :declon)
                        x)))
             (declon-fix (cdr x)))
           :exec (cdr x)))

    Theorem: declonp-of-declon/stmt-declon->declon

    (defthm declonp-of-declon/stmt-declon->declon
      (b* ((declon (declon/stmt-declon->declon$inline x)))
        (declonp declon))
      :rule-classes :rewrite)

    Theorem: declon/stmt-declon->declon$inline-of-declon/stmt-fix-x

    (defthm declon/stmt-declon->declon$inline-of-declon/stmt-fix-x
      (equal (declon/stmt-declon->declon$inline (declon/stmt-fix x))
             (declon/stmt-declon->declon$inline x)))

    Theorem: declon/stmt-declon->declon$inline-declon/stmt-equiv-congruence-on-x

    (defthm
     declon/stmt-declon->declon$inline-declon/stmt-equiv-congruence-on-x
     (implies (declon/stmt-equiv x x-equiv)
              (equal (declon/stmt-declon->declon$inline x)
                     (declon/stmt-declon->declon$inline x-equiv)))
     :rule-classes :congruence)

    Theorem: declon/stmt-declon->declon-when-wrong-kind

    (defthm declon/stmt-declon->declon-when-wrong-kind
      (implies (not (equal (declon/stmt-kind x) :declon))
               (equal (declon/stmt-declon->declon x)
                      (declon-fix nil))))