If two values in Agda, or some other dependently typed language, you can prove that v₁
is not not equal to v₂
, can you prove v₁
equals v₂
?
Like, is there a function of the type ((v₁ ≡ v₂ → ⊥) → ⊥) → v₁ ≡ v₂
?
This seems like something that is safe to add as axiom if it can't be proven, since there can be at most one value of v₁ ≡ v₂
.
A reason this is interesting is that double negation ((a → ⊥) → ⊥
) forms a monad. Usually you can't extract values from it, but you can certain values, like ⊥
from it (if you derive a contradiction in classical logic monad, you have a contradiction). I was wondering if equality was a thing that could be extracted.