Theorem: Set.powerset_insert
File: Mathlib/Data/Set/Image.lean

tactic: ext t
state_before: α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
⊢ 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s

tactic: simp_rw [mem_union, mem_image, mem_powerset_iff]
state_before: case h
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
⊢ t ∈ 𝒫 insert a s ↔ t ∈ 𝒫 s ∪ insert a '' 𝒫 s

tactic: constructor
state_before: case h
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
⊢ t ⊆ insert a s ↔ t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t

tactic: intro h
state_before: case h.mp
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
⊢ t ⊆ insert a s → t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t

tactic: by_cases hs : a ∈ t
state_before: case h.mp
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ insert a s
⊢ t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t

tactic: right
state_before: case pos
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ insert a s
hs : a ∈ t
⊢ t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t

tactic: refine' ⟨t \ {a}, _, _⟩
state_before: case pos.h
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ insert a s
hs : a ∈ t
⊢ ∃ x, x ⊆ s ∧ insert a x = t

tactic: rw [diff_singleton_subset_iff]
state_before: case pos.h.refine'_1
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ insert a s
hs : a ∈ t
⊢ t \ {a} ⊆ s

tactic: assumption
state_before: case pos.h.refine'_1
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ insert a s
hs : a ∈ t
⊢ t ⊆ insert a s

tactic: rw [insert_diff_singleton, insert_eq_of_mem hs]
state_before: case pos.h.refine'_2
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ insert a s
hs : a ∈ t
⊢ insert a (t \ {a}) = t

tactic: left
state_before: case neg
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ insert a s
hs : ¬a ∈ t
⊢ t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t

tactic: exact (subset_insert_iff_of_not_mem hs).mp h
state_before: case neg.h
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ insert a s
hs : ¬a ∈ t
⊢ t ⊆ s

tactic: rintro (h | ⟨s', h₁, rfl⟩)
state_before: case h.mpr
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
⊢ (t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t) → t ⊆ insert a s

tactic: exact subset_trans h (subset_insert a s)
state_before: case h.mpr.inl
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
t : Set α
h : t ⊆ s
⊢ t ⊆ insert a s

tactic: exact insert_subset_insert h₁
state_before: case h.mpr.inr.intro.intro
α : Type u_1
β : Type ?u.61243
γ : Type ?u.61246
ι : Sort ?u.61249
ι' : Sort ?u.61252
s : Set α
a : α
s' : Set α
h₁ : s' ⊆ s
⊢ insert a s' ⊆ insert a s