A composition comprising: a polymer having a structural unit represented by at least one of formulae, and below and a second structural unit represented by formula below; and a curable compound in formulae to, R 1 is each independently a halogen atom, a monovalent hydrocarbon group having 1 to 20 carbon atoms, a monovalent halogenated hydrocarbon group having 1 to 20 carbon atoms, a nitro group, a cyano group, any of primary to tertiary amino groups or a salt of any of primary to tertiary amino groups; n is each independently an integer of 0 to 2; and when n is 2, two or more R 1 may be the same or different and may be joined together in any combination to form a part of a cyclic structure; in formula, A 1 and A 2 are respectively and independently -O-, -S- or -N(R 2)-; R 2 is a hydrogen atom or a monovalent hydrocarbon group having 1 to 20 carbon atoms; and X is a group represented by formula below; in formula, R 4 and R 5 are respectively and independently a halogen atom, a monovalent hydrocarbon group having 1 to 20 carbon atoms, a monovalent halogenated hydrocarbon group having 1 to 20 carbon atoms, an alkoxy group having 1 to 20 carbon atoms, an alkylthio group having 1 to 20 carbon atoms, a nitro group, a cyano group, a carboxy group, a sulfonic acid group, a phosphonic acid group, a phosphoric acid group, a hydroxy group, any of primary to tertiary amino groups, a salt of carboxy group, a salt of sulfo group, a salt of phosphonic acid group, a salt of phosphate group, a salt of hydroxy group or a salt of any of primary to tertiary amino groups; c and d are respectively and independently an integer of 0 to 2; a and b are respectively and independently an integer of 0 to 8; when a is 2 or more, two or more R 4 may be the same or different and may be joined together in any combination to form a part of a cyclic structure; when b is 2 or more, two or more R 5 may be the same or different and may be joined together in any combination to form a part of a cyclic structure; Q and Z are respectively and independently a single bond, -O-, -S- or -N(R 17)-; R 17 is a hydrogen atom, a monovalent hydrocarbon group having 1 to 20 carbon atoms or a monovalent halogenated hydrocarbon group having 1 to 20 carbon atoms; L is a group represented by formula below; y is an integer of 0 to 5; when y is 2 or more, two or more Q, L and Z may be respectively the same or different; when y is 2 or more and a is 1 or more, two or more R 4 may be the same or different; R 6 and R 7 are respectively and independently a single bond, a methylene group or an alkylene group having 2 to 4 carbon atoms; in formula, R c is a 5- to 15-membered monocyclic alicyclic hydrocarbon group. a polymer having a structural unit represented by at least one of formulae, and below and a second structural unit represented by formula below; and a curable compound in formulae to, R 1 is each independently a halogen atom, a monovalent hydrocarbon group having 1 to 20 carbon atoms, a monovalent halogenated hydrocarbon group having 1 to 20 carbon atoms, a nitro group, a cyano group, any of primary to tertiary amino groups or a salt of any of primary to tertiary amino groups; n is each independently an integer of 0 to 2; and when n is 2, two or more R 1 may be the same or different and may be joined together in any combination to form a part of a cyclic structure; in formula, A 1 and A 2 are respectively and independently -O-, -S- or -N(R 2)-; R 2 is a hydrogen atom or a monovalent hydrocarbon group having 1 to 20 carbon atoms; and X is a group represented by formula below; in formula, R 4 and R 5 are respectively and independently a halogen atom, a monovalent hydrocarbon group having 1 to 20 carbon atoms, a monovalent halogenated hydrocarbon group having 1 to 20 carbon atoms, an alkoxy group having 1 to 20 carbon atoms, an alkylthio group having 1 to 20 carbon atoms, a nitro group, a cyano group, a carboxy group, a sulfonic acid group, a phosphonic acid group, a phosphoric acid group, a hydroxy group, any of primary to tertiary amino groups, a salt of carboxy group, a salt of sulfo group, a salt of phosphonic acid group, a salt of phosphate group, a salt of hydroxy group or a salt of any of primary to tertiary amino groups; c and d are respectively and independently an integer of 0 to 2; a and b are respectively and independently an integer of 0 to 8; when a is 2 or more, two or more R 4 may be the same or different and may be joined together in any combination to form a part of a cyclic structure; when b is 2 or more, two or more R 5 may be the same or different and may be joined together in any combination to form a part of a cyclic structure; Q and Z are respectively and independently a single bond, -O-, -S- or -N(R 17)-; R 17 is a hydrogen atom, a monovalent hydrocarbon group having 1 to 20 carbon atoms or a monovalent halogenated hydrocarbon group having 1 to 20 carbon atoms; L is a group represented by formula below; y is an integer of 0 to 5; when y is 2 or more, two or more Q, L and Z may be respectively the same or different; when y is 2 or more and a is 1 or more, two or more R 4 may be the same or different; R 6 and R 7 are respectively and independently a single bond, a methylene group or an alkylene group having 2 to 4 carbon atoms; in formula, R c is a 5- to 15-membered monocyclic alicyclic hydrocarbon group.