Skip to content

Commit

Permalink
chore(data/list/basic): remove axiom of choice assumption in some lem…
Browse files Browse the repository at this point in the history
…mas (#13189)
  • Loading branch information
negiizhao committed Apr 5, 2022
1 parent a841361 commit 2504a2b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/data/list/basic.lean
Expand Up @@ -1231,8 +1231,8 @@ lemma nth_le_append_right_aux {l₁ l₂ : list α} {n : ℕ}
(h₁ : l₁.length ≤ n) (h₂ : n < (l₁ ++ l₂).length) : n - l₁.length < l₂.length :=
begin
rw list.length_append at h₂,
convert (tsub_lt_tsub_iff_right h₁).mpr h₂,
simp,
apply lt_of_add_lt_add_right,
rwa [nat.sub_add_cancel h₁, nat.add_comm],
end

lemma nth_le_append_right : ∀ {l₁ l₂ : list α} {n : ℕ} (h₁ : l₁.length ≤ n) (h₂),
Expand All @@ -1241,8 +1241,7 @@ lemma nth_le_append_right : ∀ {l₁ l₂ : list α} {n : ℕ} (h₁ : l₁.len
| (a :: l) _ (n+1) h₁ h₂ :=
begin
dsimp,
conv { to_rhs, congr, skip,
rw [tsub_add_eq_tsub_tsub, tsub_right_comm, add_tsub_cancel_right], },
conv { to_rhs, congr, skip, rw [nat.add_sub_add_right], },
rw nth_le_append_right (nat.lt_succ_iff.mp h₁),
end

Expand Down

0 comments on commit 2504a2b

Please sign in to comment.