Skip to content

Predicate Reduction

Gilles Di Guglielmo edited this page Nov 22, 2018 · 1 revision

A small summary of the reduction algorithm.

AND is FALSE, reduce(FALSE)

is FALSE a b AND reduce(FALSE) Note
No No No reduce(a, FALSE) and reduce(b, FALSE)
Yes No No filter(a) + reduce(b, FALSE) filter true
No Yes No reduce(a, FALSE) + filter(b)
Yes Yes Yes empty

AND is TRUE, reduce(TRUE)

is TRUE a b AND reduce(TRUE) Note
No No No empty
Yes No No empty
No Yes No empty
Yes Yes Yes reduce(a, TRUE) and reduce(b, TRUE)

OR is FALSE, reduce(FALSE)

is FALSE a b OR reduce(FALSE) Note
No No No reduce(a, FALSE) and reduce(b, FALSE) reduce false change operator to and
Yes No Yes empty
No Yes Yes empty
Yes Yes Yes empty

OR is TRUE, reduce(TRUE)

is TRUE a b OR reduce(TRUE) Note
No No No empty
Yes No Yes reduce(a, TRUE) + filter(b) FILTER false
No Yes Yes filter(a) + reduce(b, TRUE)
Yes Yes Yes reduce(a, TRUE) or reduce(b, TRUE)