Fixpoint lookup_block (bs : list block) (id : block_id) : option nat :=
  match bs with
  | [] => None
  | b :: bs' =>
    if Nat.eqb (block_blockid b) id
      then Some (block_payload b)
      else lookup_block bs' id
  end.

Lemma lookup_block_None bs id : lookup_block bs id = None -> ~ exists v, In {| block_blockid := id; block_payload := v |} bs.