Theorem: TopCat.Sheaf.eq_of_locally_eq₂
File: Mathlib/Topology/Sheaves/SheafCondition/UniqueGluing.lean

tactic: fapply F.eq_of_locally_eq' fun t : ULift Bool => if t.1 then U₁ else U₂
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : ConcreteCategory C
inst✝² : HasLimits C
inst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget
inst✝ : PreservesLimits ConcreteCategory.forget
X : TopCat
F : Sheaf C X
ι : Type v
U : ι → Opens ↑X
U₁ U₂ V : Opens ↑X
i₁ : U₁ ⟶ V
i₂ : U₂ ⟶ V
hcover : V ≤ U₁ ⊔ U₂
s t : (CategoryTheory.forget C).obj (F.val.obj V.op)
h₁ : (CategoryTheory.forget C).map (F.val.map i₁.op) s = (CategoryTheory.forget C).map (F.val.map i₁.op) t
h₂ : (CategoryTheory.forget C).map (F.val.map i₂.op) s = (CategoryTheory.forget C).map (F.val.map i₂.op) t
⊢ s = t

tactic: exact fun i => if h : i.1 then eqToHom (if_pos h) ≫ i₁ else eqToHom (if_neg h) ≫ i₂
state_before: case iUV
C : Type u
inst✝⁴ : Category C
inst✝³ : ConcreteCategory C
inst✝² : HasLimits C
inst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget
inst✝ : PreservesLimits ConcreteCategory.forget
X : TopCat
F : Sheaf C X
ι : Type v
U : ι → Opens ↑X
U₁ U₂ V : Opens ↑X
i₁ : U₁ ⟶ V
i₂ : U₂ ⟶ V
hcover : V ≤ U₁ ⊔ U₂
s t : (CategoryTheory.forget C).obj (F.val.obj V.op)
h₁ : (CategoryTheory.forget C).map (F.val.map i₁.op) s = (CategoryTheory.forget C).map (F.val.map i₁.op) t
h₂ : (CategoryTheory.forget C).map (F.val.map i₂.op) s = (CategoryTheory.forget C).map (F.val.map i₂.op) t
⊢ (i : ULift Bool) → (if i.down = true then U₁ else U₂) ⟶ V

tactic: refine' le_trans hcover _
state_before: case hcover
C : Type u
inst✝⁴ : Category C
inst✝³ : ConcreteCategory C
inst✝² : HasLimits C
inst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget
inst✝ : PreservesLimits ConcreteCategory.forget
X : TopCat
F : Sheaf C X
ι : Type v
U : ι → Opens ↑X
U₁ U₂ V : Opens ↑X
i₁ : U₁ ⟶ V
i₂ : U₂ ⟶ V
hcover : V ≤ U₁ ⊔ U₂
s t : (CategoryTheory.forget C).obj (F.val.obj V.op)
h₁ : (CategoryTheory.forget C).map (F.val.map i₁.op) s = (CategoryTheory.forget C).map (F.val.map i₁.op) t
h₂ : (CategoryTheory.forget C).map (F.val.map i₂.op) s = (CategoryTheory.forget C).map (F.val.map i₂.op) t
⊢ V ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂

tactic: rw [sup_le_iff]
state_before: case hcover
C : Type u
inst✝⁴ : Category C
inst✝³ : ConcreteCategory C
inst✝² : HasLimits C
inst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget
inst✝ : PreservesLimits ConcreteCategory.forget
X : TopCat
F : Sheaf C X
ι : Type v
U : ι → Opens ↑X
U₁ U₂ V : Opens ↑X
i₁ : U₁ ⟶ V
i₂ : U₂ ⟶ V
hcover : V ≤ U₁ ⊔ U₂
s t : (CategoryTheory.forget C).obj (F.val.obj V.op)
h₁ : (CategoryTheory.forget C).map (F.val.map i₁.op) s = (CategoryTheory.forget C).map (F.val.map i₁.op) t
h₂ : (CategoryTheory.forget C).map (F.val.map i₂.op) s = (CategoryTheory.forget C).map (F.val.map i₂.op) t
⊢ U₁ ⊔ U₂ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂

