Skip to content

Definition works with implicit arguments but does not work with explicit ones #698

@slyfr

Description

@slyfr

The following definition is not accepted by Rocq :

Equations alternate (A:Type) (l1 l2: list A) : list A by wf (length l1 + length l2 ) lt :=
  alternate nil l := l;
  alternate l nil := l;
  alternate (cons x xs) l := cons x (alternate l xs).

but when A is made implicit, everything works fine :

Equations alternate {A:Type} (l1 l2: list A) : list A by wf (length l1 + length l2 ) lt :=
  alternate nil l := l;
  alternate l nil := l;
  alternate (cons x xs) l := cons x (alternate l xs).

I think both should work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions