| 1 |
(* correct failure of injection/discriminate on types whose inductive |
| 2 |
status derives from the substitution of an argument *) |
| 3 |
|
| 4 |
Unset Structural Injection. |
| 5 |
|
| 6 |
Inductive t : nat -> Type := |
| 7 |
| M : forall n: nat, nat -> t n. |
| 8 |
|
| 9 |
Lemma eq_t : forall n n' m m', |
| 10 |
existT (fun B : Type => B) (t n) (M n m) = |
| 11 |
existT (fun B : Type => B) (t n') (M n' m') -> True. |
| 12 |
Proof. |
| 13 |
intros. |
| 14 |
injection H. |
| 15 |
intro Ht. |
| 16 |
exact I. |
| 17 |
Qed. |
| 18 |
|
| 19 |
Lemma eq_t' : forall n n' : nat, |
| 20 |
existT (fun B : Type => B) (t n) (M n 0) = |
| 21 |
existT (fun B : Type => B) (t n') (M n' 1) -> True. |
| 22 |
Proof. |
| 23 |
intros. |
| 24 |
discriminate H || exact I. |
| 25 |
Qed. |