type label = | Axiom | AndI | AndE | OrI | OrE | ArrI | ArrE | NegI | NegE | RAA | IffI | IffE | EqI | EqE | ForallI | ForallE | ExistsI | ExistsE type pref = Linenum of int | Named of string type t = { children : pref list; label : label; formula : Formula.t } val valid : (pref -> t) -> Formula.t list -> t -> bool