Electroreception — no human analog
What does a shark see in the dark?
Electric fields, decoded by 1,500 ampullae of Lorenzini at the threshold of 5 nV/cm. Modeled in EML, mathematically verified.
human view (turbid water, prey buried) · shark view (dipole field map with detection ring)
Human — turbid water + buried prey
Shark — ampullary E-field map
tiny minnowflounder · 30 cm rangetuna · 60+ cm range
Drag the fish. Feel the 30 cm detection boundary.
drag the fish · cyan ring = ampullae detection range · enter it and the shark strikes
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 →
electric_dipole.emlchain 1module electric_dipole;
const PI: Real = 3.14159265358979
const SEAWATER_EPS_F_M: Real = 7.08e-10
@verify(lean, theorem = "dipole_field_magnitude_nonneg")
fn dipole_field_magnitude(p: Real, r: Real, angle: Real) -> Real
requires (p >= 0.0)
requires (r > 0.0)
ensures (result >= 0.0)
{
max(0.0, p * abs(cos(angle)) / (4.0 * PI * SEAWATER_EPS_F_M * r * r * r))
}ampullae.emlchain 1module ampullae;
const V_THRESHOLD_V_M: Real = 5.0e-7 // 5 nV/cm
const SLOPE_V_M: Real = 1.25e-7
@verify(lean, theorem = "ampullae_response_in_unit_interval")
fn ampullae_response(field_V_m: Real) -> Real
ensures (result >= 0.0)
ensures (result <= 1.0)
{
clamp(1.0 / (1.0 + exp(-(field_V_m - V_THRESHOLD_V_M) / SLOPE_V_M)),
0.0, 1.0)
}detection_range.emlchain 1module detection_range;
const PI: Real = 3.14159265358979
const SEAWATER_EPS_F_M: Real = 7.08e-10
const E_THRESHOLD_V_M: Real = 5.0e-7
@verify(lean, theorem = "detection_range_nonneg")
fn detection_range(p: Real) -> Real
requires (p >= 0.0)
ensures (result >= 0.0)
{
max(0.0, pow(p / (4.0 * PI * SEAWATER_EPS_F_M * E_THRESHOLD_V_M),
1.0 / 3.0))
}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 →