Debian Codegraph @

src/Util/ListUtil/Injective.v

raw
1 From Coq Require Import List.
2 Require Export Crypto.Util.FixCoqMistakes.
3 Import ListNotations.
4 Local Open Scope list_scope.
5 Local Set Implicit Arguments.
6
7 Module List.
8 Lemma map_inj A B f g xs ys : (forall x y, f x = g y -> x = y) -> @map A B f xs = @map A B g ys -> xs = ys.
9 Proof.
10 intro H; revert ys; induction xs as [|?? IH], ys; cbn; try reflexivity.
11 all: inversion 1; f_equal; eauto.
12 Qed.
13 End List.