1 ; to check, run : lfsc sat.plf smt.plf th_base.plf example.plf
3 ; --------------------------------------------------------------------------------
5 ; L1 : a = write( a, i, read( a, i )
6 ; L2 : read( a, k ) = read( write( a, i, read( a, i ) ), k )
12 ; (extenstionality) lemma :
20 ; With the theory lemma, the input is unsatisfiable.
21 ; --------------------------------------------------------------------------------
24 ; (0) -------------------- term declarations -----------------------------------
29 (% a (term (Array I E))
33 ; (1) -------------------- input formula -----------------------------------
35 (% A1 (th_holds (not (= (Array I E) a (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i)))))
40 ; (2) ------------------- specify that the following is a proof of the empty clause -----------------
47 ; (3) -------------------- theory lemmas prior to rewriting/preprocess/CNF -----------------
48 ; --- these should introduce (th_holds ...)
51 ; extensionality lemma : notice this also introduces skolem k
52 (ext _ _ a (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i)) (\ k (\ A2
57 ; (4) -------------------- map theory literals to boolean variables
58 ; --- maps all theory literals involved in proof to boolean literals
60 (decl_atom (= (Array I E) a (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i))) (\ v1 (\ a1
61 (decl_atom (= E (apply _ _ (apply _ _ (read I E) a) k) (apply _ _ (apply _ _ (read I E) (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i))) k)) (\ v2 (\ a2
62 (decl_atom (= I i k) (\ v3 (\ a3
66 ; (5) -------------------- theory conflicts ---------------------------------------------
67 ; --- these should introduce (holds ...)
74 ; use read over write rule "row"
75 (contra _ (symm _ _ _ (row _ _ _ _ a (apply _ _ (apply _ _ (read I E) a) i) l3)) l2)
78 ; CT1 is the clause ( v2 V v3 )
85 ; use read over write rule "row1"
88 (symm _ _ _ (cong _ _ _ _ _ _
89 (refl _ (apply _ _ (read I E) (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i))))
92 (row1 _ _ a i (apply _ _ (apply _ _ (read I E) a) i))
93 (cong _ _ _ _ _ _ (refl _ (apply _ _ (read I E) a)) l3)
98 ; CT2 is the clause ( v2 V ~v3 )
101 ; (6) -------------------- clausification -----------------------------------------
102 ; --- these should introduce (holds ...)
108 ; input formula A1 is ( ~a1 )
109 ; the following is a proof of a1 ^ ( ~a1 ) => false
114 ; C1 is the clause ( ~v1 )
122 ; lemma A2 is ( a1 V ~a2 )
123 ; the following is a proof of ~a1 ^ a2 ^ ( a1 V ~a2 ) => false
125 (contra _ l2 (or_elim_1 _ _ l1 A2))
128 ; C2 is the clause ( v1 V ~v2 )
131 ; (7) -------------------- resolution proof ------------------------------------------------------------
133 (satlem_simplify _ _ _
135 (R _ _ (R _ _ CT1 CT2 v3) (R _ _ C2 C1 v1) v2)
139 )))))))))))))))))))))))))))