File: Mathlib/CategoryTheory/Closed/Ideal.lean

full_name: CategoryTheory.ExponentialIdeal
code: /-- The subcategory `D` of `C` expressed as an inclusion functor is an *exponential ideal* if
`B ∈ D` implies `A ⟹ B ∈ D` for all `A`.
-/
class ExponentialIdeal : Prop where
  exp_closed : ∀ {B}, B ∈ i.essImage → ∀ A, (A ⟹ B) ∈ i.essImage
goal: Prop

full_name: CategoryTheory.ExponentialIdeal.exp_closed
code: /-- The subcategory `D` of `C` expressed as an inclusion functor is an *exponential ideal* if
`B ∈ D` implies `A ⟹ B ∈ D` for all `A`.
-/
class ExponentialIdeal : Prop where
  exp_closed : ∀ {B}, B ∈ i.essImage → ∀ A, (A ⟹ B) ∈ i.essImage
goal: B ∈ i.essImage → ∀ (A : C), (A ⟹ B) ∈ i.essImage

full_name: CategoryTheory.ExponentialIdeal.mk'
code: /-- To show `i` is an exponential ideal it suffices to show that `A ⟹ iB` is "in" `D` for any `A` in
`C` and `B` in `D`.
-/
theorem ExponentialIdeal.mk' (h : ∀ (B : D) (A : C), (A ⟹ i.obj B) ∈ i.essImage) :
    ExponentialIdeal i 
goal: CategoryTheory.ExponentialIdeal i

full_name: CategoryTheory.instExponentialIdealId
code: /-- The entire category viewed as a subcategory is an exponential ideal. -/
instance : ExponentialIdeal (𝟭 C) 
goal: CategoryTheory.ExponentialIdeal (CategoryTheory.Functor.id C)

full_name: CategoryTheory.instExponentialIdealSubterminalsSubterminalInclusion
code: /-- The subcategory of subterminal objects is an exponential ideal. -/
instance : ExponentialIdeal (subterminalInclusion C) 
goal: CategoryTheory.ExponentialIdeal (CategoryTheory.subterminalInclusion C)

full_name: CategoryTheory.exponentialIdealReflective
code: /-- If `D` is a reflective subcategory, the property of being an exponential ideal is equivalent to
the presence of a natural isomorphism `i ⋙ exp A ⋙ leftAdjoint i ⋙ i ≅ i ⋙ exp A`, that is:
`(A ⟹ iB) ≅ i L (A ⟹ iB)`, naturally in `B`.
The converse is given in `ExponentialIdeal.mk_of_iso`.
-/
def exponentialIdealReflective (A : C) [Reflective i] [ExponentialIdeal i] :
    i ⋙ exp A ⋙ reflector i ⋙ i ≅ i ⋙ exp A 
goal: i.comp ((CategoryTheory.exp A).comp ((CategoryTheory.reflector i).comp i)) ≅ i.comp (CategoryTheory.exp A)

full_name: CategoryTheory.ExponentialIdeal.mk_of_iso
code: /-- Given a natural isomorphism `i ⋙ exp A ⋙ leftAdjoint i ⋙ i ≅ i ⋙ exp A`, we can show `i`
is an exponential ideal.
-/
theorem ExponentialIdeal.mk_of_iso [Reflective i]
    (h : ∀ A : C, i ⋙ exp A ⋙ reflector i ⋙ i ≅ i ⋙ exp A) : ExponentialIdeal i 
goal: CategoryTheory.ExponentialIdeal i

full_name: CategoryTheory.reflective_products
code: theorem reflective_products [HasFiniteProducts C] [Reflective i] : HasFiniteProducts D 
goal: CategoryTheory.Limits.HasFiniteProducts D

full_name: CategoryTheory.exponentialIdeal_of_preservesBinaryProducts
code: /-- If the reflector preserves binary products, the subcategory is an exponential ideal.
This is the converse of `preservesBinaryProductsOfExponentialIdeal`.
-/
instance (priority := 10) exponentialIdeal_of_preservesBinaryProducts
    [PreservesLimitsOfShape (Discrete WalkingPair) (reflector i)] : ExponentialIdeal i 
goal: CategoryTheory.ExponentialIdeal i

full_name: CategoryTheory.cartesianClosedOfReflective
code: /-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D 
goal: CategoryTheory.CartesianClosed D

full_name: CategoryTheory.bijection
code: /-- We construct a bijection between morphisms `L(A ⨯ B) ⟶ X` and morphisms `LA ⨯ LB ⟶ X`.
This bijection has two key properties:
* It is natural in `X`: See `bijection_natural`.
* When `X = LA ⨯ LB`, then the backwards direction sends the identity morphism to the product
  comparison morphism: See `bijection_symm_apply_id`.

Together these help show that `L` preserves binary products. This should be considered
*internal implementation* towards `preservesBinaryProductsOfExponentialIdeal`.
-/
noncomputable def bijection (A B : C) (X : D) :
    ((reflector i).obj (A ⨯ B) ⟶ X) ≃ ((reflector i).obj A ⨯ (reflector i).obj B ⟶ X) 
goal: ((CategoryTheory.reflector i).obj (A ⨯ B) ⟶ X) ≃
  ((CategoryTheory.reflector i).obj A ⨯ (CategoryTheory.reflector i).obj B ⟶ X)

full_name: CategoryTheory.bijection_symm_apply_id
code: theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _ 
goal: (CategoryTheory.bijection i A B ((CategoryTheory.reflector i).obj A ⨯ (CategoryTheory.reflector i).obj B)).symm
    (CategoryTheory.CategoryStruct.id ((CategoryTheory.reflector i).obj A ⨯ (CategoryTheory.reflector i).obj B)) =
  CategoryTheory.Limits.prodComparison (CategoryTheory.reflector i) A B

full_name: CategoryTheory.bijection_natural
code: theorem bijection_natural (A B : C) (X X' : D) (f : (reflector i).obj (A ⨯ B) ⟶ X) (g : X ⟶ X') :
    bijection i _ _ _ (f ≫ g) = bijection i _ _ _ f ≫ g 
goal: (CategoryTheory.bijection i A B X') (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.bijection i A B X) f) g

full_name: CategoryTheory.prodComparison_iso
code: /--
The bijection allows us to show that `prodComparison L A B` is an isomorphism, where the inverse
is the forward map of the identity morphism.
-/
theorem prodComparison_iso (A B : C) : IsIso (prodComparison (reflector i) A B) 
goal: CategoryTheory.IsIso (CategoryTheory.Limits.prodComparison (CategoryTheory.reflector i) A B)

full_name: CategoryTheory.preservesBinaryProductsOfExponentialIdeal
code: /--
If a reflective subcategory is an exponential ideal, then the reflector preserves binary products.
This is the converse of `exponentialIdeal_of_preserves_binary_products`.
-/
noncomputable def preservesBinaryProductsOfExponentialIdeal :
    PreservesLimitsOfShape (Discrete WalkingPair) (reflector i) 
goal: CategoryTheory.Limits.PreservesLimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair)
  (CategoryTheory.reflector i)

full_name: CategoryTheory.preservesFiniteProductsOfExponentialIdeal
code: /--
If a reflective subcategory is an exponential ideal, then the reflector preserves finite products.
-/
noncomputable def preservesFiniteProductsOfExponentialIdeal (J : Type) [Fintype J] :
    PreservesLimitsOfShape (Discrete J) (reflector i) 
goal: CategoryTheory.Limits.PreservesLimitsOfShape (CategoryTheory.Discrete J) (CategoryTheory.reflector i)