File: Mathlib/CategoryTheory/Dialectica/Basic.lean

full_name: CategoryTheory.Dial.tgt
code: /-- The Dialectica category. An object of the category is a triple `⟨U, X, α ⊆ U × X⟩`,
and a morphism from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair `(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that
`{(u,y) | α(u, F(u, y))} ⊆ {(u,y) | β(f(u), y)}`. The subset `α` is actually encoded as an element
of `Subobject (U × X)`, and the above inequality is expressed using pullbacks. -/
structure Dial where
  /-- The source object -/
  src : C
  /-- The target object -/
  tgt : C
  /-- A subobject of `src ⨯ tgt`, interpreted as a relation -/
  rel : Subobject (src ⨯ tgt)
goal: C

full_name: CategoryTheory.Dial.src
code: /-- The Dialectica category. An object of the category is a triple `⟨U, X, α ⊆ U × X⟩`,
and a morphism from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair `(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that
`{(u,y) | α(u, F(u, y))} ⊆ {(u,y) | β(f(u), y)}`. The subset `α` is actually encoded as an element
of `Subobject (U × X)`, and the above inequality is expressed using pullbacks. -/
structure Dial where
  /-- The source object -/
  src : C
  /-- The target object -/
  tgt : C
  /-- A subobject of `src ⨯ tgt`, interpreted as a relation -/
  rel : Subobject (src ⨯ tgt)
goal: C

full_name: CategoryTheory.Dial
code: /-- The Dialectica category. An object of the category is a triple `⟨U, X, α ⊆ U × X⟩`,
and a morphism from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair `(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that
`{(u,y) | α(u, F(u, y))} ⊆ {(u,y) | β(f(u), y)}`. The subset `α` is actually encoded as an element
of `Subobject (U × X)`, and the above inequality is expressed using pullbacks. -/
structure Dial where
  /-- The source object -/
  src : C
  /-- The target object -/
  tgt : C
  /-- A subobject of `src ⨯ tgt`, interpreted as a relation -/
  rel : Subobject (src ⨯ tgt)
goal: Type (max u v)

full_name: CategoryTheory.Dial.rel
code: /-- The Dialectica category. An object of the category is a triple `⟨U, X, α ⊆ U × X⟩`,
and a morphism from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair `(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that
`{(u,y) | α(u, F(u, y))} ⊆ {(u,y) | β(f(u), y)}`. The subset `α` is actually encoded as an element
of `Subobject (U × X)`, and the above inequality is expressed using pullbacks. -/
structure Dial where
  /-- The source object -/
  src : C
  /-- The target object -/
  tgt : C
  /-- A subobject of `src ⨯ tgt`, interpreted as a relation -/
  rel : Subobject (src ⨯ tgt)
goal: CategoryTheory.Subobject (self.src ⨯ self.tgt)

full_name: CategoryTheory.Dial._aux_Mathlib_CategoryTheory_Dialectica_Basic___unexpand_CategoryTheory_Limits_prod_fst_1
code: local notation "π₁" => prod.fst
goal: Lean.PrettyPrinter.Unexpander

full_name: CategoryTheory.Dial._aux_Mathlib_CategoryTheory_Dialectica_Basic___macroRules_CategoryTheory_Dial_termπ₁_1
code: local notation "π₁" => prod.fst
goal: Lean.Macro

full_name: CategoryTheory.Dial._aux_Mathlib_CategoryTheory_Dialectica_Basic___unexpand_CategoryTheory_Limits_prod_snd_1
code: local notation "π₂" => prod.snd
goal: Lean.PrettyPrinter.Unexpander

full_name: CategoryTheory.Dial._aux_Mathlib_CategoryTheory_Dialectica_Basic___macroRules_CategoryTheory_Dial_termπ₂_1
code: local notation "π₂" => prod.snd
goal: Lean.Macro

full_name: CategoryTheory.Dial._aux_Mathlib_CategoryTheory_Dialectica_Basic___unexpand_CategoryTheory_Limits_prod_lift_1
code: local notation "π(" a ", " b ")" => prod.lift a b
goal: Lean.PrettyPrinter.Unexpander

full_name: CategoryTheory.Dial.«_aux_Mathlib_CategoryTheory_Dialectica_Basic___macroRules_CategoryTheory_Dial_termπ(_,_)_1»
code: local notation "π(" a ", " b ")" => prod.lift a b
goal: Lean.Macro

full_name: CategoryTheory.Dial.Hom.f
code: /-- A morphism in the `Dial C` category from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair
`(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that `{(u,y) | α(u, F(u, y))} ≤ {(u,y) | β(f(u), y)}`. -/
@[ext] structure Hom (X Y : Dial C) where
  /-- Maps the sources -/
  f : X.src ⟶ Y.src
  /-- Maps the targets (contravariantly) -/
  F : X.src ⨯ Y.tgt ⟶ X.tgt
  /-- This says `{(u, y) | α(u, F(u, y))} ⊆ {(u, y) | β(f(u), y)}` using subobject pullbacks -/
  le :
    (Subobject.pullback π(π₁, F)).obj X.rel ≤
    (Subobject.pullback (prod.map f (𝟙 _))).obj Y.rel
goal: X.src ⟶ Y.src

full_name: CategoryTheory.Dial.Hom
code: /-- A morphism in the `Dial C` category from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair
`(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that `{(u,y) | α(u, F(u, y))} ≤ {(u,y) | β(f(u), y)}`. -/
@[ext] structure Hom (X Y : Dial C) where
  /-- Maps the sources -/
  f : X.src ⟶ Y.src
  /-- Maps the targets (contravariantly) -/
  F : X.src ⨯ Y.tgt ⟶ X.tgt
  /-- This says `{(u, y) | α(u, F(u, y))} ⊆ {(u, y) | β(f(u), y)}` using subobject pullbacks -/
  le :
    (Subobject.pullback π(π₁, F)).obj X.rel ≤
    (Subobject.pullback (prod.map f (𝟙 _))).obj Y.rel
goal: Type v

full_name: CategoryTheory.Dial.Hom.F
code: /-- A morphism in the `Dial C` category from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair
`(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that `{(u,y) | α(u, F(u, y))} ≤ {(u,y) | β(f(u), y)}`. -/
@[ext] structure Hom (X Y : Dial C) where
  /-- Maps the sources -/
  f : X.src ⟶ Y.src
  /-- Maps the targets (contravariantly) -/
  F : X.src ⨯ Y.tgt ⟶ X.tgt
  /-- This says `{(u, y) | α(u, F(u, y))} ⊆ {(u, y) | β(f(u), y)}` using subobject pullbacks -/
  le :
    (Subobject.pullback π(π₁, F)).obj X.rel ≤
    (Subobject.pullback (prod.map f (𝟙 _))).obj Y.rel
goal: X.src ⨯ Y.tgt ⟶ X.tgt

full_name: CategoryTheory.Dial.Hom.le
code: /-- A morphism in the `Dial C` category from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair
`(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that `{(u,y) | α(u, F(u, y))} ≤ {(u,y) | β(f(u), y)}`. -/
@[ext] structure Hom (X Y : Dial C) where
  /-- Maps the sources -/
  f : X.src ⟶ Y.src
  /-- Maps the targets (contravariantly) -/
  F : X.src ⨯ Y.tgt ⟶ X.tgt
  /-- This says `{(u, y) | α(u, F(u, y))} ⊆ {(u, y) | β(f(u), y)}` using subobject pullbacks -/
  le :
    (Subobject.pullback π(π₁, F)).obj X.rel ≤
    (Subobject.pullback (prod.map f (𝟙 _))).obj Y.rel
goal: (CategoryTheory.Subobject.pullback (CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.fst self.F)).obj X.rel ≤
  (CategoryTheory.Subobject.pullback
        (CategoryTheory.Limits.prod.map self.f (CategoryTheory.CategoryStruct.id Y.tgt))).obj
    Y.rel

full_name: CategoryTheory.Dial.comp_le_lemma
code: theorem comp_le_lemma {X Y Z : Dial C} (F : Dial.Hom X Y) (G : Dial.Hom Y Z) :
    (Subobject.pullback π(π₁, π(π₁, prod.map F.f (𝟙 _) ≫ G.F) ≫ F.F)).obj X.rel ≤
    (Subobject.pullback (prod.map (F.f ≫ G.f) (𝟙 Z.tgt))).obj Z.rel 
goal: (CategoryTheory.Subobject.pullback
        (CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.fst
          (CategoryTheory.CategoryStruct.comp
            (CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.fst
              (CategoryTheory.CategoryStruct.comp
                (CategoryTheory.Limits.prod.map F.f (CategoryTheory.CategoryStruct.id Z.tgt)) G.F))
            F.F))).obj
    X.rel ≤
  (CategoryTheory.Subobject.pullback
        (CategoryTheory.Limits.prod.map (CategoryTheory.CategoryStruct.comp F.f G.f)
          (CategoryTheory.CategoryStruct.id Z.tgt))).obj
    Z.rel

full_name: CategoryTheory.Dial.instCategory_id_F
code: @[simps]
instance : Category (Dial C) 
goal: (CategoryTheory.CategoryStruct.id X).F = CategoryTheory.Limits.prod.snd

full_name: CategoryTheory.Dial.instCategory
code: @[simps]
instance : Category (Dial C) 
goal: CategoryTheory.Category.{v, max u v} (CategoryTheory.Dial C)

full_name: CategoryTheory.Dial.instCategory_comp_F
code: @[simps]
instance : Category (Dial C) 
goal: (CategoryTheory.CategoryStruct.comp F G).F =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.fst
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.prod.map F.f (CategoryTheory.CategoryStruct.id Z.tgt))
        G.F))
    F.F

full_name: CategoryTheory.Dial.instCategory_id_f
code: @[simps]
instance : Category (Dial C) 
goal: (CategoryTheory.CategoryStruct.id X).f = CategoryTheory.CategoryStruct.id X.src

full_name: CategoryTheory.Dial.instCategory_comp_f
code: @[simps]
instance : Category (Dial C) 
goal: (CategoryTheory.CategoryStruct.comp F G).f = CategoryTheory.CategoryStruct.comp F.f G.f

full_name: CategoryTheory.Dial.hom_ext
code: @[ext] theorem hom_ext {X Y : Dial C} {x y : X ⟶ Y} (hf : x.f = y.f) (hF : x.F = y.F) : x = y 
goal: x = y

full_name: CategoryTheory.Dial.isoMk_inv_F
code: /--
An isomorphism in `Dial C` can be induced by isomorphisms on the source and target,
which respect the respective relations on `X` and `Y`.
-/
@[simps] def isoMk {X Y : Dial C} (e₁ : X.src ≅ Y.src) (e₂ : X.tgt ≅ Y.tgt)
    (eq : X.rel = (Subobject.pullback (prod.map e₁.hom e₂.hom)).obj Y.rel) : X ≅ Y 
goal: (CategoryTheory.Dial.isoMk e₁ e₂ eq).inv.F = CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd e₂.hom

full_name: CategoryTheory.Dial.isoMk
code: /--
An isomorphism in `Dial C` can be induced by isomorphisms on the source and target,
which respect the respective relations on `X` and `Y`.
-/
@[simps] def isoMk {X Y : Dial C} (e₁ : X.src ≅ Y.src) (e₂ : X.tgt ≅ Y.tgt)
    (eq : X.rel = (Subobject.pullback (prod.map e₁.hom e₂.hom)).obj Y.rel) : X ≅ Y 
goal: X ≅ Y

full_name: CategoryTheory.Dial.isoMk_hom_f
code: /--
An isomorphism in `Dial C` can be induced by isomorphisms on the source and target,
which respect the respective relations on `X` and `Y`.
-/
@[simps] def isoMk {X Y : Dial C} (e₁ : X.src ≅ Y.src) (e₂ : X.tgt ≅ Y.tgt)
    (eq : X.rel = (Subobject.pullback (prod.map e₁.hom e₂.hom)).obj Y.rel) : X ≅ Y 
goal: (CategoryTheory.Dial.isoMk e₁ e₂ eq).hom.f = e₁.hom

full_name: CategoryTheory.Dial.isoMk_hom_F
code: /--
An isomorphism in `Dial C` can be induced by isomorphisms on the source and target,
which respect the respective relations on `X` and `Y`.
-/
@[simps] def isoMk {X Y : Dial C} (e₁ : X.src ≅ Y.src) (e₂ : X.tgt ≅ Y.tgt)
    (eq : X.rel = (Subobject.pullback (prod.map e₁.hom e₂.hom)).obj Y.rel) : X ≅ Y 
goal: (CategoryTheory.Dial.isoMk e₁ e₂ eq).hom.F = CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd e₂.inv

full_name: CategoryTheory.Dial.isoMk_inv_f
code: /--
An isomorphism in `Dial C` can be induced by isomorphisms on the source and target,
which respect the respective relations on `X` and `Y`.
-/
@[simps] def isoMk {X Y : Dial C} (e₁ : X.src ≅ Y.src) (e₂ : X.tgt ≅ Y.tgt)
    (eq : X.rel = (Subobject.pullback (prod.map e₁.hom e₂.hom)).obj Y.rel) : X ≅ Y 
goal: (CategoryTheory.Dial.isoMk e₁ e₂ eq).inv.f = e₁.inv