Fix boolean or comment (#44)

This commit is contained in:
Kobi Gurkan
2021-01-27 10:46:13 +02:00
committed by GitHub
parent d9e0200433
commit a8f737bf26

View File

@@ -435,7 +435,7 @@ impl<F: Field> Boolean<F> {
match (self, other) {
(&Constant(false), x) | (x, &Constant(false)) => Ok(x.clone()),
(&Constant(true), _) | (_, &Constant(true)) => Ok(Constant(true)),
// a OR b = NOT ((NOT a) AND b)
// a OR b = NOT ((NOT a) AND (NOT b))
(a @ &Is(_), b @ &Not(_)) | (b @ &Not(_), a @ &Is(_)) | (b @ &Not(_), a @ &Not(_)) => {
Ok(a.not().and(&b.not())?.not())
}