l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem ContinuousLinearEquiv.uniqueDiffOn_preimage_iff (e : F ≃L[𝕜] E) :
    UniqueDiffOn 𝕜 (e ⁻¹' s) ↔ UniqueDiffOn 𝕜 s := by
  

Proof state:
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
f : E → F
s : Set E
f' : E →L[𝕜] F
e : F ≃L[𝕜] E
⊢ UniqueDiffOn 𝕜 (⇑e ⁻¹' s) ↔ UniqueDiffOn 𝕜 s

Next tactic:
rw [← e.image_symm_eq_preimage, e.symm.uniqueDiffOn_image_iff]
theorem lt_iff_le_and_exists : p < q ↔ p ≤ q ∧ ∃ x ∈ q, x ∉ p := by
  

Proof state:
A : Type u_1
B : Type u_2
i : SetLike A B
p q : A
⊢ p < q ↔ p ≤ q ∧ ∃ x ∈ q, x ∉ p

Next tactic:
rw [lt_iff_le_not_le, not_le_iff_exists]
instance Prop.le_isTotal : IsTotal Prop (· ≤ ·) :=
  ⟨fun p q => by 

Proof state:
p q : Prop
⊢ p ≤ q ∨ q ≤ p

Next tactic:
by_cases h : q
instance Prop.le_isTotal : IsTotal Prop (· ≤ ·) :=
  ⟨fun p q => by by_cases h : q <;> 

Proof state:
case pos
p q : Prop
h : q
⊢ p ≤ q ∨ q ≤ p

Next tactic:
simp [h]
instance Prop.le_isTotal : IsTotal Prop (· ≤ ·) :=
  ⟨fun p q => by by_cases h : q <;> 

Proof state:
case neg
p q : Prop
h : ¬q
⊢ p ≤ q ∨ q ≤ p

Next tactic:
simp [h]
noncomputable instance Prop.linearOrder : LinearOrder Prop := by
  

Proof state:
⊢ LinearOrder Prop

Next tactic:
classical
  exact Lattice.toLinearOrder Prop
noncomputable instance Prop.linearOrder : LinearOrder Prop := by
  classical
  

Proof state:
⊢ LinearOrder Prop

Next tactic:
exact Lattice.toLinearOrder Prop
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} :
    Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
  

Proof state:
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → OrderBot (α' i)
f g : (i : ι) → α' i
⊢ Disjoint f g ↔ ∀ (i : ι), Disjoint (f i) (g i)

Next tactic:
classical
  constructor
  · intro h i x hf hg
    refine' (update_le_iff.mp <| h (update_le_iff.mpr ⟨hf, fun _ _ => _⟩)
      (update_le_iff.mpr ⟨hg, fun _ _ => _⟩)).1
    · exact bot_le
    · exact bot_le
  · intro h x hf hg i
    apply h i (hf i) (hg i)
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} :
    Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
  classical
  

Proof state:
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → OrderBot (α' i)
f g : (i : ι) → α' i
⊢ Disjoint f g ↔ ∀ (i : ι), Disjoint (f i) (g i)

Next tactic:
constructor
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} :
    Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
  classical
  constructor
  · 

Proof state:
case mp
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → OrderBot (α' i)
f g : (i : ι) → α' i
⊢ Disjoint f g → ∀ (i : ι), Disjoint (f i) (g i)

Next tactic:
intro h i x hf hg
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} :
    Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
  classical
  constructor
  · intro h i x hf hg
    

Proof state:
case mp
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → OrderBot (α' i)
f g : (i : ι) → α' i
h : Disjoint f g
i : ι
x : α' i
hf : x ≤ f i
hg : x ≤ g i
⊢ x ≤ ⊥

Next tactic:
refine' (update_le_iff.mp <| h (update_le_iff.mpr ⟨hf, fun _ _ => _⟩)
      (update_le_iff.mpr ⟨hg, fun _ _ => _⟩)).1
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} :
    Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
  classical
  constructor
  · intro h i x hf hg
    refine' (update_le_iff.mp <| h (update_le_iff.mpr ⟨hf, fun _ _ => _⟩)
      (update_le_iff.mpr ⟨hg, fun _ _ => _⟩)).1
    · 

