File: Mathlib/CategoryTheory/FiberedCategory/HomLift.lean

full_name: CategoryTheory.IsHomLiftAux
code: /-- Helper-type for defining `IsHomLift`. -/
inductive IsHomLiftAux : ∀ {R S : 𝒮} {a b : 𝒳} (_ : R ⟶ S) (_ : a ⟶ b), Prop
  | map {a b : 𝒳} (φ : a ⟶ b) : IsHomLiftAux (p.map φ) φ
goal: (R ⟶ S) → (a ⟶ b) → Prop

full_name: CategoryTheory.IsHomLiftAux.map
code: /-- Helper-type for defining `IsHomLift`. -/
inductive IsHomLiftAux : ∀ {R S : 𝒮} {a b : 𝒳} (_ : R ⟶ S) (_ : a ⟶ b), Prop
  | map {a b : 𝒳} (φ : a ⟶ b) : IsHomLiftAux (p.map φ) φ
goal: CategoryTheory.IsHomLiftAux p (p.map φ) φ

full_name: CategoryTheory.Functor.IsHomLift.cond
code: /-- Given a functor `p : 𝒳 ⥤ 𝒮`, an arrow `φ : a ⟶ b` in `𝒳` and an arrow `f : R ⟶ S` in `𝒮`,
`p.IsHomLift f φ` expresses the fact that `φ` lifts `f` through `p`.
This is often drawn as:
```
  a --φ--> b
  -        -
  |        |
  v        v
  R --f--> S
``` -/
class Functor.IsHomLift {R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) : Prop where
  cond : IsHomLiftAux p f φ
goal: CategoryTheory.IsHomLiftAux p f φ

full_name: CategoryTheory.Functor.IsHomLift
code: /-- Given a functor `p : 𝒳 ⥤ 𝒮`, an arrow `φ : a ⟶ b` in `𝒳` and an arrow `f : R ⟶ S` in `𝒮`,
`p.IsHomLift f φ` expresses the fact that `φ` lifts `f` through `p`.
This is often drawn as:
```
  a --φ--> b
  -        -
  |        |
  v        v
  R --f--> S
``` -/
class Functor.IsHomLift {R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) : Prop where
  cond : IsHomLiftAux p f φ
goal: Prop

full_name: CategoryTheory._aux_Mathlib_CategoryTheory_FiberedCategory_HomLift___macroRules_CategoryTheory_tacticSubst_hom_lift____1
code: macro "subst_hom_lift" p:ident f:ident φ:ident : tactic =>
  `(tactic| obtain ⟨⟩ := Functor.IsHomLift.cond (p := $p) (f := $f) (φ := $φ))
goal: Lean.Macro

full_name: CategoryTheory.tacticSubst_hom_lift___
code: macro "subst_hom_lift" p:ident f:ident φ:ident : tactic =>
  `(tactic| obtain ⟨⟩ := Functor.IsHomLift.cond (p := $p) (f := $f) (φ := $φ))
goal: Lean.ParserDescr

full_name: CategoryTheory.instIsHomLiftMap
code: /-- For any arrow `φ : a ⟶ b` in `𝒳`, `φ` lifts the arrow `p.map φ` in the base `𝒮`-/
@[simp]
instance {a b : 𝒳} (φ : a ⟶ b) : p.IsHomLift (p.map φ) φ 
goal: p.IsHomLift (p.map φ) φ

full_name: CategoryTheory.instIsHomLiftIdObj
code: @[simp]
instance (a : 𝒳) : p.IsHomLift (𝟙 (p.obj a)) (𝟙 a) 
goal: p.IsHomLift (𝟙 (p.obj a)) (𝟙 a)

full_name: CategoryTheory.IsHomLift.id
code: protected lemma id {p : 𝒳 ⥤ 𝒮} {R : 𝒮} {a : 𝒳} (ha : p.obj a = R) : p.IsHomLift (𝟙 R) (𝟙 a) 
goal: p.IsHomLift (𝟙 R) (𝟙 a)