tactic: constructor
state_before: case hcover
C : Type u
inst✝⁴ : Category C
inst✝³ : ConcreteCategory C
inst✝² : HasLimits C
inst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget
inst✝ : PreservesLimits ConcreteCategory.forget
X : TopCat
F : Sheaf C X
ι : Type v
U : ι → Opens ↑X
U₁ U₂ V : Opens ↑X
i₁ : U₁ ⟶ V
i₂ : U₂ ⟶ V
hcover : V ≤ U₁ ⊔ U₂
s t : (CategoryTheory.forget C).obj (F.val.obj V.op)
h₁ : (CategoryTheory.forget C).map (F.val.map i₁.op) s = (CategoryTheory.forget C).map (F.val.map i₁.op) t
h₂ : (CategoryTheory.forget C).map (F.val.map i₂.op) s = (CategoryTheory.forget C).map (F.val.map i₂.op) t
⊢ (U₁ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂) ∧
    U₂ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂

tactic: convert le_iSup (fun t : ULift Bool => if t.1 then U₁ else U₂) (ULift.up True)
state_before: case hcover.left
C : Type u
inst✝⁴ : Category C
inst✝³ : ConcreteCategory C
inst✝² : HasLimits C
inst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget
inst✝ : PreservesLimits ConcreteCategory.forget
X : TopCat
F : Sheaf C X
ι : Type v
U : ι → Opens ↑X
U₁ U₂ V : Opens ↑X
i₁ : U₁ ⟶ V
i₂ : U₂ ⟶ V
hcover : V ≤ U₁ ⊔ U₂
s t : (CategoryTheory.forget C).obj (F.val.obj V.op)
h₁ : (CategoryTheory.forget C).map (F.val.map i₁.op) s = (CategoryTheory.forget C).map (F.val.map i₁.op) t
h₂ : (CategoryTheory.forget C).map (F.val.map i₂.op) s = (CategoryTheory.forget C).map (F.val.map i₂.op) t
⊢ U₁ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂

tactic: convert le_iSup (fun t : ULift Bool => if t.1 then U₁ else U₂) (ULift.up False)
state_before: case hcover.right
C : Type u
inst✝⁴ : Category C
inst✝³ : ConcreteCategory C
inst✝² : HasLimits C
inst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget
inst✝ : PreservesLimits ConcreteCategory.forget
X : TopCat
F : Sheaf C X
ι : Type v
U : ι → Opens ↑X
U₁ U₂ V : Opens ↑X
i₁ : U₁ ⟶ V
i₂ : U₂ ⟶ V
hcover : V ≤ U₁ ⊔ U₂
s t : (CategoryTheory.forget C).obj (F.val.obj V.op)
h₁ : (CategoryTheory.forget C).map (F.val.map i₁.op) s = (CategoryTheory.forget C).map (F.val.map i₁.op) t
h₂ : (CategoryTheory.forget C).map (F.val.map i₂.op) s = (CategoryTheory.forget C).map (F.val.map i₂.op) t
⊢ U₂ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂

tactic: rintro ⟨_ | _⟩ <;> simp [h₁, h₂]
state_before: case h
C : Type u
inst✝⁴ : Category C
inst✝³ : ConcreteCategory C
inst✝² : HasLimits C
inst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget
inst✝ : PreservesLimits ConcreteCategory.forget
X : TopCat
F : Sheaf C X
ι : Type v
U : ι → Opens ↑X
U₁ U₂ V : Opens ↑X
i₁ : U₁ ⟶ V
i₂ : U₂ ⟶ V
hcover : V ≤ U₁ ⊔ U₂
s t : (CategoryTheory.forget C).obj (F.val.obj V.op)
h₁ : (CategoryTheory.forget C).map (F.val.map i₁.op) s = (CategoryTheory.forget C).map (F.val.map i₁.op) t
h₂ : (CategoryTheory.forget C).map (F.val.map i₂.op) s = (CategoryTheory.forget C).map (F.val.map i₂.op) t
⊢ ∀ (i : ULift Bool),
    (CategoryTheory.forget C).map
        (F.val.map
          (if h : i.down = true then eqToHom (_ : (if i.down = true then U₁ else U₂) = U₁) ≫ i₁
            else eqToHom (_ : (if i.down = true then U₁ else U₂) = U₂) ≫ i₂).op)
        s =
      (CategoryTheory.forget C).map
        (F.val.map
          (if h : i.down = true then eqToHom (_ : (if i.down = true then U₁ else U₂) = U₁) ≫ i₁
            else eqToHom (_ : (if i.down = true then U₁ else U₂) = U₂) ≫ i₂).op)
        t