@@ -77,6 +77,7 @@ theorem ker_mk_eq (r : Setoid α) : ker (@Quotient.mk'' _ r) = r :=
7777theorem ker_apply_mk_out {f : α → β} (a : α) : f (⟦a⟧ : Quotient (Setoid.ker f)).out = f a :=
7878 @Quotient.mk_out _ (Setoid.ker f) a
7979
80+ @[simp]
8081theorem ker_def {f : α → β} {x y : α} : ker f x y ↔ f x = f y :=
8182 Iff.rfl
8283
@@ -314,38 +315,56 @@ theorem lift_unique {r : Setoid α} {f : α → β} (H : r ≤ ker f) (g : Quoti
314315 ext ⟨x⟩
315316 rw [← Quotient.mk, Quotient.lift_mk f H, Hg, Function.comp_apply, Quotient.mk''_eq_mk]
316317
318+ /-- Given a function `f`, lift it to the quotient by its kernel. -/
319+ def kerLift (f : α → β) : Quotient (ker f) → β :=
320+ Quotient.lift f fun _ _ ↦ id
321+
322+ @[simp]
323+ theorem kerLift_mk (f : α → β) (x : α) : kerLift f ⟦x⟧ = f x :=
324+ rfl
325+
317326/-- Given a map f from α to β, the natural map from the quotient of α by the kernel of f is
318327injective. -/
319- theorem ker_lift_injective (f : α → β) : Injective (@Quotient.lift _ _ (ker f) f fun _ _ h => h) :=
328+ theorem kerLift_injective (f : α → β) : Injective <| kerLift f :=
320329 fun x y => Quotient.inductionOn₂' x y fun _ _ h => Quotient.sound' h
321330
331+ @[deprecated (since := "2025-10-11")] alias ker_lift_injective := kerLift_injective
332+
322333/-- Given a map f from α to β, the kernel of f is the unique equivalence relation on α whose
323334induced map from the quotient of α to β is injective. -/
324- theorem ker_eq_lift_of_injective {r : Setoid α} (f : α → β) (H : ∀ x y, r x y → f x = f y )
335+ theorem ker_eq_lift_of_injective {r : Setoid α} (f : α → β) (H : r ≤ ker f )
325336 (h : Injective (Quotient.lift f H)) : ker f = r :=
326337 le_antisymm
327338 (fun x y hk =>
328339 Quotient.exact <| h <| show Quotient.lift f H ⟦x⟧ = Quotient.lift f H ⟦y⟧ from hk)
329340 H
330341
342+ theorem lift_injective_iff_ker_eq_of_le {r : Setoid α} {f : α → β}
343+ (hle : r ≤ ker f) : Injective (Quotient.lift f hle) ↔ ker f = r :=
344+ ⟨ker_eq_lift_of_injective f hle, fun h ↦ h ▸ kerLift_injective _⟩
345+
331346variable (r : Setoid α) (f : α → β)
332347
348+ /-- The image of `f` lifted to the quotient by its kernel is equal to the image of `f` itself. -/
349+ @[simp] theorem range_kerLift_eq_range : Set.range (kerLift f) = Set.range f :=
350+ Set.range_quotient_lift (s := ker f) _
351+
352+ /-- The quotient of `α` by the kernel of a function `f`
353+ bijects with the image of `f` lifted to the quotient. -/
354+ noncomputable def quotientKerEquivRangeKerLift : Quotient (ker f) ≃ Set.range (kerLift f) :=
355+ .ofInjective _ <| kerLift_injective _
356+
333357/-- The first isomorphism theorem for sets: the quotient of α by the kernel of a function f
334358bijects with f's image. -/
335359noncomputable def quotientKerEquivRange : Quotient (ker f) ≃ Set.range f :=
336- Equiv.ofBijective
337- ((@Quotient.lift _ (Set.range f) (ker f) fun x => ⟨f x, Set.mem_range_self x⟩) fun _ _ h =>
338- Subtype.ext h)
339- ⟨fun x y h => ker_lift_injective f <| by rcases x with ⟨⟩; rcases y with ⟨⟩; injections,
340- fun ⟨_, z, hz⟩ =>
341- ⟨@Quotient.mk'' _ (ker f) z, Subtype.ext_iff.2 hz⟩⟩
360+ quotientKerEquivRangeKerLift _ |>.trans <| .setCongr <| range_kerLift_eq_range _
342361
343362/-- If `f` has a computable right-inverse, then the quotient by its kernel is equivalent to its
344363domain. -/
345364@[simps]
346365def quotientKerEquivOfRightInverse (g : β → α) (hf : Function.RightInverse g f) :
347366 Quotient (ker f) ≃ β where
348- toFun a := (Quotient.liftOn' a f) fun _ _ => id
367+ toFun := kerLift f
349368 invFun b := Quotient.mk'' (g b)
350369 left_inv a := Quotient.inductionOn' a fun a => Quotient.sound' <| hf (f a)
351370 right_inv := hf
0 commit comments