NOVELTY - A polyimide precursor or polyimide has a structure (I) or (II).    USE - Polyimide precursor or polyimide is used for composition for charge-transporting thin film e.g. electrode protective film and antistatic film, used for organic electroluminescent element (all claimed) e.g. solar cell, electrode for fuel cell and capacitor.    ADVANTAGE - The polyimide precursor or polyimide has oxidation reduction portion in molecule, improved high-luminous-efficient-izing, and long-term durability. The charge-transporting composition has high transmittance in the visible region. The thin film has high planar property and high charge transportability.    DETAILED DESCRIPTION - A polyimide precursor or polyimide has a structure of formula (I) or (II).    T=tetravalent organic group chosen from group of formula (III)-(IX);    R1-R4=H, fluoro, 1-5C alkyl or 1-5C alkoxy;    Q=ferrocene-containing group chosen from group of formula (X)-(XII);    R5-R35=H, halo, hydroxy, amino, silanol, thiol, carboxyl, phosphoric acid, phosphate ester, ester, thioester, amide, nitro, monovalent hydrocarbyl, organo-oxy, organo amino, organosilyl, organothio, acyl or sulfonic acid;    Ar=trivalent aromatic group;    W'=bivalent hydrocarbon group or group of formula: asterisk-C(=O)-(O)i-(CH2)j- (XIII);    i=0 or 1;    j=1-5;and    k=2-400.    INDEPENDENT CLAIMS are included for the following:    (1) diamine compound, which is of formula (XVI);    (2) composition, which contains polyimide precursor or polyimide, and charge-transporting organic material containing charge transporting substance which consists of charge-transporting oligoaniline with number average molecular weight of 250-5000, or charge transporting substance and electric charge acceptability dopant substance;    (3) charge-transporting thin film;    (4) organic electroluminescent element; and    (5) manufacture of polyimide precursor, which involves reacting tetracarboxylic acid or its derivative(s), and at least 1 sort(s) of diamine shown (X')-(XII').