Definition judgsize (p:cbv) := term_size (proj_left p) + value_size (proj_right p).

Theorem max_active_size_bound qic qif cs: forall i s p c f lv d v, valid_QI qic qif cs -> let t := (fapply f lv) in let pi := cbv_update i s p c t d v in let l:= (map (fun x=> mcs * (term_size t)) lv) in let S := max_active_size pi in wf pi -> cache_bounded qic qif c -> S <= (max_arity + 1) * (qif f l) + 1.