Proof state:
case mp.refine'_1
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → OrderBot (α' i)
f g : (i : ι) → α' i
h : Disjoint f g
i : ι
x : α' i
hf : x ≤ f i
hg : x ≤ g i
x✝¹ : ι
x✝ : x✝¹ ≠ i
⊢ ?mp.refine'_2 x✝¹ ≤ f x✝¹

Next tactic:
exact bot_le
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} :
    Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
  classical
  constructor
  · intro h i x hf hg
    refine' (update_le_iff.mp <| h (update_le_iff.mpr ⟨hf, fun _ _ => _⟩)
      (update_le_iff.mpr ⟨hg, fun _ _ => _⟩)).1
    · exact bot_le
    · 

Proof state:
case mp.refine'_3
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → OrderBot (α' i)
f g : (i : ι) → α' i
h : Disjoint f g
i : ι
x : α' i
hf : x ≤ f i
hg : x ≤ g i
x✝¹ : ι
x✝ : x✝¹ ≠ i
⊢ ⊥ ≤ g x✝¹

Next tactic:
exact bot_le
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} :
    Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
  classical
  constructor
  · intro h i x hf hg
    refine' (update_le_iff.mp <| h (update_le_iff.mpr ⟨hf, fun _ _ => _⟩)
      (update_le_iff.mpr ⟨hg, fun _ _ => _⟩)).1
    · exact bot_le
    · exact bot_le
  · 

Proof state:
case mpr
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → OrderBot (α' i)
f g : (i : ι) → α' i
⊢ (∀ (i : ι), Disjoint (f i) (g i)) → Disjoint f g

Next tactic:
intro h x hf hg i
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} :
    Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
  classical
  constructor
  · intro h i x hf hg
    refine' (update_le_iff.mp <| h (update_le_iff.mpr ⟨hf, fun _ _ => _⟩)
      (update_le_iff.mpr ⟨hg, fun _ _ => _⟩)).1
    · exact bot_le
    · exact bot_le
  · intro h x hf hg i
    

Proof state:
case mpr
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → OrderBot (α' i)
f g : (i : ι) → α' i
h : ∀ (i : ι), Disjoint (f i) (g i)
x : (i : ι) → α' i
hf : x ≤ f
hg : x ≤ g
i : ι
⊢ x i ≤ ⊥ i

Next tactic:
apply h i (hf i) (hg i)
theorem isCompl_iff [∀ i, BoundedOrder (α' i)] {f g : ∀ i, α' i} :
    IsCompl f g ↔ ∀ i, IsCompl (f i) (g i) := by
  

Proof state:
ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → BoundedOrder (α' i)
f g : (i : ι) → α' i
⊢ IsCompl f g ↔ ∀ (i : ι), IsCompl (f i) (g i)

Next tactic:
simp_rw [_root_.isCompl_iff, disjoint_iff, codisjoint_iff, forall_and]
@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
  

Proof state:
P Q : Prop
⊢ IsCompl P Q ↔ ¬(P ↔ Q)

Next tactic:
rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff]
@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
  rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff]
  

Proof state:
P Q : Prop
⊢ ¬(P ∧ Q) ∧ (P ∨ Q) ↔ (¬P ↔ Q)

Next tactic:
by_cases P
@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
  rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff]
  by_cases P <;> 

Proof state:
case pos
P Q : Prop
h✝ : P
⊢ ¬(P ∧ Q) ∧ (P ∨ Q) ↔ (¬P ↔ Q)

Next tactic:
by_cases Q
@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
  rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff]
  by_cases P <;> 

Proof state:
case neg
P Q : Prop
h✝ : ¬P
⊢ ¬(P ∧ Q) ∧ (P ∨ Q) ↔ (¬P ↔ Q)

Next tactic:
by_cases Q
@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
  rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff]
  by_cases P <;> by_cases Q <;> 

Proof state:
case pos
P Q : Prop
h✝¹ : P
h✝ : Q
⊢ ¬(P ∧ Q) ∧ (P ∨ Q) ↔ (¬P ↔ Q)