full_name: CategoryTheory.IsHomLift.domain_eq
code: lemma domain_eq (f : R ⟶ S) (φ : a ⟶ b) [p.IsHomLift f φ] : p.obj a = R 
goal: p.obj a = R

full_name: CategoryTheory.IsHomLift.codomain_eq
code: lemma codomain_eq (f : R ⟶ S) (φ : a ⟶ b) [p.IsHomLift f φ] : p.obj b = S 
goal: p.obj b = S

full_name: CategoryTheory.IsHomLift.fac
code: lemma fac : f = eqToHom (domain_eq p f φ).symm ≫ p.map φ ≫ eqToHom (codomain_eq p f φ) 
goal: f = CategoryTheory.eqToHom ⋯ ≫ p.map φ ≫ CategoryTheory.eqToHom ⋯

full_name: CategoryTheory.IsHomLift.fac'
code: lemma fac' : p.map φ = eqToHom (domain_eq p f φ) ≫ f ≫ eqToHom (codomain_eq p f φ).symm 
goal: p.map φ = CategoryTheory.eqToHom ⋯ ≫ f ≫ CategoryTheory.eqToHom ⋯

full_name: CategoryTheory.IsHomLift.commSq
code: lemma commSq : CommSq (p.map φ) (eqToHom (domain_eq p f φ)) (eqToHom (codomain_eq p f φ)) f 
goal: CategoryTheory.CommSq (p.map φ) (CategoryTheory.eqToHom ⋯) (CategoryTheory.eqToHom ⋯) f

full_name: CategoryTheory.IsHomLift.eq_of_isHomLift
code: lemma eq_of_isHomLift {a b : 𝒳} (f : p.obj a ⟶ p.obj b) (φ : a ⟶ b) [p.IsHomLift f φ] :
    f = p.map φ 
goal: f = p.map φ

