Debian Codegraph @

test-suite/bugs/bug_1931.v

raw
1
2
3 Set Implicit Arguments.
4
5 Inductive T (A:Set) : Set :=
6 app : T A -> T A -> T A.
7
8 Fixpoint map (A B:Set)(f:A->B)(t:T A) : T B :=
9 match t with
10 app t1 t2 => app (map f t1)(map f t2)
11 end.
12
13 Fixpoint subst (A B:Set)(f:A -> T B)(t:T A) :T B :=
14 match t with
15 app t1 t2 => app (subst f t1)(subst f t2)
16 end.
17
18 (* This is the culprit: *)
19 Definition k0:=Set.
20
21 (** interaction of subst with map *)
22 Lemma substLaw1 (A:k0)(B C:Set)(f: A -> B)(g:B -> T C)(t: T A):
23 subst g (map f t) = subst (fun x => g (f x)) t.
24 Proof.
25 intros.
26 generalize B C f g; clear B C f g.
27 induction t; intros; simpl.
28 f_equal.
29 Admitted.