awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Topology.Gluing (hypothesis)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
i : (ofOpenSubsets U).J
x : (↑(of α) : Type u)
hx : x ∈ U i
j : (ofOpenSubsets U).J
y : (↑(of α) : Type u)
hy : y ∈ U j
e :
  Eq (α := (↑(of α) : Type u))
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
            (fromOpenSubsetsGlue U) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u))
        ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
                (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
              (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
            (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx) :
          (↑(ofOpenSubsets U).glued : Type u)) :
      (↑(of α) : Type u))
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
            (fromOpenSubsetsGlue U) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u))
        ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
                (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι j) :
              (a : (↑((ofOpenSubsets U).U j) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
            (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U j) y hy) :
          (↑(ofOpenSubsets U).glued : Type u)) :
      (↑(of α) : Type u))
⊢ Eq (α := (↑(ofOpenSubsets U).glued : Type u))
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx) :
      (↑(ofOpenSubsets U).glued : Type u))
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι j) :
          (a : (↑((ofOpenSubsets U).U j) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U j) y hy) :
      (↑(ofOpenSubsets U).glued : Type u))
have e₁ : Eq (α := (↑(of α) : Type u))
  ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
          (ofOpenSubsets U).U i) (U i).inclusion' :
        (a : (↑((ofOpenSubsets U).U i) : Type u)) → α)
      (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx) :
    α)
  ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
          (ofOpenSubsets U).U j) (U j).inclusion' :
        (a : (↑((ofOpenSubsets U).U j) : Type u)) → α)
      (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U j) y hy) :
    α)
Tactic: rw [ι_fromOpenSubsetsGlue_apply, ι_fromOpenSubsetsGlue_apply] at e
Cleared hypotheses: e
-- Lean 4 proof step from Mathlib.Topology.Gluing (goal)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
i : (ofOpenSubsets U).J
x : (↑(of α) : Type u)
hx : x ∈ U i
j : (ofOpenSubsets U).J
hy :
  Membership.mem (α := (↑(of α) : Type u)) (U j)
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
            (ofOpenSubsets U).U i) (U i).inclusion' :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → α)
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx) :
      α)
⊢ Eq (α := (↑(ofOpenSubsets U).glued : Type u))
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx) :
      (↑(ofOpenSubsets U).glued : Type u))
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι j) :
          (a : (↑((ofOpenSubsets U).U j) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U j)
            ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
                  (X := (ofOpenSubsets U).U i) (U i).inclusion' :
                (a : (↑((ofOpenSubsets U).U i) : Type u)) → α)
              (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx))
            hy :
          ↥(U j)) :
      (↑(ofOpenSubsets U).glued : Type u))
have rw : (ofOpenSubsets U).Rel
  (Sigma.mk (β := fun (i : (ofOpenSubsets U).J) ↦ (↑((ofOpenSubsets U).U i) : Type u)) i
    (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx))
  (Sigma.mk (β := fun (i : (ofOpenSubsets U).J) ↦ (↑((ofOpenSubsets U).U i) : Type u)) j
    (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U j)
      ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
            (ofOpenSubsets U).U i) (U i).inclusion' :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → α)
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx))
      hy))
Tactic: rw [(ofOpenSubsets U).ι_eq_iff_rel]
-- Lean 4 proof step from Mathlib.Topology.Gluing (hypothesis)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
s : Set (↑(ofOpenSubsets U).glued : Type u)
hs : IsOpen s
⊢ IsOpen[inst]
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
            (fromOpenSubsetsGlue U)) :
        (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
      s)
have hs₁ : ∀ (i : (ofOpenSubsets U).J),
  IsOpen (X := (↑((ofOpenSubsets U).U i) : Type u))
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
        (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
      s)
