Formylation of tetrahydroquinoline (I) with N,N-dimethylformamide and POCl3 afforded aldehyde (II), which was condensed with ethylmagnesium bromide to give alcohol (III), and then oxidized to ketone (IV) with activated MnO2 in acetone. Coupling with triethyl 2-fluoro-2-phosphonoacetate (V) in the presence of NaH in DMF produced a mixture of olefins, from which the desired E isomer (VI) was separated by column chromatography. Ester reduction with DIBAL-H at -70 C provided the E-alcohol (VII), which was oxidized to aldehyde (VIII) with MnO2 in acetone. Horner-Emmons condensation with phosphonate (IX) afforded heptatrienoic ester (X), which was finally hydrolyzed with NaOH to the target heptatrienoic acid.