(** * Iterated differential *)

Fixpoint ex_diff_n f n x y :=
  continuity_2d_pt f x y /\
  match n with
  | O => True
  | S n =>
    ex_derive (fun z => f z y) x /\
    ex_derive (fun z => f x z) y /\
    ex_diff_n (fun u v => Derive (fun z => f z v) u) n x y /\
    ex_diff_n (fun u v => Derive (fun z => f u z) v) n x y
  end.

Lemma Derive_partial_derive_aux2: forall p k f x y, locally_2d (ex_diff_n f (p+S k)) x y -> partial_derive 0 1 (partial_derive p k f) x y = partial_derive p (S k) f x y.