diff options
author | Samuel Mimram <smimram@debian.org> | 2006-04-28 14:59:16 +0000 |
---|---|---|
committer | Samuel Mimram <smimram@debian.org> | 2006-04-28 14:59:16 +0000 |
commit | 2c4a6b4efe55a2c6ca9ca7b185723e7909e57269 (patch) | |
tree | e1542c8adb83ff297284eefc23a2703461713d9b /test-suite/success/simpl.v | |
parent | 514dce2dfe717e3ed2e37dce6467b56219d451c1 (diff) | |
parent | 3ef7797ef6fc605dfafb32523261fe1b023aeecb (diff) |
Merge commit 'upstream/8.0pl3+8.1alpha' into 8.0pl3+8.1alpha
Diffstat (limited to 'test-suite/success/simpl.v')
-rw-r--r-- | test-suite/success/simpl.v | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test-suite/success/simpl.v b/test-suite/success/simpl.v new file mode 100644 index 00000000..8d32b1d9 --- /dev/null +++ b/test-suite/success/simpl.v @@ -0,0 +1,24 @@ +(* Check that inversion of names of mutual inductive fixpoints works *) +(* (cf bug #1031) *) + +Inductive tree : Set := +| node : nat -> forest -> tree +with forest : Set := +| leaf : forest +| cons : tree -> forest -> forest + . +Definition copy_of_compute_size_forest := +fix copy_of_compute_size_forest (f:forest) : nat := + match f with + | leaf => 1 + | cons t f0 => copy_of_compute_size_forest f0 + copy_of_compute_size_tree t + end +with copy_of_compute_size_tree (t:tree) : nat := + match t with + | node _ f => 1 + copy_of_compute_size_forest f + end for copy_of_compute_size_forest +. +Eval simpl in (copy_of_compute_size_forest leaf). + + + |