Definition strict_prefix_history {ora: RandomOracle} (h1 h2: RandomHistory): Prop :=
prefix_history h1 h2 /\ exists n, h1 n <> h2 n.
Definition n_bounded_prefix_history {ora: RandomOracle} (m: nat) (h1 h2: RandomHistory): Prop :=
forall n, (h1 n = None /\ h2 (n + m) = None) \/ h1 n = h2 n.
Definition n_conflict_history {ora: RandomOracle} (n: nat) (h1 h2: RandomHistory): Prop :=
match h1 n, h2 n with
| Some a1, Some a2 => projT1 a1 <> projT1 a2
| Some _, None => True
| None, Some _ => True
| None, None => False
end.
Definition conflict_history {ora: RandomOracle} (h1 h2: RandomHistory): Prop :=
exists n, history_coincide n h1 h2 /\ n_conflict_history n h1 h2.
Definition strict_conflict_history {ora: RandomOracle} (h1 h2: RandomHistory): Prop :=
exists n,
history_coincide n h1 h2 /\
match h1 n, h2 n with
| Some a1, Some a2 => projT1 a1 <> projT1 a2
| _, _ => False
end.

Lemma n_conflict_proper_aux {ora: RandomOracle}: forall n l1 l2 r1 r2,
history_coincide (S n) l1 l2 ->
history_coincide (S n) r1 r2 ->
(history_coincide n l1 r1 /\ n_conflict_history n l1 r1 <->
history_coincide n l2 r2 /\ n_conflict_history n l2 r2).