A computer scientist's reconstruction of quantum theory*BW: The majority of the work was carried out while employed at University College London and Radboud Universiteit Nijmegen. (23rd September 2022)