File: bug_13157.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (24 lines) | stat: -rw-r--r-- 832 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Generalizable Variable A.
Implicit Type A : Type.

Definition works2344 : forall `(l : list A) (l' : list A), unit :=
  fix flist `(l : list A) (l' : list A) {struct l'} := tt.
Check eq_refl : @works2344 = (fix flist A l l' {struct l'} := tt).

Definition fails : forall `(l: list A), unit :=
  fix flist `(l : list A) {struct l} := tt.
Check eq_refl : @fails = (fix flist A l {struct l} := tt).
(*
Error:
Recursive definition of flist is ill-formed.
In environment
flist : forall A : Type, list A -> unit
Recursive definition on "Type"
which should be a recursive inductive type.
Recursive definition is: "fun (A : Type) (_ : list A) => tt".
*)

Definition fails2
: forall `(l : list A) (l' : list A), unit :=
  fix flist `(l : list A) (l' : list A) {struct l} := tt.
Check eq_refl : @fails2 = (fix flist A l l' {struct l} := tt).