Skip to content

Commit

Permalink
chore: List.modifyTailIdx naming fix (#6007)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em authored Nov 8, 2024
1 parent 1b806c5 commit 6801770
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Init/Data/List/Nat/InsertIdx.lean
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ theorem length_insertIdx_of_length_lt (h : length as < n) : length (insertIdx n
simp [length_insertIdx, h]

theorem eraseIdx_insertIdx (n : Nat) (l : List α) : (l.insertIdx n a).eraseIdx n = l := by
rw [eraseIdx_eq_modifyTailIdx, insertIdx, modifyTailIdx_modifyTailIdx_eq]
rw [eraseIdx_eq_modifyTailIdx, insertIdx, modifyTailIdx_modifyTailIdx_self]
exact modifyTailIdx_id _ _

theorem insertIdx_eraseIdx_of_ge :
Expand Down
2 changes: 1 addition & 1 deletion src/Init/Data/List/Nat/Modify.lean
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ theorem modifyTailIdx_modifyTailIdx_le {f g : List α → List α} (m n : Nat) (
rcases Nat.exists_eq_add_of_le h with ⟨m, rfl⟩
rw [Nat.add_comm, modifyTailIdx_modifyTailIdx, Nat.add_sub_cancel]

theorem modifyTailIdx_modifyTailIdx_eq {f g : List α → List α} (n : Nat) (l : List α) :
theorem modifyTailIdx_modifyTailIdx_self {f g : List α → List α} (n : Nat) (l : List α) :
(l.modifyTailIdx f n).modifyTailIdx g n = l.modifyTailIdx (g ∘ f) n := by
rw [modifyTailIdx_modifyTailIdx_le n n l (Nat.le_refl n), Nat.sub_self]; rfl

Expand Down

0 comments on commit 6801770

Please sign in to comment.