"The girl writes on the paper with the pen."
Translation:Scríobhann an cailín ar an bpáipéar leis an bpeann.
It's never quite that straightforward with Irish. While many of the simple prepositions cause an urú after an (the singular definite article), some, such as de, do, i and idir don't.
preposition+plural definite article doesn't trigger any initial mutation in the following noun.
le becomes leis before a definite article (an or na)
le madra - "with a dog"
le madraí - "with dogs"
leis an madra - "with the dog"
leis na madraí - "with the dogs"
You are correct to note that it is not the same as the masculine 3rd person singular prepositional pronoun leis:
tá madra leis - "There is a dog with him*
After certain prepositions + an the following noun is eclipsed - therefore ar an bpáipéar and leis an bpeann. (ag an, ar an, faoin, leis an, ón, roimh an, thar an, tríd an, um an).