A method for producing a polymer includes hydrolyzing and condensing (B) a
hydrolyzable-group-containing silane monomer in the presence of (A) a
polycarbosilane, the polycarbosilane (A) being a polymer (I) obtained by
reacting (a) a compound shown by the following general formula (1) and
(b) at least one compound selected from the group consisting of a
compound shown by the following general formula (2) and a compound shown
by the following general formula (3) in an organic solvent in the
presence of at least one of an alkali metal and an alkaline earth metal,
R.sup.1.sub.kCX.sub.4-k (1) R.sup.2.sub.kSiY.sub.4-k (2)
R.sup.3.sub.mY.sub.3-mSiCR.sup.4.sub.nX.sub.3-n (3) wherein R.sup.1 to
R.sup.4 individually represent a monovalent organic group or a hydrogen
atom, X represents a halogen atom, Y represents a halogen atom or an
alkoxy group, k represents an integer from 0 to 3, and m and n
individually represent integers from 0 to 2.