This should be possible with recent versions of Debian (≥ wheezy) or Ubuntu (≥ 11.10 oneiric), thanks to Multiarch support. The Debian packaging tools support installing packages from more than one architecture on the same system. You would be effectively installing two parallel systems, one with programs and libraries compiled for armhf and one with programs and libraries compiled from armel. Note that I'm not speaking from personal experience for the armel/armhf combination; it is supposed to work, but I don't know if all the bugs have been ironed out yet (the multiarch combination that gets the most attention is amd64/i386). There are success or experience reports: Linaro mailing list thread, blog post by cnxsoft.
Native code libraries are installed in different directories (
/lib/arm-linux-gnueabihf/), so you can have both versions on your system, it's just a matter of disk space. Other files are installed in the same directory for every architectures, so you can only have one (e.g. all executables are in
/usr/bin). In particular, if you need OCaml, I think you'll only be able to have the armel one or the armhf one.
Read the multiarch howto for how to set up your system (it's for Debian, but it should apply to setting things up manually on Ubuntu as well). First, declare armel as an additional architecture on your system:
echo foreign-architecture armel >> /etc/dpkg/dpkg.cfg.d/architectures
From wheezy/quantal onwards, run this instead:
dpkg --add-architecture armel
apt-get update to download the package lists for the new architecture. To install the Coq package for armel:
apt-get install coq:armel