Required for pre-mRNA splicing as component of the activated spliceosome (PubMed:11991638, PubMed:28076346, PubMed:28502770, PubMed:28781166, PubMed:29301961, PubMed:29360106, PubMed:30315277, PubMed:30705154). Component of the U5 small nuclear ribonucleoprotein (snRNP) complex and the U4/U6-U5 tri-snRNP complex, building blocks of the spliceosome (PubMed:16723661, PubMed:26912367, PubMed:9774689). As a component of the minor spliceosome, involved in the splicing of U12- type introns in pre-mRNAs (Probable). {ECO:0000269|PubMed:11991638, ECO:0000269|PubMed:16723661, ECO:0000269|PubMed:26912367, ECO:0000269|PubMed:28076346, ECO:0000269|PubMed:28502770, ECO:0000269|PubMed:28781166, ECO:0000269|PubMed:29301961, ECO:0000269|PubMed:29360106, ECO:0000269|PubMed:30315277, ECO:0000269|PubMed:30705154, ECO:0000269|PubMed:9774689, ECO:0000305|PubMed:33509932}. This is the function of SNRNP40 (small nuclear ribonucleoprotein U5 subunit 40, Ensembl gene identifier ENSG00000060688).