Underlying phonemes and their allophones are established through standard methods of phonological analysis, including examining distribution.
The claim that underlying phonemes and allophones are determined through phonological analysis and distribution is a foundational, definitional concept in linguistics (common knowledge). Paper [5] touches on how phonemic targets and allophonic variations relate and are analyzed.