Skip to content

Commit

Permalink
Remove open BigOperators which does nothing
Browse files Browse the repository at this point in the history
This used to be necessary, but the notation is available globally in recent mathlib versions.
  • Loading branch information
eric-wieser committed Oct 21, 2024
1 parent 06dc7cb commit 12c3379
Show file tree
Hide file tree
Showing 641 changed files with 7 additions and 646 deletions.
12 changes: 6 additions & 6 deletions lean4/scripts/generate_files_by_year.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def all_to_years(min_year, max_year):
for year in range(max_year, min_year - 1, -1):
filename = f"putnam_{year}.lean"
with open(filename, "w") as g:
g.write("import Mathlib\nopen BigOperators\n\n")
g.write("import Mathlib\n\n")
is_in_section = False
for line in lines:
if is_in_section:
Expand All @@ -21,14 +21,14 @@ def all_to_years(min_year, max_year):

def years_to_all(min_year, max_year):
with open("putnam_all.lean", "w") as f:
f.write("import Mathlib\nopen BigOperators\n\n")
f.write("import Mathlib\n\n")
for year in range(min_year, max_year + 1):
filename = f"putnam_{year}.lean"
with open(filename, "r") as g:
lines = g.readlines()
f.write(f"section putnam_{year}\n")
for line in lines:
if line.strip() == "import Mathlib" or line.strip() == "open BigOperators":
if line.strip() == "import Mathlib":
continue
f.write(line)
f.write(f"end putnam_{year}\n")
Expand All @@ -45,7 +45,7 @@ def files_to_individual(min_year, max_year):
problem_pattern = fr'putnam_{year}_[ab][1-6]'

for idx, line in enumerate(lines):
if "Mathlib" in line or "BigOperators" in line:
if "Mathlib" in line:
continue
elif line.strip() == "" or idx == len(lines) - 1:
if idx == len(lines) - 1:
Expand All @@ -64,7 +64,7 @@ def files_to_individual(min_year, max_year):
print(f"Search is {search}")
assert False
with open(f"src/{problem_name}.lean", "w") as g:
g.write("import Mathlib\nopen BigOperators\n\n")
g.write("import Mathlib\n\n")
if len(running_scopes) > 0:
g.write(f"open {' '.join(running_scopes)}\n\n")
for line in section_content:
Expand Down Expand Up @@ -106,7 +106,7 @@ def all_to_individual(min_year, max_year):

filename = f"putnam_{section_name}.lean"
with open(filename, "w") as g:
g.write("import Mathlib\nopen BigOperators\n")
g.write("import Mathlib\n")
for namespace in namespaces:
g.write(f"open {namespace}\n")
g.write("\n")
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_a1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open MeasureTheory

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_a2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open MeasureTheory Set

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_a3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open MeasureTheory

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_a4.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

/--
Assume that $\lvert f(x) \rvert \le 1$ and $\lvert f''(x) \rvert \le 1$ for all $x$ on an interval of length at least 2. Show that $\lvert f'(x) \rvert \le 2$ on the interval.
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_a5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

abbrev putnam_1962_a5_solution : ℕ → ℕ := sorry
-- fun n : ℕ => n * (n + 1) * 2^(n - 2)
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_a6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

/--
Let $S$ be a set of rational numbers such that whenever $a$ and $b$ are members of $S$, so are $a+b$ and $ab$, and having the property that for every rational number $r$ exactly one of the following three statements is true: \[ r \in S, -r \in S, r = 0. \] Prove that $S$ is the set of all positive rational numbers.
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_b1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

/--
Let $x^{(n)} = x(x-1)\cdots(x-n+1)$ for $n$ a positive integer and let $x^{(0)} = 1.$ Prove that \[ (x+y)^{(n)} = \sum_{k=0}^n {n \choose k} x^{(k)} y^{(n-k)}. \]
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_b2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open MeasureTheory

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_b3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open MeasureTheory

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_b5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open MeasureTheory

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1962_b6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Real

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_a2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_a3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Nat Set Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_a4.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Filter Set

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_a6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_b1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter Polynomial

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_b2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter Polynomial

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_b3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter Polynomial

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_b5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter Polynomial

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1963_b6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter Polynomial

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_a1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

/--
Let $A_1, A_2, A_3, A_4, A_5, A_6$ be distinct points in the plane. Let $D$ be the longest distance between any pair, and let $d$ the shortest distance. Show that $\frac{D}{d} \geq \sqrt 3$.
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_a2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_a3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_a4.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_a5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function Filter Topology

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_a6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function Filter Topology

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_b1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function Filter Topology

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_b2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function Filter Topology

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_b3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function Filter Topology

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_b5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function Filter Topology

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1964_b6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Set Function Filter Topology

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_a1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Real

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_a2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_a3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_a4.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_a5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_a6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_b1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_b2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_b3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_b4.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_b5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex SimpleGraph.Walk

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1965_b6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open EuclideanGeometry Topology Filter Complex SimpleGraph.Walk

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_a1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

/--
Let $a_n$ denote the sequence $0, 1, 1, 2, 2, 3, \dots$, where $a_n = \frac{n}{2}$ if $n$ is even and $\frac{n - 1}{2}$ if n is odd. Furthermore, let $f(n)$ denote the sum of the first $n$ terms of $a_n$. Prove that all positive integers $x$ and $y$ with $x > y$ satisfy $xy = f(x + y) - f(x - y)$.
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_a2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

/--
Let $a$, $b$, and $c$ be the side lengths of a triangle with inradius $r$. If $p = \frac{a + b + c}{2}$, show that $$\frac{1}{(p - a)^2} + \frac{1}{(p - b)^2} + \frac{1}{(p - c)^2} \ge \frac{1}{r^2}.$$
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_a3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_a4.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_a5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_a6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_b1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_b2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

/--
Prove that, for any ten consecutive integers, at least one is relatively prime to all of the others.
Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_b3.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_b4.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_b5.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1966_b6.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1967_a1.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Nat Topology Filter

Expand Down
1 change: 0 additions & 1 deletion lean4/src/putnam_1967_a2.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mathlib
open BigOperators

open Nat Topology Filter

Expand Down
Loading

0 comments on commit 12c3379

Please sign in to comment.