• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
        • Defisar
          • Defisar-implementation
            • Keyword-fact-info-alistp
            • Defisar-assume
            • Defisar-derive
            • Defisar-commands
            • Fact-infop
            • Defisar-qed
            • Defisar-let
            • Defisar-derive-thm-hyps
              • Defisar-proof
              • Defisar-fn
              • Fact-info-listp
              • Fact-info-list->thm-name-list
              • Defisar-formula-to-hyps+concl
              • Defisar-macro-definition-synonym
              • Defisar-macro-definition
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • C
        • Proof-checker-array
        • Soft
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Defisar-implementation

    Defisar-derive-thm-hyps

    Generate the hypotheses for the theorem generated for a :derive command.

    Signature
    (defisar-derive-thm-hyps derive-from facts ctx state) 
      → 
    (mv erp thm-hyps state)
    Arguments
    derive-from — Guard (keyword-listp derive-from).
    facts — Guard (keyword-fact-info-alistp facts).
    Returns
    thm-hyps — Type (true-listp thm-hyps).

    Definitions and Theorems

    Function: defisar-derive-thm-hyps

    (defun defisar-derive-thm-hyps (derive-from facts ctx state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (and (keyword-listp derive-from)
                                  (keyword-fact-info-alistp facts))))
      (let ((__function__ 'defisar-derive-thm-hyps))
        (declare (ignorable __function__))
        (b* (((when (endp derive-from)) (value nil))
             (id (car derive-from))
             (lookup (assoc-eq id facts))
             ((unless (consp lookup))
              (er-soft+ ctx t nil "Fact ~x0 not found." id))
             (info (cdr lookup))
             (thm-hyp (fact-info->formula info))
             ((er thm-hyps)
              (defisar-derive-thm-hyps (cdr derive-from)
                                       facts ctx state)))
          (value (cons thm-hyp thm-hyps)))))

    Theorem: true-listp-of-defisar-derive-thm-hyps.thm-hyps

    (defthm true-listp-of-defisar-derive-thm-hyps.thm-hyps
      (b* (((mv ?erp ?thm-hyps acl2::?state)
            (defisar-derive-thm-hyps derive-from facts ctx state)))
        (true-listp thm-hyps))
      :rule-classes :rewrite)