Allow predicate_refuted_by() to deduce that NOT A refutes A.
Allow predicate_refuted_by() to deduce that NOT A refutes A.

We had originally made the stronger assumption that NOT A refutes any B
if B implies A, but this fails in three-valued logic, because we need to
prove B is false not just that it's not true.  However the logic does
go through if B is equal to A.

Recognizing this limited case is enough to handle examples that arise when
we have simplified "bool_var = true" or "bool_var = false" to just "bool_var"
or "NOT bool_var".  If we had not done that simplification then the
btree-operator proof logic would have been able to prove that the expressions
were contradictory, but only for identical expressions being compared to the
constants; so handling identical A and B covers all the same cases.

The motivation for doing this is to avoid unexpected asymmetrical behavior
when a partitioned table uses a boolean partitioning column, as in today's
gripe from Dominik Sander.

Back-patch to 8.2, which is as far back as predicate_refuted_by attempts to
do anything at all with NOTs.

chrishajas/gpdb,edespino/gpdb,janebeckman/gpdb,0x0FFF/gpdb,adam8157/gpdb,royc1/gpdb,adam8157/gpdb,0x0FFF/gpdb,lintzc/gpdb,edespino/gpdb,cjcjameson/gpdb,0x0FFF/gpdb,lintzc/gpdb,greenplum-db/gpdb,chrishajas/gpdb,kaknikhil/gpdb,xuegang/gpdb,xuegang/gpdb,greenplum-db/gpdb,Quikling/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,Chibin/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,edespino/gpdb,janebeckman/gpdb,lintzc/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,rvs/gpdb,Quikling/gpdb,lisakowen/gpdb,0x0FFF/gpdb,lisakowen/gpdb,cjcjameson/gpdb,royc1/gpdb,xuegang/gpdb,lisakowen/gpdb,kaknikhil/gpdb,lintzc/gpdb,zaksoup/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,Quikling/gpdb,janebeckman/gpdb,50wu/gpdb,ahachete/gpdb,kaknikhil/gpdb,rvs/gpdb,lintzc/gpdb,rvs/gpdb,lintzc/gpdb,Quikling/gpdb,Chibin/gpdb,xinzweb/gpdb,0x0FFF/gpdb,ahachete/gpdb,0x0FFF/gpdb,zaksoup/gpdb,cjcjameson/gpdb,rvs/gpdb,zaksoup/gpdb,Chibin/gpdb,jmcatamney/gpdb,ahachete/gpdb,jmcatamney/gpdb,ahachete/gpdb,xuegang/gpdb,xinzweb/gpdb,royc1/gpdb,ashwinstar/gpdb,Chibin/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,jmcatamney/gpdb,50wu/gpdb,chrishajas/gpdb,50wu/gpdb,Chibin/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,edespino/gpdb,lintzc/gpdb,xuegang/gpdb,adam8157/gpdb,chrishajas/gpdb,yuanzhao/gpdb,rvs/gpdb,CraigHarris/gpdb,Chibin/gpdb,rvs/gpdb,chrishajas/gpdb,ashwinstar/gpdb,ahachete/gpdb,50wu/gpdb,royc1/gpdb,lisakowen/gpdb,0x0FFF/gpdb,Quikling/gpdb,50wu/gpdb,janebeckman/gpdb,ahachete/gpdb,edespino/gpdb,janebeckman/gpdb,adam8157/gpdb,rvs/gpdb,kaknikhil/gpdb,xuegang/gpdb,edespino/gpdb,xuegang/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,rvs/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,Quikling/gpdb,xinzweb/gpdb,kaknikhil/gpdb,ahachete/gpdb,xinzweb/gpdb,royc1/gpdb,rvs/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,adam8157/gpdb,jmcatamney/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,adam8157/gpdb,cjcjameson/gpdb,lintzc/gpdb,chrishajas/gpdb,jmcatamney/gpdb,50wu/gpdb,chrishajas/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,edespino/gpdb,jmcatamney/gpdb,Quikling/gpdb,ashwinstar/gpdb,chrishajas/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,CraigHarris/gpdb,royc1/gpdb,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb,zaksoup/gpdb,janebeckman/gpdb,Quikling/gpdb,ahachete/gpdb,50wu/gpdb,adam8157/gpdb,edespino/gpdb,ashwinstar/gpdb,yuanzhao/gpdb,janebeckman/gpdb,lintzc/gpdb,xuegang/gpdb,greenplum-db/gpdb,royc1/gpdb,CraigHarris/gpdb,Quikling/gpdb,0x0FFF/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,lisakowen/gpdb,Chibin/gpdb,rvs/gpdb,royc1/gpdb,yuanzhao/gpdb,CraigHarris/gpdb,edespino/gpdb,yuanzhao/gpdb,xuegang/gpdb,zaksoup/gpdb,kaknikhil/gpdb,xinzweb/gpdb,kaknikhil/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,xinzweb/gpdb,Chibin/gpdb,zaksoup/gpdb,janebeckman/gpdb,greenplum-db/gpdb,janebeckman/gpdb,xinzweb/gpdb,zaksoup/gpdb,Quikling/gpdb,Chibin/gpdb,CraigHarris/gpdb,Chibin/gpdb,zaksoup/gpdb,edespino/gpdb,janebeckman/gpdb