A compound represented by formula: wherein the ring A 1, the ring A 2, the ring A 3 and the ring A 4 are independently 1,4-cyclohexylene, 1,4-cyclohexenylene, 1,4-phenylene, naphthalene-1,2-diyl, naphthalene-1,3-diyl, naphthalene-1,4-diyl, naphthalene-1,5-diyl, naphthalene-1,6-diyl, naphthalene-1,7-diyl, naphthalene-1,8-diyl, naphthalene-2,3-diyl, naphthalene-2,6-diyl, naphthalene-2,7-diyl, tetrahydropyran-2,5-diyl, 1,3-dioxane-2,5-diyl, pyrimidine-2,5-diyl or pyridine-2,5-diyl, and in these groups at least one hydrogen may be replaced by halogen, alkyl having 1 to 12 carbons or alkyl having 1 to 12 carbons in which at least one hydrogen has been replaced by halogen; Z 1 and Z 2 are independently alkylene having 1 to 10 carbons, and in the alkylene at least one -CH 2 - may be replaced by -O-, -COO- or -OCOO- and at least one -CH 2 -CH 2 - may be replaced by -CH=CH- G 1 and G 2 are independently a single bond or -O-; L 1, L 2 and L 3 are independently a single bond, -COO- or -CH=CH-; s, t and u are independently 0 or 1; P 1 and P 2 are independently a group selected from groups represented by formulas (P-1), (P-2) and (P-3): in formula (P-1), M 1 and M 2 are independently hydrogen, fluorine, methyl or trifluoromethyl; at least one of Z 1 and Z 2 has an unsaturated bond when G 1 and G 2 are -O-, and P 1 and P 2 are a group represented by formula (P-1); at least one of Z 1 and Z 2 has the unsaturated bond when s and t are 1, u is 0, G 1 and G 2 are -O-, the ring A 1 and the ring A 4 are 1,4-phenylene, the ring A 2 is 1,4-phenylene in which at least one hydrogen has been replaced by chlorine, methyl or trifluoromethyl, and P 1 and P 2 a group represented by formula (P-2); at least one of Z 1 and Z 2 has the unsaturated bond when L 1, L 2 and L 3 are -COO-; and at least one of Z 1 and Z 2 has the unsaturated bond when s is 1, t and u are 0, the ring A 1 and the ring A 4 are 1, 4-phenylene, G 1 and G 2 are a single bond, and P 1 and P 2 are a group represented by formula (P-1). the ring A 1, the ring A 2, the ring A 3 and the ring A 4 are independently 1,4-cyclohexylene, 1,4-cyclohexenylene, 1,4-phenylene, naphthalene-1,2-diyl, naphthalene-1,3-diyl, naphthalene-1,4-diyl, naphthalene-1,5-diyl, naphthalene-1,6-diyl, naphthalene-1,7-diyl, naphthalene-1,8-diyl, naphthalene-2,3-diyl, naphthalene-2,6-diyl, naphthalene-2,7-diyl, tetrahydropyran-2,5-diyl, 1,3-dioxane-2,5-diyl, pyrimidine-2,5-diyl or pyridine-2,5-diyl, and in these groups at least one hydrogen may be replaced by halogen, alkyl having 1 to 12 carbons or alkyl having 1 to 12 carbons in which at least one hydrogen has been replaced by halogen; Z 1 and Z 2 are independently alkylene having 1 to 10 carbons, and in the alkylene at least one -CH 2 - may be replaced by -O-, -COO- or -OCOO- and at least one -CH 2 -CH 2 - may be replaced by -CH=CH- G 1 and G 2 are independently a single bond or -O-; L 1, L 2 and L 3 are independently a single bond, -COO- or -CH=CH-; s, t and u are independently 0 or 1; P 1 and P 2 are independently a group selected from groups represented by formulas (P-1), (P-2) and (P-3): in formula (P-1), M 1 and M 2 are independently hydrogen, fluorine, methyl or trifluoromethyl; at least one of Z 1 and Z 2 has an unsaturated bond when G 1 and G 2 are -O-, and P 1 and P 2 are a group represented by formula (P-1); at least one of Z 1 and Z 2 has the unsaturated bond when s and t are 1, u is 0, G 1 and G 2 are -O-, the ring A 1 and the ring A 4 are 1,4-phenylene, the ring A 2 is 1,4-phenylene in which at least one hydrogen has been replaced by chlorine, methyl or trifluoromethyl, and P 1 and P 2 a group represented by formula (P-2); at least one of Z 1 and Z 2 has the unsaturated bond when L 1, L 2 and L 3 are -COO-; and at least one of Z 1 and Z 2 has the unsaturated bond when s is 1, t and u are 0, the ring A 1 and the ring A 4 are 1, 4-phenylene, G 1 and G 2 are a single bond, and P 1 and P 2 are a group represented by formula (P-1).