Skip to content

Unprovable list lemma split_of_app_right #34

Description

@palmskog

The lemma split_of_app_right in systems/chord-props/QueryInvariant.v is unprovable as currently stated:

Lemma split_of_app_right :
  forall A (l l' : list A) xs a ys,
    l ++ l' = xs ++ a :: ys ->
    In a l' ->
    exists xs',
      xs = l ++ xs' /\
      l' = xs' ++ a :: ys.

To see why, set l = a0 :: l0 (for some a0 : A and l0 : list A) and xs = []. Then, we have to prove exists xs', [] = a0 :: l0 ++ xs', which is clearly impossible.

It may be possible to save the lemma by ruling out this case (e.g., by requiring xs <> []).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions