World's most popular travel blog for travel bloggers.

[Solved]: Can we move quantifiers to the left in predicate logic?

, , No Comments
Problem Detail: 

Say I have part of a query in the form: ∃xa(...)∧∃xb(...)∧∃xc(...), where a, b, and c are attributes and the ellipses can be anything (I'm looking for a general rule). Is this equivalent to saying ∃xa,xb,xc(...∧...∧...) - i.e. compacting all the existential quantifiers into one and 'anding' their domains together?

For example, if I have the query:

enter image description here

would it be correct (albeit unwieldy) to write it as:

{ xpid | ∃xpname,xcolor,xsid,xsname,xaddress,xcost,ysid,ysname,yaddress,ycost( PARTS(xpid,xpname,xcolor) ∧ SUPPLIERS(xsid,xsname,xaddress... (and then the rest of the query)

Asked By : false_azure

Answered By : Yuval Filmus

If all the quantified variables are distinct, then you can safely move all quantifiers to the left. This is the only obstruction to this procedure. You can always ensure that all quantified variables are distinct by renaming them. For example, starting with $$(\forall x P(x)) \lor (\forall x Q(x)),$$ we first rename the second variable to $y$, $$(\forall x P(x)) \lor (\forall y Q(y)),$$ and then move the quantifiers to the left, $$ \forall x \forall y (P(x) \lor Q(y)). $$ This is equivalent to the original formula.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/23588

0 comments:

Post a Comment

Let us know your responses and feedback