|
1 | 1 | Require Import Coq.Lists.List.
|
2 | 2 | Require Import Relations RelationClasses.
|
3 |
| -Require Import ExtLib.Core.Type. |
4 | 3 | Require Import ExtLib.Core.RelDec.
|
5 |
| -Require Import ExtLib.Structures.Proper. |
6 | 4 | Require Import ExtLib.Data.SigT.
|
7 | 5 | Require Import ExtLib.Data.Member.
|
8 | 6 | Require Import ExtLib.Data.ListNth.
|
@@ -453,54 +451,6 @@ Section hlist.
|
453 | 451 | Qed.
|
454 | 452 |
|
455 | 453 | Section type.
|
456 |
| - Variable eqv : forall x, type (F x). |
457 |
| - |
458 |
| - Global Instance type_hlist (ls : list iT): type (hlist ls) := |
459 |
| - { equal := @equiv_hlist (fun x => @equal _ (eqv x)) ls |
460 |
| - ; proper := |
461 |
| - (fix recur ls (h : hlist ls) : Prop := |
462 |
| - match h with |
463 |
| - | Hnil => True |
464 |
| - | Hcons _ _ x y => proper x /\ recur _ y |
465 |
| - end) ls |
466 |
| - }. |
467 |
| - |
468 |
| - Variable eqvOk : forall x, typeOk (eqv x). |
469 |
| - |
470 |
| - Global Instance typeOk_hlist (ls : list iT): typeOk (type_hlist ls). |
471 |
| - Proof. |
472 |
| - constructor. |
473 |
| - { induction ls; intros. |
474 |
| - { rewrite (hlist_eta x) in *. rewrite (hlist_eta y) in *. |
475 |
| - clear. compute; auto. } |
476 |
| - { rewrite (hlist_eta x) in *. rewrite (hlist_eta y) in *. |
477 |
| - simpl in H. |
478 |
| - inv_all. eapply IHls in H1. |
479 |
| - eapply only_proper in H0; eauto. |
480 |
| - simpl; tauto. } } |
481 |
| - { intro. induction ls; simpl. |
482 |
| - { rewrite (hlist_eta x); intros; constructor. } |
483 |
| - { rewrite (hlist_eta x); intros; intuition; constructor. |
484 |
| - eapply preflexive; [ | eauto with typeclass_instances ]. |
485 |
| - eauto with typeclass_instances. |
486 |
| - eapply IHls; eauto. } } |
487 |
| - { red. induction 1. |
488 |
| - { constructor. } |
489 |
| - { constructor. symmetry. assumption. assumption. } } |
490 |
| - { red. induction 1. |
491 |
| - { auto. } |
492 |
| - { intro H1. |
493 |
| - etransitivity; [ | eassumption ]. |
494 |
| - constructor; eauto. } } |
495 |
| - Qed. |
496 |
| - |
497 |
| - Global Instance proper_hlist_app l l' : proper (@hlist_app l l'). |
498 |
| - Proof. |
499 |
| - do 6 red. induction 1; simpl; auto. |
500 |
| - { intros. constructor; eauto. |
501 |
| - eapply IHequiv_hlist. exact H1. } |
502 |
| - Qed. |
503 |
| - |
504 | 454 | Lemma hlist_app_assoc : forall ls ls' ls''
|
505 | 455 | (a : hlist ls) (b : hlist ls') (c : hlist ls''),
|
506 | 456 | hlist_app (hlist_app a b) c =
|
|
0 commit comments