Definition valid f := if f is Def _ _ then true else false.Definition empty := @Def (finmap.nil K V) is_true_true.Definition upd k v f := 
  if f is Def fs fpf then 
    if decP (@idP (p k)) is left pf then 
      Def (all_supp_insP v pf fpf)
    else Undef
  else Undef.Definition free k f := 
  if f is Def fs pf then Def (all_supp_remP k pf) else Undef.Definition find k f := if f is Def fs _ then fnd k fs else None.Definition union f1 f2 := 
  if (f1, f2) is (Def fs1 pf1, Def fs2 pf2) then  
    if disj fs1 fs2 then 
      Def (all_supp_fcatP pf1 pf2)
    else Undef
  else Undef.Definition um_filter q f := 
  if f is Def fs pf then Def (all_supp_kfilterP q pf) else Undef.Definition undefb f := if f is Undef then true else false.Definition pts k v := upd k v empty.

(* Specifications: *)
Lemma base_indf (P : base -> Prop) : P Undef -> P empty -> (forall k v f, P f -> valid (union (pts k v) f) -> path ord k (dom f) -> P (union (pts k v) f)) -> forall f, P f.
Lemma base_indb (P : base -> Prop) : P Undef -> P empty -> (forall k v f, P f -> valid (union (pts k v) f) -> (forall x, x \in dom f -> ord x k) -> P (union (pts k v) f)) -> forall f, P f.