Tactic: rw [(ofOpenSubsets U).isOpen_iff] at hs
Cleared hypotheses: hs
-- Lean 4 proof step from Mathlib.Topology.Gluing (goal)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
s : Set (↑(ofOpenSubsets U).glued : Type u)
hs :
  ∀ (i : (ofOpenSubsets U).J),
    IsOpen (X := (↑((ofOpenSubsets U).U i) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
              (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
        s)
⊢ IsOpen[inst]
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
            (fromOpenSubsetsGlue U)) :
        (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
      s)
have rw : ∀ (x : (↑(of α) : Type u)),
  Membership.mem (γ := Set (↑(of α) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
              (fromOpenSubsetsGlue U)) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
        s)
      x →
    ∃
      t ⊆
        (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
                (fromOpenSubsetsGlue U)) :
            (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
          s,
      IsOpen[inst] t ∧ x ∈ t
Tactic: rw [isOpen_iff_forall_mem_open]
-- Lean 4 proof step from Mathlib.Topology.Gluing (goal)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
s : Set (↑(ofOpenSubsets U).glued : Type u)
hs :
  ∀ (i : (ofOpenSubsets U).J),
    IsOpen (X := (↑((ofOpenSubsets U).U i) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
              (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
        s)
x : (↑(ofOpenSubsets U).glued : Type u)
hx : x ∈ s
⊢ ∃
    t ⊆
      (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
              (fromOpenSubsetsGlue U)) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
        s,
    IsOpen[inst] t ∧
      Membership.mem (α := (↑(of α) : Type u)) t
        ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
                (fromOpenSubsetsGlue U) :
              (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u))
            x :
          (↑(of α) : Type u))
have obtain : ∀ (i : (ofOpenSubsets U).J) (x : (↑(of α) : Type u)) (hx' : x ∈ U i)
  (hx :
    Membership.mem (α := (↑(ofOpenSubsets U).glued : Type u)) s
      ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
              (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
            (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
          (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx') :
        (↑(ofOpenSubsets U).glued : Type u))),
  ∃
    t ⊆
      (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
              (fromOpenSubsetsGlue U)) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
        s,
    IsOpen[inst] t ∧
      Membership.mem (α := (↑(of α) : Type u)) t
        ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
                (fromOpenSubsetsGlue U) :
              (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u))
            ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
                    (Y := (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
                  (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
                (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx') :
              (↑(ofOpenSubsets U).glued : Type u)) :
          (↑(of α) : Type u))
Tactic: obtain ⟨i, ⟨x, hx'⟩, rfl⟩ := (ofOpenSubsets U).ι_jointly_surjective x
Cleared hypotheses: x, hx
-- Lean 4 proof step from Mathlib.Topology.Gluing (goal)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
s : Set (↑(ofOpenSubsets U).glued : Type u)
hs :
  ∀ (i : (ofOpenSubsets U).J),
    IsOpen (X := (↑((ofOpenSubsets U).U i) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
              (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
        s)
i : (ofOpenSubsets U).J
x : (↑(of α) : Type u)
hx' : x ∈ U i
hx :
  Membership.mem (α := (↑(ofOpenSubsets U).glued : Type u)) s
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx') :
      (↑(ofOpenSubsets U).glued : Type u))
⊢ IsOpen[inst]
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
              (fromOpenSubsetsGlue U)) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
        s ∩
      Set.range (ι := (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u))
        (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
              Functor.obj (Opens.toTopCat (of α)) (U i)) (U i).inclusion') :
          (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(of α) : Type u)))
have right : IsOpen[inst]
  (Set.image (α := (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u))
    (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
          Functor.obj (Opens.toTopCat (of α)) (U i)) (U i).inclusion') :
      (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(of α) : Type u))
    (Set.preimage (β := (↑(of α) : Type u))
      (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
            Functor.obj (Opens.toTopCat (of α)) (U i)) (U i).inclusion') :
        (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(of α) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
              (fromOpenSubsetsGlue U)) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
        s)))
Tactic: rw [← Set.image_preimage_eq_inter_range]
-- Lean 4 proof step from Mathlib.Topology.Gluing (goal)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
s : Set (↑(ofOpenSubsets U).glued : Type u)
hs :
  ∀ (i : (ofOpenSubsets U).J),
    IsOpen (X := (↑((ofOpenSubsets U).U i) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
              (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
        s)
i : (ofOpenSubsets U).J
x : (↑(of α) : Type u)
hx' : x ∈ U i
hx :
  Membership.mem (α := (↑(ofOpenSubsets U).glued : Type u)) s
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx') :
      (↑(ofOpenSubsets U).glued : Type u))
⊢ IsOpen[inst]
    (Set.image (α := (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u))
      (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
            Functor.obj (Opens.toTopCat (of α)) (U i)) (U i).inclusion') :
        (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(of α) : Type u))
      (Set.preimage (β := (↑(of α) : Type u))
        (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
              Functor.obj (Opens.toTopCat (of α)) (U i)) (U i).inclusion') :
          (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(of α) : Type u))
        ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
                (fromOpenSubsetsGlue U)) :
            (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
          s)))
