-- File: optlib/Optlib/Algorithm/BCD/Scheme.lean
Theorem statement:
theorem extracted_formal_statement_21.{u_2, u_1} {E : Type u_1} {F : Type u_2} [inst : NormedAddCommGroup E]
  [inst_1 : InnerProductSpace ℝ E] [inst_2 : CompleteSpace E] [inst_3 : NormedAddCommGroup F]
  [inst_4 : InnerProductSpace ℝ F] [inst_5 : CompleteSpace F] {H : WithLp 2 (E × F) → ℝ} (h : Differentiable ℝ H)
  (z : WithLp 2 (E × F)) : ((gradient H z).1, (gradient H z).2) = (grad_fst H z.2 z.1, grad_snd H z.1 z.2) := sorry

Tactic state before:
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ F
inst✝ : CompleteSpace F
H : WithLp 2 (E × F) → ℝ
h : Differentiable ℝ H
z : WithLp 2 (E × F)
⊢ ((gradient H z).1, (gradient H z).2) = (grad_fst H z.2 z.1, grad_snd H z.1 z.2)

Tactic: rw [← grad_fst_eq h, ← grad_snd_eq h]

Tactic state after:

Premises used:
grad_fst_eq : ∀ {E : Type u_1} {F : Type u_2} [inst : NormedAddCommGroup E] [inst_6 : InnerProductSpace ℝ E]
  [inst_7 : CompleteSpace E] [inst_8 : NormedAddCommGroup F] [inst_9 : InnerProductSpace ℝ F]
  [inst_10 : CompleteSpace F] {H : WithLp 2 (E × F) → ℝ},
  Differentiable ℝ H → ∀ (z : WithLp 2 (E × F)), (gradient H z).1 = grad_fst H z.2 z.1
grad_snd_eq : ∀ {E : Type u_1} {F : Type u_2} [inst : NormedAddCommGroup E] [inst_6 : InnerProductSpace ℝ E]
  [inst_7 : CompleteSpace E] [inst_8 : NormedAddCommGroup F] [inst_9 : InnerProductSpace ℝ F]
  [inst_10 : CompleteSpace F] {H : WithLp 2 (E × F) → ℝ},
  Differentiable ℝ H → ∀ (z : WithLp 2 (E × F)), (gradient H z).2 = grad_snd H z.1 z.2