Next tactic:
simp [*]
@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
  rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff]
  by_cases P <;> by_cases Q <;> 

Proof state:
case neg
P Q : Prop
h✝¹ : P
h✝ : ¬Q
⊢ ¬(P ∧ Q) ∧ (P ∨ Q) ↔ (¬P ↔ Q)

Next tactic:
simp [*]
@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
  rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff]
  by_cases P <;> by_cases Q <;> 

Proof state:
case pos
P Q : Prop
h✝¹ : ¬P
h✝ : Q
⊢ ¬(P ∧ Q) ∧ (P ∨ Q) ↔ (¬P ↔ Q)

Next tactic:
simp [*]
@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
  rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff]
  by_cases P <;> by_cases Q <;> 

Proof state:
case neg
P Q : Prop
h✝¹ : ¬P
h✝ : ¬Q
⊢ ¬(P ∧ Q) ∧ (P ∨ Q) ↔ (¬P ↔ Q)

Next tactic:
simp [*]
/-- (An auxiliary definition for `functorCategoryMonoidal`.)
Tensor product of natural transformations into `D`, when `D` is monoidal.
-/
@[simps]
def tensorHom : tensorObj F F' ⟶ tensorObj G G' where
  app X := α.app X ⊗ β.app X
  naturality X Y f := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F G F' G' : C ⥤ D
α : F ⟶ G
β : F' ⟶ G'
X Y : C
f : X ⟶ Y
⊢ (tensorObj F F').map f ≫ (fun X => α.app X ⊗ β.app X) Y = (fun X => α.app X ⊗ β.app X) X ≫ (tensorObj G G').map f

Next tactic:
dsimp
/-- (An auxiliary definition for `functorCategoryMonoidal`.)
Tensor product of natural transformations into `D`, when `D` is monoidal.
-/
@[simps]
def tensorHom : tensorObj F F' ⟶ tensorObj G G' where
  app X := α.app X ⊗ β.app X
  naturality X Y f := by dsimp; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F G F' G' : C ⥤ D
α : F ⟶ G
β : F' ⟶ G'
X Y : C
f : X ⟶ Y
⊢ (F.map f ⊗ F'.map f) ≫ (α.app Y ⊗ β.app Y) = (α.app X ⊗ β.app X) ≫ (G.map f ⊗ G'.map f)

Next tactic:
rw [← tensor_comp, α.naturality, β.naturality, tensor_comp]
/-- (An auxiliary definition for `functorCategoryMonoidal`.) -/
@[simps]
def whiskerLeft (F) (β : F' ⟶ G') : tensorObj F F' ⟶ tensorObj F G' where
  app X := F.obj X ◁ β.app X
  naturality X Y f := by
    

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F✝ G F' G' : C ⥤ D
α : F✝ ⟶ G
β✝ : F' ⟶ G'
F : C ⥤ D
β : F' ⟶ G'
X Y : C
f : X ⟶ Y
⊢ (tensorObj F F').map f ≫ (fun X => F.obj X ◁ β.app X) Y = (fun X => F.obj X ◁ β.app X) X ≫ (tensorObj F G').map f

Next tactic:
simp only [← id_tensorHom]
/-- (An auxiliary definition for `functorCategoryMonoidal`.) -/
@[simps]
def whiskerLeft (F) (β : F' ⟶ G') : tensorObj F F' ⟶ tensorObj F G' where
  app X := F.obj X ◁ β.app X
  naturality X Y f := by
    simp only [← id_tensorHom]
    

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F✝ G F' G' : C ⥤ D
α : F✝ ⟶ G
β✝ : F' ⟶ G'
F : C ⥤ D
β : F' ⟶ G'
X Y : C
f : X ⟶ Y
⊢ (tensorObj F F').map f ≫ (𝟙 (F.obj Y) ⊗ β.app Y) = (𝟙 (F.obj X) ⊗ β.app X) ≫ (tensorObj F G').map f

