Theorem: Function.not_surjective_Type
File: Mathlib/Logic/Function/Basic.lean

tactic: intro hf
state_before: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
⊢ ¬Surjective f
state_after: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
⊢ False

tactic: let T : Type max u v := Sigma f
state_before: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
⊢ False
state_after: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
⊢ False

tactic: let g : Set T → T := fun s ↦ ⟨U, cast hU.symm s⟩
state_before: case intro
α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
⊢ False
state_after: case intro
α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
⊢ False

tactic: exact cantor_injective g hg
state_before: case intro
α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
hg : Injective g
⊢ False
state_after: no goals

tactic: intro s t h
state_before: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
⊢ Injective g
state_after: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
s t : Set T
h : g s = g t
⊢ s = t

tactic: suffices cast hU (g s).2 = cast hU (g t).2 by
  simp only [cast_cast, cast_eq] at this
  assumption
state_before: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
s t : Set T
h : g s = g t
⊢ s = t
state_after: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
s t : Set T
h : g s = g t
⊢ cast hU (g s).snd = cast hU (g t).snd

tactic: simp only [cast_cast, cast_eq] at this
state_before: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
s t : Set T
h : g s = g t
this : cast hU (g s).snd = cast hU (g t).snd
⊢ s = t
state_after: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
s t : Set T
h : g s = g t
this : s = t
⊢ s = t

tactic: assumption
state_before: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
s t : Set T
h : g s = g t
this : s = t
⊢ s = t
state_after: no goals

tactic: congr
state_before: α✝ : Sort u_1
β : Sort u_2
γ : Sort u_3
f✝ : α✝ → β
α : Type u
f : α → Type (max u v)
hf : Surjective f
T : Type (max u v) := Sigma f
U : α
hU : f U = Set T
g : Set T → T := fun s => ⟨U, cast ⋯ s⟩
s t : Set T
h : g s = g t
⊢ cast hU (g s).snd = cast hU (g t).snd
state_after: no goals