我们在 Frobenius 代数中证明以下定理
使用以下代码执行证明
;; Frobenius algebra object (A,mu,eta,delta, epsilon)
(declare-sort A)
(declare-sort AA)
(declare-sort A_AA)
(declare-sort AA_A)
(declare-sort I)
(declare-sort I_A)
(declare-sort A_I)
(declare-fun alpha (AA_A) A_AA)
(declare-fun inv_alpha (A_AA) AA_A)
(declare-fun mu (AA) A)
(declare-fun eta (I) A)
(declare-fun mu_id (AA_A) AA)
(declare-fun id_mu (A_AA) AA)
(declare-fun eta_id (I_A) AA)
(declare-fun id_eta (A_I) AA)
(declare-fun lambda (I_A) A)
(declare-fun rho (A_I) A)
(declare-fun delta (A) AA)
(declare-fun delta_id (AA) AA_A)
(declare-fun id_delta (AA) A_AA)
(declare-fun epsilon (A) I)
(declare-fun inv_lambda (A) I_A)
(declare-fun inv_rho (A) A_I)
(declare-fun epsilon_id (AA) I_A)
(declare-fun id_epsilon (AA) A_I)
(declare-fun Id (A) A)
(declare-fun beta1 (A) A_I)
(declare-fun beta2 (A) I_A)
(declare-fun inv_beta1 (A_I) A)
(declare-fun inv_beta2 (I_A) A)
(define-fun gamma ((x I)) AA
(delta (eta x)))
;; Algebra Object
(assert (forall ((x I_A)) (= (lambda x) (mu (eta_id x))) ))
(assert (forall ((x A_I) ) (= (rho x) (mu (id_eta x))) ))
(assert (forall ((x AA_A) ) (= (mu (id_mu (alpha x)) ) (mu (mu_id x)) ) ) )
;; Coalgebra Object
(assert (forall ((x A)) (= (id_delta (delta x)) (alpha (delta_id (delta x))) ) ) )
(assert (forall ((x A)) (= (epsilon_id (delta x)) (inv_lambda x) ) ) )
(assert (forall ((x A)) (= (id_epsilon (delta x)) (inv_rho x) ) ) )
;; Frobenius Relation
(assert (forall ((x AA)) (= (mu_id (inv_alpha (id_delta x))) (delta (mu x))) ) )
(assert (forall ((x AA)) (= (id_mu (alpha (delta_id x))) (delta (mu x))) ) )
(assert (forall ((x A)) (= (mu (id_eta (beta1 x))) (Id x)) ))
(assert (forall ((x A)) (= (mu (eta_id (beta2 x))) (Id x)) ))
(assert (forall ((x A)) (= (inv_beta1 (id_epsilon (delta x))) (Id x) ) ))
(assert (forall ((x A)) (= (inv_beta2 (epsilon_id (delta x))) (Id x)) ))
(assert (forall ((x A)) (= (Id (Id x)) (Id x)) ) )
(check-sat)
;;(get-model)
;; First Identity
(push)
(assert (forall ((x I_A)) (distinct (id_epsilon (id_mu (alpha (delta_id (eta_id x)) ) ) )
(id_epsilon (delta (mu (eta_id x)))) ) ) )
(check-sat)
(pop)
(push)
(assert (forall ((x A )) (distinct (inv_beta1 (id_epsilon (delta (mu (eta_id (beta2 x))))))
(Id x) ) ) )
(check-sat)
(pop)
;; Second Identity
(push)
(assert (forall ((x A_I)) (distinct (epsilon_id (mu_id (inv_alpha (id_delta (id_eta x)) ) ) )
(epsilon_id (delta (mu (id_eta x)))) ) ) )
(check-sat)
(pop)
(push)
(assert (forall ((x A)) (distinct (inv_beta2 (epsilon_id (delta (mu (id_eta (beta1 x))))) )
(Id x) ) ) )
(check-sat)
(pop)
对应的输出是
sat
unsat
unsat
unsat
unsat
请在此处在线运行此证明
我的主张是这个例子是 Z3 在 Frobenius 代数中的第一个应用。你同意吗?