• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Semantics
        • Lifting
          • Lift-thm
          • Lift-thm-constr-satp-specialized-lemma
          • Lift-var-name-list
          • Lift-thm-constr-to-def-satp-specialized-lemmas
          • Lift-thm-definition-satp-specialized-lemma
          • Lift-info
          • Lift-var-name
          • Lift-thm-def-hyps
            • Lift-definition
            • Lift-expression
            • Lift-thm-asgfree-pairs
            • Lift
            • Lift-thm-free-inst
            • Lift-fn
            • Lift-thm-type-prescriptions-for-called-preds
            • Lift-rel-name
            • Lift-constraint
            • Lift-thm-omap-keys-lemma-instances
            • Lift-table-add
            • Lift-rules
            • Lift-thm-called-lift-thms
            • Lift-rel-name-set-to-list
            • Lift-gen-fep-terms
            • Lift-expression-list
            • Lift-constraint-list
            • Lift-var-name-set-to-list
            • Lift-thm-asgfree-pairs-aux
            • Current-package+
            • Lift-table
          • R1cs-subset
          • Well-formedness
          • Abstract-syntax
          • Concrete-syntax
          • R1cs-bridge
          • Parser-interface
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Lifting

    Lift-thm-def-hyps

    Hypotheses about certain relations having the expected definitions.

    Signature
    (lift-thm-def-hyps def wrld) → hyps
    Arguments
    def — Guard (definitionp def).
    wrld — Guard (plist-worldp wrld).
    Returns
    hyps — Type (true-listp hyps).

    These are hypotheses in the generated lifting theorems. For each relation, whose definition is the def parameter passed to this function, we need the hypothesis that looking up the relation in defs (which is the variable, in the generated theorem, holding the definitions with respect to which the semntics is given) yields def. We also need the cumulative hypotheses of the same form of the relations called directly or indirectly by def: these are retrieved from the table of lifted PFCSes, taking the set-like union (thus avoiding duplicates) of each relation called.

    Definitions and Theorems

    Function: lift-thm-def-hyps-aux

    (defun lift-thm-def-hyps-aux (crels tab)
      (declare (xargs :guard (and (constrel-setp crels)
                                  (alistp tab))))
      (let ((__function__ 'lift-thm-def-hyps-aux))
        (declare (ignorable __function__))
        (b* (((when (emptyp crels)) nil)
             (crel (head crels))
             (name (constrel->name crel))
             (info (cdr (assoc-equal name tab)))
             ((unless info)
              (raise "Internal error: ~x0 not in table."
                     name))
             ((unless (lift-infop info))
              (raise "Internal error: ~x0 has the wrong type."
                     info))
             (hyps (lift-info->hyps info))
             (more-hyps (lift-thm-def-hyps-aux (tail crels)
                                               tab)))
          (union-equal hyps more-hyps))))

    Theorem: true-listp-of-lift-thm-def-hyps-aux

    (defthm true-listp-of-lift-thm-def-hyps-aux
      (b* ((more-hyps (lift-thm-def-hyps-aux crels tab)))
        (true-listp more-hyps))
      :rule-classes :rewrite)

    Function: lift-thm-def-hyps

    (defun lift-thm-def-hyps (def wrld)
     (declare (xargs :guard (and (definitionp def)
                                 (plist-worldp wrld))))
     (let ((__function__ 'lift-thm-def-hyps))
       (declare (ignorable __function__))
       (b*
        (((definition def) def)
         (hyp (cons 'equal
                    (cons (cons 'lookup-definition
                                (cons (cons 'quote (cons def.name 'nil))
                                      '(defs)))
                          (cons (cons 'quote (cons def 'nil))
                                'nil))))
         (crels (constraint-list-constrels def.body))
         (tab (table-alist+ 'lift-table wrld))
         (more-hyps (lift-thm-def-hyps-aux crels tab)))
        (cons hyp more-hyps))))

    Theorem: true-listp-of-lift-thm-def-hyps

    (defthm true-listp-of-lift-thm-def-hyps
      (b* ((hyps (lift-thm-def-hyps def wrld)))
        (true-listp hyps))
      :rule-classes :rewrite)