File: Mathlib/CategoryTheory/Category/PartialFun.lean

full_name: PartialFun
code: /-- The category of types equipped with partial functions. -/
def PartialFun : Type _ 
goal: Type (u_3 + 1)

full_name: PartialFun.instCoeSortType
code: instance : CoeSort PartialFun Type* 
goal: CoeSort PartialFun (Type u_3)

full_name: PartialFun.of
code: /-- Turns a type into a `PartialFun`. -/
def of : Type* → PartialFun 
goal: Type u_3 → PartialFun

full_name: PartialFun.instInhabited
code: instance : Inhabited PartialFun 
goal: Inhabited PartialFun

full_name: PartialFun.largeCategory
code: instance largeCategory : LargeCategory.{u} PartialFun 
goal: CategoryTheory.LargeCategory PartialFun

full_name: PartialFun.Iso.mk_inv
code: /-- Constructs a partial function isomorphism between types from an equivalence between them. -/
@[simps]
def Iso.mk {α β : PartialFun.{u}} (e : α ≃ β) : α ≅ β 
goal: (PartialFun.Iso.mk e).inv x = ↑(some (e.symm x))

full_name: PartialFun.Iso.mk
code: /-- Constructs a partial function isomorphism between types from an equivalence between them. -/
@[simps]
def Iso.mk {α β : PartialFun.{u}} (e : α ≃ β) : α ≅ β 
goal: α ≅ β

full_name: PartialFun.Iso.mk_hom
code: /-- Constructs a partial function isomorphism between types from an equivalence between them. -/
@[simps]
def Iso.mk {α β : PartialFun.{u}} (e : α ≃ β) : α ≅ β 
goal: (PartialFun.Iso.mk e).hom x = ↑(some (e x))

full_name: typeToPartialFun
code: /-- The forgetful functor from `Type` to `PartialFun` which forgets that the maps are total. -/
def typeToPartialFun : Type u ⥤ PartialFun 
goal: Type u ⥤ PartialFun

full_name: instFaithfulPartialFunTypeToPartialFun
code: instance : typeToPartialFun.Faithful 
goal: typeToPartialFun.Faithful

