Implementation of neg_elim() (untested).
Chris Pressey
3 years ago
82 | 82 |
- [x] Absurdum value
|
83 | 83 |
- [x] absr_elim: if absurdum is proved, then anything is proved (absr |- phi)
|
84 | 84 |
- [ ] demo proof showing absr_elim
|
85 | |
- [ ] neg_elim: if x is proved, and not x is proved, then absurdum is proved (phi, not phi |- absr)
|
|
85 |
- [x] neg_elim: if x is proved, and not x is proved, then absurdum is proved (phi, not phi |- absr)
|
86 | 86 |
- [ ] demo proof showing neg_elim
|
87 | 87 |
- [ ] neg_intro: if gamma, phi proves absurdum, then gamma proves not phi (gamma |- not phi, discharging gamma, phi)
|
88 | 88 |
- [ ] demo proof showing neg_intro
|
25 | 25 |
struct proof *conj_elim_rhs(struct proof *);
|
26 | 26 |
|
27 | 27 |
struct proof *absr_elim(struct proof *, struct formula *);
|
|
28 |
struct proof *neg_elim(struct proof *, struct proof *);
|
28 | 29 |
|
29 | 30 |
#endif /* ndef PROOF_H */
|
159 | 159 |
q
|
160 | 160 |
);
|
161 | 161 |
}
|
|
162 |
|
|
163 |
struct proof *
|
|
164 |
neg_elim(struct proof *p, struct proof *q)
|
|
165 |
{
|
|
166 |
assert(q->conclusion->type == NEG, "neg_elim: not a negation");
|
|
167 |
assert(formula_eq(p->conclusion, q->conclusion->lhs), "neg_elim: mismatched conclusions");
|
|
168 |
return mk_proof(
|
|
169 |
merge(p->assumptions, q->assumptions),
|
|
170 |
absr()
|
|
171 |
);
|
|
172 |
}
|