Difference between two residue-class sums
ProvedWorkbookSyntax.plus_44891lean-workbookrepaired-notationsource-checked
Among positive integers at most2011, let be the sum of those congruent to1 modulo3 and the sum of those congruent to2 modulo3. Then .
Notation repair: Replaced the obsolete finite-sum binder “in” with the current “∈” notation. The ranges, summands, hypotheses and conclusion are unchanged.
Source: Lean-Workbook record lean_workbook_plus_44891 (Apache-2.0). Original declaration.
Preamble
import Mathlib open Nat
Formal statement
theorem WorkbookSyntax.plus_44891 (A B : ℕ) (hA : A = ∑ i ∈ Finset.filter (λ x => x % 3 = 1) (Finset.Icc 1 2011), i) (hB : B = ∑ i ∈ Finset.filter (λ x => x % 3 = 2) (Finset.Icc 1 2011), i) : A - B = 1341 := by sorry
Source