After a Pronominal aṅga (stem) ending in a , smai is substituted for the Dative -4th Case ending e,
As सर्वस्मै, विश्वस्मै, यस्मै, कस्मै, तस्मै ॥ But भवते where the Pronoun does not end in अ ॥ When अश् is substituted for इदम् 2.4.32 in anvadesa sentences, then we have the form अस्मै ॥ But in अत्र इदम् + ङे = अत्र अ + ए = अत्रा + ए, here the preceding word ends in आ and we could not have ए replaced by स्मै ॥ Therefore we infer that स्मै being an antaranga operation should be substituted first, and the sandhi afterward and we get अत्रास्मै ॥ (See 7.2.102) for the change of यद्, तद् &c into य, त &c). The change of ए into स्मै is antaranga as it depends upon one word, while the एकादेश long आ is bahiranga because it is an operation depending upon two words.,
