How Google can check whether an application is installed from Play Store or Not?
i think following link can explain how google Play knows or in fact how any dev can know if a given app was installed from play store or side loaded:

How to know an application is installed from google play or side-load?