mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-10 16:01:28 +01:00
Fix boolean or comment (#44)
This commit is contained in:
@@ -435,7 +435,7 @@ impl<F: Field> Boolean<F> {
|
|||||||
match (self, other) {
|
match (self, other) {
|
||||||
(&Constant(false), x) | (x, &Constant(false)) => Ok(x.clone()),
|
(&Constant(false), x) | (x, &Constant(false)) => Ok(x.clone()),
|
||||||
(&Constant(true), _) | (_, &Constant(true)) => Ok(Constant(true)),
|
(&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(_)) => {
|
(a @ &Is(_), b @ &Not(_)) | (b @ &Not(_), a @ &Is(_)) | (b @ &Not(_), a @ &Not(_)) => {
|
||||||
Ok(a.not().and(&b.not())?.not())
|
Ok(a.not().and(&b.not())?.not())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user