Generate the
(defmapping-gen-alpha-injective doma$ alpha$ beta$ a1...an b1...bm unconditional$ thm-names$ thm-enable$ appcond-thm-names wrld) → (mv local-event exported-event)
This function is called if only if
the
We generate hints based on the proofs in the design notes.
The
Function:
(defun defmapping-gen-alpha-injective (doma$ alpha$ beta$ a1...an b1...bm unconditional$ thm-names$ thm-enable$ appcond-thm-names wrld) (declare (xargs :guard (and (pseudo-termfnp doma$) (pseudo-termfnp alpha$) (pseudo-termfnp beta$) (symbol-listp a1...an) (symbol-listp b1...bm) (booleanp unconditional$) (symbol-symbol-alistp thm-names$) (keyword-listp thm-enable$) (symbol-symbol-alistp appcond-thm-names) (plist-worldp wrld)))) (let ((__function__ 'defmapping-gen-alpha-injective)) (declare (ignorable __function__)) (b* ((aa1...aan (defmapping-gen-var-aa/bb a1...an)) (name (cdr (assoc-eq :alpha-injective thm-names$))) (formula (b* ((antecedent (if unconditional$ *t* (conjoin2 (apply-term doma$ a1...an) (apply-term doma$ aa1...aan)))) (consequent (cons 'equal (cons (cons 'equal (cons (apply-term alpha$ a1...an) (cons (apply-term alpha$ aa1...aan) 'nil))) (cons (conjoin-equalities a1...an aa1...aan) 'nil)))) (formula (implicate antecedent consequent))) (untranslate formula t wrld))) (hints (b* ((beta-of-alpha (cdr (assoc-eq :beta-of-alpha appcond-thm-names))) (beta-of-alpha-instance (cons ':instance (cons beta-of-alpha (alist-to-doublets (pairlis$ a1...an aa1...aan))))) (m (len b1...bm)) (cases-hints-formula (if (= m 1) (cons 'equal (cons (apply-term* beta$ (apply-term alpha$ a1...an)) (cons (apply-term* beta$ (apply-term alpha$ aa1...aan)) 'nil))) (cons 'equal (cons (apply-term beta$ (make-mv-nth-calls (apply-term alpha$ a1...an) m)) (cons (apply-term beta$ (make-mv-nth-calls (apply-term alpha$ aa1...aan) m)) 'nil)))))) (cons (cons '"Goal" (cons ':in-theory (cons 'nil (cons ':cases (cons (cons cases-hints-formula 'nil) (cons ':use (cons (cons beta-of-alpha (cons beta-of-alpha-instance 'nil)) 'nil))))))) 'nil))) (defthmr/defthmdr (if (member-eq :alpha-injective thm-enable$) 'defthmr 'defthmdr)) (local-event (cons 'local (cons (cons defthmr/defthmdr (cons name (cons formula (cons ':hints (cons hints 'nil))))) 'nil))) (exported-event (cons defthmr/defthmdr (cons name (cons formula 'nil))))) (mv local-event exported-event))))