Skip to content

Commit 7bf55e0

Browse files
committed
Fix bug in reduceLib.NOT_CONV
Thanks to someplaceguy for bug report.
1 parent 3f726a4 commit 7bf55e0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/num/reduce/src/Boolconv.sml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fun NOT_CONV tm =
4646
let val xn = dest_neg tm
4747
in if aconv xn T then c1 else
4848
if aconv xn F then c2
49-
else let val xn' = dest_neg xn in SPEC xn c3 end
49+
else let val xn' = dest_neg xn in SPEC xn' c3 end
5050
end handle HOL_ERR _ => raise ERR "NOT_CONV" ""
5151
end;
5252

src/num/reduce/src/selftest.sml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,10 @@ val _ = app (fn (n,c,t) => convtest(n,c,lhs t,rhs t)) [
3838
("EVEN_CONV(3)", EVEN_CONV, “EVEN 0 <=> T”),
3939
("ODD_CONV(1)", ODD_CONV, “ODD 106 <=> F”),
4040
("ODD_CONV(2)", ODD_CONV, “ODD 103 <=> T”),
41-
("ODD_CONV(3)", ODD_CONV, “ODD 0 <=> F”)
41+
("ODD_CONV(3)", ODD_CONV, “ODD 0 <=> F”),
42+
43+
("NOT_CONV(1)", NOT_CONV, “~T <=> F”),
44+
("NOT_CONV(2)", NOT_CONV, “~F <=> T”),
45+
("NOT_CONV(3)", NOT_CONV, “~~p <=> p”),
46+
("NOT_CONV(4)", NOT_CONV, “~~~q <=> ~q”)
4247
]

0 commit comments

Comments
 (0)