SHOW:
|
|
- or go back to the newest paste.
1 | ||
2 | - | #import: written-on(word,paper). |
2 | + | |
3 | my-minus-one(N,M) <-> (N > 1) & (M = N-1) | |
4 | ||
5 | % Lits in KBs are considered true | |
6 | consistent(kb) <-> min-lits(1, kb) | |
7 | - | forall x. same(x,x) |
7 | + | |
8 | exactly-N-lits(1,kb) <-> | |
9 | - | legal-pad(paper) <-> min-elements(1, paper) |
9 | + | (exists kb logsent. |
10 | ( true-in(logsent,kb) | |
11 | - | exactly-n-elements(1,paper) <-> |
11 | + | & ~(exists other-logsent. |
12 | - | (exists paper word. |
12 | + | ( true-in(other-logsent,kb) |
13 | - | ( written-on(word,paper) |
13 | + | & ~equiv(kb,other-logsent,logsent))))) |
14 | - | & ~(exists other-word. |
14 | + | |
15 | - | ( written-on(other-word,paper) |
15 | + | exactly-N-lits(2,kb) <-> |
16 | - | & ~same(other-word,word))))) |
16 | + | (exists kb logsent1 logsent2. |
17 | ( true-in(logsent1,kb) | |
18 | - | exactly-n-elements(2,paper) <-> |
18 | + | & true-in(logsent2,kb) |
19 | - | (exists paper word1 word2. |
19 | + | & ~equiv(kb,logsent1,logsent2) |
20 | - | ( written-on(word1,paper) |
20 | + | & ~ (exists other-logsent. |
21 | - | & written-on(word2,paper) |
21 | + | ( true-in(other-logsent,kb) |
22 | - | & ~same(word1,word2) |
22 | + | & ~equiv(kb,other-logsent,logsent1) |
23 | - | & ~ (exists other-word. |
23 | + | & ~equiv(kb,other-logsent,logsent2))))) |
24 | - | ( written-on(other-word,paper) |
24 | + | |
25 | - | & ~same(other-word,word1) |
25 | + | exactly-N-lits(N,kb) <-> |
26 | - | & ~same(other-word,word2))))) |
26 | + | range-lits(N,N,kb) |
27 | ||
28 | - | exactly-n-elements(N,paper) <-> |
28 | + | |
29 | - | range-elements(N,N,paper) |
29 | + | range-lits(N,M,kb) <-> |
30 | (exists kb. | |
31 | - | range-elements(N,M,paper) <-> |
31 | + | ( min-lits(N,kb) |
32 | - | (exists paper. |
32 | + | & max-lits(M,kb))) |
33 | - | ( min-elements(N,paper) |
33 | + | |
34 | - | & max-elements(M,paper))) |
34 | + | min-lits(1,kb) <-> |
35 | (exists kb logsent1. | |
36 | - | min-elements(1,paper) <-> |
36 | + | (true-in(logsent1,kb))) |
37 | - | (exists paper word1. |
37 | + | |
38 | - | (written-on(word1,paper))) |
38 | + | min-lits(2,kb) <-> |
39 | (exists kb logsent1 logsent2. | |
40 | - | min-elements(2,paper) <-> |
40 | + | ( true-in(logsent1,kb) |
41 | - | (exists paper word1 word2. |
41 | + | & true-in(logsent2,kb) |
42 | - | ( written-on(word1,paper) |
42 | + | & ~equiv(kb,logsent1,logsent2))) |
43 | - | & written-on(word2,paper) |
43 | + | |
44 | - | & ~same(word1,word2))) |
44 | + | max-lits(2,kb) <-> |
45 | (exists kb logsent1 logsent2. | |
46 | - | max-elements(2,paper) <-> |
46 | + | ( true-in(logsent1,kb) |
47 | - | (exists paper word1 word2. |
47 | + | & true-in(logsent2,kb) |
48 | - | ( written-on(word1,paper) |
48 | + | & ~(exists other-logsent. |
49 | - | & written-on(word2,paper) |
49 | + | ( true-in(other-logsent,kb) |
50 | - | & ~(exists other-word. |
50 | + | & ~equiv(kb,other-logsent,logsent1) |
51 | - | ( written-on(other-word,paper) |
51 | + | & ~equiv(kb,other-logsent,logsent2))))) |
52 | - | & ~same(other-word,word1) |
52 | + | |
53 | - | & ~same(other-word,word2))))) |
53 | + | % exists a kb with no lits? |
54 | exactly-N-lits(0,kb) <-> | |
55 | - | % exists a paper with no elements |
55 | + | (exists kb |
56 | - | exactly-n-elements(0,paper) <-> |
56 | + | ~(exists logsent1. true-in(logsent1,kb))) |
57 | - | (exists paper |
57 | + | |
58 | - | ~(exists word1. written-on(word1,paper))) |
58 | + | max-lits(1,kb) <-> |
59 | exactly-N-lits(0,kb) v exactly-N-lits(1,kb) | |
60 | - | max-elements(1,paper) <-> |
60 | + | |
61 | - | exactly-n-elements(0,paper) v exactly-n-elements(1,paper) |
61 | + | difference_at_least_1_truths(kb1,kb2) <-> |
62 | (exists logsent. (true-in(logsent,kb1) -> ~true-in(logsent,kb2))) | |
63 | - | containsAtLeastOneUnique(paper1,paper2) <-> |
63 | + | |
64 | - | (exists word. (written-on(word,paper1) -> ~written-on(word,paper2))) |
64 | + | disjoint_truths(kb1,kb2) <-> |
65 | ~(exists logsent. (true-in(logsent,kb1) & true-in(logsent,kb2))) | |
66 | - | disjoint(paper1,paper2) <-> |
66 | + | |
67 | - | ~(exists word. (written-on(word,paper1) & written-on(word,paper2))) |
67 | + | subset_truths(kb1,kb2) <-> |
68 | (forall logsent. | |
69 | - | subset(paper1,paper2) <-> |
69 | + | true-in(logsent,kb1) -> true-in(logsent,kb2) ) |
70 | - | (forall word. |
70 | + | |
71 | - | written-on(word,paper1) -> written-on(word,paper2) ) |
71 | + | union_s_v2(kb1,kb2,kb) <-> |
72 | (forall logsent. | |
73 | - | union(paper1,paper2,paper) <-> |
73 | + | (true-in(logsent,kb) <-> |
74 | - | (forall word. |
74 | + | (true-in(logsent,kb1) v true-in(logsent,kb2)))) |
75 | - | (written-on(word,paper) <-> |
75 | + | |
76 | - | (written-on(word,paper1) v written-on(word,paper2)))) |
76 | + | union_truths(kb1,kb2,kb) <-> |
77 | (exists scratchpad. | |
78 | - | union(paper1,paper2,paper) <-> |
78 | + | union_truths(kb1,kb2,scratchpad) |
79 | & ~difference_at_least_1_truths(kb,scratchpad)) | |
80 | - | union(paper1,paper2,scratchpad) |
80 | + | |
81 | - | & ~containsAtLeastOneUnique(paper,scratchpad)) |
81 | + | |
82 | union-disjoint_truths(kb1,kb2,kb) <-> | |
83 | ( union_truths(kb1,kb2,kb) | |
84 | - | union-disjoint(paper1,paper2,paper) <-> |
84 | + | & disjoint_truths(kb1,kb2)) |
85 | - | ( union(paper1,paper2,paper) |
85 | + | |
86 | - | & disjoint(paper1,paper2)) |
86 | + | |
87 | min-lits(4,kb) <-> | |
88 | (exists kb1 kb2. | |
89 | - | min-elements(4,paper) <-> |
89 | + | min-lits(2,kb1) |
90 | - | (exists paper1 paper2. |
90 | + | & min-lits(2,kb2) |
91 | - | min-elements(2,paper1) |
91 | + | & union-disjoint_truths(kb1,kb2)) |
92 | - | & min-elements(2,paper2) |
92 | + | |
93 | - | & union-disjoint(paper1,paper2)) |
93 | + | min-lits(N,kb) <-> |
94 | (exists kb1 kb2. | |
95 | - | min-elements(N,paper) <-> |
95 | + | min-lits(1,kb1) |
96 | - | (exists paper1 paper2. |
96 | + | & min-lits(M,kb2) |
97 | - | min-elements(1,paper1) |
97 | + | & consistent(kb2) |
98 | - | & min-elements(M,paper2) |
98 | + | & union-disjoint_truths(kb1,kb2) |
99 | - | & legal-pad(paper2) |
99 | + | |
100 | - | & union-disjoint(paper1,paper2) |
100 | + | |
101 | ||
102 | max-lits(N,kb) <-> | |
103 | (exists kb1 kb2. | |
104 | - | max-elements(N,paper) <-> |
104 | + | max-lits(1,kb1) |
105 | - | (exists paper1 paper2. |
105 | + | & max-lits(M,kb2) |
106 | - | max-elements(1,paper1) |
106 | + | & consistent(kb2) |
107 | - | & max-elements(M,paper2) |
107 | + | & union-disjoint_truths(kb1,kb2) |
108 | - | & legal-pad(paper2) |
108 | + | |
109 | - | & union-disjoint(paper1,paper2) |
109 | + | |
110 | ||
111 | equal_v1_truths(kb1,kb2) <-> | |
112 | ( ~difference_at_least_1_truths(kb1,kb2) | |
113 | - | equal_papers_v2(paper1,paper2) <-> |
113 | + | & ~difference_at_least_1_truths(kb2,kb1) |
114 | - | ( ~containsAtLeastOneUnique(paper1,paper2) |
114 | + | & consistent(kb1) |
115 | - | & ~containsAtLeastOneUnique(paper2,paper1) |
115 | + | & consistent(kb2)) |
116 | - | & legal-pad(paper1) |
116 | + | |
117 | - | & legal-pad(paper2)) |
117 | + | equal_v2_truths(kb1,kb2) <-> |
118 | ( consistent(kb1) | |
119 | - | equal_papers_v1(paper1,paper2) <-> |
119 | + | & (forall logsent. |
120 | - | ( legal-pad(paper1) |
120 | + | (true-in(logsent,kb1) <-> true-in(logsent,kb2)))) |
121 | - | & (forall word. |
121 | + | |
122 | - | (written-on(word,paper1) <-> written-on(word,paper2)))) |
122 | + | |
123 | % v1: lameness | |
124 | equiv_v1(kb,logsent1,logsent2) <-> | |
125 | true-in(logsent1,kb) <-> true-in(logsent2,kb) | |
126 | ||
127 | % v2 logsent2 and logsent2 logically "imply" each other in the kb. | |
128 | equiv_v2(kb,logsent1,logsent2) <-> | |
129 | true-in((logsent1 <-> logsent2),kb) | |
130 | ||
131 | % v3 the actual semantics implemented based that both logical sentences use the same proof | |
132 | equiv(kb,logsent1,logsent2) <-> | |
133 | equiv_v4(kb,logsent1,logsent2) v equiv_v2(kb,logsent1,logsent2) | |
134 | ||
135 | % v4 sameness (current implementation in LogicMOO ) | |
136 | equiv_v4(kb,x,x) <-> | |
137 | (forall x. (exists kb. | |
138 | true-in(x,kb))) |