16-channel hyperspectral vision

What does a mantis shrimp see?

The most complex eye in nature. 12 spectral channels from 300–720 nm plus 4 polarization channels — including circular polarization, which no other animal sees.

What does a mantis shrimp see?

human (3 channels, UV patches invisible) · mantis (16 channels, blue-violet UV reveal)

Incoming450 nm
Human cones — 2/3 firing
650 nm
0.00
550 nm
0.14
450 nm
1.00
Mantis spectral channels — 3/12 firing
300 nm
0.00
340 nm
0.00
380 nm
0.02
420 nm
0.49
450 nm
1.00
480 nm
0.49
510 nm
0.06
540 nm
0.00
570 nm
0.00
600 nm
0.00
660 nm
0.00
720 nm
0.00
UV (280 nm)visiblefar-red (720 nm)

Drag below 380 nm. The human cones are silent; the mantis bank keeps ranking. Drag past 700 nm — the mantis still has receptors firing where humans long ago went black.

Drag from 3 to 16 channels. Watch the reef change.

3 — human RGB6 — UV reveals10 — camouflage breaks16 — full mantis

The math behind it

Each function carries a @verify contract that compiles to a Lean theorem about its bounds. The same source compiles to C, Verilog, HLSL, and 28 more targets. View the experiment on GitHub →

spectral_channel.emlchain 1
module spectral_channel;

@verify(lean, theorem = "spectral_channel_in_unit_interval")
fn spectral_sensitivity(
    wavelength_nm: Real,
    peak_nm:       Real,
    sigma_nm:      Real,
) -> Real
    requires (sigma_nm > 0.0)
    ensures  (result >= 0.0)
    ensures  (result <= 1.0)
{
    clamp(exp(-((wavelength_nm - peak_nm) * (wavelength_nm - peak_nm))
               / (2.0 * sigma_nm * sigma_nm)),
          0.0, 1.0)
}
polarization.emlchain 1
module polarization;

@verify(lean, theorem = "polarization_response_bounded")
fn polarization_response(
    intensity:        Real,
    polar_degree:     Real,
    incoming_angle:   Real,
    preferred_angle:  Real,
) -> Real
    requires (intensity    >= 0.0)
    requires (polar_degree >= 0.0 and polar_degree <= 1.0)
    ensures  (result >= 0.0)
    ensures  (result <= 2.0 * intensity)
{
    clamp(intensity * (1.0 + polar_degree
                          * cos(2.0 * (incoming_angle - preferred_angle))),
          0.0, 2.0 * intensity)
}

Same EML pipeline. Different sense.

Eight more cross-species sensor models live alongside this one — bat sonar, owl 3D hearing, pit-viper infrared, dog olfaction, pigeon magnetoreception, shark electric sense, mantis shrimp 16-channel hyperspectral, spider web vibration.

See all nine senses →