Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit b31c30d

Browse files
committed
refactor(logic/function): constructive proof of cantor_injective
1 parent 54df4d9 commit b31c30d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

logic/function.lean

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ theorem cantor_surjective {α} (f : α → α → Prop) : ¬ function.surjective
4545
let ⟨D, e⟩ := h (λ a, ¬ f a a) in
4646
(iff_not_self (f D D)).1 $ iff_of_eq (congr_fun e D)
4747

48+
theorem cantor_injective {α : Type*} (f : (α → Prop) → α) :
49+
¬ function.injective f | i :=
50+
cantor_surjective (λ a b, ∀ U, a = f U → U b) $
51+
surjective_of_has_right_inverse ⟨f, λ U, funext $
52+
λ a, propext ⟨λ h, h U rfl, λ h' U' e, i e ▸ h'⟩⟩
53+
4854
/-- `g` is a partial inverse to `f` (an injective but not necessarily
4955
surjective function) if `g y = some x` implies `f x = y`, and `g y = none`
5056
implies that `y` is not in the range of `f`. -/
@@ -135,10 +141,6 @@ lemma injective_iff_has_left_inverse : injective f ↔ has_left_inverse f :=
135141

136142
end inv_fun
137143

138-
theorem cantor_injective {α : Type*} (f : (α → Prop) → α) : ¬ function.injective f | h :=
139-
cantor_surjective (inv_fun f) $
140-
surjective_of_has_right_inverse ⟨f, left_inverse_inv_fun h⟩
141-
142144
section surj_inv
143145
variables {α : Sort u} {β : Sort v} {f : α → β}
144146

0 commit comments

Comments
 (0)