7
$\begingroup$

Can one create such function in Agda ?

ℕ→ℕ-undecidable : ¬ ( (f g :  ℕ → ℕ ) → Dec (f ≡ g)) 
ℕ→ℕ-undecidable = ?

I am particularly interested in proof using cubical Agda.

$\endgroup$

2 Answers 2

11
$\begingroup$

ℕ→ℕ-undecidable is not provable in Agda. If we postulate the law of excluded middle (LEM), it follows that equality on every set is decidable, contradicting ℕ→ℕ-undecidable. Since Agda is consistent with LEM, it follows that ℕ→ℕ-undecidable is not provable in base Agda. This holds the same for cubical and vanilla Agda.

$\endgroup$
2
  • $\begingroup$ What about coq? Is it possible to prove it there? $\endgroup$ Commented Sep 5, 2019 at 9:11
  • 2
    $\begingroup$ @srghma no, the same thing holds for Coq. Consistency with LEM (classical logic) is a common expected feature in proof assistants. $\endgroup$ Commented Sep 5, 2019 at 17:47
0
$\begingroup$

The flag --injective-type-constructors makes Agda anti-classical. The proof of this can be seen here. See also this question on the Proof Assitants StackExchange.

$\endgroup$
2
  • $\begingroup$ I think you misinterpreted the question as talking about the type of types, but it is actually talking about a specific type. $\endgroup$ Commented Aug 29, 2024 at 10:02
  • $\begingroup$ @Trebor oh, right, the title talks about decidable equality in general, while the text is specifically about natural numbers $\endgroup$ Commented Aug 30, 2024 at 5:40

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.