imo.imo2011_q5Archive.Imo.Imo2011Q5

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -62,7 +62,7 @@ theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m
         contradiction
     have h₁ : f m = f (m - n) := sub_eq_zero.mp h_d_eq_zero
     have h₂ : f (m - n) ∣ f m - f n := hdvd m n
-    rw [← h₁] at h₂ 
+    rw [← h₁] at h₂
     exact (dvd_iff_dvd_of_dvd_sub h₂).mp dvd_rfl
   ·-- m = n
     rw [h_fm_eq_fn]
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2021 Alain Verberkmoes. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alain Verberkmoes
 -/
-import Mathbin.Data.Int.Dvd.Basic
+import Data.Int.Dvd.Basic
 
 #align_import imo.imo2011_q5 from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Alain Verberkmoes. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alain Verberkmoes
-
-! This file was ported from Lean 3 source module imo.imo2011_q5
-! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Int.Dvd.Basic
 
+#align_import imo.imo2011_q5 from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
+
 /-!
 # IMO 2011 Q5
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alain Verberkmoes
 
 ! This file was ported from Lean 3 source module imo.imo2011_q5
-! leanprover-community/mathlib commit 5f25c089cb34db4db112556f23c50d12da81b297
+! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Data.Int.Dvd.Basic
 /-!
 # IMO 2011 Q5
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Let `f` be a function from the set of integers to the set
 of positive integers.  Suppose that, for any two integers
 `m` and `n`, the difference `f(m) - f(n)` is divisible by
Diff
@@ -37,7 +37,6 @@ theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m
       calc
         d < f m := sub_lt_self _ (hpos (m - n))
         _ < f n := h_fm_lt_fn
-        
     have h_neg_d_lt_fn : -d < f n :=
       by
       calc
@@ -45,7 +44,6 @@ theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m
         _ < f (m - n) := (sub_lt_self _ (hpos m))
         _ ≤ f n - f m := (le_of_dvd (sub_pos.mpr h_fm_lt_fn) _)
         _ < f n := sub_lt_self _ (hpos m)
-        
       -- ⊢ f (m - n) ∣ f n - f m
       rw [← dvd_neg, neg_sub];
       exact hdvd m n

Changes in mathlib4

mathlib3
mathlib4
chore: superfluous parentheses part 2 (#12131)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -36,8 +36,8 @@ theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m
     have h_neg_d_lt_fn : -d < f n := by
       calc
         -d = f (m - n) - f m := neg_sub _ _
-        _ < f (m - n) := (sub_lt_self _ (hpos m))
-        _ ≤ f n - f m := (le_of_dvd (sub_pos.mpr h_fm_lt_fn) ?_)
+        _ < f (m - n) := sub_lt_self _ (hpos m)
+        _ ≤ f n - f m := le_of_dvd (sub_pos.mpr h_fm_lt_fn) ?_
         _ < f n := sub_lt_self _ (hpos m)
       -- ⊢ f (m - n) ∣ f n - f m
       rw [← dvd_neg, neg_sub]
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -30,12 +30,11 @@ theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m
     have h_fn_dvd_d : f n ∣ d := by
       rw [← sub_sub_self m n]
       exact hdvd m (m - n)
-    have h_d_lt_fn : d < f n := by
+    have h_d_lt_fn : d < f n := calc
+      d < f m := sub_lt_self _ (hpos (m - n))
+      _ < f n := h_fm_lt_fn
+    have h_neg_d_lt_fn : -d < f n := by
       calc
-        d < f m := sub_lt_self _ (hpos (m - n))
-        _ < f n := h_fm_lt_fn
-    have h_neg_d_lt_fn : -d < f n
-    · calc
         -d = f (m - n) - f m := neg_sub _ _
         _ < f (m - n) := (sub_lt_self _ (hpos m))
         _ ≤ f n - f m := (le_of_dvd (sub_pos.mpr h_fm_lt_fn) ?_)
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -24,7 +24,7 @@ open Int
 theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m n : ℤ, f (m - n) ∣ f m - f n) :
     ∀ m n : ℤ, f m ≤ f n → f m ∣ f n := by
   intro m n h_fm_le_fn
