Lvc.Infra.LengthEq
Require Import Arith Coq.Lists.List Setoid Coq.Lists.SetoidList Omega.
Require Export Infra.Option EqDec AutoIndTac Util.
Set Implicit Arguments.
Inductive length_eq X Y : list X → list Y → Type :=
| LenEq_nil : length_eq nil nil
| LenEq_cons x XL y YL : length_eq XL YL → length_eq (x::XL) (y::YL).
Lemma length_eq_refl X (XL:list X)
: length_eq XL XL.
Lemma length_eq_sym X Y (XL:list X) (YL:list Y)
: length_eq XL YL → length_eq YL XL.
Lemma length_eq_trans X Y Z (XL:list X) (YL:list Y) (ZL:list Z)
: length_eq XL YL → length_eq YL ZL → length_eq XL ZL.
Lemma length_length_eq X Y (L:list X) (L´:list Y)
: length L = length L´ → length_eq L L´.
Lemma length_eq_length X Y (L:list X) (L´:list Y)
: length_eq L L´ → length L = length L´.
Lemma length_eq_dec {X} (L L´ : list X)
: length_eq L L´ + (length_eq L L´ → False).
Ltac length_equify :=
repeat (match goal with
| [ H : length ?A = length ?B |- _ ] ⇒
eapply length_length_eq in H
end).
Require Export Infra.Option EqDec AutoIndTac Util.
Set Implicit Arguments.
Inductive length_eq X Y : list X → list Y → Type :=
| LenEq_nil : length_eq nil nil
| LenEq_cons x XL y YL : length_eq XL YL → length_eq (x::XL) (y::YL).
Lemma length_eq_refl X (XL:list X)
: length_eq XL XL.
Lemma length_eq_sym X Y (XL:list X) (YL:list Y)
: length_eq XL YL → length_eq YL XL.
Lemma length_eq_trans X Y Z (XL:list X) (YL:list Y) (ZL:list Z)
: length_eq XL YL → length_eq YL ZL → length_eq XL ZL.
Lemma length_length_eq X Y (L:list X) (L´:list Y)
: length L = length L´ → length_eq L L´.
Lemma length_eq_length X Y (L:list X) (L´:list Y)
: length_eq L L´ → length L = length L´.
Lemma length_eq_dec {X} (L L´ : list X)
: length_eq L L´ + (length_eq L L´ → False).
Ltac length_equify :=
repeat (match goal with
| [ H : length ?A = length ?B |- _ ] ⇒
eapply length_length_eq in H
end).