Skip to content

Commit

Permalink
chore: address porting note in Archive/Imo/Imo1994Q1 -- linarith work…
Browse files Browse the repository at this point in the history
…s now (#8496)

According to `git bisect`, #7905 is what made the single `linarith` call work here.
  • Loading branch information
dwrensha authored and alexkeizer committed Nov 21, 2023
1 parent c40b4df commit 97f34d8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Archive/Imo/Imo1994Q1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ theorem imo1994_q1 (n : ℕ) (m : ℕ) (A : Finset ℕ) (hm : A.card = m + 1)
simp only [mem_map, mem_Icc, mem_Ioc, Fin.zero_le, true_and_iff, Equiv.subLeft_apply,
Function.Embedding.coeFn_mk, exists_prop, RelEmbedding.coe_toEmbedding] at hx ⊢
rcases hx with ⟨i, ⟨hi, rfl⟩⟩
have h1 : a i + a (Fin.last m - k) ≤ n := by
-- Porting note: Original proof was `by linarith only [h, a.monotone hi]`
have := a.monotone hi
simp only at this ⊢
linarith only [h, this]
have h1 : a i + a (Fin.last m - k) ≤ n := by linarith only [h, a.monotone hi]
have h2 : a i + a (Fin.last m - k) ∈ A := hadd _ (ha _) _ (ha _) h1
rw [← mem_coe, ← range_orderEmbOfFin A hm, Set.mem_range] at h2
cases' h2 with j hj
Expand Down

0 comments on commit 97f34d8

Please sign in to comment.