Theorem: CompHausLike.mono_iff_injective
File: Mathlib/Topology/Category/CompHausLike/Basic.lean

tactic: constructor
state_before: P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
⊢ Mono f ↔ Function.Injective ⇑f
state_after: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
⊢ Mono f → Function.Injective ⇑f

case mpr
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
⊢ Function.Injective ⇑f → Mono f

tactic: intro hf x₁ x₂ h
state_before: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
⊢ Mono f → Function.Injective ⇑f
state_after: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
⊢ x₁ = x₂

tactic: let g₁ : X ⟶ X := ⟨fun _ => x₁, continuous_const⟩
state_before: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
⊢ x₁ = x₂
state_after: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
⊢ x₁ = x₂

tactic: let g₂ : X ⟶ X := ⟨fun _ => x₂, continuous_const⟩
state_before: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
⊢ x₁ = x₂
state_after: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
g₂ : X ⟶ X := { toFun := fun x => x₂, continuous_toFun := ⋯ }
⊢ x₁ = x₂

tactic: have : g₁ ≫ f = g₂ ≫ f := by ext; exact h
state_before: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
g₂ : X ⟶ X := { toFun := fun x => x₂, continuous_toFun := ⋯ }
⊢ x₁ = x₂
state_after: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
g₂ : X ⟶ X := { toFun := fun x => x₂, continuous_toFun := ⋯ }
this : g₁ ≫ f = g₂ ≫ f
⊢ x₁ = x₂

tactic: exact ContinuousMap.congr_fun ((cancel_mono _).mp this) x₁
state_before: case mp
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
g₂ : X ⟶ X := { toFun := fun x => x₂, continuous_toFun := ⋯ }
this : g₁ ≫ f = g₂ ≫ f
⊢ x₁ = x₂
state_after: no goals

tactic: ext
state_before: P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
g₂ : X ⟶ X := { toFun := fun x => x₂, continuous_toFun := ⋯ }
⊢ g₁ ≫ f = g₂ ≫ f
state_after: case w
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
g₂ : X ⟶ X := { toFun := fun x => x₂, continuous_toFun := ⋯ }
x✝ : (forget (CompHausLike P)).obj X
⊢ (g₁ ≫ f) x✝ = (g₂ ≫ f) x✝

tactic: exact h
state_before: case w
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
hf : Mono f
x₁ x₂ : (forget (CompHausLike P)).obj X
h : f x₁ = f x₂
g₁ : X ⟶ X := { toFun := fun x => x₁, continuous_toFun := ⋯ }
g₂ : X ⟶ X := { toFun := fun x => x₂, continuous_toFun := ⋯ }
x✝ : (forget (CompHausLike P)).obj X
⊢ (g₁ ≫ f) x✝ = (g₂ ≫ f) x✝
state_after: no goals

tactic: rw [← CategoryTheory.mono_iff_injective]
state_before: case mpr
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
⊢ Function.Injective ⇑f → Mono f
state_after: case mpr
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
⊢ Mono ⇑f → Mono f

tactic: apply (forget (CompHausLike P)).mono_of_mono_map
state_before: case mpr
P : TopCat → Prop
X✝ : Type u
inst✝³ : TopologicalSpace X✝
inst✝² : CompactSpace X✝
inst✝¹ : T2Space X✝
inst✝ : HasProp P X✝
X Y : CompHausLike P
f : X ⟶ Y
⊢ Mono ⇑f → Mono f
state_after: no goals