Open
Description
If we can prove ¬ ((n : ℕ) → ¬ P n)
for some decidable property P
we can get ∃ P
{-# TERMINATING #-}
enumerable : ∀ {p} {P : Pred ℕ p} → Decidable {A = ℕ} P → ¬ ((n : ℕ) → ¬ P n) → ∃ P
enumerable {P = P} dec f with dec zero
... | yes p[zero] = zero , p[zero]
... | no ¬p[zero] with enumerable {P = P ∘ suc} (dec ∘ suc) λ n→P[1+n] → f λ {zero → ¬p[zero]; (suc n) → n→P[1+n] n}
... | n , p[n] = suc n , p[n]
The question becomes if this function terminates:
- According to rules of classical logic it does
- According to rules of intuitionistic logic it is unprovable that it does terminate from what I understand
This property is much weaker than double negation axiom:
- It works only for enumerable sets
- It works only for decidable properties
- It is however 'safer' than double negation in agda as value is not a ⊥