have right : IsOpen (X := (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u))
  (Set.preimage (β := (↑(of α) : Type u))
    (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
          Functor.obj (Opens.toTopCat (of α)) (U i)) (U i).inclusion') :
      (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(of α) : Type u))
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
            (fromOpenSubsetsGlue U)) :
        (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
      s))
Tactic: apply (Opens.isOpenEmbedding (X := TopCat.of α) (U i)).isOpenMap
-- Lean 4 proof step from Mathlib.Topology.Gluing (goal)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
s : Set (↑(ofOpenSubsets U).glued : Type u)
hs :
  ∀ (i : (ofOpenSubsets U).J),
    IsOpen (X := (↑((ofOpenSubsets U).U i) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
              (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
        s)
i : (ofOpenSubsets U).J
x : (↑(of α) : Type u)
hx' : x ∈ U i
hx :
  Membership.mem (α := (↑(ofOpenSubsets U).glued : Type u)) s
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx') :
      (↑(ofOpenSubsets U).glued : Type u))
⊢ IsOpen (X := (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u))
    (Set.preimage (β := (↑(of α) : Type u))
      (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
            Functor.obj (Opens.toTopCat (of α)) (U i)) (U i).inclusion') :
        (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(of α) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
              (fromOpenSubsetsGlue U)) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
        s))
have h : (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u) = (↑((ofOpenSubsets U).U i) : Type u) →
  Eq (α := Set (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u))
    (Set.preimage (β := (↑(of α) : Type u))
      (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (X :=
            Functor.obj (Opens.toTopCat (of α)) (U i)) (U i).inclusion') :
        (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(of α) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
              (fromOpenSubsetsGlue U)) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
        s))
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
        (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
      s)
Tactic: convert! hs i using 1
-- Lean 4 proof step from Mathlib.Topology.Gluing (goal)
Goal:
α : Type u
inst : TopologicalSpace α
J : Type u
U : J → Opens α
s : Set (↑(ofOpenSubsets U).glued : Type u)
hs :
  ∀ (i : (ofOpenSubsets U).J),
    IsOpen (X := (↑((ofOpenSubsets U).U i) : Type u))
      ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
              (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
        s)
i : (ofOpenSubsets U).J
x : (↑(of α) : Type u)
hx' : x ∈ U i
hx :
  Membership.mem (α := (↑(ofOpenSubsets U).glued : Type u)) s
    ((ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i) :
          (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
        (Subtype.mk (p := fun (x : (↑(of α) : Type u)) ↦ x ∈ U i) x hx') :
      (↑(ofOpenSubsets U).glued : Type u))
e_1 : (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u) = (↑((ofOpenSubsets U).U i) : Type u)
⊢ Eq (α := Set (↑(Functor.obj (Opens.toTopCat (of α)) (U i)) : Type u))
    (Set.preimage (β := (↑(ofOpenSubsets U).glued : Type u))
      (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
        (a : (↑((Opens.toTopCat (of α)).obj (U i)) : Type u)) → (↑(ofOpenSubsets U).glued : Type u))
      (Set.preimage (β := (↑(of α) : Type u))
        (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
              (fromOpenSubsetsGlue U)) :
          (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u))
        ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
                (fromOpenSubsetsGlue U)) :
            (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
          s)))
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier) (Y :=
            (ofOpenSubsets U).glued) ((ofOpenSubsets U).ι i)) :
        (a : (↑((ofOpenSubsets U).U i) : Type u)) → (↑(ofOpenSubsets U).glued : Type u)) ⁻¹'
      s)
have h : Set.preimage (β := (↑(of α) : Type u))
    (⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
          (fromOpenSubsetsGlue U)) :
      (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u))
    ((⇑(ConcreteCategory.hom (FC := fun (X Y : TopCat.{u}) ↦ C((↑X : Type u), (↑Y : Type u))) (CC := carrier)
            (fromOpenSubsetsGlue U)) :
        (a : (↑(ofOpenSubsets U).glued : Type u)) → (↑(of α) : Type u)) ''
      s) =
  s
Tactic: congr! 1