 | @b'(a(d)) = a'(b(d))@ where /a/ and /b/ are random operations, /d/ is the
-- initial document and @(a', b') = transform(a, b)@.
prop_transform_apply_comm
  :: TestableOTSystem doc op
  => ConcurrentDocHistories doc op One One
  -> Result
prop_transform_apply_comm (CDH (SS _ a (LS docA)) (SS _ b (LS docB))) =
  eitherResult (transform a b) $ \(a', b') ->
  eitherResult (apply a' docB) $ \doc''1 ->
  eitherResult (apply b' docA) $ \doc''2 ->
  doc''1 ==? doc''2

-
prop_transform_apply_comm
  :: TestableOTSystem doc op
  => ConcurrentDocHistories doc op One One
  -> Result
prop_transform_apply_comm (CDH (SS _ a (LS docA)) (SS _ b (LS docB))) =
  eitherResult (transform a b) $ \(a', b') ->
  eitherResult (apply a' docB) $ \doc''1 ->
  eitherResult (apply b' docA) $ \doc''2 ->
  doc''1 ==? doc''2
prop_transform_apply_comm (CDH (SS _ a (LS docA)) (SS _ b (LS docB))) =
  eitherResult (transform a b) $ \(a', b') ->
  eitherResult (apply a' docB) $ \doc''1 ->
  eitherResult (apply b' docA) $ \doc''2 ->
  doc''1 ==? doc''2