Wei’s invasion had two roads. Zhong Hui’s mass army went by Hanzhong and Jian’ge and was stopped by Jiang Wei. Deng Ai chose the Yinping mountains, cut a road, and kept going when the grain was nearly gone. He appeared at Jiangyou. Zhuge Zhan died at Mianzhu. The man who surrendered was Liu Shan, not Liu Cong.
When Chengdu opened, Shu as a state ended. Yinping is not the empty fort and not a trick invented by the novel. Chen Shou puts the danger in Deng Ai’s biography. Jiang Wei was still at Jian’ge, so the fall is not one simultaneous collapse.