git @ Cat's Eye Technologies Philomath / f5d815a
Demonstrate that we do in fact reject incorrectly formed proofs. Chris Pressey 3 years ago
2 changed file(s) with 19 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
7474 - [x] disj_elim
7575 - [x] demo proof showing disj_elim
7676
77 - [ ] demo bad proof (ought to really be a number of these)
77 - [x] demo bad proof (ought to really be a number of these)
7878 - [ ] debug flag for (or debug version of) `build-proof.sh`
7979
8080 - [ ] Use names of greek letters for arguments to the functions
0 /*
1 * Attempt to write a proof showing
2 * (p -> q) -> p
3 * but demonstrate that we do not allow that.
4 */
5
6 #include "formula.h"
7 #include "proof.h"
8
9 int main(int argc, char **argv) {
10 return proves(
11 impl_intro(
12 1,
13 suppose(conj(var("p"), var("q")), 1)
14 ),
15 impl(impl(var("p"), var("q")), var("p"))
16 );
17 }