full_name: CategoryTheory.IsHomLift.of_fac
code: lemma of_fac {R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (ha : p.obj a = R) (hb : p.obj b = S)
    (h : f = eqToHom ha.symm ≫ p.map φ ≫ eqToHom hb) : p.IsHomLift f φ 
goal: p.IsHomLift f φ

full_name: CategoryTheory.IsHomLift.of_fac'
code: lemma of_fac' {R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (ha : p.obj a = R) (hb : p.obj b = S)
    (h : p.map φ = eqToHom ha ≫ f ≫ eqToHom hb.symm) : p.IsHomLift f φ 
goal: p.IsHomLift f φ

full_name: CategoryTheory.IsHomLift.of_commSq
code: lemma of_commSq {R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (ha : p.obj a = R) (hb : p.obj b = S)
    (h : CommSq (p.map φ) (eqToHom ha) (eqToHom hb) f) : p.IsHomLift f φ 
goal: p.IsHomLift f φ

full_name: CategoryTheory.IsHomLift.comp
code: instance comp {R S T : 𝒮} {a b c : 𝒳} (f : R ⟶ S) (g : S ⟶ T) (φ : a ⟶ b)
    (ψ : b ⟶ c) [p.IsHomLift f φ] [p.IsHomLift g ψ] : p.IsHomLift (f ≫ g) (φ ≫ ψ) 
goal: p.IsHomLift (f ≫ g) (φ ≫ ψ)

full_name: CategoryTheory.IsHomLift.lift_id_comp
code: /-- If `φ : a ⟶ b` and `ψ : b ⟶ c` lift `𝟙 R`, then so does `φ ≫ ψ` -/
instance lift_id_comp (R : 𝒮) {a b c : 𝒳} (φ : a ⟶ b) (ψ : b ⟶ c)
    [p.IsHomLift (𝟙 R) φ] [p.IsHomLift (𝟙 R) ψ] : p.IsHomLift (𝟙 R) (φ ≫ ψ) 
goal: p.IsHomLift (𝟙 R) (φ ≫ ψ)

full_name: CategoryTheory.IsHomLift.comp_lift_id_right
code: instance comp_lift_id_right {a b c : 𝒳} {S T : 𝒮} (f : S ⟶ T) (φ : a ⟶ b) [p.IsHomLift f φ]
    (ψ : b ⟶ c) [p.IsHomLift (𝟙 T) ψ] : p.IsHomLift f (φ ≫ ψ) 
goal: p.IsHomLift f (φ ≫ ψ)

full_name: CategoryTheory.IsHomLift.comp_lift_id_right'
code: /-- If `φ : a ⟶ b` lifts `f` and `ψ : b ⟶ c` lifts `𝟙 T`, then `φ ≫ ψ` lifts `f` -/
lemma comp_lift_id_right' {R S : 𝒮} {a b c : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) [p.IsHomLift f φ]
    (T : 𝒮) (ψ : b ⟶ c) [p.IsHomLift (𝟙 T) ψ] : p.IsHomLift f (φ ≫ ψ) 
goal: p.IsHomLift f (φ ≫ ψ)

full_name: CategoryTheory.IsHomLift.comp_lift_id_left
code: instance comp_lift_id_left {a b c : 𝒳} {S T : 𝒮} (f : S ⟶ T) (ψ : b ⟶ c) [p.IsHomLift f ψ]
    (φ : a ⟶ b) [p.IsHomLift (𝟙 S) φ] : p.IsHomLift f (φ ≫ ψ) 
goal: p.IsHomLift f (φ ≫ ψ)

full_name: CategoryTheory.IsHomLift.comp_lift_id_left'
code: /-- If `φ : a ⟶ b` lifts `𝟙 T` and `ψ : b ⟶ c` lifts `f`, then `φ  ≫ ψ` lifts `f` -/
lemma comp_lift_id_left' {a b c : 𝒳} (R : 𝒮) (φ : a ⟶ b) [p.IsHomLift (𝟙 R) φ]
    {S T : 𝒮} (f : S ⟶ T) (ψ : b ⟶ c) [p.IsHomLift f ψ] : p.IsHomLift f (φ ≫ ψ) 
goal: p.IsHomLift f (φ ≫ ψ)

full_name: CategoryTheory.IsHomLift.eqToHom_domain_lift_id
code: lemma eqToHom_domain_lift_id {p : 𝒳 ⥤ 𝒮} {a b : 𝒳} (hab : a = b) {R : 𝒮} (hR : p.obj a = R) :
    p.IsHomLift (𝟙 R) (eqToHom hab) 
goal: p.IsHomLift (𝟙 R) (CategoryTheory.eqToHom hab)

full_name: CategoryTheory.IsHomLift.eqToHom_codomain_lift_id
code: lemma eqToHom_codomain_lift_id {p : 𝒳 ⥤ 𝒮} {a b : 𝒳} (hab : a = b) {S : 𝒮} (hS : p.obj b = S) :
    p.IsHomLift (𝟙 S) (eqToHom hab) 
goal: p.IsHomLift (𝟙 S) (CategoryTheory.eqToHom hab)

full_name: CategoryTheory.IsHomLift.id_lift_eqToHom_domain
code: lemma id_lift_eqToHom_domain {p : 𝒳 ⥤ 𝒮} {R S : 𝒮} (hRS : R = S) {a : 𝒳} (ha : p.obj a = R) :
    p.IsHomLift (eqToHom hRS) (𝟙 a) 
goal: p.IsHomLift (CategoryTheory.eqToHom hRS) (𝟙 a)

full_name: CategoryTheory.IsHomLift.id_lift_eqToHom_codomain
code: lemma id_lift_eqToHom_codomain {p : 𝒳 ⥤ 𝒮} {R S : 𝒮} (hRS : R = S) {b : 𝒳} (hb : p.obj b = S) :
    p.IsHomLift (eqToHom hRS) (𝟙 b) 
goal: p.IsHomLift (CategoryTheory.eqToHom hRS) (𝟙 b)

full_name: CategoryTheory.IsHomLift.comp_eqToHom_lift
code: instance comp_eqToHom_lift {R S : 𝒮} {a' a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : a' = a)
    [p.IsHomLift f φ] : p.IsHomLift f (eqToHom h ≫ φ) 
goal: p.IsHomLift f (CategoryTheory.eqToHom h ≫ φ)

full_name: CategoryTheory.IsHomLift.eqToHom_comp_lift
code: instance eqToHom_comp_lift {R S : 𝒮} {a b b' : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : b = b')
    [p.IsHomLift f φ] : p.IsHomLift f (φ ≫ eqToHom h) 
goal: p.IsHomLift f (φ ≫ CategoryTheory.eqToHom h)

full_name: CategoryTheory.IsHomLift.lift_eqToHom_comp
code: instance lift_eqToHom_comp {R' R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : R' = R)
    [p.IsHomLift f φ] : p.IsHomLift (eqToHom h ≫ f) φ 
goal: p.IsHomLift (CategoryTheory.eqToHom h ≫ f) φ

full_name: CategoryTheory.IsHomLift.lift_comp_eqToHom
code: instance lift_comp_eqToHom {R S S' : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : S = S')
    [p.IsHomLift f φ] : p.IsHomLift (f ≫ eqToHom h) φ 
goal: p.IsHomLift (f ≫ CategoryTheory.eqToHom h) φ

full_name: CategoryTheory.IsHomLift.comp_eqToHom_lift_iff
code: @[simp]
lemma comp_eqToHom_lift_iff {R S : 𝒮} {a' a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : a' = a) :
    p.IsHomLift f (eqToHom h ≫ φ) ↔ p.IsHomLift f φ 
goal: p.IsHomLift f (CategoryTheory.eqToHom h ≫ φ) ↔ p.IsHomLift f φ

full_name: CategoryTheory.IsHomLift.eqToHom_comp_lift_iff
code: @[simp]
lemma eqToHom_comp_lift_iff {R S : 𝒮} {a b b' : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : b = b') :
    p.IsHomLift f (φ ≫ eqToHom h) ↔ p.IsHomLift f φ 
goal: p.IsHomLift f (φ ≫ CategoryTheory.eqToHom h) ↔ p.IsHomLift f φ

full_name: CategoryTheory.IsHomLift.lift_eqToHom_comp_iff
code: @[simp]
lemma lift_eqToHom_comp_iff {R' R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : R' = R) :
    p.IsHomLift (eqToHom h ≫ f) φ ↔ p.IsHomLift f φ 
goal: p.IsHomLift (CategoryTheory.eqToHom h ≫ f) φ ↔ p.IsHomLift f φ

full_name: CategoryTheory.IsHomLift.lift_comp_eqToHom_iff
code: @[simp]
lemma lift_comp_eqToHom_iff {R S S' : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : S = S') :
    p.IsHomLift (f ≫ eqToHom h) φ ↔ p.IsHomLift f φ 
goal: p.IsHomLift (f ≫ CategoryTheory.eqToHom h) φ ↔ p.IsHomLift f φ

full_name: CategoryTheory.IsHomLift.isoOfIsoLift
code: /-- Given a morphism `f : R ⟶ S`, and an isomorphism `φ : a ≅ b` lifting `f`, `isoOfIsoLift f φ` is
the isomorphism `Φ : R ≅ S` with `Φ.hom = f` induced from `φ` -/
@[simps hom]
def isoOfIsoLift (f : R ⟶ S) (φ : a ≅ b) [p.IsHomLift f φ.hom] :
    R ≅ S 
goal: R ≅ S

full_name: CategoryTheory.IsHomLift.isoOfIsoLift_hom
code: /-- Given a morphism `f : R ⟶ S`, and an isomorphism `φ : a ≅ b` lifting `f`, `isoOfIsoLift f φ` is
the isomorphism `Φ : R ≅ S` with `Φ.hom = f` induced from `φ` -/
@[simps hom]
def isoOfIsoLift (f : R ⟶ S) (φ : a ≅ b) [p.IsHomLift f φ.hom] :
    R ≅ S 
goal: (CategoryTheory.IsHomLift.isoOfIsoLift p f φ).hom = f

full_name: CategoryTheory.IsHomLift.isoOfIsoLift_inv_hom_id
code: @[simp]
lemma isoOfIsoLift_inv_hom_id (f : R ⟶ S) (φ : a ≅ b) [p.IsHomLift f φ.hom] :
    (isoOfIsoLift p f φ).inv ≫ f = 𝟙 S 
goal: (CategoryTheory.IsHomLift.isoOfIsoLift p f φ).inv ≫ f = 𝟙 S

full_name: CategoryTheory.IsHomLift.isoOfIsoLift_hom_inv_id
code: @[simp]
lemma isoOfIsoLift_hom_inv_id (f : R ⟶ S) (φ : a ≅ b) [p.IsHomLift f φ.hom] :
    f ≫ (isoOfIsoLift p f φ).inv = 𝟙 R 
goal: f ≫ (CategoryTheory.IsHomLift.isoOfIsoLift p f φ).inv = 𝟙 R

full_name: CategoryTheory.IsHomLift.isIso_of_lift_isIso
code: /-- If `φ : a ⟶ b` lifts `f : R ⟶ S` and `φ` is an isomorphism, then so is `f`. -/
lemma isIso_of_lift_isIso (f : R ⟶ S) (φ : a ⟶ b) [p.IsHomLift f φ] [IsIso φ] : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.IsHomLift.inv_lift_inv
code: /-- Given `φ : a ≅ b` and `f : R ≅ S`, such that `φ.hom` lifts `f.hom`, then `φ.inv` lifts
`f.inv`. -/
instance inv_lift_inv (f : R ≅ S) (φ : a ≅ b) [p.IsHomLift f.hom φ.hom] :
    p.IsHomLift f.inv φ.inv 
goal: p.IsHomLift f.inv φ.inv

full_name: CategoryTheory.IsHomLift.inv_lift
code: /-- Given `φ : a ≅ b` and `f : R ⟶ S`, such that `φ.hom` lifts `f`, then `φ.inv` lifts the
inverse of `f` given by `isoOfIsoLift`. -/
instance inv_lift (f : R ⟶ S) (φ : a ≅ b) [p.IsHomLift f φ.hom] :
    p.IsHomLift (isoOfIsoLift p f φ).inv φ.inv 
goal: p.IsHomLift (CategoryTheory.IsHomLift.isoOfIsoLift p f φ).inv φ.inv

full_name: CategoryTheory.IsHomLift.inv
code: /-- If `φ : a ⟶ b` lifts `f : R ⟶ S` and both are isomorphisms, then `φ⁻¹` lifts `f⁻¹`. -/
protected instance inv (f : R ⟶ S) (φ : a ⟶ b) [IsIso f] [IsIso φ] [p.IsHomLift f φ] :
    p.IsHomLift (inv f) (inv φ) 
goal: p.IsHomLift (CategoryTheory.inv f) (CategoryTheory.inv φ)

full_name: CategoryTheory.IsHomLift.lift_id_inv
code: /-- If `φ : a ≅ b` is an isomorphism lifting `𝟙 S` for some `S : 𝒮`, then `φ⁻¹` also
lifts `𝟙 S`. -/
instance lift_id_inv (S : 𝒮) {a b : 𝒳} (φ : a ≅ b) [p.IsHomLift (𝟙 S) φ.hom] :
    p.IsHomLift (𝟙 S) φ.inv 
goal: p.IsHomLift (𝟙 S) φ.inv

full_name: CategoryTheory.IsHomLift.lift_id_inv_isIso
code: instance lift_id_inv_isIso (S : 𝒮) {a b : 𝒳} (φ : a ⟶ b) [IsIso φ] [p.IsHomLift (𝟙 S) φ] :
    p.IsHomLift (𝟙 S) (inv φ) 
goal: p.IsHomLift (𝟙 S) (CategoryTheory.inv φ)