안정복은 〈천학설문〉을 1784년 겨울 동안인 11월 14일 이전의 초겨울에 저술하였다. 그러나 1784년 겨울부터 성호학파의 소장학자들이 천주교에 휩쓸리는 경향이 갈수록 더욱 심해짐에 따라 이를 막기 위하여 〈천학설문〉을 보다 체계적인 〈천학고〉와 〈천학혹문〉으로 개편하여 1785년 3월에 그 초고본을 완성하고 그해 12월에 그것을 수정 보완한 수정본을 완성하였다. 그리고 〈천학혹문〉의 제목을 바꾸는 것이 좋겠다는 남한조의 지적에 따라 1790년에서 1791년 7월 20일 사이에 그 제목을 〈天學問答〉으로 바꾸었다.〈천학설문〉은 안정복이 아직 천주교를 수용하지 않은 온건한 소장학자인 沈?의 천주교에 대한 질문을 받고 그가 천주교에 휩쓸리는 것을 막고자 저술하여 준 것이다. 또한 〈천학설문〉은 안정복의 제자인 권진도 필사해 갔는데, 스승을 도와 천주교가 성호학파의 소장학자들에게 널리 전파되는 것을 막는 하나의 지침서로 활용하기 위한 것이었다. 이러한 권진의 경우로 보아 〈천학설문〉이나 이를 개편하여 저술한 〈천학고〉와 〈천학혹문〉(또는 〈천학문답〉)은 성호학파의 온건한 소장학자들에게 널리 전해져 천주교를 배척하는 지침서로 활용되었음을 미루어 알 수 있다. 한편 〈천학고〉와 〈천학혹문〉은 안정복의 문하에 드나들었던 남한조, 신치봉, 정종로, 이천섭 등에 의해 영남 지역에도 전해졌다. 특히 이상정의 제자인 남한조는 〈천학혹문〉을 보고 천주교를 배척한 〈안순암천학혹문변의〉를 저술하였고, 역시 이상정의 제자인 신체인은 안정복의 〈천학설문〉, 이헌경의 〈천학문답〉, 조술도의 〈운교문답〉을 보고 천주교를 배척한 〈천학종지도변〉을 저술하였다. 이로써 보아 안정복의 〈천학설문〉이나 〈천학고〉와 〈천학혹문〉은 영남의 유학자들이 邪學인 천주교를 배척하고 正學인 性理學을 수호하는 闢衛思想을 형성하는 데 많은 영향을 끼쳤음을 알 수 있다.
Bubugo(覆?稿) authored by Ahn Jeong-bok in the late Joseon Dynasty includes his works on Catholicism : Cheonhakseolmun, Cheonhakgo and Cheonhakhokmun(天學或問). Cheonhakseolmun differentiated from Cheonhakgo or Cheonhakhokmun is rough and disorganized in content and contains excerpts from Cheonhakgo which describes the history of Catholicism in China and Korea and Cheonhakhokmun which presents a theoretical critique of Catholicism. This suggests that Cheonhakseolmun was written before the division between Cheonhakgo and Cheonhakhokmun. Ahn Jeong-bok authored Cheonhakseolmun during the winter of 1784 but before November 14 of the year. However, as young scholars of the Seongho Hakpa(星湖學派) had been getting swept away by Catholicism since the winter of 1784, Ahn reorganized Cheonhakseolmun into two more systematic versions, Cheonhakgo and Cheonhakhokmun, for prevention of such tendencies. He completed a draft of the work in March 1785 and its revised version in December of the same year. Cheonhakhokmun was retitled “Cheonhakmundap” between 1790 and July 20 of 1971, on the suggestion of Nam Han-jo(南漢朝) that the title should be changed. In response to questions about Catholicism from middle-of-the-road young scholar Sim Yu(沈?) who did not accept the religion yet, Ahn wrote Cheonhakseolmun for Sim in order to prevent him from being swept away by Catholicism. Furthermore, the book was transcribed by Kwon Jin(權), a disciple of Ahn Jeong-bok, who intended to use as a guide to stop Catholicism from spreading young scholars of the Seongho Hakpa. From the case of Kwon, it can be argued that Cheonhakseolmun and its rewritten versions, Cheonhakgo and Cheonhakhokmun, were widely distributed to young moderates of the school and used as guides against Catholicism. Meanwhile, Cheonhakgo and Cheonhakhokmun were also introduced to the Yeongnam(嶺南) region by Ahn’s followers including Nam Han-jo, Shin Chi-bong(申致鳳), Jeong Jong-ro(鄭宗魯) and Yi Cheon-seop(李天燮). Among others, Nam Han-jo who was a disciple of Yi Sang-jeong(李象靖) warned against Catholicism in Ahn Sunam Cheonhakhokmun-byeongui(安順菴天學或問辨疑) he authored after reading Cheonhakhokmun and Shin Che-in(申體仁) who also was a disciple of Yi Sang-jeong criticized Catholicism in Cheonhak-jongjidobyeon(天學宗旨圖辨) he wrote after reading Ahn Jeong-bok’s Cheonhakseolmun, Yi Heon-gyeong(李獻慶)’s Cheonhakmundap and Cho Sul-do(趙述道)’s Ungyomundap(雲橋問答). Therefore it can be concluded that Ahan’s Cheonhakseolmun, Cheonhakgo and Cheonhakhokmun greatly influenced the Confucian scholars in Yeongnam in forming byeokwi-sasang(闢衛思想), i.e., an idea that rejects Catholicism as “deviant learning” and upholds Confucianism as “correct learning”.