Next tactic:
apply (tensorHom (𝟙 F) β).naturality
/-- (An auxiliary definition for `functorCategoryMonoidal`.) -/
@[simps]
def whiskerRight (F') : tensorObj F F' ⟶ tensorObj G F' where
  app X := α.app X ▷ F'.obj X
  naturality X Y f := by
    

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F G F'✝ G' : C ⥤ D
α : F ⟶ G
β : F'✝ ⟶ G'
F' : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ (tensorObj F F').map f ≫ (fun X => α.app X ▷ F'.obj X) Y = (fun X => α.app X ▷ F'.obj X) X ≫ (tensorObj G F').map f

Next tactic:
simp only [← tensorHom_id]
/-- (An auxiliary definition for `functorCategoryMonoidal`.) -/
@[simps]
def whiskerRight (F') : tensorObj F F' ⟶ tensorObj G F' where
  app X := α.app X ▷ F'.obj X
  naturality X Y f := by
    simp only [← tensorHom_id]
    

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F G F'✝ G' : C ⥤ D
α : F ⟶ G
β : F'✝ ⟶ G'
F' : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ (tensorObj F F').map f ≫ (α.app Y ⊗ 𝟙 (F'.obj Y)) = (α.app X ⊗ 𝟙 (F'.obj X)) ≫ (tensorObj G F').map f

Next tactic:
apply (tensorHom α (𝟙 F')).naturality
/-- When `C` is any category, and `D` is a monoidal category,
the functor category `C ⥤ D` has a natural pointwise monoidal structure,
where `(F ⊗ G).obj X = F.obj X ⊗ G.obj X`.
-/
instance functorCategoryMonoidal : MonoidalCategory (C ⥤ D) where
  tensorHom_def := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
⊢ ∀ {X₁ Y₁ X₂ Y₂ : C ⥤ D} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂), f ⊗ g = f ▷ X₂ ≫ Y₁ ◁ g

Next tactic:
intros
/-- When `C` is any category, and `D` is a monoidal category,
the functor category `C ⥤ D` has a natural pointwise monoidal structure,
where `(F ⊗ G).obj X = F.obj X ⊗ G.obj X`.
-/
instance functorCategoryMonoidal : MonoidalCategory (C ⥤ D) where
  tensorHom_def := by intros; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
X₁✝ Y₁✝ X₂✝ Y₂✝ : C ⥤ D
f✝ : X₁✝ ⟶ Y₁✝
g✝ : X₂✝ ⟶ Y₂✝
⊢ f✝ ⊗ g✝ = f✝ ▷ X₂✝ ≫ Y₁✝ ◁ g✝

Next tactic:
ext
/-- When `C` is any category, and `D` is a monoidal category,
the functor category `C ⥤ D` has a natural pointwise monoidal structure,
where `(F ⊗ G).obj X = F.obj X ⊗ G.obj X`.
-/
instance functorCategoryMonoidal : MonoidalCategory (C ⥤ D) where
  tensorHom_def := by intros; ext; 

Proof state:
case w.h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
X₁✝ Y₁✝ X₂✝ Y₂✝ : C ⥤ D
f✝ : X₁✝ ⟶ Y₁✝
g✝ : X₂✝ ⟶ Y₂✝
x✝ : C
⊢ (f✝ ⊗ g✝).app x✝ = (f✝ ▷ X₂✝ ≫ Y₁✝ ◁ g✝).app x✝

Next tactic:
simp [tensorHom_def]
/-- When `C` is any category, and `D` is a monoidal category,
the functor category `C ⥤ D` has a natural pointwise monoidal structure,
where `(F ⊗ G).obj X = F.obj X ⊗ G.obj X`.
-/
instance functorCategoryMonoidal : MonoidalCategory (C ⥤ D) where
  tensorHom_def := by intros; ext; simp [tensorHom_def]
  pentagon F G H K := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F G H K : C ⥤ D
⊢ ((α_ F G H).hom ⊗ 𝟙 K) ≫ (α_ F (G ⊗ H) K).hom ≫ (𝟙 F ⊗ (α_ G H K).hom) = (α_ (F ⊗ G) H K).hom ≫ (α_ F G (H ⊗ K)).hom

Next tactic:
ext X
/-- When `C` is any category, and `D` is a monoidal category,
the functor category `C ⥤ D` has a natural pointwise monoidal structure,
where `(F ⊗ G).obj X = F.obj X ⊗ G.obj X`.
-/
instance functorCategoryMonoidal : MonoidalCategory (C ⥤ D) where
  tensorHom_def := by intros; ext; simp [tensorHom_def]
  pentagon F G H K := by ext X; 

Proof state:
case w.h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F G H K : C ⥤ D
X : C
⊢ (((α_ F G H).hom ⊗ 𝟙 K) ≫ (α_ F (G ⊗ H) K).hom ≫ (𝟙 F ⊗ (α_ G H K).hom)).app X =
    ((α_ (F ⊗ G) H K).hom ≫ (α_ F G (H ⊗ K)).hom).app X

Next tactic:
dsimp
/-- When `C` is any category, and `D` is a monoidal category,
the functor category `C ⥤ D` has a natural pointwise monoidal structure,
where `(F ⊗ G).obj X = F.obj X ⊗ G.obj X`.
-/
instance functorCategoryMonoidal : MonoidalCategory (C ⥤ D) where
  tensorHom_def := by intros; ext; simp [tensorHom_def]
  pentagon F G H K := by ext X; dsimp; 

Proof state:
case w.h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
F G H K : C ⥤ D
X : C
⊢ ((α_ (F.obj X) (G.obj X) (H.obj X)).hom ⊗ 𝟙 (K.obj X)) ≫
      (α_ (F.obj X) (G.obj X ⊗ H.obj X) (K.obj X)).hom ≫ (𝟙 (F.obj X) ⊗ (α_ (G.obj X) (H.obj X) (K.obj X)).hom) =
    (α_ (F.obj X ⊗ G.obj X) (H.obj X) (K.obj X)).hom ≫ (α_ (F.obj X) (G.obj X) (H.obj X ⊗ K.obj X)).hom

Next tactic:
rw [pentagon]
/-- When `C` is any category, and `D` is a braided monoidal category,
the natural pointwise monoidal structure on the functor category `C ⥤ D`
is also braided.
-/
instance functorCategoryBraided : BraidedCategory (C ⥤ D) where
  braiding F G := NatIso.ofComponents fun X => β_ _ _
  hexagon_forward F G H := by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
F G H : C ⥤ D
⊢ (α_ F G H).hom ≫ ((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) F (G ⊗ H)).hom ≫ (α_ G H F).hom =
    (((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) F G).hom ⊗ 𝟙 H) ≫
      (α_ G F H).hom ≫ (𝟙 G ⊗ ((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) F H).hom)

Next tactic:
ext X
/-- When `C` is any category, and `D` is a braided monoidal category,
the natural pointwise monoidal structure on the functor category `C ⥤ D`
is also braided.
-/
instance functorCategoryBraided : BraidedCategory (C ⥤ D) where
  braiding F G := NatIso.ofComponents fun X => β_ _ _
  hexagon_forward F G H := by ext X; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
F G H : C ⥤ D
X : C
⊢ ((α_ F G H).hom ≫
          ((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) F (G ⊗ H)).hom ≫ (α_ G H F).hom).app
      X =
    ((((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) F G).hom ⊗ 𝟙 H) ≫
          (α_ G F H).hom ≫ (𝟙 G ⊗ ((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) F H).hom)).app
      X

Next tactic:
apply hexagon_forward
/-- When `C` is any category, and `D` is a braided monoidal category,
the natural pointwise monoidal structure on the functor category `C ⥤ D`
is also braided.
-/
instance functorCategoryBraided : BraidedCategory (C ⥤ D) where
  braiding F G := NatIso.ofComponents fun X => β_ _ _
  hexagon_forward F G H := by ext X; apply hexagon_forward
  hexagon_reverse F G H := by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
F G H : C ⥤ D
⊢ (α_ F G H).inv ≫ ((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) (F ⊗ G) H).hom ≫ (α_ H F G).inv =
    (𝟙 F ⊗ ((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) G H).hom) ≫
      (α_ F H G).inv ≫ (((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) F H).hom ⊗ 𝟙 G)

Next tactic:
ext X
/-- When `C` is any category, and `D` is a braided monoidal category,
the natural pointwise monoidal structure on the functor category `C ⥤ D`
is also braided.
-/
instance functorCategoryBraided : BraidedCategory (C ⥤ D) where
  braiding F G := NatIso.ofComponents fun X => β_ _ _
  hexagon_forward F G H := by ext X; apply hexagon_forward
  hexagon_reverse F G H := by ext X; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
F G H : C ⥤ D
X : C
⊢ ((α_ F G H).inv ≫
          ((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) (F ⊗ G) H).hom ≫ (α_ H F G).inv).app
      X =
    ((𝟙 F ⊗ ((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) G H).hom) ≫
          (α_ F H G).inv ≫ (((fun F G => NatIso.ofComponents fun X => β_ (F.obj X) (G.obj X)) F H).hom ⊗ 𝟙 G)).app
      X

Next tactic:
apply hexagon_reverse
/-- When `C` is any category, and `D` is a symmetric monoidal category,
the natural pointwise monoidal structure on the functor category `C ⥤ D`
is also symmetric.
-/
instance functorCategorySymmetric : SymmetricCategory (C ⥤ D) where
  symmetry F G := by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : SymmetricCategory D
F G : C ⥤ D
⊢ (β_ F G).hom ≫ (β_ G F).hom = 𝟙 (F ⊗ G)

Next tactic:
ext X
/-- When `C` is any category, and `D` is a symmetric monoidal category,
the natural pointwise monoidal structure on the functor category `C ⥤ D`
is also symmetric.
-/
instance functorCategorySymmetric : SymmetricCategory (C ⥤ D) where
  symmetry F G := by ext X; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : SymmetricCategory D
F G : C ⥤ D
X : C
⊢ ((β_ F G).hom ≫ (β_ G F).hom).app X = (𝟙 (F ⊗ G)).app X

Next tactic:
apply symmetry
@[to_additive]
protected theorem right_comm (h : Commute b c) (a : S) : a * b * c = a * c * b :=
  by 

Proof state:
G : Type u_1
S : Type u_2
inst✝ : Semigroup S
a✝ b c : S
h : Commute b c
a : S
⊢ a * b * c = a * c * b

Next tactic:
simp only [mul_assoc, h.eq]
@[to_additive]
protected theorem left_comm (h : Commute a b) (c) : a * (b * c) = b * (a * c) :=
  by 

Proof state:
G : Type u_1
S : Type u_2
inst✝ : Semigroup S
a b c✝ : S
h : Commute a b
c : S
⊢ a * (b * c) = b * (a * c)

Next tactic:
simp only [← mul_assoc, h.eq]
@[to_additive]
protected theorem mul_mul_mul_comm (hbc : Commute b c) (a d : S) :
    a * b * (c * d) = a * c * (b * d) := by 

Proof state:
G : Type u_1
S : Type u_2
inst✝ : Semigroup S
a✝ b c : S
hbc : Commute b c
a d : S
⊢ a * b * (c * d) = a * c * (b * d)

Next tactic:
simp only [hbc.left_comm, mul_assoc]
@[to_additive]
protected theorem mul_inv (hab : Commute a b) : (a * b)⁻¹ = a⁻¹ * b⁻¹ := by 

Proof state:
G : Type u_1
inst✝ : DivisionMonoid G
a b c d : G
hab : Commute a b
⊢ (a * b)⁻¹ = a⁻¹ * b⁻¹

Next tactic:
rw [hab.eq, mul_inv_rev]
@[to_additive]
protected theorem inv (hab : Commute a b) : (a * b)⁻¹ = a⁻¹ * b⁻¹ := by 

Proof state:
G : Type u_1
inst✝ : DivisionMonoid G
a b c d : G
hab : Commute a b
⊢ (a * b)⁻¹ = a⁻¹ * b⁻¹

Next tactic:
rw [hab.eq, mul_inv_rev]
@[to_additive]
protected theorem mul_inv_cancel (h : Commute a b) : a * b * a⁻¹ = b := by
  

Proof state:
G : Type u_1
inst✝ : Group G
a b : G
h : Commute a b
⊢ a * b * a⁻¹ = b

Next tactic:
rw [h.eq, mul_inv_cancel_right]
@[to_additive]
theorem mul_inv_cancel_assoc (h : Commute a b) : a * (b * a⁻¹) = b := by
  

Proof state:
G : Type u_1
inst✝ : Group G
a b : G
h : Commute a b
⊢ a * (b * a⁻¹) = b

Next tactic:
rw [← mul_assoc, h.mul_inv_cancel]
instance : ConcreteCategory HeytAlg := by
  

Proof state:
⊢ ConcreteCategory HeytAlg

Next tactic:
dsimp [HeytAlg]
instance : ConcreteCategory HeytAlg := by
  dsimp [HeytAlg]
  

Proof state:
⊢ ConcreteCategory (Bundled HeytingAlgebra)

Next tactic:
infer_instance
/-- Constructs an isomorphism of Heyting algebras from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : HeytAlg.{u}} (e : α ≃o β) : α ≅ β where
  hom := (e : HeytingHom _ _)
  inv := (e.symm : HeytingHom _ _)
  hom_inv_id := by 

Proof state:
α β : HeytAlg
e : ↑α ≃o ↑β
⊢ {
        toLatticeHom :=
          { toSupHom := { toFun := ⇑e, map_sup' := (_ : ∀ (a b : ↑α), e (a ⊔ b) = e a ⊔ e b) },
            map_inf' := (_ : ∀ (a b : ↑α), e (a ⊓ b) = e a ⊓ e b) },
        map_bot' := (_ : e ⊥ = ⊥), map_himp' := (_ : ∀ (a b : ↑α), e (a ⇨ b) = e a ⇨ e b) } ≫
      {
        toLatticeHom :=
          {
            toSupHom :=
              { toFun := ⇑(OrderIso.symm e),
                map_sup' := (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⊔ b) = (OrderIso.symm e) a ⊔ (OrderIso.symm e) b) },
            map_inf' := (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⊓ b) = (OrderIso.symm e) a ⊓ (OrderIso.symm e) b) },
        map_bot' := (_ : (OrderIso.symm e) ⊥ = ⊥),
        map_himp' := (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⇨ b) = (OrderIso.symm e) a ⇨ (OrderIso.symm e) b) } =
    𝟙 α

Next tactic:
ext
/-- Constructs an isomorphism of Heyting algebras from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : HeytAlg.{u}} (e : α ≃o β) : α ≅ β where
  hom := (e : HeytingHom _ _)
  inv := (e.symm : HeytingHom _ _)
  hom_inv_id := by ext; 

Proof state:
case w
α β : HeytAlg
e : ↑α ≃o ↑β
x✝ : (forget HeytAlg).obj α
⊢ ({
          toLatticeHom :=
            { toSupHom := { toFun := ⇑e, map_sup' := (_ : ∀ (a b : ↑α), e (a ⊔ b) = e a ⊔ e b) },
              map_inf' := (_ : ∀ (a b : ↑α), e (a ⊓ b) = e a ⊓ e b) },
          map_bot' := (_ : e ⊥ = ⊥), map_himp' := (_ : ∀ (a b : ↑α), e (a ⇨ b) = e a ⇨ e b) } ≫
        {
          toLatticeHom :=
            {
              toSupHom :=
                { toFun := ⇑(OrderIso.symm e),
                  map_sup' :=
                    (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⊔ b) = (OrderIso.symm e) a ⊔ (OrderIso.symm e) b) },
              map_inf' := (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⊓ b) = (OrderIso.symm e) a ⊓ (OrderIso.symm e) b) },
          map_bot' := (_ : (OrderIso.symm e) ⊥ = ⊥),
          map_himp' := (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⇨ b) = (OrderIso.symm e) a ⇨ (OrderIso.symm e) b) })
      x✝ =
    (𝟙 α) x✝

Next tactic:
exact e.symm_apply_apply _