(** * Partial derivatives *)

Definition partial_derive (m k : nat) (f : R -> R -> R) : R -> R -> R :=
  fun x y => Derive_n (fun t => Derive_n (fun z => f t z) k y) m x.Definition differential (p : nat) (f : R -> R -> R) (x y dx dy : R) : R :=
  sum_f_R0
    (fun m =>
      C p m *
      partial_derive m (p - m)%nat f x y *
      dx ^ m * dy ^ (p - m)%nat)
    p.Definition DL_pol (n : nat) (f : R -> R -> R) (x y dx dy : R) : R :=
  sum_f_R0
    (fun p =>
      differential p f x y dx dy / INR (fact p))
    n.

Lemma Schwarz_aux : forall f x y (eps : posreal), ( forall u v, Rabs (u - x) < eps -> Rabs (v - y) < eps -> ex_derive (fun z : R => f z v) u /\ ex_derive (fun z : R => Derive (fun t => f t z) u) v ) -> forall h k, Rabs h < eps -> Rabs k < eps -> let phi k x := f x (y + k) - f x y in exists u, exists v, Rabs (u - x) <= Rabs h /\ Rabs (v - y) <= Rabs k /\ phi k (x + h) - phi k x = h * k * (Derive (fun z => Derive (fun t => f t z) u) v).