-- Lean 4 proof step from Mathlib.AlgebraicGeometry.AffineTransitionLimit (goal)
Goal:
I : Type u
inst : Category.{u, u} I
D : I ⥤ Scheme
c : Cone D
hc : IsLimit c
inst_1 : IsCofiltered I
inst_2 : ∀ {i j : I} (f : i ⟶ j), IsAffineHom (D.map f)
inst_3 : ∀ (i : I), CompactSpace.{u} ↥(D.obj i)
inst_4 : ∀ (i : I), QuasiSeparatedSpace.{u} ↥(D.obj i)
inst_5 : IsQuasiAffine.{u} c.pt
x : ↥c.pt
i : I
U : TopologicalSpace.Opens ↥(D.obj i)
hU : Membership.mem (γ := Set (TopologicalSpace.Opens ↥(D.obj i))) (D.obj i).affineOpens U
hxU : Membership.mem (α := ↥(D.obj i)) (↑U : Set ↥(D.obj i)) ((c.π.app i) x : ↥(D.obj i))
j : I
r : (↑Γ(D.obj j, ⊤) : Type u)
hr :
  IsAffineOpen.{u} (X := c.pt)
    (c.pt.basicOpen (U := ⊤)
      ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{u}) ↦ (↑R : Type u) →+* (↑S : Type u)) (CC :=
            CommRingCat.carrier) (Hom.appTop (c.π.app j)) :
          (a : (↑Γ(D.obj j, ⊤) : Type u)) → (↑Γ(((Functor.const I).obj c.pt).obj j, ⊤) : Type u))
        r))
hxr :
  x ∈
    (↑(c.pt.basicOpen (U := ⊤)
          ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{u}) ↦ (↑R : Type u) →+* (↑S : Type u)) (CC :=
                CommRingCat.carrier) (Hom.appTop (c.π.app j)) :
              (a : (↑Γ(D.obj j, ⊤) : Type u)) → (↑Γ(((Functor.const I).obj c.pt).obj j, ⊤) : Type u))
            r)) :
      Set ↥c.pt)
hrU :
  (↑(c.pt.basicOpen (U := ⊤)
          ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{u}) ↦ (↑R : Type u) →+* (↑S : Type u)) (CC :=
                CommRingCat.carrier) (Hom.appTop (c.π.app j)) :
              (a : (↑Γ(D.obj j, ⊤) : Type u)) → (↑Γ(((Functor.const I).obj c.pt).obj j, ⊤) : Type u))
            r)) :
      Set ↥c.pt) ⊆
    (↑(c.π.app i ⁻¹ᵁ U) : Set ↥(((Functor.const I).obj c.pt).obj i))
k : I
fki : k ⟶ i
fkj : k ⟶ j
l : I
flk : l ⟶ k
hl :
  D.map flk ⁻¹ᵁ
      (D.obj k).basicOpen (U := ⊤)
        ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{u}) ↦ (↑R : Type u) →+* (↑S : Type u)) (CC :=
              CommRingCat.carrier) (Hom.appTop (D.map fkj)) :
            (a : (↑Γ(D.obj j, ⊤) : Type u)) → (↑Γ(D.obj k, ⊤) : Type u))
          r) ≤
    D.map flk ⁻¹ᵁ D.map fki ⁻¹ᵁ U
⊢ x ∈
    c.π.app l ⁻¹ᵁ
      (D.obj l).basicOpen (U := ⊤)
        ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{u}) ↦ (↑R : Type u) →+* (↑S : Type u)) (CC :=
              CommRingCat.carrier) (Hom.appTop (D.map (flk ≫ fkj))) :
            (a : (↑Γ(D.obj j, ⊤) : Type u)) → (↑Γ(D.obj l, ⊤) : Type u))
          r)
have refine_2 : Membership.mem (γ := (Functor.obj (Functor.obj (Functor.const I) c.pt) l).Opens)
  ((Functor.obj (Functor.obj (Functor.const I) c.pt) l).basicOpen (U := ⊤)
    ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{u}) ↦ (↑R : Type u) →+* (↑S : Type u)) (CC :=
          CommRingCat.carrier) (Hom.appTop (c.π.app l)) :
        (a : (↑Γ(D.obj l, ⊤) : Type u)) → (↑Γ(((Functor.const I).obj c.pt).obj l, ⊤) : Type u))
      ((ConcreteCategory.hom (FC := fun (R S : CommRingCat.{u}) ↦ (↑R : Type u) →+* (↑S : Type u)) (CC :=
              CommRingCat.carrier) (Hom.appTop (D.map (flk ≫ fkj))) :
            (a : (↑Γ(D.obj j, ⊤) : Type u)) → (↑Γ(D.obj l, ⊤) : Type u))
          r :
        (↑Γ(D.obj l, ⊤) : Type u))))
  x
Tactic: rwa [Scheme.preimage_basicOpen_top, ← elementwise_of% Scheme.Hom.comp_appTop, Cone.w]