private theorem sSup_aux (c : Set (E →ₗ.[R] F)) (hc : DirectedOn (· ≤ ·) c) :
    ∃ f : ↥(sSup (domain '' c)) →ₗ[R] F, (⟨_, f⟩ : E →ₗ.[R] F) ∈ upperBounds c := by
  rcases c.eq_empty_or_nonempty with ceq | cne
  · subst c
    simp
  have hdir : DirectedOn (· ≤ ·) (domain '' c) :=
    directedOn_image.2 (hc.mono @(domain_mono.monotone))
  have P : ∀ x : ↥(sSup (domain '' c)), { p : c // (x : E) ∈ p.val.domain } := by
    rintro x
    apply Classical.indefiniteDescription
    have := (mem_sSup_of_directed (cne.image _) hdir).1 x.2
    -- Porting note: + `← bex_def`
    rwa [Set.bex_image_iff, ← bex_def, SetCoe.exists'] at this
  set f : ↥(sSup (domain '' c)) → F := fun x => (P x).val.val ⟨x, (P x).property⟩
  have f_eq : ∀ (p : c) (x : ↥(sSup (domain '' c))) (y : p.1.1) (_hxy : (x : E) = y),
      f x = p.1 y := by
    intro p x y hxy
    rcases hc (P x).1.1 (P x).1.2 p.1 p.2 with ⟨q, _hqc, hxq, hpq⟩
    -- Porting note: `refine' ..; exacts [inclusion hpq.1 y, hxy, rfl]`
    --               → `refine' .. <;> [skip; exact inclusion hpq.1 y; rfl]; exact hxy`
    refine' (hxq.2 _).trans (hpq.2 _).symm <;> [skip; exact inclusion hpq.1 y; rfl]; exact hxy
  refine' ⟨{ toFun := f.. }, _⟩
  · intro x y
    rcases hc (P x).1.1 (P x).1.2 (P y).1.1 (P y).1.2 with ⟨p, hpc, hpx, hpy⟩
    set x' := inclusion hpx.1 ⟨x, (P x).2⟩
    set y' := inclusion hpy.1 ⟨y, (P y).2⟩
    rw [f_eq ⟨p, hpc⟩ x x' rfl, f_eq ⟨p, hpc⟩ y y' rfl, f_eq ⟨p, hpc⟩ (x + y) (x' + y') rfl,
      map_add]
  · intro c x
    -- Porting note: `simp [..]` to `simp only [..]`, or timeouts.
    simp only [f_eq (P x).1 (c • x) (c • ⟨x, (P x).2⟩) rfl, ← map_smul, RingHom.id_apply]
  · intro p hpc
    refine' ⟨le_sSup <| Set.mem_image_of_mem domain hpc, fun x y hxy => Eq.symm _⟩
    

Proof state:
case inr.refine'_3
R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
c : Set (E →ₗ.[R] F)
hc : DirectedOn (fun x x_1 => x ≤ x_1) c
cne : Set.Nonempty c
hdir : DirectedOn (fun x x_1 => x ≤ x_1) (domain '' c)
P : (x : ↥(sSup (domain '' c))) → { p // ↑x ∈ (↑p).domain }
f : ↥(sSup (domain '' c)) → F := fun x => ↑↑↑(P x) { val := ↑x, property := (_ : ↑x ∈ (↑↑(P x)).domain) }
f_eq : ∀ (p : ↑c) (x : ↥(sSup (domain '' c))) (y : ↥(↑p).domain), ↑x = ↑y → f x = ↑↑p y
p : E →ₗ.[R] F
hpc : p ∈ c
x : ↥p.domain
y :
  ↥{ domain := sSup (domain '' c),
        toFun :=
          { toAddHom := { toFun := f, map_add' := (_ : ∀ (x y : ↥(sSup (domain '' c))), f (x + y) = f x + f y) },
            map_smul' :=
              (_ :
                ∀ (c_1 : R) (x : ↥(sSup (domain '' c))),
                  f (c_1 • x) = c_1 • ↑↑↑(P x) { val := ↑x, property := (_ : ↑x ∈ (↑↑(P x)).domain) }) } }.domain
hxy : ↑x = ↑y
⊢ ↑{ domain := sSup (domain '' c),
          toFun :=
            { toAddHom := { toFun := f, map_add' := (_ : ∀ (x y : ↥(sSup (domain '' c))), f (x + y) = f x + f y) },
              map_smul' :=
                (_ :
                  ∀ (c_1 : R) (x : ↥(sSup (domain '' c))),
                    f (c_1 • x) = c_1 • ↑↑↑(P x) { val := ↑x, property := (_ : ↑x ∈ (↑↑(P x)).domain) }) } }
      y =
    ↑p x

Next tactic:
exact f_eq ⟨p, hpc⟩ _ _ hxy.symm