BACKGROUND OF THE INVENTION 
     Although organic polymers have replaced metals in many structural contexts, thus far they have failed to replace metals when the latter are used as electrical conductors or semiconductors. The impetus for such replacement includes, among others, lower cost, lower weight of materials, and increased processing variability for polymers as compared with metals. For example, polymers readily can be cast as films, foils, and fibers by standard, time-tested procedures. Polymers can be formed into a limitless variety of shapes and dimensions by standard processing procedures, thereby adding to the potential benefit of electrically conducting polymers. 
     A potential use for electrically conducting polymers is as electrodes or components of batteries, where their low weight and possibly unlimited scope of design are attractive. Electrically conducting polymers also could find use in construction of solar cells. Where such polymers are photoconducting they would undoubtedly find applications in the electrophotographic industry. 
     The conductivity ranges characterizing insulators, semiconductors, and metallic conductors are somewhat arbitrary, but for convenience we may say an insulator has a conductivity less than about 10 -10  ohm -1  cm -1 , a conducting metal has a conductivity greater than about 10 2  ohm -1  cm -1 , and a semiconductor has a conductivity between the above. In some cases organic polymers which are insulators show a sufficient increase in conductivity upon doping to act as semiconductors. By &#34;doping&#34; is meant adding a compound, referred to as a dopant, to the polymer so as to form a redox system wherein an electron is transferred from the polymer to the dopant, or vice versa. Two common examples of dopants are iodine (an electron acceptor) and sodium naphthalide (an electron donor). When the polymer transfers an electron to the dopant to exhibit semiconductor properties it is called a p-type semiconductor because conduction occurs mainly via holes in the valence band. Conversely, when the polymer accepts an electron from the dopant to exhibit semiconductor properties it is called an n-type semiconductor because conduction occurs mainly via electrons in the conduction band. 
     It is desirable for a normally insulating polymer to become a semiconductor upon doping by both p- and n-type dopants. It is also desirable that the polymer respond to a wide variety of dopants, and for its conductivity to be relatively responsive to changed levels of dopant. It is also desirable that the conductivity properties of the polymer remain stable over time and upon air exposure of the polymer. It is also quite desirable that upon doping the polymer remain flexible rather than becoming brittle. 
     It is a discovery of this invention that certain condensation polymers of α,α,α&#39;,α&#39;-tetrahaloxylenes and aromatic diamines whose repeating unit has the structure, 
     
         (═CH--Y--CH═N--Z--N═) 
    
     where Z is a divalent aromatic moiety whose parent is selected from the group consisting of benzene, napthalene, anthracene, pyridine, acridine, stilbene, azobenzene, biphenyl, diphenylsulfone, anthraquinone, and diphenylmethane, and where Y is a divalent aromatic moiety whose parent is benzene, are polymers which show many of the aforementioned properties. The polymers of this invention normally are insulators whose conductivity increases to 10 -7  -10 -4  ohm -1  cm -1  upon doping with an electron acceptor such as iodine. In addition to these properties as a p-type semiconductor, they can be doped with an electron donor such as sodium naphthalide to behave as an n-type semiconductor. An unexpected and highly advantageous property of some of the doped polymers is that they are pliable, in contrast to the brittle character of the undoped polymer, thereby facilitating production of shaped electrically conducting polymers. 
     Polyacetylene and poly(p-phenylene) exemplify some better, perhaps the best, prior art electrically conducting polymers, hence their limitations exemplify the prior art constraints. Although polyacetylene may be doped with p- and n-type dopants, all doped material as well as undoped polyacetylene are unstable in air. Thus the electrical properties, which are of greatest interest in this application, are useful for only short periods in air. In contrast, poly(p-phenylene) itself is air stable but it affords air unstable, electrically conducting polymers with both p- and n-type dopants. However, these materials invariably are amorphous powders which cannot be cast, hence their processability is severely limited. 
     DESCRIPTION OF THE INVENTION 
     In one aspect the invention which is disclosed and claimed is a method of preparing an electrically conducting polymer comprising contacting a polymer whose repeating unit has the structure, 
     
         (═CH--Y--CH═N--Z--N═) 
    
     where Y and Z have been previously defined, with a dopant, and recovering the resulting doped polymer. 
     In another aspect the invention is the electrically conducting polymer itself, which comprises a polymer with the aforementioned structure and a dopant, the latter being present in a mole ratio up to about 5. 
     The polymers of this invention have an extended, linear conjugated system which is believed to afford the basis of electron flow. In its ground state the polymer has its highest bonding orbital completely filled, and its lowest antibonding orbital totally unoccupied. In such a state the polymer would be nonconducting,--i.e., an insulator--because of the absence of charge carriers, despite the fact that both orbitals above are extensively delocalized. If the gap between the aforementioned orbitals were sufficiently small, thermal excitation would promote some fraction of electrons from the highest bonding orbital, or valence band, into the lowest antibonding orbital, or conduction band. There would be &#34;holes&#34; in the valence and electrons in the conduction band, both of which are charge carriers, and the polymer would be electrically conducting. A similar electron transfer could accompany absorption of light, in which case the polymer would be a photoconductor. 
     Because the band gap of the polymer in question is too large for appreciable thermal population of the conduction band, a different mode of introducing charge carriers is needed. As stated above, dopants are materials which form a redox system with the subject polymer. The function of a dopant is to introduce charge carriers into the polymer. Where the dopant is an oxidizing agent and removes an electron from the highest filled orbital of the polymer it creates &#34;holes&#34; in the valence band which are p-type charge carriers. Analogously, where the dopant is a reducing agent and adds an electron to the lowest unoccupied orbital of the polymer it puts electrons into the conduction band which are n-type charge carriers. Dopants which cause a polymer to behave as p- or n-type conductors, respectively, are called p- or n-type dopants. 
     The polymers of this invention have the repeating unit, 
     
         (═CH--Y--CH═N--Z--N═) 
    
     The moiety Z is an aromatic divalent moiety whose parent is a moiety such as benzene, naphthalene, anthracene, biphenyl, pyridine, diphenylsulfone, azobenzene, diphenylmethane, anthraquinone, acridine, stilbene, and so forth. Examples of aromatic diamines which are the source of the moiety Z include 1,4-diaminobenzene, 1,3-diaminobenzene, 1,2-diaminobenzene; 4,4&#39;-diaminobiphenyl and the other isomeric diaminobiphenyls where each of the rings bears only one amino group; the isomeric diaminopyridines; the isomeric diaminoacridines where each of the lateral fused rings bears one amino group, and especially 3,6-diaminoacridine; the isomeric diaminostilbenes, particularly 4,4&#39;-diaminostilbene; the isomeric diaminonaphthalenes and diaminoanthracenes; 4,4&#39;-diaminodiphenylsulfone and its isomers where each ring bears an amino group; 2,6-diaminoanthraquinone and its isomers where each of the lateral rings bears an amino group; 4,4&#39;-diaminoazobenzene and 4,4&#39;-diaminodiphenylmethane and isomers of each of them where each aromatic ring bears one amino group. 
     The moiety Y is an aromatic divalent moiety whose parent is benzene. Although the 1,4-isomer is favored, the 1,2- and 1,3-isomers, and all combinations of isomers, may be used but not necessarily with equivalent results. 
     The polymers of this invention may be prepared by reacting in solution approximately equimolar proportions of a α,α,α&#39;,α&#39;-tetrahaloxylene and an aromatic diamine in a dipolar aprotic solvent, such as dimethylacetamide, in the presence of a base sufficient to remove formed acid and at a temperature from about 20° C. to about 100° C. The use of a dipolar aprotic solvent permits the polymer to be readily cast from such solutions to afford films which, once dry, are insoluble. Tertiary amines are convenient and effective bases in the practice of this invention. α,α,α&#39;,α&#39;-Tetrabromoxylene is the reactant of choice, although the chloro and iodo analogues may be used but not necessarily with equivalent results. 
     The polymers of this invention are insulators showing a conductivity less than 10 -10  ohm -1  cm -1 . However, when doped with either p-type or n-type dopants the conductivity increases to about 10 -7  -10 -4  ohm -1  cm -1 . Where the dopant is itself air stable, it has been found that the electronically conducting doped polymer is relatively air stable as manifested by unchanged conductivity over a period of several weeks. 
     As examples of p-type dopants there may be cited bromine, chlorine, and iodine; SbF 5 , AsF 5 , PF 5 , and related compounds where fluorine is replaced by a highly electronegative, non-nucleophilic group; AgClO 4  as representative of a silver compound with a non-nucleophilic anion; NO 2  X and NOX, where X is a non-nucleophilic anion such as SbF 6   - , FB 4   - , and so on; and sulfuric and perchloric acids. 
     Examples of n-type dopants are more limited. The most common such dopants are alkali metal salts of the radical anions of aromatic systems, as exemplified by sodium naphthalide. 
     Electrochemical doping introduces additional variants. For example, if the polymer serves as the cathode in a medium containing a tetraalkylammonium perchlorate as the electrolyte, the polymer becomes reduced, thereby exhibiting n-type conduction, and the tetraalkylammonium cation serves as a dopant by impregnating the polymer to preserve electrical neutrality. When the polymer serves as the anode it becomes oxidized and exhibits p-type conduction with the perchlorate anion serving as the dopant. 
     The amount of dopant incorporated into the polymer to give the electrically conducting system is subject to wide variation, depending, for example, on the dopant and the conductivity desired. In the case of iodine, for example, the mole ratio dopant to repeating unit of polymer may be as low as about 0.5 and up to about 5. Generally a mole ratio from about 0.1 to about 3.5 is most commonly employed. 
    
    
     The examples given below merely serve to illustrate this invention and are not intended to limit it in any way. 
     EXAMPLE 
     The polymers of this invention were prepared by a common method, with the following description being representative. 
     To a 100-ml 3-necked flask equipped with a mechanical stirrer and reflux condenser were added, in a nitrogen atmosphere, 1.00 g (2.37 m mol) freshly recrystallized α,α,α&#39;,α&#39;-tetrabromo-p-xylene, 15 ml dimethylacetamide, and 0.44 g (2,39 mmol) 4,4&#39;-diaminobiphenyl. The stirred solution was maintained at room temperature for 30 minutes and heated at 55° C. for 17 hr. after which 5 ml triethylamine was added. After an additional 3.5 hr. at 55° C., the mixture was poured into 75 ml methanol. The yellow-orange precipitate which formed was collected by filtration and washed repeatedly with portions of methanol and diethylether to yield 0.58 g yellow-orange powder. 
     Pellets for electrical conductivity testing were prepared by adding a measured amount of the polymer powder to a Beckman IR pellet press. The pellets were 1.3 cm in diameter with a thickness determined by the amount of material pressed and the pressure used. 
     To obtain reliable conductivity data which could be duplicated it was found necessary to dry the material thoroughly in vacuum. Accordingly, after being pressed all pellets were dried at 25° to 100° C. at 0.2 mm Hg for several hours. Pellets normally were removed and stored under nitrogen until testing. 
     Iodine doping was carried out by adding an iodine crystal to a chamber containing a pellet of polymer. The chamber then was evacuated causing immediate sublimation of iodine. Gaseous iodine remained in contact with a pellet for a period from about 1.5 to about 17 hours, whereupon the doped pellet was removed and stored under nitrogen until being tested. 
     Doping of a polymer with sodium naphthalide may be accomplished by contacting the polymer powder with a slurry of sodium naphthalide in dry tetrahydrofuran. After the mixture is stirred under nitrogen for 24 hours, excess sodium naphthalide and solvent may be removed with a pipette. The remaining solvent may be evaporated in a stream of nitrogen and the doped polymer may be dried as described above but at room temperature. Using as an example the polymer where the parent of Y and Z are benzene and azobenzene, resp., the doped polymer had a conductivity of 2.9×10 -6  ohm -1  cm -1 . 
     Some results illustrative of the iodine-doped polymers of this invention are given in the accompanying table. In all cases Y is 1,4-disubstituted benzene, with the structure of Z given in the table. 
     
                                           Table of Iodine-Doped__________________________________________________________________________Polymers Z         ##STR1##                           ##STR2##                                          ##STR3##__________________________________________________________________________mass of pellet, g        0.0742            0.0236         0.0518thickness, in        0.0225                           0.0146mass of iodine        0.1108            0.0296         0.2021doped thickness, inch        0.0300            0.0105         0.0192mole ratio, I.sub.2 : polymer        1.81              1.26           4.56conductivity, undoped,        10.sup.-8         2.2 × 10.sup.-11                                         2.0 × 10.sup.-12ohm.sup.-1 -cm.sup.-1conductivity, doped        5.9 × 10.sup.-5                          5.8 × 10.sup.-7                                         2.9 × 10.sup.-4ohm.sup.-1 -cm.sup.-1__________________________________________________________________________          Z                      ##STR4##                                         ##STR5##__________________________________________________________________________         mass of pellet, g                     0.0890             0.0371         thickness, in                  0.0108         mass of iodine                     0.2597             0.0217         doped thickness, inch                     0.044              0.0120         mole ratio, I.sub.2 : polymer                     3.55               0.71         conductivity, undoped,                     &lt;10.sup.-8         4 × 10.sup.-10         ohm.sup.-1 -cm.sup.-1         conductivity, doped                     2.0 × 10.sup.-5                                        1.4 × 10.sup.-7         ohm.sup.-1 -cm.sup.-1__________________________________________________________________________
The polymers resulting from reaction of a a,a,a',a'-tetrahaloxylene with a diamine of the type H 2 NANH 2, where A is a divalent aromatic moiety, may be doped with a variety of materials to afford electrically conducting polymeric compositions. Both p-type and n-type conductors may be formed either by chemical or electrochemical doping procedures.