• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
        • Defun
        • Verify-guards
        • Table
        • Mutual-recursion
        • Memoize
        • Make-event
        • Include-book
        • Encapsulate
          • Signature
          • Constraint
          • Partial-encapsulate
          • Redundant-encapsulate
          • Infected-constraints
          • Functional-instantiation
            • Lemma-instance
            • Functional-instantiation-example
            • Def-functional-instance
              • Functional-instantiation-in-ACL2r
          • Defun-sk
          • Defttag
          • Defstobj
          • Defpkg
          • Defattach
          • Defabsstobj
          • Defchoose
          • Progn
          • Verify-termination
          • Redundant-events
          • Defmacro
          • Defconst
          • Skip-proofs
          • In-theory
          • Embedded-event-form
          • Value-triple
          • Comp
          • Local
          • Defthm
          • Progn!
          • Defevaluator
          • Theory-invariant
          • Assert-event
          • Defun-inline
          • Project-dir-alist
          • Partial-encapsulate
          • Define-trusted-clause-processor
          • Defproxy
          • Defexec
          • Defun-nx
          • Defthmg
          • Defpun
          • Defabbrev
          • Set-table-guard
          • Name
          • Defrec
          • Add-custom-keyword-hint
          • Regenerate-tau-database
          • Defcong
          • Deftheory
          • Defaxiom
          • Deftheory-static
          • Defund
          • Evisc-table
          • Verify-guards+
          • Logical-name
          • Profile
          • Defequiv
          • Defmacro-untouchable
          • Add-global-stobj
          • Defthmr
          • Defstub
          • Defrefinement
          • Deflabel
          • In-arithmetic-theory
          • Unmemoize
          • Defabsstobj-missing-events
          • Defthmd
          • Fake-event
          • Set-body
          • Defun-notinline
          • Functions-after
          • Macros-after
          • Dump-events
          • Defund-nx
          • Defun$
          • Remove-global-stobj
          • Remove-custom-keyword-hint
          • Dft
          • Defthy
          • Defund-notinline
          • Defnd
          • Defn
          • Defund-inline
          • Defmacro-last
        • Parallelism
        • History
        • Programming
        • Operational-semantics
        • Real
        • Start-here
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Functional-instantiation

    Def-functional-instance

    Functionally instantiate a pre-existing theorem to prove a new one.

    Usage:

    (def-functional-instance new-thm-name
      orig-thm-name
      ((orig-fn substitute-fn) ...)
      :hints (...)                   ;; optional
      :rule-classes rule-classes)    ;; optional

    Def-functional-instance attempts to define a new theorem based on functionally instantiating an existing one with a user-provided function substitution. It looks up the body of the theorem named ORIG-THM-NAME in the ACL2 world and applies the functional substitution, replacing each ORIG-FN with SUBSTITUTE-FN in the theorem body. It then submits this as a new theorem named NEW-THM-NAME with a hint to prove it using a functional instance of the original theorem. This theorem has either the given rule-classes or, if this argument is omitted, the rule-classes of the original theorem.

    Sometimes further hints are needed to show that the functional instantiation is valid. These may be given by the :hints keyword. Note, however, that there is already a hint provided at "goal", so that if one of the user-provided hints uses this as its subgoal specifier, this hint will be ignored. The extra hints given should either be computed hints or reference later subgoals.