Theorem: isClosedMap_iff_isClosedMap_of_iSup_eq_top
File: Mathlib/Topology/LocalAtTarget.lean

tactic: refine' ⟨fun h i => Set.restrictPreimage_isClosedMap _ h, _⟩
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
⊢ IsClosedMap f ↔ ∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)

tactic: rintro H s hs
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
⊢ (∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)) → IsClosedMap f

tactic: rw [isClosed_iff_coe_preimage_of_iSup_eq_top hU]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
H : ∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)
s : Set α
hs : IsClosed s
⊢ IsClosed (f '' s)

tactic: intro i
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
H : ∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)
s : Set α
hs : IsClosed s
⊢ ∀ (i : ι), IsClosed (Subtype.val ⁻¹' (f '' s))

tactic: convert H i _ ⟨⟨_, hs.1, eq_compl_comm.mpr rfl⟩⟩
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
H : ∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)
s : Set α
hs : IsClosed s
i : ι
⊢ IsClosed (Subtype.val ⁻¹' (f '' s))

tactic: ext ⟨x, hx⟩
state_before: case h.e'_3.h
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
H : ∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)
s : Set α
hs : IsClosed s
i : ι
e_1✝ : { x // x ∈ U i } = ↑(U i).carrier
⊢ Subtype.val ⁻¹' (f '' s) = restrictPreimage (U i).carrier f '' (Subtype.val ⁻¹' sᶜ)ᶜ

tactic: suffices (∃ y, y ∈ s ∧ f y = x) ↔ ∃ y, y ∈ s ∧ f y ∈ U i ∧ f y = x by
  simpa [Set.restrictPreimage, ← Subtype.coe_inj]
state_before: case h.e'_3.h.h.mk
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
H : ∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)
s : Set α
hs : IsClosed s
i : ι
e_1✝ : { x // x ∈ U i } = ↑(U i).carrier
x : β
hx : x ∈ U i
⊢ { val := x, property := hx } ∈ Subtype.val ⁻¹' (f '' s) ↔
    { val := x, property := hx } ∈ restrictPreimage (U i).carrier f '' (Subtype.val ⁻¹' sᶜ)ᶜ

tactic: exact ⟨fun ⟨a, b, c⟩ => ⟨a, b, c.symm ▸ hx, c⟩, fun ⟨a, b, _, c⟩ => ⟨a, b, c⟩⟩
state_before: case h.e'_3.h.h.mk
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
H : ∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)
s : Set α
hs : IsClosed s
i : ι
e_1✝ : { x // x ∈ U i } = ↑(U i).carrier
x : β
hx : x ∈ U i
⊢ (∃ y, y ∈ s ∧ f y = x) ↔ ∃ y, y ∈ s ∧ f y ∈ U i ∧ f y = x

tactic: simpa [Set.restrictPreimage, ← Subtype.coe_inj]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s✝ : Set β
ι : Type ?u.21339
U : ι → Opens β
hU : iSup U = ⊤
H : ∀ (i : ι), IsClosedMap (restrictPreimage (U i).carrier f)
s : Set α
hs : IsClosed s
i : ι
e_1✝ : { x // x ∈ U i } = ↑(U i).carrier
x : β
hx : x ∈ U i
this : (∃ y, y ∈ s ∧ f y = x) ↔ ∃ y, y ∈ s ∧ f y ∈ U i ∧ f y = x
⊢ { val := x, property := hx } ∈ Subtype.val ⁻¹' (f '' s) ↔
    { val := x, property := hx } ∈ restrictPreimage (U i).carrier f '' (Subtype.val ⁻¹' sᶜ)ᶜ