We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
nodup_iff_injective_get
1 parent a2df56f commit a656988Copy full SHA for a656988
1 file changed
Mathlib/Data/List/Nodup.lean
@@ -80,11 +80,8 @@ theorem nodup_iff_injective_getElem {l : List α} :
80
· exact (h j i hj hi hji hg.symm).elim,
81
fun hinj i j hi hj hij h => Nat.ne_of_lt hij (Fin.val_eq_of_eq (@hinj ⟨i, hi⟩ ⟨j, hj⟩ h))⟩
82
83
-theorem nodup_iff_injective_get {l : List α} :
84
- Nodup l ↔ Function.Injective l.get := by
85
- rw [nodup_iff_injective_getElem]
86
- change _ ↔ Injective (fun i => l.get i)
87
- simp
+theorem nodup_iff_injective_get {l : List α} : Nodup l ↔ Function.Injective l.get :=
+ nodup_iff_injective_getElem
88
89
theorem Nodup.get_inj_iff {l : List α} (h : Nodup l) {i j : Fin l.length} :
90
l.get i = l.get j ↔ i = j :=
0 commit comments