Skip to content

Instantly share code, notes, and snippets.

@clayrat
Created August 23, 2022 12:33
Show Gist options
  • Save clayrat/1ea0b3db820dec16bc6806cb10081c49 to your computer and use it in GitHub Desktop.
Save clayrat/1ea0b3db820dec16bc6806cb10081c49 to your computer and use it in GitHub Desktop.
From Coq Require Import ssreflect ssrbool ssrfun Logic.FunctionalExtensionality.
From mathcomp Require Import ssrnat.
Definition surjection {X Y : Type} (f : X -> Y) :=
forall y, exists x, f x = y.
Theorem nat_endomorphisms_are_uncountable :
~ exists (f : nat -> (nat -> nat)), surjection f.
Proof.
case=>f Hf.
case: (Hf (fun n => (f n n).+1))=>x /equal_f /(_ x) Hctra.
by move: (ltnSn (f x x)); rewrite {1}Hctra ltnn.
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment