| 1 |
(* Check that the analysis of projectable rel's in an evar instance is up to |
| 2 |
aliases *) |
| 3 |
|
| 4 |
Require Import TestSuite.list. |
| 5 |
|
| 6 |
Definition compose (A B C : Type) (g : B -> C) (f : A -> B) : A -> C := |
| 7 |
fun x : A => g(f x). |
| 8 |
|
| 9 |
Definition map_fuse' : |
| 10 |
forall (A B C : Type) (g : B -> C) (f : A -> B) (xs : list A), |
| 11 |
(map g (map f xs)) = map (compose _ _ _ g f) xs |
| 12 |
:= |
| 13 |
fun A B C g f => |
| 14 |
(fix loop (ys : list A) {struct ys} := |
| 15 |
match ys as ys return (map g (map f ys)) = map (compose _ _ _ g f) ys |
| 16 |
with |
| 17 |
| nil => refl_equal nil |
| 18 |
| cons x xs => |
| 19 |
match loop xs in eq _ a return eq _ (cons (g (f x)) a) with |
| 20 |
| refl_equal => refl_equal (map g (map f (x :: xs))) |
| 21 |
end |
| 22 |
end). |