• 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
        • Defun-sk
          • Define-sk
          • Quantifier-tutorial
          • Defun-sk-queries
          • Quantifiers
          • Defun-sk-example
          • Defund-sk
          • Forall
          • Def::un-sk
            • Skosimp
            • Inst?
          • Equiv
          • Exists
          • Congruence
        • 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
  • Defun-sk

Def::un-sk

An extension of defun-sk that supports automated skolemization and instantiation of quantified formulae

The def::un-sk macro is an extension of defun-sk that supports automated skolemization and instantiation of quantified formulae via the computed hints quant::inst? and quant::skosimp.

Usage:

 (include-book "coi/quantification/quantification" :dir :system)

 (def::un-sk forall-zen (a)
   (forall (x y) (implies (boo a x) (hoo a y))))

 (def::un-sk exists-zen (a)
   (exists (x y) (not (implies (boo a x) (hoo a y)))))

 (defthmd forall-zen-instantiation-test
   (implies
    (forall-zen q)
    (implies (boo q x1) (hoo q y1)))
   :hints ((quant::inst?)))

 (defthmd exists-zen-instantiation-test
   (implies
    (not (exists-zen q))
    (implies (boo q x1) (hoo q y1)))
   :hints ((quant::inst?)))

 ;; This is kind of a cool theorem

 (defthmd forall-is-not-exists
   (iff (forall-zen q)
        (not (exists-zen q)))
   :hints ((quant::skosimp)
	    (quant::inst?)))

 ;; Here we use it to do "pick-a-point" proofs

 (def::un-sk assox-equiv (x y)
   (forall (a) (equal (assoc a x) (assoc a y))))

 (defequiv assox-equiv
   :hints ((quant::skosimp)
           (quant::inst?)))

 (defcong assox-equiv equal (assoc a x) 2
   :hints ((quant::skosimp)
           (quant::inst?)))

 (defcong assox-equiv assox-equiv (cons pair y) 2
   :hints ((quant::skosimp)
           (quant::inst?)))

 (defcong assox-equiv assox-equiv (acons key value y) 3
   :hints ((quant::skosimp)
 	    (quant::inst?)))

Subtopics

Skosimp
A hint for performing automated skolemization of quantified formulae
Inst?
A hint that attempts automated instantiation of quantified formulae