fact: Definition find_expr (e : expr) (vars : nat) (lp lc : list expr) := match e with | Evar n => if Nat.ltb n vars then Some (List.length lp + n)%nat else None | _ => match find_expr_aux e 0%nat lp with | Some n => Some n | None => find_expr_aux e (length lp + vars)%nat lc end end.
imports: Coq(ZArith Reals List Psatz) Xreal Tree