full_name: pointedToPartialFun_map
code: /-- The functor which deletes the point of a pointed type. In return, this makes the maps partial.
This is the computable part of the equivalence `PartialFunEquivPointed`. -/
@[simps obj map]
def pointedToPartialFun : Pointed.{u} ⥤ PartialFun 
goal: ∀ {X Y : Pointed} (f : X ⟶ Y) (a : { x // x ≠ X.point }),
  pointedToPartialFun.map f a = (PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val) a

full_name: pointedToPartialFun
code: /-- The functor which deletes the point of a pointed type. In return, this makes the maps partial.
This is the computable part of the equivalence `PartialFunEquivPointed`. -/
@[simps obj map]
def pointedToPartialFun : Pointed.{u} ⥤ PartialFun 
goal: Pointed ⥤ PartialFun

full_name: pointedToPartialFun_obj
code: /-- The functor which deletes the point of a pointed type. In return, this makes the maps partial.
This is the computable part of the equivalence `PartialFunEquivPointed`. -/
@[simps obj map]
def pointedToPartialFun : Pointed.{u} ⥤ PartialFun 
goal: pointedToPartialFun.obj X = { x // x ≠ X.point }

full_name: partialFunToPointed_obj
code: /-- The functor which maps undefined values to a new point. This makes the maps total and creates
pointed types. This is the noncomputable part of the equivalence `PartialFunEquivPointed`. It can't
be computable because `= Option.none` is decidable while the domain of a general `Part` isn't. -/
@[simps obj map]
noncomputable def partialFunToPointed : PartialFun ⥤ Pointed 
goal: partialFunToPointed.obj X = { X := Option X, point := none }

full_name: partialFunToPointed
code: /-- The functor which maps undefined values to a new point. This makes the maps total and creates
pointed types. This is the noncomputable part of the equivalence `PartialFunEquivPointed`. It can't
be computable because `= Option.none` is decidable while the domain of a general `Part` isn't. -/
@[simps obj map]
noncomputable def partialFunToPointed : PartialFun ⥤ Pointed 
goal: PartialFun ⥤ Pointed

full_name: partialFunToPointed_map
code: /-- The functor which maps undefined values to a new point. This makes the maps total and creates
pointed types. This is the noncomputable part of the equivalence `PartialFunEquivPointed`. It can't
be computable because `= Option.none` is decidable while the domain of a general `Part` isn't. -/
@[simps obj map]
noncomputable def partialFunToPointed : PartialFun ⥤ Pointed 
goal: ∀ {X Y : PartialFun} (f : X ⟶ Y),
  partialFunToPointed.map f = { toFun := Option.elim' none fun a => (f a).toOption, map_point := ⋯ }

full_name: partialFunEquivPointed_inverse_map_get_coe
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: ∀ {X Y : Pointed} (f : X ⟶ Y) (a : { x // x ≠ X.point }) (property : f.toFun ↑a ≠ Y.point),
  ↑((partialFunEquivPointed.inverse.map f a).get property) = f.toFun ↑a

full_name: partialFunEquivPointed_functor_obj_X
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: (partialFunEquivPointed.functor.obj X).X = Option X

full_name: partialFunEquivPointed
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: PartialFun ≌ Pointed

full_name: partialFunEquivPointed_functor_map_toFun
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: ∀ {X Y : PartialFun} (f : X ⟶ Y) (a : Option X),
  (partialFunEquivPointed.functor.map f).toFun a = Option.elim' none (fun a => (f a).toOption) a

full_name: partialFunEquivPointed_functor_obj_point
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: (partialFunEquivPointed.functor.obj X).point = none

full_name: partialFunEquivPointed_inverse_map_Dom
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: ∀ {X Y : Pointed} (f : X ⟶ Y) (a : { x // x ≠ X.point }),
  (partialFunEquivPointed.inverse.map f a).Dom = ¬f.toFun ↑a = Y.point

full_name: partialFunEquivPointed_unitIso_hom_app
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: partialFunEquivPointed.unitIso.hom.app X =
  (PartialFun.Iso.mk
        { toFun := fun a => ⟨some a, ⋯⟩, invFun := fun a => (↑a).get ⋯, left_inv := ⋯, right_inv := ⋯ }).hom ≫
    pointedToPartialFun.map (Pointed.Iso.mk (Equiv.optionSubtypeNe none) ⋯).inv ≫
      pointedToPartialFun.map { toFun := Option.elim' none fun a => ↑a, map_point := ⋯ }

full_name: partialFunEquivPointed_counitIso_hom_app_toFun
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: (partialFunEquivPointed.counitIso.hom.app X).toFun a = Option.casesOn' a X.point Subtype.val

full_name: partialFunEquivPointed_inverse_obj
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: partialFunEquivPointed.inverse.obj X = { x // ¬x = X.point }

full_name: partialFunEquivPointed_unitIso_inv_app
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: partialFunEquivPointed.unitIso.inv.app X =
  pointedToPartialFun.map { toFun := Option.elim' none fun a => some ⟨some a, ⋯⟩, map_point := ⋯ } ≫
    pointedToPartialFun.map (Pointed.Iso.mk (Equiv.optionSubtypeNe none) ⋯).hom ≫
      (PartialFun.Iso.mk
          { toFun := fun a => ⟨some a, ⋯⟩, invFun := fun a => (↑a).get ⋯, left_inv := ⋯, right_inv := ⋯ }).inv

full_name: partialFunEquivPointed_counitIso_inv_app_toFun
code: /-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed 
goal: (partialFunEquivPointed.counitIso.inv.app X).toFun a = if h : a = X.point then none else some ⟨a, h⟩

full_name: typeToPartialFunIsoPartialFunToPointed_hom_app_toFun
code: /-- Forgetting that maps are total and making them total again by adding a point is the same as just
adding a point. -/
@[simps!]
noncomputable def typeToPartialFunIsoPartialFunToPointed :
    typeToPartialFun ⋙ partialFunToPointed ≅ typeToPointed 
goal: (typeToPartialFunIsoPartialFunToPointed.hom.app X).toFun a = a

full_name: typeToPartialFunIsoPartialFunToPointed
code: /-- Forgetting that maps are total and making them total again by adding a point is the same as just
adding a point. -/
@[simps!]
noncomputable def typeToPartialFunIsoPartialFunToPointed :
    typeToPartialFun ⋙ partialFunToPointed ≅ typeToPointed 
goal: typeToPartialFun ⋙ partialFunToPointed ≅ typeToPointed

full_name: typeToPartialFunIsoPartialFunToPointed_inv_app_toFun
code: /-- Forgetting that maps are total and making them total again by adding a point is the same as just
adding a point. -/
@[simps!]
noncomputable def typeToPartialFunIsoPartialFunToPointed :
    typeToPartialFun ⋙ partialFunToPointed ≅ typeToPointed 
goal: (typeToPartialFunIsoPartialFunToPointed.inv.app X).toFun a = a