-  cases' lt_or_eq_of_le h_fm_le_fn with h_fm_lt_fn h_fm_eq_fn
+  rcases lt_or_eq_of_le h_fm_le_fn with h_fm_lt_fn | h_fm_eq_fn
   · -- m < n
     let d := f m - f (m - n)
     have h_fn_dvd_d : f n ∣ d := by
chore: delay import of Tactic.Common (#7000)

I know that this is contrary to what we've done previously, but:

  • I'm trying to upstream a great many tactics from Mathlib to Std (essentially, everything that non-mathematicians want too).
  • This makes it much easier for me to see what is going on, and understand the import requirements (particularly for the "big" tactics norm_num / ring / linarith)
  • It's actually not as bad as it looks here, because as these tactics move up to Std they will start disappearing again from explicit imports, but Mathlib can happily import all of Std.

(Oh

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alain Verberkmoes
 -/
 import Mathlib.Data.Int.Dvd.Basic
+import Mathlib.Tactic.Common
 
 #align_import imo.imo2011_q5 from "leanprover-community/mathlib"@"5f25c089cb34db4db112556f23c50d12da81b297"
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Alain Verberkmoes. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alain Verberkmoes
-
-! This file was ported from Lean 3 source module imo.imo2011_q5
-! leanprover-community/mathlib commit 5f25c089cb34db4db112556f23c50d12da81b297
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Int.Dvd.Basic
 
+#align_import imo.imo2011_q5 from "leanprover-community/mathlib"@"5f25c089cb34db4db112556f23c50d12da81b297"
+
 /-!
 # IMO 2011 Q5
 
chore: tidy various files (#5233)
Diff
@@ -43,7 +43,7 @@ theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m
         _ ≤ f n - f m := (le_of_dvd (sub_pos.mpr h_fm_lt_fn) ?_)
         _ < f n := sub_lt_self _ (hpos m)
       -- ⊢ f (m - n) ∣ f n - f m
-      rw [← dvd_neg, neg_sub];
+      rw [← dvd_neg, neg_sub]
       exact hdvd m n
     have h_d_eq_zero : d = 0 := by
       obtain hd | hd | hd : d > 0 ∨ d = 0 ∨ d < 0 := trichotomous d 0
@@ -51,7 +51,7 @@ theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m
         have h₁ : f n ≤ d := le_of_dvd hd h_fn_dvd_d
         have h₂ : ¬f n ≤ d := not_le.mpr h_d_lt_fn
         contradiction
-      ·-- d = 0
+      · -- d = 0
         exact hd
       · -- d < 0
         have h₁ : f n ≤ -d := le_of_dvd (neg_pos.mpr hd) h_fn_dvd_d.neg_right
@@ -59,8 +59,8 @@ theorem imo2011_q5 (f : ℤ → ℤ) (hpos : ∀ n : ℤ, 0 < f n) (hdvd : ∀ m
         contradiction
     have h₁ : f m = f (m - n) := sub_eq_zero.mp h_d_eq_zero
     have h₂ : f (m - n) ∣ f m - f n := hdvd m n
-    rw [← h₁] at h₂ 
+    rw [← h₁] at h₂
     exact (dvd_iff_dvd_of_dvd_sub h₂).mp dvd_rfl
-  ·-- m = n
+  · -- m = n
     rw [h_fm_eq_fn]
 #align imo2011_q5 imo2011_q5
feat: port CategoryTheory.Monoidal.Internal.FunctorCategory (#5093)

Dependencies 2 + 104

105 files ported (98.1%)
44961 lines ported (99.7%)
Show graph

The unported dependencies are