Theorem: image_subtype_univ_ssubset_image_univ
File: Mathlib/Data/Fintype/Sum.lean

tactic: constructor
state_before: α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
k : β
b : α → β
hk : k ∈ image b univ
p : β → Prop
inst✝ : DecidablePred p
hp : ¬p k
⊢ image (fun i => b ↑i) univ ⊂ image b univ

tactic: intro x hx
state_before: case left
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
k : β
b : α → β
hk : k ∈ image b univ
p : β → Prop
inst✝ : DecidablePred p
hp : ¬p k
⊢ image (fun i => b ↑i) univ ⊆ image b univ

tactic: rcases mem_image.1 hx with ⟨y, _, hy⟩
state_before: case left
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
k : β
b : α → β
hk : k ∈ image b univ
p : β → Prop
inst✝ : DecidablePred p
hp : ¬p k
x : β
hx : x ∈ image (fun i => b ↑i) univ
⊢ x ∈ image b univ

tactic: exact hy ▸ mem_image_of_mem b (mem_univ (y : α))
state_before: case left.intro.intro
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
k : β
b : α → β
hk : k ∈ image b univ
p : β → Prop
inst✝ : DecidablePred p
hp : ¬p k
x : β
hx : x ∈ image (fun i => b ↑i) univ
y : { a // p (b a) }
left✝ : y ∈ univ
hy : b ↑y = x
⊢ x ∈ image b univ

tactic: intro h
state_before: case right
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
k : β
b : α → β
hk : k ∈ image b univ
p : β → Prop
inst✝ : DecidablePred p
hp : ¬p k
⊢ ¬image b univ ⊆ image (fun i => b ↑i) univ

tactic: rw [mem_image] at hk
state_before: case right
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
k : β
b : α → β
hk : k ∈ image b univ
p : β → Prop
inst✝ : DecidablePred p
hp : ¬p k
h : image b univ ⊆ image (fun i => b ↑i) univ
⊢ False

tactic: rcases hk with ⟨k', _, hk'⟩
state_before: case right
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
k : β
b : α → β
hk : ∃ a, a ∈ univ ∧ b a = k
p : β → Prop
inst✝ : DecidablePred p
hp : ¬p k
h : image b univ ⊆ image (fun i => b ↑i) univ
⊢ False

tactic: subst hk'
state_before: case right.intro.intro
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
k : β
b : α → β
p : β → Prop
inst✝ : DecidablePred p
hp : ¬p k
h : image b univ ⊆ image (fun i => b ↑i) univ
k' : α
left✝ : k' ∈ univ
hk' : b k' = k
⊢ False

tactic: have := h (mem_image_of_mem b (mem_univ k'))
state_before: case right.intro.intro
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
b : α → β
p : β → Prop
inst✝ : DecidablePred p
h : image b univ ⊆ image (fun i => b ↑i) univ
k' : α
left✝ : k' ∈ univ
hp : ¬p (b k')
⊢ False

tactic: rw [mem_image] at this
state_before: case right.intro.intro
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
b : α → β
p : β → Prop
inst✝ : DecidablePred p
h : image b univ ⊆ image (fun i => b ↑i) univ
k' : α
left✝ : k' ∈ univ
hp : ¬p (b k')
this : b k' ∈ image (fun i => b ↑i) univ
⊢ False

tactic: rcases this with ⟨j, _, hj'⟩
state_before: case right.intro.intro
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
b : α → β
p : β → Prop
inst✝ : DecidablePred p
h : image b univ ⊆ image (fun i => b ↑i) univ
k' : α
left✝ : k' ∈ univ
hp : ¬p (b k')
this : ∃ a, a ∈ univ ∧ b ↑a = b k'
⊢ False

tactic: exact hp (hj' ▸ j.2)
state_before: case right.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : Fintype α
inst✝¹ : DecidableEq β
b : α → β
p : β → Prop
inst✝ : DecidablePred p
h : image b univ ⊆ image (fun i => b ↑i) univ
k' : α
left✝¹ : k' ∈ univ
hp : ¬p (b k')
j : { a // p (b a) }
left✝ : j ∈ univ
hj' : b ↑j = b k'
⊢ False