wiedijk_100_theorems.inverse_triangle_sumArchive.Wiedijk100Theorems.InverseTriangleSum

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jalex Stark, Yury Kudryashov
 -/
-import Mathbin.Algebra.BigOperators.Basic
-import Mathbin.Data.Real.Basic
+import Algebra.BigOperators.Basic
+import Data.Real.Basic
 
 #align_import wiedijk_100_theorems.inverse_triangle_sum from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jalex Stark, Yury Kudryashov
-
-! This file was ported from Lean 3 source module wiedijk_100_theorems.inverse_triangle_sum
-! 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.Algebra.BigOperators.Basic
 import Mathbin.Data.Real.Basic
 
+#align_import wiedijk_100_theorems.inverse_triangle_sum from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
+
 /-!
 # Sum of the Reciprocals of the Triangular Numbers
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jalex Stark, Yury Kudryashov
 
 ! This file was ported from Lean 3 source module wiedijk_100_theorems.inverse_triangle_sum
-! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
+! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Data.Real.Basic
 /-!
 # Sum of the Reciprocals of the Triangular Numbers
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file proves Theorem 42 from the [100 Theorems List](https://www.cs.ru.nl/~freek/100/).
 
 We interpret “triangular numbers” as naturals of the form $\frac{k(k+1)}{2}$ for natural `k`.
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jalex Stark, Yury Kudryashov
 
-! This file was ported from Lean 3 source module «100-theorems-list».«42_inverse_triangle_sum»
-! leanprover-community/mathlib commit 328375597f2c0dd00522d9c2e5a33b6a6128feeb
+! This file was ported from Lean 3 source module wiedijk_100_theorems.inverse_triangle_sum
+! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/

Changes in mathlib4

mathlib3
mathlib4
chore: adaptations to lean 4.8.0 (#12549)
Diff
@@ -33,7 +33,7 @@ theorem Theorems100.inverse_triangle_sum :
   refine' sum_range_induction _ _ (if_pos rfl) _
   rintro (_ | n)
   · rw [if_neg, if_pos] <;> norm_num
-  simp_rw [if_neg (Nat.succ_ne_zero _), Nat.succ_eq_add_one]
+  simp only [Nat.succ_ne_zero, ↓reduceIte, Nat.cast_succ]
   have A : (n + 1 + 1 : ℚ) ≠ 0 := by norm_cast; norm_num
   push_cast
   field_simp
chore: make List.mem_split an alias of List.append_of_mem (#11060)

List.mem_split duplicates List.append_of_mem from Std: https://github.com/leanprover/std4/blob/a756b7d643ae5dcd7bf314e99f8e493e5d81b9ed/Std/Data/List/Lemmas.lean#L94-L96

This PR makes it an alias.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>

Diff
@@ -28,7 +28,7 @@ open scoped BigOperators
 open Finset
 
 /-- **Sum of the Reciprocals of the Triangular Numbers** -/
-theorem Theorem100.inverse_triangle_sum :
+theorem Theorems100.inverse_triangle_sum :
     ∀ n, ∑ k in range n, (2 : ℚ) / (k * (k + 1)) = if n = 0 then 0 else 2 - (2 : ℚ) / n := by
   refine' sum_range_induction _ _ (if_pos rfl) _
   rintro (_ | n)
@@ -38,4 +38,4 @@ theorem Theorem100.inverse_triangle_sum :
   push_cast
   field_simp
   ring
-#align theorem_100.inverse_triangle_sum Theorem100.inverse_triangle_sum
+#align theorem_100.inverse_triangle_sum Theorems100.inverse_triangle_sum
chore: split Data.Real.Basic (#8356)

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

Diff
@@ -5,6 +5,7 @@ Authors: Jalex Stark, Yury Kudryashov
 -/
 import Mathlib.Algebra.BigOperators.Basic
 import Mathlib.Data.Real.Basic
+import Mathlib.Tactic.FieldSimp
 
 #align_import wiedijk_100_theorems.inverse_triangle_sum from "leanprover-community/mathlib"@"5563b1b49e86e135e8c7b556da5ad2f5ff881cad"
 
field_simp: Use positivity as a discharger (#6312)

The main reasons is that having h : 0 < denom in the context should suffice for field_simp to do its job, without the need to manually pass h.ne or similar.

Quite a few have := … ≠ 0 could be dropped, and some field_simp calls no longer need explicit arguments; this is promising.

This does break some proofs where field_simp was not used as a closing tactic, and it now shuffles terms around a bit different. These were fixed. Using field_simp in the middle of a proof seems rather fragile anyways.

As a drive-by contribution, positivity now knows about π > 0.

fixes: #4835

Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -35,6 +35,6 @@ theorem Theorem100.inverse_triangle_sum :
   simp_rw [if_neg (Nat.succ_ne_zero _), Nat.succ_eq_add_one]
   have A : (n + 1 + 1 : ℚ) ≠ 0 := by norm_cast; norm_num
   push_cast
-  field_simp [Nat.cast_add_one_ne_zero]
+  field_simp
   ring
 #align theorem_100.inverse_triangle_sum Theorem100.inverse_triangle_sum
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,15 +2,12 @@
 Copyright (c) 2020. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jalex Stark, Yury Kudryashov
-
-! This file was ported from Lean 3 source module wiedijk_100_theorems.inverse_triangle_sum
-! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.BigOperators.Basic
 import Mathlib.Data.Real.Basic
 
+#align_import wiedijk_100_theorems.inverse_triangle_sum from "leanprover-community/mathlib"@"5563b1b49e86e135e8c7b556da5ad2f5ff881cad"
+
 /-!
 # Sum of the Reciprocals of the Triangular Numbers
 
feat: port MeasureTheory.Function.ConditionalExpectation.CondexpL1 (#5174)

Dependencies 3 + 255

256 files ported (98.8%)
107381 lines ported (99.0%)
Show graph

The unported dependencies are