| @b' ∘ a = a' ∘ b@ where /a/ and /b/ are random operations and
-- @(a', b') = transform(a, b)@. Note that this is a stronger property than
-- 'prop_transform_apply_comm', because 'prop_transform_comm' and
-- 'prop_apply_functorial' imply 'prop_transform_apply_comm'.
prop_transform_comm
  :: TestableOTSystem doc op
  => ConcurrentDocHistories doc op One One
  -> Result
prop_transform_comm (CDH (SS _ a _) (SS _ b _)) =
  eitherResult (transform a b) $ \(a', b') ->
  eitherResult (compose a b') $ \ab' ->
  eitherResult (compose b a') $ \ba' ->
  ab' ==? ba'

-- | T
prop_transform_comm
  :: TestableOTSystem doc op
  => ConcurrentDocHistories doc op One One
  -> Result
prop_transform_comm (CDH (SS _ a _) (SS _ b _)) =
  eitherResult (transform a b) $ \(a', b') ->
  eitherResult (compose a b') $ \ab' ->
  eitherResult (compose b a') $ \ba' ->
  ab' ==? ba'
prop_transform_comm (CDH (SS _ a _) (SS _ b _)) =
  eitherResult (transform a b) $ \(a', b') ->
  eitherResult (compose a b') $ \ab' ->
  eitherResult (compose b a') $ \ba' ->
  ab' ==? ba'