Fixpoint depth (A : Formula) : nat :=
  match A with
  | equal _ _ => 0
  | atomic _ _ => 0
  | impH A B => S (max (depth A) (depth B))
  | notH A => S (depth A)
  | forallH _ A => S (depth A)
  end.Definition lt_depth (A B : Formula) : Prop := depth A < depth B.

(* Specifications: *)
Lemma depthImp1 : forall A B : Formula, lt_depth A (impH A B).
Lemma depthImp2 : forall A B : Formula, lt_depth B (impH A B).
Lemma depthNot : forall A : Formula, lt_depth A (notH A).
Lemma depthForall : forall (A : Formula) (v : nat), lt_depth A (forallH v A).
Lemma eqDepth : forall A B C : Formula, depth B = depth A -> lt_depth B C -> lt_depth A C.