A polymer comprising: a unit represented by the following Chemical Formula 1; and a unit represented by the following Chemical Formula 2: wherein, in Chemical Formulae 1 and 2, Ar1 to Ar5 are the same as or different from each other, and each independently a substituted or unsubstituted aryl group; Ar2 and Ar3 are optionally bond to each other to form a substituted or unsubstituted heteroring; Ar4 and Ar5 are optionally bond to each other to form a substituted or unsubstituted heteroring; L1 and L2 are the same as or different from each other, and each independently a direct bond; or a substituted or unsubstituted arylene group; Y is selected from among the following structural formulae: in the structural formulae, R and R' are the same as or different from each other, and each independently a substituted or unsubstituted alkylene group; R1 to R8 are the same as or different from each other, and each independently hydrogen, or a substituted or unsubstituted alkyl group; L3 is a direct bond; a substituted or unsubstituted arylene group; a substituted or unsubstituted alkylene group; a substituted or unsubstituted alkyleneoxy group; or a substituted or unsubstituted divalent arylamine group; l and k are each an integer of 0 to 3, and when l is 2 or greater, R1s are the same as or different from each other, and when k is 2 or greater, R2s are the same as or different from each other; j is an integer of 1 to 3, and when j is 2 or greater, L3s are the same as or different from each other; X is a curing group; n and m mean a molar ratio in the polymer; and 0<n<1, 0<m<1, and m+n≤1. a unit represented by the following Chemical Formula 1; and a unit represented by the following Chemical Formula 2: wherein, in Chemical Formulae 1 and 2, Ar1 to Ar5 are the same as or different from each other, and each independently a substituted or unsubstituted aryl group; Ar2 and Ar3 are optionally bond to each other to form a substituted or unsubstituted heteroring; Ar4 and Ar5 are optionally bond to each other to form a substituted or unsubstituted heteroring; L1 and L2 are the same as or different from each other, and each independently a direct bond; or a substituted or unsubstituted arylene group; Y is selected from among the following structural formulae: in the structural formulae, R and R' are the same as or different from each other, and each independently a substituted or unsubstituted alkylene group; R1 to R8 are the same as or different from each other, and each independently hydrogen, or a substituted or unsubstituted alkyl group; L3 is a direct bond; a substituted or unsubstituted arylene group; a substituted or unsubstituted alkylene group; a substituted or unsubstituted alkyleneoxy group; or a substituted or unsubstituted divalent arylamine group; l and k are each an integer of 0 to 3, and when l is 2 or greater, R1s are the same as or different from each other, and when k is 2 or greater, R2s are the same as or different from each other; j is an integer of 1 to 3, and when j is 2 or greater, L3s are the same as or different from each other; X is a curing group; n and m mean a molar ratio in the polymer; and 0<n<1, 0<m<1, and m+n≤1. Ar1 to Ar5 are the same as or different from each other, and each independently a substituted or unsubstituted aryl group; Ar2 and Ar3 are optionally bond to each other to form a substituted or unsubstituted heteroring; Ar4 and Ar5 are optionally bond to each other to form a substituted or unsubstituted heteroring; L1 and L2 are the same as or different from each other, and each independently a direct bond; or a substituted or unsubstituted arylene group; Y is selected from among the following structural formulae: in the structural formulae, R and R' are the same as or different from each other, and each independently a substituted or unsubstituted alkylene group; R1 to R8 are the same as or different from each other, and each independently hydrogen, or a substituted or unsubstituted alkyl group; L3 is a direct bond; a substituted or unsubstituted arylene group; a substituted or unsubstituted alkylene group; a substituted or unsubstituted alkyleneoxy group; or a substituted or unsubstituted divalent arylamine group; l and k are each an integer of 0 to 3, and when l is 2 or greater, R1s are the same as or different from each other, and when k is 2 or greater, R2s are the same as or different from each other; j is an integer of 1 to 3, and when j is 2 or greater, L3s are the same as or different from each other; X is a curing group; n and m mean a molar ratio in the polymer; and 0<n<1, 0<m<1, and m+n≤1.