From d7407318cf125f9a1a6e7079fb420528ab7c2747 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Mon, 23 Sep 2024 10:15:43 +0000 Subject: [PATCH] Add the docstrings to the Lean files. Also includes a CI step to verify the docstrings are right. --- .github/workflows/lean.yml | 5 +++ lean4/check_docstrings.lean | 78 +++++++++++++++++++++++++++++++++++ lean4/lakefile.lean | 4 ++ lean4/src/putnam_1962_a1.lean | 3 ++ lean4/src/putnam_1962_a2.lean | 3 ++ lean4/src/putnam_1962_a3.lean | 3 ++ lean4/src/putnam_1962_a4.lean | 3 ++ lean4/src/putnam_1962_a5.lean | 3 ++ lean4/src/putnam_1962_a6.lean | 3 ++ lean4/src/putnam_1962_b1.lean | 3 ++ lean4/src/putnam_1962_b2.lean | 3 ++ lean4/src/putnam_1962_b3.lean | 3 ++ lean4/src/putnam_1962_b5.lean | 3 ++ lean4/src/putnam_1962_b6.lean | 3 ++ lean4/src/putnam_1963_a2.lean | 3 ++ lean4/src/putnam_1963_a3.lean | 3 ++ lean4/src/putnam_1963_a4.lean | 3 ++ lean4/src/putnam_1963_a6.lean | 3 ++ lean4/src/putnam_1963_b1.lean | 3 ++ lean4/src/putnam_1963_b2.lean | 3 ++ lean4/src/putnam_1963_b3.lean | 3 ++ lean4/src/putnam_1963_b5.lean | 3 ++ lean4/src/putnam_1963_b6.lean | 3 ++ lean4/src/putnam_1964_a1.lean | 3 ++ lean4/src/putnam_1964_a2.lean | 8 ++++ lean4/src/putnam_1964_a3.lean | 3 ++ lean4/src/putnam_1964_a4.lean | 7 ++++ lean4/src/putnam_1964_a5.lean | 6 +++ lean4/src/putnam_1964_a6.lean | 3 ++ lean4/src/putnam_1964_b1.lean | 3 ++ lean4/src/putnam_1964_b2.lean | 3 ++ lean4/src/putnam_1964_b3.lean | 3 ++ lean4/src/putnam_1964_b5.lean | 3 ++ lean4/src/putnam_1964_b6.lean | 3 ++ lean4/src/putnam_1965_a1.lean | 3 ++ lean4/src/putnam_1965_a2.lean | 3 ++ lean4/src/putnam_1965_a3.lean | 3 ++ lean4/src/putnam_1965_a4.lean | 3 ++ lean4/src/putnam_1965_a5.lean | 3 ++ lean4/src/putnam_1965_a6.lean | 3 ++ lean4/src/putnam_1965_b1.lean | 3 ++ lean4/src/putnam_1965_b2.lean | 3 ++ lean4/src/putnam_1965_b3.lean | 3 ++ lean4/src/putnam_1965_b4.lean | 3 ++ lean4/src/putnam_1965_b5.lean | 3 ++ lean4/src/putnam_1965_b6.lean | 3 ++ lean4/src/putnam_1966_a1.lean | 3 ++ lean4/src/putnam_1966_a2.lean | 3 ++ lean4/src/putnam_1966_a3.lean | 3 ++ lean4/src/putnam_1966_a4.lean | 3 ++ lean4/src/putnam_1966_a5.lean | 8 ++++ lean4/src/putnam_1966_a6.lean | 3 ++ lean4/src/putnam_1966_b1.lean | 3 ++ lean4/src/putnam_1966_b2.lean | 3 ++ lean4/src/putnam_1966_b3.lean | 3 ++ lean4/src/putnam_1966_b4.lean | 3 ++ lean4/src/putnam_1966_b5.lean | 3 ++ lean4/src/putnam_1966_b6.lean | 3 ++ lean4/src/putnam_1967_a1.lean | 3 ++ lean4/src/putnam_1967_a2.lean | 7 ++++ lean4/src/putnam_1967_a3.lean | 3 ++ lean4/src/putnam_1967_a4.lean | 3 ++ lean4/src/putnam_1967_a5.lean | 3 ++ lean4/src/putnam_1967_a6.lean | 3 ++ lean4/src/putnam_1967_b1.lean | 3 ++ lean4/src/putnam_1967_b2.lean | 12 ++++++ lean4/src/putnam_1967_b3.lean | 3 ++ lean4/src/putnam_1967_b4.lean | 3 ++ lean4/src/putnam_1967_b5.lean | 3 ++ lean4/src/putnam_1967_b6.lean | 3 ++ lean4/src/putnam_1968_a1.lean | 3 ++ lean4/src/putnam_1968_a2.lean | 3 ++ lean4/src/putnam_1968_a3.lean | 8 ++++ lean4/src/putnam_1968_a4.lean | 3 ++ lean4/src/putnam_1968_a5.lean | 3 ++ lean4/src/putnam_1968_a6.lean | 3 ++ lean4/src/putnam_1968_b2.lean | 3 ++ lean4/src/putnam_1968_b4.lean | 3 ++ lean4/src/putnam_1968_b5.lean | 3 ++ lean4/src/putnam_1968_b6.lean | 3 ++ lean4/src/putnam_1969_a1.lean | 3 ++ lean4/src/putnam_1969_a2.lean | 3 ++ lean4/src/putnam_1969_a4.lean | 3 ++ lean4/src/putnam_1969_a5.lean | 3 ++ lean4/src/putnam_1969_a6.lean | 3 ++ lean4/src/putnam_1969_b1.lean | 3 ++ lean4/src/putnam_1969_b2.lean | 3 ++ lean4/src/putnam_1969_b3.lean | 3 ++ lean4/src/putnam_1969_b5.lean | 3 ++ lean4/src/putnam_1969_b6.lean | 13 ++++++ lean4/src/putnam_1970_a1.lean | 3 ++ lean4/src/putnam_1970_a2.lean | 3 ++ lean4/src/putnam_1970_a3.lean | 3 ++ lean4/src/putnam_1970_a4.lean | 3 ++ lean4/src/putnam_1970_b1.lean | 3 ++ lean4/src/putnam_1970_b2.lean | 3 ++ lean4/src/putnam_1970_b3.lean | 3 ++ lean4/src/putnam_1970_b4.lean | 3 ++ lean4/src/putnam_1970_b5.lean | 3 ++ lean4/src/putnam_1970_b6.lean | 3 ++ lean4/src/putnam_1971_a1.lean | 3 ++ lean4/src/putnam_1971_a2.lean | 3 ++ lean4/src/putnam_1971_a3.lean | 3 ++ lean4/src/putnam_1971_a4.lean | 3 ++ lean4/src/putnam_1971_a5.lean | 3 ++ lean4/src/putnam_1971_a6.lean | 3 ++ lean4/src/putnam_1971_b1.lean | 3 ++ lean4/src/putnam_1971_b2.lean | 3 ++ lean4/src/putnam_1971_b3.lean | 3 ++ lean4/src/putnam_1971_b6.lean | 3 ++ lean4/src/putnam_1972_a1.lean | 3 ++ lean4/src/putnam_1972_a2.lean | 3 ++ lean4/src/putnam_1972_a3.lean | 3 ++ lean4/src/putnam_1972_a5.lean | 3 ++ lean4/src/putnam_1972_a6.lean | 3 ++ lean4/src/putnam_1972_b1.lean | 3 ++ lean4/src/putnam_1972_b2.lean | 3 ++ lean4/src/putnam_1972_b3.lean | 3 ++ lean4/src/putnam_1972_b4.lean | 3 ++ lean4/src/putnam_1972_b5.lean | 3 ++ lean4/src/putnam_1972_b6.lean | 3 ++ lean4/src/putnam_1973_a1.lean | 3 ++ lean4/src/putnam_1973_a2.lean | 3 ++ lean4/src/putnam_1973_a3.lean | 3 ++ lean4/src/putnam_1973_a4.lean | 3 ++ lean4/src/putnam_1973_a6.lean | 3 ++ lean4/src/putnam_1973_b1.lean | 3 ++ lean4/src/putnam_1973_b2.lean | 3 ++ lean4/src/putnam_1973_b3.lean | 3 ++ lean4/src/putnam_1973_b4.lean | 3 ++ lean4/src/putnam_1974_a1.lean | 3 ++ lean4/src/putnam_1974_a3.lean | 3 ++ lean4/src/putnam_1974_a4.lean | 3 ++ lean4/src/putnam_1974_a6.lean | 3 ++ lean4/src/putnam_1974_b1.lean | 3 ++ lean4/src/putnam_1974_b2.lean | 3 ++ lean4/src/putnam_1974_b3.lean | 3 ++ lean4/src/putnam_1974_b4.lean | 3 ++ lean4/src/putnam_1974_b5.lean | 3 ++ lean4/src/putnam_1974_b6.lean | 3 ++ lean4/src/putnam_1975_a1.lean | 3 ++ lean4/src/putnam_1975_a2.lean | 3 ++ lean4/src/putnam_1975_a3.lean | 3 ++ lean4/src/putnam_1975_a4.lean | 3 ++ lean4/src/putnam_1975_a5.lean | 3 ++ lean4/src/putnam_1975_b1.lean | 3 ++ lean4/src/putnam_1975_b2.lean | 3 ++ lean4/src/putnam_1975_b3.lean | 3 ++ lean4/src/putnam_1975_b4.lean | 3 ++ lean4/src/putnam_1975_b5.lean | 3 ++ lean4/src/putnam_1975_b6.lean | 3 ++ lean4/src/putnam_1976_a2.lean | 3 ++ lean4/src/putnam_1976_a3.lean | 3 ++ lean4/src/putnam_1976_a4.lean | 3 ++ lean4/src/putnam_1976_a6.lean | 3 ++ lean4/src/putnam_1976_b1.lean | 3 ++ lean4/src/putnam_1976_b2.lean | 3 ++ lean4/src/putnam_1976_b3.lean | 3 ++ lean4/src/putnam_1976_b5.lean | 3 ++ lean4/src/putnam_1976_b6.lean | 3 ++ lean4/src/putnam_1977_a1.lean | 3 ++ lean4/src/putnam_1977_a2.lean | 3 ++ lean4/src/putnam_1977_a3.lean | 3 ++ lean4/src/putnam_1977_a4.lean | 3 ++ lean4/src/putnam_1977_a5.lean | 3 ++ lean4/src/putnam_1977_a6.lean | 9 ++++ lean4/src/putnam_1977_b1.lean | 3 ++ lean4/src/putnam_1977_b3.lean | 3 ++ lean4/src/putnam_1977_b5.lean | 3 ++ lean4/src/putnam_1977_b6.lean | 3 ++ lean4/src/putnam_1978_a1.lean | 3 ++ lean4/src/putnam_1978_a2.lean | 3 ++ lean4/src/putnam_1978_a3.lean | 7 ++++ lean4/src/putnam_1978_a4.lean | 13 ++++++ lean4/src/putnam_1978_a5.lean | 6 +++ lean4/src/putnam_1978_a6.lean | 3 ++ lean4/src/putnam_1978_b2.lean | 6 +++ lean4/src/putnam_1978_b3.lean | 10 +++++ lean4/src/putnam_1978_b4.lean | 3 ++ lean4/src/putnam_1978_b5.lean | 3 ++ lean4/src/putnam_1978_b6.lean | 6 +++ lean4/src/putnam_1979_a1.lean | 3 ++ lean4/src/putnam_1979_a2.lean | 3 ++ lean4/src/putnam_1979_a3.lean | 3 ++ lean4/src/putnam_1979_a4.lean | 3 ++ lean4/src/putnam_1979_a5.lean | 3 ++ lean4/src/putnam_1979_a6.lean | 3 ++ lean4/src/putnam_1979_b2.lean | 3 ++ lean4/src/putnam_1979_b3.lean | 3 ++ lean4/src/putnam_1979_b5.lean | 3 ++ lean4/src/putnam_1979_b6.lean | 6 +++ lean4/src/putnam_1980_a2.lean | 3 ++ lean4/src/putnam_1980_a3.lean | 3 ++ lean4/src/putnam_1980_a4.lean | 6 +++ lean4/src/putnam_1980_a5.lean | 3 ++ lean4/src/putnam_1980_a6.lean | 3 ++ lean4/src/putnam_1980_b1.lean | 3 ++ lean4/src/putnam_1980_b3.lean | 3 ++ lean4/src/putnam_1980_b4.lean | 3 ++ lean4/src/putnam_1980_b5.lean | 5 +++ lean4/src/putnam_1980_b6.lean | 3 ++ lean4/src/putnam_1981_a1.lean | 3 ++ lean4/src/putnam_1981_a3.lean | 3 ++ lean4/src/putnam_1981_a5.lean | 4 ++ lean4/src/putnam_1981_b1.lean | 3 ++ lean4/src/putnam_1981_b2.lean | 3 ++ lean4/src/putnam_1981_b3.lean | 3 ++ lean4/src/putnam_1981_b4.lean | 3 ++ lean4/src/putnam_1981_b5.lean | 3 ++ lean4/src/putnam_1982_a2.lean | 3 ++ lean4/src/putnam_1982_a3.lean | 3 ++ lean4/src/putnam_1982_a4.lean | 3 ++ lean4/src/putnam_1982_a5.lean | 3 ++ lean4/src/putnam_1982_a6.lean | 12 ++++++ lean4/src/putnam_1982_b2.lean | 3 ++ lean4/src/putnam_1982_b3.lean | 3 ++ lean4/src/putnam_1982_b4.lean | 9 ++++ lean4/src/putnam_1982_b5.lean | 3 ++ lean4/src/putnam_1983_a1.lean | 3 ++ lean4/src/putnam_1983_a3.lean | 3 ++ lean4/src/putnam_1983_a4.lean | 6 +++ lean4/src/putnam_1983_a5.lean | 3 ++ lean4/src/putnam_1983_a6.lean | 3 ++ lean4/src/putnam_1983_b2.lean | 3 ++ lean4/src/putnam_1983_b4.lean | 3 ++ lean4/src/putnam_1983_b5.lean | 3 ++ lean4/src/putnam_1983_b6.lean | 3 ++ lean4/src/putnam_1984_a2.lean | 3 ++ lean4/src/putnam_1984_a3.lean | 11 +++++ lean4/src/putnam_1984_a5.lean | 3 ++ lean4/src/putnam_1984_a6.lean | 7 ++++ lean4/src/putnam_1984_b1.lean | 3 ++ lean4/src/putnam_1984_b2.lean | 3 ++ lean4/src/putnam_1984_b3.lean | 7 ++++ lean4/src/putnam_1984_b5.lean | 3 ++ lean4/src/putnam_1985_a1.lean | 8 ++++ lean4/src/putnam_1985_a3.lean | 8 ++++ lean4/src/putnam_1985_a4.lean | 3 ++ lean4/src/putnam_1985_a5.lean | 3 ++ lean4/src/putnam_1985_a6.lean | 12 ++++++ lean4/src/putnam_1985_b1.lean | 7 ++++ lean4/src/putnam_1985_b2.lean | 7 ++++ lean4/src/putnam_1985_b3.lean | 11 +++++ lean4/src/putnam_1985_b5.lean | 3 ++ lean4/src/putnam_1985_b6.lean | 4 ++ lean4/src/putnam_1986_a1.lean | 3 ++ lean4/src/putnam_1986_a2.lean | 6 +++ lean4/src/putnam_1986_a3.lean | 3 ++ lean4/src/putnam_1986_a4.lean | 19 +++++++++ lean4/src/putnam_1986_a5.lean | 3 ++ lean4/src/putnam_1986_a6.lean | 7 ++++ lean4/src/putnam_1986_b1.lean | 3 ++ lean4/src/putnam_1986_b2.lean | 7 ++++ lean4/src/putnam_1986_b3.lean | 3 ++ lean4/src/putnam_1986_b4.lean | 3 ++ lean4/src/putnam_1986_b5.lean | 7 ++++ lean4/src/putnam_1986_b6.lean | 3 ++ lean4/src/putnam_1987_a1.lean | 10 +++++ lean4/src/putnam_1987_a2.lean | 3 ++ lean4/src/putnam_1987_a4.lean | 7 ++++ lean4/src/putnam_1987_a5.lean | 8 ++++ lean4/src/putnam_1987_a6.lean | 7 ++++ lean4/src/putnam_1987_b1.lean | 6 +++ lean4/src/putnam_1987_b2.lean | 9 ++++ lean4/src/putnam_1987_b3.lean | 3 ++ lean4/src/putnam_1987_b4.lean | 3 ++ lean4/src/putnam_1987_b5.lean | 7 ++++ lean4/src/putnam_1987_b6.lean | 3 ++ lean4/src/putnam_1988_a1.lean | 3 ++ lean4/src/putnam_1988_a2.lean | 3 ++ lean4/src/putnam_1988_a3.lean | 7 ++++ lean4/src/putnam_1988_a4.lean | 6 +++ lean4/src/putnam_1988_a5.lean | 11 +++++ lean4/src/putnam_1988_a6.lean | 3 ++ lean4/src/putnam_1988_b1.lean | 3 ++ lean4/src/putnam_1988_b2.lean | 3 ++ lean4/src/putnam_1988_b3.lean | 3 ++ lean4/src/putnam_1988_b4.lean | 3 ++ lean4/src/putnam_1988_b5.lean | 7 ++++ lean4/src/putnam_1988_b6.lean | 3 ++ lean4/src/putnam_1989_a1.lean | 3 ++ lean4/src/putnam_1989_a2.lean | 3 ++ lean4/src/putnam_1989_a3.lean | 7 ++++ lean4/src/putnam_1989_a6.lean | 11 +++++ lean4/src/putnam_1989_b1.lean | 3 ++ lean4/src/putnam_1989_b2.lean | 3 ++ lean4/src/putnam_1989_b3.lean | 15 +++++++ lean4/src/putnam_1989_b4.lean | 3 ++ lean4/src/putnam_1989_b6.lean | 3 ++ lean4/src/putnam_1990_a1.lean | 3 ++ lean4/src/putnam_1990_a2.lean | 3 ++ lean4/src/putnam_1990_a4.lean | 3 ++ lean4/src/putnam_1990_a5.lean | 3 ++ lean4/src/putnam_1990_a6.lean | 3 ++ lean4/src/putnam_1990_b1.lean | 3 ++ lean4/src/putnam_1990_b2.lean | 3 ++ lean4/src/putnam_1990_b3.lean | 3 ++ lean4/src/putnam_1990_b4.lean | 7 ++++ lean4/src/putnam_1990_b5.lean | 3 ++ lean4/src/putnam_1991_a2.lean | 3 ++ lean4/src/putnam_1991_a3.lean | 8 ++++ lean4/src/putnam_1991_a4.lean | 8 ++++ lean4/src/putnam_1991_a5.lean | 3 ++ lean4/src/putnam_1991_a6.lean | 9 ++++ lean4/src/putnam_1991_b1.lean | 3 ++ lean4/src/putnam_1991_b2.lean | 8 ++++ lean4/src/putnam_1991_b4.lean | 3 ++ lean4/src/putnam_1991_b5.lean | 3 ++ lean4/src/putnam_1991_b6.lean | 3 ++ lean4/src/putnam_1992_a1.lean | 8 ++++ lean4/src/putnam_1992_a2.lean | 6 +++ lean4/src/putnam_1992_a3.lean | 6 +++ lean4/src/putnam_1992_a4.lean | 7 ++++ lean4/src/putnam_1992_a5.lean | 7 ++++ lean4/src/putnam_1992_b1.lean | 3 ++ lean4/src/putnam_1992_b2.lean | 7 ++++ lean4/src/putnam_1992_b3.lean | 8 ++++ lean4/src/putnam_1992_b4.lean | 7 ++++ lean4/src/putnam_1992_b5.lean | 16 +++++++ lean4/src/putnam_1992_b6.lean | 10 +++++ lean4/src/putnam_1993_a1.lean | 3 ++ lean4/src/putnam_1993_a2.lean | 3 ++ lean4/src/putnam_1993_a3.lean | 3 ++ lean4/src/putnam_1993_a4.lean | 3 ++ lean4/src/putnam_1993_a5.lean | 3 ++ lean4/src/putnam_1993_a6.lean | 3 ++ lean4/src/putnam_1993_b1.lean | 3 ++ lean4/src/putnam_1993_b3.lean | 3 ++ lean4/src/putnam_1993_b4.lean | 3 ++ lean4/src/putnam_1993_b5.lean | 3 ++ lean4/src/putnam_1993_b6.lean | 3 ++ lean4/src/putnam_1994_a1.lean | 3 ++ lean4/src/putnam_1994_a3.lean | 3 ++ lean4/src/putnam_1994_a4.lean | 3 ++ lean4/src/putnam_1994_a5.lean | 3 ++ lean4/src/putnam_1994_a6.lean | 3 ++ lean4/src/putnam_1994_b1.lean | 3 ++ lean4/src/putnam_1994_b2.lean | 3 ++ lean4/src/putnam_1994_b3.lean | 3 ++ lean4/src/putnam_1994_b4.lean | 3 ++ lean4/src/putnam_1994_b5.lean | 3 ++ lean4/src/putnam_1994_b6.lean | 3 ++ lean4/src/putnam_1995_a1.lean | 3 ++ lean4/src/putnam_1995_a2.lean | 3 ++ lean4/src/putnam_1995_a3.lean | 3 ++ lean4/src/putnam_1995_a4.lean | 3 ++ lean4/src/putnam_1995_a5.lean | 3 ++ lean4/src/putnam_1995_a6.lean | 3 ++ lean4/src/putnam_1995_b1.lean | 3 ++ lean4/src/putnam_1995_b3.lean | 3 ++ lean4/src/putnam_1995_b4.lean | 3 ++ lean4/src/putnam_1995_b6.lean | 3 ++ lean4/src/putnam_1996_a2.lean | 3 ++ lean4/src/putnam_1996_a3.lean | 3 ++ lean4/src/putnam_1996_a4.lean | 3 ++ lean4/src/putnam_1996_a5.lean | 3 ++ lean4/src/putnam_1996_a6.lean | 3 ++ lean4/src/putnam_1996_b1.lean | 3 ++ lean4/src/putnam_1996_b2.lean | 3 ++ lean4/src/putnam_1996_b3.lean | 3 ++ lean4/src/putnam_1996_b4.lean | 3 ++ lean4/src/putnam_1996_b5.lean | 3 ++ lean4/src/putnam_1997_a3.lean | 3 ++ lean4/src/putnam_1997_a4.lean | 3 ++ lean4/src/putnam_1997_a5.lean | 3 ++ lean4/src/putnam_1997_a6.lean | 3 ++ lean4/src/putnam_1997_b1.lean | 3 ++ lean4/src/putnam_1997_b2.lean | 3 ++ lean4/src/putnam_1997_b3.lean | 3 ++ lean4/src/putnam_1997_b4.lean | 3 ++ lean4/src/putnam_1997_b5.lean | 3 ++ lean4/src/putnam_1998_a2.lean | 3 ++ lean4/src/putnam_1998_a3.lean | 3 ++ lean4/src/putnam_1998_a4.lean | 3 ++ lean4/src/putnam_1998_a5.lean | 3 ++ lean4/src/putnam_1998_a6.lean | 5 +++ lean4/src/putnam_1998_b1.lean | 3 ++ lean4/src/putnam_1998_b2.lean | 3 ++ lean4/src/putnam_1998_b4.lean | 3 ++ lean4/src/putnam_1998_b5.lean | 3 ++ lean4/src/putnam_1998_b6.lean | 3 ++ lean4/src/putnam_1999_a1.lean | 3 ++ lean4/src/putnam_1999_a2.lean | 3 ++ lean4/src/putnam_1999_a3.lean | 3 ++ lean4/src/putnam_1999_a4.lean | 3 ++ lean4/src/putnam_1999_a5.lean | 3 ++ lean4/src/putnam_1999_a6.lean | 3 ++ lean4/src/putnam_1999_b2.lean | 3 ++ lean4/src/putnam_1999_b3.lean | 3 ++ lean4/src/putnam_1999_b4.lean | 3 ++ lean4/src/putnam_1999_b5.lean | 3 ++ lean4/src/putnam_1999_b6.lean | 3 ++ lean4/src/putnam_2000_a1.lean | 3 ++ lean4/src/putnam_2000_a2.lean | 3 ++ lean4/src/putnam_2000_a4.lean | 3 ++ lean4/src/putnam_2000_a5.lean | 3 ++ lean4/src/putnam_2000_a6.lean | 3 ++ lean4/src/putnam_2000_b1.lean | 3 ++ lean4/src/putnam_2000_b2.lean | 7 ++++ lean4/src/putnam_2000_b3.lean | 6 +++ lean4/src/putnam_2000_b4.lean | 3 ++ lean4/src/putnam_2000_b5.lean | 3 ++ lean4/src/putnam_2001_a1.lean | 3 ++ lean4/src/putnam_2001_a3.lean | 5 +++ lean4/src/putnam_2001_a5.lean | 3 ++ lean4/src/putnam_2001_b1.lean | 3 ++ lean4/src/putnam_2001_b2.lean | 7 ++++ lean4/src/putnam_2001_b3.lean | 3 ++ lean4/src/putnam_2001_b4.lean | 3 ++ lean4/src/putnam_2001_b5.lean | 3 ++ lean4/src/putnam_2001_b6.lean | 3 ++ lean4/src/putnam_2002_a1.lean | 3 ++ lean4/src/putnam_2002_a2.lean | 3 ++ lean4/src/putnam_2002_a3.lean | 3 ++ lean4/src/putnam_2002_a5.lean | 11 +++++ lean4/src/putnam_2002_a6.lean | 9 ++++ lean4/src/putnam_2002_b3.lean | 7 ++++ lean4/src/putnam_2002_b5.lean | 9 ++++ lean4/src/putnam_2002_b6.lean | 14 +++++++ lean4/src/putnam_2003_a1.lean | 3 ++ lean4/src/putnam_2003_a2.lean | 3 ++ lean4/src/putnam_2003_a3.lean | 3 ++ lean4/src/putnam_2003_a4.lean | 3 ++ lean4/src/putnam_2003_a5.lean | 3 ++ lean4/src/putnam_2003_a6.lean | 3 ++ lean4/src/putnam_2003_b1.lean | 3 ++ lean4/src/putnam_2003_b2.lean | 3 ++ lean4/src/putnam_2003_b3.lean | 3 ++ lean4/src/putnam_2003_b4.lean | 3 ++ lean4/src/putnam_2003_b5.lean | 3 ++ lean4/src/putnam_2003_b6.lean | 3 ++ lean4/src/putnam_2004_a1.lean | 3 ++ lean4/src/putnam_2004_a3.lean | 6 +++ lean4/src/putnam_2004_a4.lean | 3 ++ lean4/src/putnam_2004_a5.lean | 3 ++ lean4/src/putnam_2004_a6.lean | 3 ++ lean4/src/putnam_2004_b1.lean | 3 ++ lean4/src/putnam_2004_b2.lean | 3 ++ lean4/src/putnam_2004_b4.lean | 3 ++ lean4/src/putnam_2004_b5.lean | 3 ++ lean4/src/putnam_2004_b6.lean | 3 ++ lean4/src/putnam_2005_a1.lean | 3 ++ lean4/src/putnam_2005_a2.lean | 13 ++++++ lean4/src/putnam_2005_a3.lean | 3 ++ lean4/src/putnam_2005_a4.lean | 3 ++ lean4/src/putnam_2005_a5.lean | 3 ++ lean4/src/putnam_2005_b1.lean | 3 ++ lean4/src/putnam_2005_b2.lean | 3 ++ lean4/src/putnam_2005_b3.lean | 3 ++ lean4/src/putnam_2005_b4.lean | 3 ++ lean4/src/putnam_2005_b5.lean | 11 +++++ lean4/src/putnam_2005_b6.lean | 3 ++ lean4/src/putnam_2006_a1.lean | 6 +++ lean4/src/putnam_2006_a3.lean | 3 ++ lean4/src/putnam_2006_a4.lean | 9 ++++ lean4/src/putnam_2006_a5.lean | 3 ++ lean4/src/putnam_2006_b1.lean | 3 ++ lean4/src/putnam_2006_b2.lean | 6 +++ lean4/src/putnam_2006_b3.lean | 3 ++ lean4/src/putnam_2006_b4.lean | 3 ++ lean4/src/putnam_2006_b5.lean | 3 ++ lean4/src/putnam_2006_b6.lean | 3 ++ lean4/src/putnam_2007_a1.lean | 3 ++ lean4/src/putnam_2007_a2.lean | 3 ++ lean4/src/putnam_2007_a3.lean | 3 ++ lean4/src/putnam_2007_a4.lean | 3 ++ lean4/src/putnam_2007_a5.lean | 3 ++ lean4/src/putnam_2007_b1.lean | 3 ++ lean4/src/putnam_2007_b2.lean | 7 ++++ lean4/src/putnam_2007_b3.lean | 3 ++ lean4/src/putnam_2007_b4.lean | 7 ++++ lean4/src/putnam_2007_b5.lean | 9 ++++ lean4/src/putnam_2007_b6.lean | 6 +++ lean4/src/putnam_2008_a1.lean | 3 ++ lean4/src/putnam_2008_a3.lean | 3 ++ lean4/src/putnam_2008_a4.lean | 3 ++ lean4/src/putnam_2008_a5.lean | 3 ++ lean4/src/putnam_2008_a6.lean | 3 ++ lean4/src/putnam_2008_b1.lean | 3 ++ lean4/src/putnam_2008_b2.lean | 3 ++ lean4/src/putnam_2008_b3.lean | 3 ++ lean4/src/putnam_2008_b4.lean | 3 ++ lean4/src/putnam_2008_b5.lean | 3 ++ lean4/src/putnam_2008_b6.lean | 3 ++ lean4/src/putnam_2009_a1.lean | 3 ++ lean4/src/putnam_2009_a2.lean | 10 +++++ lean4/src/putnam_2009_a3.lean | 3 ++ lean4/src/putnam_2009_a4.lean | 9 ++++ lean4/src/putnam_2009_a5.lean | 3 ++ lean4/src/putnam_2009_b1.lean | 3 ++ lean4/src/putnam_2009_b2.lean | 3 ++ lean4/src/putnam_2009_b3.lean | 3 ++ lean4/src/putnam_2009_b4.lean | 3 ++ lean4/src/putnam_2009_b5.lean | 8 ++++ lean4/src/putnam_2009_b6.lean | 3 ++ lean4/src/putnam_2010_a1.lean | 3 ++ lean4/src/putnam_2010_a2.lean | 7 ++++ lean4/src/putnam_2010_a4.lean | 3 ++ lean4/src/putnam_2010_a5.lean | 3 ++ lean4/src/putnam_2010_a6.lean | 5 +++ lean4/src/putnam_2010_b1.lean | 3 ++ lean4/src/putnam_2010_b2.lean | 3 ++ lean4/src/putnam_2010_b3.lean | 3 ++ lean4/src/putnam_2010_b4.lean | 3 ++ lean4/src/putnam_2010_b5.lean | 3 ++ lean4/src/putnam_2010_b6.lean | 3 ++ lean4/src/putnam_2011_a1.lean | 8 ++++ lean4/src/putnam_2011_a2.lean | 3 ++ lean4/src/putnam_2011_a3.lean | 3 ++ lean4/src/putnam_2011_a4.lean | 3 ++ lean4/src/putnam_2011_a5.lean | 9 ++++ lean4/src/putnam_2011_a6.lean | 3 ++ lean4/src/putnam_2011_b1.lean | 3 ++ lean4/src/putnam_2011_b2.lean | 3 ++ lean4/src/putnam_2011_b3.lean | 3 ++ lean4/src/putnam_2011_b4.lean | 3 ++ lean4/src/putnam_2011_b5.lean | 10 +++++ lean4/src/putnam_2011_b6.lean | 6 +++ lean4/src/putnam_2012_a1.lean | 3 ++ lean4/src/putnam_2012_a2.lean | 3 ++ lean4/src/putnam_2012_a3.lean | 12 ++++++ lean4/src/putnam_2012_a4.lean | 3 ++ lean4/src/putnam_2012_a5.lean | 3 ++ lean4/src/putnam_2012_a6.lean | 4 ++ lean4/src/putnam_2012_b1.lean | 13 ++++++ lean4/src/putnam_2012_b3.lean | 3 ++ lean4/src/putnam_2012_b4.lean | 4 ++ lean4/src/putnam_2012_b5.lean | 3 ++ lean4/src/putnam_2012_b6.lean | 3 ++ lean4/src/putnam_2013_a2.lean | 9 ++++ lean4/src/putnam_2013_a3.lean | 3 ++ lean4/src/putnam_2013_a4.lean | 3 ++ lean4/src/putnam_2013_a5.lean | 3 ++ lean4/src/putnam_2013_a6.lean | 18 ++++++++ lean4/src/putnam_2013_b1.lean | 3 ++ lean4/src/putnam_2013_b2.lean | 15 +++++++ lean4/src/putnam_2013_b3.lean | 3 ++ lean4/src/putnam_2013_b4.lean | 3 ++ lean4/src/putnam_2013_b5.lean | 3 ++ lean4/src/putnam_2014_a1.lean | 3 ++ lean4/src/putnam_2014_a2.lean | 3 ++ lean4/src/putnam_2014_a3.lean | 3 ++ lean4/src/putnam_2014_a4.lean | 3 ++ lean4/src/putnam_2014_a5.lean | 3 ++ lean4/src/putnam_2014_a6.lean | 3 ++ lean4/src/putnam_2014_b1.lean | 7 ++++ lean4/src/putnam_2014_b2.lean | 3 ++ lean4/src/putnam_2014_b3.lean | 3 ++ lean4/src/putnam_2014_b4.lean | 3 ++ lean4/src/putnam_2014_b6.lean | 3 ++ lean4/src/putnam_2015_a1.lean | 3 ++ lean4/src/putnam_2015_a2.lean | 3 ++ lean4/src/putnam_2015_a3.lean | 3 ++ lean4/src/putnam_2015_a4.lean | 7 ++++ lean4/src/putnam_2015_a5.lean | 3 ++ lean4/src/putnam_2015_a6.lean | 3 ++ lean4/src/putnam_2015_b1.lean | 3 ++ lean4/src/putnam_2015_b2.lean | 3 ++ lean4/src/putnam_2015_b3.lean | 3 ++ lean4/src/putnam_2015_b4.lean | 7 ++++ lean4/src/putnam_2015_b5.lean | 11 +++++ lean4/src/putnam_2015_b6.lean | 3 ++ lean4/src/putnam_2016_a1.lean | 3 ++ lean4/src/putnam_2016_a2.lean | 10 +++++ lean4/src/putnam_2016_a3.lean | 10 +++++ lean4/src/putnam_2016_a5.lean | 8 ++++ lean4/src/putnam_2016_a6.lean | 6 +++ lean4/src/putnam_2016_b1.lean | 11 +++++ lean4/src/putnam_2016_b2.lean | 10 +++++ lean4/src/putnam_2016_b3.lean | 3 ++ lean4/src/putnam_2016_b4.lean | 3 ++ lean4/src/putnam_2016_b5.lean | 3 ++ lean4/src/putnam_2016_b6.lean | 3 ++ lean4/src/putnam_2017_a1.lean | 3 ++ lean4/src/putnam_2017_a2.lean | 3 ++ lean4/src/putnam_2017_a3.lean | 3 ++ lean4/src/putnam_2017_a4.lean | 3 ++ lean4/src/putnam_2017_b1.lean | 3 ++ lean4/src/putnam_2017_b2.lean | 7 ++++ lean4/src/putnam_2017_b3.lean | 3 ++ lean4/src/putnam_2017_b4.lean | 3 ++ lean4/src/putnam_2017_b6.lean | 7 ++++ lean4/src/putnam_2018_a1.lean | 3 ++ lean4/src/putnam_2018_a2.lean | 3 ++ lean4/src/putnam_2018_a3.lean | 3 ++ lean4/src/putnam_2018_a4.lean | 3 ++ lean4/src/putnam_2018_a5.lean | 3 ++ lean4/src/putnam_2018_a6.lean | 3 ++ lean4/src/putnam_2018_b1.lean | 3 ++ lean4/src/putnam_2018_b2.lean | 3 ++ lean4/src/putnam_2018_b3.lean | 3 ++ lean4/src/putnam_2018_b4.lean | 3 ++ lean4/src/putnam_2018_b5.lean | 3 ++ lean4/src/putnam_2018_b6.lean | 3 ++ lean4/src/putnam_2019_a1.lean | 7 ++++ lean4/src/putnam_2019_a3.lean | 11 +++++ lean4/src/putnam_2019_a4.lean | 3 ++ lean4/src/putnam_2019_a5.lean | 3 ++ lean4/src/putnam_2019_a6.lean | 3 ++ lean4/src/putnam_2019_b1.lean | 3 ++ lean4/src/putnam_2019_b2.lean | 10 +++++ lean4/src/putnam_2019_b3.lean | 3 ++ lean4/src/putnam_2019_b4.lean | 8 ++++ lean4/src/putnam_2019_b5.lean | 3 ++ lean4/src/putnam_2019_b6.lean | 3 ++ lean4/src/putnam_2020_a1.lean | 3 ++ lean4/src/putnam_2020_a2.lean | 6 +++ lean4/src/putnam_2020_a3.lean | 7 ++++ lean4/src/putnam_2020_a5.lean | 7 ++++ lean4/src/putnam_2020_a6.lean | 7 ++++ lean4/src/putnam_2020_b1.lean | 7 ++++ lean4/src/putnam_2020_b4.lean | 3 ++ lean4/src/putnam_2020_b5.lean | 3 ++ lean4/src/putnam_2020_b6.lean | 3 ++ lean4/src/putnam_2021_a1.lean | 5 +++ lean4/src/putnam_2021_a2.lean | 3 ++ lean4/src/putnam_2021_a3.lean | 3 ++ lean4/src/putnam_2021_a4.lean | 11 +++++ lean4/src/putnam_2021_a5.lean | 3 ++ lean4/src/putnam_2021_a6.lean | 3 ++ lean4/src/putnam_2021_b2.lean | 3 ++ lean4/src/putnam_2021_b3.lean | 3 ++ lean4/src/putnam_2021_b4.lean | 3 ++ lean4/src/putnam_2021_b5.lean | 3 ++ lean4/src/putnam_2022_a1.lean | 3 ++ lean4/src/putnam_2022_a2.lean | 3 ++ lean4/src/putnam_2022_a3.lean | 3 ++ lean4/src/putnam_2022_a6.lean | 3 ++ lean4/src/putnam_2022_b1.lean | 3 ++ lean4/src/putnam_2022_b2.lean | 3 ++ lean4/src/putnam_2022_b3.lean | 3 ++ lean4/src/putnam_2022_b4.lean | 3 ++ lean4/src/putnam_2022_b5.lean | 9 ++++ lean4/src/putnam_2022_b6.lean | 3 ++ lean4/src/putnam_2023_a1.lean | 3 ++ lean4/src/putnam_2023_a2.lean | 3 ++ lean4/src/putnam_2023_a3.lean | 9 ++++ lean4/src/putnam_2023_a5.lean | 3 ++ lean4/src/putnam_2023_b1.lean | 3 ++ lean4/src/putnam_2023_b2.lean | 3 ++ lean4/src/putnam_2023_b4.lean | 10 +++++ lean4/src/putnam_2023_b5.lean | 3 ++ lean4/src/putnam_2023_b6.lean | 9 ++++ 643 files changed, 2693 insertions(+) create mode 100644 lean4/check_docstrings.lean diff --git a/.github/workflows/lean.yml b/.github/workflows/lean.yml index d9a0f0b6..a80a47e1 100644 --- a/.github/workflows/lean.yml +++ b/.github/workflows/lean.yml @@ -38,6 +38,11 @@ jobs: run: | lake exe cache pack + - name: Validate docstrings + working-directory: lean4 + run: | + lake exe check_docstrings + - name: Insert solutions working-directory: lean4 run: | diff --git a/lean4/check_docstrings.lean b/lean4/check_docstrings.lean new file mode 100644 index 00000000..f215d22d --- /dev/null +++ b/lean4/check_docstrings.lean @@ -0,0 +1,78 @@ +import Mathlib.Lean.CoreM +import Mathlib.Util.GetAllModules +import Batteries.Lean.Util.Path +import Lean.Elab.Frontend +import Batteries.Data.String.Matcher + + +open Lean Elab Command Frontend + +def allModules : IO (Array Name) := do + let mut ret := #[] + for p in ← System.FilePath.walkDir "src" do + ret := ret.push (← moduleNameOfFileName p none) + return ret + +structure InformalJsonEntry where + problem_name : Name + informal_statement : String + informal_solution : Option String + tags : List String +deriving Lean.ToJson, Lean.FromJson + +def getModuleNameFor? (env : Environment) (nm : Name) : Option Name := + env.getModuleIdxFor? nm >>= fun i => env.header.moduleNames[i.toNat]? + +inductive EntryResult + | docMatching + | docMismatching + | docMissing + | missing + +/-- Return true if the entry is ok -/ +def checkEntry (entry : InformalJsonEntry) : CoreM EntryResult := do + let doc? := (← Lean.findDocString? (← getEnv) entry.problem_name).map String.trim + if doc? = some entry.informal_statement.trim then + return .docMatching + else if let .some doc := doc? then + IO.eprintln <| + f!"Doc for {entry.problem_name}:\ + \n{doc}\ + \ndoesn't match the content of `informal/putnam.json`:\ + \n{entry.informal_statement.trim}" + return .docMismatching + else + try + discard <| getConstInfo entry.problem_name + catch _ => + IO.eprintln <| s!"No formalization of {entry.problem_name}" + return .missing + IO.eprintln <| + s!"Doc for {entry.problem_name} is missing, adding one. Please rerun `lake build`." + addDocstring + return .docMissing +where + addDocstring : CoreM Unit := do + -- hack, but good enough + let fname : System.FilePath := "src" / s!"{entry.problem_name.toString}.lean" + let mut raw ← IO.FS.readFile fname + let .some thm := raw.findSubstr? "\ntheorem" | throwError "Cannot find theorem command" + raw := + raw.extract 0 thm.startPos + ++ "\n/--\n" ++ entry.informal_statement.trim ++ "\n-/" + ++ raw.extract thm.startPos raw.endPos + IO.FS.writeFile fname raw + +def main : IO UInt32 := do + searchPathRef.set compile_time_search_path% + let json ← IO.ofExcept <| Lean.Json.parse <| ← IO.FS.readFile (".." / "informal" / "putnam.json") + let data : Array InformalJsonEntry ← IO.ofExcept <| fromJson? json + CoreM.withImportModules (← allModules) do + let mut any_errors := false + for entry in data do + match ← checkEntry entry with + | .docMissing | .docMismatching => + any_errors := true + | .missing | .docMatching => + pure () + return bif any_errors then 1 else 0 diff --git a/lean4/lakefile.lean b/lean4/lakefile.lean index c219e187..b7f534f8 100644 --- a/lean4/lakefile.lean +++ b/lean4/lakefile.lean @@ -14,3 +14,7 @@ lean_lib «putnam» where lean_lib «putnam_with_solutions» where globs := #[.submodules `solutions_replaced_new] + +lean_exe «check_docstrings» where + root := `check_docstrings + supportInterpreter := true diff --git a/lean4/src/putnam_1962_a1.lean b/lean4/src/putnam_1962_a1.lean index 9860e8c9..9f1422a9 100644 --- a/lean4/src/putnam_1962_a1.lean +++ b/lean4/src/putnam_1962_a1.lean @@ -3,6 +3,9 @@ open BigOperators open MeasureTheory +/-- +Given five points in a plane, no three of which lie on a straight line, show that some four of these points form the vertices of a convex quadrilateral. +-/ theorem putnam_1962_a1 (S : Set (ℝ × ℝ)) (hS : S.ncard = 5) diff --git a/lean4/src/putnam_1962_a2.lean b/lean4/src/putnam_1962_a2.lean index 6947605d..9dcf7d14 100644 --- a/lean4/src/putnam_1962_a2.lean +++ b/lean4/src/putnam_1962_a2.lean @@ -5,6 +5,9 @@ open MeasureTheory Set abbrev putnam_1962_a2_solution : Set (ℝ → ℝ) := sorry -- {f : ℝ → ℝ | ∃ a c : ℝ, a ≥ 0 ∧ f = fun x ↦ a / (1 - c * x) ^ 2} +/-- +Find every real-valued function $f$ whose domain is an interval $I$ (finite or infinite) having 0 as a left-hand endpoint, such that for every positive member $x$ of $I$ the average of $f$ over the closed interval $[0, x]$ is equal to the geometric mean of the numbers $f(0)$ and $f(x)$. +-/ theorem putnam_1962_a2 (P : Set ℝ → (ℝ → ℝ) → Prop) (P_def : ∀ s f, P s f ↔ 0 ≤ f ∧ ∀ x ∈ s, ⨍ t in Ico 0 x, f t = √(f 0 * f x)) : diff --git a/lean4/src/putnam_1962_a3.lean b/lean4/src/putnam_1962_a3.lean index 1238d2cf..50360174 100644 --- a/lean4/src/putnam_1962_a3.lean +++ b/lean4/src/putnam_1962_a3.lean @@ -3,6 +3,9 @@ open BigOperators open MeasureTheory +/-- +Let $\triangle ABC$ be a triangle in the Euclidean plane, with points $P$, $Q$, and $R$ lying on segments $\overline{BC}$, $\overline{CA}$, $\overline{AB}$ respectively such that $$\frac{AQ}{QC} = \frac{BR}{RA} = \frac{CP}{PB} = k$$ for some positive constant $k$. If $\triangle UVW$ is the triangle formed by parts of segments $\overline{AP}$, $\overline{BQ}$, and $\overline{CR}$, prove that $$\frac{[\triangle UVW]}{[\triangle ABC]} = \frac{(k - 1)^2}{k^2 + k + 1},$$ where $[\triangle]$ denotes the area of the triangle $\triangle$. +-/ theorem putnam_1962_a3 (A B C A' B' C' P Q R : EuclideanSpace ℝ (Fin 2)) (k : ℝ) diff --git a/lean4/src/putnam_1962_a4.lean b/lean4/src/putnam_1962_a4.lean index 51d151f3..fc896b85 100644 --- a/lean4/src/putnam_1962_a4.lean +++ b/lean4/src/putnam_1962_a4.lean @@ -1,6 +1,9 @@ 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. +-/ theorem putnam_1962_a4 (f : ℝ → ℝ) (a b : ℝ) diff --git a/lean4/src/putnam_1962_a5.lean b/lean4/src/putnam_1962_a5.lean index 7ef238c4..208b6645 100644 --- a/lean4/src/putnam_1962_a5.lean +++ b/lean4/src/putnam_1962_a5.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1962_a5_solution : ℕ → ℕ := sorry -- fun n : ℕ => n * (n + 1) * 2^(n - 2) +/-- +Evaluate in closed form \[ \sum_{k=1}^n {n \choose k} k^2. \] +-/ theorem putnam_1962_a5 : ∀ n ≥ 2, putnam_1962_a5_solution n = ∑ k in Finset.Icc 1 n, Nat.choose n k * k^2 := sorry diff --git a/lean4/src/putnam_1962_a6.lean b/lean4/src/putnam_1962_a6.lean index 16a11578..a7d202b9 100644 --- a/lean4/src/putnam_1962_a6.lean +++ b/lean4/src/putnam_1962_a6.lean @@ -1,6 +1,9 @@ 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. +-/ theorem putnam_1962_a6 (S : Set ℚ) (hSadd : ∀ a ∈ S, ∀ b ∈ S, a + b ∈ S) diff --git a/lean4/src/putnam_1962_b1.lean b/lean4/src/putnam_1962_b1.lean index f461f42f..8e0a9f59 100644 --- a/lean4/src/putnam_1962_b1.lean +++ b/lean4/src/putnam_1962_b1.lean @@ -1,6 +1,9 @@ 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)}. \] +-/ theorem putnam_1962_b1 (p : ℕ → ℝ → ℝ) (x y : ℝ) diff --git a/lean4/src/putnam_1962_b2.lean b/lean4/src/putnam_1962_b2.lean index 07d2f383..8cb176d5 100644 --- a/lean4/src/putnam_1962_b2.lean +++ b/lean4/src/putnam_1962_b2.lean @@ -4,6 +4,9 @@ open BigOperators open MeasureTheory --Note: The original problem requires a function to be exhibited, but in the official archives the solution depends on an enumeration of the rationals, so we modify the problem to be an existential statement. +/-- +Let $\mathbb{S}$ be the set of all subsets of the natural numbers. Prove the existence of a function $f : \mathbb{R} \to \mathbb{S}$ such that $f(a) \subset f(b)$ whenever $a < b$. +-/ theorem putnam_1962_b2 : ∃ f : ℝ → Set ℕ+, ∀ a b : ℝ, a < b → f a ⊂ f b := sorry diff --git a/lean4/src/putnam_1962_b3.lean b/lean4/src/putnam_1962_b3.lean index 842579b7..5267fb17 100644 --- a/lean4/src/putnam_1962_b3.lean +++ b/lean4/src/putnam_1962_b3.lean @@ -3,6 +3,9 @@ open BigOperators open MeasureTheory +/-- +Let $S$ be a convex region in the Euclidean plane, containing the origin, for which every ray from the origin has at least one point outside $S$. Assuming that either the origin is an interior point of $S$ or $S$ is topologically closed, prove that $S$ is bounded. +-/ theorem putnam_1962_b3 (S : Set (EuclideanSpace ℝ (Fin 2))) (hS : Convex ℝ S ∧ 0 ∈ S) diff --git a/lean4/src/putnam_1962_b5.lean b/lean4/src/putnam_1962_b5.lean index 6330e822..c9d62344 100644 --- a/lean4/src/putnam_1962_b5.lean +++ b/lean4/src/putnam_1962_b5.lean @@ -3,6 +3,9 @@ open BigOperators open MeasureTheory +/-- +Prove that for every integer $n$ greater than 1: \[ \frac{3n+1}{2n+2} < \left( \frac{1}{n} \right)^n + \left(\frac{2}{n} \right)^n + \cdots + \left(\frac{n}{n} \right)^n < 2. \] +-/ theorem putnam_1962_b5 (n : ℤ) (ng1 : n > 1) diff --git a/lean4/src/putnam_1962_b6.lean b/lean4/src/putnam_1962_b6.lean index 7cbd119a..f9ebad3f 100644 --- a/lean4/src/putnam_1962_b6.lean +++ b/lean4/src/putnam_1962_b6.lean @@ -3,6 +3,9 @@ open BigOperators open MeasureTheory Real +/-- +Let \[ f(x) = \sum_{k=0}^n a_k \sin kx + b_k \cos kx, \] where $a_k$ and $b_k$ are constants. Show that, if $\lvert f(x) \rvert \le 1$ for $0 \le x \le 2 \pi$ and $\lvert f(x_i) \rvert = 1$ for $0 \le x_1 < x_2 < \cdots < x_{2n} < 2 \pi$, then $f(x) = \cos (nx + a)$ for some constant $a$. +-/ theorem putnam_1962_b6 (n : ℕ) (a b : ℕ → ℝ) diff --git a/lean4/src/putnam_1963_a2.lean b/lean4/src/putnam_1963_a2.lean index 2dbf6783..66f14c7c 100644 --- a/lean4/src/putnam_1963_a2.lean +++ b/lean4/src/putnam_1963_a2.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Let $\{f(n)\}$ be a strictly increasing sequence of positive integers such that $f(2)=2$ and $f(mn)=f(m)f(n)$ for every relatively prime pair of positive integers $m$ and $n$ (the greatest common divisor of $m$ and $n$ is equal to $1$). Prove that $f(n)=n$ for every positive integer $n$. +-/ theorem putnam_1963_a2 (f : ℕ → ℕ) (hfpos : ∀ n, f n > 0) diff --git a/lean4/src/putnam_1963_a3.lean b/lean4/src/putnam_1963_a3.lean index 843e469b..c357462e 100644 --- a/lean4/src/putnam_1963_a3.lean +++ b/lean4/src/putnam_1963_a3.lean @@ -5,6 +5,9 @@ open Nat Set Topology Filter noncomputable abbrev putnam_1963_a3_solution : (ℝ → ℝ) → ℕ → ℝ → ℝ → ℝ := sorry -- fun (f : ℝ → ℝ) (n : ℕ) (x : ℝ) (t : ℝ) ↦ (x - t) ^ (n - 1) * (f t) / ((n - 1)! * t ^ n) +/-- +Find an integral formula (i.e., a function $z$ such that $y(x) = \int_{1}^{x} z(t) dt$) for the solution of the differential equation $$\delta (\delta - 1) (\delta - 2) \cdots (\delta - n + 1) y = f(x)$$ with the initial conditions $y(1) = y'(1) = \cdots = y^{(n-1)}(1) = 0$, where $n \in \mathbb{N}$, $f$ is continuous for all $x \ge 1$, and $\delta$ denotes $x\frac{d}{dx}$. +-/ theorem putnam_1963_a3 (P : ℕ → (ℝ → ℝ) → (ℝ → ℝ)) (hP : P 0 = id ∧ ∀ i y, P (i + 1) y = P i (fun x ↦ x * deriv y x - i * y x)) diff --git a/lean4/src/putnam_1963_a4.lean b/lean4/src/putnam_1963_a4.lean index 6d046706..803a5988 100644 --- a/lean4/src/putnam_1963_a4.lean +++ b/lean4/src/putnam_1963_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Set +/-- +Let $\{a_n\}$ be a sequence of positive real numbers. Show that $\limsup_{n \to \infty} n\left(\frac{1+a_{n+1}}{a_n}-1\right) \geq 1$. Show that the number $1$ on the right-hand side of this inequality cannot be replaced by any larger number. (The symbol $\limsup$ is sometimes written $\overline{\lim}$.) +-/ theorem putnam_1963_a4 (T : (ℕ → ℝ) → (ℕ → ℝ)) (T_def : ∀ a n, T a n = n * ((1 + a (n + 1)) / a n - 1)) diff --git a/lean4/src/putnam_1963_a6.lean b/lean4/src/putnam_1963_a6.lean index b0c5174f..1df44be7 100644 --- a/lean4/src/putnam_1963_a6.lean +++ b/lean4/src/putnam_1963_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Let $U$ and $V$ be distinct points on an ellipse, with $M$ the midpoint of chord $\overline{UV}$, and let $\overline{AB}$ and $\overline{CD}$ be any two other chords through $M$. If line $UV$ intersects line $AC$ at $P$ and line $BD$ at $Q$, prove that $M$ is the midpoint of segment $\overline{PQ}$. +-/ theorem putnam_1963_a6 (F1 F2 U V A B C D P Q : EuclideanSpace ℝ (Fin 2)) (r : ℝ) diff --git a/lean4/src/putnam_1963_b1.lean b/lean4/src/putnam_1963_b1.lean index 1fb962b9..48d4a770 100644 --- a/lean4/src/putnam_1963_b1.lean +++ b/lean4/src/putnam_1963_b1.lean @@ -5,6 +5,9 @@ open Topology Filter Polynomial abbrev putnam_1963_b1_solution : ℤ := sorry -- 2 +/-- +For what integer $a$ does $x^2-x+a$ divide $x^{13}+x+90$? +-/ theorem putnam_1963_b1 : ∀ a : ℤ, (X^2 - X + (C a)) ∣ (X ^ 13 + X + (C 90)) ↔ a = putnam_1963_b1_solution := sorry diff --git a/lean4/src/putnam_1963_b2.lean b/lean4/src/putnam_1963_b2.lean index 501f9b10..261d941a 100644 --- a/lean4/src/putnam_1963_b2.lean +++ b/lean4/src/putnam_1963_b2.lean @@ -5,6 +5,9 @@ open Topology Filter Polynomial abbrev putnam_1963_b2_solution : Prop := sorry -- True +/-- +Let $S$ be the set of all numbers of the form $2^m3^n$, where $m$ and $n$ are integers, and let $P$ be the set of all positive real numbers. Is $S$ dense in $P$? +-/ theorem putnam_1963_b2 (S : Set ℝ) (hS : S = {2 ^ m * 3 ^ n | (m : ℤ) (n : ℤ)}) diff --git a/lean4/src/putnam_1963_b3.lean b/lean4/src/putnam_1963_b3.lean index bc8988fa..aaff0c28 100644 --- a/lean4/src/putnam_1963_b3.lean +++ b/lean4/src/putnam_1963_b3.lean @@ -5,6 +5,9 @@ open Topology Filter Polynomial abbrev putnam_1963_b3_solution : Set (ℝ → ℝ) := sorry -- {(fun u : ℝ => A * Real.sinh (k * u)) | (A : ℝ) (k : ℝ)} ∪ {(fun u : ℝ => A * u) | A : ℝ} ∪ {(fun u : ℝ => A * Real.sin (k * u)) | (A : ℝ) (k : ℝ)} +/-- +Find every twice-differentiable real-valued function $f$ with domain the set of all real numbers and satisfying the functional equation $(f(x))^2-(f(y))^2=f(x+y)f(x-y)$ for all real numbers $x$ and $y$. +-/ theorem putnam_1963_b3 (f : ℝ → ℝ) (fdiff : Prop) diff --git a/lean4/src/putnam_1963_b5.lean b/lean4/src/putnam_1963_b5.lean index e6e8e79d..454f9b78 100644 --- a/lean4/src/putnam_1963_b5.lean +++ b/lean4/src/putnam_1963_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Polynomial +/-- +Let $\{a_n\}$ be a sequence of real numbers satisfying the inequalities $0 \leq a_k \leq 100a_n$ for $n \leq k \leq 2n$ and $n=1,2,\dots$, and such that the series $\sum_{n=0}^\infty a_n$ converges. Prove that $\lim_{n \to \infty}na_n=0$. +-/ theorem putnam_1963_b5 (a : ℤ → ℝ) (haineq : ∀ n ≥ 1, ∀ k : ℤ, (n ≤ k ∧ k ≤ 2 * n) → (0 ≤ a k ∧ a k ≤ 100 * a n)) diff --git a/lean4/src/putnam_1963_b6.lean b/lean4/src/putnam_1963_b6.lean index 8f383059..fef2505e 100644 --- a/lean4/src/putnam_1963_b6.lean +++ b/lean4/src/putnam_1963_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Polynomial +/-- +Let $E$ be a Euclidean space of at most three dimensions. If $A$ is a nonempty subset of $E$, define $S(A)$ to be the set of all points that lie on closed segments joining pairs of points of $A$. For a given nonempty set $A_0$, define $A_n=S(A_{n-1})$ for $n=1,2,\dots$. Prove that $A_2=A_3=\cdots$. (A one-point set should be considered to be a special case of a closed segment.) +-/ theorem putnam_1963_b6 (d : ℕ) (S : Set (Fin d → ℝ) → Set (Fin d → ℝ)) diff --git a/lean4/src/putnam_1964_a1.lean b/lean4/src/putnam_1964_a1.lean index 32f23bd1..0b611690 100644 --- a/lean4/src/putnam_1964_a1.lean +++ b/lean4/src/putnam_1964_a1.lean @@ -1,6 +1,9 @@ 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$. +-/ theorem putnam_1964_a1 (A : Finset (EuclideanSpace ℝ (Fin 2))) (hAcard : A.card = 6) diff --git a/lean4/src/putnam_1964_a2.lean b/lean4/src/putnam_1964_a2.lean index 1792a918..3390dbde 100644 --- a/lean4/src/putnam_1964_a2.lean +++ b/lean4/src/putnam_1964_a2.lean @@ -6,6 +6,14 @@ open Set -- Note: uses (ℝ → ℝ) instead of (Icc 0 1 → ℝ) abbrev putnam_1964_a2_solution : ℝ → Set (ℝ → ℝ) := sorry -- fun _ ↦ ∅ +/-- +Let $\alpha$ be a real number. Find all continuous real-valued functions $f : [0, 1] \to (0, \infty)$ such that +\begin{align*} +\int_0^1 f(x) dx &= 1, \\ +\int_0^1 x f(x) dx &= \alpha, \\ +\int_0^1 x^2 f(x) dx &= \alpha^2. \\ +\end{align*} +-/ theorem putnam_1964_a2 (α : ℝ) : (putnam_1964_a2_solution α = {f : ℝ → ℝ | (∀ x ∈ Icc 0 1, f x > 0) ∧ ContinuousOn f (Icc 0 1) ∧ ∫ x in (0)..1, f x = 1 ∧ ∫ x in (0)..1, x * f x = α ∧ ∫ x in (0)..1, x^2 * f x = α^2}) := diff --git a/lean4/src/putnam_1964_a3.lean b/lean4/src/putnam_1964_a3.lean index 7f4b531e..455608f4 100644 --- a/lean4/src/putnam_1964_a3.lean +++ b/lean4/src/putnam_1964_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function +/-- +The distinct points $x_n$ are dense in the interval $(0, 1)$. For all $n \geq 1$, $x_1, x_2, \dots , x_{n-1}$ divide $(0, 1)$ into $n$ sub-intervals, one of which must contain $x_n$. This part is divided by $x_n$ into two sub-intervals, lengths $a_n$ and $b_n$. Prove that $\sum_{n=1}^{\infty} a_nb_n(a_n + b_n) = \frac{1}{3}$. +-/ theorem putnam_1964_a3 (x a b : ℕ → ℝ) (hxdense : range x ⊆ Ioo 0 1 ∧ closure (range x) ⊇ Ioo 0 1) diff --git a/lean4/src/putnam_1964_a4.lean b/lean4/src/putnam_1964_a4.lean index 073b0305..07a68f4a 100644 --- a/lean4/src/putnam_1964_a4.lean +++ b/lean4/src/putnam_1964_a4.lean @@ -3,6 +3,13 @@ open BigOperators open Set Function +/-- +The sequence of integers $u_n$ is bounded and satisfies +\[ +u_n = \frac{u_{n-1} + u_{n-2} + u_{n-3}u_{n-4}}{u_{n-1}u_{n-2} + u_{n-3} + u_{n-4}}. +\] +Show that it is periodic for sufficiently large $n$. +-/ theorem putnam_1964_a4 (u : ℕ → ℤ) (boundedu : ∃ B T : ℤ, ∀ n : ℕ, B ≤ u n ∧ u n ≤ T) diff --git a/lean4/src/putnam_1964_a5.lean b/lean4/src/putnam_1964_a5.lean index 816e862d..36ef8031 100644 --- a/lean4/src/putnam_1964_a5.lean +++ b/lean4/src/putnam_1964_a5.lean @@ -3,6 +3,12 @@ open BigOperators open Set Function Filter Topology +/-- +Prove that there exists a constant $k$ such that for any sequence $a_i$ of positive numbers, +\[ +\sum_{n=1}^{\infty} \frac{n}{a_1 + a_2 + \dots + a_n} \leq k \sum_{n=1}^{\infty}\frac{1}{a_n}. +\] +-/ theorem putnam_1964_a5 (pa : (ℕ → ℝ) → Prop) (hpa : pa = fun a ↦ (∀ n : ℕ, a n > 0) ∧ ∃ L : ℝ, Tendsto (fun N ↦ ∑ n in Finset.range N, 1 / a n) atTop (𝓝 L)) diff --git a/lean4/src/putnam_1964_a6.lean b/lean4/src/putnam_1964_a6.lean index f2020df7..f8667922 100644 --- a/lean4/src/putnam_1964_a6.lean +++ b/lean4/src/putnam_1964_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Filter Topology +/-- +Let $S$ be a finite set of collinear points. Let $k$ be the maximum distance between any two points of $S$. Given a pair of points of $S$ a distance $d < k$ apart, we can find another pair of points of $S$ also a distance $d$ apart. Prove that if two pairs of points of $S$ are distances $a$ and $b$ apart, then $ rac{a}{b}$ is rational. +-/ theorem putnam_1964_a6 (S : Finset ℝ) (pairs : Set (ℝ × ℝ)) diff --git a/lean4/src/putnam_1964_b1.lean b/lean4/src/putnam_1964_b1.lean index b79b8470..75477f99 100644 --- a/lean4/src/putnam_1964_b1.lean +++ b/lean4/src/putnam_1964_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Filter Topology +/-- +Let $a_n$ be a sequence of positive integers such that $\sum_{n=1}^{\infty} 1/a_n$ converges. For all $n$, let $b_n$ be the number of $a_n$ which are at most $n$. Prove that $\lim_{n \to \infty} b_n/n = 0$. +-/ theorem putnam_1964_b1 (a b : ℕ → ℕ) (h₁ : ∀ n, 0 < a n) diff --git a/lean4/src/putnam_1964_b2.lean b/lean4/src/putnam_1964_b2.lean index 2055a33d..382d3443 100644 --- a/lean4/src/putnam_1964_b2.lean +++ b/lean4/src/putnam_1964_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Filter Topology +/-- +Let $S$ be a finite set. A set $P$ of subsets of $S$ has the property that any two members of $P$ have at least one element in common and that $P$ cannot be extended (whilst keeping this property). Prove that $P$ contains exactly half of the subsets of $S$. +-/ theorem putnam_1964_b2 (S : Type*) [Fintype S] [Nonempty S] (P : Finset (Set S)) diff --git a/lean4/src/putnam_1964_b3.lean b/lean4/src/putnam_1964_b3.lean index 39d809f4..78b1aed6 100644 --- a/lean4/src/putnam_1964_b3.lean +++ b/lean4/src/putnam_1964_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Filter Topology +/-- +Suppose $f : \mathbb{R} \to \mathbb{R}$ is continuous and for every $\alpha > 0$, $\lim_{n \to \infty} f(n\alpha) = 0$. Prove that $\lim_{x \to \infty} f(x) = 0$. +-/ theorem putnam_1964_b3 (f : ℝ → ℝ) (hf : Continuous f ∧ ∀ α > 0, Tendsto (fun n : ℕ ↦ f (n * α)) atTop (𝓝 0)) diff --git a/lean4/src/putnam_1964_b5.lean b/lean4/src/putnam_1964_b5.lean index 838bbd64..c5bc1903 100644 --- a/lean4/src/putnam_1964_b5.lean +++ b/lean4/src/putnam_1964_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Filter Topology +/-- +Let $a_n$ be a strictly monotonic increasing sequence of positive integers. Let $b_n$ be the least common multiple of $a_1, a_2, \dots , a_n$. Prove that $\sum_{n=1}^{\infty} 1/b_n$ converges. +-/ theorem putnam_1964_b5 (a : ℕ → ℕ) (ha : StrictMono a ∧ ∀ n : ℕ, a n > 0) diff --git a/lean4/src/putnam_1964_b6.lean b/lean4/src/putnam_1964_b6.lean index 34e8b533..cbe0818d 100644 --- a/lean4/src/putnam_1964_b6.lean +++ b/lean4/src/putnam_1964_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Filter Topology +/-- +Let $D$ be the unit disk in the plane. Show that we cannot find congruent sets $A, B$ with $A \cap B = \emptyset$ and $A \cup B = D$. +-/ theorem putnam_1964_b6 (D : Set (EuclideanSpace ℝ (Fin 2))) (hD : D = {v : EuclideanSpace ℝ (Fin 2) | dist 0 v ≤ 1}) diff --git a/lean4/src/putnam_1965_a1.lean b/lean4/src/putnam_1965_a1.lean index 5096c311..4b71b3c1 100644 --- a/lean4/src/putnam_1965_a1.lean +++ b/lean4/src/putnam_1965_a1.lean @@ -5,6 +5,9 @@ open EuclideanGeometry Real noncomputable abbrev putnam_1965_a1_solution : ℝ := sorry -- Real.pi / 15 +/-- +Let $\triangle ABC$ satisfy $\angle CAB < \angle BCA < \frac{\pi}{2} < \angle ABC$. If the bisector of the external angle at $A$ meets line $BC$ at $P$, the bisector of the external angle at $B$ meets line $CA$ at $Q$, and $AP = BQ = AB$, find $\angle CAB$. +-/ theorem putnam_1965_a1 (A B C X Y : EuclideanSpace ℝ (Fin 2)) (hABC : ¬Collinear ℝ {A, B, C}) diff --git a/lean4/src/putnam_1965_a2.lean b/lean4/src/putnam_1965_a2.lean index 79c207df..6149cb72 100644 --- a/lean4/src/putnam_1965_a2.lean +++ b/lean4/src/putnam_1965_a2.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry +/-- +Prove that $$\sum_{r=0}^{\lfloor\frac{n-1}{2}\rfloor} \left(\frac{n - 2r}{n} {n \choose r}\right)^2 = \frac{1}{n} {{2n - 2} \choose {n - 1}}$$ for every positive integer $n$. +-/ theorem putnam_1965_a2 : ∀ n > 0, ∑ r in Finset.Icc 0 ((n - 1)/2), ((n - 2*r) * Nat.choose n r / (n : ℚ))^2 = (Nat.choose (2*n - 2) (n - 1))/(n : ℚ) := sorry diff --git a/lean4/src/putnam_1965_a3.lean b/lean4/src/putnam_1965_a3.lean index 77c34657..3521325b 100644 --- a/lean4/src/putnam_1965_a3.lean +++ b/lean4/src/putnam_1965_a3.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Topology Filter Complex +/-- +Prove that, for any sequence of real numbers $a_1, a_2, \dots$, $$\lim_{n \to \infty} \frac{\sum_{k = 1}^{n} e^{ia_k}}{n} = \alpha$$ if and only if $$\lim_{n \to \infty} \frac{\sum_{k = 1}^{n} e^{ia_{k^2}}}{n^2} = \alpha.$$ +-/ theorem putnam_1965_a3 (a : ℕ → ℝ) (α : ℂ) diff --git a/lean4/src/putnam_1965_a4.lean b/lean4/src/putnam_1965_a4.lean index 8c07d5d5..f5425598 100644 --- a/lean4/src/putnam_1965_a4.lean +++ b/lean4/src/putnam_1965_a4.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Topology Filter Complex +/-- +At a party, no boy dances with every girl, but each girl dances with at least one boy. Prove that there exist girls $g$ and $h$ and boys $b$ and $c$ such that $g$ dances with $b$ and $h$ dances with $c$, but $h$ does not dance with $b$ and $g$ does not dance with $c$. +-/ theorem putnam_1965_a4 {G B : Type*} [Fintype G] [Nonempty G] diff --git a/lean4/src/putnam_1965_a5.lean b/lean4/src/putnam_1965_a5.lean index fa80e93f..303a9c60 100644 --- a/lean4/src/putnam_1965_a5.lean +++ b/lean4/src/putnam_1965_a5.lean @@ -5,6 +5,9 @@ open EuclideanGeometry Topology Filter Complex abbrev putnam_1965_a5_solution : ℕ → ℕ := sorry -- fun n => 2^(n - 1) +/-- +How many orderings of the integers from $1$ to $n$ satisfy the condition that, for every integer $i$ except the first, there exists some earlier integer in the ordering which differs from $i$ by $1$? +-/ theorem putnam_1965_a5 : ∀ n > 0, {p ∈ permsOfFinset (Finset.Icc 1 n) | ∀ m ∈ Finset.Icc 2 n, ∃ k ∈ Finset.Ico 1 m, p m = p k + 1 ∨ p m = p k - 1}.ncard = putnam_1965_a5_solution n := sorry diff --git a/lean4/src/putnam_1965_a6.lean b/lean4/src/putnam_1965_a6.lean index 4fd0d472..e62ec376 100644 --- a/lean4/src/putnam_1965_a6.lean +++ b/lean4/src/putnam_1965_a6.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Topology Filter Complex +/-- +Prove that the line $ux + vy = 1$ (where $u \ge 0$ and $v \ge 0$) will lie tangent to the curve $x^m + y^m = 1$ (where $m > 1$) if and only if $u^n + v^n = 1$ for some $n$ such that $m^{-1} + n^{-1} = 1$. +-/ theorem putnam_1965_a6 (u v m : ℝ) (hu : 0 < u) diff --git a/lean4/src/putnam_1965_b1.lean b/lean4/src/putnam_1965_b1.lean index 1c7078e2..019576be 100644 --- a/lean4/src/putnam_1965_b1.lean +++ b/lean4/src/putnam_1965_b1.lean @@ -5,6 +5,9 @@ open EuclideanGeometry Topology Filter Complex noncomputable abbrev putnam_1965_b1_solution : ℝ := sorry -- 1 / 2 +/-- +Find $$\lim_{n \to \infty} \int_{0}^{1} \int_{0}^{1} \cdots \int_{0}^{1} \cos^2\left(\frac{\pi}{2n}(x_1 + x_2 + \cdots + x_n)\right) dx_1 dx_2 \cdots dx_n.$$ +-/ theorem putnam_1965_b1 : Tendsto (fun n : ℕ ↦ ∫ x in {x : Fin (n+1) → ℝ | ∀ k : Fin (n+1), x k ∈ Set.Icc 0 1}, (Real.cos (Real.pi/(2 * (n+1)) * ∑ k : Fin (n+1), x k))^2) atTop (𝓝 putnam_1965_b1_solution) := sorry diff --git a/lean4/src/putnam_1965_b2.lean b/lean4/src/putnam_1965_b2.lean index 4224f706..f6254d44 100644 --- a/lean4/src/putnam_1965_b2.lean +++ b/lean4/src/putnam_1965_b2.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Topology Filter Complex +/-- +A round-robin tournament has $n > 1$ players $P_1, P_2, \dots, P_n$, who each play one game with each other player. Each game results in a win for one player and a loss for the other. If $w_r$ and $l_r$ denote the number of games won and lost, respectively, by $P_r$, prove that $$\sum_{r=1}^{n} w_r^2 = \sum_{r=1}^{n} l_r^2.$$ +-/ theorem putnam_1965_b2 (n : ℕ) (hn : n > 1) diff --git a/lean4/src/putnam_1965_b3.lean b/lean4/src/putnam_1965_b3.lean index b1861317..d497269e 100644 --- a/lean4/src/putnam_1965_b3.lean +++ b/lean4/src/putnam_1965_b3.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Topology Filter Complex +/-- +Prove that there are exactly three right triangles (up to orientation and translation) with integer side lengths and area equal to twice their perimeter. +-/ theorem putnam_1965_b3 : {(a, b, c) : ℤ × ℤ × ℤ | a > 0 ∧ a ≤ b ∧ c > 0 ∧ a^2 + b^2 = c^2 ∧ a*b/(2 : ℚ) = 2*(a + b + c)}.ncard = 3 := sorry diff --git a/lean4/src/putnam_1965_b4.lean b/lean4/src/putnam_1965_b4.lean index c114ab9d..ee3c8127 100644 --- a/lean4/src/putnam_1965_b4.lean +++ b/lean4/src/putnam_1965_b4.lean @@ -5,6 +5,9 @@ open EuclideanGeometry Topology Filter Complex noncomputable abbrev putnam_1965_b4_solution : ((((ℝ → ℝ) → (ℝ → ℝ)) × ((ℝ → ℝ) → (ℝ → ℝ))) × ((Set ℝ) × (ℝ → ℝ))) := sorry -- ((fun h : ℝ → ℝ => h + (fun x : ℝ => x), fun h : ℝ → ℝ => h + (fun _ : ℝ => 1)), ({x : ℝ | x ≥ 0}, Real.sqrt)) +/-- +Let $$f(x, n) = \frac{{n \choose 0} + {n \choose 2}x + {n \choose 4}x^2 + \cdots}{{n \choose 1} + {n \choose 3}x + {n \choose 5}x^2 + \cdots}$$ for all real numbers $x$ and positive integers $n$. Express $f(x, n+1)$ as a rational function involving $f(x, n)$ and $x$, and find $\lim_{n \to \infty} f(x, n)$ for all $x$ for which this limit converges. +-/ theorem putnam_1965_b4 (f u v : ℕ → ℝ → ℝ) (hu : ∀ n > 0, ∀ x, u n x = ∑ i in Finset.Icc 0 (n / 2), (n.choose (2 * i)) * x ^ i) diff --git a/lean4/src/putnam_1965_b5.lean b/lean4/src/putnam_1965_b5.lean index d1f1ade2..80c60180 100644 --- a/lean4/src/putnam_1965_b5.lean +++ b/lean4/src/putnam_1965_b5.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Topology Filter Complex SimpleGraph.Walk +/-- +Prove that, if $4E \le V^2$, there exists a graph with $E$ edges and $V$ vertices with no triangles (cycles of length $3$). +-/ theorem putnam_1965_b5 {K : Type*} [Fintype K] diff --git a/lean4/src/putnam_1965_b6.lean b/lean4/src/putnam_1965_b6.lean index 3e84def9..ea6c9ba4 100644 --- a/lean4/src/putnam_1965_b6.lean +++ b/lean4/src/putnam_1965_b6.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Topology Filter Complex SimpleGraph.Walk +/-- +Let $A$, $B$, $C$, and $D$ be four distinct points for which every circle through $A$ and $B$ intersects every circle through $C$ and $D$. Prove that $A$, $B$, $C$ and $D$ are either collinear (all lying on the same line) or cocyclic (all lying on the same circle). +-/ theorem putnam_1965_b6 (A B C D : EuclideanSpace ℝ (Fin 2)) (S : Set (EuclideanSpace ℝ (Fin 2))) diff --git a/lean4/src/putnam_1966_a1.lean b/lean4/src/putnam_1966_a1.lean index 226bd685..f9846bd6 100644 --- a/lean4/src/putnam_1966_a1.lean +++ b/lean4/src/putnam_1966_a1.lean @@ -1,6 +1,9 @@ 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)$. +-/ theorem putnam_1966_a1 (f : ℤ → ℤ) (hf : f = fun n : ℤ => ∑ m in Finset.Icc 0 n, (if Even m then m / 2 else (m - 1)/2)) diff --git a/lean4/src/putnam_1966_a2.lean b/lean4/src/putnam_1966_a2.lean index 972bafb3..03406044 100644 --- a/lean4/src/putnam_1966_a2.lean +++ b/lean4/src/putnam_1966_a2.lean @@ -1,6 +1,9 @@ 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}.$$ +-/ theorem putnam_1966_a2 (r : ℝ) (A B C : EuclideanSpace ℝ (Fin 2)) diff --git a/lean4/src/putnam_1966_a3.lean b/lean4/src/putnam_1966_a3.lean index 4c9e9d32..c0fd9d94 100644 --- a/lean4/src/putnam_1966_a3.lean +++ b/lean4/src/putnam_1966_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +If $0 < x_1 < 1$ and $x_{n+1} = x_n(1 - x_n)$ for all $n \ge 1$, prove that $\lim_{n \to \infty} nx_n = 1$. +-/ theorem putnam_1966_a3 (x : ℕ → ℝ) (hx1 : 0 < x 1 ∧ x 1 < 1) diff --git a/lean4/src/putnam_1966_a4.lean b/lean4/src/putnam_1966_a4.lean index 8604d4ab..275227d8 100644 --- a/lean4/src/putnam_1966_a4.lean +++ b/lean4/src/putnam_1966_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Prove that the $n$th item in the ascending list of non-perfect-square positive integers equals $n + \{\sqrt{n}\}$, where $\{m\}$ denotes the closest integer to $m$. +-/ theorem putnam_1966_a4 (a : ℕ → ℤ) (ha1 : a 1 = 2) diff --git a/lean4/src/putnam_1966_a5.lean b/lean4/src/putnam_1966_a5.lean index 60bfb882..2ac53676 100644 --- a/lean4/src/putnam_1966_a5.lean +++ b/lean4/src/putnam_1966_a5.lean @@ -3,6 +3,14 @@ open BigOperators open Topology Filter +/-- +Let $C$ be the set of continuous functions $f : \mathbb{R} \to \mathbb{R}$. Let $T : C \to C$ satisfty the following two properties: +\begin{enumerate} +\item Linearity: $T(af + bg) = aT(f) + bT(g)$ for all $a, b \in \mathbb{R}$ and all $f, g \in C$. +\item Locality: If $f \in C$ and $g \in C$ are identical on some interval $I$, then $T(f)$ and $T(g)$ are also identical on $I$. +\end{enumerate} +Prove that there exists some function $f \in C$ such that $T(g(x)) = f(x)g(x)$ for all $g \in C$. +-/ theorem putnam_1966_a5 (C : Set (ℝ → ℝ)) (hC : C = {f : ℝ → ℝ | Continuous f}) diff --git a/lean4/src/putnam_1966_a6.lean b/lean4/src/putnam_1966_a6.lean index 045178a8..07c1df0c 100644 --- a/lean4/src/putnam_1966_a6.lean +++ b/lean4/src/putnam_1966_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Prove that $$\sqrt {1 + 2 \sqrt {1 + 3 \sqrt {1 + 4 \sqrt {1 + 5 \sqrt {\dots}}}}} = 3.$$ +-/ theorem putnam_1966_a6 (a : ℕ → (ℕ → ℝ)) (ha : ∀ n ≥ 1, a n n = n ∧ ∀ m ≥ 1, m < n → a n m = m * Real.sqrt (1 + a n (m + 1))) diff --git a/lean4/src/putnam_1966_b1.lean b/lean4/src/putnam_1966_b1.lean index 0bc51bb2..5b2472a5 100644 --- a/lean4/src/putnam_1966_b1.lean +++ b/lean4/src/putnam_1966_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Topology +/-- +If a convex polygon $L$ is contained entirely within a square of side length $1$, prove that the sum of the squares of the side lengths of $L$ is no greater than $4$. +-/ theorem putnam_1966_b1 (n : ℕ) (hn : n ≥ 3) diff --git a/lean4/src/putnam_1966_b2.lean b/lean4/src/putnam_1966_b2.lean index 55ab3e1c..a5c7c6eb 100644 --- a/lean4/src/putnam_1966_b2.lean +++ b/lean4/src/putnam_1966_b2.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Prove that, for any ten consecutive integers, at least one is relatively prime to all of the others. +-/ theorem putnam_1966_b2 (S : ℤ → Set ℤ) (hS : S = fun n : ℤ => {n, n + 1, n + 2, n + 3, n + 4, n + 5, n + 6, n + 7, n + 8, n + 9}) diff --git a/lean4/src/putnam_1966_b3.lean b/lean4/src/putnam_1966_b3.lean index d3ac34ea..967a1273 100644 --- a/lean4/src/putnam_1966_b3.lean +++ b/lean4/src/putnam_1966_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Let $p_1, p_2, \dots$ be a sequence of positive real numbers. Prove that if $\sum_{n=1}^{\infty} \frac{1}{p_n}$ converges, then $$\sum_{n=1}^{\infty} \frac {n^2 p_n}{(\sum_{i=1}^{n} p_i)^2}$$ also converges. +-/ theorem putnam_1966_b3 (p : ℕ → ℝ) (hpos : ∀ n : ℕ, p n > 0) diff --git a/lean4/src/putnam_1966_b4.lean b/lean4/src/putnam_1966_b4.lean index d733924c..848f6209 100644 --- a/lean4/src/putnam_1966_b4.lean +++ b/lean4/src/putnam_1966_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Let $a_1, a_2, ...$ be an increasing sequence of $mn + 1$ positive integers. Prove that there exists either a subset of $m + 1$ $a_i$ such that no element of the subset divides any other, or a subset of $n + 1$ $a_i$ such that each element of the subset (except the greatest) divides the next greatest element. +-/ theorem putnam_1966_b4 (m n : ℕ) (S : Finset ℕ) diff --git a/lean4/src/putnam_1966_b5.lean b/lean4/src/putnam_1966_b5.lean index a7641ce3..7144cdbf 100644 --- a/lean4/src/putnam_1966_b5.lean +++ b/lean4/src/putnam_1966_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Prove that any set of $n \ge 3$ distinct points in the Euclidean plane, no three of which are collinear, forms the vertex set of some simple (non-self-intersecting) closed polygon. +-/ theorem putnam_1966_b5 (S : Finset (EuclideanSpace ℝ (Fin 2))) (hcard : S.card ≥ 3) diff --git a/lean4/src/putnam_1966_b6.lean b/lean4/src/putnam_1966_b6.lean index 4946fbfe..b5bbaea1 100644 --- a/lean4/src/putnam_1966_b6.lean +++ b/lean4/src/putnam_1966_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Prove that any solution $y(x)$ to the differential equation $y'' + e^{x}y = 0$ remains bounded as $x$ goes to $+\infty$. +-/ theorem putnam_1966_b6 (y : ℝ → ℝ) (hy : Differentiable ℝ y ∧ Differentiable ℝ (deriv y)) diff --git a/lean4/src/putnam_1967_a1.lean b/lean4/src/putnam_1967_a1.lean index 57141325..517420aa 100644 --- a/lean4/src/putnam_1967_a1.lean +++ b/lean4/src/putnam_1967_a1.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +Let $f(x)=a_1\sin x+a_2\sin 2x+\dots+a_n\sin nx$, where $a_1,a_2,\dots,a_n$ are real numbers and where $n$ is a positive integer. Given that $|f(x)| \leq |\sin x|$ for all real $x$, prove that $|a_1|+|2a_2|+\dots+|na_n| \leq 1$. +-/ theorem putnam_1967_a1 (n : ℕ) (a : Set.Icc 1 n → ℝ) diff --git a/lean4/src/putnam_1967_a2.lean b/lean4/src/putnam_1967_a2.lean index c6a3d047..4b6edb43 100644 --- a/lean4/src/putnam_1967_a2.lean +++ b/lean4/src/putnam_1967_a2.lean @@ -3,6 +3,13 @@ open BigOperators open Nat Topology Filter +/-- +Define $S_0$ to be $1$. For $n \geq 1$, let $S_n$ be the number of $n \times n$ matrices whose elements are nonnegative integers with the property that $a_{ij}=a_{ji}$, ($i,j=1,2,\dots,n$) and where $\sum_{i=1}^n a_{ij}=1$, ($j=1,2,\dots,n$). Prove +\begin{enumerate} +\item[(a)] $S_{n+1}=S_n+nS_{n-1}$ +\item[(b)] $\sum_{n=0}^\infty S_n\frac{x^n}{n!} = \exp(x+x^2/2)$, where $\exp(x)=e^x$. +\end{enumerate} +-/ theorem putnam_1967_a2 (S : ℕ → ℤ) (hS0 : S 0 = 1) diff --git a/lean4/src/putnam_1967_a3.lean b/lean4/src/putnam_1967_a3.lean index 1021c405..de3a86d6 100644 --- a/lean4/src/putnam_1967_a3.lean +++ b/lean4/src/putnam_1967_a3.lean @@ -5,6 +5,9 @@ open Nat Topology Filter abbrev putnam_1967_a3_solution : ℕ := sorry -- 5 +/-- +Consider polynomial forms $ax^2-bx+c$ with integer coefficients which have two distinct zeros in the open interval $0 \frac{1}{2}$ there does not exist a real-valued function $u$ such that for all $x$ in the closed interval $0 \leq x \leq 1$, $u(x)=1+\lambda\int_x^1 u(y)u(y-x)\,dy$. +-/ theorem putnam_1967_a4 (lambda : ℝ) (hlambda : lambda > 1 / 2) diff --git a/lean4/src/putnam_1967_a5.lean b/lean4/src/putnam_1967_a5.lean index 8b82400d..37a64284 100644 --- a/lean4/src/putnam_1967_a5.lean +++ b/lean4/src/putnam_1967_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +Prove that any convex region in the Euclidean plane with area greater than $\pi/4$ contains a pair of points exactly $1$ unit apart. +-/ theorem putnam_1967_a5 (R : Set (EuclideanSpace ℝ (Fin 2))) (hR : Convex ℝ R ∧ (MeasureTheory.volume R).toReal > Real.pi / 4) diff --git a/lean4/src/putnam_1967_a6.lean b/lean4/src/putnam_1967_a6.lean index 0163a81c..ce8f1649 100644 --- a/lean4/src/putnam_1967_a6.lean +++ b/lean4/src/putnam_1967_a6.lean @@ -5,6 +5,9 @@ open Nat Topology Filter abbrev putnam_1967_a6_solution : ℕ := sorry -- 8 +/-- +Given real numbers $\{a_i\}$ and $\{b_i\}$, ($i=1,2,3,4$), such that $a_1b_2-a_2b_1 \neq 0$. Consider the set of all solutions $(x_1,x_2,x_3,x_4)$ of the simultaneous equations $a_1x_1+a_2x_2+a_3x_3+a_4x_4=0$ and $b_1x_1+b_2x_2+b_3x_3+b_4x_4=0$, for which no $x_i$ ($i=1,2,3,4$) is zero. Each such solution generates a $4$-tuple of plus and minus signs $(\text{signum }x_1,\text{signum }x_2,\text{signum }x_3,\text{signum }x_4)$. Determine, with a proof, the maximum number of distinct $4$-tuples possible. +-/ theorem putnam_1967_a6 (abneq0 : (Fin 4 → ℝ) → (Fin 4 → ℝ) → Prop) (habneq0 : abneq0 = (fun a b : Fin 4 → ℝ => a 0 * b 1 - a 1 * b 0 ≠ 0)) diff --git a/lean4/src/putnam_1967_b1.lean b/lean4/src/putnam_1967_b1.lean index 8e05204e..cc904c09 100644 --- a/lean4/src/putnam_1967_b1.lean +++ b/lean4/src/putnam_1967_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +Let $\hexagon ABCDEF$ be a hexagon inscribed in a circle of radius $r$. If $AB = CD = EF = r$, prove that the midpoints of $\overline{BC}$, $\overline{DE}$, and $\overline{FA}$ form the vertices of an equilateral triangle. +-/ theorem putnam_1967_b1 (r : ℝ) (L : ZMod 6 → (EuclideanSpace ℝ (Fin 2))) diff --git a/lean4/src/putnam_1967_b2.lean b/lean4/src/putnam_1967_b2.lean index bd2c3e31..b73bb97c 100644 --- a/lean4/src/putnam_1967_b2.lean +++ b/lean4/src/putnam_1967_b2.lean @@ -3,6 +3,18 @@ open BigOperators open Nat Topology Filter +/-- +Let $0 \leq p \leq 1$ and $0 \leq r \leq 1$ and consider the identities +\begin{enumerate} +\item[(a)] $(px+(1-p)y)^2=Ax^2+Bxy+Cy^2$, +\item[(b)] $(px+(1-p)y)(rx+(1-r)y)=\alpha x^2+\beta xy+\gamma y^2$. +\end{enumerate} +Show that (with respect to $p$ and $r$) +\begin{enumerate} +\item[(a)] $\max\{A,B,C\} \geq 4/9$, +\item[(b)] $\max\{\alpha,\beta,\gamma\} \geq 4/9$. +\end{enumerate} +-/ theorem putnam_1967_b2 (p r A B C α β γ : ℝ) (prbound : 0 ≤ p ∧ p ≤ 1 ∧ 0 ≤ r ∧ r ≤ 1) diff --git a/lean4/src/putnam_1967_b3.lean b/lean4/src/putnam_1967_b3.lean index b500bb4b..15effa7d 100644 --- a/lean4/src/putnam_1967_b3.lean +++ b/lean4/src/putnam_1967_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +If $f$ and $g$ are continuous and periodic functions with period $1$ on the real line, then $\lim_{n \to \infty} \int_0^1 f(x)g(nx)\,dx=(\int_0^1 f(x)\,dx)(\int_0^1 g(x)\,dx)$. +-/ theorem putnam_1967_b3 (f g : ℝ → ℝ) (fgcont : Continuous f ∧ Continuous g) diff --git a/lean4/src/putnam_1967_b4.lean b/lean4/src/putnam_1967_b4.lean index 70b2177f..4cb236dd 100644 --- a/lean4/src/putnam_1967_b4.lean +++ b/lean4/src/putnam_1967_b4.lean @@ -4,6 +4,9 @@ open BigOperators open Nat Topology Filter -- Note: uses (ℕ → Set.Icc 1 n → Bool) instead of (Set.Icc 0 n → Set.Icc 1 n → Bool) +/-- +A certain locker room contains $n$ lockers numbered $1,2,3,\cdots,n$ and all are originally locked. An attendant performs a sequence of operations $T_1,T_2,\cdots,T_n$ whereby with the operation $T_k$, $1 \leq k \leq n$, the condition of being locked or unlocked is changed for all those lockers and only those lockers whose numbers are multiples of $k$. After all the $n$ operations have been performed it is observed that all lockers whose numbers are perfect squares (and only those lockers) are now open or unlocked. Prove this mathematically. +-/ theorem putnam_1967_b4 (n : ℕ) (lockers : ℕ → Set.Icc 1 n → Bool) diff --git a/lean4/src/putnam_1967_b5.lean b/lean4/src/putnam_1967_b5.lean index f7842720..5896d2c9 100644 --- a/lean4/src/putnam_1967_b5.lean +++ b/lean4/src/putnam_1967_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +For any positive integer $n$, prove that the sum of the first $n$ terms of the bimonial expansion of $(2 - 1)^{-n}$ (starting with the maximal exponent of $2$) is $\frac{1}{2}.$ +-/ theorem putnam_1967_b5 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_1967_b6.lean b/lean4/src/putnam_1967_b6.lean index c73737a2..577da971 100644 --- a/lean4/src/putnam_1967_b6.lean +++ b/lean4/src/putnam_1967_b6.lean @@ -4,6 +4,9 @@ open BigOperators open Nat Topology Filter -- Note: boosted domain of f to the 2D plane and made it partially differentiable everywhere +/-- +Let $f$ be a real-valued function having partial derivatives and which is defined for $x^2+y^2 \leq 1$ and is such that $|f(x,y)| \leq 1$. Show that there exists a point $(x_0,y_0)$ in the interior of the unit circle such that $\left(\frac{\partial f}{\partial x} (x_0,y_0)\right)^2+\left(\frac{\partial f}{\partial y} (x_0,y_0)\right)^2 \leq 16$. +-/ theorem putnam_1967_b6 (f : ℝ → ℝ → ℝ) (fdiff : (∀ y : ℝ, Differentiable ℝ (fun x : ℝ => f x y)) ∧ (∀ x : ℝ, Differentiable ℝ (fun y : ℝ => f x y))) diff --git a/lean4/src/putnam_1968_a1.lean b/lean4/src/putnam_1968_a1.lean index 8bb030f3..97f9a9b9 100644 --- a/lean4/src/putnam_1968_a1.lean +++ b/lean4/src/putnam_1968_a1.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Prove that $$\frac{22}{7} - \pi = \int_{0}^{1} \frac{x^4(1 - x)^4}{1 + x^2} dx$$. +-/ theorem putnam_1968_a1 : 22/7 - Real.pi = ∫ x in (0)..1, x^4 * (1 - x)^4 / (1 + x^2) := sorry diff --git a/lean4/src/putnam_1968_a2.lean b/lean4/src/putnam_1968_a2.lean index e0923ff5..b3d0b8d4 100644 --- a/lean4/src/putnam_1968_a2.lean +++ b/lean4/src/putnam_1968_a2.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +For all integers $a$, $b$, $c$, $d$, $e$, and $f$ such that $ad \neq bc$ and any real number $\epsilon > 0$, prove that there exist rational numbers $r$ and $s$ such that $$0 < |ra + sb - e| < \varepsilon$$ and $$0 < |rc + sd - f| < \varepsilon.$$ +-/ theorem putnam_1968_a2 (a b c d e f : ℤ) (ε : ℝ) diff --git a/lean4/src/putnam_1968_a3.lean b/lean4/src/putnam_1968_a3.lean index acb31051..6a49bf10 100644 --- a/lean4/src/putnam_1968_a3.lean +++ b/lean4/src/putnam_1968_a3.lean @@ -3,6 +3,14 @@ open BigOperators open Finset symmDiff +/-- +Let $S$ be a finite set. Prove that there exists a list of subsets of $S$ such that +\begin{enumerate} +\item The first element of the list is the empty set, +\item Each subset of $S$ occurs exactly once in the list, and +\item Each successive element in the list is formed by adding or removing one element from the previous subset in the list. +\end{enumerate} +-/ theorem putnam_1968_a3 (α : Type*) [Finite α] : ∃ (n : ℕ) (s : Fin (2 ^ n) → Set α), diff --git a/lean4/src/putnam_1968_a4.lean b/lean4/src/putnam_1968_a4.lean index 35c37748..05bb6316 100644 --- a/lean4/src/putnam_1968_a4.lean +++ b/lean4/src/putnam_1968_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Finset +/-- +Prove that the sum of the squares of the distances between any $n$ points on the unit sphere $\{(x, y, z) \mid x^2 + y^2 + z^2 = 1\}$ is at most $n^2$. +-/ theorem putnam_1968_a4 (n : ℕ) (S : Fin n → (EuclideanSpace ℝ (Fin 3))) diff --git a/lean4/src/putnam_1968_a5.lean b/lean4/src/putnam_1968_a5.lean index 52af1f09..44be2758 100644 --- a/lean4/src/putnam_1968_a5.lean +++ b/lean4/src/putnam_1968_a5.lean @@ -5,6 +5,9 @@ open Finset Polynomial abbrev putnam_1968_a5_solution : ℝ := sorry -- 8 +/-- +Let $V$ be the set of all quadratic polynomials with real coefficients such that $|P(x)| \le 1$ for all $x \in [0, 1]$. Find the supremum of $|P'(0)|$ across all $P \in V$. +-/ theorem putnam_1968_a5 (V : Set ℝ[X]) (V_def : V = {P : ℝ[X] | P.degree = 2 ∧ ∀ x ∈ Set.Icc 0 1, |P.eval x| ≤ 1}) diff --git a/lean4/src/putnam_1968_a6.lean b/lean4/src/putnam_1968_a6.lean index ccce2080..b38de6b6 100644 --- a/lean4/src/putnam_1968_a6.lean +++ b/lean4/src/putnam_1968_a6.lean @@ -5,6 +5,9 @@ open Finset Polynomial abbrev putnam_1968_a6_solution : Set ℂ[X] := sorry -- {X - 1, -(X - 1), X + 1, -(X + 1), X^2 + X - 1, -(X^2 + X - 1), X^2 - X - 1, -(X^2 - X - 1), X^3 + X^2 - X - 1, -(X^3 + X^2 - X - 1), X^3 - X^2 - X + 1, -(X^3 - X^2 - X + 1)} +/-- +Find all polynomials of the form $\sum_{0}^{n} a_{i} x^{n-i}$ with $n \ge 1$ and $a_i = \pm 1$ for all $0 \le i \le n$ whose roots are all real. +-/ theorem putnam_1968_a6 : {P : ℂ[X] | P.natDegree ≥ 1 ∧ (∀ k ∈ Set.Icc 0 P.natDegree, P.coeff k = 1 ∨ P.coeff k = -1) ∧ ∀ z : ℂ, P.eval z = 0 → ∃ r : ℝ, r = z} = putnam_1968_a6_solution := diff --git a/lean4/src/putnam_1968_b2.lean b/lean4/src/putnam_1968_b2.lean index 737616f3..1f5ea47e 100644 --- a/lean4/src/putnam_1968_b2.lean +++ b/lean4/src/putnam_1968_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Finset Polynomial +/-- +Let $G$ be a finite group (with a multiplicative operation), and $A$ be a subset of $G$ that contains more than half of $G$'s elements. Prove that every element of $G$ can be expressed as the product of two elements of $A$. +-/ theorem putnam_1968_b2 {G : Type*} [Group G] diff --git a/lean4/src/putnam_1968_b4.lean b/lean4/src/putnam_1968_b4.lean index 383c7583..bc0f2f5f 100644 --- a/lean4/src/putnam_1968_b4.lean +++ b/lean4/src/putnam_1968_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Finset Polynomial Topology Filter Metric +/-- +Suppose that $f : \mathbb{R} \to \mathbb{R}$ is continuous on $(-\infty, \infty)$ and that $\int_{-\infty}^{\infty} f(x) dx$ exists. Prove that $$\int_{-\infty}^{\infty} f\left(x - \frac{1}{x}\right) dx = \int_{-\infty}^{\infty} f(x) dx.$$ +-/ theorem putnam_1968_b4 (f : ℝ → ℝ) (hf : Continuous f ∧ ∃ r : ℝ, Tendsto (fun y => ∫ x in ball 0 y, f x) atTop (𝓝 r)) diff --git a/lean4/src/putnam_1968_b5.lean b/lean4/src/putnam_1968_b5.lean index b49b1eed..b331097b 100644 --- a/lean4/src/putnam_1968_b5.lean +++ b/lean4/src/putnam_1968_b5.lean @@ -5,6 +5,9 @@ open Finset Polynomial Topology Filter Metric abbrev putnam_1968_b5_solution : ℕ → ℕ := sorry -- fun p => p^2 + p +/-- +Let $p$ be a prime number. Find the number of distinct $2 \times 2$ matrices $$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$$ such that $a, b, c, d \in \{0, 1, ..., p - 1\}$, $a + d \equiv 1 \pmod p$, and $ad - bc \equiv 0 \pmod p$. +-/ theorem putnam_1968_b5 (p : ℕ) (hp : Prime p) diff --git a/lean4/src/putnam_1968_b6.lean b/lean4/src/putnam_1968_b6.lean index eade03fa..e9d47d68 100644 --- a/lean4/src/putnam_1968_b6.lean +++ b/lean4/src/putnam_1968_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Finset Polynomial Topology Filter Metric +/-- +Prove that no sequence $\{K_n\}_{n=0}^{\infty}$ of compact (closed and bounded) sets of rational numbers has the property that every compact set of rational numbers is contained by at least one $K_n$. +-/ theorem putnam_1968_b6 : ¬∃ K : ℕ → Set ℚ, (∀ n : ℕ, IsCompact (K n)) ∧ (∀ S : Set ℚ, IsCompact S → ∃ n : ℕ, S ⊆ K n) := sorry diff --git a/lean4/src/putnam_1969_a1.lean b/lean4/src/putnam_1969_a1.lean index 277ec3a6..90e92389 100644 --- a/lean4/src/putnam_1969_a1.lean +++ b/lean4/src/putnam_1969_a1.lean @@ -5,6 +5,9 @@ open Matrix Filter Topology Set Nat abbrev putnam_1969_a1_solution : Set (Set ℝ) := sorry -- {{x} | x : ℝ} ∪ {Set.Ici x | x : ℝ} ∪ {Set.Iic x | x : ℝ} ∪ {Set.Iio x | x : ℝ} ∪ {Set.Ioi x | x : ℝ} ∪ {Set.univ} +/-- +What are the possible ranges (across all real inputs $x$ and $y$) of a polynomial $f(x, y)$ with real coefficients? +-/ theorem putnam_1969_a1 : {{z : ℝ | ∃ x : Fin 2 → ℝ, MvPolynomial.eval x f = z} | f : MvPolynomial (Fin 2) ℝ} = putnam_1969_a1_solution := sorry diff --git a/lean4/src/putnam_1969_a2.lean b/lean4/src/putnam_1969_a2.lean index 6cc6bdc2..b775130a 100644 --- a/lean4/src/putnam_1969_a2.lean +++ b/lean4/src/putnam_1969_a2.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Filter Topology Set Nat +/-- +Let $D_n$ be the determinant of the $n$ by $n$ matrix whose value in the $i$th row and $j$th column is $|i-j|$. Show that $D_n = (-1)^{n-1} * (n-1) * (2^{n-2}).$ +-/ theorem putnam_1969_a2 (D : (n : ℕ) → Matrix (Fin n) (Fin n) ℝ) (hD : D = fun (n : ℕ) => λ (i : Fin n) (j : Fin n) => |(i : ℝ) - (j : ℝ)| ) diff --git a/lean4/src/putnam_1969_a4.lean b/lean4/src/putnam_1969_a4.lean index 064cd209..f1e8416b 100644 --- a/lean4/src/putnam_1969_a4.lean +++ b/lean4/src/putnam_1969_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Filter Topology Set Nat +/-- +Show that $\int_0^1 x^x dx = \sum_{n=1}^{\infty} (-1)^{n+1}n^{-n}$. +-/ theorem putnam_1969_a4 : Tendsto (fun n => ∑ i in Finset.Icc (1 : ℤ) n, (-1)^(i+1)*(i : ℝ)^(-i)) atTop (𝓝 (∫ x in Ioo (0 : ℝ) 1, x^x)) := sorry diff --git a/lean4/src/putnam_1969_a5.lean b/lean4/src/putnam_1969_a5.lean index 1d7ddb21..2de76cc3 100644 --- a/lean4/src/putnam_1969_a5.lean +++ b/lean4/src/putnam_1969_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Filter Topology Set Nat +/-- +Consider the system of differential equations $$\frac{dx}{dt} = -2y + u(t), \frac{dy}{dt} = -2x + u(t)$$ for some continuous function $u(t)$. Prove that, if $x(0) \ne y(0)$, the solution will never pass through $(0, 0)$ regardless of the choice of $u(t)$, and if $x(0) = y(0)$, a suitable $u(t)$ can be chosen for any $T > 0$ so that $(x(T), y(T)) = (0, 0)$. +-/ theorem putnam_1969_a5 (x0 y0 t : ℝ) (ht : 0 < t) : diff --git a/lean4/src/putnam_1969_a6.lean b/lean4/src/putnam_1969_a6.lean index fcd1084e..4dfefcb6 100644 --- a/lean4/src/putnam_1969_a6.lean +++ b/lean4/src/putnam_1969_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Filter Topology Set Nat +/-- +Let $(x_n)$ be a sequence, and let $y_n = x_{n-1} + 2*x_n$ for $n \geq 2$. Suppose that $(y_n)$ converges, then prove that $(x_n)$ converges. +-/ theorem putnam_1969_a6 (x : ℕ → ℝ) (y : ℕ → ℝ) diff --git a/lean4/src/putnam_1969_b1.lean b/lean4/src/putnam_1969_b1.lean index 13aac251..89e65d13 100644 --- a/lean4/src/putnam_1969_b1.lean +++ b/lean4/src/putnam_1969_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Filter Topology Set Nat +/-- +Let $n$ be a positive integer such that $n+1$ is divisible by $24$. Prove that the sum of all the divisors of $n$ is divisible by $24$. +-/ theorem putnam_1969_b1 (n : ℕ) (hnpos : n > 0) diff --git a/lean4/src/putnam_1969_b2.lean b/lean4/src/putnam_1969_b2.lean index df46c05c..b680db96 100644 --- a/lean4/src/putnam_1969_b2.lean +++ b/lean4/src/putnam_1969_b2.lean @@ -5,6 +5,9 @@ open Matrix Filter Topology Set Nat abbrev putnam_1969_b2_solution : Prop := sorry -- False +/-- +Show that a finite group can not be the union of two of its proper subgroups. Does the statement remain true if 'two' is replaced by 'three'? +-/ theorem putnam_1969_b2 (P : ℕ → Prop) (P_def : ∀ n, P n ↔ ∀ (G : Type) [Group G] [Finite G], diff --git a/lean4/src/putnam_1969_b3.lean b/lean4/src/putnam_1969_b3.lean index a617b643..5a86acda 100644 --- a/lean4/src/putnam_1969_b3.lean +++ b/lean4/src/putnam_1969_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Filter Topology Set Nat +/-- +Suppose $T$ is a sequence which satisfies $T_n * T_{n+1} = n$ whenever $n \geq 1$, and also $\lim_{n \to \infty} \frac{T_n}{T_{n+1}} = 1. Show that $\pi * T_1^2 = 2$. +-/ theorem putnam_1969_b3 (T : ℕ → ℝ) (hT1 : ∀ n : ℕ, n ≥ 1 → (T n) * (T (n + 1)) = n) diff --git a/lean4/src/putnam_1969_b5.lean b/lean4/src/putnam_1969_b5.lean index fd05e505..e1a67b0f 100644 --- a/lean4/src/putnam_1969_b5.lean +++ b/lean4/src/putnam_1969_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Filter Topology Set Nat +/-- +Let $a_1 < a_2 < a_3 < \dots$ be an increasing sequence of positive integers. Assume that the sequences $\sum_{i = 1}^{\infty} 1/(a n)$ is convergent. For any number $x$, let $k(x)$ be the number of $a_n$'s which do not exceed $x$. Show that $\lim_{x \to \infty} k(x)/x = 0$. +-/ theorem putnam_1969_b5 (a : ℕ → ℝ) (ha : StrictMono a ∧ (∀ x : ℕ, a x > 0)) diff --git a/lean4/src/putnam_1969_b6.lean b/lean4/src/putnam_1969_b6.lean index bfe6913d..88c20625 100644 --- a/lean4/src/putnam_1969_b6.lean +++ b/lean4/src/putnam_1969_b6.lean @@ -3,6 +3,19 @@ open BigOperators open Matrix Filter Topology Set Nat +/-- +Let $A$ be a $3 \times 2$ matrix and $B$ be a $2 \times 3$ matrix such that $$AB = +\begin{pmatrix} +8 & 2 & -2 \\ +2 & 5 & 4 \\ +-2 & 4 & 5 +\end{pmatrix}. +$$ Prove that $$BA = +\begin{pmatrix} +9 & 0 \\ +0 & 9 +\end{pmatrix}.$$ +-/ theorem putnam_1969_b6 (A : Matrix (Fin 3) (Fin 2) ℝ) (B : Matrix (Fin 2) (Fin 3) ℝ) diff --git a/lean4/src/putnam_1970_a1.lean b/lean4/src/putnam_1970_a1.lean index d33e778f..255a7e6c 100644 --- a/lean4/src/putnam_1970_a1.lean +++ b/lean4/src/putnam_1970_a1.lean @@ -3,6 +3,9 @@ open BigOperators open Metric Set EuclideanGeometry +/-- +Prove that, for all $a > 0$ and $b > 0$, the power series of $e^{ax} \cos (bx)$ with respect to $x$ has either zero or infinitely many zero coefficients. +-/ theorem putnam_1970_a1 (a b : ℝ) (ha : a > 0) diff --git a/lean4/src/putnam_1970_a2.lean b/lean4/src/putnam_1970_a2.lean index 809474d8..5ebb64ad 100644 --- a/lean4/src/putnam_1970_a2.lean +++ b/lean4/src/putnam_1970_a2.lean @@ -3,6 +3,9 @@ open BigOperators open Metric Set EuclideanGeometry +/-- +Let $A$, $B$, $C$, $D$, $E$, $F$, and $G$ be real numbers satisfying $B^2 - 4AC < 0$. Prove that there exists some $\delta > 0$ such that no points $(x, y)$ in the punctured disk $0 < x^2 + y^2 < \delta$ satisfy $$Ax^2 + Bxy + Cy^2 + Dx^3 + Ex^2y + Fxy^2 + Gy^3 = 0.$$ +-/ theorem putnam_1970_a2 (A B C D E F G : ℝ) (hle : B^2 - 4*A*C < 0) diff --git a/lean4/src/putnam_1970_a3.lean b/lean4/src/putnam_1970_a3.lean index fa67473b..ce0848ad 100644 --- a/lean4/src/putnam_1970_a3.lean +++ b/lean4/src/putnam_1970_a3.lean @@ -5,6 +5,9 @@ open Metric Set EuclideanGeometry abbrev putnam_1970_a3_solution : ℕ × ℕ := sorry -- (3, 1444) +/-- +Find the length of the longest possible sequence of equal nonzero digits (in base 10) in which a perfect square can terminate. Also, find the smallest square that attains this length. +-/ theorem putnam_1970_a3 (L : ℕ → ℕ) (hL : ∀ n : ℕ, L n ≤ (Nat.digits 10 n).length ∧ diff --git a/lean4/src/putnam_1970_a4.lean b/lean4/src/putnam_1970_a4.lean index 7e3fc206..3366c42f 100644 --- a/lean4/src/putnam_1970_a4.lean +++ b/lean4/src/putnam_1970_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Metric Set EuclideanGeometry Filter Topology +/-- +Suppose $(x_n)$ is a sequence such that $\lim_{n \to \infty} (x_n - x_{n-2} = 0$. Prove that $\lim_{n \to \infty} \frac{x_n - x_{n-1}}{n} = 0$. +-/ theorem putnam_1970_a4 (x : ℕ → ℝ) (hxlim : Tendsto (fun n => x n - x (n-2)) atTop (𝓝 0)) diff --git a/lean4/src/putnam_1970_b1.lean b/lean4/src/putnam_1970_b1.lean index 17bfaabe..1542189a 100644 --- a/lean4/src/putnam_1970_b1.lean +++ b/lean4/src/putnam_1970_b1.lean @@ -5,6 +5,9 @@ open Metric Set EuclideanGeometry Filter Topology noncomputable abbrev putnam_1970_b1_solution : ℝ := sorry -- Real.exp (2 * Real.log 5 - 4 + 2 * Real.arctan 2) +/-- +Evaluate the infinite product $\lim_{n \to \infty} \frac{1}{n^4} \prod_{i = 1}^{2n} (n^2 + i^2)^{1/n}$. +-/ theorem putnam_1970_b1 : Tendsto (fun n => 1/(n^4) * ∏ i in Finset.Icc (1 : ℤ) (2*n), ((n^2 + i^2) : ℝ)^((1 : ℝ)/n)) atTop (𝓝 putnam_1970_b1_solution) := sorry diff --git a/lean4/src/putnam_1970_b2.lean b/lean4/src/putnam_1970_b2.lean index a66b049e..f7ba0b84 100644 --- a/lean4/src/putnam_1970_b2.lean +++ b/lean4/src/putnam_1970_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Metric Set EuclideanGeometry Filter Topology +/-- +Let $H$ be a polynomial of degree at most $3$ and $T$ be a positive real number. Show that the average value of $H(t)$ over the interval $[-T, T]$ equals the average of $H\left(-\frac{T}{\sqrt{3}}\right)$ and $H\left(\frac{T}{\sqrt{3}}\right)$. +-/ theorem putnam_1970_b2 (T : ℝ) (H : Polynomial ℝ) diff --git a/lean4/src/putnam_1970_b3.lean b/lean4/src/putnam_1970_b3.lean index bd282145..95d2933e 100644 --- a/lean4/src/putnam_1970_b3.lean +++ b/lean4/src/putnam_1970_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Metric Set EuclideanGeometry Filter Topology +/-- +A closed subset $S$ of $\mathbb{R}^2$ lies in $a < x < b$. Show that its projection on the y-axis is closed. +-/ theorem putnam_1970_b3 (S : Set (ℝ × ℝ)) (a b : ℝ) diff --git a/lean4/src/putnam_1970_b4.lean b/lean4/src/putnam_1970_b4.lean index 6a61f525..9179a06c 100644 --- a/lean4/src/putnam_1970_b4.lean +++ b/lean4/src/putnam_1970_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Metric Set EuclideanGeometry Filter Topology +/-- +Let $x : \mathbb{R} \to \mathbb{R}$ be a twice differentiable function satisfying $x(1) - x(0) = 1$, $x'(0) = x'(1) = 0$, and $|x'(t)| \le \frac{3}{2}$ for all $t \in (0, 1)$. Prove that there exists some $t \in [0, 1]$ such that $|x''(t)| \ge \frac{9}{2}$. +-/ theorem putnam_1970_b4 (x : ℝ → ℝ) (hdiff : DifferentiableOn ℝ x (Set.Icc 0 1) ∧ DifferentiableOn ℝ (deriv x) (Set.Icc 0 1)) diff --git a/lean4/src/putnam_1970_b5.lean b/lean4/src/putnam_1970_b5.lean index 0785e818..03c73f06 100644 --- a/lean4/src/putnam_1970_b5.lean +++ b/lean4/src/putnam_1970_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Metric Set EuclideanGeometry Filter Topology +/-- +Let $u_n$ denote the function $u_n(x) = -n$ if $x \leq -n$, $x$ if $-n < x \leq n$, and $n$ otherwise. Let $F$ be a function on the reals. Show that $F$ is continuous if and only if $u_n \circ F$ is continuous for all natural numbers $n$. +-/ theorem putnam_1970_b5 (ramp : ℤ → (ℝ → ℝ)) (ramp_def : ramp = fun (n : ℤ) => (fun (x : ℝ) => if x ≤ -n then (-n : ℝ) else (if -n < x ∧ x ≤ n then x else (n : ℝ)))) diff --git a/lean4/src/putnam_1970_b6.lean b/lean4/src/putnam_1970_b6.lean index a2f5c211..e103967e 100644 --- a/lean4/src/putnam_1970_b6.lean +++ b/lean4/src/putnam_1970_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Metric Set EuclideanGeometry Filter Topology +/-- +Prove that if a quadrilateral with side lengths $a$, $b$, $c$, and $d$ and area $\sqrt{abcd}$ can be circumscribed to a circle (i.e., a circle can be inscribed in it), then it must be cyclic (i.e., it can be inscribed in a circle). +-/ theorem putnam_1970_b6 (L : ZMod 4 → (EuclideanSpace ℝ (Fin 2))) (S : Set (EuclideanSpace ℝ (Fin 2))) diff --git a/lean4/src/putnam_1971_a1.lean b/lean4/src/putnam_1971_a1.lean index ebc4aae3..6afe95ca 100644 --- a/lean4/src/putnam_1971_a1.lean +++ b/lean4/src/putnam_1971_a1.lean @@ -3,6 +3,9 @@ open BigOperators open Set +/-- +Let $S$ be a set of $9$ lattice points (points with integer coordinates) in $3$-dimensional Euclidean space. Prove that there exists a lattice point along the interior of some line segment that joins two distinct points in $S$. +-/ theorem putnam_1971_a1 (S : Set (ℤ × ℤ × ℤ)) (hS : S.ncard = 9) diff --git a/lean4/src/putnam_1971_a2.lean b/lean4/src/putnam_1971_a2.lean index c02686cd..b535e696 100644 --- a/lean4/src/putnam_1971_a2.lean +++ b/lean4/src/putnam_1971_a2.lean @@ -5,6 +5,9 @@ open Set abbrev putnam_1971_a2_solution : Set (Polynomial ℝ) := sorry -- {Polynomial.X} +/-- +Determine all polynomials $P(x)$ such that $P(x^2 + 1) = (P(x))^2 + 1$ and $P(0) = 0$. +-/ theorem putnam_1971_a2 : ∀ P : Polynomial ℝ, (P.eval 0 = 0 ∧ (∀ x : ℝ, P.eval (x^2 + 1) = (P.eval x)^2 + 1)) ↔ P ∈ putnam_1971_a2_solution := sorry diff --git a/lean4/src/putnam_1971_a3.lean b/lean4/src/putnam_1971_a3.lean index 023d5ffb..19f26ef5 100644 --- a/lean4/src/putnam_1971_a3.lean +++ b/lean4/src/putnam_1971_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Set +/-- +The three vertices of a triangle of sides $a,b,c$ are lattice points and lie on a circle of radius $R$. Show that $abc \geq 2R$. +-/ theorem putnam_1971_a3 (a b c : ℝ × ℝ) (R : ℝ) diff --git a/lean4/src/putnam_1971_a4.lean b/lean4/src/putnam_1971_a4.lean index 7a3671ef..8a2ecb40 100644 --- a/lean4/src/putnam_1971_a4.lean +++ b/lean4/src/putnam_1971_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Set MvPolynomial +/-- +Show that for $\epsilon \in (0,1)$, the expression $(x + y)^n (x^2 - 2-\epsilon)xy + y^2)$ is a polynomial with positive coefficients for $n$ sufficiently large, where $n$ is an integer. +-/ theorem putnam_1971_a4 (ε : ℝ) (hε : 0 < ε ∧ ε < 1) diff --git a/lean4/src/putnam_1971_a5.lean b/lean4/src/putnam_1971_a5.lean index 6a05e11b..2ceaa815 100644 --- a/lean4/src/putnam_1971_a5.lean +++ b/lean4/src/putnam_1971_a5.lean @@ -5,6 +5,9 @@ open Set MvPolynomial abbrev putnam_1971_a5_solution : ℤ × ℤ := sorry -- (11, 8) +/-- +After each play of a certain game of solitaire, the player receives either $a$ or $b$ points, where $a$ and $b$ are positive integers with $a > b$; scores accumulate from play to play. If there are $35$ unattainable scores, one of which is $58$, find $a$ and $b$. +-/ theorem putnam_1971_a5 (a b : ℤ) (hab : a > 0 ∧ b > 0 ∧ a > b) diff --git a/lean4/src/putnam_1971_a6.lean b/lean4/src/putnam_1971_a6.lean index 8995089b..e27c03e5 100644 --- a/lean4/src/putnam_1971_a6.lean +++ b/lean4/src/putnam_1971_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Set MvPolynomial +/-- +Let $c$ be a real number such that $n^c$ is an integer for every positive integer $n$. Show that $c$ is a non-negative integer. +-/ theorem putnam_1971_a6 (c : ℝ) (hc : ∀ n : ℤ, n > 0 → ∃ m : ℤ, (n : ℝ)^c = m) diff --git a/lean4/src/putnam_1971_b1.lean b/lean4/src/putnam_1971_b1.lean index 320a2217..038eea5c 100644 --- a/lean4/src/putnam_1971_b1.lean +++ b/lean4/src/putnam_1971_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Set MvPolynomial +/-- +Let $S$ be a set and let $\cdot$ be a binary operation on $S$ satisfying the two following laws: (1) for all $x$ in $S$, $x = x \cdot x$, (2) for all $x,y,z$ in $S$, $(x \cdot y) \cdot z) = (y \cdot z) \cdot x$. Show that $\cdot$ is associative and commutative. +-/ theorem putnam_1971_b1 (S : Type*) [Mul S] (hself : ∀ x : S, x * x = x) diff --git a/lean4/src/putnam_1971_b2.lean b/lean4/src/putnam_1971_b2.lean index f70b6a7f..1e1a1fa0 100644 --- a/lean4/src/putnam_1971_b2.lean +++ b/lean4/src/putnam_1971_b2.lean @@ -5,6 +5,9 @@ open Set MvPolynomial abbrev putnam_1971_b2_solution : Set (ℝ → ℝ) := sorry -- {fun x : ℝ => (x^3 - x^2 - 1)/(2 * x * (x - 1))} +/-- +Find all functions $F : \mathbb{R} \setminus \{0, 1\} \to \mathbb{R}$ that satisfy $F(x) + F\left(\frac{x - 1}{x}\right) = 1 + x$ for all $x \in \mathbb{R} \setminus \{0, 1\}$. +-/ theorem putnam_1971_b2 (S : Set ℝ) (hS : S = univ \ {0, 1}) diff --git a/lean4/src/putnam_1971_b3.lean b/lean4/src/putnam_1971_b3.lean index ea4f4a1b..8d6ce245 100644 --- a/lean4/src/putnam_1971_b3.lean +++ b/lean4/src/putnam_1971_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Set MvPolynomial +/-- +If two cars travel around a track at constant speeds of one lap per hour, starting from the same point but at different times, prove that the total amount of time for which the first car has completed exactly twice as many laps as the second is exactly $1$ hour. +-/ theorem putnam_1971_b3 (T : ℝ) (hT : T > 0) diff --git a/lean4/src/putnam_1971_b6.lean b/lean4/src/putnam_1971_b6.lean index 9d18b7ad..3a7bdf74 100644 --- a/lean4/src/putnam_1971_b6.lean +++ b/lean4/src/putnam_1971_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Set MvPolynomial +/-- +Let $\delta(x) be the greatest odd divisor of the positive integer $x$. Show that $|\sum_{n = 1}^x \delta(n)/n - 2x/3| < 1$ for all positive integers $x$. +-/ theorem putnam_1971_b6 (δ : ℤ → ℤ) (hδ : δ = fun n => sSup {t | Odd t ∧ t ∣ n}) diff --git a/lean4/src/putnam_1972_a1.lean b/lean4/src/putnam_1972_a1.lean index ca2320ae..c94278c5 100644 --- a/lean4/src/putnam_1972_a1.lean +++ b/lean4/src/putnam_1972_a1.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Filter Topology Set +/-- +Show that there are no four consecutive binomial coefficients ${n \choose r}, {n \choose (r+1)}, {n \choose (r+2)}, {n \choose (r+3)}$ where $n,r$ are positive integers and $r+3 \leq n$, which are in arithmetic progression. +-/ theorem putnam_1972_a1 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_1972_a2.lean b/lean4/src/putnam_1972_a2.lean index 988133cb..5e7d1242 100644 --- a/lean4/src/putnam_1972_a2.lean +++ b/lean4/src/putnam_1972_a2.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Filter Topology Set +/-- +Let $S$ be a set and $\cdot$ be a binary operation on $S$ satisfying: (1) for all $x,y$ in $S$, $x \cdot (x \cdot y) = y$ (2) for all $x,y$ in $S$, $(y \cdot x) \cdot x = y$. Show that $\cdot$ is commutative but not necessarily associative. +-/ theorem putnam_1972_a2 : (∀ (S : Type*) (_ : Mul S), (∀ x y : S, x * (x * y) = y ∧ ((y * x) * x) = y) → (∀ x y : S, x * y = y * x)) ∧ ∃ (S : Type*) (_ : Mul S), (∀ x y : S, x * (x * y) = y ∧ ((y * x) * x) = y) ∧ ¬(∀ x y z : S, x * (y * z) = (x * y) * z) := sorry diff --git a/lean4/src/putnam_1972_a3.lean b/lean4/src/putnam_1972_a3.lean index 661cabbb..1240ae33 100644 --- a/lean4/src/putnam_1972_a3.lean +++ b/lean4/src/putnam_1972_a3.lean @@ -6,6 +6,9 @@ open EuclideanGeometry Filter Topology Set -- Note: uses (ℝ → ℝ) instead of (Set.Icc 0 1 → ℝ) abbrev putnam_1972_a3_solution : Set (ℝ → ℝ) := sorry -- {f | ∃ A B : ℝ, ∀ x ∈ Set.Icc 0 1, f x = A * x + B} +/-- +We call a function $f$ from $[0,1]$ to the reals to be supercontinuous on $[0,1]$ if the Cesaro-limit exists for the sequence $f(x_1), f(x_2), f(x_3), \dots$ whenever it does for the sequence $x_1, x_2, x_3 \dots$. Find all supercontinuous functions on $[0,1]$. +-/ theorem putnam_1972_a3 (climit_exists : (ℕ → ℝ) → Prop) (hclimit_exists : climit_exists = fun x => ∃ C : ℝ, Tendsto (fun n => (∑ i in Finset.range n, (x i))/(n : ℝ)) atTop (𝓝 C)) diff --git a/lean4/src/putnam_1972_a5.lean b/lean4/src/putnam_1972_a5.lean index 0a0c7c97..b737445b 100644 --- a/lean4/src/putnam_1972_a5.lean +++ b/lean4/src/putnam_1972_a5.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Filter Topology Set +/-- +Show that if $n$ is an integer greater than $1$, then $n$ does not divide $2^n - 1$. +-/ theorem putnam_1972_a5 (n : ℕ) (hn : n > 1) diff --git a/lean4/src/putnam_1972_a6.lean b/lean4/src/putnam_1972_a6.lean index 8c6b995e..bae8a91c 100644 --- a/lean4/src/putnam_1972_a6.lean +++ b/lean4/src/putnam_1972_a6.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Filter Topology Set MeasureTheory +/-- +Let $f$ be an integrable function in $0 \leq x \leq 1$ and suppose for all $0 \leq i \leq n-1, \int_0^1 x^i f(x) dx = 0$. Further suppose that $\int_0^1 x^n f(x) dx = 1$. Show that $|f(x)| \geq 2^n(n+1)$ on a set of positive measure. +-/ theorem putnam_1972_a6 (f : ℝ → ℝ) (n : ℤ) diff --git a/lean4/src/putnam_1972_b1.lean b/lean4/src/putnam_1972_b1.lean index 58934fe2..c963cf28 100644 --- a/lean4/src/putnam_1972_b1.lean +++ b/lean4/src/putnam_1972_b1.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Filter Topology Set MeasureTheory Metric +/-- +Prove that no three consecutive coefficients of the power series of $$\sum_{n = 0}^{\infty} \frac{x^n(x - 1)^{2n}}{n!}$$ all equal $0$. +-/ theorem putnam_1972_b1 (S : ℝ → ℝ) (hS : S = fun (x : ℝ) => ∑' n : ℕ, x^n * (x - 1)^(2*n) / (Nat.factorial n)) diff --git a/lean4/src/putnam_1972_b2.lean b/lean4/src/putnam_1972_b2.lean index e200d77d..f14c3795 100644 --- a/lean4/src/putnam_1972_b2.lean +++ b/lean4/src/putnam_1972_b2.lean @@ -5,6 +5,9 @@ open EuclideanGeometry Filter Topology Set MeasureTheory Metric noncomputable abbrev putnam_1972_b2_solution : ℝ → ℝ → ℝ := sorry -- fun s v : ℝ ↦ 2 * s / v +/-- +Let $x : \mathbb{R} \to \mathbb{R}$ be a twice differentiable function whose second derivative is nonstrictly decreasing. If $x(t) - x(0) = s$, $x'(0) = 0$, and $x'(t) = v$ for some $t > 0$, find the maximum possible value of $t$ in terms of $s$ and $v$. +-/ theorem putnam_1972_b2 (s v : ℝ) (hs : s > 0) diff --git a/lean4/src/putnam_1972_b3.lean b/lean4/src/putnam_1972_b3.lean index 4ecd9c58..be89ef30 100644 --- a/lean4/src/putnam_1972_b3.lean +++ b/lean4/src/putnam_1972_b3.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Filter Topology Set MeasureTheory Metric +/-- +Let $A$ and $B$ be two elements in a group such that $ABA = BA^2B$, $A^3 = 1$, and $B^{2n-1} = 1$ for some positive integer $n$. Prove that $B = 1$. +-/ theorem putnam_1972_b3 (G : Type*) [Group G] (A B : G) diff --git a/lean4/src/putnam_1972_b4.lean b/lean4/src/putnam_1972_b4.lean index 2489cc57..fa481550 100644 --- a/lean4/src/putnam_1972_b4.lean +++ b/lean4/src/putnam_1972_b4.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Filter Topology Set MeasureTheory Metric +/-- +Let $n \geq 2$ be an integer. Show that there exists a polynomial $P(x,y,z)$ with integral coefficients such that $x \equiv P(x^n, x^{n+1}, x + x^{n+2})$. +-/ theorem putnam_1972_b4 (n : ℕ) (hn : n > 1) diff --git a/lean4/src/putnam_1972_b5.lean b/lean4/src/putnam_1972_b5.lean index 0f94adf5..95d33ab1 100644 --- a/lean4/src/putnam_1972_b5.lean +++ b/lean4/src/putnam_1972_b5.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Set Metric +/-- +Let $ABCD$ be a skew (non-planar) quadrilateral. Prove that if $\angle ABC = \angle CDA$ and $\angle BCD = \angle DAB$, then $AB = CD$ and $AD = BC$. +-/ theorem putnam_1972_b5 (A B C D : EuclideanSpace ℝ (Fin 3)) (hnonplanar : ¬Coplanar ℝ {A, B, C, D}) diff --git a/lean4/src/putnam_1972_b6.lean b/lean4/src/putnam_1972_b6.lean index 5a6755ed..fe55178b 100644 --- a/lean4/src/putnam_1972_b6.lean +++ b/lean4/src/putnam_1972_b6.lean @@ -3,6 +3,9 @@ open BigOperators open EuclideanGeometry Filter Topology Set MeasureTheory Metric +/-- +Let $n_1 < n_2 < \dots < n_k$ be a set of positive integers. Prove that the polynomail $1 + z^{n_1} + z^{n_2} + \dots + z^{n_k}$ has not roots inside the circle $|z| < (\frac{\sqrt{5}-1}{2}$. +-/ theorem putnam_1972_b6 (k : ℕ) (hk : k ≥ 1) diff --git a/lean4/src/putnam_1973_a1.lean b/lean4/src/putnam_1973_a1.lean index b15e0902..f6668422 100644 --- a/lean4/src/putnam_1973_a1.lean +++ b/lean4/src/putnam_1973_a1.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set MeasureTheory Topology Filter +/-- +Let $\triangle ABC$ be any triangle in the Euclidean plane, and let points $X$, $Y$, and $Z$ lie on sides $\overline{BC}$, $\overline{CA}$, and $\overline{AB}$ respectively. If $BX \le XC$, $CY \le YA$, and $AZ \le ZB$, prove that $[\triangle XYZ] \ge \frac{1}{4} [\triangle ABC]$. Regardless of this constraint on $X$, $Y$, and $Z$, prove that one of $[\triangle AZY]$, $[\triangle BXZ]$, or $[\triangle CYX]$ is less than or equal to $[\triangle XYZ]$. (Here, $[\triangle]$ denotes the area of triangle $\triangle$.) +-/ theorem putnam_1973_a1 (A B C X Y Z : EuclideanSpace ℝ (Fin 2)) (hnoncol : ¬Collinear ℝ {A, B, C}) diff --git a/lean4/src/putnam_1973_a2.lean b/lean4/src/putnam_1973_a2.lean index 905a21d6..d0c09594 100644 --- a/lean4/src/putnam_1973_a2.lean +++ b/lean4/src/putnam_1973_a2.lean @@ -5,6 +5,9 @@ open Nat Set MeasureTheory Topology Filter abbrev putnam_1973_a2_solution : Prop := sorry -- True +/-- +Consider an infinite series whose $n$th term is given by $\pm \frac{1}{n}$, where the actual values of the $\pm$ signs repeat in blocks of $8$ (so the $\frac{1}{9}$ term has the same sign as the $\frac{1}{1}$ term, and so on). Call such a sequence balanced if each block contains four $+$ and four $-$ signs. Prove that being balanced is a sufficient condition for the sequence to converge. Is being balanced also necessary for the sequence to converge? +-/ theorem putnam_1973_a2 (L : List ℝ) (hL : L.length = 8 ∧ ∀ i : Fin L.length, L[i] = 1 ∨ L[i] = -1) diff --git a/lean4/src/putnam_1973_a3.lean b/lean4/src/putnam_1973_a3.lean index 645370ff..1cc796eb 100644 --- a/lean4/src/putnam_1973_a3.lean +++ b/lean4/src/putnam_1973_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set MeasureTheory Topology Filter +/-- +Let $n$ be a fixed positive integer and let $b(n)$ be the minimum value of $k + \frac{n}{k}$ as $k$ is allowed to range through all positive integers. Prove that $b(n)$ and $\sqrt{4n + 1}$ have the same integer part. +-/ theorem putnam_1973_a3 (b : ℤ → ℝ) (hb : b = fun (n : ℤ) => sInf {k + (n : ℝ)/(k : ℝ) | k > (0 : ℤ)}) diff --git a/lean4/src/putnam_1973_a4.lean b/lean4/src/putnam_1973_a4.lean index 474cfa06..9a912142 100644 --- a/lean4/src/putnam_1973_a4.lean +++ b/lean4/src/putnam_1973_a4.lean @@ -5,6 +5,9 @@ open Nat Set MeasureTheory Topology Filter abbrev putnam_1973_a4_solution : ℕ := sorry -- 3 +/-- +How many zeros does the function $f(x) = 2^x - 1 - x^2$ have on the real line? +-/ theorem putnam_1973_a4 (f : ℝ → ℝ) (hf : f = fun x => 2^x - 1 - x^2) diff --git a/lean4/src/putnam_1973_a6.lean b/lean4/src/putnam_1973_a6.lean index e291393a..6e0b4a3e 100644 --- a/lean4/src/putnam_1973_a6.lean +++ b/lean4/src/putnam_1973_a6.lean @@ -4,6 +4,9 @@ open BigOperators open Nat Set MeasureTheory Topology Filter -- Note: Uses the slope/intercept formulation of line in the plane +/-- +Prove that it is impossible for seven distinct straight lines to be situated in the Euclidean plane so as to have at least six points where exactly three of these lines intersect and at least four points where exactly two of these lines interest. +-/ theorem putnam_1973_a6 (nint : ℕ → (Fin 7 → (ℝ × ℝ)) → ℕ) (h_nint : nint = fun n lines => {p : ℝ × ℝ | ∃! S : Set (Fin 7), S.ncard = n ∧ p ∈ ⋂ i ∈ S, {pts | pts.2 = (lines i).1 * pts.1 + (lines i).2}}.ncard) diff --git a/lean4/src/putnam_1973_b1.lean b/lean4/src/putnam_1973_b1.lean index 39228a41..b836219e 100644 --- a/lean4/src/putnam_1973_b1.lean +++ b/lean4/src/putnam_1973_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set MeasureTheory Topology Filter +/-- +Let $a_1, \dots, a_{2n + 1}$ be a set of integers such that, if any one of them is removed, the remaining ones can be divided into two sets of $n$ integers with equal sums. Prove $a_1 = a_2 = \dots = a_{2n+1}$. +-/ theorem putnam_1973_b1 (n : ℕ) (a : Finset.Icc 1 (2 * n + 1) → ℤ) diff --git a/lean4/src/putnam_1973_b2.lean b/lean4/src/putnam_1973_b2.lean index e9189d26..76004038 100644 --- a/lean4/src/putnam_1973_b2.lean +++ b/lean4/src/putnam_1973_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set MeasureTheory Topology Filter +/-- +Let $z = x+iy$ be a complex number with $x$ and $y$ rational and with $\| z \| = 1$. Show thaat the number $\| z^{2n} - 1 \|$ is rational for every integer $n$. +-/ theorem putnam_1973_b2 (z : ℂ) (hzrat : ∃ q1 q2 : ℚ, z.re = q1 ∧ z.im = q2) diff --git a/lean4/src/putnam_1973_b3.lean b/lean4/src/putnam_1973_b3.lean index 9e9bb321..504dd8fa 100644 --- a/lean4/src/putnam_1973_b3.lean +++ b/lean4/src/putnam_1973_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set MeasureTheory Topology Filter +/-- +Let $p > 1$ be an integer with the property that $x^2 - x + p$ is prime for all $x$ in the range $0 < x < p$. Show there exists exactly one triple of integers $a,b,c$ satisfying $b^2 - 4ac = 1 - 4p$, $0 < a \leq c$, and $-a \leq b < a$. +-/ theorem putnam_1973_b3 (p : ℕ) (pgt1 : p > 1) diff --git a/lean4/src/putnam_1973_b4.lean b/lean4/src/putnam_1973_b4.lean index 506941d7..fee71a9d 100644 --- a/lean4/src/putnam_1973_b4.lean +++ b/lean4/src/putnam_1973_b4.lean @@ -6,6 +6,9 @@ open Nat Set MeasureTheory Topology Filter -- Note: Boosted domain to ℝ, which is fine because you can extend any such function f from [0,1] to ℝ satisfying the same properties. There may be multiple correct answers. abbrev putnam_1973_b4_solution : ℝ → ℝ := sorry -- (fun x => x) +/-- +Suppose $f$ is a function on $[0,1]$ with continuous derivative satisfying $0 < f'(x) \leq 1$ and $f 0 = 0$. Prove that $\left[\int_0^1 f(x) dx\right]]^2 \geq \int_0^1 (f(x))^3 dx$, and find an example where equality holds. +-/ theorem putnam_1973_b4 (f : ℝ → ℝ) (hprop : (ℝ → ℝ) → Prop) diff --git a/lean4/src/putnam_1974_a1.lean b/lean4/src/putnam_1974_a1.lean index 32eeb159..0ada9a96 100644 --- a/lean4/src/putnam_1974_a1.lean +++ b/lean4/src/putnam_1974_a1.lean @@ -5,6 +5,9 @@ open Set abbrev putnam_1974_a1_solution : ℕ := sorry -- 11 +/-- +Call a set of positive integers 'conspiratorial' if no three of them are pairwise relatively prime. What is the largest number of elements in any conspiratorial subset of the integers 1 through 16? +-/ theorem putnam_1974_a1 (conspiratorial : Set ℤ → Prop) (hconspiratorial : conspiratorial = fun S => ∀ a ∈ S, ∀ b ∈ S, ∀ c ∈ S, (a > 0 ∧ b > 0 ∧ c > 0) ∧ ((a ≠ b ∧ b ≠ c ∧ a ≠ c) → (Int.gcd a b > 1 ∨ Int.gcd b c > 1 ∨ Int.gcd a c > 1))) diff --git a/lean4/src/putnam_1974_a3.lean b/lean4/src/putnam_1974_a3.lean index 2d4192aa..59441b7d 100644 --- a/lean4/src/putnam_1974_a3.lean +++ b/lean4/src/putnam_1974_a3.lean @@ -5,6 +5,9 @@ open Set abbrev putnam_1974_a3_solution : (Set ℕ) × (Set ℕ) := sorry -- ({p : ℕ | p.Prime ∧ p ≡ 1 [MOD 8]}, {p : ℕ | p.Prime ∧ p ≡ 5 [MOD 8]}) +/-- +A well-known theorem asserts that a prime $p > 2$ can be written as the sum of two perfect squres if and only if $p \equiv 1 \bmod 4$. Find which primes $p > 2$ can be written in each of the following forms, using (not necessarily positive) integers $x$ and $y$: (a) $x^2 + 16y^2$, (b) $4x^2 + 4xy + 5y^2$. +-/ theorem putnam_1974_a3 (assmption : ∀ p : ℕ, p.Prime ∧ p > 2 → ((∃ m n : ℤ, p = m^2 + n^2) ↔ p ≡ 1 [MOD 4])) : ∀ p : ℕ, ((p.Prime ∧ p > 2 ∧ (∃ x y : ℤ, p = x^2 + 16*y^2)) ↔ p ∈ putnam_1974_a3_solution.1) ∧ ((p.Prime ∧ p > 2 ∧ (∃ x y : ℤ, p = 4*x^2 + 4*x*y + 5*y^2)) ↔ p ∈ putnam_1974_a3_solution.2) := diff --git a/lean4/src/putnam_1974_a4.lean b/lean4/src/putnam_1974_a4.lean index 5f9da3e0..6c11f085 100644 --- a/lean4/src/putnam_1974_a4.lean +++ b/lean4/src/putnam_1974_a4.lean @@ -6,6 +6,9 @@ open Set Nat noncomputable abbrev putnam_1974_a4_solution : ℕ → ℚ := sorry -- (fun n ↦ (1 : ℚ) / (2 ^ (n - 1)) * (n * (n - 1).choose ⌊n / 2⌋₊)) +/-- +Evaluate in closed form: $\frac{1}{2^{n-1}} \sum_{k < n/2} (n-2k)*{n \choose k}$. +-/ theorem putnam_1974_a4 (n : ℕ) (hn : 0 < n) : diff --git a/lean4/src/putnam_1974_a6.lean b/lean4/src/putnam_1974_a6.lean index a313c8bd..a0f29114 100644 --- a/lean4/src/putnam_1974_a6.lean +++ b/lean4/src/putnam_1974_a6.lean @@ -5,6 +5,9 @@ open Set Nat Polynomial abbrev putnam_1974_a6_solution : ℕ := sorry -- 25 +/-- +Given $n$, let $k(n)$ be the minimal degree of any monic integral polynomial $f$ such that the value of $f(x)$ is divisible by $n$ for every integer $x$. Find the value of $k(1000000)$. +-/ theorem putnam_1974_a6 (hdivnallx : Polynomial ℤ → Prop) (hdivnallx_def : hdivnallx = fun f => Monic f ∧ (∀ x : ℤ, (10^6 : ℤ) ∣ f.eval x)) diff --git a/lean4/src/putnam_1974_b1.lean b/lean4/src/putnam_1974_b1.lean index 676a2044..10563ee0 100644 --- a/lean4/src/putnam_1974_b1.lean +++ b/lean4/src/putnam_1974_b1.lean @@ -6,6 +6,9 @@ open Set Nat Polynomial abbrev putnam_1974_b1_solution : (Fin 5 → EuclideanSpace ℝ (Fin 2)) → Prop := sorry -- fun p ↦ ∃ᵉ (B > 0) (o : Equiv.Perm (Fin 5)), ∀ i, dist (p (o i)) (p (o (i + 1))) = B +/-- +Prove that the optimal configuration of 5 (not necessarily distinct) points $p_1, \dots, p_5$ on the unit circle which maximizes the sum of the ten distances \[\Sigma_{i < j}, d(p_i, p_j) \] is the one which evenly spaces the points like a regular pentagon. +-/ theorem putnam_1974_b1 (d : (Fin 5 → EuclideanSpace ℝ (Fin 2)) → ℝ) (d_def : ∀ p, d p = ∑ ⟨i, j⟩ : Fin 5 × Fin 5, if i < j then dist (p i) (p j) else 0) diff --git a/lean4/src/putnam_1974_b2.lean b/lean4/src/putnam_1974_b2.lean index 3d86eee8..4f99327f 100644 --- a/lean4/src/putnam_1974_b2.lean +++ b/lean4/src/putnam_1974_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Set Nat Polynomial Filter Topology +/-- +Let $y(x)$ be a continuously differentiable real-valued function of a real vairable $x$. Show that if $(y')^2 + y^3 \to 0$ as $x \to +\infty$, then $y(x)$ and $y'(x) \to 0$ as $x \to +\infty$. +-/ theorem putnam_1974_b2 (y : ℝ → ℝ) (ycontdiff : ContDiff ℝ 1 y) diff --git a/lean4/src/putnam_1974_b3.lean b/lean4/src/putnam_1974_b3.lean index 6735e677..d394c747 100644 --- a/lean4/src/putnam_1974_b3.lean +++ b/lean4/src/putnam_1974_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Set Nat Polynomial Filter Topology +/-- +Prove that if $\alpha$ is a real number such that $\cos (\pi \alpha) = 1/3$, the $\alpha$ is irrational. +-/ theorem putnam_1974_b3 (α : ℝ) (ha : Real.cos (Real.pi * α) = (1 : ℝ)/3) diff --git a/lean4/src/putnam_1974_b4.lean b/lean4/src/putnam_1974_b4.lean index 684ccd4f..49fdecd6 100644 --- a/lean4/src/putnam_1974_b4.lean +++ b/lean4/src/putnam_1974_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Set Nat Polynomial Filter Topology +/-- +Let $f : \mathbb{R} \to \mathbb{R}$ be continuous in each variable seperately. Show that there exists a sequence of continuous functions $g_n : \mathbb{R}^2 \to \mathbb{R}$ such that $f(x,y) = \lim_{n \to \infty} g_n(x,y)$ for all $(x,y) \in \mathbb{R}^2$. +-/ theorem putnam_1974_b4 (f : ℝ × ℝ → ℝ) (hfcontx : ∀ y : ℝ, Continuous (fun x => f ⟨x, y⟩)) diff --git a/lean4/src/putnam_1974_b5.lean b/lean4/src/putnam_1974_b5.lean index 8bfc588f..3e2bf12a 100644 --- a/lean4/src/putnam_1974_b5.lean +++ b/lean4/src/putnam_1974_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Set Nat Polynomial Filter Topology +/-- +Show that $1 + (n/1!) + (n^2/2!) + \dots + (n^n/n!) > e^n/2$ for every integer $n \geq 0$. +-/ theorem putnam_1974_b5 : ∀ n ≥ 0, ∑ i in Finset.Icc (0 : ℕ) n, (n^i : ℝ)/(Nat.factorial i) > (Real.exp n)/2 := sorry diff --git a/lean4/src/putnam_1974_b6.lean b/lean4/src/putnam_1974_b6.lean index aabac694..ffb0f1e7 100644 --- a/lean4/src/putnam_1974_b6.lean +++ b/lean4/src/putnam_1974_b6.lean @@ -5,6 +5,9 @@ open Set Nat Polynomial Filter Topology abbrev putnam_1974_b6_solution : (ℕ × ℕ × ℕ) := sorry -- ((2^1000 - 1)/3, (2^1000 - 1)/3, 1 + (2^1000 - 1)/3) +/-- +For a set with $1000$ elements, how many subsets are there whose candinality is respectively $\equiv 0 \bmod 3, \equiv 1 \bmod 3, \equiv 2 \bmod 3$? +-/ theorem putnam_1974_b6 (n : ℤ) (hn : n = 1000) diff --git a/lean4/src/putnam_1975_a1.lean b/lean4/src/putnam_1975_a1.lean index 9e8606c1..28d3b90e 100644 --- a/lean4/src/putnam_1975_a1.lean +++ b/lean4/src/putnam_1975_a1.lean @@ -5,6 +5,9 @@ open Polynomial abbrev putnam_1975_a1_solution : ((ℤ × ℤ) → ℤ) × ((ℤ × ℤ) → ℤ) := sorry -- (fun (a, b) => a + b + 1, fun (a, b) => a - b) +/-- +If an integer $n$ can be written as the sum of two triangular numbers (that is, $n = \frac{a^2 + a}{2} + \frac{b^2 + b}{2}$ for some integers $a$ and $b$), express $4n + 1$ as the sum of the squares of two integers $x$ and $y$, giving $x$ and $y$ in terms of $a$ and $b$. Also, show that if $4n + 1 = x^2 + y^2$ for some integers $x$ and $y$, then $n$ can be written as the sum of two triangular numbers. +-/ theorem putnam_1975_a1 (nab nxy : (ℤ × ℤ × ℤ) → Prop) (hnab : nab = fun (n, a, b) => n = (a^2 + (a : ℚ))/2 + (b^2 + (b : ℚ))/2) diff --git a/lean4/src/putnam_1975_a2.lean b/lean4/src/putnam_1975_a2.lean index b2bcb048..d2f53c83 100644 --- a/lean4/src/putnam_1975_a2.lean +++ b/lean4/src/putnam_1975_a2.lean @@ -5,6 +5,9 @@ open Polynomial abbrev putnam_1975_a2_solution : (ℝ × ℝ) → Prop := sorry -- fun (b, c) => c < 1 ∧ c - b > -1 ∧ c + b > -1 +/-- +For which ordered pairs $(b, c)$ of real numbers do both roots of $z^2 + bz + c$ lie strictly inside the unit disk (i.e., $\{|z| < 1\}$) in the complex plane? +-/ theorem putnam_1975_a2 : ∀ b c : ℝ, (∀ z : ℂ, (X^2 + (C (b : ℂ))*X + (C (c : ℂ)) : Polynomial ℂ).eval z = 0 → ‖z‖ < 1) ↔ putnam_1975_a2_solution (b, c) := sorry diff --git a/lean4/src/putnam_1975_a3.lean b/lean4/src/putnam_1975_a3.lean index f516c54e..93ec6a9c 100644 --- a/lean4/src/putnam_1975_a3.lean +++ b/lean4/src/putnam_1975_a3.lean @@ -5,6 +5,9 @@ open Polynomial noncomputable abbrev putnam_1975_a3_solution : ((ℝ × ℝ × ℝ) → (ℝ × ℝ × ℝ)) × ((ℝ × ℝ × ℝ) → (ℝ × ℝ × ℝ)) := sorry -- (fun (a, b, c) => ((a/b)^(1/(b - a)), (1 - ((a/b)^(1/(b - a)))^b)^(1/b), 0), fun (a, b, c) => (0, (1 - ((b/c)^(1/(c - b)))^b)^(1/b), (b/c)^(1/(c - b)))) +/-- +If $a$, $b$, and $c$ are real numbers satisfying $0 < a < b < c$, at what points in the set $$\{(x, y, z) \in \mathbb{R}^3 : x^b + y^b + z^b = 1, x \ge 0, y \ge 0, z \ge 0\}$$ does $f(x, y, z) = x^a + y^b + z^c$ attain its maximum and minimum? +-/ theorem putnam_1975_a3 (a b c : ℝ) (hi : 0 < a ∧ a < b ∧ b < c) diff --git a/lean4/src/putnam_1975_a4.lean b/lean4/src/putnam_1975_a4.lean index a83bf3c6..57438983 100644 --- a/lean4/src/putnam_1975_a4.lean +++ b/lean4/src/putnam_1975_a4.lean @@ -5,6 +5,9 @@ open Polynomial Real Complex noncomputable abbrev putnam_1975_a4_solution : ℕ → Polynomial ℤ := sorry -- fun m => ∑ j in Finset.range ((m - 1) / 2), Polynomial.X ^ (2 * j + 1) +/-- +Let $n = 2m$, where $m$ is an odd integer greater than 1. Let $\theta = e^{2\pi i/n}$. Expression $(1 - \theta)^{-1}$ explicitly as a polynomial in $\theta$ \[ a_k \theta^k + a_{k-1}\theta^{k-1} + \dots + a_1\theta + a_0\], with integer coefficients $a_i$. +-/ theorem putnam_1975_a4 (m : ℕ) (hm : Odd m ∧ m > 1) diff --git a/lean4/src/putnam_1975_a5.lean b/lean4/src/putnam_1975_a5.lean index f3b426e5..bd58d996 100644 --- a/lean4/src/putnam_1975_a5.lean +++ b/lean4/src/putnam_1975_a5.lean @@ -4,6 +4,9 @@ open BigOperators open Polynomial Real Complex -- Note: Only the part showing a constant exists +/-- +On some interval $I$ of the real line, let $y_1(x), y_2(x)$ be linearly independent solutions of the differential equation \[y'' = f(x)y\], where $f(x)$ is a continuous real-valued function. Suppose that $y_1(x) > 0$ and $y_2(x) > 0$ on $I$. Show that there exists a positive constant $c$ such that, on $I$, the function \[z(x) = c \sqrt{y_1(x)y_2(x)}\] satisfies the equation \[z'' + 1/z^3 = f(x)z.\] +-/ theorem putnam_1975_a5 (I : Interval ℝ) (f y1 y2 : ℝ → ℝ) diff --git a/lean4/src/putnam_1975_b1.lean b/lean4/src/putnam_1975_b1.lean index 0c61eac6..0a0e4dd0 100644 --- a/lean4/src/putnam_1975_b1.lean +++ b/lean4/src/putnam_1975_b1.lean @@ -5,6 +5,9 @@ open Polynomial Real Complex abbrev putnam_1975_b1_solution : ℤ := sorry -- 7 +/-- +Let $H$ be a subgroup of the additive group of ordered pairs of integers under componentwise addition. If $H$ is generated by the elements $(3, 8)$, $(4, -1)$, and $(5, 4)$, then $H$ is also generated by two elements $(1, b)$ and $(0, a)$ for some integer $b$ and positive integer $a$. Find $a$. +-/ theorem putnam_1975_b1 (H : Set (ℤ × ℤ)) (hH : H = {(x, y) : (ℤ × ℤ) | ∃ u v w : ℤ, (x, y) = (u*3 + v*4 + w*5, u*8 + v*(-1) + w*4)}) diff --git a/lean4/src/putnam_1975_b2.lean b/lean4/src/putnam_1975_b2.lean index 368e79fd..50d087d8 100644 --- a/lean4/src/putnam_1975_b2.lean +++ b/lean4/src/putnam_1975_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Polynomial Real Complex Matrix Filter Topology +/-- +In three-dimensional Euclidean space, define a \emph{slab} to be the open set of points lying between two parallel planes. The distance between the planes is called the \emph{thickness} of the slab. Given an infinite sequence $S_1, S_2, \dots$ of slabs of thicknesses $d_1, d_2, \dots,$ respectively, such that $\Sigma_{i=1}^{\infty} d_i$ converges, prove that there is some point in the space which is not contained in any of the slabs. +-/ theorem putnam_1975_b2 (slab : (Fin 3 → ℝ) → ℝ → ℝ → Set (Fin 3 → ℝ)) (hslab : slab = fun normal offset thickness => {x : Fin 3 → ℝ | offset < normal ⬝ᵥ x ∧ normal ⬝ᵥ x < offset + thickness}) diff --git a/lean4/src/putnam_1975_b3.lean b/lean4/src/putnam_1975_b3.lean index 7b87fa47..e3c4a402 100644 --- a/lean4/src/putnam_1975_b3.lean +++ b/lean4/src/putnam_1975_b3.lean @@ -5,6 +5,9 @@ open Polynomial Real Complex Matrix Filter Topology Multiset noncomputable abbrev putnam_1975_b3_solution : ℕ → ℝ := sorry -- fun k : ℕ => 1/(Nat.factorial k) +/-- +Let $s_k (a_1, a_2, \dots, a_n)$ denote the $k$-th elementary symmetric function; that is, the sum of all $k$-fold products of the $a_i$. For example, $s_1 (a_1, \dots, a_n) = \sum_{i=1}^{n} a_i$, and $s_2 (a_1, a_2, a_3) = a_1a_2 + a_2a_3 + a_1a_3$. Find the supremum $M_k$ (which is never attained) of $$\frac{s_k (a_1, a_2, \dots, a_n)}{(s_1 (a_1, a_2, \dots, a_n))^k}$$ across all $n$-tuples $(a_1, a_2, \dots, a_n)$ of positive real numbers with $n \ge k$. +-/ theorem putnam_1975_b3 : ∀ k : ℕ, k > 0 → (∀ a : Multiset ℝ, (∀ i ∈ a, i > 0) ∧ card a ≥ k → (esymm a k)/(esymm a 1)^k ≤ putnam_1975_b3_solution k) ∧ diff --git a/lean4/src/putnam_1975_b4.lean b/lean4/src/putnam_1975_b4.lean index 551f9156..878d714e 100644 --- a/lean4/src/putnam_1975_b4.lean +++ b/lean4/src/putnam_1975_b4.lean @@ -5,6 +5,9 @@ open Polynomial Real Complex Matrix Filter Topology Multiset abbrev putnam_1975_b4_solution : Prop := sorry -- False +/-- +Let $C = \{(x, y) \in \mathbb{R}^2 : x^2 + y^2 = 1\}$ denote the unit circle. Does there exist $B \subseteq C$ for which $B$ is topologically closed and contains exactly one point from each pair of diametrically opposite points in $C$? +-/ theorem putnam_1975_b4 (P : ℝ × ℝ → Prop) (hP : P = fun (x, y) => x^2 + y^2 = 1) diff --git a/lean4/src/putnam_1975_b5.lean b/lean4/src/putnam_1975_b5.lean index e9adeea2..6d152d35 100644 --- a/lean4/src/putnam_1975_b5.lean +++ b/lean4/src/putnam_1975_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Polynomial Real Complex Matrix Filter Topology Multiset +/-- +Let $f_0(x) = e^x$ and $f_{n+1}(x) = xf'_n(x)$ for all $n \ge 0$. Prove that $$\sum_{n=0}^{\infty} \frac{f_n(1)}{n!} = e^e.$$ +-/ theorem putnam_1975_b5 (e : ℝ) (he : e = Real.exp 1) diff --git a/lean4/src/putnam_1975_b6.lean b/lean4/src/putnam_1975_b6.lean index 940729bf..a9059fdc 100644 --- a/lean4/src/putnam_1975_b6.lean +++ b/lean4/src/putnam_1975_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Polynomial Real Complex Matrix Filter Topology Multiset +/-- +Show that if $s_n = 1 + \frac{1}{2} + \frac{1}{3} + \dots + 1/n, then $n(n+1)^{1/n} < n + s_n$ whenever $n > 1$ and $(n-1)n^{-1/(n-1)} < n - s_n$ whenever $n > 2$. +-/ theorem putnam_1975_b6 (s : ℕ → ℝ) (hs : s = fun (n : ℕ) => ∑ i in Finset.Icc 1 n, 1/(i : ℝ)) diff --git a/lean4/src/putnam_1976_a2.lean b/lean4/src/putnam_1976_a2.lean index 7d05a898..8d2d3f22 100644 --- a/lean4/src/putnam_1976_a2.lean +++ b/lean4/src/putnam_1976_a2.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial +/-- +Let $P(x, y) = x^2y + xy^2$, $Q(x, y) = x^2 + xy + y^2$, $F_n(x, y) = (x + y)^n - x^n - y^n$, and $G_n(x, y) = (x + y)^n + x^n + y^n$. Prove that for all positive integers $n$, either $F_n$ or $G_n$ can be represented as a polynomial in $P$ and $Q$ with integer coefficients. +-/ theorem putnam_1976_a2 (P Q : MvPolynomial (Fin 2) ℤ) (hP : P = X 0 ^ 2 * X 1 + X 0 * X 1 ^ 2) diff --git a/lean4/src/putnam_1976_a3.lean b/lean4/src/putnam_1976_a3.lean index ca54f162..25733455 100644 --- a/lean4/src/putnam_1976_a3.lean +++ b/lean4/src/putnam_1976_a3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1976_a3_solution : Set (ℕ × ℕ × ℕ × ℕ) := sorry -- {(3, 2, 2, 3), (2, 3, 3, 2)} +/-- +Find all integer solutions $(p, r, q, s)$ of the equation $|p^r - q^s| = 1$, where $p$ and $q$ are prime and $r$ and $s$ are greater than $1$. +-/ theorem putnam_1976_a3 : {(p, r, q, s) : ℕ × ℕ × ℕ × ℕ | Nat.Prime p ∧ Nat.Prime q ∧ r > 1 ∧ s > 1 ∧ |(p^r : ℤ) - q^s| = 1} = putnam_1976_a3_solution := sorry diff --git a/lean4/src/putnam_1976_a4.lean b/lean4/src/putnam_1976_a4.lean index 8417deaf..af683b48 100644 --- a/lean4/src/putnam_1976_a4.lean +++ b/lean4/src/putnam_1976_a4.lean @@ -5,6 +5,9 @@ open Polynomial noncomputable abbrev putnam_1976_a4_solution : (ℝ → ℝ) × (ℝ → ℝ) := sorry -- (fun r : ℝ => -1/(r + 1), fun r : ℝ => -(r + 1)/r) +/-- +Let $r$ be a real root of $P(x) = x^3 + ax^2 + bx - 1$, where $a$ and $b$ are integers and $P$ is irreducible over the rationals. Suppose that $r + 1$ is a root of $x^3 + cx^2 + dx + 1$, where $c$ and $d$ are also integers. Express another root $s$ of $P$ as a function of $r$ that does not depend on the values of $a$, $b$, $c$, or $d$. +-/ theorem putnam_1976_a4 (a b c d : ℤ) (r : ℝ) diff --git a/lean4/src/putnam_1976_a6.lean b/lean4/src/putnam_1976_a6.lean index 65783d14..3f594618 100644 --- a/lean4/src/putnam_1976_a6.lean +++ b/lean4/src/putnam_1976_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Polynomial +/-- +Suppose that $f : \mathbb{R} \to \mathbb{R}$ is a twice continuously differentiable function such that $|f(x)| \le 1$ for all real $x$ and $(f(0))^2 + (f'(0))^2 = 4$. Prove that $f(y) + f''(y) = 0$ for some real number $y$. +-/ theorem putnam_1976_a6 (f : ℝ → ℝ) (hfdiff : ContDiff ℝ 2 f) diff --git a/lean4/src/putnam_1976_b1.lean b/lean4/src/putnam_1976_b1.lean index df142284..afe36f0e 100644 --- a/lean4/src/putnam_1976_b1.lean +++ b/lean4/src/putnam_1976_b1.lean @@ -5,6 +5,9 @@ open Polynomial Filter Topology abbrev putnam_1976_b1_solution : ℕ × ℕ := sorry -- (4, 1) +/-- +Find $$\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n}\left(\left\lfloor \frac{2n}{k} \right\rfloor - 2\left\lfloor \frac{n}{k} \right\rfloor\right).$$ Your answer should be in the form $\ln(a) - b$, where $a$ and $b$ are positive integers. +-/ theorem putnam_1976_b1 : Tendsto (fun n : ℕ => ((1 : ℝ)/n)*∑ k in Finset.Icc (1 : ℤ) n, (Int.floor ((2*n)/k) - 2*Int.floor (n/k))) atTop (𝓝 (Real.log putnam_1976_b1_solution.1 - putnam_1976_b1_solution.2)) := diff --git a/lean4/src/putnam_1976_b2.lean b/lean4/src/putnam_1976_b2.lean index abd411a1..e5bdc630 100644 --- a/lean4/src/putnam_1976_b2.lean +++ b/lean4/src/putnam_1976_b2.lean @@ -5,6 +5,9 @@ open Polynomial Filter Topology abbrev putnam_1976_b2_solution : ℕ × Set (List (ℤ × ℤ)) := sorry -- (8, {[(0, 0)], [(2, 0)], [(0, 1)], [(0, 2)], [(0, 3)], [(0, 4)], [(0, 5)], [(0, 6)]}) +/-- +Let $G$ be a group generated by two elements $A$ and $B$; i.e., every element of $G$ can be expressed as a finite word $A^{n_1}B^{n_2} \cdots A^{n_{k-1}}B^{n_k}$, where the $n_i$ can assume any integer values and $A^0 = B^0 = 1$. Further assume that $A^4 = B^7 = ABA^{-1}B = 1$, but $A^2 \ne 1$ and $B \ne 1$. Find the number of elements of $G$ than can be written as $C^2$ for some $C \in G$ and express each such square as a word in $A$ and $B$. +-/ theorem putnam_1976_b2 (G : Type*) [Group G] (A B : G) diff --git a/lean4/src/putnam_1976_b3.lean b/lean4/src/putnam_1976_b3.lean index 6781bf0e..dab28c18 100644 --- a/lean4/src/putnam_1976_b3.lean +++ b/lean4/src/putnam_1976_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Polynomial Filter Topology ProbabilityTheory MeasureTheory +/-- +Suppose that we have $n$ events $A_1, \dots, A_n$, each of which has probability at least $1 - a$ of occufring, where $a < 1/4$. Further suppose that $A_i$ and $A_j$ are mutually independent if $|i-j| > 1$, although $A_i$ and $A_{i+1}$ may be dependent. Assume as known that the recurrence $u_{k+1} = u_k - au_{k-1}$, $u_0 = 1, u_1 = 1-a$ defines positive real numbers $u_k$ for $k = 0,1,\dots$. Show that the probability of all $A_1, \dots, A_n$ occurring is at least $u_n$. +-/ theorem putnam_1976_b3 (Ω : Type*) [MeasurableSpace Ω] diff --git a/lean4/src/putnam_1976_b5.lean b/lean4/src/putnam_1976_b5.lean index 00beee9f..cb068f44 100644 --- a/lean4/src/putnam_1976_b5.lean +++ b/lean4/src/putnam_1976_b5.lean @@ -5,6 +5,9 @@ open Polynomial Filter Topology ProbabilityTheory MeasureTheory noncomputable abbrev putnam_1976_b5_solution : ℕ → Polynomial ℤ := sorry -- fun n => C (Nat.factorial n) +/-- +Find $$\sum_{k=0}^{n} (-1)^k {n \choose k} (x - k)^n.$$ +-/ theorem putnam_1976_b5 : ∀ n : ℕ, ∑ k in Finset.range (n + 1), C ((-(1 : ℤ))^k * Nat.choose n k) * (X - (C (k : ℤ)))^n = putnam_1976_b5_solution n := sorry diff --git a/lean4/src/putnam_1976_b6.lean b/lean4/src/putnam_1976_b6.lean index 5acc0ff8..f5bc6817 100644 --- a/lean4/src/putnam_1976_b6.lean +++ b/lean4/src/putnam_1976_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Polynomial Filter Topology ProbabilityTheory MeasureTheory +/-- +Let $\sigma(N)$ denote the sum of all positive integer divisors of $N$, including $1$ and $N$. Call a positive integer $N$ \textit{quasiperfect} if $\sigma(N) = 2N + 1$. Prove that every quasiperfect number is the square of an odd integer. +-/ theorem putnam_1976_b6 (σ : ℕ → ℤ) (hσ : σ = fun N : ℕ => ∑ d in Nat.divisors N, (d : ℤ)) diff --git a/lean4/src/putnam_1977_a1.lean b/lean4/src/putnam_1977_a1.lean index f836fd6e..7142c9a1 100644 --- a/lean4/src/putnam_1977_a1.lean +++ b/lean4/src/putnam_1977_a1.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_1977_a1_solution : ℝ := sorry -- -7 / 8 +/-- +Show that if four distinct points of the curve $y = 2x^4 + 7x^3 + 3x - 5$ are collinear, then their average $x$-coordinate is some constant $k$. Find $k$. +-/ theorem putnam_1977_a1 (y : ℝ → ℝ) (hy : y = fun x ↦ 2 * x ^ 4 + 7 * x ^ 3 + 3 * x - 5) diff --git a/lean4/src/putnam_1977_a2.lean b/lean4/src/putnam_1977_a2.lean index f304f5d0..cd865e14 100644 --- a/lean4/src/putnam_1977_a2.lean +++ b/lean4/src/putnam_1977_a2.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1977_a2_solution : ℝ → ℝ → ℝ → ℝ → Prop := sorry -- fun a b c d ↦ d = a ∧ b = -c ∨ d = b ∧ a = -c ∨ d = c ∧ a = -b +/-- +Find all real solutions $(a, b, c, d)$ to the equations $a + b + c = d$, $\frac{1}{a} + \frac{1}{b} + \frac{1}{c} = \frac{1}{d}$. +-/ theorem putnam_1977_a2 : (∀ a b c d : ℝ, a ≠ 0 → b ≠ 0 → c ≠ 0 → d ≠ 0 → ((a + b + c = d ∧ 1 / a + 1 / b + 1 / c = 1 / d) ↔ putnam_1977_a2_solution a b c d)) := sorry diff --git a/lean4/src/putnam_1977_a3.lean b/lean4/src/putnam_1977_a3.lean index bb718b92..074f58f4 100644 --- a/lean4/src/putnam_1977_a3.lean +++ b/lean4/src/putnam_1977_a3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1977_a3_solution : (ℝ → ℝ) → (ℝ → ℝ) → (ℝ → ℝ) := sorry -- fun f g x ↦ g x - f (x - 3) + f (x - 1) + f (x + 1) - f (x + 3) +/-- +Let $f, g, h$ be functions $\mathbb{R} \to \mathbb{R}$. Find an expression for $h(x)$ in terms of $f$ and $g$ such that $f(x) = \frac{h(x + 1) + h(x - 1)}{2}$ and $g(x) = \frac{h(x + 4) + h(x - 4)}{2}$. +-/ theorem putnam_1977_a3 (f g h : ℝ → ℝ) (hf : ∀ x, f x = (h (x + 1) + h (x - 1)) / 2) diff --git a/lean4/src/putnam_1977_a4.lean b/lean4/src/putnam_1977_a4.lean index 721f3209..ac14bc5e 100644 --- a/lean4/src/putnam_1977_a4.lean +++ b/lean4/src/putnam_1977_a4.lean @@ -5,6 +5,9 @@ open RingHom Set noncomputable abbrev putnam_1977_a4_solution : RatFunc ℝ := sorry -- RatFunc.X / (1 - RatFunc.X) +/-- +Find $\sum_{n=0}^{\infty} \frac{x^{2^n}}{1 - x^{2^{n+1}}}$ as a rational function of $x$ for $x \in (0, 1)$. +-/ theorem putnam_1977_a4 : (∀ x ∈ Ioo 0 1, putnam_1977_a4_solution.eval (id ℝ) x = ∑' n : ℕ, x ^ 2 ^ n / (1 - x ^ 2 ^ (n + 1))) := sorry diff --git a/lean4/src/putnam_1977_a5.lean b/lean4/src/putnam_1977_a5.lean index 46279c49..75ab81eb 100644 --- a/lean4/src/putnam_1977_a5.lean +++ b/lean4/src/putnam_1977_a5.lean @@ -3,6 +3,9 @@ open BigOperators open RingHom Set Nat +/-- +Let $p$ be a prime and $m \geq n$ be non-negative integers. Show that $\binom{pm}{pn} = \binom{m}{n} \pmod p$, where $\binom{m}{n}$ is the binomial coefficient. +-/ theorem putnam_1977_a5 (p m n : ℕ) (hp : Nat.Prime p) diff --git a/lean4/src/putnam_1977_a6.lean b/lean4/src/putnam_1977_a6.lean index 7696983b..6568b92e 100644 --- a/lean4/src/putnam_1977_a6.lean +++ b/lean4/src/putnam_1977_a6.lean @@ -5,6 +5,15 @@ open RingHom Set Nat abbrev putnam_1977_a6_solution : Prop := sorry -- True +/-- +Let $X$ be the square $[0, 1] \times [0, 1]$, and let $f : X \to \mathbb{R}$ be continuous. If $\int_Y f(x, y) \, dx \, dy = 0$ for all squares $Y$ such that +\begin{itemize} +\item[(1)] $Y \subseteq X$, +\item[(2)] $Y$ has sides parallel to those of $X$, +\item[(3)] at least one of $Y$'s sides is contained in the boundary of $X$, +\end{itemize} +is it true that $f(x, y) = 0$ for all $x, y$? +-/ theorem putnam_1977_a6 (X : Set (ℝ × ℝ)) (hX : X = Set.prod (Icc 0 1) (Icc 0 1)) diff --git a/lean4/src/putnam_1977_b1.lean b/lean4/src/putnam_1977_b1.lean index 08d10803..cf8eba63 100644 --- a/lean4/src/putnam_1977_b1.lean +++ b/lean4/src/putnam_1977_b1.lean @@ -5,6 +5,9 @@ open RingHom Set Nat Filter Topology noncomputable abbrev putnam_1977_b1_solution : ℝ := sorry -- 2 / 3 +/-- +Find $\prod_{n=2}^{\infty} \frac{(n^3 - 1)}{(n^3 + 1)}$. +-/ theorem putnam_1977_b1 : Tendsto (fun N ↦ ∏ n in Finset.Icc (2 : ℤ) N, ((n : ℝ) ^ 3 - 1) / (n ^ 3 + 1)) atTop (𝓝 putnam_1977_b1_solution) := sorry diff --git a/lean4/src/putnam_1977_b3.lean b/lean4/src/putnam_1977_b3.lean index a4cf4cd4..5b259383 100644 --- a/lean4/src/putnam_1977_b3.lean +++ b/lean4/src/putnam_1977_b3.lean @@ -5,6 +5,9 @@ open RingHom Set Nat Filter Topology abbrev putnam_1977_b3_solution : Prop := sorry -- False +/-- +An ordered triple $(a, b, c)$ of positive irrational numbers with $a + b + c = 1$ is considered $\textit{balanced}$ if all three elements are less than $\frac{1}{2}$. If a triple is not balanced, we can perform a ``balancing act'' $B$ defined by $B(a, b, c) = (f(a), f(b), f(c))$, where $f(x) = 2x - 1$ if $x > 1/2$ and $f(x) = 2x$ otherwise. Will finitely many iterations of this balancing act always eventually produce a balanced triple? +-/ theorem putnam_1977_b3 (P balanced: ℝ × ℝ × ℝ → Prop) (B : ℝ × ℝ × ℝ → ℝ × ℝ × ℝ) diff --git a/lean4/src/putnam_1977_b5.lean b/lean4/src/putnam_1977_b5.lean index c2175a4b..71b1018c 100644 --- a/lean4/src/putnam_1977_b5.lean +++ b/lean4/src/putnam_1977_b5.lean @@ -3,6 +3,9 @@ open BigOperators open RingHom Set Nat Filter Topology +/-- +If $a_1, a_2, \dots, a_n$ are real numbers with $n > 1$ and $A$ satisfies $$A + \sum_{i = 1}^{n} a_i^2 < \frac{1}{n-1}\left(\sum_{i=1}^{n}a_i\right)^2,$$ prove that $A < 2a_{i}a_{j}$ for all $i, j$ with $1 \le i < j \le n$. +-/ theorem putnam_1977_b5 (n : ℕ) (hn : n > 1) diff --git a/lean4/src/putnam_1977_b6.lean b/lean4/src/putnam_1977_b6.lean index f2bef9b2..6b3da7c0 100644 --- a/lean4/src/putnam_1977_b6.lean +++ b/lean4/src/putnam_1977_b6.lean @@ -3,6 +3,9 @@ open BigOperators open RingHom Set Nat Filter Topology +/-- +Let $G$ be a group and $H$ be a subgroup of $G$ with $h$ elements. Suppose that $G$ contains some element $a$ such that $(xa)^3 = 1$ for all $x \in H$ (here $1$ represents the identity element of $G$). Let $P$ be the subset of $G$ containing all products of the form $x_1 a x_2 a \cdots x_n a$ with $n \ge 1$ and $x_i \in H$ for all $i \in \{1, 2, \dots, n\}$. Prove that $P$ is a finite set and contains no more than $3h^2$ elements. +-/ theorem putnam_1977_b6 {G : Type*} [Group G] diff --git a/lean4/src/putnam_1978_a1.lean b/lean4/src/putnam_1978_a1.lean index 91124cc3..72371f34 100644 --- a/lean4/src/putnam_1978_a1.lean +++ b/lean4/src/putnam_1978_a1.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $S = \{1, 4, 7, 10, 13, 16, \dots , 100\}$. Let $T$ be a subset of $20$ elements of $S$. Show that we can find two distinct elements of $T$ with sum $104$. +-/ theorem putnam_1978_a1 (S T : Set ℤ) (hS : S = {k | ∃ j : ℤ, 0 ≤ j ∧ j ≤ 33 ∧ k = 3 * j + 1}) diff --git a/lean4/src/putnam_1978_a2.lean b/lean4/src/putnam_1978_a2.lean index 4ee60fa6..cdc74e54 100644 --- a/lean4/src/putnam_1978_a2.lean +++ b/lean4/src/putnam_1978_a2.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $A$ be the real $n \times n$ matrix $(a_{ij})$ where $a_{ij} = a$ for $i < j$, $b \; (\neq a)$ for $i > j$, and $c_i$ for $i = j$. Show that $\det A = \frac{b p(a) - a p(b)}{b - a}$, where $p(x) = \prod_{i=1}^n (c_i - x)$. +-/ theorem putnam_1978_a2 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_1978_a3.lean b/lean4/src/putnam_1978_a3.lean index c3c3e66a..c21d20e8 100644 --- a/lean4/src/putnam_1978_a3.lean +++ b/lean4/src/putnam_1978_a3.lean @@ -5,6 +5,13 @@ open Set Polynomial abbrev putnam_1978_a3_solution : ℕ := sorry -- 2 +/-- +Let $p(x) = 2(x^6 + 1) + 4(x^5 + x) + 3(x^4 + x^2) + 5x^3$. For $k$ with $0 < k < 5$, let +\[ +I_k = \int_0^{\infty} \frac{x^k}{p(x)} \, dx. +\] +For which $k$ is $I_k$ smallest? +-/ theorem putnam_1978_a3 (p : Polynomial ℝ) (hp : p = 2 * (X ^ 6 + 1) + 4 * (X ^ 5 + X) + 3 * (X ^ 4 + X ^ 2) + 5 * X ^ 3) diff --git a/lean4/src/putnam_1978_a4.lean b/lean4/src/putnam_1978_a4.lean index c5a8ac9a..93025f5c 100644 --- a/lean4/src/putnam_1978_a4.lean +++ b/lean4/src/putnam_1978_a4.lean @@ -4,6 +4,19 @@ open BigOperators open Set -- Note: This formalization uses "Type" instead of "Type*" for an algebraic structure (a set with a bypass operation). Also, the original problem asks for a witness to the existentially quantified statement in the goal. +/-- +A binary operation (represented by multiplication) on $S$ has the property that $(ab)(cd) = ad$ for all $a, b, c, d$. Show that: +\begin{itemize} +\item[(1)] if $ab = c$, then $cc = c$; +\item[(2)] if $ab = c$, then $ad = cd$ for all $d$. +\end{itemize} +Find a set $S$, and such a binary operation, which also satisfies: +\begin{itemize} +\item[(A)] $a a = a$ for all $a$; +\item[(B)] $ab = a \neq b$ for some $a, b$; +\item[(C)] $ab \neq a$ for some $a, b$. +\end{itemize} +-/ theorem putnam_1978_a4 (bypass : (S : Type) → [inst : Mul S] → Prop) (hbypass : bypass = fun S [Mul S] ↦ ∀ a b c d : S, (a * b) * (c * d) = a * d) diff --git a/lean4/src/putnam_1978_a5.lean b/lean4/src/putnam_1978_a5.lean index 38e9d2aa..45ef5d00 100644 --- a/lean4/src/putnam_1978_a5.lean +++ b/lean4/src/putnam_1978_a5.lean @@ -3,6 +3,12 @@ open BigOperators open Set Real +/-- +Let $a_1, a_2, \dots , a_n$ be reals in the interval $(0, \pi)$ with arithmetic mean $\mu$. Show that +\[ +\prod_{i=1}^n \left( \frac{\sin a_i}{a_i} \right) \leq \left( \frac{\sin \mu}{\mu} \right)^n. +\] +-/ theorem putnam_1978_a5 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_1978_a6.lean b/lean4/src/putnam_1978_a6.lean index 472ebf9e..baae166c 100644 --- a/lean4/src/putnam_1978_a6.lean +++ b/lean4/src/putnam_1978_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Set Real +/-- +Given $n$ distinct points in the plane, prove that fewer than $2n^{3/2}$ pairs of these points are a distance of $1$ apart. +-/ theorem putnam_1978_a6 (S : Finset (EuclideanSpace ℝ (Fin 2))) (n : ℕ) diff --git a/lean4/src/putnam_1978_b2.lean b/lean4/src/putnam_1978_b2.lean index 43c5ac2d..b5b2581a 100644 --- a/lean4/src/putnam_1978_b2.lean +++ b/lean4/src/putnam_1978_b2.lean @@ -5,6 +5,12 @@ open Set Real abbrev putnam_1978_b2_solution : ℚ := sorry -- 7 / 4 +/-- +Find +\[ +\sum_{i=1}^{\infty} \sum_{j=1}^{\infty} \frac{1}{i^2j + 2ij + ij^2}. +\] +-/ theorem putnam_1978_b2 : (∑' i : ℕ+, ∑' j : ℕ+, (1 : ℚ) / (i ^ 2 * j + 2 * i * j + i * j ^ 2) = putnam_1978_b2_solution) := sorry diff --git a/lean4/src/putnam_1978_b3.lean b/lean4/src/putnam_1978_b3.lean index 0232a63e..8ea7f2f2 100644 --- a/lean4/src/putnam_1978_b3.lean +++ b/lean4/src/putnam_1978_b3.lean @@ -3,6 +3,16 @@ open BigOperators open Set Real Filter Topology Polynomial +/-- +The polynomials $P_n(x)$ are defined by +\begin{align*} +P_1(x) &= 1 + x, \\ +P_2(x) &= 1 + 2x, \\ +P_{2n+1}(x) &= P_{2n}(x) + (n + 1) x P_{2n-1}(x), \\ +P_{2n+2}(x) &= P_{2n+1}(x) + (n + 1) x P_{2n}(x). +\end{align*} +Let $a_n$ be the largest real root of $P_n(x)$. Prove that $a_n$ is strictly monotonically increasing and tends to zero. +-/ theorem putnam_1978_b3 (P : ℕ+ → Polynomial ℝ) (hP1 : P 1 = 1 + X) diff --git a/lean4/src/putnam_1978_b4.lean b/lean4/src/putnam_1978_b4.lean index d092a8ce..9f65d75b 100644 --- a/lean4/src/putnam_1978_b4.lean +++ b/lean4/src/putnam_1978_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Set Real Filter Topology Polynomial +/-- +Show that we can find integers $a, b, c, d$ such that $a^2 + b^2 + c^2 + d^2 = abc + abd + acd + bcd$, and the smallest of $a, b, c, d$ is arbitrarily large. +-/ theorem putnam_1978_b4 : (∀ N : ℝ, ∃ a b c d : ℤ, a > N ∧ b > N ∧ c > N ∧ d > N ∧ a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = a * b * c + a * b * d + a * c * d + b * c * d) := sorry diff --git a/lean4/src/putnam_1978_b5.lean b/lean4/src/putnam_1978_b5.lean index 2b42c754..7a3dda3e 100644 --- a/lean4/src/putnam_1978_b5.lean +++ b/lean4/src/putnam_1978_b5.lean @@ -5,6 +5,9 @@ open Set Real Filter Topology Polynomial noncomputable abbrev putnam_1978_b5_solution : Polynomial ℝ := sorry -- 4 * X ^ 4 - 4 * X ^ 2 + 1 +/-- +Find the real polynomial $p(x)$ of degree $4$ with largest possible coefficient of $x^4$ such that $p([-1, 1]) \subseteq [0, 1]$. +-/ theorem putnam_1978_b5 (S : Set (Polynomial ℝ)) (hS : S = {p : Polynomial ℝ | p.degree = 4 ∧ ∀ x ∈ Icc (-1) 1, p.eval x ∈ Icc 0 1}) diff --git a/lean4/src/putnam_1978_b6.lean b/lean4/src/putnam_1978_b6.lean index c8f237e3..3f42f7a3 100644 --- a/lean4/src/putnam_1978_b6.lean +++ b/lean4/src/putnam_1978_b6.lean @@ -3,6 +3,12 @@ open BigOperators open Set Real Filter Topology Polynomial +/-- +Let $a_{ij}$ be real numbers in $[0, 1]$. Show that +\[ +\left( \sum_{i=1}^n \sum_{j=1}^{mi} \frac{a_{ij}}{i} \right) ^2 \leq 2m \sum_{i=1}^n \sum_{j=1}^{mi} a_{ij}. +\] +-/ theorem putnam_1978_b6 (a : ℕ → ℕ → ℝ) (ha : ∀ i j, a i j ∈ Icc 0 1) diff --git a/lean4/src/putnam_1979_a1.lean b/lean4/src/putnam_1979_a1.lean index 6dcf6b76..80456f68 100644 --- a/lean4/src/putnam_1979_a1.lean +++ b/lean4/src/putnam_1979_a1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1979_a1_solution : Multiset ℕ := sorry -- Multiset.replicate 659 3 + {2} +/-- +For which positive integers $n$ and $a_1, a_2, \dots, a_n$ with $\sum_{i = 1}^{n} a_i = 1979$ does $\prod_{i = 1}^{n} a_i$ attain the greatest value? +-/ theorem putnam_1979_a1 (P : Multiset ℕ → Prop) (hP : P = fun a => Multiset.card a > 0 ∧ (∀ i ∈ a, i > 0) ∧ a.sum = 1979) diff --git a/lean4/src/putnam_1979_a2.lean b/lean4/src/putnam_1979_a2.lean index 98dbdc41..d7f7ef58 100644 --- a/lean4/src/putnam_1979_a2.lean +++ b/lean4/src/putnam_1979_a2.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1979_a2_solution : ℝ → Prop := sorry -- fun k : ℝ => k ≥ 0 +/-- +For which real numbers $k$ does there exist a continuous function $f : \mathbb{R} \to \mathbb{R}$ such that $f(f(x)) = kx^9$ for all real $x$? +-/ theorem putnam_1979_a2 : ∀ k : ℝ, (∃ f : ℝ → ℝ, Continuous f ∧ ∀ x : ℝ, f (f x) = k*x^9) ↔ putnam_1979_a2_solution k := sorry diff --git a/lean4/src/putnam_1979_a3.lean b/lean4/src/putnam_1979_a3.lean index 20dd947f..253def7f 100644 --- a/lean4/src/putnam_1979_a3.lean +++ b/lean4/src/putnam_1979_a3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1979_a3_solution : (ℝ × ℝ) → Prop := sorry -- fun (a, b) => ∃ m : ℤ, a = m ∧ b = m +/-- +Let $x_1, x_2, x_3, \dots$ be a sequence of nonzero real numbers such that $$x_n = \frac{x_{n-2}x_{n-1}}{2x_{n-2}-x_{n-1}}$$ for all $n \ge 3$. For which real values of $x_1$ and $x_2$ does $x_n$ attain integer values for infinitely many $n$? +-/ theorem putnam_1979_a3 (x : ℕ → ℝ) (hx : ∀ n : ℕ, x n ≠ 0 ∧ (n ≥ 3 → x n = (x (n - 2))*(x (n - 1))/(2*(x (n - 2)) - (x (n - 1))))) diff --git a/lean4/src/putnam_1979_a4.lean b/lean4/src/putnam_1979_a4.lean index e8a7c03e..1ed96e36 100644 --- a/lean4/src/putnam_1979_a4.lean +++ b/lean4/src/putnam_1979_a4.lean @@ -5,6 +5,9 @@ open Set abbrev putnam_1979_a4_solution : Prop := sorry -- True +/-- +Let $A$ be a set of $2n$ points in the plane, $n$ colored red and $n$ colored blue, such that no three points in $A$ are collinear. Must there exist $n$ closed straight line segments, each connecting one red and one blue point in $A$, such that no two of the $n$ line segments intersect? +-/ theorem putnam_1979_a4 (A : Finset (Fin 2 → ℝ) × Finset (Fin 2 → ℝ) → Prop) (hA : A = fun (R, B) => R.card = B.card ∧ R ∩ B = ∅ ∧ diff --git a/lean4/src/putnam_1979_a5.lean b/lean4/src/putnam_1979_a5.lean index d27842ab..e71b0470 100644 --- a/lean4/src/putnam_1979_a5.lean +++ b/lean4/src/putnam_1979_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Set +/-- +Let $S(x)$ denote the sequence $\lfloor 0 \rfloor, \lfloor x \rfloor, \lfloor 2x \rfloor, \lfloor 3x \rfloor, \dots$, where $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$. Prove that there exist distinct real roots $\alpha$ and $\beta$ of $x^3 - 10x^2 + 29x - 25$ such that infinitely many positive integers appear in both $S(\alpha)$ and $S(\beta)$. +-/ theorem putnam_1979_a5 (S : ℝ → ℕ → ℤ) (hS : S = fun x : ℝ => fun n : ℕ => Int.floor (n*x)) diff --git a/lean4/src/putnam_1979_a6.lean b/lean4/src/putnam_1979_a6.lean index ff4ba23b..eedc6ff8 100644 --- a/lean4/src/putnam_1979_a6.lean +++ b/lean4/src/putnam_1979_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Set +/-- +For all $i \in \{0, 1, \dots, n - 1\}$, let $p_i \in [0, 1]$. Prove that there exists some $x \in [0, 1]$ such that $$\sum_{i = 0}^{n - 1} \frac{1}{|x - p_i|} \le 8n\left(\sum_{i = 0}^{n-1} \frac{1}{2i + 1}\right).$$ +-/ theorem putnam_1979_a6 (n : ℕ) (p : ℕ → ℝ) diff --git a/lean4/src/putnam_1979_b2.lean b/lean4/src/putnam_1979_b2.lean index 86a02c25..8107e25f 100644 --- a/lean4/src/putnam_1979_b2.lean +++ b/lean4/src/putnam_1979_b2.lean @@ -5,6 +5,9 @@ open Set Topology Filter noncomputable abbrev putnam_1979_b2_solution : ℝ × ℝ → ℝ := sorry -- fun (a, b) => (Real.exp (-1))*(b^b/a^a)^(1/(b-a)) +/-- +If $0 < a < b$, find $$\lim_{t \to 0} \left( \int_{0}^{1}(bx + a(1-x))^t dx \right)^{\frac{1}{t}}$$ in terms of $a$ and $b$. +-/ theorem putnam_1979_b2 : ∀ a b : ℝ, 0 < a ∧ a < b → Tendsto (fun t : ℝ => (∫ x in Icc 0 1, (b*x + a*(1 - x))^t)^(1/t)) (𝓝[≠] 0) (𝓝 (putnam_1979_b2_solution (a, b))) := sorry diff --git a/lean4/src/putnam_1979_b3.lean b/lean4/src/putnam_1979_b3.lean index 8ae46dae..7ba152dc 100644 --- a/lean4/src/putnam_1979_b3.lean +++ b/lean4/src/putnam_1979_b3.lean @@ -5,6 +5,9 @@ open Set Topology Filter Polynomial abbrev putnam_1979_b3_solution : ℕ → ℤ := sorry -- fun n ↦ (n - 1) / 2 +/-- +Let $F$ be a finite field with $n$ elements, and assume $n$ is odd. Suppose $x^2 + bx + c$ is an irreducible polynomial over $F$. For how many elements $d \in F$ is $x^2 + bx + c + d$ irreducible? +-/ theorem putnam_1979_b3 (F : Type*) [Field F] [Fintype F] (n : ℕ) diff --git a/lean4/src/putnam_1979_b5.lean b/lean4/src/putnam_1979_b5.lean index 4f5496e7..9d5ca403 100644 --- a/lean4/src/putnam_1979_b5.lean +++ b/lean4/src/putnam_1979_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Set Topology Filter Polynomial MeasureTheory +/-- +In the plane, let $C$ be a closed convex set that contains $(0,0) but no other point with integer coordinations. Suppose that $A(C)$, the area of $C$, is equally distributed among the four quadrants. Prove that $A(C) \leq 4$. +-/ theorem putnam_1979_b5 (C : Set (ℝ × ℝ)) (hC : IsClosed C ∧ Convex ℝ C ∧ (0,0) ∈ C) diff --git a/lean4/src/putnam_1979_b6.lean b/lean4/src/putnam_1979_b6.lean index 31e609af..641c78d3 100644 --- a/lean4/src/putnam_1979_b6.lean +++ b/lean4/src/putnam_1979_b6.lean @@ -3,6 +3,12 @@ open BigOperators open Set Topology Filter Polynomial MeasureTheory +/-- +Let $z_i$ be complex numbers for $i = 1, 2, \dots, n$. Show that +\[ +\left \lvert \mathrm{Re} \, [(z_1^2 + z_2^2 + \dots + z_n^2)^{1/2} ] \right \rvert \leq \lvert \mathrm{Re} \, z_1 \rvert + \lvert \mathrm{Re} \, z_2 \rvert + \dots + \lvert \mathrm{Re} \, z_n \rvert. +\] +-/ theorem putnam_1979_b6 (n : ℕ) (z : Fin n → ℂ) diff --git a/lean4/src/putnam_1980_a2.lean b/lean4/src/putnam_1980_a2.lean index 085c7cd0..6f1285a6 100644 --- a/lean4/src/putnam_1980_a2.lean +++ b/lean4/src/putnam_1980_a2.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1980_a2_solution : ℕ → ℕ → ℕ := sorry -- (fun r s : ℕ => (1 + 4 * r + 6 * r ^ 2) * (1 + 4 * s + 6 * s ^ 2)) +/-- +Let $r$ and $s$ be positive integers. Derive a formula for the number of ordered quadruples $(a,b,c,d)$ of positive integers such that $3^r \cdot 7^s=\text{lcm}[a,b,c]=\text{lcm}[a,b,d]=\text{lcm}[a,c,d]=\text{lcm}[b,c,d]$. The answer should be a function of $r$ and $s$. (Note that $\text{lcm}[x,y,z]$ denotes the least common multiple of $x,y,z$.) +-/ theorem putnam_1980_a2 (r s : ℕ) (abcdlcm : ℕ → ℕ → ℕ → ℕ → Prop) diff --git a/lean4/src/putnam_1980_a3.lean b/lean4/src/putnam_1980_a3.lean index a249c0ca..894b2b79 100644 --- a/lean4/src/putnam_1980_a3.lean +++ b/lean4/src/putnam_1980_a3.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_1980_a3_solution : ℝ := sorry -- Real.pi / 4 +/-- +Evaluate $\int_0^{\pi/2}\frac{dx}{1+(\tan x)^{\sqrt{2}}}$. +-/ theorem putnam_1980_a3 : ∫ x in Set.Ioo 0 (Real.pi / 2), 1 / (1 + (Real.tan x) ^ (Real.sqrt 2)) = putnam_1980_a3_solution := sorry diff --git a/lean4/src/putnam_1980_a4.lean b/lean4/src/putnam_1980_a4.lean index eab8e92c..920781c1 100644 --- a/lean4/src/putnam_1980_a4.lean +++ b/lean4/src/putnam_1980_a4.lean @@ -1,6 +1,12 @@ import Mathlib open BigOperators +/-- +\begin{enumerate} +\item[(a)] Prove that there exist integers $a,b,c$, not all zero and each of absolute value less than one million, such that $|a+b\sqrt{2}+c\sqrt{3}|<10^{-11}$. +\item[(b)] Let $a,b,c$ be integers, not all zero and each of absolute value less than one million. Prove that $|a+b\sqrt{2}+c\sqrt{3}|>10^{-21}$. +\end{enumerate} +-/ theorem putnam_1980_a4 (abcvals : ℤ → ℤ → ℤ → Prop) (habcvals : ∀ a b c : ℤ, abcvals a b c = (¬(a = 0 ∧ b = 0 ∧ c = 0) ∧ |a| < 1000000 ∧ |b| < 1000000 ∧ |c| < 1000000)) diff --git a/lean4/src/putnam_1980_a5.lean b/lean4/src/putnam_1980_a5.lean index 78feb3bd..fd10279a 100644 --- a/lean4/src/putnam_1980_a5.lean +++ b/lean4/src/putnam_1980_a5.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $P(t)$ be a nonconstant polynomial with real coefficients. Prove that the system of simultaneous equations $0=\int_0^xP(t)\sin t\,dt=\int_0^xP(t)\cos t\,dt$ has only finitely many real solutions $x$. +-/ theorem putnam_1980_a5 (P : Polynomial ℝ) (xeqs : ℝ → Prop) diff --git a/lean4/src/putnam_1980_a6.lean b/lean4/src/putnam_1980_a6.lean index 21d13c36..30fba095 100644 --- a/lean4/src/putnam_1980_a6.lean +++ b/lean4/src/putnam_1980_a6.lean @@ -4,6 +4,9 @@ open BigOperators -- Note: uses (ℝ → ℝ) instead of (Set.Icc (0 : ℝ) 1 → ℝ) noncomputable abbrev putnam_1980_a6_solution : ℝ := sorry -- 1 / Real.exp 1 +/-- +Let $C$ be the class of all real valued continuously differentiable functions $f$ on the interval $0 \leq x \leq 1$ with $f(0)=0$ and $f(1)=1$. Determine the largest real number $u$ such that $u \leq \int_0^1|f'(x)-f(x)|\,dx$ for all $f$ in $C$. +-/ theorem putnam_1980_a6 (C : Set (ℝ → ℝ)) (uleint : ℝ → Prop) diff --git a/lean4/src/putnam_1980_b1.lean b/lean4/src/putnam_1980_b1.lean index f3a68d30..66c16c3f 100644 --- a/lean4/src/putnam_1980_b1.lean +++ b/lean4/src/putnam_1980_b1.lean @@ -5,6 +5,9 @@ open Real abbrev putnam_1980_b1_solution : Set ℝ := sorry -- {c : ℝ | c ≥ 1 / 2} +/-- +For which real numbers $c$ is $(e^x+e^{-x})/2 \leq e^{cx^2}$ for all real $x$? +-/ theorem putnam_1980_b1 (c : ℝ) : (∀ x : ℝ, (exp x + exp (-x)) / 2 ≤ exp (c * x ^ 2)) ↔ c ∈ putnam_1980_b1_solution := diff --git a/lean4/src/putnam_1980_b3.lean b/lean4/src/putnam_1980_b3.lean index 1cce986d..aff41b02 100644 --- a/lean4/src/putnam_1980_b3.lean +++ b/lean4/src/putnam_1980_b3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1980_b3_solution : Set ℝ := sorry -- {a : ℝ | a ≥ 3} +/-- +For which real numbers $a$ does the sequence defined by the initial condition $u_0=a$ and the recursion $u_{n+1}=2u_n-n^2$ have $u_n>0$ for all $n \geq 0$? (Express the answer in the simplest form.) +-/ theorem putnam_1980_b3 (a : ℝ) (u : ℕ → ℝ) diff --git a/lean4/src/putnam_1980_b4.lean b/lean4/src/putnam_1980_b4.lean index 062eedab..5931fa1a 100644 --- a/lean4/src/putnam_1980_b4.lean +++ b/lean4/src/putnam_1980_b4.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $X$ be a finite set with at least $10$ elements; for each $i \in \{0, 1, ..., 1065\}$, let $A_i \subseteq X$ satisfy $|A_i| > \frac{1}{2}|X|$. Prove that there exist $10$ elements $x_1, x_2, \dots, x_{10} \in X$ such that each $A_i$ contains at least one of $x_1, x_2, \dots, x_{10}$. +-/ theorem putnam_1980_b4 {T : Type} (X : Finset T) diff --git a/lean4/src/putnam_1980_b5.lean b/lean4/src/putnam_1980_b5.lean index 876e7fbf..618d3d6d 100644 --- a/lean4/src/putnam_1980_b5.lean +++ b/lean4/src/putnam_1980_b5.lean @@ -5,6 +5,11 @@ open Set abbrev putnam_1980_b5_solution : ℝ → Prop := sorry -- fun t : ℝ => 1 ≥ t +/-- +A function $f$ is convex on $[0, 1]$ if and only if $$f(su + (1-s)v) \le sf(u) + (1 - s)f(v)$$ for all $s \in [0, 1]$. +Let $S_t$ denote the set of all nonnegative increasing convex continuous functions $f : [0, 1] \rightarrow \mathbb{R}$ such that $$f(1) - 2f\left(\frac{2}{3}\right) + f\left(\frac{1}{3}\right) \ge t\left(f\left(\frac{2}{3}\right) - 2f\left(\frac{1}{3}\right) + f(0)\right).$$ +For which real numbers $t \ge 0$ is $S_t$ closed under multiplication? +-/ theorem putnam_1980_b5 (T : Set ℝ) (hT : T = Icc 0 1) diff --git a/lean4/src/putnam_1980_b6.lean b/lean4/src/putnam_1980_b6.lean index ad26ef5a..17e04d38 100644 --- a/lean4/src/putnam_1980_b6.lean +++ b/lean4/src/putnam_1980_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Set +/-- +For integers $d, n$ with $1 \le d \le n$, let $G(1, n) = \frac{1}{n}$ and $G(d, n) = \frac{d}{n}\sum_{i=d}^{n}G(d - 1, i - 1)$ for all $d > 1$. If $1 < d \le p$ for some prime $p$, prove that the reduced denominator of $G(d, p)$ is not divisible by $p$. +-/ theorem putnam_1980_b6 (G : ℤ × ℤ → ℚ) (hG : ∀ d n : ℕ, d ≤ n → (d = 1 → G (d, n) = 1/(n : ℚ)) ∧ (d > 1 → G (d, n) = (d/(n : ℚ))*∑ i in Finset.Icc d n, G ((d : ℤ) - 1, (i : ℤ) - 1))) diff --git a/lean4/src/putnam_1981_a1.lean b/lean4/src/putnam_1981_a1.lean index ae387c80..51a41ab8 100644 --- a/lean4/src/putnam_1981_a1.lean +++ b/lean4/src/putnam_1981_a1.lean @@ -5,6 +5,9 @@ open Topology Filter Set Polynomial Function noncomputable abbrev putnam_1981_a1_solution : ℝ := sorry -- 1/8 +/-- +Let $E(n)$ be the greatest integer $k$ such that $5^k$ divides $1^1 2^2 3^3 \cdots n^n$. Find $\lim_{n \rightarrow \infty} \frac{E(n)}{n^2}$. +-/ theorem putnam_1981_a1 (P : ℕ → ℕ → Prop) (hP : P = fun n k : ℕ => 5^k ∣ ∏ m in Finset.Icc 1 n, (m^m : ℤ)) diff --git a/lean4/src/putnam_1981_a3.lean b/lean4/src/putnam_1981_a3.lean index 1281a3c7..4bd03e02 100644 --- a/lean4/src/putnam_1981_a3.lean +++ b/lean4/src/putnam_1981_a3.lean @@ -5,6 +5,9 @@ open Topology Filter Set Polynomial Function abbrev putnam_1981_a3_solution : Prop := sorry -- False +/-- +Does the limit $$lim_{t \rightarrow \infty}e^{-t}\int_{0}^{t}\int_{0}^{t}\frac{e^x - e^y}{x - y} dx dy$$exist? +-/ theorem putnam_1981_a3 (f : ℝ → ℝ) (hf : f = fun t : ℝ => Real.exp (-t) * ∫ y in (Ico 0 t), ∫ x in (Ico 0 t), (Real.exp x - Real.exp y) / (x - y)) diff --git a/lean4/src/putnam_1981_a5.lean b/lean4/src/putnam_1981_a5.lean index 494322b0..3cbd6444 100644 --- a/lean4/src/putnam_1981_a5.lean +++ b/lean4/src/putnam_1981_a5.lean @@ -5,6 +5,10 @@ open Topology Filter Set Polynomial Function abbrev putnam_1981_a5_solution : Prop := sorry -- True +/-- +Let $P(x)$ be a polynomial with real coefficients; let $$Q(x) = (x^2 + 1)P(x)P'(x) + x((P(x))^2 + (P'(x))^2).$$ +Given that $P$ has $n$ distinct real roots all greater than $1$, prove or disprove that $Q$ must have at least $2n - 1$ distinct real roots. +-/ theorem putnam_1981_a5 (Q : Polynomial ℝ → Polynomial ℝ) (hQ : Q = fun P : Polynomial ℝ => (X^2 + 1)*P*(derivative P) + X*(P^2 + (derivative P)^2)) diff --git a/lean4/src/putnam_1981_b1.lean b/lean4/src/putnam_1981_b1.lean index f9057adf..94c2340a 100644 --- a/lean4/src/putnam_1981_b1.lean +++ b/lean4/src/putnam_1981_b1.lean @@ -5,6 +5,9 @@ open Topology Filter Set Polynomial Function abbrev putnam_1981_b1_solution : ℝ := sorry -- -1 +/-- +Find the value of $$\lim_{n \rightarrow \infty} \frac{1}{n^5}\sum_{h=1}^{n}\sum_{k=1}^{n}(5h^4 - 18h^2k^2 + 5k^4).$$ +-/ theorem putnam_1981_b1 (f : ℕ → ℝ) (hf : f = fun n : ℕ => ((1 : ℝ)/n^5) * ∑ h in Finset.Icc 1 n, ∑ k in Finset.Icc 1 n, (5*(h : ℝ)^4 - 18*h^2*k^2 + 5*k^4)) diff --git a/lean4/src/putnam_1981_b2.lean b/lean4/src/putnam_1981_b2.lean index 7b7c00e0..5da3d8f3 100644 --- a/lean4/src/putnam_1981_b2.lean +++ b/lean4/src/putnam_1981_b2.lean @@ -5,6 +5,9 @@ open Topology Filter Set Polynomial Function noncomputable abbrev putnam_1981_b2_solution : ℝ := sorry -- 12 - 8 * Real.sqrt 2 +/-- +Determine the minimum value attained by $$(r - 1)^2 + (\frac{s}{r} - 1)^2 + (\frac{t}{s} - 1)^2 + (\frac{4}{t} - 1)^2$$ across all choices of real $r$, $s$, and $t$ that satisfy $1 \le r \le s \le t \le 4$. +-/ theorem putnam_1981_b2 (P : ℝ × ℝ × ℝ → Prop) (hP : P = fun (r, s, t) => 1 ≤ r ∧ r ≤ s ∧ s ≤ t ∧ t ≤ 4) diff --git a/lean4/src/putnam_1981_b3.lean b/lean4/src/putnam_1981_b3.lean index c8e2d8b0..6d68c0a8 100644 --- a/lean4/src/putnam_1981_b3.lean +++ b/lean4/src/putnam_1981_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Set Polynomial Function +/-- +Prove that, for infinitely many positive integers $n$, all primes $p$ that divide $n^2 + 3$ also divide $k^2 + 3$ for some integer $k$ such that $k^2 < n$. +-/ theorem putnam_1981_b3 (P : ℕ → Prop) (hP : P = fun n : ℕ => ∀ p : ℕ, (Nat.Prime p ∧ p ∣ n^2 + 3) → ∃ k : ℕ, (p : ℤ) ∣ (k : ℤ)^2 + 3 ∧ k^2 < n) diff --git a/lean4/src/putnam_1981_b4.lean b/lean4/src/putnam_1981_b4.lean index 290f2efe..a5402222 100644 --- a/lean4/src/putnam_1981_b4.lean +++ b/lean4/src/putnam_1981_b4.lean @@ -5,6 +5,9 @@ open Topology Filter Set Polynomial Function abbrev putnam_1981_b4_solution : Prop := sorry -- False +/-- +Let $V$ be a set of $5$ by $7$ matrices, with real entries and with the property that $rA+sB \in V$ whenever $A,B \in V$ and $r$ and $s$ are scalars (i.e., real numbers). \emph{Prove or disprove} the following assertion: If $V$ contains matrices of ranks $0$, $1$, $2$, $4$, and $5$, then it also contains a matrix of rank $3$. [The rank of a nonzero matrix $M$ is the largest $k$ such that the entries of some $k$ rows and some $k$ columns form a $k$ by $k$ matrix with a nonzero determinant.] +-/ theorem putnam_1981_b4 (VAB : Set (Matrix (Fin 5) (Fin 7) ℝ) → Prop) (Vrank : Set (Matrix (Fin 5) (Fin 7) ℝ) → ℕ → Prop) diff --git a/lean4/src/putnam_1981_b5.lean b/lean4/src/putnam_1981_b5.lean index d562725d..06c07a57 100644 --- a/lean4/src/putnam_1981_b5.lean +++ b/lean4/src/putnam_1981_b5.lean @@ -5,6 +5,9 @@ open Topology Filter Set Polynomial Function abbrev putnam_1981_b5_solution : Prop := sorry -- True +/-- +Let $B(n)$ be the number of ones in the base two expression for the positive integer $n$. For example, $B(6)=B(110_2)=2$ and $B(15)=B(1111_2)=4$. Determine whether or not $\exp \left(\sum_{n=1}^\infty \frac{B(n)}{n(n+1)}\right)$ is a rational number. Here $\exp(x)$ denotes $e^x$. +-/ theorem putnam_1981_b5 (sumbits : List ℕ → ℤ) (B : ℕ → ℤ) diff --git a/lean4/src/putnam_1982_a2.lean b/lean4/src/putnam_1982_a2.lean index 5372175a..e2be2867 100644 --- a/lean4/src/putnam_1982_a2.lean +++ b/lean4/src/putnam_1982_a2.lean @@ -5,6 +5,9 @@ open Set Function Filter Topology Polynomial Real abbrev putnam_1982_a2_solution : Prop := sorry -- True +/-- +Let $B_n(x) = 1^x + 2^x + \dots + n^x$ and let $f(n) = \frac{B_n(\log_n 2)}{(n \log_2 n)^2}$. Does $f(2) + f(3) + f(4) + \dots$ converge? +-/ theorem putnam_1982_a2 (B : ℕ → ℝ → ℝ) (hB : B = fun (n : ℕ) (x : ℝ) ↦ ∑ k in Finset.Icc 1 n, (k : ℝ) ^ x) diff --git a/lean4/src/putnam_1982_a3.lean b/lean4/src/putnam_1982_a3.lean index 01607fae..2f7ec8f3 100644 --- a/lean4/src/putnam_1982_a3.lean +++ b/lean4/src/putnam_1982_a3.lean @@ -5,6 +5,9 @@ open Set Function Filter Topology Polynomial Real noncomputable abbrev putnam_1982_a3_solution : ℝ := sorry -- (Real.pi / 2) * log Real.pi +/-- +Evaluate $\int_0^{\infty} \frac{\tan^{-1}(\pi x) - \tan^{-1} x}{x} \, dx$. +-/ theorem putnam_1982_a3 : (Tendsto (fun t ↦ ∫ x in (0)..t, (arctan (Real.pi * x) - arctan x) / x) atTop (𝓝 putnam_1982_a3_solution)) := sorry diff --git a/lean4/src/putnam_1982_a4.lean b/lean4/src/putnam_1982_a4.lean index cc148c94..fc9b25db 100644 --- a/lean4/src/putnam_1982_a4.lean +++ b/lean4/src/putnam_1982_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Function Filter Topology +/-- +Assume that the system of simultaneous differentiable equations \[y' = -z^3, z' = y^3\] with the initial conditions $y(0) = 1, z(0) = 0$ has a unique solution $y = f(x), z = g(x)$ defined for all real $x$. Prove that there exists a positive constant $L$ such that for all real $x$, \[f(x) + L = f(x), g(x + L) = g(x).\] +-/ theorem putnam_1982_a4 (hdiffeq : (ℝ → ℝ) → (ℝ → ℝ) → Prop) (hdiffeq_def : hdiffeq = fun y z => y 0 = 1 ∧ z 0 = 0 ∧ ContDiff ℝ 1 y ∧ ContDiff ℝ 1 z ∧ (∀ x : ℝ, deriv y x = -1 * (z x)^3 ∧ deriv z x = (y x)^3)) diff --git a/lean4/src/putnam_1982_a5.lean b/lean4/src/putnam_1982_a5.lean index f4af9c14..9e1e919c 100644 --- a/lean4/src/putnam_1982_a5.lean +++ b/lean4/src/putnam_1982_a5.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $a, b, c, d$ be positive integers satisfying $a + c \leq 1982$ and $\frac{a}{b} + \frac{c}{d} < 1$. Prove that $1 - \frac{a}{b} - \frac{c}{d} > \frac{1}{1983^3}$. +-/ theorem putnam_1982_a5 (a b c d : ℤ) (hpos : a > 0 ∧ b > 0 ∧ c > 0 ∧ d > 0) diff --git a/lean4/src/putnam_1982_a6.lean b/lean4/src/putnam_1982_a6.lean index 718257e9..ba2b07af 100644 --- a/lean4/src/putnam_1982_a6.lean +++ b/lean4/src/putnam_1982_a6.lean @@ -5,6 +5,18 @@ open Set Function Filter Topology Polynomial Real abbrev putnam_1982_a6_solution : Prop := sorry -- False +/-- +Let $b$ be a bijection from the positive integers to the positive integers. Also, let $x_1, x_2, x_3, \dots$ be an infinite sequence of real numbers with the following properties: +\begin{enumerate} +\item +$|x_n|$ is a strictly decreasing function of $n$; +\item +$\lim_{n \rightarrow \infty} |b(n) - n| \cdot |x_n| = 0$; +\item +$\lim_{n \rightarrow \infty}\sum_{k = 1}^{n} x_k = 1$. +\end{enumerate} +Prove or disprove: these conditions imply that $$\lim_{n \rightarrow \infty} \sum_{k = 1}^{n} x_{b(k)} = 1.$$ +-/ theorem putnam_1982_a6 (S : Set ℕ := Ici 1) (hb : (ℕ → ℕ) → Prop) diff --git a/lean4/src/putnam_1982_b2.lean b/lean4/src/putnam_1982_b2.lean index e42e1ebd..b2978021 100644 --- a/lean4/src/putnam_1982_b2.lean +++ b/lean4/src/putnam_1982_b2.lean @@ -5,6 +5,9 @@ open Set Function Filter Topology Polynomial Real noncomputable abbrev putnam_1982_b2_solution : Polynomial ℝ := sorry -- C Real.pi * (2*X - 1)^2 +/-- +Let $A(x, y)$ denote the number of points $(m, n)$ with integer coordinates $m$ and $n$ where $m^2 + n^2 \le x^2 + y^2$. Also, let $g = \sum_{k = 0}^{\infty} e^{-k^2}$. Express the value $$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} A(x, y)e^{-x^2 - y^2} dx dy$$ as a polynomial in $g$. +-/ theorem putnam_1982_b2 (A : ℝ × ℝ → ℕ) (g I : ℝ) diff --git a/lean4/src/putnam_1982_b3.lean b/lean4/src/putnam_1982_b3.lean index 1206bc5a..32d204df 100644 --- a/lean4/src/putnam_1982_b3.lean +++ b/lean4/src/putnam_1982_b3.lean @@ -5,6 +5,9 @@ open Set Function Filter Topology Polynomial Real noncomputable abbrev putnam_1982_b3_solution : ℝ := sorry -- 4/3 * (Real.sqrt 2 - 1) +/-- +Let $p_n$ denote the probability that $c + d$ will be a perfect square if $c$ and $d$ are selected independently and uniformly at random from $\{1, 2, 3, \dots, n\}$. Express $\lim_{n \rightarrow \infty} p_n \sqrt{n}$ in the form $r(\sqrt{s} - t)$ for integers $s$ and $t$ and rational $r$. +-/ theorem putnam_1982_b3 (p : ℕ → ℝ) (hp : p = fun n : ℕ => ({(c, d) : Finset.Icc 1 n × Finset.Icc 1 n | ∃ m : ℕ, m^2 = c + d}.ncard : ℝ) / n^2) diff --git a/lean4/src/putnam_1982_b4.lean b/lean4/src/putnam_1982_b4.lean index 1de321cb..c32a4ce1 100644 --- a/lean4/src/putnam_1982_b4.lean +++ b/lean4/src/putnam_1982_b4.lean @@ -5,6 +5,15 @@ open Set Function Filter Topology Polynomial Real abbrev putnam_1982_b4_solution : Prop × Prop := sorry -- (True, True) +/-- +Let $n_1, n_2, \dots, n_s$ be distinct integers such that, for every integer $k$, $n_1n_2\cdots n_s$ divides $(n_1 + k)(n_2 + k) \cdots (n_s + k)$. Prove or provide a counterexample to the following claims: +\begin{enumerate} +\item +For some $i$, $|n_i| = 1$. +\item +If all $n_i$ are positive, then $\{n_1, n_2, \dots, n_s\} = \{1, 2, \dots, s\}$. +\end{enumerate} +-/ theorem putnam_1982_b4 (P : Finset ℤ → Prop) (P_def : ∀ n, P n ↔ n.Nonempty ∧ ∀ k, ∏ i in n, i ∣ ∏ i in n, (i + k)) : diff --git a/lean4/src/putnam_1982_b5.lean b/lean4/src/putnam_1982_b5.lean index e7825a3c..b72c2740 100644 --- a/lean4/src/putnam_1982_b5.lean +++ b/lean4/src/putnam_1982_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Filter Topology Polynomial Real +/-- +For all $x > e^e$, let $S = u_0, u_1, \dots$ be a recursively defined sequence with $u_0 = e$ and $u_{n+1} = \log_{u_n} x$ for all $n \ge 0$. Prove that $S_x$ converges to some real number $g(x)$ and that this function $g$ is continuous for $x > e^e$. +-/ theorem putnam_1982_b5 (T : Set ℝ) (hT : T = Ioi (Real.exp (Real.exp 1))) diff --git a/lean4/src/putnam_1983_a1.lean b/lean4/src/putnam_1983_a1.lean index ec4a751d..a7c44b4f 100644 --- a/lean4/src/putnam_1983_a1.lean +++ b/lean4/src/putnam_1983_a1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1983_a1_solution : ℕ := sorry -- 2301 +/-- +How many positive integers $n$ are there such that $n$ is an exact divisor of at least one of the numbers $10^{40},20^{30}$? +-/ theorem putnam_1983_a1 : {n : ℤ | n > 0 ∧ (n ∣ 10 ^ 40 ∨ n ∣ 20 ^ 30)}.encard = putnam_1983_a1_solution := sorry diff --git a/lean4/src/putnam_1983_a3.lean b/lean4/src/putnam_1983_a3.lean index 7c70ece1..b6570efc 100644 --- a/lean4/src/putnam_1983_a3.lean +++ b/lean4/src/putnam_1983_a3.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $p$ be in the set $\{3,5,7,11,\dots\}$ of odd primes and let $F(n)=1+2n+3n^2+\dots+(p-1)n^{p-2}$. Prove that if $a$ and $b$ are distinct integers in $\{0,1,2,\dots,p-1\}$ then $F(a)$ and $F(b)$ are not congruent modulo $p$, that is, $F(a)-F(b)$ is not exactly divisible by $p$. +-/ theorem putnam_1983_a3 (p : ℕ) (F : ℕ → ℕ) diff --git a/lean4/src/putnam_1983_a4.lean b/lean4/src/putnam_1983_a4.lean index 75966dd4..a1d1a691 100644 --- a/lean4/src/putnam_1983_a4.lean +++ b/lean4/src/putnam_1983_a4.lean @@ -3,6 +3,12 @@ open BigOperators open Nat +/-- +Prove that for $m = 5 \pmod 6$, +\[ +\binom{m}{2} - \binom{m}{5} + \binom{m}{8} - \binom{m}{11} + ... - \binom{m}{m-6} + \binom{m}{m-3} \neq 0. +\] +-/ theorem putnam_1983_a4 (k m : ℕ) (S : ℤ) diff --git a/lean4/src/putnam_1983_a5.lean b/lean4/src/putnam_1983_a5.lean index 4e400d8c..75218fa6 100644 --- a/lean4/src/putnam_1983_a5.lean +++ b/lean4/src/putnam_1983_a5.lean @@ -5,6 +5,9 @@ open Nat abbrev putnam_1983_a5_solution : Prop := sorry -- True +/-- +Prove or disprove that there exists a positive real number $\alpha$ such that $[\alpha_n] - n$ is even for all integers $n > 0$. (Here $[x]$ denotes the greatest integer less than or equal to $x$.) +-/ theorem putnam_1983_a5 : ((∃ α : ℝ, α > 0 ∧ ∀ n : ℕ, n > 0 → Even (⌊α ^ n⌋ - n)) ↔ putnam_1983_a5_solution) := sorry diff --git a/lean4/src/putnam_1983_a6.lean b/lean4/src/putnam_1983_a6.lean index bc681ec5..61d814a2 100644 --- a/lean4/src/putnam_1983_a6.lean +++ b/lean4/src/putnam_1983_a6.lean @@ -5,6 +5,9 @@ open Nat Filter Topology Real noncomputable abbrev putnam_1983_a6_solution : ℝ := sorry -- 2 / 9 +/-- +Let $T$ be the triangle with vertices $(0, 0)$, $(a, 0)$, and $(0, a)$. Find $\lim_{a \to \infty} a^4 \exp(-a^3) \int_T \exp(x^3+y^3) \, dx \, dy$. +-/ theorem putnam_1983_a6 (F : ℝ → ℝ) (hF : F = fun a ↦ (a ^ 4 / exp (a ^ 3)) * ∫ x in (0)..a, ∫ y in (0)..(a - x), exp (x ^ 3 + y ^ 3)) diff --git a/lean4/src/putnam_1983_b2.lean b/lean4/src/putnam_1983_b2.lean index 70efd3a3..04076aab 100644 --- a/lean4/src/putnam_1983_b2.lean +++ b/lean4/src/putnam_1983_b2.lean @@ -5,6 +5,9 @@ open Nat Filter Topology Real abbrev putnam_1983_b2_solution : Prop := sorry -- True +/-- +Let $f(n)$ be the number of ways of representing $n$ as a sum of powers of $2$ with no power being used more than $3$ times. For example, $f(7) = 4$ (the representations are $4 + 2 + 1$, $4 + 1 + 1 + 1$, $2 + 2 + 2 + 1$, $2 + 2 + 1 + 1 + 1$). Can we find a real polynomial $p(x)$ such that $f(n) = [p(n)]$, where $[u]$ denotes the greatest integer less than or equal to $u$? +-/ theorem putnam_1983_b2 (f : ℕ+ → ℕ) (hf : f = fun (n : ℕ+) ↦ {M : Multiset ℕ | (∀ m ∈ M, ∃ k : ℕ, m = (2 ^ k : ℤ)) ∧ (∀ m ∈ M, M.count m ≤ 3) ∧ (M.sum : ℤ) = n}.ncard) diff --git a/lean4/src/putnam_1983_b4.lean b/lean4/src/putnam_1983_b4.lean index 2b2183d1..cbd70e0f 100644 --- a/lean4/src/putnam_1983_b4.lean +++ b/lean4/src/putnam_1983_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Real +/-- +Let $f(n) = n + [\sqrt n]$, where $[x]$ denotes the greatest integer less than or equal to $x$. Define the sequence $a_i$ by $a_0 = m$, $a_{n+1} = f(a_n)$. Prove that it contains at least one square. +-/ theorem putnam_1983_b4 (f : ℕ → ℤ) (a : ℕ → ℕ) diff --git a/lean4/src/putnam_1983_b5.lean b/lean4/src/putnam_1983_b5.lean index 3ee179a3..3f06299d 100644 --- a/lean4/src/putnam_1983_b5.lean +++ b/lean4/src/putnam_1983_b5.lean @@ -5,6 +5,9 @@ open Nat Filter Topology Real noncomputable abbrev putnam_1983_b5_solution : ℝ := sorry -- log (4 / Real.pi) +/-- +Define $\left\lVert x \right\rVert$ as the distance from $x$ to the nearest integer. Find $\lim_{n \to \infty} \frac{1}{n} \int_{1}^{n} \left\lVert \frac{n}{x} \right\rVert \, dx$. You may assume that $\prod_{n=1}^{\infty} \frac{2n}{(2n-1)} \cdot \frac{2n}{(2n+1)} = \frac{\pi}{2}$. +-/ theorem putnam_1983_b5 (dist_fun : ℝ → ℝ) (hdist_fun : dist_fun = fun (x : ℝ) ↦ min (x - ⌊x⌋) (⌈x⌉ - x)) diff --git a/lean4/src/putnam_1983_b6.lean b/lean4/src/putnam_1983_b6.lean index d4f9d360..08743fc1 100644 --- a/lean4/src/putnam_1983_b6.lean +++ b/lean4/src/putnam_1983_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Filter Topology Real Polynomial +/-- +Let $n$ be a positive integer and let $\alpha \neq 1$ be a complex $(2n + 1)\textsuperscript{th}$ root of unity. Prove that there always exist polynomials $p(x)$, $q(x)$ with integer coefficients such that $p(\alpha)^2 + q(\alpha)^2 = -1$. +-/ theorem putnam_1983_b6 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_1984_a2.lean b/lean4/src/putnam_1984_a2.lean index f5076766..45b3027e 100644 --- a/lean4/src/putnam_1984_a2.lean +++ b/lean4/src/putnam_1984_a2.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1984_a2_solution : ℚ := sorry -- 2 +/-- +Express $\sum_{k=1}^\infty (6^k/(3^{k+1}-2^{k+1})(3^k-2^k))$ as a rational number. +-/ theorem putnam_1984_a2 : ∑' k : Set.Ici 1, (6 ^ (k : ℕ) / ((3 ^ ((k : ℕ) + 1) - 2 ^ ((k : ℕ) + 1)) * (3 ^ (k : ℕ) - 2 ^ (k : ℕ)))) = putnam_1984_a2_solution := sorry diff --git a/lean4/src/putnam_1984_a3.lean b/lean4/src/putnam_1984_a3.lean index ecae62d1..78999ef3 100644 --- a/lean4/src/putnam_1984_a3.lean +++ b/lean4/src/putnam_1984_a3.lean @@ -5,6 +5,17 @@ open Topology Filter noncomputable abbrev putnam_1984_a3_solution : MvPolynomial (Fin 3) ℝ := sorry -- (MvPolynomial.X 2) ^ 2 * ((MvPolynomial.X 0) ^ 2 - (MvPolynomial.X 1) ^ 2) +/-- +Let $n$ be a positive integer. Let $a,b,x$ be real numbers, with $a \neq b$, and let $M_n$ denote the $2n \times 2n$ matrix whose $(i,j)$ entry $m_{ij}$ is given by +\[ +m_{ij}=\begin{cases} +x & \text{if }i=j, \\ +a & \text{if }i \neq j\text{ and }i+j\text{ is even}, \\ +b & \text{if }i \neq j\text{ and }i+j\text{ is odd}. +\end{cases} +\] +Thus, for example, $M_2=\begin{pmatrix} x & b & a & b \\ b & x & b & a \\ a & b & x & b \\ b & a & b & x \end{pmatrix}$. Express $\lim_{x \to a} \det M_n/(x-a)^{2n-2}$ as a polynomial in $a$, $b$, and $n$, where $\det M_n$ denotes the determinant of $M_n$. +-/ theorem putnam_1984_a3 (n : ℕ) (a b : ℝ) diff --git a/lean4/src/putnam_1984_a5.lean b/lean4/src/putnam_1984_a5.lean index 58242ddc..09bbcd64 100644 --- a/lean4/src/putnam_1984_a5.lean +++ b/lean4/src/putnam_1984_a5.lean @@ -5,6 +5,9 @@ open Topology Filter Nat abbrev putnam_1984_a5_solution : ℕ × ℕ × ℕ × ℕ × ℕ := sorry -- (1, 9, 8, 4, 25) +/-- +Let $R$ be the region consisting of all triples $(x,y,z)$ of nonnegative real numbers satisfying $x+y+z \leq 1$. Let $w=1-x-y-z$. Express the value of the triple integral $\iiint_R x^1y^9z^8w^4\,dx\,dy\,dz$ in the form $a!b!c!d!/n!$, where $a$, $b$, $c$, $d$, and $n$ are positive integers. +-/ theorem putnam_1984_a5 (R : Set (Fin 3 → ℝ)) (w : (Fin 3 → ℝ) → ℝ) diff --git a/lean4/src/putnam_1984_a6.lean b/lean4/src/putnam_1984_a6.lean index b46d8b31..9cd8e4d6 100644 --- a/lean4/src/putnam_1984_a6.lean +++ b/lean4/src/putnam_1984_a6.lean @@ -6,6 +6,13 @@ open Topology Filter Function Nat -- Note: uses `0` to indicate not periodic. abbrev putnam_1984_a6_solution : ℕ := sorry -- 4 +/-- +Let $n$ be a positive integer, and let $f(n)$ denote the last nonzero digit in the decimal expansion of $n!$. For instance, $f(5)=2$. +\begin{enumerate} +\item[(a)] Show that if $a_1,a_2,\dots,a_k$ are \emph{distinct} nonnegative integers, then $f(5^{a_1}+5^{a_2}+\dots+5^{a_k})$ depends only on the sum $a_1+a_2+\dots+a_k$. +\item[(b)] Assuming part (a), we can define $g(s)=f(5^{a_1}+5^{a_2}+\dots+5^{a_k})$, where $s=a_1+a_2+\dots+a_k$. Find the least positive integer $p$ for which $g(s)=g(s + p)$, for all $s \geq 1$, or else show that no such $p$ exists. +\end{enumerate} +-/ theorem putnam_1984_a6 (f : ℕ → ℕ) (hf : ∀ n, some (f n) = (Nat.digits 10 (n !)).find? (fun d ↦ d ≠ 0)) diff --git a/lean4/src/putnam_1984_b1.lean b/lean4/src/putnam_1984_b1.lean index ae847aac..d90a8de4 100644 --- a/lean4/src/putnam_1984_b1.lean +++ b/lean4/src/putnam_1984_b1.lean @@ -6,6 +6,9 @@ open Topology Filter Nat -- Note: This problem may have multiple correct answers. noncomputable abbrev putnam_1984_b1_solution : Polynomial ℝ × Polynomial ℝ := sorry -- (Polynomial.X + 3, -Polynomial.X - 2) +/-- +Let $n$ be a positive integer, and define $f(n)=1!+2!+\dots+n!$. Find polynomials $P(x)$ and $Q(x)$ such that $f(n+2)=P(n)f(n+1)+Q(n)f(n)$ for all $n \geq 1$. +-/ theorem putnam_1984_b1 (f : ℕ → ℤ) (hf : ∀ n > 0, f n = ∑ i : Set.Icc 1 n, ((i)! : ℤ)) diff --git a/lean4/src/putnam_1984_b2.lean b/lean4/src/putnam_1984_b2.lean index 243b8e3d..109f71ec 100644 --- a/lean4/src/putnam_1984_b2.lean +++ b/lean4/src/putnam_1984_b2.lean @@ -5,6 +5,9 @@ open Topology Filter Nat abbrev putnam_1984_b2_solution : ℝ := sorry -- 8 +/-- +Find the minimum value of $(u-v)^2+(\sqrt{2-u^2}-\frac{9}{v})^2$ for $00$. +-/ theorem putnam_1984_b2 (f : ℝ → ℝ → ℝ) (hf : ∀ u v : ℝ, f u v = (u - v) ^ 2 + (Real.sqrt (2 - u ^ 2) - 9 / v) ^ 2) diff --git a/lean4/src/putnam_1984_b3.lean b/lean4/src/putnam_1984_b3.lean index cdde0bf3..acaaf8af 100644 --- a/lean4/src/putnam_1984_b3.lean +++ b/lean4/src/putnam_1984_b3.lean @@ -5,6 +5,13 @@ open Topology Filter Nat abbrev putnam_1984_b3_solution : Prop := sorry -- True +/-- +Prove or disprove the following statement: If $F$ is a finite set with two or more elements, then there exists a binary operation $*$ on F such that for all $x,y,z$ in $F$, +\begin{enumerate} +\item[(i)] $x*z=y*z$ implies $x=y$ (right cancellation holds), and +\item[(ii)] $x*(y*z) \neq (x*y)*z$ (\emph{no} case of associativity holds). +\end{enumerate} +-/ theorem putnam_1984_b3 : (∀ (F : Type*) (_ : Fintype F), Fintype.card F ≥ 2 → (∃ mul : F → F → F, ∀ x y z : F, (mul x z = mul y z → x = y) ∧ (mul x (mul y z) ≠ mul (mul x y) z))) ↔ putnam_1984_b3_solution := sorry diff --git a/lean4/src/putnam_1984_b5.lean b/lean4/src/putnam_1984_b5.lean index be648208..113c0a59 100644 --- a/lean4/src/putnam_1984_b5.lean +++ b/lean4/src/putnam_1984_b5.lean @@ -5,6 +5,9 @@ open Topology Filter Nat noncomputable abbrev putnam_1984_b5_solution : ℤ × Polynomial ℝ × Polynomial ℕ := sorry -- (2, (Polynomial.X * (Polynomial.X - 1)) / 2, Polynomial.X) +/-- +For each nonnegative integer $k$, let $d(k)$ denote the number of $1$'s in the binary expansion of $k$ (for example, $d(0)=0$ and $d(5)=2$). Let $m$ be a positive integer. Express $\sum_{k=0}^{2^m-1} (-1)^{d(k)}k^m$ in the form $(-1)^ma^{f(m)}(g(m))!$, where $a$ is an integer and $f$ and $g$ are polynomials. +-/ theorem putnam_1984_b5 (sumbits : List ℕ → ℕ) (d : ℕ → ℕ) diff --git a/lean4/src/putnam_1985_a1.lean b/lean4/src/putnam_1985_a1.lean index 3ae2b3fb..22d2b37e 100644 --- a/lean4/src/putnam_1985_a1.lean +++ b/lean4/src/putnam_1985_a1.lean @@ -5,6 +5,14 @@ open Set abbrev putnam_1985_a1_solution : ℕ × ℕ × ℕ × ℕ := sorry -- (10, 10, 0, 0) +/-- +Determine, with proof, the number of ordered triples $(A_1, A_2, A_3)$ of sets which have the property that +\begin{enumerate} +\item[(i)] $A_1 \cup A_2 \cup A_3 = \{1,2,3,4,5,6,7,8,9,10\}$, and +\item[(ii)] $A_1 \cap A_2 \cap A_3 = \emptyset$. +\end{enumerate} +Express your answer in the form $2^a 3^b 5^c 7^d$, where $a,b,c,d$ are nonnegative integers. +-/ theorem putnam_1985_a1 : (let (a, b, c, d) := putnam_1985_a1_solution; {(A1, A2, A3) : Set ℤ × Set ℤ × Set ℤ | A1 ∪ A2 ∪ A3 = Icc 1 10 ∧ A1 ∩ A2 ∩ A3 = ∅}.ncard = 2 ^ a * 3 ^ b * 5 ^ c * 7 ^ d) := sorry diff --git a/lean4/src/putnam_1985_a3.lean b/lean4/src/putnam_1985_a3.lean index 48a002be..0673f9cc 100644 --- a/lean4/src/putnam_1985_a3.lean +++ b/lean4/src/putnam_1985_a3.lean @@ -5,6 +5,14 @@ open Set Filter Topology Real noncomputable abbrev putnam_1985_a3_solution : ℝ → ℝ := sorry -- fun d ↦ exp d - 1 +/-- +Let $d$ be a real number. For each integer $m \geq 0$, define a sequence $\{a_m(j)\}$, $j=0,1,2,\dots$ by the condition +\begin{align*} +a_m(0) &= d/2^m, \\ +a_m(j+1) &= (a_m(j))^2 + 2a_m(j), \qquad j \geq 0. +\end{align*} +Evaluate $\lim_{n \to \infty} a_n(n)$. +-/ theorem putnam_1985_a3 (d : ℝ) (a : ℕ → ℕ → ℝ) diff --git a/lean4/src/putnam_1985_a4.lean b/lean4/src/putnam_1985_a4.lean index ce8c353e..c47e6f61 100644 --- a/lean4/src/putnam_1985_a4.lean +++ b/lean4/src/putnam_1985_a4.lean @@ -5,6 +5,9 @@ open Set Filter Topology Real abbrev putnam_1985_a4_solution : Set (Fin 100) := sorry -- {87} +/-- +Define a sequence $\{a_i\}$ by $a_1=3$ and $a_{i+1}=3^{a_i}$ for $i \geq 1$. Which integers between $00$ and $99$ inclusive occur as the last two digits in the decimal expansion of infinitely many $a_i$? +-/ theorem putnam_1985_a4 (a : ℕ → ℕ) (ha1 : a 1 = 3) diff --git a/lean4/src/putnam_1985_a5.lean b/lean4/src/putnam_1985_a5.lean index a42b4931..4d68ef82 100644 --- a/lean4/src/putnam_1985_a5.lean +++ b/lean4/src/putnam_1985_a5.lean @@ -5,6 +5,9 @@ open Set Filter Topology Real abbrev putnam_1985_a5_solution : Set ℕ := sorry -- {3, 4, 7, 8} +/-- +Let $I_m = \int_0^{2\pi} \cos(x)\cos(2x)\cdots \cos(mx)\,dx$. For which integers $m$, $1 \leq m \leq 10$ is $I_m \neq 0$? +-/ theorem putnam_1985_a5 (I : ℕ → ℝ) (hI : I = fun (m : ℕ) ↦ ∫ x in (0)..(2 * Real.pi), ∏ k in Finset.Icc 1 m, cos (k * x)) diff --git a/lean4/src/putnam_1985_a6.lean b/lean4/src/putnam_1985_a6.lean index 8645b5f7..61a1dd52 100644 --- a/lean4/src/putnam_1985_a6.lean +++ b/lean4/src/putnam_1985_a6.lean @@ -5,6 +5,18 @@ open Set Filter Topology Real Polynomial noncomputable abbrev putnam_1985_a6_solution : Polynomial ℝ := sorry -- 6 * X ^ 2 + 5 * X + 1 +/-- +If $p(x)= a_0 + a_1 x + \cdots + a_m x^m$ is a polynomial with real coefficients $a_i$, then set +\[ +\Gamma(p(x)) = a_0^2 + a_1^2 + \cdots + a_m^2. +\] +Let $F(x) = 3x^2+7x+2$. Find, with proof, a polynomial $g(x)$ with real coefficients such that +\begin{enumerate} +\item[(i)] $g(0)=1$, and +\item[(ii)] $\Gamma(f(x)^n) = \Gamma(g(x)^n)$ +\end{enumerate} +for every integer $n \geq 1$. +-/ theorem putnam_1985_a6 (Γ : Polynomial ℝ → ℝ) (hΓ : Γ = fun p ↦ ∑ k in Finset.range (p.natDegree + 1), coeff p k ^ 2) diff --git a/lean4/src/putnam_1985_b1.lean b/lean4/src/putnam_1985_b1.lean index 32295c77..c3533d52 100644 --- a/lean4/src/putnam_1985_b1.lean +++ b/lean4/src/putnam_1985_b1.lean @@ -5,6 +5,13 @@ open Set Filter Topology Real Polynomial Function abbrev putnam_1985_b1_solution : Fin 5 → ℤ := sorry -- fun i ↦ i - 2 +/-- +Let $k$ be the smallest positive integer for which there exist distinct integers $m_1, m_2, m_3, m_4, m_5$ such that the polynomial +\[ +p(x) = (x-m_1)(x-m_2)(x-m_3)(x-m_4)(x-m_5) +\] +has exactly $k$ nonzero coefficients. Find, with proof, a set of integers $m_1, m_2, m_3, m_4, m_5$ for which this minimum $k$ is achieved. +-/ theorem putnam_1985_b1 (p : (Fin 5 → ℤ) → (Polynomial ℝ)) (hp : p = fun m ↦ ∏ i : Fin 5, ((X : Polynomial ℝ) - m i)) diff --git a/lean4/src/putnam_1985_b2.lean b/lean4/src/putnam_1985_b2.lean index b92df3a2..2bef27df 100644 --- a/lean4/src/putnam_1985_b2.lean +++ b/lean4/src/putnam_1985_b2.lean @@ -5,6 +5,13 @@ open Set Filter Topology Real Polynomial Function abbrev putnam_1985_b2_solution : ℕ → ℕ := sorry -- fun n ↦ ite (n = 101) 99 0 +/-- +Define polynomials $f_n(x)$ for $n \geq 0$ by $f_0(x)=1$, $f_n(0)=0$ for $n \geq 1$, and +\[ +\frac{d}{dx} f_{n+1}(x) = (n+1)f_n(x+1) +\] +for $n \geq 0$. Find, with proof, the explicit factorization of $f_{100}(1)$ into powers of distinct primes. +-/ theorem putnam_1985_b2 (f : ℕ -> Polynomial ℕ) (hf0x : f 0 = 1) diff --git a/lean4/src/putnam_1985_b3.lean b/lean4/src/putnam_1985_b3.lean index 4a661c3c..3e397b44 100644 --- a/lean4/src/putnam_1985_b3.lean +++ b/lean4/src/putnam_1985_b3.lean @@ -3,6 +3,17 @@ open BigOperators open Set Filter Topology Real Polynomial Function +/-- +Let +\[ +\begin{array}{cccc} a_{1,1} & a_{1,2} & a_{1,3} & \dots \\ +a_{2,1} & a_{2,2} & a_{2,3} & \dots \\ +a_{3,1} & a_{3,2} & a_{3,3} & \dots \\ +\vdots & \vdots & \vdots & \ddots +\end{array} +\] +be a doubly infinite array of positive integers, and suppose each positive integer appears exactly eight times in the array. Prove that $a_{m,n} > mn$ for some pair of positive integers $(m,n)$. +-/ theorem putnam_1985_b3 (a : ℕ → ℕ → ℕ) (apos : ∀ m n : ℕ, a m n > 0) diff --git a/lean4/src/putnam_1985_b5.lean b/lean4/src/putnam_1985_b5.lean index 261c12af..b4d1cdda 100644 --- a/lean4/src/putnam_1985_b5.lean +++ b/lean4/src/putnam_1985_b5.lean @@ -5,6 +5,9 @@ open Set Filter Topology Real Polynomial Function noncomputable abbrev putnam_1985_b5_solution : ℝ := sorry -- sqrt (Real.pi / 1985) * exp (-3970) +/-- +Evaluate $\int_0^\infty t^{-1/2}e^{-1985(t+t^{-1})}\,dt$. You may assume that $\int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}$. +-/ theorem putnam_1985_b5 (fact : ∫ x in univ, exp (- x ^ 2) = sqrt (Real.pi)) : (∫ t in Set.Ioi 0, t ^ (- (1 : ℝ) / 2) * exp (-1985 * (t + t ^ (-(1 : ℝ)))) = putnam_1985_b5_solution) := diff --git a/lean4/src/putnam_1985_b6.lean b/lean4/src/putnam_1985_b6.lean index a1df0990..610f8305 100644 --- a/lean4/src/putnam_1985_b6.lean +++ b/lean4/src/putnam_1985_b6.lean @@ -3,6 +3,10 @@ open BigOperators open Set Filter Topology Real Polynomial Function +/-- +Let $G$ be a finite set of real $n\times n$ matrices $\{M_i\}$, $1 \leq i \leq r$, which form a group under matrix +multiplication. Suppose that $\sum_{i=1}^r \mathrm{tr}(M_i)=0$, where $\mathrm{tr}(A)$ denotes the trace of the matrix $A$. Prove that $\sum_{i=1}^r M_i$ is the $n \times n$ zero matrix. +-/ theorem putnam_1985_b6 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_1986_a1.lean b/lean4/src/putnam_1986_a1.lean index ec615011..aa840531 100644 --- a/lean4/src/putnam_1986_a1.lean +++ b/lean4/src/putnam_1986_a1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1986_a1_solution : ℝ := sorry -- 18 +/-- +Find, with explanation, the maximum value of $f(x)=x^3-3x$ on the set of all real numbers $x$ satisfying $x^4+36 \leq 13x^2$. +-/ theorem putnam_1986_a1 (S : Set ℝ) (hS : S = {x : ℝ | x ^ 4 + 36 ≤ 13 * x ^ 2}) diff --git a/lean4/src/putnam_1986_a2.lean b/lean4/src/putnam_1986_a2.lean index f96225fe..59b0da75 100644 --- a/lean4/src/putnam_1986_a2.lean +++ b/lean4/src/putnam_1986_a2.lean @@ -3,6 +3,12 @@ open BigOperators abbrev putnam_1986_a2_solution : ℕ := sorry -- 3 +/-- +What is the units (i.e., rightmost) digit of +\[ +\left\lfloor \frac{10^{20000}}{10^{100}+3}\right\rfloor ? +\] +-/ theorem putnam_1986_a2 : (Nat.floor ((10 ^ 20000 : ℝ) / (10 ^ 100 + 3)) % 10 = putnam_1986_a2_solution) := sorry diff --git a/lean4/src/putnam_1986_a3.lean b/lean4/src/putnam_1986_a3.lean index 852602ab..d73b2c6c 100644 --- a/lean4/src/putnam_1986_a3.lean +++ b/lean4/src/putnam_1986_a3.lean @@ -5,6 +5,9 @@ open Real noncomputable abbrev putnam_1986_a3_solution : ℝ := sorry -- Real.pi / 2 +/-- +Evaluate $\sum_{n=0}^\infty \mathrm{Arccot}(n^2+n+1)$, where $\mathrm{Arccot}\,t$ for $t \geq 0$ denotes the number $\theta$ in the interval $0 < \theta \leq \pi/2$ with $\cot \theta = t$. +-/ theorem putnam_1986_a3 (cot : ℝ → ℝ) (fcot : cot = fun θ ↦ cos θ / sin θ) diff --git a/lean4/src/putnam_1986_a4.lean b/lean4/src/putnam_1986_a4.lean index d601c84b..7616e34e 100644 --- a/lean4/src/putnam_1986_a4.lean +++ b/lean4/src/putnam_1986_a4.lean @@ -5,6 +5,25 @@ open Real Equiv abbrev putnam_1986_a4_solution : ℚ × ℚ × ℚ × ℚ × ℚ × ℚ × ℚ := sorry -- (1, 4, 2, 3, -4, 2, 1) +/-- +A \emph{transversal} of an $n\times n$ matrix $A$ consists of $n$ entries of $A$, no two in the same row or column. Let $f(n)$ be the number of $n \times n$ matrices $A$ satisfying the following two conditions: +\begin{enumerate} +\item[(a)] Each entry $\alpha_{i,j}$ of $A$ is in the set +$\{-1,0,1\}$. +\item[(b)] The sum of the $n$ entries of a transversal is the same for all transversals of $A$. +\end{enumerate} +An example of such a matrix $A$ is +\[ +A = \left( \begin{array}{ccc} -1 & 0 & -1 \\ 0 & 1 & 0 \\ 0 & 1 & 0 +\end{array} +\right). +\] +Determine with proof a formula for $f(n)$ of the form +\[ +f(n) = a_1 b_1^n + a_2 b_2^n + a_3 b_3^n + a_4, +\] +where the $a_i$'s and $b_i$'s are rational numbers. +-/ theorem putnam_1986_a4 (f : ℕ → ℕ) (hf : f = fun n ↦ {A : Matrix (Fin n) (Fin n) ℤ | (∀ i j : Fin n, A i j ∈ ({-1, 0, 1} : Set ℤ)) ∧ ∃ S : ℤ, ∀ ϕ : Perm (Fin n), ∑ i : Fin n, A i (ϕ i) = S}.ncard) diff --git a/lean4/src/putnam_1986_a5.lean b/lean4/src/putnam_1986_a5.lean index 383b2221..bce3d2e2 100644 --- a/lean4/src/putnam_1986_a5.lean +++ b/lean4/src/putnam_1986_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Real Equiv +/-- +Suppose $f_1(x),f_2(x),\dots,f_n(x)$ are functions of $n$ real variables $x=(x_1,\dots,x_n)$ with continuous second-order partial derivatives everywhere on $\mathbb{R}^n$. Suppose further that there are constants $c_{ij}$ such that $\frac{\partial f_i}{\partial x_j}-\frac{\partial f_j}{\partial x_i}=c_{ij}$ for all $i$ and $j$, $1 \leq i \leq n$, $1 \leq j \leq n$. Prove that there is a function $g(x)$ on $\mathbb{R}^n$ such that $f_i+\partial g/\partial x_i$ is linear for all $i$, $1 \leq i \leq n$. (A linear function is one of the form $a_0+a_1x_1+a_2x_2+\dots+a_nx_n$.) +-/ theorem putnam_1986_a5 (n : ℕ) (f : Fin n → ((Fin n → ℝ) → ℝ)) diff --git a/lean4/src/putnam_1986_a6.lean b/lean4/src/putnam_1986_a6.lean index 2b8a546e..f37343ec 100644 --- a/lean4/src/putnam_1986_a6.lean +++ b/lean4/src/putnam_1986_a6.lean @@ -5,6 +5,13 @@ open Real Equiv noncomputable abbrev putnam_1986_a6_solution : (ℕ → ℕ) → ℕ → ℝ := sorry -- fun b n ↦ (∏ i : Finset.Icc 1 n, b i) / Nat.factorial n +/-- +Let $a_1, a_2, \dots, a_n$ be real numbers, and let $b_1, b_2, \dots, b_n$ be distinct positive integers. Suppose that there is a polynomial $f(x)$ satisfying the identity +\[ +(1-x)^n f(x) = 1 + \sum_{i=1}^n a_i x^{b_i}. +\] +Find a simple expression (not involving any sums) for $f(1)$ in terms of $b_1, b_2, \dots, b_n$ and $n$ (but independent of $a_1, a_2, \dots, a_n$). +-/ theorem putnam_1986_a6 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_1986_b1.lean b/lean4/src/putnam_1986_b1.lean index 258b914e..e0424e17 100644 --- a/lean4/src/putnam_1986_b1.lean +++ b/lean4/src/putnam_1986_b1.lean @@ -6,6 +6,9 @@ open Real Equiv -- Note: This strays from the problem statement due to the area formulas. noncomputable abbrev putnam_1986_b1_solution : ℝ := sorry -- 2 / 5 +/-- +Inscribe a rectangle of base $b$ and height $h$ and an isosceles triangle of base $b$ (against a corresponding side of the rectangle and pointed in the other direction) in a circle of radius one. For what value of $h$ do the rectangle and triangle have the same area? +-/ theorem putnam_1986_b1 (b h : ℝ) (hbh : b > 0 ∧ h > 0 ∧ b ^ 2 + h ^ 2 = 2 ^ 2) diff --git a/lean4/src/putnam_1986_b2.lean b/lean4/src/putnam_1986_b2.lean index 24f56ccf..390bb1d4 100644 --- a/lean4/src/putnam_1986_b2.lean +++ b/lean4/src/putnam_1986_b2.lean @@ -5,6 +5,13 @@ open Real Equiv noncomputable abbrev putnam_1986_b2_solution : Finset (ℂ × ℂ × ℂ) := sorry -- {(0, 0, 0), (0, -1, 1), (1, 0, -1), (-1, 1, 0)} +/-- +Prove that there are only a finite number of possibilities for the ordered triple $T=(x-y,y-z,z-x)$, where $x,y,z$ are complex numbers satisfying the simultaneous equations +\[ +x(x-1)+2yz = y(y-1)+2zx = z(z-1)+2xy, +\] +and list all such triples $T$. +-/ theorem putnam_1986_b2 : ({T : ℂ × ℂ × ℂ | ∃ x y z : ℂ, T = (x - y, y - z, z - x) ∧ x * (x - 1) + 2 * y * z = y * (y - 1) + 2 * z * x ∧ y * (y - 1) + 2 * z * x = z * (z - 1) + 2 * x * y} = putnam_1986_b2_solution) := sorry diff --git a/lean4/src/putnam_1986_b3.lean b/lean4/src/putnam_1986_b3.lean index 75d268ad..d720fd3e 100644 --- a/lean4/src/putnam_1986_b3.lean +++ b/lean4/src/putnam_1986_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Real Equiv Polynomial +/-- +Let $\Gamma$ consist of all polynomials in $x$ with integer coefficients. For $f$ and $g$ in $\Gamma$ and $m$ a positive integer, let $f \equiv g \pmod{m}$ mean that every coefficient of $f-g$ is an integral multiple of $m$. Let $n$ and $p$ be positive integers with $p$ prime. Given that $f,g,h,r$ and $s$ are in $\Gamma$ with $rf+sg\equiv 1 \pmod{p}$ and $fg \equiv h \pmod{p}$, prove that there exist $F$ and $G$ in $\Gamma$ with $F \equiv f \pmod{p}$, $G \equiv g \pmod{p}$, and $FG \equiv h \pmod{p^n}$. +-/ theorem putnam_1986_b3 (cong : Polynomial ℤ → Polynomial ℤ → ℤ → Prop) (hcong : cong = fun f g m ↦ ∀ i : ℕ, m ∣ (f - g).coeff i) diff --git a/lean4/src/putnam_1986_b4.lean b/lean4/src/putnam_1986_b4.lean index ee4f08ca..347b5d0c 100644 --- a/lean4/src/putnam_1986_b4.lean +++ b/lean4/src/putnam_1986_b4.lean @@ -5,6 +5,9 @@ open Real Equiv Polynomial Filter Topology abbrev putnam_1986_b4_solution : Prop := sorry -- True +/-- +For a positive real number $r$, let $G(r)$ be the minimum value of $|r - \sqrt{m^2+2n^2}|$ for all integers $m$ and $n$. Prove or disprove the assertion that $\lim_{r\to \infty}G(r)$ exists and equals $0$. +-/ theorem putnam_1986_b4 (G : ℝ → ℝ) (hGeq : ∀ r : ℝ, ∃ m n : ℤ, G r = |r - sqrt (m ^ 2 + 2 * n ^ 2)|) diff --git a/lean4/src/putnam_1986_b5.lean b/lean4/src/putnam_1986_b5.lean index 9871e6a8..35f21205 100644 --- a/lean4/src/putnam_1986_b5.lean +++ b/lean4/src/putnam_1986_b5.lean @@ -5,6 +5,13 @@ open Real Equiv Polynomial Filter Topology MvPolynomial abbrev putnam_1986_b5_solution : Prop := sorry -- False +/-- +Let $f(x,y,z) = x^2+y^2+z^2+xyz$. Let $p(x,y,z), q(x,y,z)$, $r(x,y,z)$ be polynomials with real coefficients satisfying +\[ +f(p(x,y,z), q(x,y,z), r(x,y,z)) = f(x,y,z). +\] +Prove or disprove the assertion that the sequence $p,q,r$ consists of some permutation of $\pm x, \pm y, \pm z$, where the number of minus signs is $0$ or $2$. +-/ theorem putnam_1986_b5 (f : MvPolynomial (Fin 3) ℝ) (hf : f = (X 0) ^ 2 + (X 1) ^ 2 + (X 2) ^ 2 + (X 0) * (X 1) * (X 2)) diff --git a/lean4/src/putnam_1986_b6.lean b/lean4/src/putnam_1986_b6.lean index 4a604629..9a2cdc12 100644 --- a/lean4/src/putnam_1986_b6.lean +++ b/lean4/src/putnam_1986_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Real Equiv Polynomial Filter Topology MvPolynomial Matrix +/-- +Suppose $A,B,C,D$ are $n \times n$ matrices with entries in a field $F$, satisfying the conditions that $AB^T$ and $CD^T$ are symmetric and $AD^T - BC^T = I$. Here $I$ is the $n \times n$ identity matrix, and if $M$ is an $n \times n$ matrix, $M^T$ is its transpose. Prove that $A^T D - C^T B = I$. +-/ theorem putnam_1986_b6 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_1987_a1.lean b/lean4/src/putnam_1987_a1.lean index d039be71..1aeadd14 100644 --- a/lean4/src/putnam_1987_a1.lean +++ b/lean4/src/putnam_1987_a1.lean @@ -1,6 +1,16 @@ import Mathlib open BigOperators +/-- +Curves $A$, $B$, $C$, and $D$ are defined in the plane as follows: +\begin{align*} +A&=\left\{ (x,y):x^2-y^2=\frac{x}{x^2+y^2} \right\}, \\ +B&=\left\{ (x,y):2xy+\frac{y}{x^2+y^2}=3 \right\}, \\ +C&=\left\{ (x,y):x^3-3xy^2+3y=1 \right\}, \\ +D&=\left\{ (x,y):3x^2y-3x-y^3=0 \right\}. +\end{align*} +Prove that $A \cap B=C \cap D$. +-/ theorem putnam_1987_a1 (A B C D : Set (ℝ × ℝ)) (hA : A = {(x, y) : ℝ × ℝ | x ^ 2 + y ^ 2 ≠ 0 ∧ x ^ 2 - y ^ 2 = x / (x ^ 2 + y ^ 2)}) diff --git a/lean4/src/putnam_1987_a2.lean b/lean4/src/putnam_1987_a2.lean index 3d287c50..7b5924d9 100644 --- a/lean4/src/putnam_1987_a2.lean +++ b/lean4/src/putnam_1987_a2.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1987_a2_solution : ℕ := sorry -- 1984 +/-- +The sequence of digits $123456789101112131415161718192021 \dots$ is obtained by writing the positive integers in order. If the $10^n$-th digit in this sequence occurs in the part of the sequence in which the $m$-digit numbers are placed, define $f(n)$ to be $m$. For example, $f(2)=2$ because the $100$th digit enters the sequence in the placement of the two-digit integer $55$. Find, with proof, $f(1987)$. +-/ theorem putnam_1987_a2 (seqind : ℕ → ℕ) (seqsize : ℕ → ℕ) diff --git a/lean4/src/putnam_1987_a4.lean b/lean4/src/putnam_1987_a4.lean index 28cd4d76..5cd88143 100644 --- a/lean4/src/putnam_1987_a4.lean +++ b/lean4/src/putnam_1987_a4.lean @@ -5,6 +5,13 @@ open MvPolynomial Real noncomputable abbrev putnam_1987_a4_solution : ℂ := sorry -- (5 / 3) * sqrt 30 +/-- +Let $P$ be a polynomial, with real coefficients, in three variables and $F$ be a function of two variables such that +\[ +P(ux, uy, uz) = u^2 F(y-x,z-x) \quad \mbox{for all real $x,y,z,u$}, +\] +and such that $P(1,0,0)=4$, $P(0,1,0)=5$, and $P(0,0,1)=6$. Also let $A,B,C$ be complex numbers with $P(A,B,C)=0$ and $|B-A|=10$. Find $|C-A|$. +-/ theorem putnam_1987_a4 (P : MvPolynomial (Fin 3) ℂ) (hPreal : ∀ i : Fin 3 →₀ ℕ, (coeff i P).im = 0) diff --git a/lean4/src/putnam_1987_a5.lean b/lean4/src/putnam_1987_a5.lean index 5e95cbca..5fad17e1 100644 --- a/lean4/src/putnam_1987_a5.lean +++ b/lean4/src/putnam_1987_a5.lean @@ -5,6 +5,14 @@ open MvPolynomial Real abbrev putnam_1987_a5_solution : Prop := sorry -- False +/-- +Let $\vec{G}(x,y)=\left(\frac{-y}{x^2+4y^2},\frac{x}{x^2+4y^2},0\right)$. Prove or disprove that there is a vector-valued function $\vec{F}(x,y,z)=(M(x,y,z),N(x,y,z),P(x,y,z))$ with the following properties: +\begin{enumerate} +\item[(i)] $M$, $N$, $P$ have continuous partial derivatives for all $(x,y,z) \neq (0,0,0)$; +\item[(ii)] $\text{Curl}\,\vec{F}=\vec{0}$ for all $(x,y,z) \neq (0,0,0)$; +\item[(iii)] $\vec{F}(x,y,0)=\vec{G}(x,y)$. +\end{enumerate} +-/ theorem putnam_1987_a5 (vec2 : ℝ → ℝ → (Fin 2 → ℝ)) (vec3 : ℝ → ℝ → ℝ → (Fin 3 → ℝ)) diff --git a/lean4/src/putnam_1987_a6.lean b/lean4/src/putnam_1987_a6.lean index b12901f2..da2ddc88 100644 --- a/lean4/src/putnam_1987_a6.lean +++ b/lean4/src/putnam_1987_a6.lean @@ -5,6 +5,13 @@ open MvPolynomial Real Nat abbrev putnam_1987_a6_solution : Set ℝ := sorry -- {x : ℝ | x > 0 ∧ x < 25} +/-- +For each positive integer $n$, let $a(n)$ be the number of zeroes in the base $3$ representation of $n$. For which positive real numbers $x$ does the series +\[ +\sum_{n=1}^\infty \frac{x^{a(n)}}{n^3} +\] +converge? +-/ theorem putnam_1987_a6 (a : ℕ → ℕ) (ha : a = fun n ↦ {i | (digits 3 n).get i = 0}.ncard) diff --git a/lean4/src/putnam_1987_b1.lean b/lean4/src/putnam_1987_b1.lean index 9ad2c48f..c972732b 100644 --- a/lean4/src/putnam_1987_b1.lean +++ b/lean4/src/putnam_1987_b1.lean @@ -5,6 +5,12 @@ open MvPolynomial Real Nat abbrev putnam_1987_b1_solution : ℝ := sorry -- 1 +/-- +Evaluate +\[ +\int_2^4 \frac{\sqrt{\ln(9-x)}\,dx}{\sqrt{\ln(9-x)}+\sqrt{\ln(x+3)}}. +\] +-/ theorem putnam_1987_b1 : (∫ x in (2)..4, sqrt (log (9 - x)) / (sqrt (log (9 - x)) + sqrt (log (x + 3))) = putnam_1987_b1_solution) := sorry diff --git a/lean4/src/putnam_1987_b2.lean b/lean4/src/putnam_1987_b2.lean index 19e72b1a..3293659e 100644 --- a/lean4/src/putnam_1987_b2.lean +++ b/lean4/src/putnam_1987_b2.lean @@ -3,6 +3,15 @@ open BigOperators open MvPolynomial Real Nat +/-- +Let $r, s$ and $t$ be integers with $0 \leq r$, $0 \leq s$ and $r+s \leq t$. Prove that +\[ +\frac{\binom s0}{\binom tr} ++ \frac{\binom s1}{\binom{t}{r+1}} + \cdots ++ \frac{\binom ss}{\binom{t}{r+s}} += \frac{t+1}{(t+1-s)\binom{t-s}{r}}. +\] +-/ theorem putnam_1987_b2 (r s t : ℕ) (hsum : r + s ≤ t) diff --git a/lean4/src/putnam_1987_b3.lean b/lean4/src/putnam_1987_b3.lean index 411b3054..b2fff123 100644 --- a/lean4/src/putnam_1987_b3.lean +++ b/lean4/src/putnam_1987_b3.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial Real Nat +/-- +Let $F$ be a field in which $1+1 \neq 0$. Show that the set of solutions to the equation $x^2+y^2=1$ with $x$ and $y$ in $F$ is given by $(x,y)=(1,0)$ and $(x,y)=\left(\frac{r^2-1}{r^2+1},\frac{2r}{r^2+1}\right)$, where $r$ runs through the elements of $F$ such that $r^2 \neq -1$. +-/ theorem putnam_1987_b3 (F : Type*) [Field F] (hF : (1 : F) + 1 ≠ 0) diff --git a/lean4/src/putnam_1987_b4.lean b/lean4/src/putnam_1987_b4.lean index a832b29f..00f5c08d 100644 --- a/lean4/src/putnam_1987_b4.lean +++ b/lean4/src/putnam_1987_b4.lean @@ -5,6 +5,9 @@ open MvPolynomial Real Nat Filter Topology abbrev putnam_1987_b4_solution : Prop × ℝ × Prop × ℝ := sorry -- (True, -1, True, 0) +/-- +Let $(x_1,y_1) = (0.8, 0.6)$ and let $x_{n+1} = x_n \cos y_n - y_n \sin y_n$ and $y_{n+1}= x_n \sin y_n + y_n \cos y_n$ for $n=1,2,3,\dots$. For each of $\lim_{n\to \infty} x_n$ and $\lim_{n \to \infty} y_n$, prove that the limit exists and find it or prove that the limit does not exist. +-/ theorem putnam_1987_b4 (x y : ℕ → ℝ) (hxy1 : (x 1, y 1) = (0.8, 0.6)) diff --git a/lean4/src/putnam_1987_b5.lean b/lean4/src/putnam_1987_b5.lean index 65b6cd8d..b2d70ea5 100644 --- a/lean4/src/putnam_1987_b5.lean +++ b/lean4/src/putnam_1987_b5.lean @@ -3,6 +3,13 @@ open BigOperators open MvPolynomial Real Nat Filter Topology +/-- +Let $O_n$ be the $n$-dimensional vector $(0,0,\cdots, 0)$. Let $M$ be a $2n \times n$ matrix of complex numbers such that whenever $(z_1, z_2, \dots, z_{2n})M = O_n$, with complex $z_i$, not all zero, then at least one of the $z_i$ is not real. Prove that for arbitrary real numbers $r_1, r_2, \dots, r_{2n}$, there are complex numbers $w_1, w_2, \dots, w_n$ such that +\[ +\mathrm{re}\left[ M \left( \begin{array}{c} w_1 \\ \vdots \\ w_n \end{array} \right) \right] = \left( \begin{array}{c} r_1 \\ \vdots \\ r_{2n} \end{array} \right). +\] +(Note: if $C$ is a matrix of complex numbers, $\mathrm{re}(C)$ is the matrix whose entries are the real parts of the entries of $C$.) +-/ theorem putnam_1987_b5 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_1987_b6.lean b/lean4/src/putnam_1987_b6.lean index 4d1a8d63..284a006e 100644 --- a/lean4/src/putnam_1987_b6.lean +++ b/lean4/src/putnam_1987_b6.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial Real Nat Filter Topology +/-- +Let $F$ be the field of $p^2$ elements, where $p$ is an odd prime. Suppose $S$ is a set of $(p^2-1)/2$ distinct nonzero elements of $F$ with the property that for each $a\neq 0$ in $F$, exactly one of $a$ and $-a$ is in $S$. Let $N$ be the number of elements in the intersection $S \cap \{2a: a \in S\}$. Prove that $N$ is even. +-/ theorem putnam_1987_b6 (p : ℕ) (podd : Odd p ∧ Nat.Prime p) diff --git a/lean4/src/putnam_1988_a1.lean b/lean4/src/putnam_1988_a1.lean index b181ab04..70bae3fc 100644 --- a/lean4/src/putnam_1988_a1.lean +++ b/lean4/src/putnam_1988_a1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1988_a1_solution : ℝ := sorry -- 6 +/-- +Let $R$ be the region consisting of the points $(x,y)$ of the cartesian plane satisfying both $|x|-|y| \leq 1$ and $|y| \leq 1$. Find the area of $R$. +-/ theorem putnam_1988_a1 (R : Set (Fin 2 → ℝ)) (hR : R = {p : Fin 2 → ℝ | |p 0| - |p 1| ≤ 1 ∧ |p 1| ≤ 1}) diff --git a/lean4/src/putnam_1988_a2.lean b/lean4/src/putnam_1988_a2.lean index c73648e6..ac1900b8 100644 --- a/lean4/src/putnam_1988_a2.lean +++ b/lean4/src/putnam_1988_a2.lean @@ -5,6 +5,9 @@ open Set abbrev putnam_1988_a2_solution : Prop := sorry -- True +/-- +A not uncommon calculus mistake is to believe that the product rule for derivatives says that $(fg)' = f'g'$. If $f(x)=e^{x^2}$, determine, with proof, whether there exists an open interval $(a,b)$ and a nonzero function $g$ defined on $(a,b)$ such that this wrong product rule is true for $x$ in $(a,b)$. +-/ theorem putnam_1988_a2 (f : ℝ → ℝ) (hf : f = fun x ↦ Real.exp (x ^ 2)) diff --git a/lean4/src/putnam_1988_a3.lean b/lean4/src/putnam_1988_a3.lean index 8425f642..a8726e55 100644 --- a/lean4/src/putnam_1988_a3.lean +++ b/lean4/src/putnam_1988_a3.lean @@ -5,6 +5,13 @@ open Set Filter Topology abbrev putnam_1988_a3_solution : Set ℝ := sorry -- {x | x > 1 / 2} +/-- +Determine, with proof, the set of real numbers $x$ for which +\[ +\sum_{n=1}^\infty \left( \frac{1}{n} \csc \frac{1}{n} - 1 \right)^x +\] +converges. +-/ theorem putnam_1988_a3 : ({x : ℝ | ∃ L : ℝ, Tendsto (fun t ↦ ∑ n in Finset.Icc (1 : ℕ) t, (((1 / n) / Real.sin (1 / n) - 1) ^ x)) atTop (𝓝 L)} = putnam_1988_a3_solution) := sorry diff --git a/lean4/src/putnam_1988_a4.lean b/lean4/src/putnam_1988_a4.lean index 4977f451..213d8f04 100644 --- a/lean4/src/putnam_1988_a4.lean +++ b/lean4/src/putnam_1988_a4.lean @@ -5,6 +5,12 @@ open Set Filter Topology abbrev putnam_1988_a4_solution : Prop × Prop := sorry -- (True, False) +/-- +\begin{enumerate} +\item[(a)] If every point of the plane is painted one of three colors, do there necessarily exist two points of the same color exactly one inch apart? +\item[(b)] What if ``three'' is replaced by ``nine''? +\end{enumerate} +-/ theorem putnam_1988_a4 (p : ℕ → Prop) (hp : p = fun n ↦ ∀ color : (EuclideanSpace ℝ (Fin 2)) → Fin n, ∃ p q : EuclideanSpace ℝ (Fin 2), color p = color q ∧ dist p q = 1) diff --git a/lean4/src/putnam_1988_a5.lean b/lean4/src/putnam_1988_a5.lean index 9f5c2646..7d584e68 100644 --- a/lean4/src/putnam_1988_a5.lean +++ b/lean4/src/putnam_1988_a5.lean @@ -3,6 +3,17 @@ open BigOperators open Set Filter Topology +/-- +Prove that there exists a \emph{unique} function $f$ from the set $\mathrm{R}^+$ of positive real numbers to $\mathrm{R}^+$ such that +\[ +f(f(x)) = 6x-f(x) +\] +and +\[ +f(x)>0 +\] +for all $x>0$. +-/ theorem putnam_1988_a5 : (∃ f : ℝ → ℝ, (∀ x > 0, f (f x) = 6 * x - f x ∧ f x > 0) ∧ (∀ g : ℝ → ℝ, (∀ x > 0, g (g x) = 6 * x - g x ∧ g x > 0) → (∀ x > 0, f x = g x))) := sorry diff --git a/lean4/src/putnam_1988_a6.lean b/lean4/src/putnam_1988_a6.lean index 9d455add..c5b36369 100644 --- a/lean4/src/putnam_1988_a6.lean +++ b/lean4/src/putnam_1988_a6.lean @@ -5,6 +5,9 @@ open Set Filter Topology abbrev putnam_1988_a6_solution : Prop := sorry -- True +/-- +If a linear transformation $A$ on an $n$-dimensional vector space has $n+1$ eigenvectors such that any $n$ of them are linearly independent, does it follow that $A$ is a scalar multiple of the identity? Prove your answer. +-/ theorem putnam_1988_a6 : (∀ (F V : Type*) (_ : Field F) (_ : AddCommGroup V) (_ : Module F V) (_ : FiniteDimensional F V) (n : ℕ) (A : Module.End F V) (evecs : Set V), (n = FiniteDimensional.finrank F V ∧ evecs ⊆ {v : V | ∃ f : F, A.HasEigenvector f v} ∧ evecs.encard = n + 1 ∧ (∀ sevecs : Fin n → V, (Set.range sevecs ⊆ evecs ∧ (Set.range sevecs).encard = n) → LinearIndependent F sevecs)) → (∃ c : F, A = c • LinearMap.id)) ↔ putnam_1988_a6_solution := sorry diff --git a/lean4/src/putnam_1988_b1.lean b/lean4/src/putnam_1988_b1.lean index dc61e54b..1710edfa 100644 --- a/lean4/src/putnam_1988_b1.lean +++ b/lean4/src/putnam_1988_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Set Filter Topology +/-- +A \emph{composite} (positive integer) is a product $ab$ with $a$ and $b$ not necessarily distinct integers in $\{2,3,4,\dots\}$. Show that every composite is expressible as $xy+xz+yz+1$, with $x,y,z$ positive integers. +-/ theorem putnam_1988_b1 : ∀ a ≥ 2, ∀ b ≥ 2, ∃ x y z : ℤ, x > 0 ∧ y > 0 ∧ z > 0 ∧ a * b = x * y + x * z + y * z + 1 := sorry diff --git a/lean4/src/putnam_1988_b2.lean b/lean4/src/putnam_1988_b2.lean index fdab28d5..22683c57 100644 --- a/lean4/src/putnam_1988_b2.lean +++ b/lean4/src/putnam_1988_b2.lean @@ -5,6 +5,9 @@ open Set Filter Topology abbrev putnam_1988_b2_solution : Prop := sorry -- True +/-- +Prove or disprove: If $x$ and $y$ are real numbers with $y \geq 0$ and $y(y+1) \leq (x+1)^2$, then $y(y-1) \leq x^2$. +-/ theorem putnam_1988_b2 : (∀ x y : ℝ, (y ≥ 0 ∧ y * (y + 1) ≤ (x + 1) ^ 2) → (y * (y - 1) ≤ x ^ 2)) ↔ putnam_1988_b2_solution := sorry diff --git a/lean4/src/putnam_1988_b3.lean b/lean4/src/putnam_1988_b3.lean index ece4d827..b5892363 100644 --- a/lean4/src/putnam_1988_b3.lean +++ b/lean4/src/putnam_1988_b3.lean @@ -5,6 +5,9 @@ open Set Filter Topology noncomputable abbrev putnam_1988_b3_solution : ℝ := sorry -- (1 + Real.sqrt 3) / 2 +/-- +For every $n$ in the set $N=\{1,2,\dots\}$ of positive integers, let $r_n$ be the minimum value of $|c-d \sqrt{3}|$ for all nonnegative integers $c$ and $d$ with $c+d=n$. Find, with proof, the smallest positive real number $g$ with $r_n \leq g$ for all $n \in N$. +-/ theorem putnam_1988_b3 (r : ℤ → ℝ) (hr : ∀ n ≥ 1, (∃ c d : ℤ, (c ≥ 0 ∧ d ≥ 0) ∧ c + d = n ∧ r n = |c - d * Real.sqrt 3|) ∧ (∀ c d : ℤ, (c ≥ 0 ∧ d ≥ 0 ∧ c + d = n) → |c - d * Real.sqrt 3| ≥ r n)) diff --git a/lean4/src/putnam_1988_b4.lean b/lean4/src/putnam_1988_b4.lean index a910afa4..ca4c58ea 100644 --- a/lean4/src/putnam_1988_b4.lean +++ b/lean4/src/putnam_1988_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Set Filter Topology +/-- +Prove that if $\sum_{n=1}^\infty a_n$ is a convergent series of positive real numbers, then so is $\sum_{n=1}^\infty (a_n)^{n/(n+1)}$. +-/ theorem putnam_1988_b4 (a : ℕ → ℝ) (appos : (ℕ → ℝ) → Prop) diff --git a/lean4/src/putnam_1988_b5.lean b/lean4/src/putnam_1988_b5.lean index 31f2c79e..a0a3dc86 100644 --- a/lean4/src/putnam_1988_b5.lean +++ b/lean4/src/putnam_1988_b5.lean @@ -5,6 +5,13 @@ open Set Filter Topology abbrev putnam_1988_b5_solution : ℕ → ℕ := sorry -- (fun n : ℕ => 2 * n) +/-- +For positive integers $n$, let $M_n$ be the $2n+1$ by $2n+1$ skew-symmetric matrix for which each entry in the first $n$ subdiagonals below the main diagonal is $1$ and each of the remaining entries below the main diagonal is $-1$. Find, with proof, the rank of $M_n$. (According to one definition, the rank of a matrix is the largest $k$ such that there is a $k \times k$ submatrix with nonzero determinant.) One may note that +\begin{align*} +M_1&=\begin{pmatrix} 0 & -1 & 1 \\ 1 & 0 & -1 \\ -1 & 1 & 0 \end{pmatrix} \\ +M_2&=\begin{pmatrix} 0 & -1 & -1 & 1 & 1 \\ 1 & 0 & -1 & -1 & 1 \\ 1 & 1 & 0 & -1 & -1 \\ -1 & 1 & 1 & 0 & -1 \\ -1 & -1 & 1 & 1 & 0 \end{pmatrix}. +\end{align*} +-/ theorem putnam_1988_b5 (n : ℕ) (Mn : Matrix (Fin (2 * n + 1)) (Fin (2 * n + 1)) ℝ) diff --git a/lean4/src/putnam_1988_b6.lean b/lean4/src/putnam_1988_b6.lean index fd47d5a0..a8760098 100644 --- a/lean4/src/putnam_1988_b6.lean +++ b/lean4/src/putnam_1988_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Set Filter Topology +/-- +Prove that there exist an infinite number of ordered pairs $(a,b)$ of integers such that for every positive integer $t$, the number $at+b$ is a triangular number if and only if $t$ is a triangular number. (The triangular numbers are the $t_n=n(n+1)/2$ with $n$ in $\{0,1,2,\dots\}$.) +-/ theorem putnam_1988_b6 (trinums : Set ℤ) (htrinums : trinums = {t : ℤ | ∃ n : ℤ, t ≥ 0 ∧ t = (n * (n + 1)) / 2}) diff --git a/lean4/src/putnam_1989_a1.lean b/lean4/src/putnam_1989_a1.lean index 04a7c9e7..52dd78d6 100644 --- a/lean4/src/putnam_1989_a1.lean +++ b/lean4/src/putnam_1989_a1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1989_a1_solution : ℕ∞ := sorry -- 1 +/-- +How many primes among the positive integers, written as usual in base $10$, are alternating $1$'s and $0$'s, beginning and ending with $1$? +-/ theorem putnam_1989_a1 (pdigalt : List ℕ → Prop) (hpdigalt : ∀ l, pdigalt l ↔ Odd l.length ∧ (∀ i, l.get i = if Even (i : ℕ) then 1 else 0)) : diff --git a/lean4/src/putnam_1989_a2.lean b/lean4/src/putnam_1989_a2.lean index 8864a392..6ee337a7 100644 --- a/lean4/src/putnam_1989_a2.lean +++ b/lean4/src/putnam_1989_a2.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_1989_a2_solution : ℝ → ℝ → ℝ := sorry -- (fun a b : ℝ => (Real.exp (a ^ 2 * b ^ 2) - 1) / (a * b)) +/-- +Evaluate $\int_0^a \int_0^b e^{\max\{b^2x^2,a^2y^2\}}\,dy\,dx$ where $a$ and $b$ are positive. +-/ theorem putnam_1989_a2 (a b : ℝ) (abpos : a > 0 ∧ b > 0) diff --git a/lean4/src/putnam_1989_a3.lean b/lean4/src/putnam_1989_a3.lean index 787d18be..1179157e 100644 --- a/lean4/src/putnam_1989_a3.lean +++ b/lean4/src/putnam_1989_a3.lean @@ -1,6 +1,13 @@ import Mathlib open BigOperators Complex +/-- +Prove that if +\[ +11z^{10}+10iz^9+10iz-11=0, +\] +then $|z|=1.$ (Here $z$ is a complex number and $i^2=-1$.) +-/ theorem putnam_1989_a3 (z : ℂ) (hz : 11 * z ^ 10 + 10 * I * z ^ 9 + 10 * I * z - 11 = 0) diff --git a/lean4/src/putnam_1989_a6.lean b/lean4/src/putnam_1989_a6.lean index 1dfa0095..6f00a82a 100644 --- a/lean4/src/putnam_1989_a6.lean +++ b/lean4/src/putnam_1989_a6.lean @@ -3,6 +3,17 @@ open BigOperators open Nat +/-- +Let $\alpha=1+a_1x+a_2x^2+\cdots$ be a formal power series with coefficients in the field of two elements. Let +\[ +a_n = +\begin{cases} +1 & \parbox{2in}{if every block of zeros in the binary expansion of $n$ has an even number of zeros in the block} \\[.3in] +0 & \text{otherwise.} +\end{cases} +\] +(For example, $a_{36}=1$ because $36=100100_2$ and $a_{20}=0$ because $20=10100_2.$) Prove that $\alpha^3+x\alpha+1=0.$ +-/ theorem putnam_1989_a6 (F : Type*) [Field F] [Fintype F] (hF : Fintype.card F = 2) diff --git a/lean4/src/putnam_1989_b1.lean b/lean4/src/putnam_1989_b1.lean index f4d37577..293a1b7e 100644 --- a/lean4/src/putnam_1989_b1.lean +++ b/lean4/src/putnam_1989_b1.lean @@ -5,6 +5,9 @@ open Nat abbrev putnam_1989_b1_solution : ℤ × ℤ × ℤ × ℤ := sorry -- (4, 2, -5, 3) +/-- +A dart, thrown at random, hits a square target. Assuming that any two parts of the target of equal area are equally likely to be hit, find the probability that the point hit is nearer to the center than to any edge. Express your answer in the form $(a\sqrt{b}+c)/d$, where $a$, $b$, $c$, $d$ are integers and $b$, $d$ are positive. +-/ theorem putnam_1989_b1 (square : Set (EuclideanSpace ℝ (Fin 2))) (square_def : square = {p : EuclideanSpace ℝ (Fin 2) | ∀ i : Fin 2, p i ∈ Set.Icc 0 1}) diff --git a/lean4/src/putnam_1989_b2.lean b/lean4/src/putnam_1989_b2.lean index ffd993c0..34c75521 100644 --- a/lean4/src/putnam_1989_b2.lean +++ b/lean4/src/putnam_1989_b2.lean @@ -6,6 +6,9 @@ open Nat -- Note: This formalization uses "Type" rather than "Type*" as the underlying structure for a semigroup. abbrev putnam_1989_b2_solution : Prop := sorry -- True +/-- +Let $S$ be a non-empty set with an associative operation that is left and right cancellative ($xy=xz$ implies $y=z$, and $yx=zx$ implies $y=z$). Assume that for every $a$ in $S$ the set $\{a^n:\,n=1, 2, 3, \ldots\}$ is finite. Must $S$ be a group? +-/ theorem putnam_1989_b2 (pow : (S : Type) → ℕ → S → S) (hpow1 : ∀ (S : Type) (_ : Semigroup S), ∀ s : S, pow S 1 s = s) diff --git a/lean4/src/putnam_1989_b3.lean b/lean4/src/putnam_1989_b3.lean index 1cc74b28..748efad2 100644 --- a/lean4/src/putnam_1989_b3.lean +++ b/lean4/src/putnam_1989_b3.lean @@ -5,6 +5,21 @@ open Nat Filter Topology noncomputable abbrev putnam_1989_b3_solution : ℕ → ℝ → ℝ := sorry -- fun n c ↦ c * n ! / (3 ^ n * ∏ m in Finset.Icc (1 : ℤ) n, (1 - 2 ^ (-m))) +/-- +Let $f$ be a function on $[0,\infty)$, differentiable and satisfying +\[ +f'(x)=-3f(x)+6f(2x) +\] +for $x>0$. Assume that $|f(x)|\le e^{-\sqrt{x}}$ for $x\ge 0$ (so that $f(x)$ tends rapidly to $0$ as $x$ increases). For $n$ a non-negative integer, define +\[ +\mu_n=\int_0^\infty x^n f(x)\,dx +\] +(sometimes called the $n$th moment of $f$). +\begin{enumerate} +\item[a)] Express $\mu_n$ in terms of $\mu_0$. +\item[b)] Prove that the sequence $\{\mu_n \frac{3^n}{n!}\}$ always converges, and that the limit is $0$ only if $\mu_0=0$. +\end{enumerate} +-/ theorem putnam_1989_b3 (f : ℝ → ℝ) (hfdiff : Differentiable ℝ f) diff --git a/lean4/src/putnam_1989_b4.lean b/lean4/src/putnam_1989_b4.lean index b3864651..8b16bec0 100644 --- a/lean4/src/putnam_1989_b4.lean +++ b/lean4/src/putnam_1989_b4.lean @@ -5,6 +5,9 @@ open Nat Filter Topology Set abbrev putnam_1989_b4_solution : Prop := sorry -- True +/-- +Can a countably infinite set have an uncountable collection of non-empty subsets such that the intersection of any two of them is finite? +-/ theorem putnam_1989_b4 : ((∃ S : Type, Countable S ∧ Infinite S ∧ ∃ C : Set (Set S), ¬Countable C ∧ (∀ R ∈ C, R ≠ ∅) ∧ (∀ A ∈ C, ∀ B ∈ C, A ≠ B → (A ∩ B).Finite)) ↔ putnam_1989_b4_solution) := sorry diff --git a/lean4/src/putnam_1989_b6.lean b/lean4/src/putnam_1989_b6.lean index 92773b33..85d4db46 100644 --- a/lean4/src/putnam_1989_b6.lean +++ b/lean4/src/putnam_1989_b6.lean @@ -4,6 +4,9 @@ open BigOperators open Nat Filter Topology Set -- Note: uses (ℝ → ℝ) instead of (Set.Icc 0 1 → ℝ) +/-- +Let $(x_1,x_2,\dots,x_n)$ be a point chosen at random from the $n$-dimensional region defined by $0 (n)!, fun n : ℕ => 2 ^ n) +/-- +Let $T_0=2,T_1=3,T_2=6$, and for $n \geq 3$, $T_n=(n+4)T_{n-1}-4nT_{n-2}+(4n-8)T_{n-3}$. The first few terms are $2,3,6,14,40,152,784,5168,40576$. Find, with proof, a formula for $T_n$ of the form $T_n=A_n+B_n$, where $\{A_n\}$ and $\{B_n\}$ are well-known sequences. +-/ theorem putnam_1990_a1 (T : ℕ → ℤ) (hT012 : T 0 = 2 ∧ T 1 = 3 ∧ T 2 = 6) diff --git a/lean4/src/putnam_1990_a2.lean b/lean4/src/putnam_1990_a2.lean index cf907cc6..07ab2428 100644 --- a/lean4/src/putnam_1990_a2.lean +++ b/lean4/src/putnam_1990_a2.lean @@ -5,6 +5,9 @@ open Filter Topology Nat abbrev putnam_1990_a2_solution : Prop := sorry -- True +/-- +Is $\sqrt{2}$ the limit of a sequence of numbers of the form $\sqrt[3]{n}-\sqrt[3]{m}$ ($n,m=0,1,2,\dots$)? +-/ theorem putnam_1990_a2 (numform : ℝ → Prop) (hnumform : ∀ x : ℝ, numform x = ∃ n m : ℕ, x = n ^ ((1 : ℝ) / 3) - m ^ ((1 : ℝ) / 3)) diff --git a/lean4/src/putnam_1990_a4.lean b/lean4/src/putnam_1990_a4.lean index 3a8b0125..a0ea526c 100644 --- a/lean4/src/putnam_1990_a4.lean +++ b/lean4/src/putnam_1990_a4.lean @@ -5,6 +5,9 @@ open Filter Topology Nat abbrev putnam_1990_a4_solution : ℕ := sorry -- 3 +/-- +Consider a paper punch that can be centered at any point of the plane and that, when operated, removes from the plane precisely those points whose distance from the center is irrational. How many punches are needed to remove every point? +-/ theorem putnam_1990_a4 : sInf {n : ℕ | ∃ S : Set (EuclideanSpace ℝ (Fin 2)), S.encard = n ∧ ∀ Q : EuclideanSpace ℝ (Fin 2), ∃ P ∈ S, Irrational (dist P Q)} = putnam_1990_a4_solution := sorry diff --git a/lean4/src/putnam_1990_a5.lean b/lean4/src/putnam_1990_a5.lean index a1703e6a..870d469f 100644 --- a/lean4/src/putnam_1990_a5.lean +++ b/lean4/src/putnam_1990_a5.lean @@ -5,6 +5,9 @@ open Filter Topology Nat abbrev putnam_1990_a5_solution : Prop := sorry -- False +/-- +If $\mathbf{A}$ and $\mathbf{B}$ are square matrices of the same size such that $\mathbf{ABAB}=\mathbf{0}$, does it follow that $\mathbf{BABA}=\mathbf{0}$? +-/ theorem putnam_1990_a5 : (∀ n ≥ 1, ∀ A B : Matrix (Fin n) (Fin n) ℝ, A * B * A * B = 0 → B * A * B * A = 0) ↔ putnam_1990_a5_solution := sorry diff --git a/lean4/src/putnam_1990_a6.lean b/lean4/src/putnam_1990_a6.lean index e3a901bd..ff520934 100644 --- a/lean4/src/putnam_1990_a6.lean +++ b/lean4/src/putnam_1990_a6.lean @@ -5,6 +5,9 @@ open Filter Topology Nat abbrev putnam_1990_a6_solution : ℕ := sorry -- 17711 +/-- +If $X$ is a finite set, let $|X|$ denote the number of elements in $X$. Call an ordered pair $(S,T)$ of subsets of $\{1,2,\dots,n\}$ \emph{admissible} if $s>|T|$ for each $s \in S$, and $t>|S|$ for each $t \in T$. How many admissible ordered pairs of subsets of $\{1,2,\dots,10\}$ are there? Prove your answer. +-/ theorem putnam_1990_a6 : ((Finset.univ : Finset <| Finset (Set.Icc 1 10) × Finset (Set.Icc 1 10)).filter fun ⟨S, T⟩ ↦ (∀ s ∈ S, T.card < s) ∧ (∀ t ∈ T, S.card < t)).card = diff --git a/lean4/src/putnam_1990_b1.lean b/lean4/src/putnam_1990_b1.lean index 3937af33..c936b2df 100644 --- a/lean4/src/putnam_1990_b1.lean +++ b/lean4/src/putnam_1990_b1.lean @@ -5,6 +5,9 @@ open Filter Topology Nat abbrev putnam_1990_b1_solution : Set (ℝ → ℝ) := sorry -- {fun x : ℝ => (Real.sqrt 1990) * Real.exp x, fun x : ℝ => -(Real.sqrt 1990) * Real.exp x} +/-- +Find all real-valued continuously differentiable functions $f$ on the real line such that for all $x$, $(f(x))^2=\int_0^x [(f(t))^2+(f'(t))^2]\,dt+1990$. +-/ theorem putnam_1990_b1 (P : (ℝ → ℝ) → Prop) (P_def : ∀ f, P f ↔ ∀ x, diff --git a/lean4/src/putnam_1990_b2.lean b/lean4/src/putnam_1990_b2.lean index bb2b5691..212d45b0 100644 --- a/lean4/src/putnam_1990_b2.lean +++ b/lean4/src/putnam_1990_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Nat +/-- +Prove that for $|x|<1$, $|z|>1$, $1+\sum_{j=1}^\infty (1+x^j)P_j=0$, where $P_j$ is $\frac{(1-z)(1-zx)(1-zx^2) \cdots (1-zx^{j-1})}{(z-x)(z-x^2)(z-x^3) \cdots (z-x^j)}$. +-/ theorem putnam_1990_b2 (x z : ℝ) (P : ℕ → ℝ) diff --git a/lean4/src/putnam_1990_b3.lean b/lean4/src/putnam_1990_b3.lean index a7cdfa08..010ebe7e 100644 --- a/lean4/src/putnam_1990_b3.lean +++ b/lean4/src/putnam_1990_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Nat +/-- +Let $S$ be a set of $2 \times 2$ integer matrices whose entries $a_{ij}$ (1) are all squares of integers, and, (2) satisfy $a_{ij} \leq 200$. Show that if $S$ has more than $50387$ ($=15^4-15^2-15+2$) elements, then it has two elements that commute. +-/ theorem putnam_1990_b3 (S : Set (Matrix (Fin 2) (Fin 2) ℕ)) (hS : ∀ A ∈ S, ∀ i j : Fin 2, (∃ x : ℤ, A i j = x ^ 2) ∧ A i j ≤ 200) diff --git a/lean4/src/putnam_1990_b4.lean b/lean4/src/putnam_1990_b4.lean index d1beba7e..65e0b0d0 100644 --- a/lean4/src/putnam_1990_b4.lean +++ b/lean4/src/putnam_1990_b4.lean @@ -6,6 +6,13 @@ open Filter Topology Nat -- Note: uses (ℕ → G) instead of (Fin (2 * n) → G) abbrev putnam_1990_b4_solution : Prop := sorry -- True +/-- +Let $G$ be a finite group of order $n$ generated by $a$ and $b$. Prove or disprove: there is a sequence $g_1,g_2,g_3,\dots,g_{2n}$ such that +\begin{itemize} +\item[(1)] every element of $G$ occurs exactly twice, and +\item[(2)] $g_{i+1}$ equals $g_ia$ or $g_ib$ for $i=1,2,\dots,2n$. (Interpret $g_{2n+1}$ as $g_1$.) +\end{itemize} +-/ theorem putnam_1990_b4 : (∀ (G : Type*) (_ : Fintype G) (_ : Group G) (n : ℕ) (a b : G), (n = Fintype.card G ∧ G = Subgroup.closure {a, b} ∧ G ≠ Subgroup.closure {a} ∧ G ≠ Subgroup.closure {b}) → (∃ g : ℕ → G, (∀ x : G, {i : Fin (2 * n) | g i = x}.encard = 2) ∧ (∀ i : Fin (2 * n), (g ((i + 1) % (2 * n)) = g i * a) ∨ (g ((i + 1) % (2 * n)) = g i * b))) ↔ putnam_1990_b4_solution) := diff --git a/lean4/src/putnam_1990_b5.lean b/lean4/src/putnam_1990_b5.lean index 5b33a22d..40afc454 100644 --- a/lean4/src/putnam_1990_b5.lean +++ b/lean4/src/putnam_1990_b5.lean @@ -5,6 +5,9 @@ open Filter Polynomial Topology Nat abbrev putnam_1990_b5_solution : Prop := sorry -- True +/-- +Is there an infinite sequence $a_0,a_1,a_2,\dots$ of nonzero real numbers such that for $n=1,2,3,\dots$ the polynomial $p_n(x)=a_0+a_1x+a_2x^2+\cdots+a_nx^n$ has exactly $n$ distinct real roots? +-/ theorem putnam_1990_b5 : (∃ a : ℕ → ℝ, (∀ i, a i ≠ 0) ∧ (∀ n ≥ 1, (∑ i in Finset.Iic n, a i • X ^ i : Polynomial ℝ).roots.toFinset.card = n)) ↔ diff --git a/lean4/src/putnam_1991_a2.lean b/lean4/src/putnam_1991_a2.lean index 9de19d7c..b3df6ec7 100644 --- a/lean4/src/putnam_1991_a2.lean +++ b/lean4/src/putnam_1991_a2.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_1991_a2_solution : Prop := sorry -- False +/-- +Let $\mathbf{A}$ and $\mathbf{B}$ be different $n \times n$ matrices with real entries. If $\mathbf{A}^3=\mathbf{B}^3$ and $\mathbf{A}^2\mathbf{B}=\mathbf{B}^2\mathbf{A}$, can $\mathbf{A}^2+\mathbf{B}^2$ be invertible? +-/ theorem putnam_1991_a2 (n : ℕ) (npos : n ≥ 1) diff --git a/lean4/src/putnam_1991_a3.lean b/lean4/src/putnam_1991_a3.lean index 303e22c5..7026e977 100644 --- a/lean4/src/putnam_1991_a3.lean +++ b/lean4/src/putnam_1991_a3.lean @@ -6,6 +6,14 @@ open Filter Topology -- Note: uses (ℕ → ℝ) instead of (Fin n → ℝ) abbrev putnam_1991_a3_solution : Set (Polynomial ℝ) := sorry -- {p : Polynomial ℝ | p.degree = 2 ∧ (∃ r1 r2 : ℝ, r1 ≠ r2 ∧ p.eval r1 = 0 ∧ p.eval r2 = 0)} +/-- +Find all real polynomials $p(x)$ of degree $n \geq 2$ for which there exist real numbers $r_1a_2+a_3,a_2>a_3+a_4,\dots,a_{r-2}>a_{r-1}+a_r,a_{r-1}>a_r$. Let $B(n)$ denote the number of $b_1+b_2+\cdots+b_s$ which add up to $n$, with +\begin{enumerate} +\item $b_1 \geq b_2 \geq \dots \geq b_s$, +\item each $b_i$ is in the sequence $1,2,4,\dots,g_j,\dots$ defined by $g_1=1$, $g_2=2$, and $g_j=g_{j-1}+g_{j-2}+1$, and +\item if $b_1=g_k$ then every element in $\{1,2,4,\dots,g_k\}$ appears at least once as a $b_i$. +\end{enumerate} +Prove that $A(n)=B(n)$ for each $n \geq 1$. (For example, $A(7)=5$ because the relevant sums are $7,6+1,5+2,4+3,4+2+1$, and $B(7)=5$ because the relevant sums are $4+2+1,2+2+2+1,2+2+1+1+1,2+1+1+1+1+1,1+1+1+1+1+1+1$.) +-/ theorem putnam_1991_a6 (nabsum : ℕ → ℕ × (ℕ → ℕ) → Prop) (agt bge bg1 bg2 : ℕ × (ℕ → ℕ) → Prop) diff --git a/lean4/src/putnam_1991_b1.lean b/lean4/src/putnam_1991_b1.lean index 53a05b6b..b08e9e79 100644 --- a/lean4/src/putnam_1991_b1.lean +++ b/lean4/src/putnam_1991_b1.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_1991_b1_solution : Set ℤ := sorry -- {A : ℤ | ∃ x > 0, A = x ^ 2} +/-- +For each integer $n \geq 0$, let $S(n)=n-m^2$, where $m$ is the greatest integer with $m^2 \leq n$. Define a sequence $(a_k)_{k=0}^\infty$ by $a_0=A$ and $a_{k+1}=a_k+S(a_k)$ for $k \geq 0$. For what positive integers $A$ is this sequence eventually constant? +-/ theorem putnam_1991_b1 (m : ℤ → ℤ) (S : ℤ → ℤ) diff --git a/lean4/src/putnam_1991_b2.lean b/lean4/src/putnam_1991_b2.lean index 0f321fac..6a0edd44 100644 --- a/lean4/src/putnam_1991_b2.lean +++ b/lean4/src/putnam_1991_b2.lean @@ -3,6 +3,14 @@ open BigOperators open Filter Topology +/-- +Suppose $f$ and $g$ are non-constant, differentiable, real-valued functions defined on $(-\infty,\infty)$. Furthermore, suppose that for each pair of real numbers $x$ and $y$, +\begin{align*} +f(x+y)&=f(x)f(y)-g(x)g(y), \\ +g(x+y)&=f(x)g(y)+g(x)f(y). +\end{align*} +If $f'(0)=0$, prove that $(f(x))^2+(g(x))^2=1$ for all $x$. +-/ theorem putnam_1991_b2 (f g : ℝ → ℝ) (fgnconst : ¬∃ c : ℝ, f = Function.const ℝ c ∨ g = Function.const ℝ c) diff --git a/lean4/src/putnam_1991_b4.lean b/lean4/src/putnam_1991_b4.lean index cf0332c6..f7211238 100644 --- a/lean4/src/putnam_1991_b4.lean +++ b/lean4/src/putnam_1991_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology +/-- +Suppose $p$ is an odd prime. Prove that $\sum_{j=0}^p \binom{p}{j}\binom{p+j}{j} \equiv 2^p+1 \pmod{p^2}$. +-/ theorem putnam_1991_b4 (p : ℕ) (podd : Odd p) diff --git a/lean4/src/putnam_1991_b5.lean b/lean4/src/putnam_1991_b5.lean index d864022a..1c91c689 100644 --- a/lean4/src/putnam_1991_b5.lean +++ b/lean4/src/putnam_1991_b5.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_1991_b5_solution : ℕ → ℕ := sorry -- (fun p : ℕ => Nat.ceil ((p : ℝ) / 4)) +/-- +Let $p$ be an odd prime and let $\mathbb{Z}_p$ denote (the field of) integers modulo $p$. How many elements are in the set $\{x^2:x \in \mathbb{Z}_p\} \cap \{y^2+1:y \in \mathbb{Z}_p\}$? +-/ theorem putnam_1991_b5 (p : ℕ) (podd : Odd p) diff --git a/lean4/src/putnam_1991_b6.lean b/lean4/src/putnam_1991_b6.lean index b2007387..81168ca5 100644 --- a/lean4/src/putnam_1991_b6.lean +++ b/lean4/src/putnam_1991_b6.lean @@ -5,6 +5,9 @@ open Filter Topology noncomputable abbrev putnam_1991_b6_solution : ℝ → ℝ → ℝ := sorry -- (fun a b : ℝ => |Real.log (a / b)|) +/-- +Let $a$ and $b$ be positive numbers. Find the largest number $c$, in terms of $a$ and $b$, such that $a^xb^{1-x} \leq a\frac{\sinh ux}{\sinh u}+b\frac{\sinh u(1-x)}{\sinh u}$ for all $u$ with $0<|u| \leq c$ and for all $x$, $0 0) diff --git a/lean4/src/putnam_1992_a4.lean b/lean4/src/putnam_1992_a4.lean index e279476a..24d2bb18 100644 --- a/lean4/src/putnam_1992_a4.lean +++ b/lean4/src/putnam_1992_a4.lean @@ -5,6 +5,13 @@ open Topology Filter Nat Function abbrev putnam_1992_a4_solution : ℕ → ℝ := sorry -- fun k ↦ ite (Even k) ((-1) ^ (k / 2) * factorial k) 0 +/-- +Let $f$ be an infinitely differentiable real-valued function defined on the real numbers. If +\[ +f\left( \frac{1}{n} \right) = \frac{n^2}{n^2 + 1}, \qquad n = 1, 2, 3, \dots, +\] +compute the values of the derivatives $f^{(k)}(0), k = 1, 2, 3, \dots$. +-/ theorem putnam_1992_a4 (f : ℝ → ℝ) (hfdiff : ContDiff ℝ ⊤ f) diff --git a/lean4/src/putnam_1992_a5.lean b/lean4/src/putnam_1992_a5.lean index bcbb0e02..f87bb57d 100644 --- a/lean4/src/putnam_1992_a5.lean +++ b/lean4/src/putnam_1992_a5.lean @@ -3,6 +3,13 @@ open BigOperators open Topology Filter Nat Function +/-- +For each positive integer $n$, let $a_n = 0$ (or $1$) if the number of $1$'s in the binary representation of $n$ is even (or odd), respectively. Show that there do not exist positive integers $k$ and $m$ such that +\[ +a_{k+j} = a_{k+m+j} = a_{k+2m+j}, +\] +for $0 \leq j \leq m-1$. +-/ theorem putnam_1992_a5 (a : ℕ → ℕ) (ha : a = fun n ↦ ite (Even {i | (digits 2 n).get i = 1}.ncard) 0 1) diff --git a/lean4/src/putnam_1992_b1.lean b/lean4/src/putnam_1992_b1.lean index ba1ebae7..3d586807 100644 --- a/lean4/src/putnam_1992_b1.lean +++ b/lean4/src/putnam_1992_b1.lean @@ -5,6 +5,9 @@ open Topology Filter Nat Function abbrev putnam_1992_b1_solution : ℕ → ℤ := sorry -- fun n ↦ 2 * n - 3 +/-- +Let $S$ be a set of $n$ distinct real numbers. Let $A_S$ be the set of numbers that occur as averages of two distinct elements of $S$. For a given $n \geq 2$, what is the smallest possible number of elements in $A_S$? +-/ theorem putnam_1992_b1 (n : ℕ) (nge2 : n ≥ 2) diff --git a/lean4/src/putnam_1992_b2.lean b/lean4/src/putnam_1992_b2.lean index cd040d9e..00de2315 100644 --- a/lean4/src/putnam_1992_b2.lean +++ b/lean4/src/putnam_1992_b2.lean @@ -3,6 +3,13 @@ open BigOperators open Topology Filter Nat Function Polynomial +/-- +For nonnegative integers $n$ and $k$, define $Q(n, k)$ to be the coefficient of $x^k$ in the expansion of $(1 + x + x^2 + x^3)^n$. Prove that +\[ +Q(n, k) = \sum_{j=0}^k \binom{n}{j} \binom{n}{k-2j}, +\] +where $\binom{a}{b}$ is the standard binomial coefficient. (Reminder: For integers $a$ and $b$ with $a \geq 0$, $\binom{a}{b} = \frac{a!}{b!(a-b)!}$ for $0 \leq b \leq a$, with $\binom{a}{b} = 0$ otherwise.) +-/ theorem putnam_1992_b2 (Q : ℕ → ℕ → ℕ) (hQ : Q = fun n k ↦ coeff ((1 + X + X ^ 2 + X ^ 3) ^ n) k) diff --git a/lean4/src/putnam_1992_b3.lean b/lean4/src/putnam_1992_b3.lean index b0452129..ccb093e7 100644 --- a/lean4/src/putnam_1992_b3.lean +++ b/lean4/src/putnam_1992_b3.lean @@ -5,6 +5,14 @@ open Topology Filter Nat Function Polynomial noncomputable abbrev putnam_1992_b3_solution : ℝ := sorry -- 4 + Real.pi +/-- +For any pair $(x,y)$ of real numbers, a sequence $(a_n(x,y))_{n \geq 0}$ is defined as follows: +\begin{align*} +a_0(x,y)&=x, \\ +a_{n+1}(x,y)&=\frac{(a_n(x,y))^2+y^2}{2},\text{ for $n \geq 0$.} +\end{align*} +Find the area of the region $\{(x,y) \mid (a_n(x,y))_{n \geq 0}\text{ converges}\}$. +-/ theorem putnam_1992_b3 (a : (Fin 2 → ℝ) → (ℕ → ℝ)) (ha : ∀ p : Fin 2 → ℝ, (a p) 0 = p 0 ∧ (∀ n : ℕ, (a p) (n + 1) = (((a p) n) ^ 2 + (p 1) ^ 2) / 2)) diff --git a/lean4/src/putnam_1992_b4.lean b/lean4/src/putnam_1992_b4.lean index 75160820..f1f0b387 100644 --- a/lean4/src/putnam_1992_b4.lean +++ b/lean4/src/putnam_1992_b4.lean @@ -5,6 +5,13 @@ open Topology Filter Nat Function Polynomial abbrev putnam_1992_b4_solution : ℕ := sorry -- 3984 +/-- +Let $p(x)$ be a nonzero polynomial of degree less than $1992$ having no nonconstant factor in common with $x^3 - x$. Let +\[ +\frac{d^{1992}}{dx^{1992}} \left( \frac{p(x)}{x^3 - x} \right) = \frac{f(x)}{g(x)} +\] +for polynomials $f(x)$ and $g(x)$. Find the smallest possible degree of $f(x)$. +-/ theorem putnam_1992_b4 (valid : Polynomial ℝ → Prop) (hvalid : valid = fun p ↦ p ≠ 0 ∧ p.degree < 1992 ∧ IsCoprime p (X ^ 3 - X)) diff --git a/lean4/src/putnam_1992_b5.lean b/lean4/src/putnam_1992_b5.lean index 4289e0f4..5b917989 100644 --- a/lean4/src/putnam_1992_b5.lean +++ b/lean4/src/putnam_1992_b5.lean @@ -5,6 +5,22 @@ open Topology Filter Nat Function Polynomial abbrev putnam_1992_b5_solution : Prop := sorry -- False +/-- +Let $D_n$ denote the value of the $(n-1) \times (n-1)$ determinant +\[ +\left[ +\begin{array}{cccccc} +3 & 1 & 1 & 1 & \cdots & 1 \\ +1 & 4 & 1 & 1 & \cdots & 1 \\ +1 & 1 & 5 & 1 & \cdots & 1 \\ +1 & 1 & 1 & 6 & \cdots & 1 \\ +\vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ +1 & 1 & 1 & 1 & \cdots & n+1 +\end{array} +\right]. +\] +Is the set $\left\{ \frac{D_n}{n!} \right\}_{n \geq 2}$ bounded? +-/ theorem putnam_1992_b5 (D : ℕ → ℚ) (hD : D = fun (n : ℕ) ↦ Matrix.det (fun i j : Fin (n - 1) ↦ ite (i = j) ((i : ℕ) + 3 : ℚ) 1)) diff --git a/lean4/src/putnam_1992_b6.lean b/lean4/src/putnam_1992_b6.lean index af5982b4..2752a674 100644 --- a/lean4/src/putnam_1992_b6.lean +++ b/lean4/src/putnam_1992_b6.lean @@ -3,6 +3,16 @@ open BigOperators open Topology Filter Nat Function Polynomial +/-- +Let $M$ be a set of real $n \times n$ matrices such that +\begin{itemize} +\item[(i)] $I \in M$, where $I$ is the $n \times n$ identity matrix; +\item[(ii)] if $A \in M$ and $B \in M$, then either $AB \in M$ or $-AB \in M$, but not both; +\item[(iii)] if $A \in M$ and $B \in M$, then either $AB = BA$ or $AB = -BA$; +\item[(iv)] if $A \in M$ and $A \neq I$, there is at least one $B \in M$ such that $AB = -BA$. +\end{itemize} +Prove that $M$ contains at most $n^2$ matrices. +-/ theorem putnam_1992_b6 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_1993_a1.lean b/lean4/src/putnam_1993_a1.lean index a48c5a27..84705a57 100644 --- a/lean4/src/putnam_1993_a1.lean +++ b/lean4/src/putnam_1993_a1.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_1993_a1_solution : ℝ := sorry -- 4 / 9 +/-- +The horizontal line $y=c$ intersects the curve $y=2x-3x^3$ in the first quadrant as in the figure. Find $c$ so that the areas of the two shaded regions are equal. [Figure not included. The first region is bounded by the $y$-axis, the line $y=c$ and the curve; the other lies under the curve and above the line $y=c$ between their two points of intersection.] +-/ theorem putnam_1993_a1 : 0 < putnam_1993_a1_solution ∧ putnam_1993_a1_solution < (4 * Real.sqrt 2) / 9 ∧ (∫ x in Set.Ioo 0 ((Real.sqrt 2) / 3), max (putnam_1993_a1_solution - (2 * x - 3 * x ^ 3)) 0) = (∫ x in Set.Ioo 0 ((Real.sqrt 6) / 3), max ((2 * x - 3 * x ^ 3) - putnam_1993_a1_solution) 0) := sorry diff --git a/lean4/src/putnam_1993_a2.lean b/lean4/src/putnam_1993_a2.lean index 3c50b01f..ed76be07 100644 --- a/lean4/src/putnam_1993_a2.lean +++ b/lean4/src/putnam_1993_a2.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $(x_n)_{n \geq 0}$ be a sequence of nonzero real numbers such that $x_n^2-x_{n-1}x_{n+1}=1$ for $n=1,2,3,\dots$. Prove there exists a real number $a$ such that $x_{n+1}=ax_n-x_{n-1}$ for all $n \geq 1$. +-/ theorem putnam_1993_a2 (x : ℕ → ℝ) (xnonzero : ∀ n : ℕ, x n ≠ 0) diff --git a/lean4/src/putnam_1993_a3.lean b/lean4/src/putnam_1993_a3.lean index 4962d4e5..2e77f2bc 100644 --- a/lean4/src/putnam_1993_a3.lean +++ b/lean4/src/putnam_1993_a3.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $\mathcal{P}_n$ be the set of subsets of $\{1,2,\dots,n\}$. Let $c(n,m)$ be the number of functions $f:\mathcal{P}_n \to \{1,2,\dots,m\}$ such that $f(A \cap B)=\min\{f(A),f(B)\}$. Prove that $c(n,m)=\sum_{j=1}^m j^n$. +-/ theorem putnam_1993_a3 (c : ℕ → ℕ → ℕ) (hc : ∀ n ≥ 1, ∀ m ≥ 1, c n m = {f : Finset (Fin n) → Fin m | ∀ A B : Finset (Fin n), f (A ∩ B) = min (f A) (f B)}.encard) diff --git a/lean4/src/putnam_1993_a4.lean b/lean4/src/putnam_1993_a4.lean index ec392c8a..d286faa7 100644 --- a/lean4/src/putnam_1993_a4.lean +++ b/lean4/src/putnam_1993_a4.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $x_1,x_2,\dots,x_{19}$ be positive integers each of which is less than or equal to $93$. Let $y_1,y_2,\dots,y_{93}$ be positive integers each of which is less than or equal to $19$. Prove that there exists a (nonempty) sum of some $x_i$'s equal to a sum of some $y_j$'s. +-/ theorem putnam_1993_a4 (x : Fin 19 → ℤ) (y : Fin 93 → ℤ) diff --git a/lean4/src/putnam_1993_a5.lean b/lean4/src/putnam_1993_a5.lean index 69830a53..15b15d7f 100644 --- a/lean4/src/putnam_1993_a5.lean +++ b/lean4/src/putnam_1993_a5.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Show that $\int_{-100}^{-10} (\frac{x^2-x}{x^3-3x+1})^2\,dx+\int_{\frac{1}{101}}^{\frac{1}{11}} (\frac{x^2-x}{x^3-3x+1})^2\,dx+\int_{\frac{101}{100}}^{\frac{11}{10}} (\frac{x^2-x}{x^3-3x+1})^2\,dx$ is a rational number. +-/ theorem putnam_1993_a5 : ¬Irrational ((∫ x in Set.Ioo (-100) (-10), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2)) + (∫ x in Set.Ioo (1 / 101) (1 / 11), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2)) + (∫ x in Set.Ioo (101 / 100) (11 / 10), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2))) := sorry diff --git a/lean4/src/putnam_1993_a6.lean b/lean4/src/putnam_1993_a6.lean index 26224baa..f6a36277 100644 --- a/lean4/src/putnam_1993_a6.lean +++ b/lean4/src/putnam_1993_a6.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +The infinite sequence of $2$'s and $3$'s $2,3,3,2,3,3,3,2,3,3,3,2,3,3,2,3,3,3,2,3,3,3,2,3,3,3,2,3,3,2,3,3,3,2,\dots$ has the property that, if one forms a second sequence that records the number of $3$'s between successive $2$'s, the result is identical to the given sequence. Show that there exists a real number $r$ such that, for any $n$, the $n$th term of the sequence is $2$ if and only if $n=1+\lfloor rm \rfloor$ for some nonnegative integer $m$. (Note: $\lfloor x \rfloor$ denotes the largest integer less than or equal to $x$.) +-/ theorem putnam_1993_a6 (seq : ℕ → ℤ) (hseq23 : ∀ n : ℕ, seq n = 2 ∨ seq n = 3) diff --git a/lean4/src/putnam_1993_b1.lean b/lean4/src/putnam_1993_b1.lean index 3c38d7fa..81c50b16 100644 --- a/lean4/src/putnam_1993_b1.lean +++ b/lean4/src/putnam_1993_b1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1993_b1_solution : ℕ := sorry -- 3987 +/-- +Find the smallest positive integer $n$ such that for every integer $m$ with $0 0 ∧ ∀ m ∈ Set.Ioo (0 : ℤ) 1993, ∃ k : ℤ, (m / 1993 < (k : ℝ) / n) ∧ ((k : ℝ) / n < (m + 1) / 1994))) diff --git a/lean4/src/putnam_1993_b3.lean b/lean4/src/putnam_1993_b3.lean index ca0faf67..95fed668 100644 --- a/lean4/src/putnam_1993_b3.lean +++ b/lean4/src/putnam_1993_b3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1993_b3_solution : ℚ × ℚ := sorry -- (5 / 4, -1 / 4) +/-- +Two real numbers $x$ and $y$ are chosen at random in the interval $(0,1)$ with respect to the uniform distribution. What is the probability that the closest integer to $x/y$ is even? Express the answer in the form $r+s\pi$, where $r$ and $s$ are rational numbers. +-/ theorem putnam_1993_b3 (S : Set (Fin 2 → ℝ)) (hS : S = {p : Fin 2 → ℝ | 0 < p ∧ p < 1 ∧ Even (round (p 0 / p 1))}) diff --git a/lean4/src/putnam_1993_b4.lean b/lean4/src/putnam_1993_b4.lean index 179eadc8..7cdb39f0 100644 --- a/lean4/src/putnam_1993_b4.lean +++ b/lean4/src/putnam_1993_b4.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +The function $K(x,y)$ is positive and continuous for $0 \leq x \leq 1,0 \leq y \leq 1$, and the functions $f(x)$ and $g(x)$ are positive and continuous for $0 \leq x \leq 1$. Suppose that for all $x$, $0 \leq x \leq 1$, $\int_0^1 f(y)K(x,y)\,dy=g(x)$ and $\int_0^1 g(y)K(x,y)\,dy=f(x)$. Show that $f(x)=g(x)$ for $0 \leq x \leq 1$. +-/ theorem putnam_1993_b4 (K : ℝ × ℝ → ℝ) (f g : ℝ → ℝ) diff --git a/lean4/src/putnam_1993_b5.lean b/lean4/src/putnam_1993_b5.lean index f41cc6cc..bbc4a71b 100644 --- a/lean4/src/putnam_1993_b5.lean +++ b/lean4/src/putnam_1993_b5.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Show there do not exist four points in the Euclidean plane such that the pairwise distances between the points are all odd integers. +-/ theorem putnam_1993_b5 (pdists : (Fin 4 → (EuclideanSpace ℝ (Fin 2))) → Prop) (hpdists: ∀ p : Fin 4 → (EuclideanSpace ℝ (Fin 2)), pdists p = ∀ i j : Fin 4, i ≠ j → (dist (p i) (p j) = round (dist (p i) (p j)) ∧ Odd (round (dist (p i) (p j))))) diff --git a/lean4/src/putnam_1993_b6.lean b/lean4/src/putnam_1993_b6.lean index 7fe0bf4e..b46c7a59 100644 --- a/lean4/src/putnam_1993_b6.lean +++ b/lean4/src/putnam_1993_b6.lean @@ -2,6 +2,9 @@ import Mathlib open BigOperators -- Note: uses (ℕ → (Fin 3 → ℕ)) instead of (Fin (N + 1) → (Fin 3 → ℕ)) +/-- +Let $S$ be a set of three, not necessarily distinct, positive integers. Show that one can transform $S$ into a set containing $0$ by a finite number of applications of the following rule: Select two of the three integers, say $x$ and $y$, where $x \leq y$ and replace them with $2x$ and $y-x$. +-/ theorem putnam_1993_b6 (S : Fin 3 → ℕ) (f : Fin 3 → Fin 3 → (Fin 3 → ℕ) → (Fin 3 → ℕ)) diff --git a/lean4/src/putnam_1994_a1.lean b/lean4/src/putnam_1994_a1.lean index 144d76cc..99884791 100644 --- a/lean4/src/putnam_1994_a1.lean +++ b/lean4/src/putnam_1994_a1.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology +/-- +Suppose that a sequence $a_1,a_2,a_3,\dots$ satisfies $0f(x)$ for all $x$, there is some number $N$ such that $f(x)>e^{kx}$ for all $x>N$. +-/ theorem putnam_1994_b3 (k : ℝ) (allfexN : Prop) diff --git a/lean4/src/putnam_1994_b4.lean b/lean4/src/putnam_1994_b4.lean index b67196f6..86448a61 100644 --- a/lean4/src/putnam_1994_b4.lean +++ b/lean4/src/putnam_1994_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology +/-- +For $n \geq 1$, let $d_n$ be the greatest common divisor of the entries of $A^n-I$, where $A=\begin{pmatrix} 3 & 2 \\ 4 & 3 \end{pmatrix}$ and $I=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$. Show that $\lim_{n \to \infty} d_n=\infty$. +-/ theorem putnam_1994_b4 (matgcd : Matrix (Fin 2) (Fin 2) ℤ → ℤ) (A : Matrix (Fin 2) (Fin 2) ℤ) diff --git a/lean4/src/putnam_1994_b5.lean b/lean4/src/putnam_1994_b5.lean index 6859bb12..5b98038d 100644 --- a/lean4/src/putnam_1994_b5.lean +++ b/lean4/src/putnam_1994_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology +/-- +For any real number $\alpha$, define the function $f_\alpha(x)=\lfloor \alpha x \rfloor$. Let $n$ be a positive integer. Show that there exists an $\alpha$ such that for $1 \leq k \leq n$, $f_\alpha^k(n^2)=n^2-k=f_{\alpha^k}(n^2)$. +-/ theorem putnam_1994_b5 (f : ℝ → ℤ → ℤ) (n : ℕ) diff --git a/lean4/src/putnam_1994_b6.lean b/lean4/src/putnam_1994_b6.lean index 36e6b24a..ee28f4c3 100644 --- a/lean4/src/putnam_1994_b6.lean +++ b/lean4/src/putnam_1994_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology +/-- +For any integer $a$, set $n_a=101a-100 \cdot 2^a$. Show that for $0 \leq a,b,c,d \leq 99$, $n_a+n_b \equiv n_c+n_d \pmod{10100}$ implies $\{a,b\}=\{c,d\}$. +-/ theorem putnam_1994_b6 (n : ℕ → ℤ) (hn : ∀ a : ℕ, n a = 101 * a - 100 * 2 ^ a) diff --git a/lean4/src/putnam_1995_a1.lean b/lean4/src/putnam_1995_a1.lean index d8aefa6c..f3ae5114 100644 --- a/lean4/src/putnam_1995_a1.lean +++ b/lean4/src/putnam_1995_a1.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $S$ be a set of real numbers which is closed under multiplication (that is, if $a$ and $b$ are in $S$, then so is $ab$). Let $T$ and $U$ be disjoint subsets of $S$ whose union is $S$. Given that the product of any {\em three} (not necessarily distinct) elements of $T$ is in $T$ and that the product of any three elements of $U$ is in $U$, show that at least one of the two subsets $T,U$ is closed under multiplication. +-/ theorem putnam_1995_a1 (S : Set ℝ) (hS : ∀ a ∈ S, ∀ b ∈ S, a * b ∈ S) diff --git a/lean4/src/putnam_1995_a2.lean b/lean4/src/putnam_1995_a2.lean index 68dd9678..974af32a 100644 --- a/lean4/src/putnam_1995_a2.lean +++ b/lean4/src/putnam_1995_a2.lean @@ -5,6 +5,9 @@ open Filter Topology Real abbrev putnam_1995_a2_solution : Set (ℝ × ℝ) := sorry -- {x | let ⟨a,b⟩ := x; a = b} +/-- +For what pairs $(a,b)$ of positive real numbers does the improper integral \[ \int_{b}^{\infty} \left( \sqrt{\sqrt{x+a}-\sqrt{x}} - \sqrt{\sqrt{x}-\sqrt{x-b}} \right)\,dx \] converge? +-/ theorem putnam_1995_a2 (habconv : (ℝ × ℝ) → Prop) (habconv_def : habconv = fun ⟨a,b⟩ => diff --git a/lean4/src/putnam_1995_a3.lean b/lean4/src/putnam_1995_a3.lean index cc511426..dae507d2 100644 --- a/lean4/src/putnam_1995_a3.lean +++ b/lean4/src/putnam_1995_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Real +/-- +The number $d_{1}d_{2}\dots d_{9}$ has nine (not necessarily distinct) decimal digits. The number $e_{1}e_{2}\dots e_{9}$ is such that each of the nine 9-digit numbers formed by replacing just one of the digits $d_{i}$ is $d_{1}d_{2}\dots d_{9}$ by the corresponding digit $e_{i}$ ($1 \leq i \leq 9$) is divisible by 7. The number $f_{1}f_{2}\dots f_{9}$ is related to $e_{1}e_{2}\dots e_{9}$ is the same way: that is, each of the nine numbers formed by replacing one of the $e_{i}$ by the corresponding $f_{i}$ is divisible by 7. Show that, for each $i$, $d_{i}-f_{i}$ is divisible by 7. [For example, if $d_{1}d_{2}\dots d_{9} = 199501996$, then $e_{6}$ may be 2 or 9, since $199502996$ and $199509996$ are multiples of 7.] +-/ theorem putnam_1995_a3 (relation : (Fin 9 → ℤ) → (Fin 9 → ℤ) → Prop) (digits_to_num : (Fin 9 → ℤ) → ℤ) diff --git a/lean4/src/putnam_1995_a4.lean b/lean4/src/putnam_1995_a4.lean index 801e1fff..73f28113 100644 --- a/lean4/src/putnam_1995_a4.lean +++ b/lean4/src/putnam_1995_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Real +/-- +Suppose we have a necklace of $n$ beads. Each bead is labeled with an integer and the sum of all these labels is $n-1$. Prove that we can cut the necklace to form a string whose consecutive labels $x_{1},x\_{2},\dots,x_{n}$ satisfy \[\sum_{i=1}^{k} x_{i} \leq k-1 \qquad \mbox{for} \quad k=1,2,\dots,n.\] +-/ theorem putnam_1995_a4 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_1995_a5.lean b/lean4/src/putnam_1995_a5.lean index 28c8c6b1..05461ff2 100644 --- a/lean4/src/putnam_1995_a5.lean +++ b/lean4/src/putnam_1995_a5.lean @@ -5,6 +5,9 @@ open Filter Topology Real abbrev putnam_1995_a5_solution : Prop := sorry -- True +/-- +Let $x_{1},x_{2},\dots,x_{n}$ be differentiable (real-valued) functions of a single variable $f$ which satisfy \begin{align*} \frac{dx_{1}}{dt} &= a_{11}x_{1} + a_{12}x_{2} + \cdots + a_{1n}x_{n} \ \frac{dx_{2}}{dt} &= a_{21}x_{1} + a_{22}x_{2} + \cdots + a_{2n}x_{n} \ \vdots && \vdots \ \frac{dx_{n}}{dt} &= a_{n1}x_{1} + a_{n2}x_{2} + \cdots + a_{nn}x_{n} \end{align*} for some constants $a_{ij}>0$. Suppose that for all $i$, $x_{i}(t) \to 0$ as $t \to \infty$. Are the functions $x_{1},x_{2},\dots,x_{n}$ necessarily linearly dependent? +-/ theorem putnam_1995_a5 (hdiffx : (n : ℕ) → (Fin n → (ℝ → ℝ)) → Prop) (ha : (n : ℕ) → (Fin n → Fin n → ℝ) → Prop) diff --git a/lean4/src/putnam_1995_a6.lean b/lean4/src/putnam_1995_a6.lean index cdcb7513..73f181bb 100644 --- a/lean4/src/putnam_1995_a6.lean +++ b/lean4/src/putnam_1995_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Real +/-- +Suppose that each of $n$ people writes down the numbers $1,2,3$ in random order in one column of a $3 \times n$ matrix, with all orders equally likely and with the orders for different columns independent of each other. Let the row sums $a,b,c$ of the resulting matrix be rearranged (if necessary) so that $a \leq b \leq c$. Show that for some $n \geq 1995$, it is at least four times as likely that both $b=a+1$ and $c=a+2$ as that $a=b=c$. +-/ theorem putnam_1995_a6 (SM : (n : ℕ) → Set (Matrix (Fin 3) (Fin n) ℤ)) (hSM : SM = (fun n : ℕ => {M : Matrix (Fin 3) (Fin n) ℤ | ∀ j : Fin n, {M i j | i : Fin 3} = {1, 2, 3}})) diff --git a/lean4/src/putnam_1995_b1.lean b/lean4/src/putnam_1995_b1.lean index 542e367e..1cdde8c7 100644 --- a/lean4/src/putnam_1995_b1.lean +++ b/lean4/src/putnam_1995_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Real Nat +/-- +For a partition $\pi$ of $\{1, 2, 3, 4, 5, 6, 7, 8, 9\}$, let $\pi(x)$ be the number of elements in the part containing $x$. Prove that for any two partitions $\pi$ and $\pi'$, there are two distinct numbers $x$ and $y$ in $\{1, 2, 3, 4, 5, 6, 7, 8, 9\}$ such that $\pi(x) = \pi(y)$ and $\pi'(x) = \pi'(y)$. [A {\em partition} of a set $S$ is a collection of disjoint subsets (parts) whose union is $S$.] +-/ theorem putnam_1995_b1 (part_ct : Finpartition (Finset.range 9) → (Finset.range 9) → ℕ) (hp : ∀ partition k, part_ct partition k = (Exists.choose (Finpartition.exists_mem partition k.2)).card) diff --git a/lean4/src/putnam_1995_b3.lean b/lean4/src/putnam_1995_b3.lean index e21ee920..f4936ab5 100644 --- a/lean4/src/putnam_1995_b3.lean +++ b/lean4/src/putnam_1995_b3.lean @@ -6,6 +6,9 @@ open Filter Topology Real Nat -- Note: Boosted the domain/range of digits_set to ℕ because of membership problems in Finset.range 10 abbrev putnam_1995_b3_solution : ℕ → ℤ := sorry -- fun n => if n = 1 then 45 else if n = 2 then 10 * 45^2 else 0 +/-- +To each positive integer with $n^{2}$ decimal digits, we associate the determinant of the matrix obtained by writing the digits in order across the rows. For example, for $n=2$, to the integer 8617 we associate $\det \left( \begin{array}{cc} 8 & 6 \ 1 & 7 \end{array} \right) = 50$. Find, as a function of $n$, the sum of all the determinants associated with $n^{2}$-digit integers. (Leading digits are assumed to be nonzero; for example, for $n=2$, there are 9000 determinants.) +-/ theorem putnam_1995_b3 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_1995_b4.lean b/lean4/src/putnam_1995_b4.lean index 14e61c50..e2405d83 100644 --- a/lean4/src/putnam_1995_b4.lean +++ b/lean4/src/putnam_1995_b4.lean @@ -5,6 +5,9 @@ open Filter Topology Real Nat abbrev putnam_1995_b4_solution : ℤ × ℤ × ℤ × ℤ := sorry -- ⟨3,1,5,2⟩ +/-- +Evaluate \[ \sqrt[8]{2207 - \frac{1}{2207-\frac{1}{2207-\dots}}}. \] Express your answer in the form $\frac{a+b\sqrt{c}}{d}$, where $a,b,c,d$ are integers. +-/ theorem putnam_1995_b4 (contfrac : ℝ) (hcontfrac : contfrac = 2207 - 1 / contfrac) diff --git a/lean4/src/putnam_1995_b6.lean b/lean4/src/putnam_1995_b6.lean index b45dc15b..2e6846f7 100644 --- a/lean4/src/putnam_1995_b6.lean +++ b/lean4/src/putnam_1995_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Real Nat +/-- +For a positive real number $\alpha$, define \[ S(\alpha) = \{ \lfloor n\alpha \rfloor : n = 1,2,3,\dots \}. \] Prove that $\{1,2,3,\dots\}$ cannot be expressed as the disjoint union of three sets $S(\alpha), S(\beta)$ and $S(\gamma)$. [As usual, $\lfloor x \rfloor$ is the greatest integer $\leq x$.] +-/ theorem putnam_1995_b6 (S : ℝ → Set ℕ) (hS : S = fun (α : ℝ) => {x : ℕ | ∃ n : ℕ, n ≥ 1 ∧ x = floor (n * α)}) diff --git a/lean4/src/putnam_1996_a2.lean b/lean4/src/putnam_1996_a2.lean index 30db1cc4..d5ec02fc 100644 --- a/lean4/src/putnam_1996_a2.lean +++ b/lean4/src/putnam_1996_a2.lean @@ -5,6 +5,9 @@ open Metric abbrev putnam_1996_a2_solution : (EuclideanSpace ℝ (Fin 2)) → (EuclideanSpace ℝ (Fin 2)) → Set (EuclideanSpace ℝ (Fin 2)) := sorry -- (fun O1 O2 : EuclideanSpace ℝ (Fin 2) => {p : EuclideanSpace ℝ (Fin 2) | dist p (midpoint ℝ O1 O2) ≥ 1 ∧ dist p (midpoint ℝ O1 O2) ≤ 2}) +/-- +Let $C_1$ and $C_2$ be circles whose centers are $10$ units apart, and whose radii are $1$ and $3$. Find, with proof, the locus of all points $M$ for which there exist points $X$ on $C_1$ and $Y$ on $C_2$ such that $M$ is the midpoint of the line segment $XY$. +-/ theorem putnam_1996_a2 (O1 O2 : EuclideanSpace ℝ (Fin 2)) (C1 C2 : Set (EuclideanSpace ℝ (Fin 2))) diff --git a/lean4/src/putnam_1996_a3.lean b/lean4/src/putnam_1996_a3.lean index 14a7b4f0..b129349d 100644 --- a/lean4/src/putnam_1996_a3.lean +++ b/lean4/src/putnam_1996_a3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_1996_a3_solution : Prop := sorry -- False +/-- +Suppose that each of 20 students has made a choice of anywhere from 0 to 6 courses from a total of 6 courses offered. Prove or disprove: there are 5 students and 2 courses such that all 5 have chosen both courses or all 5 have chosen neither course. +-/ theorem putnam_1996_a3 : (∀ choices : Fin 20 → Set (Fin 6), ∃ (students : Finset (Fin 20)) (courses : Finset (Fin 6)), diff --git a/lean4/src/putnam_1996_a4.lean b/lean4/src/putnam_1996_a4.lean index 30782f65..c3771b9e 100644 --- a/lean4/src/putnam_1996_a4.lean +++ b/lean4/src/putnam_1996_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Function +/-- +Let $S$ be the set of ordered triples $(a, b, c)$ of distinct elements of a finite set $A$. Suppose that \begin{enumerate} \item $(a,b,c) \in S$ if and only if $(b,c,a) \in S$; \item $(a,b,c) \in S$ if and only if $(c,b,a) \notin S$; \item $(a,b,c)$ and $(c,d,a)$ are both in $S$ if and only if $(b,c,d)$ and $(d,a,b)$ are both in $S$. \end{enumerate} Prove that there exists a one-to-one function $g$ from $A$ to $\R$ such that $g(a) < g(b) < g(c)$ implies $(a,b,c) \in S$. +-/ theorem putnam_1996_a4 (A : Type*) [Finite A] diff --git a/lean4/src/putnam_1996_a5.lean b/lean4/src/putnam_1996_a5.lean index 2f548f34..78ed5a58 100644 --- a/lean4/src/putnam_1996_a5.lean +++ b/lean4/src/putnam_1996_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Function +/-- +If $p$ is a prime number greater than 3 and $k = \lfloor 2p/3 \rfloor$, prove that the sum \[\binom p1 + \binom p2 + \cdots + \binom pk \] of binomial coefficients is divisible by $p^2$. +-/ theorem putnam_1996_a5 (p : ℕ) (hpprime : Prime p) diff --git a/lean4/src/putnam_1996_a6.lean b/lean4/src/putnam_1996_a6.lean index de0dc5c0..772254c0 100644 --- a/lean4/src/putnam_1996_a6.lean +++ b/lean4/src/putnam_1996_a6.lean @@ -5,6 +5,9 @@ open Function abbrev putnam_1996_a6_solution : ℝ → Set (ℝ → ℝ) := sorry -- (fun c : ℝ => if c ≤ 1 / 4 then {f : ℝ → ℝ | ∃ d : ℝ, ∀ x : ℝ, f x = d} else {f : ℝ → ℝ | ContinuousOn f (Set.Icc 0 c) ∧ f 0 = f c ∧ (∀ x > 0, f x = f (x ^ 2 + c)) ∧ (∀ x < 0, f x = f (-x))}) +/-- +Let $c>0$ be a constant. Give a complete description, with proof, of the set of all continuous functions $f:\mathbb{R} \to \mathbb{R}$ such that $f(x)=f(x^2+c)$ for all $x \in \mathbb{R}$. +-/ theorem putnam_1996_a6 (c : ℝ) (f : ℝ → ℝ) diff --git a/lean4/src/putnam_1996_b1.lean b/lean4/src/putnam_1996_b1.lean index 381c7193..4625512f 100644 --- a/lean4/src/putnam_1996_b1.lean +++ b/lean4/src/putnam_1996_b1.lean @@ -5,6 +5,9 @@ open Function abbrev putnam_1996_b1_solution : ℕ → ℕ := sorry -- Nat.fib +/-- +Define a \emph{selfish} set to be a set which has its own cardinality (number of elements) as an element. Find, with proof, the number of subsets of $\{1,2,\ldots,n\}$ which are \emph{minimal} selfish sets, that is, selfish sets none of whose proper subsets is selfish. +-/ theorem putnam_1996_b1 (selfish : Finset ℕ → Prop) (n : ℕ) diff --git a/lean4/src/putnam_1996_b2.lean b/lean4/src/putnam_1996_b2.lean index f9a23752..68852858 100644 --- a/lean4/src/putnam_1996_b2.lean +++ b/lean4/src/putnam_1996_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Function +/-- +Show that for every positive integer $n$, $(\frac{2n-1}{e})^{\frac{2n-1}{2}}<1 \cdot 3 \cdot 5 \cdots (2n-1)<(\frac{2n+1}{e})^{\frac{2n+1}{2}}$. +-/ theorem putnam_1996_b2 (n : ℕ) (prododd : ℝ) diff --git a/lean4/src/putnam_1996_b3.lean b/lean4/src/putnam_1996_b3.lean index 5afccab9..0116b7cb 100644 --- a/lean4/src/putnam_1996_b3.lean +++ b/lean4/src/putnam_1996_b3.lean @@ -6,6 +6,9 @@ open Function -- Note: uses (ℕ → ℕ) instead of (Fin n → ℕ) abbrev putnam_1996_b3_solution : ℕ → ℕ := sorry -- (fun n : ℕ => (2 * n ^ 3 + 3 * n ^ 2 - 11 * n + 18) / 6) +/-- +Given that $\{x_1,x_2,\ldots,x_n\}=\{1,2,\ldots,n\}$, find, with proof, the largest possible value, as a function of $n$ (with $n \geq 2$), of $x_1x_2+x_2x_3+\cdots+x_{n-1}x_n+x_nx_1$. +-/ theorem putnam_1996_b3 (n : ℕ) (xset : (ℕ → ℤ) → Prop) diff --git a/lean4/src/putnam_1996_b4.lean b/lean4/src/putnam_1996_b4.lean index e4b4d282..36d85f58 100644 --- a/lean4/src/putnam_1996_b4.lean +++ b/lean4/src/putnam_1996_b4.lean @@ -5,6 +5,9 @@ open Function Nat abbrev putnam_1996_b4_solution : Prop := sorry -- False +/-- +For any square matrix $A$, we can define $\sin A$ by the usual power series: $\sin A=\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!}A^{2n+1}$. Prove or disprove: there exists a $2 \times 2$ matrix $A$ with real entries such that $\sin A=\begin{pmatrix} 1 & 1996 \\ 0 & 1 \end{pmatrix}$. +-/ theorem putnam_1996_b4 (matsin : Matrix (Fin 2) (Fin 2) ℝ → Matrix (Fin 2) (Fin 2) ℝ) (mat1996 : Matrix (Fin 2) (Fin 2) ℝ) diff --git a/lean4/src/putnam_1996_b5.lean b/lean4/src/putnam_1996_b5.lean index 91a3955e..25216b6e 100644 --- a/lean4/src/putnam_1996_b5.lean +++ b/lean4/src/putnam_1996_b5.lean @@ -6,6 +6,9 @@ open Function Nat abbrev putnam_1996_b5_solution : ℕ → ℕ := sorry -- (fun n : ℕ ↦ 2 ^ ⌊(n + 2) / 2⌋₊ + 2 ^ ⌊(n + 1) / 2⌋₊ - 2) +/-- +Given a finite string $S$ of symbols $X$ and $O$, we write $\Delta(S)$ for the number of $X$'s in $S$ minus the number of $O$'s. For example, $\Delta(XOOXOOX)=-1$. We call a string $S$ \emph{balanced} if every substring $T$ of (consecutive symbols of) $S$ has $-2 \leq \Delta(T) \leq 2$. Thus, $XOOXOOX$ is not balanced, since it contains the substring $OOXOO$. Find, with proof, the number of balanced strings of length $n$. +-/ theorem putnam_1996_b5 (n : ℕ) (Δ : (Fin n → ℤˣ) → Fin n → Fin n → ℤ) diff --git a/lean4/src/putnam_1997_a3.lean b/lean4/src/putnam_1997_a3.lean index da2414d5..f2901160 100644 --- a/lean4/src/putnam_1997_a3.lean +++ b/lean4/src/putnam_1997_a3.lean @@ -5,6 +5,9 @@ open Filter Topology noncomputable abbrev putnam_1997_a3_solution : ℝ := sorry -- Real.sqrt (Real.exp 1) +/-- +Evaluate \begin{gather*} \int_0^\infty \left(x-\frac{x^3}{2}+\frac{x^5}{2\cdot 4}-\frac{x^7}{2\cdot 4\cdot 6}+\cdots\right) \\ \left(1+\frac{x^2}{2^2}+\frac{x^4}{2^2\cdot 4^2}+\frac{x^6}{2^2\cdot 4^2 \cdot 6^2}+\cdots\right)\,dx. \end{gather*} +-/ theorem putnam_1997_a3 (series1 series2 : ℝ → ℝ) (hseries1 : series1 = fun x => ∑' n : ℕ, (-1)^n * x^(2*n + 1)/(∏ i : Finset.range n, 2 * ((i : ℝ) + 1))) diff --git a/lean4/src/putnam_1997_a4.lean b/lean4/src/putnam_1997_a4.lean index de00a875..9cd30859 100644 --- a/lean4/src/putnam_1997_a4.lean +++ b/lean4/src/putnam_1997_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology +/-- +Let $G$ be a group with identity $e$ and $\phi:G\rightarrow G$ a function such that \[\phi(g_1)\phi(g_2)\phi(g_3)=\phi(h_1)\phi(h_2)\phi(h_3)\] whenever $g_1g_2g_3=e=h_1h_2h_3$. Prove that there exists an element $a\in G$ such that $\psi(x)=a\phi(x)$ is a homomorphism (i.e. $\psi(xy)=\psi(x)\psi(y)$ for all $x,y\in G$). +-/ theorem putnam_1997_a4 (G : Type*) [Group G] diff --git a/lean4/src/putnam_1997_a5.lean b/lean4/src/putnam_1997_a5.lean index 85591cf9..2c4a0749 100644 --- a/lean4/src/putnam_1997_a5.lean +++ b/lean4/src/putnam_1997_a5.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_1997_a5_solution : Prop := sorry -- True +/-- +Let $N_n$ denote the number of ordered $n$-tuples of positive integers $(a_1,a_2,\ldots,a_n)$ such that $1/a_1 + 1/a_2 +\ldots + 1/a_n=1$. Determine whether $N_{10}$ is even or odd. +-/ theorem putnam_1997_a5 (N : (n : ℕ+) → Set (Fin n → ℕ+)) (hN : N = fun (n : ℕ+) => {t : Fin n → ℕ+ | (∀ i j : Fin n, i < j → t i <= t j) ∧ (∑ i : Fin n, (1 : ℝ)/(t i) = 1) }) diff --git a/lean4/src/putnam_1997_a6.lean b/lean4/src/putnam_1997_a6.lean index 2fc7720f..0a66fa9e 100644 --- a/lean4/src/putnam_1997_a6.lean +++ b/lean4/src/putnam_1997_a6.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_1997_a6_solution : ℤ → ℤ → ℝ := sorry -- fun n k => Nat.choose (n.toNat-1) (k.toNat-1) +/-- +For a positive integer $n$ and any real number $c$, define $x_k$ recursively by $x_0=0$, $x_1=1$, and for $k\geq 0$, \[x_{k+2}= rac{cx_{k+1}-(n-k)x_k}{k+1}.\] Fix $n$ and then take $c$ to be the largest value for which $x_{n+1}=0$. Find $x_k$ in terms of $n$ and $k$, $1\leq k\leq n$. +-/ theorem putnam_1997_a6 (n : ℤ) (hn : n > 0) diff --git a/lean4/src/putnam_1997_b1.lean b/lean4/src/putnam_1997_b1.lean index 7f975937..ad6e582f 100644 --- a/lean4/src/putnam_1997_b1.lean +++ b/lean4/src/putnam_1997_b1.lean @@ -6,6 +6,9 @@ open Filter Topology abbrev putnam_1997_b1_solution : ℕ → ℝ := sorry -- fun n => n noncomputable def dist_to_int : ℝ → ℝ := fun r => |r - round r| +/-- +Let $\{x\}$ denote the distance between the real number $x$ and the nearest integer. For each positive integer $n$, evaluate \[F_n=\sum_{m=1}^{6n-1} \min(\{\frac{m}{6n}\},\{\frac{m}{3n}\}).\] (Here $\min(a,b)$ denotes the minimum of $a$ and $b$.) +-/ theorem putnam_1997_b1 (F : ℕ → ℝ) (hF : F = fun (n : ℕ) => ∑ m in Finset.Icc 1 (6 * n - 1), min (dist_to_int (m/(6*n)) ) (dist_to_int (m/(3*n)))) diff --git a/lean4/src/putnam_1997_b2.lean b/lean4/src/putnam_1997_b2.lean index cc6282cc..9645959a 100644 --- a/lean4/src/putnam_1997_b2.lean +++ b/lean4/src/putnam_1997_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Bornology Set +/-- +Let $f$ be a twice-differentiable real-valued function satisfying \[f(x)+f''(x)=-xg(x)f'(x),\] where $g(x)\geq 0$ for all real $x$. Prove that $|f(x)|$ is bounded. +-/ theorem putnam_1997_b2 (f g : ℝ → ℝ) (hg : ∀ x : ℝ, g x ≥ 0) diff --git a/lean4/src/putnam_1997_b3.lean b/lean4/src/putnam_1997_b3.lean index 8e27b4da..f4e47fd9 100644 --- a/lean4/src/putnam_1997_b3.lean +++ b/lean4/src/putnam_1997_b3.lean @@ -5,6 +5,9 @@ open Filter Topology Bornology Set abbrev putnam_1997_b3_solution : Set ℕ := sorry -- {n | (1 ≤ n ∧ n ≤ 4) ∨ (20 ≤ n ∧ n ≤ 24) ∨ (100 ≤ n ∧ n ≤ 104) ∨ (120 ≤ n ∧ n ≤ 124)} +/-- +For each positive integer $n$, write the sum $\sum_{m=1}^n 1/m$ in the form $p_n/q_n$, where $p_n$ and $q_n$ are relatively prime positive integers. Determine all $n$ such that 5 does not divide $q_n$. +-/ theorem putnam_1997_b3 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_1997_b4.lean b/lean4/src/putnam_1997_b4.lean index 2a0d9859..0eac016f 100644 --- a/lean4/src/putnam_1997_b4.lean +++ b/lean4/src/putnam_1997_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Bornology Set Polynomial +/-- +Let $a_{m,n}$ denote the coefficient of $x^n$ in the expansion of $(1+x+x^2)^m$. Prove that for all [integers] $k\geq 0$, \[0\leq \sum_{i=0}^{\lfloor \frac{2k}{3}\rfloor} (-1)^i a_{k-i,i}\leq 1.\] +-/ theorem putnam_1997_b4 (a : ℕ → ℕ → ℤ) (ha : ∀ m n, a m n = coeff ((1 + X + X ^ 2) ^ m) n) diff --git a/lean4/src/putnam_1997_b5.lean b/lean4/src/putnam_1997_b5.lean index 70f9989e..e4ff6421 100644 --- a/lean4/src/putnam_1997_b5.lean +++ b/lean4/src/putnam_1997_b5.lean @@ -4,6 +4,9 @@ open BigOperators def tetration : ℕ → ℕ → ℕ | _, 0 => 1 | b, (m + 1) => b^(tetration b m) +/-- +Prove that for $n\geq 2$, \[\overbrace{2^{2^{\cdots^{2}}}}^{\mbox{$n$ terms}} \equiv \overbrace{2^{2^{\cdots^{2}}}}^{\mbox{$n-1$ terms}} \quad \pmod{n}.\] +-/ theorem putnam_1997_b5 (n : ℕ) (hn : n ≥ 2) diff --git a/lean4/src/putnam_1998_a2.lean b/lean4/src/putnam_1998_a2.lean index ee899f52..c0aa8c11 100644 --- a/lean4/src/putnam_1998_a2.lean +++ b/lean4/src/putnam_1998_a2.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $s$ be any arc of the unit circle lying entirely in the first quadrant. Let $A$ be the area of the region lying below $s$ and above the $x$-axis and let $B$ be the area of the region lying to the right of the $y$-axis and to the left of $s$. Prove that $A+B$ depends only on the arc length, and not on the position, of $s$. +-/ theorem putnam_1998_a2 (quadrant : (EuclideanSpace ℝ (Fin 2)) → Prop) (hquadrant : quadrant = fun P ↦ P 0 > 0 ∧ P 1 > 0 ∧ dist 0 P = 1) diff --git a/lean4/src/putnam_1998_a3.lean b/lean4/src/putnam_1998_a3.lean index 57397262..0afd9b55 100644 --- a/lean4/src/putnam_1998_a3.lean +++ b/lean4/src/putnam_1998_a3.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such that \[f(a)\cdot f'(a) \cdot f''(a) \cdot f'''(a)\geq 0 .\] +-/ theorem putnam_1998_a3 (f : ℝ → ℝ) (hf : ContDiff ℝ 3 f) diff --git a/lean4/src/putnam_1998_a4.lean b/lean4/src/putnam_1998_a4.lean index 0cd9b6cf..cf8a498b 100644 --- a/lean4/src/putnam_1998_a4.lean +++ b/lean4/src/putnam_1998_a4.lean @@ -4,6 +4,9 @@ open BigOperators -- Note: Since 11 divides `x` iff it divides its base-10 reverse, the `reverse` below is optional. abbrev putnam_1998_a4_solution : Set ℕ := sorry -- {n | n ≡ 1 [MOD 6]} +/-- +Let $A_1=0$ and $A_2=1$. For $n>2$, the number $A_n$ is defined by concatenating the decimal expansions of $A_{n-1}$ and $A_{n-2}$ from left to right. For example $A_3=A_2 A_1=10$, $A_4=A_3 A_2 = 101$, $A_5=A_4 A_3 = 10110$, and so forth. Determine all $n$ such that $11$ divides $A_n$. +-/ theorem putnam_1998_a4 (A : ℕ → List ℕ) (hA1 : A 1 = [0]) diff --git a/lean4/src/putnam_1998_a5.lean b/lean4/src/putnam_1998_a5.lean index 03721654..24eaf852 100644 --- a/lean4/src/putnam_1998_a5.lean +++ b/lean4/src/putnam_1998_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Metric +/-- +Let $\mathcal F$ be a finite collection of open discs in $\mathbb R^2$ whose union contains a set $E\subseteq \mathbb R^2$. Show that there is a pairwise disjoint subcollection $D_1,\ldots, D_n$ in $\mathcal F$ such that \[E\subseteq \cup_{j=1}^n 3D_j.\] Here, if $D$ is the disc of radius $r$ and center $P$, then $3D$ is the disc of radius $3r$ and center $P$. +-/ theorem putnam_1998_a5 (k : ℕ) (c : Fin k → (EuclideanSpace ℝ (Fin 2))) diff --git a/lean4/src/putnam_1998_a6.lean b/lean4/src/putnam_1998_a6.lean index cc0f8e86..1f1d90d9 100644 --- a/lean4/src/putnam_1998_a6.lean +++ b/lean4/src/putnam_1998_a6.lean @@ -3,6 +3,11 @@ open BigOperators open Set Function Metric +/-- +Let $A, B, C$ denote distinct points with integer coordinates in $\mathbb R^2$. Prove that if +\[(|AB|+|BC|)^2<8\cdot [ABC]+1\] +then $A, B, C$ are three vertices of a square. Here $|XY|$ is the length of segment $XY$ and $[ABC]$ is the area of triangle $ABC$. +-/ theorem putnam_1998_a6 (A B C : EuclideanSpace ℝ (Fin 2)) (hint : ∀ i : Fin 2, ∃ a b c : ℤ, A i = a ∧ B i = b ∧ C i = c) diff --git a/lean4/src/putnam_1998_b1.lean b/lean4/src/putnam_1998_b1.lean index 5e010b83..e96f5fae 100644 --- a/lean4/src/putnam_1998_b1.lean +++ b/lean4/src/putnam_1998_b1.lean @@ -5,6 +5,9 @@ open Set Function Metric abbrev putnam_1998_b1_solution : ℝ := sorry -- 6 +/-- +Find the minimum value of \[\frac{(x+1/x)^6-(x^6+1/x^6)-2}{(x+1/x)^3+(x^3+1/x^3)}\] for $x>0$. +-/ theorem putnam_1998_b1 : sInf {((x + 1/x)^6 - (x^6 + 1/x^6) - 2)/((x + 1/x)^3 + (x^3 + 1/x^3)) | x > (0 : ℝ)} = putnam_1998_b1_solution := sorry diff --git a/lean4/src/putnam_1998_b2.lean b/lean4/src/putnam_1998_b2.lean index 2fc79427..47576b28 100644 --- a/lean4/src/putnam_1998_b2.lean +++ b/lean4/src/putnam_1998_b2.lean @@ -5,6 +5,9 @@ open Set Function Metric noncomputable abbrev putnam_1998_b2_solution : ℝ → ℝ → ℝ := sorry -- fun a b => if a > b then Real.sqrt (2*a^2 + 2*b^2) else 0 +/-- +Given a point $(a,b)$ with $0 ∑ i in Finset.range (m * n), (-1)^(i/m + i/n)) diff --git a/lean4/src/putnam_1998_b5.lean b/lean4/src/putnam_1998_b5.lean index 24e1190d..eb438bcf 100644 --- a/lean4/src/putnam_1998_b5.lean +++ b/lean4/src/putnam_1998_b5.lean @@ -5,6 +5,9 @@ open Set Function Metric abbrev putnam_1998_b5_solution : ℕ := sorry -- 1 +/-- +Let $N$ be the positive integer with 1998 decimal digits, all of them 1; that is, \[N=1111\cdots 11.\] Find the thousandth digit after the decimal point of $\sqrt N$. +-/ theorem putnam_1998_b5 (N : ℕ) (hN : N = ∑ i in Finset.range 1998, 10^i) diff --git a/lean4/src/putnam_1998_b6.lean b/lean4/src/putnam_1998_b6.lean index cab68d08..db0b507c 100644 --- a/lean4/src/putnam_1998_b6.lean +++ b/lean4/src/putnam_1998_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Set Function Metric +/-- +Prove that, for any integers $a, b, c$, there exists a positive integer $n$ such that $\sqrt{n^3+an^2+bn+c}$ is not an integer. +-/ theorem putnam_1998_b6 : ∀ a b c : ℤ, ∃ n : ℤ, n > 0 ∧ ¬(∃ k : ℤ, k = Real.sqrt (n^3 + a * n^2 + b * n + c)) := sorry diff --git a/lean4/src/putnam_1999_a1.lean b/lean4/src/putnam_1999_a1.lean index c256854a..f9404aec 100644 --- a/lean4/src/putnam_1999_a1.lean +++ b/lean4/src/putnam_1999_a1.lean @@ -4,6 +4,9 @@ open BigOperators -- Note: The actual problem asks to "find" such polynomials as well - but the solution does not give a set of all possible solutions. Hence, we would need to do the analysis ourselves, the following formalization should work. abbrev putnam_1999_a1_solution : Prop := sorry -- True +/-- +Find polynomials $f(x)$,$g(x)$, and $h(x)$, if they exist, such that for all $x$, \[|f(x)|-|g(x)|+h(x) = \begin{cases} -1 & \mbox{if $x<-1$} \\3x+2 & \mbox{if $-1 \leq x \leq 0$} \\-2x+2 & \mbox{if $x>0$.}\end{cases}\]? +-/ theorem putnam_1999_a1 : putnam_1999_a1_solution ↔ ∃ f g h : Polynomial ℝ, ∀ x : ℝ, |f.eval x| - |g.eval x| + h.eval x = if x < -1 then -1 else (if (x ≤ 0) then 3 * x + 2 else -2 * x + 2) := sorry diff --git a/lean4/src/putnam_1999_a2.lean b/lean4/src/putnam_1999_a2.lean index 0691f75a..2a31cc8b 100644 --- a/lean4/src/putnam_1999_a2.lean +++ b/lean4/src/putnam_1999_a2.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $p(x)$ be a polynomial that is nonnegative for all real $x$. Prove that for some $k$, there are polynomials $f_1(x),\dots,f_k(x$) such that \[p(x) = \sum_{j=1}^k (f_j(x))^2.\] +-/ theorem putnam_1999_a2 (p : Polynomial ℝ) (hp : ∀ x : ℝ, p.eval x ≥ 0) diff --git a/lean4/src/putnam_1999_a3.lean b/lean4/src/putnam_1999_a3.lean index 688ac349..ccaaa488 100644 --- a/lean4/src/putnam_1999_a3.lean +++ b/lean4/src/putnam_1999_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Metric +/-- +Consider the power series expansion \[\frac{1}{1-2x-x^2} = \sum_{n=0}^\infty a_n x^n.\] Prove that, for each integer $n\geq 0$, there is an integer $m$ such that \[a_n^2 + a_{n+1}^2 = a_m .\] +-/ theorem putnam_1999_a3 (f : ℝ → ℝ) (hf : f = fun x ↦ 1 / (1 - 2 * x - x ^ 2)) diff --git a/lean4/src/putnam_1999_a4.lean b/lean4/src/putnam_1999_a4.lean index 2b1f7146..c67ec123 100644 --- a/lean4/src/putnam_1999_a4.lean +++ b/lean4/src/putnam_1999_a4.lean @@ -6,6 +6,9 @@ open Filter Topology Metric -- Note: This is done assuming that the series converges, otherwise it is unclear in which order to sum. The problem statement assumes convergence. noncomputable abbrev putnam_1999_a4_solution : ℝ := sorry -- 9/32 +/-- +Sum the series \[\sum_{m=1}^\infty \sum_{n=1}^\infty \frac{m^2 n}{3^m(n3^m+m3^n)}.\] +-/ theorem putnam_1999_a4 : Tendsto (fun i => ∑ m in Finset.range i, ∑' n : ℕ, (((m + 1)^2*(n+1))/(3^(m + 1) * ((n+1)*3^(m + 1) + (m + 1)*3^(n+1))) : ℝ)) atTop (𝓝 putnam_1999_a4_solution) := sorry diff --git a/lean4/src/putnam_1999_a5.lean b/lean4/src/putnam_1999_a5.lean index 5b510feb..57bf800f 100644 --- a/lean4/src/putnam_1999_a5.lean +++ b/lean4/src/putnam_1999_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Metric +/-- +Prove that there is a constant $C$ such that, if $p(x)$ is a polynomial of degree 1999, then \[|p(0)|\leq C \int_{-1}^1 |p(x)|\,dx.\] +-/ theorem putnam_1999_a5 : ∃ C : ℝ, ∀ p : Polynomial ℝ, p.degree = 1999 → ‖p.eval 0‖ ≤ C * ∫ x in (-1)..1, ‖p.eval x‖ := sorry diff --git a/lean4/src/putnam_1999_a6.lean b/lean4/src/putnam_1999_a6.lean index d3f0cf2e..178ef021 100644 --- a/lean4/src/putnam_1999_a6.lean +++ b/lean4/src/putnam_1999_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Metric +/-- +The sequence $(a_n)_{n\geq 1}$ is defined by $a_1=1, a_2=2, a_3=24,$ and, for $n\geq 4$, \[a_n = \frac{6a_{n-1}^2a_{n-3} - 8a_{n-1}a_{n-2}^2}{a_{n-2}a_{n-3}}.\] Show that, for all n, $a_n$ is an integer multiple of $n$. +-/ theorem putnam_1999_a6 (a : ℤ → ℝ) (ha1 : a 1 = 1) diff --git a/lean4/src/putnam_1999_b2.lean b/lean4/src/putnam_1999_b2.lean index 7acbaf59..11ae0b52 100644 --- a/lean4/src/putnam_1999_b2.lean +++ b/lean4/src/putnam_1999_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Metric +/-- +Let $P(x)$ be a polynomial of degree $n$ such that $P(x)=Q(x)P''(x)$, where $Q(x)$ is a quadratic polynomial and $P''(x)$ is the second derivative of $P(x)$. Show that if $P(x)$ has at least two distinct roots then it must have $n$ distinct roots. +-/ theorem putnam_1999_b2 (P Q : Polynomial ℂ) (hQ : Q.natDegree = 2) diff --git a/lean4/src/putnam_1999_b3.lean b/lean4/src/putnam_1999_b3.lean index fc88f710..f157ad24 100644 --- a/lean4/src/putnam_1999_b3.lean +++ b/lean4/src/putnam_1999_b3.lean @@ -5,6 +5,9 @@ open Filter Topology Metric abbrev putnam_1999_b3_solution : ℝ := sorry -- 3 +/-- +Let $A=\{(x,y):0\leq x,y<1\}$. For $(x,y)\in A$, let \[S(x,y) = \sum_{\frac{1}{2}\leq \frac{m}{n}\leq 2} x^m y^n,\] where the sum ranges over all pairs $(m,n)$ of positive integers satisfying the indicated inequalities. Evaluate \[\lim_{(x,y)\rightarrow (1,1), (x,y)\in A} (1-xy^2)(1-x^2y)S(x,y).\] +-/ theorem putnam_1999_b3 (A : Set (ℝ × ℝ)) (hA : A = {xy : ℝ × ℝ | 0 ≤ xy.1 ∧ xy.1 < 1 ∧ 0 ≤ xy.2 ∧ xy.2 < 1}) diff --git a/lean4/src/putnam_1999_b4.lean b/lean4/src/putnam_1999_b4.lean index e3eed873..67222cc9 100644 --- a/lean4/src/putnam_1999_b4.lean +++ b/lean4/src/putnam_1999_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Metric +/-- +Let $f$ be a real function with a continuous third derivative such that $f(x), f'(x), f''(x), f'''(x)$ are positive for all $x$. Suppose that $f'''(x)\leq f(x)$ for all $x$. Show that $f'(x)<2f(x)$ for all $x$. +-/ theorem putnam_1999_b4 (f : ℝ → ℝ) (hf : ContDiff ℝ 3 f) diff --git a/lean4/src/putnam_1999_b5.lean b/lean4/src/putnam_1999_b5.lean index 0b1ee18e..a1f4f888 100644 --- a/lean4/src/putnam_1999_b5.lean +++ b/lean4/src/putnam_1999_b5.lean @@ -5,6 +5,9 @@ open Filter Topology Metric noncomputable abbrev putnam_1999_b5_solution : ℕ → ℝ := sorry -- fun n => 1 - n^2/4 +/-- +For an integer $n\geq 3$, let $\theta=2\pi/n$. Evaluate the determinant of the $n\times n$ matrix $I+A$, where $I$ is the $n\times n$ identity matrix and $A=(a_{jk})$ has entries $a_{jk}=\cos(j\theta+k\theta)$ for all $j,k$. +-/ theorem putnam_1999_b5 (n : ℕ) (hn : n ≥ 3) diff --git a/lean4/src/putnam_1999_b6.lean b/lean4/src/putnam_1999_b6.lean index 3747256a..d8c10f31 100644 --- a/lean4/src/putnam_1999_b6.lean +++ b/lean4/src/putnam_1999_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Metric +/-- +Let $S$ be a finite set of integers, each greater than 1. Suppose that for each integer $n$ there is some $s\in S$ such that $\gcd(s,n)=1$ or $\gcd(s,n)=s$. Show that there exist $s,t\in S$ such that $\gcd(s,t)$ is prime. +-/ theorem putnam_1999_b6 (S : Finset ℤ) (hSgt : ∀ s : ℤ, s ∈ S → s > 1) diff --git a/lean4/src/putnam_2000_a1.lean b/lean4/src/putnam_2000_a1.lean index 6d5a2a42..86df71ae 100644 --- a/lean4/src/putnam_2000_a1.lean +++ b/lean4/src/putnam_2000_a1.lean @@ -5,6 +5,9 @@ open Topology Filter abbrev putnam_2000_a1_solution : ℝ → Set ℝ := sorry -- (fun A : ℝ => Set.Ioo 0 (A ^ 2)) +/-- +Let $A$ be a positive real number. What are the possible values of $\sum_{j=0}^\infty x_j^2$, given that $x_0,x_1,\ldots$ are positive numbers for which $\sum_{j=0}^\infty x_j=A$? +-/ theorem putnam_2000_a1 (A : ℝ) (Apos : A > 0) diff --git a/lean4/src/putnam_2000_a2.lean b/lean4/src/putnam_2000_a2.lean index fd13a6c8..3516eee1 100644 --- a/lean4/src/putnam_2000_a2.lean +++ b/lean4/src/putnam_2000_a2.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Prove that there exist infinitely many integers $n$ such that $n,n+1,n+2$ are each the sum of the squares of two integers. +-/ theorem putnam_2000_a2 : ∀ n : ℕ, ∃ N : ℤ, ∃ i : Fin 6 → ℕ, N > n ∧ N = (i 0)^2 + (i 1)^2 ∧ N + 1 = (i 2)^2 + (i 3)^2 ∧ N + 2 = (i 4)^2 + (i 5)^2 := sorry diff --git a/lean4/src/putnam_2000_a4.lean b/lean4/src/putnam_2000_a4.lean index fa3e5991..2503722a 100644 --- a/lean4/src/putnam_2000_a4.lean +++ b/lean4/src/putnam_2000_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Show that the improper integral $\lim_{B \to \infty} \int_0^B \sin(x)\sin(x^2)\,dx$ converges. +-/ theorem putnam_2000_a4 : ∃ y : ℝ, Tendsto (fun B : ℝ => ∫ x in Set.Ioo 0 B, Real.sin x * Real.sin (x ^ 2)) atTop (𝓝 y) := sorry diff --git a/lean4/src/putnam_2000_a5.lean b/lean4/src/putnam_2000_a5.lean index 2012e609..4b8c8a0f 100644 --- a/lean4/src/putnam_2000_a5.lean +++ b/lean4/src/putnam_2000_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Three distinct points with integer coordinates lie in the plane on a circle of radius $r>0$. Show that two of these points are separated by a distance of at least $r^{1/3}$. +-/ theorem putnam_2000_a5 (r : ℝ) (z : EuclideanSpace ℝ (Fin 2)) diff --git a/lean4/src/putnam_2000_a6.lean b/lean4/src/putnam_2000_a6.lean index 32f9a3ad..63eb01cb 100644 --- a/lean4/src/putnam_2000_a6.lean +++ b/lean4/src/putnam_2000_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Let $f(x)$ be a polynomial with integer coefficients. Define a sequence $a_0,a_1,\ldots$ of integers such that $a_0=0$ and $a_{n+1}=f(a_n)$ for all $n\geq 0$. Prove that if there exists a positive integer $m$ for which $a_m=0$ then either $a_1=0$ or $a_2=0$. +-/ theorem putnam_2000_a6 (f : Polynomial ℤ) (a : ℕ → ℤ) diff --git a/lean4/src/putnam_2000_b1.lean b/lean4/src/putnam_2000_b1.lean index 12522e10..ef16aa34 100644 --- a/lean4/src/putnam_2000_b1.lean +++ b/lean4/src/putnam_2000_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Let $a_j,b_j,c_j$ be integers for $1\leq j\leq N$. Assume for each $j$, at least one of $a_j,b_j,c_j$ is odd. Show that there exist integers $r$, $s$, $t$ such that $ra_j+sb_j+tc_j$ is odd for at least $4N/7$ values of $j$, $1\leq j\leq N$. +-/ theorem putnam_2000_b1 (N : ℕ) (a b c : Fin N → ℤ) diff --git a/lean4/src/putnam_2000_b2.lean b/lean4/src/putnam_2000_b2.lean index 98962de9..ea55d24e 100644 --- a/lean4/src/putnam_2000_b2.lean +++ b/lean4/src/putnam_2000_b2.lean @@ -3,6 +3,13 @@ open BigOperators open Topology Filter Nat +/-- +Prove that the expression +\[ +\frac{gcd(m,n)}{n}\binom{n}{m} +\] +is an integer for all pairs of integers $n\geq m\geq 1$. +-/ theorem putnam_2000_b2 : (∀ m n : ℕ, m ≥ 1 → n ≥ m → n ∣ Nat.gcd m n * Nat.choose n m) := sorry diff --git a/lean4/src/putnam_2000_b3.lean b/lean4/src/putnam_2000_b3.lean index afcaf11d..9cd743d8 100644 --- a/lean4/src/putnam_2000_b3.lean +++ b/lean4/src/putnam_2000_b3.lean @@ -3,6 +3,12 @@ open BigOperators open Topology Filter Nat Set Function +/-- +Let $f(t)=\sum_{j=1}^N a_j \sin(2\pi jt)$, where each $a_j$ is real and $a_N$ is not equal to $0$. Let $N_k$ denote the number of zeroes (including multiplicities) of $\frac{d^k f}{dt^k}$. Prove that +\[ +N_0\leq N_1\leq N_2\leq \cdots \mbox{ and } \lim_{k\to\infty} N_k = 2N. +\] +-/ theorem putnam_2000_b3 (N : ℕ) (Npos : N > 0) diff --git a/lean4/src/putnam_2000_b4.lean b/lean4/src/putnam_2000_b4.lean index ddee6683..57f29b7e 100644 --- a/lean4/src/putnam_2000_b4.lean +++ b/lean4/src/putnam_2000_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Nat Set Function +/-- +Let $f(x)$ be a continuous function such that $f(2x^2-1)=2xf(x)$ for all $x$. Show that $f(x)=0$ for $-1\leq x\leq 1$. +-/ theorem putnam_2000_b4 (f : ℝ → ℝ) (hfcont : Continuous f) diff --git a/lean4/src/putnam_2000_b5.lean b/lean4/src/putnam_2000_b5.lean index 8b45e75d..647389c3 100644 --- a/lean4/src/putnam_2000_b5.lean +++ b/lean4/src/putnam_2000_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Nat Set Function +/-- +Let $S_0$ be a finite set of positive integers. We define finite sets $S_1,S_2,\ldots$ of positive integers as follows: the integer $a$ is in $S_{n+1}$ if and only if exactly one of $a-1$ or $a$ is in $S_n$. Show that there exist infinitely many integers $N$ for which $S_N=S_0\cup\{N+a: a\in S_0\}$. +-/ theorem putnam_2000_b5 (S : ℕ → Set ℤ) (hSfin : ∀ n : ℕ, Set.Finite (S n)) diff --git a/lean4/src/putnam_2001_a1.lean b/lean4/src/putnam_2001_a1.lean index 8f447a66..69384fb8 100644 --- a/lean4/src/putnam_2001_a1.lean +++ b/lean4/src/putnam_2001_a1.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Consider a set $S$ and a binary operation $*$, i.e., for each $a,b\in S$, $a*b\in S$. Assume $(a*b)*a=b$ for all $a,b\in S$. Prove that $a*(b*a)=b$ for all $a,b\in S$. +-/ theorem putnam_2001_a1 (S : Type*) [Mul S] diff --git a/lean4/src/putnam_2001_a3.lean b/lean4/src/putnam_2001_a3.lean index 53687774..9f5afa72 100644 --- a/lean4/src/putnam_2001_a3.lean +++ b/lean4/src/putnam_2001_a3.lean @@ -5,6 +5,11 @@ open Topology Filter Polynomial Set abbrev putnam_2001_a3_solution : Set ℤ := sorry -- {m : ℤ | ∃ k : ℤ, k^2 = m ∨ 2*k^2 = m} +/-- +For each integer $m$, consider the polynomial +\[P_m(x)=x^4-(2m+4)x^2+(m-2)^2.\] For what values of $m$ is $P_m(x)$ +the product of two non-constant polynomials with integer coefficients? +-/ theorem putnam_2001_a3 (P : ℤ → Polynomial ℤ) (hP : P = fun m : ℤ => (Polynomial.X)^4 - (Polynomial.C (2*m + 4))*(Polynomial.X)^2 + Polynomial.C ((m - 2)^2)) diff --git a/lean4/src/putnam_2001_a5.lean b/lean4/src/putnam_2001_a5.lean index d82ea63a..d4ac9a1c 100644 --- a/lean4/src/putnam_2001_a5.lean +++ b/lean4/src/putnam_2001_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Polynomial Set +/-- +Prove that there are unique positive integers $a$, $n$ such that $a^{n+1}-(a+1)^n=2001$. +-/ theorem putnam_2001_a5 : ∃! an : ℤ × ℕ, let (a, n) := an; a > 0 ∧ n > 0 ∧ a^(n+1) - (a+1)^n = 2001 := sorry diff --git a/lean4/src/putnam_2001_b1.lean b/lean4/src/putnam_2001_b1.lean index 22de9687..010568d1 100644 --- a/lean4/src/putnam_2001_b1.lean +++ b/lean4/src/putnam_2001_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Polynomial Set +/-- +Let $n$ be an even positive integer. Write the numbers $1,2,\ldots,n^2$ in the squares of an $n \times n$ grid so that the $k$-th row, from left to right, is $(k-1)n+1,(k-1)n+2,\ldots,(k-1)n+n$. Color the squares of the grid so that half of the squares in each row and in each column are red and the other half are black (a checkerboard coloring is one possibility). Prove that for each coloring, the sum of the numbers on the red squares is equal to the sum of the numbers on the black squares. +-/ theorem putnam_2001_b1 (n : ℕ) (nums : Fin n → Fin n → ℤ) diff --git a/lean4/src/putnam_2001_b2.lean b/lean4/src/putnam_2001_b2.lean index 21ce1afa..23bf1a6a 100644 --- a/lean4/src/putnam_2001_b2.lean +++ b/lean4/src/putnam_2001_b2.lean @@ -5,6 +5,13 @@ open Topology Filter Polynomial Set abbrev putnam_2001_b2_solution : Set (ℝ × ℝ) := sorry -- {((3 ^ ((1 : ℝ) / 5) + 1) / 2, (3 ^ ((1 : ℝ) / 5) - 1) / 2)} +/-- +Find all pairs of real numbers $(x,y)$ satisfying the system of equations +\begin{align*} +\frac{1}{x}+\frac{1}{2y}&=(x^2+3y^2)(3x^2+y^2) \\ +\frac{1}{x}-\frac{1}{2y}&=2(y^4-x^4). +\end{align*} +-/ theorem putnam_2001_b2 (x y : ℝ) (hx : x ≠ 0) diff --git a/lean4/src/putnam_2001_b3.lean b/lean4/src/putnam_2001_b3.lean index f47ccda9..89f1b339 100644 --- a/lean4/src/putnam_2001_b3.lean +++ b/lean4/src/putnam_2001_b3.lean @@ -5,6 +5,9 @@ open Topology Filter Polynomial Set abbrev putnam_2001_b3_solution : ℝ := sorry -- 3 +/-- +For any positive integer $n$, let $\langle n \rangle$ denote the closest integer to $\sqrt{n}$. Evaluate $\sum_{n=1}^\infty \frac{2^{\langle n \rangle}+2^{-\langle n \rangle}}{2^n}$. +-/ theorem putnam_2001_b3 : ∑' n : Set.Ici 1, ((2 : ℝ) ^ (round (Real.sqrt n)) + (2 : ℝ) ^ (-round (Real.sqrt n))) / 2 ^ (n : ℝ) = putnam_2001_b3_solution := sorry diff --git a/lean4/src/putnam_2001_b4.lean b/lean4/src/putnam_2001_b4.lean index e63c0dc4..e20a5d0c 100644 --- a/lean4/src/putnam_2001_b4.lean +++ b/lean4/src/putnam_2001_b4.lean @@ -5,6 +5,9 @@ open Topology Filter Polynomial Set abbrev putnam_2001_b4_solution : Prop := sorry -- True +/-- +Let $S$ denote the set of rational numbers different from $\{-1,0,1\}$. Define $f:S\rightarrow S$ by $f(x)=x-1/x$. Prove or disprove that \[\bigcap_{n=1}^\infty f^{(n)}(S) = \emptyset,\] where $f^{(n)}$ denotes $f$ composed with itself $n$ times. +-/ theorem putnam_2001_b4 (S : Set ℚ) (hS : S = univ \ {-1, 0, 1}) diff --git a/lean4/src/putnam_2001_b5.lean b/lean4/src/putnam_2001_b5.lean index f4a58a00..b89d2e1f 100644 --- a/lean4/src/putnam_2001_b5.lean +++ b/lean4/src/putnam_2001_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Polynomial Set +/-- +Let $a$ and $b$ be real numbers in the interval $(0,1/2)$, and let $g$ be a continuous real-valued function such that $g(g(x))=ag(x)+bx$ for all real $x$. Prove that $g(x)=cx$ for some constant $c$. +-/ theorem putnam_2001_b5 (a b : ℝ) (g : ℝ → ℝ) diff --git a/lean4/src/putnam_2001_b6.lean b/lean4/src/putnam_2001_b6.lean index b596614d..bf8dd68d 100644 --- a/lean4/src/putnam_2001_b6.lean +++ b/lean4/src/putnam_2001_b6.lean @@ -6,6 +6,9 @@ open Topology Filter Polynomial Set -- Note: uses (ℤ → ℝ) instead of (Set.Ici 1 → ℝ) abbrev putnam_2001_b6_solution : Prop := sorry -- True +/-- +Assume that $(a_n)_{n \geq 1}$ is an increasing sequence of positive real numbers such that $\lim a_n/n=0$. Must there exist infinitely many positive integers $n$ such that $a_{n-i}+a_{n+i}<2a_n$ for $i=1,2,\ldots,n-1$? +-/ theorem putnam_2001_b6 (aposinc alim : (ℤ → ℝ) → Prop) (haposinc : ∀ a : ℤ → ℝ, aposinc a ↔ ∀ n ≥ 1, a n > 0 ∧ a n < a (n + 1)) diff --git a/lean4/src/putnam_2002_a1.lean b/lean4/src/putnam_2002_a1.lean index 85244456..50cc7d89 100644 --- a/lean4/src/putnam_2002_a1.lean +++ b/lean4/src/putnam_2002_a1.lean @@ -5,6 +5,9 @@ open Nat abbrev putnam_2002_a1_solution : ℕ → ℕ → ℝ := sorry -- (fun k n : ℕ => (-k) ^ n * (n)!) +/-- +Let $k$ be a fixed positive integer. The $n$-th derivative of $\frac{1}{x^k-1}$ has the form $\frac{P_n(x)}{(x^k-1)^{n+1}}$ where $P_n(x)$ is a polynomial. Find $P_n(1)$. +-/ theorem putnam_2002_a1 (k : ℕ) (P : ℕ → Polynomial ℝ) diff --git a/lean4/src/putnam_2002_a2.lean b/lean4/src/putnam_2002_a2.lean index 93b74de8..8a0a317a 100644 --- a/lean4/src/putnam_2002_a2.lean +++ b/lean4/src/putnam_2002_a2.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Metric +/-- +Given any five points on a sphere, show that some four of them must lie on a closed hemisphere. +-/ theorem putnam_2002_a2 (unit_sphere : Set (EuclideanSpace ℝ (Fin 3))) (hsphere : unit_sphere = sphere 0 1) diff --git a/lean4/src/putnam_2002_a3.lean b/lean4/src/putnam_2002_a3.lean index 5cc3d9b2..13728a43 100644 --- a/lean4/src/putnam_2002_a3.lean +++ b/lean4/src/putnam_2002_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Nat +/-- +Let $n \geq 2$ be an integer and $T_n$ be the number of non-empty subsets $S$ of $\{1, 2, 3, \dots, n\}$ with the property that the average of the elements of $S$ is an integer. Prove that $T_n - n$ is always even. +-/ theorem putnam_2002_a3 (n Tn : ℤ) (hn : n ≥ 2) diff --git a/lean4/src/putnam_2002_a5.lean b/lean4/src/putnam_2002_a5.lean index 9c446b64..cd7f2e79 100644 --- a/lean4/src/putnam_2002_a5.lean +++ b/lean4/src/putnam_2002_a5.lean @@ -3,6 +3,17 @@ open BigOperators open Nat Set +/-- +Define a sequence by $a_0=1$, together with the rules +$a_{2n+1} = a_n$ and $a_{2n+2} = a_n + a_{n+1}$ for each +integer $n \geq 0$. Prove that every positive rational number +appears in the set +\[ +\left\{ \frac{a_{n-1}}{a_n}: n \geq 1 \right\} = +\left\{ \frac{1}{1}, \frac{1}{2}, \frac{2}{1}, \frac{1}{3}, +\frac{3}{2}, \dots \right\}. +\] +-/ theorem putnam_2002_a5 (a : ℕ → ℚ) (ha : a 0 = 1 ∧ ∀ n : ℕ, a (2*n + 1) = a n ∧ a (2*n + 2) = a n + a (n + 1)) diff --git a/lean4/src/putnam_2002_a6.lean b/lean4/src/putnam_2002_a6.lean index fab4bc43..875e1f23 100644 --- a/lean4/src/putnam_2002_a6.lean +++ b/lean4/src/putnam_2002_a6.lean @@ -5,6 +5,15 @@ open Nat Set Topology Filter abbrev putnam_2002_a6_solution : Set ℕ := sorry -- {2} +/-- +Fix an integer $b \geq 2$. Let $f(1) = 1$, $f(2) = 2$, and for each +$n \geq 3$, define $f(n) = n f(d)$, where $d$ is the number of +base-$b$ digits of $n$. For which values of $b$ does +\[ +\sum_{n=1}^\infty \frac{1}{f(n)} +\] +converge? +-/ theorem putnam_2002_a6 (f : ℕ → ℕ → ℝ) (hf : ∀ b : ℕ, f b 1 = 1 ∧ f b 2 = 2 ∧ ∀ n ∈ Ici 3, f b n = n * f b (Nat.digits b n).length) diff --git a/lean4/src/putnam_2002_b3.lean b/lean4/src/putnam_2002_b3.lean index a25089f0..ca6c9547 100644 --- a/lean4/src/putnam_2002_b3.lean +++ b/lean4/src/putnam_2002_b3.lean @@ -3,6 +3,13 @@ open BigOperators open Nat Set Topology Filter +/-- +Show that, for all integers $n > 1$, +\[ +\frac{1}{2ne} < \frac{1}{e} - \left( 1 - \frac{1}{n} \right)^n +< \frac{1}{ne}. +\] +-/ theorem putnam_2002_b3 (e : ℝ) (he : e = Real.exp 1) diff --git a/lean4/src/putnam_2002_b5.lean b/lean4/src/putnam_2002_b5.lean index 30ca1bd9..46c196ff 100644 --- a/lean4/src/putnam_2002_b5.lean +++ b/lean4/src/putnam_2002_b5.lean @@ -3,6 +3,15 @@ open BigOperators open Nat Set Topology Filter +/-- +A palindrome in base $b$ is a positive integer whose base-$b$ +digits read the same backwards and forwards; for example, +$2002$ is a 4-digit palindrome in base 10. Note that 200 is not +a palindrome in base 10, but it is the 3-digit palindrome +242 in base 9, and 404 in base 7. Prove that there is an integer +which is a 3-digit palindrome in base $b$ for at least 2002 +different values of $b$. +-/ theorem putnam_2002_b5 : ∃ n : ℕ, {b : ℕ | b ≥ 1 ∧ (Nat.digits b n).length = 3 ∧ List.Palindrome (Nat.digits b n)}.ncard ≥ 2002 := sorry diff --git a/lean4/src/putnam_2002_b6.lean b/lean4/src/putnam_2002_b6.lean index 8e917665..09d84c2c 100644 --- a/lean4/src/putnam_2002_b6.lean +++ b/lean4/src/putnam_2002_b6.lean @@ -3,6 +3,20 @@ open BigOperators open Nat Set Topology Filter Matrix MvPolynomial +/-- +Let $p$ be a prime number. Prove that the determinant of the matrix +\[ +\begin{pmatrix} +x & y & z \\ +x^p & y^p & z^p \\ +x^{p^2} & y^{p^2} & z^{p^2} +\end{pmatrix} +\] +is congruent modulo $p$ to a product of polynomials of the form +$ax+by+cz$, where $a,b,c$ are integers. (We say two integer +polynomials are congruent modulo $p$ if corresponding coefficients +are congruent modulo $p$.) +-/ theorem putnam_2002_b6 (p : ℕ) (hp : Nat.Prime p) diff --git a/lean4/src/putnam_2003_a1.lean b/lean4/src/putnam_2003_a1.lean index 9befcaf5..33bea4cb 100644 --- a/lean4/src/putnam_2003_a1.lean +++ b/lean4/src/putnam_2003_a1.lean @@ -6,6 +6,9 @@ open MvPolynomial -- Note: uses (ℕ → ℤ) instead of (Fin k → ℤ) abbrev putnam_2003_a1_solution : ℕ → ℕ := sorry -- fun n => n +/-- +Let $n$ be a fixed positive integer. How many ways are there to write $n$ as a sum of positive integers, \[ n = a_1 + a_2 + \dots + a_k, \] with $k$ an arbitrary positive integer and $a_1 \leq a_2 \leq \dots \leq a_k \leq a_1 + 1$? For example, with $n = 4$, there are four ways: $4, 2 + 2, 1 + 1 + 2, 1 + 1 + 1 + 1$ +-/ theorem putnam_2003_a1 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_2003_a2.lean b/lean4/src/putnam_2003_a2.lean index 14e5b733..fe66e933 100644 --- a/lean4/src/putnam_2003_a2.lean +++ b/lean4/src/putnam_2003_a2.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial +/-- +Let $a_1,a_2,\dots,a_n$ and $b_1,b_2,\dots,b_n$ be nonnegative real numbers. Show that $(a_1a_2 \cdots a_n)^{1/n}+(b_1b_2 \cdots b_n)^{1/n} \leq [(a_1+b_1)(a_2+b_2) \cdots (a_n+b_n)]^{1/n}$. +-/ theorem putnam_2003_a2 (n : ℕ) (hn : 0 < n) diff --git a/lean4/src/putnam_2003_a3.lean b/lean4/src/putnam_2003_a3.lean index 5b2bd3e0..13181842 100644 --- a/lean4/src/putnam_2003_a3.lean +++ b/lean4/src/putnam_2003_a3.lean @@ -5,6 +5,9 @@ open MvPolynomial noncomputable abbrev putnam_2003_a3_solution : ℝ := sorry -- 2 * Real.sqrt 2 - 1 +/-- +Find the minimum value of $|\sin x+\cos x+\tan x+\cot x+\sec x+\csc x|$ for real numbers $x$. +-/ theorem putnam_2003_a3 (f : ℝ → ℝ) (hf : ∀ x : ℝ, f x = |Real.sin x + Real.cos x + Real.tan x + 1 / Real.tan x + 1 / Real.cos x + 1 / Real.sin x|) diff --git a/lean4/src/putnam_2003_a4.lean b/lean4/src/putnam_2003_a4.lean index 6b7106ef..6148a806 100644 --- a/lean4/src/putnam_2003_a4.lean +++ b/lean4/src/putnam_2003_a4.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial +/-- +Suppose that $a,b,c,A,B,C$ are real numbers, $a \ne 0$ and $A \ne 0$, such that $|ax^2+bx+c| \leq |Ax^2+Bx+C|$ for all real numbers $x$. Show that $|b^2-4ac| \leq |B^2-4AC|$. +-/ theorem putnam_2003_a4 (a b c A B C : ℝ) (aAne0 : a ≠ 0 ∧ A ≠ 0) diff --git a/lean4/src/putnam_2003_a5.lean b/lean4/src/putnam_2003_a5.lean index 91baf952..a7a5a84a 100644 --- a/lean4/src/putnam_2003_a5.lean +++ b/lean4/src/putnam_2003_a5.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial Set +/-- +A Dyck $n$-path is a lattice path of $n$ upsteps $(1,1)$ and $n$ downsteps $(1,-1)$ that starts at the origin $O$ and never dips below the $x$-axis. A return is a maximal sequence of contiguous downsteps that terminates on the $x$-axis. Show that there is a one-to-one correspondence between the Dyck $n$-paths with no return of even length and the Dyck $(n-1)$-paths. +-/ theorem putnam_2003_a5 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2003_a6.lean b/lean4/src/putnam_2003_a6.lean index 84064029..2d7d7463 100644 --- a/lean4/src/putnam_2003_a6.lean +++ b/lean4/src/putnam_2003_a6.lean @@ -5,6 +5,9 @@ open MvPolynomial Set abbrev putnam_2003_a6_solution : Prop := sorry -- True +/-- +For a set $S$ of nonnegative integers, let $r_S(n)$ denote the number of ordered pairs $(s_1,s_2)$ such that $s_1 \in S$, $s_2 \in S$, $s_1 \ne s_2$, and $s_1+s_2=n$. Is it possible to partition the nonnegative integers into two sets $A$ and $B$ in such a way that $r_A(n)=r_B(n)$ for all $n$? +-/ theorem putnam_2003_a6 (r : Set ℕ → ℕ → ℕ) (hr : ∀ (S : Set ℕ) (n : ℕ), r S n = ∑' s1 : S, ∑' s2 : S, if (s1 ≠ s2 ∧ s1 + s2 = n) then 1 else 0) diff --git a/lean4/src/putnam_2003_b1.lean b/lean4/src/putnam_2003_b1.lean index 0b6e3cd1..9c75e09a 100644 --- a/lean4/src/putnam_2003_b1.lean +++ b/lean4/src/putnam_2003_b1.lean @@ -5,6 +5,9 @@ open MvPolynomial Set abbrev putnam_2003_b1_solution : Prop := sorry -- False +/-- +Do there exist polynomials $a(x), b(x), c(y), d(y)$ such that \[ 1 + xy + x^2y^2 = a(x)c(y) + b(x)d(y)\] holds identically? +-/ theorem putnam_2003_b1 : (∃ a b c d : Polynomial ℝ, (∀ x y : ℝ, 1 + x * y + x ^ 2 * y ^ 2 = a.eval x * c.eval y + b.eval x * d.eval y)) ↔ putnam_2003_b1_solution := sorry diff --git a/lean4/src/putnam_2003_b2.lean b/lean4/src/putnam_2003_b2.lean index da894e19..af76c6f5 100644 --- a/lean4/src/putnam_2003_b2.lean +++ b/lean4/src/putnam_2003_b2.lean @@ -4,6 +4,9 @@ open BigOperators open MvPolynomial Set -- uses (ℕ → ℕ → ℚ) instead of (Fin n → Icc 1 n → ℚ) +/-- +Let $n$ be a positive integer. Starting with the sequence $$1, \frac{1}{2}, \frac{1}{3}, \dots, \frac{1}{n},$$ form a new sequence of $n-1$ entries $$\frac{3}{4}, \frac{5}{12}, \dots, \frac{2n-1}{2n(n-1)}$$ by taking the averages of two consecutive entries in the first sequence. Repeat the averaging of neighbors on the second sequence to obtain a third sequence of $n-2$ entries, and continue until the final sequence produced consists of a single number $x_n$. Show that $x_n < 2/n$. +-/ theorem putnam_2003_b2 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_2003_b3.lean b/lean4/src/putnam_2003_b3.lean index 7ed5f6c4..af1ef621 100644 --- a/lean4/src/putnam_2003_b3.lean +++ b/lean4/src/putnam_2003_b3.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial Set Nat +/-- +Show that for each positive integer $n$, $n!=\prod_{i=1}^n \text{lcm}\{1,2,\dots,\lfloor n/i \rfloor\}$. (Here lcm denotes the least common multiple, and $\lfloor x \rfloor$ denotes the greatest integer $\leq x$.) +-/ theorem putnam_2003_b3 (n : ℕ) : n ! = ∏ i in Finset.Icc 1 n, ((List.range ⌊n / i⌋₊).map succ).foldl Nat.lcm 1 := by sorry diff --git a/lean4/src/putnam_2003_b4.lean b/lean4/src/putnam_2003_b4.lean index 34ad086f..1ec728a0 100644 --- a/lean4/src/putnam_2003_b4.lean +++ b/lean4/src/putnam_2003_b4.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial Set Nat +/-- +Let $f(z)=az^4+bz^3+cz^2+dz+e=a(z-r_1)(z-r_2)(z-r_3)(z-r_4)$ where $a,b,c,d,e$ are integers, $a \neq 0$. Show that if $r_1+r_2$ is a rational number and $r_1+r_2 \neq r_3+r_4$, then $r_1r_2$ is a rational number. +-/ theorem putnam_2003_b4 (f : ℝ → ℝ) (a b c d e : ℤ) diff --git a/lean4/src/putnam_2003_b5.lean b/lean4/src/putnam_2003_b5.lean index 216b5822..5a0c159d 100644 --- a/lean4/src/putnam_2003_b5.lean +++ b/lean4/src/putnam_2003_b5.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial Set Nat +/-- +Let $A,B$, and $C$ be equidistant points on the circumference of a circle of unit radius centered at $O$, and let $P$ be any point in the circle's interior. Let $a, b, c$ be the distance from $P$ to $A, B, C$, respectively. Show that there is a triangle with side lengths $a, b, c$, and that the area of this triangle depends only on the distance from $P$ to $O$. +-/ theorem putnam_2003_b5 (A B C : EuclideanSpace ℝ (Fin 2)) (hABC : dist 0 A = 1 ∧ dist 0 B = 1 ∧ dist 0 C = 1 ∧ dist A B = dist A C ∧ dist A B = dist B C) diff --git a/lean4/src/putnam_2003_b6.lean b/lean4/src/putnam_2003_b6.lean index edc933b5..2e9119d4 100644 --- a/lean4/src/putnam_2003_b6.lean +++ b/lean4/src/putnam_2003_b6.lean @@ -3,6 +3,9 @@ open BigOperators open MvPolynomial Set Nat +/-- +Let $f(x)$ be a continuous real-valued function defined on the interval $[0,1]$. Show that \[ \int_0^1 \int_0^1 | f(x) + f(y) |\,dx\,dy \geq \int_0^1 |f(x)|\,dx. \] +-/ theorem putnam_2003_b6 (f : ℝ → ℝ) (hf : Continuous f) diff --git a/lean4/src/putnam_2004_a1.lean b/lean4/src/putnam_2004_a1.lean index 57c88a62..f56371ff 100644 --- a/lean4/src/putnam_2004_a1.lean +++ b/lean4/src/putnam_2004_a1.lean @@ -5,6 +5,9 @@ open Nat Topology Filter abbrev putnam_2004_a1_solution : Prop := sorry -- True +/-- +Basketball star Shanille O'Keal's team statistician keeps track of the number, $S(N)$, of successful free throws she has made in her first $N$ attempts of the season. Early in the season, $S(N)$ was less than $80\%$ of $N$, but by the end of the season, $S(N)$ was more than $80\%$ of $N$. Was there necessarily a moment in between when $S(N)$ was exactly $80\%$ of $N$? +-/ theorem putnam_2004_a1 (S : (ℕ → Fin 2) → ℕ → ℝ) (hS : ∀ attempts : ℕ → Fin 2, ∀ N ≥ 1, S attempts N = (∑ i : Fin N, (attempts i).1) / N) diff --git a/lean4/src/putnam_2004_a3.lean b/lean4/src/putnam_2004_a3.lean index a053ccfb..18740e6f 100644 --- a/lean4/src/putnam_2004_a3.lean +++ b/lean4/src/putnam_2004_a3.lean @@ -3,6 +3,12 @@ open BigOperators open Nat Topology Filter +/-- +Define a sequence $\{u_n\}_{n=0}^\infty$ by $u_0=u_1=u_2=1$, and thereafter by the condition that $\det \begin{pmatrix} +u_n & u_{n+1} \\ +u_{n+2} & u_{n+3} +\end{pmatrix} = n!$ for all $n \geq 0$. Show that $u_n$ is an integer for all $n$. (By convention, $0!=1$.) +-/ theorem putnam_2004_a3 (u : ℕ → ℝ) (hubase : u 0 = 1 ∧ u 1 = 1 ∧ u 2 = 1) diff --git a/lean4/src/putnam_2004_a4.lean b/lean4/src/putnam_2004_a4.lean index 293a04db..6a052716 100644 --- a/lean4/src/putnam_2004_a4.lean +++ b/lean4/src/putnam_2004_a4.lean @@ -4,6 +4,9 @@ open BigOperators open Nat Topology Filter -- Note: uses (ℕ → Fin n → ℝ) instead of (Fin N → Fin n → ℝ) +/-- +Show that for any positive integer $n$ there is an integer $N$ such that the product $x_1x_2 \cdots x_n$ can be expressed identically in the form $x_1x_2 \cdots x_n=\sum_{i=1}^Nc_i(a_{i1}x_1+a_{i2}x_2+\cdots+a_{in}x_n)^n$ where the $c_i$ are rational numbers and each $a_{ij}$ is one of the numbers $-1,0,1$. +-/ theorem putnam_2004_a4 (n : ℕ) (x : Fin n → ℝ) diff --git a/lean4/src/putnam_2004_a5.lean b/lean4/src/putnam_2004_a5.lean index 93581873..bcc1c49d 100644 --- a/lean4/src/putnam_2004_a5.lean +++ b/lean4/src/putnam_2004_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +An $m \times n$ checkerboard is colored randomly: each square is independently assigned red or black with probability $1/2$. We say that two squares, $p$ and $q$, are in the same connected monochromatic region if there is a sequence of squares, all of the same color, starting at $p$ and ending at $q$, in which successive squares in the sequence share a common side. Show that the expected number of connected monochromatic regions is greater than $m n / 8$. +-/ theorem putnam_2004_a5 (m n : ℕ) (mnpos : Inhabited (Fin m × Fin n)) diff --git a/lean4/src/putnam_2004_a6.lean b/lean4/src/putnam_2004_a6.lean index ff4f5435..a44f00b6 100644 --- a/lean4/src/putnam_2004_a6.lean +++ b/lean4/src/putnam_2004_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +Suppose that $f(x,y)$ is a continuous real-valued function on the unit square $0 \leq x \leq 1,0 \leq y \leq 1$. Show that $\int_0^1 \left(\int_0^1 f(x,y)dx\right)^2dy+\int_0^1 \left(\int_0^1 f(x,y)dy\right)^2dx \leq \left(\int_0^1 \int_0^1 f(x,y)dx\,dy\right)^2+\int_0^1 \int_0^1 [f(x,y)]^2dx\,dy$. +-/ theorem putnam_2004_a6 (f : (Set.Icc (0 : ℝ) 1 × Set.Icc (0 : ℝ) 1) → ℝ) (fcont : Continuous f) diff --git a/lean4/src/putnam_2004_b1.lean b/lean4/src/putnam_2004_b1.lean index 33f11520..e3e5a544 100644 --- a/lean4/src/putnam_2004_b1.lean +++ b/lean4/src/putnam_2004_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +Let $P(x)=c_nx^n+c_{n-1}x^{n-1}+\cdots+c_0$ be a polynomial with integer coefficients. Suppose that $r$ is a rational number such that $P(r)=0$. Show that the $n$ numbers $c_nr,\,c_nr^2+c_{n-1}r,\,c_nr^3+c_{n-1}r^2+c_{n-2}r,\dots,\,c_nr^n+c_{n-1}r^{n-1}+\cdots+c_1r$ are integers. +-/ theorem putnam_2004_b1 (n : ℕ) (P : Polynomial ℤ) diff --git a/lean4/src/putnam_2004_b2.lean b/lean4/src/putnam_2004_b2.lean index eda1f0db..86c1b6a3 100644 --- a/lean4/src/putnam_2004_b2.lean +++ b/lean4/src/putnam_2004_b2.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +Let $m$ and $n$ be positive integers. Show that $\frac{(m+n)!}{(m+n)^{m+n}}<\frac{m!}{m^m}\frac{n!}{n^n}$. +-/ theorem putnam_2004_b2 (m n : ℕ) (mnpos : m > 0 ∧ n > 0) diff --git a/lean4/src/putnam_2004_b4.lean b/lean4/src/putnam_2004_b4.lean index 84e5d6ad..a0e00859 100644 --- a/lean4/src/putnam_2004_b4.lean +++ b/lean4/src/putnam_2004_b4.lean @@ -5,6 +5,9 @@ open Nat Topology Filter abbrev putnam_2004_b4_solution : ℕ → ℂ → ℂ := sorry -- fun n z ↦ z + n +/-- +Let $n$ be a positive integer, $n \ge 2$, and put $\theta = 2 \pi / n$. Define points $P_k = (k,0)$ in the $xy$-plane, for $k = 1, 2, \dots, n$. Let $R_k$ be the map that rotates the plane counterclockwise by the angle $\theta$ about the point $P_k$. Let $R$ denote the map obtained by applying, in order, $R_1$, then $R_2, \dots$, then $R_n$. For an arbitrary point $(x,y)$, find, and simplify, the coordinates of $R(x,y)$. +-/ theorem putnam_2004_b4 (n : ℕ) (nge2 : n ≥ 2) diff --git a/lean4/src/putnam_2004_b5.lean b/lean4/src/putnam_2004_b5.lean index 53ef98d2..7ce119cd 100644 --- a/lean4/src/putnam_2004_b5.lean +++ b/lean4/src/putnam_2004_b5.lean @@ -5,6 +5,9 @@ open Nat Topology Filter abbrev putnam_2004_b5_solution : ℝ := sorry -- 2 / Real.exp 1 +/-- +Evaluate $\lim_{x \to 1^-} \prod_{n=0}^\infty \left(\frac{1+x^{n+1}}{1+x^n}\right)^{x^n}$. +-/ theorem putnam_2004_b5 (xprod : ℝ → ℝ) (hxprod : ∀ x ∈ Set.Ioo 0 1, diff --git a/lean4/src/putnam_2004_b6.lean b/lean4/src/putnam_2004_b6.lean index 6e4b9cb3..dbf5f9f8 100644 --- a/lean4/src/putnam_2004_b6.lean +++ b/lean4/src/putnam_2004_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Topology Filter +/-- +Let $\mathcal{A}$ be a non-empty set of positive integers, and let $N(x)$ denote the number of elements of $\mathcal{A}$ not exceeding $x$. Let $\mathcal{B}$ denote the set of positive integers $b$ that can be written in the form $b=a-a'$ with $a \in \mathcal{A}$ and $a' \in \mathcal{A}$. Let $b_1 0 → (∃ k : ℕ, ∃ a : Fin k → Fin 2 → ℕ, n = ∑ i : Fin k, 2^(a i 0)*3^(a i 1) ∧ (∀ i j : Fin k, i ≠ j → ¬(2^(a i 0)*3^(a i 1) ∣ 2^(a j 0)*3^(a j 1)))) := diff --git a/lean4/src/putnam_2005_a2.lean b/lean4/src/putnam_2005_a2.lean index 681109e9..d34c3a89 100644 --- a/lean4/src/putnam_2005_a2.lean +++ b/lean4/src/putnam_2005_a2.lean @@ -6,6 +6,19 @@ open Nat Set -- uses (ℕ → ℤ × ℤ) instead of (Icc 1 (3 * n) → ℤ × ℤ) abbrev putnam_2005_a2_solution : ℕ → ℕ := sorry -- fun n ↦ if n = 1 then 0 else 2 ^ (n - 2) +/-- +Let $\mathbf{S} = \{(a,b) | a = 1, 2, \dots,n, b = 1,2,3\}$. +A \emph{rook tour} of $\mathbf{S}$ is a polygonal path made up of line segments connecting points $p_1, p_2, \dots, p_{3n}$ in sequence such that +\begin{enumerate} +\item[(i)] $p_i \in \mathbf{S}$, +\item[(ii)] $p_i$ and $p_{i+1}$ are a unit distance apart, for +$1 \leq i <3n$, +\item[(iii)] for each $p \in \mathbf{S}$ there is a unique $i$ such that +$p_i = p$. +\end{enumerate} +How many rook tours are there that begin at $(1,1)$ +and end at $(n,1)$? +-/ theorem putnam_2005_a2 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2005_a3.lean b/lean4/src/putnam_2005_a3.lean index 56f30a2b..6587a7ef 100644 --- a/lean4/src/putnam_2005_a3.lean +++ b/lean4/src/putnam_2005_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set +/-- +Let $p(z)$ be a polynomial of degree $n$ all of whose zeros have absolute value $1$ in the complex plane. Put $g(z)=p(z)/z^{n/2}$. Show that all zeros of $g'(z)=0$ have absolute value $1$. +-/ theorem putnam_2005_a3 (p : Polynomial ℂ) (n : ℕ) diff --git a/lean4/src/putnam_2005_a4.lean b/lean4/src/putnam_2005_a4.lean index 88a5f133..092cb8c6 100644 --- a/lean4/src/putnam_2005_a4.lean +++ b/lean4/src/putnam_2005_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set +/-- +Let $H$ be an $n \times n$ matrix all of whose entries are $\pm 1$ and whose rows are mutually orthogonal. Suppose $H$ has an $a \times b$ submatrix whose entries are all $1$. Show that $ab \leq n$. +-/ theorem putnam_2005_a4 (n : ℕ) (H : Matrix (Fin n) (Fin n) ℝ) diff --git a/lean4/src/putnam_2005_a5.lean b/lean4/src/putnam_2005_a5.lean index 13337efa..f9a7fbb5 100644 --- a/lean4/src/putnam_2005_a5.lean +++ b/lean4/src/putnam_2005_a5.lean @@ -5,5 +5,8 @@ open Nat Set noncomputable abbrev putnam_2005_a5_solution : ℝ := sorry -- Real.pi * (Real.log 2) / 8 +/-- +Evaluate $\int_0^1 \frac{\ln(x+1)}{x^2+1}\,dx$. +-/ theorem putnam_2005_a5 : ∫ x in (0:ℝ)..1, (Real.log (x+1))/(x^2 + 1) = putnam_2005_a5_solution := sorry diff --git a/lean4/src/putnam_2005_b1.lean b/lean4/src/putnam_2005_b1.lean index f54731b2..13311edd 100644 --- a/lean4/src/putnam_2005_b1.lean +++ b/lean4/src/putnam_2005_b1.lean @@ -6,6 +6,9 @@ open Nat Set -- Note: There might be multiple possible correct answers. noncomputable abbrev putnam_2005_b1_solution : MvPolynomial (Fin 2) ℝ := sorry -- (MvPolynomial.X 1 - 2 * MvPolynomial.X 0) * (MvPolynomial.X 1 - 2 * MvPolynomial.X 0 - 1) +/-- +Find a nonzero polynomial $P(x,y)$ such that $P(\lfloor a \rfloor,\lfloor 2a \rfloor)=0$ for all real numbers $a$. (Note: $\lfloor \nu \rfloor$ is the greatest integer less than or equal to $\nu$.) +-/ theorem putnam_2005_b1 : putnam_2005_b1_solution ≠ 0 ∧ ∀ a : ℝ, MvPolynomial.eval (fun n : Fin 2 => if (n = 0) then (Int.floor a : ℝ) else (Int.floor (2 * a))) putnam_2005_b1_solution = 0 := sorry diff --git a/lean4/src/putnam_2005_b2.lean b/lean4/src/putnam_2005_b2.lean index fb93d994..6d1f6558 100644 --- a/lean4/src/putnam_2005_b2.lean +++ b/lean4/src/putnam_2005_b2.lean @@ -6,6 +6,9 @@ open Nat Set -- Note: uses ℕ → ℕ instead of Fin n → ℕ abbrev putnam_2005_b2_solution : Set (ℕ × (ℕ → ℤ)) := sorry -- {(n, k) : ℕ × (ℕ → ℤ) | (n = 1 ∧ k 0 = 1) ∨ (n = 3 ∧ (k '' {0, 1, 2} = {2, 3, 6})) ∨ (n = 4 ∧ (∀ i : Fin 4, k i = 4))} +/-- +Find all positive integers $n,k_1,\dots,k_n$ such that $k_1+\cdots+k_n=5n-4$ and $\frac{1}{k_1}+\cdots+\frac{1}{k_n}=1$. +-/ theorem putnam_2005_b2 : {((n : ℕ), (k : ℕ → ℤ)) | (n > 0) ∧ (∀ i ∈ Finset.range n, k i > 0) ∧ (∑ i in Finset.range n, k i = 5 * n - 4) ∧ (∑ i : Finset.range n, (1 : ℝ) / (k i) = 1)} = putnam_2005_b2_solution := sorry diff --git a/lean4/src/putnam_2005_b3.lean b/lean4/src/putnam_2005_b3.lean index 2805ce51..6b968603 100644 --- a/lean4/src/putnam_2005_b3.lean +++ b/lean4/src/putnam_2005_b3.lean @@ -5,6 +5,9 @@ open Nat Set abbrev putnam_2005_b3_solution : Set (ℝ → ℝ) := sorry -- {f : ℝ → ℝ | ∃ᵉ (c > 0) (d > (0 : ℝ)), (d = 1 → c = 1) ∧ (Ioi 0).EqOn f (fun x ↦ c * x ^ d)} +/-- +Find all differentiable functions $f:(0,\infty) \to (0,\infty)$ for which there is a positive real number $a$ such that $f'(\frac{a}{x})=\frac{x}{f(x)}$ for all $x>0$. +-/ theorem putnam_2005_b3 (f : ℝ → ℝ) (hf : ∀ x > 0, 0 < f x) diff --git a/lean4/src/putnam_2005_b4.lean b/lean4/src/putnam_2005_b4.lean index 3783f164..d601748f 100644 --- a/lean4/src/putnam_2005_b4.lean +++ b/lean4/src/putnam_2005_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set +/-- +For positive integers $m$ and $n$, let $f(m,n)$ denote the number of $n$-tuples $(x_1,x_2,\dots,x_n)$ of integers such that $|x_1|+|x_2|+\cdots+|x_n| \leq m$. Show that $f(m,n)=f(n,m)$. +-/ theorem putnam_2005_b4 (m n : ℤ) (mnpos : m > 0 ∧ n > 0) diff --git a/lean4/src/putnam_2005_b5.lean b/lean4/src/putnam_2005_b5.lean index 460827f6..4e3e86e4 100644 --- a/lean4/src/putnam_2005_b5.lean +++ b/lean4/src/putnam_2005_b5.lean @@ -3,6 +3,17 @@ open BigOperators open Nat Set +/-- +Let $P(x_1,\dots,x_n)$ denote a polynomial with real coefficients in the variables $x_1, \dots, x_n$, and suppose that +\[ +\left( \frac{\partial^2}{\partial x_1^2} + \cdots + \frac{\partial^2}{\partial x_n^2}\right) P(x_1, \dots,x_n) = 0 \quad \mbox{(identically)} +\] +and that +\[ +x_1^2 + \cdots + x_n^2 \mbox{ divides } P(x_1, \dots, x_n). +\] +Show that $P=0$ identically. +-/ theorem putnam_2005_b5 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2005_b6.lean b/lean4/src/putnam_2005_b6.lean index 62d6ec62..cbfd5e88 100644 --- a/lean4/src/putnam_2005_b6.lean +++ b/lean4/src/putnam_2005_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Nat Set +/-- +Let $S_n$ denote the set of all permutations of the numbers $1,2,\dots,n$. For $\pi \in S_n$, let $\sigma(\pi)=1$ if $\pi$ is an even permutation and $\sigma(\pi)=-1$ if $\pi$ is an odd permutation. Also, let $\nu(\pi)$ denote the number of fixed points of $\pi$. Show that $\sum_{\pi \in S_n} \frac{\sigma(\pi)}{\nu(\pi)+1}=(-1)^{n+1}\frac{n}{n+1}$. +-/ theorem putnam_2005_b6 (n : ℕ) (v : Equiv.Perm (Fin n) → ℕ) diff --git a/lean4/src/putnam_2006_a1.lean b/lean4/src/putnam_2006_a1.lean index 9a269e14..9f1eb76b 100644 --- a/lean4/src/putnam_2006_a1.lean +++ b/lean4/src/putnam_2006_a1.lean @@ -3,6 +3,12 @@ open BigOperators noncomputable abbrev putnam_2006_a1_solution : ℝ := sorry -- 6 * Real.pi ^ 2 +/-- +Find the volume of the region of points $(x,y,z)$ such that +\[ +(x^2 + y^2 + z^2 + 8)^2 \leq 36(x^2 + y^2). +\] +-/ theorem putnam_2006_a1 : ((MeasureTheory.volume {(x, y, z) : ℝ × ℝ × ℝ | (x ^ 2 + y ^ 2 + z ^ 2 + 8) ^ 2 ≤ 36 * (x ^ 2 + y ^ 2)}).toReal = putnam_2006_a1_solution) := sorry diff --git a/lean4/src/putnam_2006_a3.lean b/lean4/src/putnam_2006_a3.lean index 38b9a0a0..5688da0e 100644 --- a/lean4/src/putnam_2006_a3.lean +++ b/lean4/src/putnam_2006_a3.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $1, 2, 3, \dots, 2005, 2006, 2007, 2009, 2012, 2016, \dots$ be a sequence defined by $x_k = k$ for $k=1, 2, \dots, 2006$ and $x_{k+1} = x_k + x_{k-2005}$ for $k \geq 2006$. Show that the sequence has $2005$ consecutive terms each divisible by $2006$. +-/ theorem putnam_2006_a3 (x : ℤ → ℤ) (hxlo : ∀ k : ℤ, 0 ≤ k ∧ k ≤ 2006 → x k = k) diff --git a/lean4/src/putnam_2006_a4.lean b/lean4/src/putnam_2006_a4.lean index d3abe035..5fff1d40 100644 --- a/lean4/src/putnam_2006_a4.lean +++ b/lean4/src/putnam_2006_a4.lean @@ -4,6 +4,15 @@ open BigOperators -- Note: uses (ℕ → ℕ) instead of (Equiv.Perm (Fin n)) noncomputable abbrev putnam_2006_a4_solution : ℕ → ℝ := sorry -- (fun n : ℕ => (n + 1) / 3) +/-- +Let $S=\{1,2,\dots,n\}$ for some integer $n>1$. Say a permutation $\pi$ of $S$ has a \emph{local maximum} at $k \in S$ if +\begin{enumerate} +\item[(i)] $\pi(k)>\pi(k+1)$ for $k=1$; +\item[(ii)] $\pi(k-1)<\pi(k)$ and $\pi(k)>\pi(k+1)$ for $1 if (n ≡ 1 [MOD 4]) then n else -n) +/-- +Let $n$ be a positive odd integer and let $\theta$ be a real number such that $\theta/\pi$ is irrational. Set $a_k=\tan(\theta+k\pi/n)$, $k=1,2,\dots,n$. Prove that $\frac{a_1+a_2+\cdots+a_n}{a_1a_2 \cdots a_n}$ is an integer, and determine its value. +-/ theorem putnam_2006_a5 (n : ℕ) (theta : ℝ) diff --git a/lean4/src/putnam_2006_b1.lean b/lean4/src/putnam_2006_b1.lean index 83933397..5216da35 100644 --- a/lean4/src/putnam_2006_b1.lean +++ b/lean4/src/putnam_2006_b1.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_2006_b1_solution : ℝ := sorry -- 3 * Real.sqrt 3 / 2 +/-- +Show that the curve $x^3 + 3xy + y^3 = 1$ contains only one set of three distinct points, $A$, $B$, and $C$, which are vertices of an equilateral triangle, and find its area. +-/ theorem putnam_2006_b1 (curve : Set (ℝ × ℝ)) (hcurve : curve = {(x, y) | x ^ 3 + 3 * x * y + y ^ 3 = 1}) diff --git a/lean4/src/putnam_2006_b2.lean b/lean4/src/putnam_2006_b2.lean index 8e14beb7..bdea7615 100644 --- a/lean4/src/putnam_2006_b2.lean +++ b/lean4/src/putnam_2006_b2.lean @@ -1,6 +1,12 @@ import Mathlib open BigOperators +/-- +Prove that, for every set $X = \{x_1, x_2, \dots, x_n\}$ of $n$ real numbers, there exists a non-empty subset $S$ of $X$ and an integer $m$ such that +\[ +\left| m + \sum_{s \in S} s \right| \leq \frac{1}{n+1}. +\] +-/ theorem putnam_2006_b2 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2006_b3.lean b/lean4/src/putnam_2006_b3.lean index 029580b4..0a083087 100644 --- a/lean4/src/putnam_2006_b3.lean +++ b/lean4/src/putnam_2006_b3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_2006_b3_solution : ℕ → ℕ := sorry -- (fun n : ℕ => (Nat.choose n 2) + 1) +/-- +Let $S$ be a finite set of points in the plane. A linear partition of $S$ is an unordered pair $\{A,B\}$ of subsets of $S$ such that $A \cup B=S$, $A \cap B=\emptyset$, and $A$ and $B$ lie on opposite sides of some straight line disjoint from $S$ ($A$ or $B$ may be empty). Let $L_S$ be the number of linear partitions of $S$. For each positive integer $n$, find the maximum of $L_S$ over all sets $S$ of $n$ points. +-/ theorem putnam_2006_b3 (IsLinearPartition : Finset (Fin 2 → ℝ) → Finset (Finset (Fin 2 → ℝ)) → Prop) (IsLinearPartition_def : ∀ S AB, IsLinearPartition S AB ↔ diff --git a/lean4/src/putnam_2006_b4.lean b/lean4/src/putnam_2006_b4.lean index 54d58f97..dd44dc10 100644 --- a/lean4/src/putnam_2006_b4.lean +++ b/lean4/src/putnam_2006_b4.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_2006_b4_solution : ℕ → ℕ := sorry -- fun k ↦ 2 ^ k +/-- +Let $Z$ denote the set of points in $\mathbb{R}^n$ whose coordinates are $0$ or $1$. (Thus $Z$ has $2^n$ elements, which are the vertices of a unit hypercube in $\mathbb{R}^n$.) Given a vector subspace $V$ of $\mathbb{R}^n$, let $Z(V)$ denote the number of members of $Z$ that lie in $V$. Let $k$ be given, $0 \leq k \leq n$. Find the maximum, over all vector subspaces $V \subseteq \mathbb{R}^n$ of dimension $k$, of the number of points in $V \cap Z$. +-/ theorem putnam_2006_b4 (n k max : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2006_b5.lean b/lean4/src/putnam_2006_b5.lean index de4196f4..f117a7ca 100644 --- a/lean4/src/putnam_2006_b5.lean +++ b/lean4/src/putnam_2006_b5.lean @@ -5,6 +5,9 @@ open Set noncomputable abbrev putnam_2006_b5_solution : ℝ := sorry -- 1 / 16 +/-- +For each continuous function $f: [0,1] \to \mathbb{R}$, let $I(f) = \int_0^1 x^2 f(x)\,dx$ and $J(x) = \int_0^1 x \left(f(x)\right)^2\,dx$. Find the maximum value of $I(f) - J(f)$ over all such functions $f$. +-/ theorem putnam_2006_b5 (I J : (ℝ → ℝ) → ℝ) (hI : I = fun f ↦ ∫ x in (0)..1, x ^ 2 * (f x)) diff --git a/lean4/src/putnam_2006_b6.lean b/lean4/src/putnam_2006_b6.lean index a3c1cbfa..873bbfea 100644 --- a/lean4/src/putnam_2006_b6.lean +++ b/lean4/src/putnam_2006_b6.lean @@ -5,6 +5,9 @@ open Set Topology Filter noncomputable abbrev putnam_2006_b6_solution : ℕ → ℝ := sorry -- fun k => ((k+1)/k)^k +/-- +Let $k$ be an integer greater than 1. Suppose $a_0 > 0$, and define \[ a_{n+1} = a_n + \frac{1}{\sqrt[k]{a_n}} \] for $n > 0$. Evaluate \[\lim_{n \to \infty} \frac{a_n^{k+1}}{n^k}.\] +-/ theorem putnam_2006_b6 (k : ℕ) (hk : k > 1) diff --git a/lean4/src/putnam_2007_a1.lean b/lean4/src/putnam_2007_a1.lean index a602f92c..7a620699 100644 --- a/lean4/src/putnam_2007_a1.lean +++ b/lean4/src/putnam_2007_a1.lean @@ -4,6 +4,9 @@ open BigOperators abbrev putnam_2007_a1_solution : Set ℝ := sorry -- {2 / 3, 3 / 2, (13 + √601) / 12, (13 - √601) / 12} +/-- +Find all values of $\alpha$ for which the curves $y = \alpha*x^2 + \alpha*x + 1/24$ and $x = \alpha*y^2 + \alpha*y + 1/24$ are tangent to each other. +-/ theorem putnam_2007_a1 (P : (ℝ → ℝ) → Prop) (P_def : ∀ f, P f ↔ ∃ x y, f x = y ∧ f y = x ∧ deriv f x * deriv f y = 1) diff --git a/lean4/src/putnam_2007_a2.lean b/lean4/src/putnam_2007_a2.lean index ab9ae117..36813495 100644 --- a/lean4/src/putnam_2007_a2.lean +++ b/lean4/src/putnam_2007_a2.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_2007_a2_solution : ENNReal := sorry -- 4 +/-- +Find the least possible area of a convex set in the plane that intersects both branches of the hyperbola $xy=1$ and both branches of the hyperbola $xy=-1$. (A set $S$ in the plane is called \emph{convex} if for any two points in $S$ the line segment connecting them is contained in $S$.) +-/ theorem putnam_2007_a2 (Sinterpos Sinterneg Sconv : Set (Fin 2 → ℝ) → Prop) (hSinterpos : ∀ S : Set (Fin 2 → ℝ), Sinterpos S = ((∃ p ∈ S, p 0 > 0 ∧ p 1 > 0 ∧ p 0 * p 1 = 1) ∧ (∃ p ∈ S, p 0 < 0 ∧ p 1 < 0 ∧ p 0 * p 1 = 1))) diff --git a/lean4/src/putnam_2007_a3.lean b/lean4/src/putnam_2007_a3.lean index 0b8a3ec3..1a494806 100644 --- a/lean4/src/putnam_2007_a3.lean +++ b/lean4/src/putnam_2007_a3.lean @@ -6,6 +6,9 @@ open scoped Nat abbrev putnam_2007_a3_solution : ℕ → ℚ := sorry -- fun k ↦ (k)! * (k + 1)! / ((3 * k + 1) * (2 * k)!) +/-- +Let $k$ be a positive integer. Suppose that the integers $1, 2, 3, \dots, 3k+1$ are written down in random order. What is the probability that at no time during this process, the sum of the integers that have been written up to that time is a positive integer divisible by $3$? Your answer should be in closed form, but may include factorials. +-/ theorem putnam_2007_a3 (k : ℕ) (kpos : k > 0) diff --git a/lean4/src/putnam_2007_a4.lean b/lean4/src/putnam_2007_a4.lean index 72167b0a..360451a2 100644 --- a/lean4/src/putnam_2007_a4.lean +++ b/lean4/src/putnam_2007_a4.lean @@ -5,6 +5,9 @@ open Set Nat abbrev putnam_2007_a4_solution : Set (Polynomial ℝ) := sorry -- {f : Polynomial ℝ | ∃ d : ℕ, ∃ c ≥ (1 : ℤ) - d, ∀ n : ℝ, f.eval n = (1 / 9) * ((10 ^ c) * (9 * n + 1) ^ d - 1)} +/-- +A \emph{repunit} is a positive integer whose digits in base 10 are all ones. Find all polynomials $f$ with real coefficients such that if $n$ is a repunit, then so is $f(n)$. +-/ theorem putnam_2007_a4 (S : Set (Polynomial ℝ)) (repunit : ℝ → Prop) diff --git a/lean4/src/putnam_2007_a5.lean b/lean4/src/putnam_2007_a5.lean index 10ca2727..ecf5c3bf 100644 --- a/lean4/src/putnam_2007_a5.lean +++ b/lean4/src/putnam_2007_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Set Nat +/-- +Suppose that a finite group has exactly $n$ elements of order $p$, where $p$ is a prime. Prove that either $n = 0$ or $p$ divides $n+1$. +-/ theorem putnam_2007_a5 (G : Type*) [Group G] [Fintype G] (p n : ℕ) diff --git a/lean4/src/putnam_2007_b1.lean b/lean4/src/putnam_2007_b1.lean index 2c109888..f408626e 100644 --- a/lean4/src/putnam_2007_b1.lean +++ b/lean4/src/putnam_2007_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Set Nat +/-- +Let $f$ be a nonconstant polynomial with positive integer coefficients. Prove that if $n$ is a positive integer, then $f(n)$ divides $f(f(n) + 1)$ if and only if $n = 1$ +-/ theorem putnam_2007_b1 (f : Polynomial ℤ) (hf : ∀ n : ℕ, f.coeff n ≥ 0) diff --git a/lean4/src/putnam_2007_b2.lean b/lean4/src/putnam_2007_b2.lean index b5fa59e0..764359c1 100644 --- a/lean4/src/putnam_2007_b2.lean +++ b/lean4/src/putnam_2007_b2.lean @@ -3,6 +3,13 @@ open BigOperators open Set Nat Function +/-- +Suppose that $f: [0,1] \to \mathbb{R}$ has a continuous derivative and that $\int_0^1 f(x)\,dx = 0$. Prove that for every $\alpha \in (0,1)$, +\[ +\left| \int_0^\alpha f(x)\,dx \right| \leq \frac{1}{8} \max_{0 \leq x +\leq 1} |f'(x)|. +\] +-/ theorem putnam_2007_b2 (f : ℝ → ℝ) (hf : ContDiffOn ℝ 1 f (Icc 0 1)) diff --git a/lean4/src/putnam_2007_b3.lean b/lean4/src/putnam_2007_b3.lean index 518b651a..9d4efe2b 100644 --- a/lean4/src/putnam_2007_b3.lean +++ b/lean4/src/putnam_2007_b3.lean @@ -5,6 +5,9 @@ open Set Nat Function noncomputable abbrev putnam_2007_b3_solution : ℝ := sorry -- (2 ^ 2006 / Real.sqrt 5) * (((1 + Real.sqrt 5) / 2) ^ 3997 - ((1 + Real.sqrt 5) / 2) ^ (-3997 : ℤ)) +/-- +Let $x_0 = 1$ and for $n \geq 0$, let $x_{n+1} = 3x_n + \lfloor x_n \sqrt{5} \rfloor$. In particular, $x_1 = 5$, $x_2 = 26$, $x_3 = 136$, $x_4 = 712$. Find a closed-form expression for $x_{2007}$. ($\lfloor a \rfloor$ means the largest integer $\leq a$.) +-/ theorem putnam_2007_b3 (x : ℕ → ℝ) (hx0 : x 0 = 1) diff --git a/lean4/src/putnam_2007_b4.lean b/lean4/src/putnam_2007_b4.lean index e3c70690..68d4d671 100644 --- a/lean4/src/putnam_2007_b4.lean +++ b/lean4/src/putnam_2007_b4.lean @@ -5,6 +5,13 @@ open Set Nat Function abbrev putnam_2007_b4_solution : ℕ → ℕ := sorry -- fun n ↦ 2 ^ (n + 1) +/-- +Let $n$ be a positive integer. Find the number of pairs $P, Q$ of polynomials with real coefficients such that +\[ +(P(X))^2 + (Q(X))^2 = X^{2n} + 1 +\] +and $\deg P > \deg Q$. +-/ theorem putnam_2007_b4 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2007_b5.lean b/lean4/src/putnam_2007_b5.lean index 3f265f6c..85af96aa 100644 --- a/lean4/src/putnam_2007_b5.lean +++ b/lean4/src/putnam_2007_b5.lean @@ -3,6 +3,15 @@ open BigOperators open Set Nat Function +/-- +Let $k$ be a positive integer. Prove that there exist polynomials $P_0(n), P_1(n), \dots, P_{k-1}(n)$ (which may depend on $k$) such that for any integer $n$, +\[ +\left\lfloor \frac{n}{k} \right\rfloor^k = P_0(n) + P_1(n) \left\lfloor +\frac{n}{k} \right\rfloor + \cdots + P_{k-1}(n) \left\lfloor \frac{n}{k} +\right\rfloor^{k-1}. +\] +($\lfloor a \rfloor$ means the largest integer $\leq a$.) +-/ theorem putnam_2007_b5 (k : ℕ) (kpos : k > 0) diff --git a/lean4/src/putnam_2007_b6.lean b/lean4/src/putnam_2007_b6.lean index a87767a6..7e00d7c2 100644 --- a/lean4/src/putnam_2007_b6.lean +++ b/lean4/src/putnam_2007_b6.lean @@ -3,6 +3,12 @@ open BigOperators open Set Nat Function +/-- +For each positive integer $n$, let $f(n)$ be the number of ways to make $n!$ cents using an unordered collection of coins, each worth $k!$ cents for some $k$, $1 \leq k \leq n$. Prove that for some constant $C$, independent of $n$, +\[ +n^{n^2/2 - Cn} e^{-n^2/4} \leq f(n) \leq n^{n^2/2 + Cn}e^{-n^2/4}. +\] +-/ theorem putnam_2007_b6 (f : ℕ → ℕ) (hf : f = fun n ↦ {M : Multiset ℕ | M.sum = (n)! ∧ ∀ m ∈ M, ∃ k ∈ Icc 1 n, m = (k)!}.ncard) diff --git a/lean4/src/putnam_2008_a1.lean b/lean4/src/putnam_2008_a1.lean index 8b0c4656..a432a71c 100644 --- a/lean4/src/putnam_2008_a1.lean +++ b/lean4/src/putnam_2008_a1.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $f:\mathbb{R}^2 \to \mathbb{R}$ be a function such that $f(x,y)+f(y,z)+f(z,x)=0$ for all real numbers $x$, $y$, and $z$. Prove that there exists a function $g:\mathbb{R} \to \mathbb{R}$ such that $f(x,y)=g(x)-g(y)$ for all real numbers $x$ and $y$. +-/ theorem putnam_2008_a1 (f : ℝ → ℝ → ℝ) (hf : ∀ x y z : ℝ, f x y + f y z + f z x = 0) diff --git a/lean4/src/putnam_2008_a3.lean b/lean4/src/putnam_2008_a3.lean index 43c11554..174fe30b 100644 --- a/lean4/src/putnam_2008_a3.lean +++ b/lean4/src/putnam_2008_a3.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Start with a finite sequence $a_1, a_2, \dots, a_n$ of positive integers. If possible, choose two indices $j < k$ such that $a_j$ does not divide $a_k$, and replace $a_j$ and $a_k$ by $\mathrm{gcd}(a_j, a_k)$ and $\mathrm{lcm}(a_j, a_k)$, respectively. Prove that if this process is repeated, it must eventually stop and the final sequence does not depend on the choices made. +-/ theorem putnam_2008_a3 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2008_a4.lean b/lean4/src/putnam_2008_a4.lean index 52ae2c9f..c2ce696b 100644 --- a/lean4/src/putnam_2008_a4.lean +++ b/lean4/src/putnam_2008_a4.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_2008_a4_solution : Prop := sorry -- False +/-- +Define $f : \mathbb{R} \to \mathbb{R} by $f(x) = x$ if $x \leq e$ and $f(x) = x * f(\ln(x))$ if $x > e$. Does $\sum_{n=1}^{\infty} 1/(f(n))$ converge? +-/ theorem putnam_2008_a4 (f : ℝ → ℝ) (hf : f = fun x => if x ≤ Real.exp 1 then x else x * (f (Real.log x))) diff --git a/lean4/src/putnam_2008_a5.lean b/lean4/src/putnam_2008_a5.lean index b328381b..6c964a69 100644 --- a/lean4/src/putnam_2008_a5.lean +++ b/lean4/src/putnam_2008_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Set +/-- +Let $n \geq 3$ be an integer. Let $f(x)$ and $g(x)$ be polynomials with real coefficients such that the points $(f(1), g(1)), (f(2), g(2)), \dots, (f(n), g(n))$ in $\mathbb{R}^2$ are the vertices of a regular $n$-gon in counterclockwise order. Prove that at least one of $f(x)$ and $g(x)$ has degree greater than or equal to $n-1$. +-/ theorem putnam_2008_a5 (n : ℕ) (nge3 : n ≥ 3) diff --git a/lean4/src/putnam_2008_a6.lean b/lean4/src/putnam_2008_a6.lean index 2e1b783a..697a999a 100644 --- a/lean4/src/putnam_2008_a6.lean +++ b/lean4/src/putnam_2008_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Set +/-- +Prove that there exists a constant $c>0$ such that in every nontrivial finite group $G$ there exists a sequence of length at most $c \log |G|$ with the property that each element of $G$ equals the product of some subsequence. (The elements of $G$ in the sequence are not required to be distinct. A \emph{subsequence} of a sequence is obtained by selecting some of the terms, not necessarily consecutive, without reordering them; for example, $4, 4, 2$ is a subsequence of $2, 4, 6, 4, 2$, but $2, 2, 4$ is not.) +-/ theorem putnam_2008_a6 : ∃ c : ℝ, c > 0 ∧ ∀ G [Group G] (fing : Fintype G), fing.card > 1 → ∃ s : List G, s.length ≤ c * Real.log (fing.card : ℝ) ∧ ∀ g : G, ∃ t : List G, t.Sublist s ∧ t.prod = g := sorry diff --git a/lean4/src/putnam_2008_b1.lean b/lean4/src/putnam_2008_b1.lean index e0e3dcc1..7cbfade5 100644 --- a/lean4/src/putnam_2008_b1.lean +++ b/lean4/src/putnam_2008_b1.lean @@ -7,6 +7,9 @@ abbrev putnam_2008_b1_solution : ℕ := sorry -- 2 def is_rational_point (p : Fin 2 → ℝ) : Prop := ∃ (a b : ℚ), a = p 0 ∧ b = p 1 def real_circle (c : EuclideanSpace ℝ (Fin 2)) (r : ℝ) : Set (EuclideanSpace ℝ (Fin 2)) := {p | dist p c = r} +/-- +What is the maximum number of rational points that can lie on a circle in $\mathbb{R}^2$ whose center is not a rational point? (A \emph{rational point} is a point both of whose coordinates are rational numbers.) +-/ theorem putnam_2008_b1 : ∀ (c : EuclideanSpace ℝ (Fin 2)) (r : ℝ), ¬ is_rational_point c → (Set.ncard {p : EuclideanSpace ℝ (Fin 2) | p ∈ real_circle c r ∧ is_rational_point p} ≤ putnam_2008_b1_solution) ∧ ∃ (c : EuclideanSpace ℝ (Fin 2)) (r : ℝ), ¬ is_rational_point c ∧ (Set.ncard {p : EuclideanSpace ℝ (Fin 2) | p ∈ real_circle c r ∧ is_rational_point p} = putnam_2008_b1_solution) := diff --git a/lean4/src/putnam_2008_b2.lean b/lean4/src/putnam_2008_b2.lean index 9cca21d4..b26ccf7e 100644 --- a/lean4/src/putnam_2008_b2.lean +++ b/lean4/src/putnam_2008_b2.lean @@ -5,6 +5,9 @@ open Filter Topology Set Nat abbrev putnam_2008_b2_solution : ℝ := sorry -- -1 +/-- +Let $F_0(x)=\ln x$. For $n \geq 0$ and $x>0$, let $F_{n+1}(x)=\int_0^x F_n(t)\,dt$. Evaluate $\lim_{n \to \infty} \frac{n!F_n(1)}{\ln n}$. +-/ theorem putnam_2008_b2 (F : ℕ → ℝ → ℝ) (hF0 : ∀ x : ℝ, F 0 x = Real.log x) diff --git a/lean4/src/putnam_2008_b3.lean b/lean4/src/putnam_2008_b3.lean index 405c99a2..e89b0ce0 100644 --- a/lean4/src/putnam_2008_b3.lean +++ b/lean4/src/putnam_2008_b3.lean @@ -5,6 +5,9 @@ open FiniteDimensional Metric Filter Topology Set Nat noncomputable abbrev putnam_2008_b3_solution : ℝ := sorry -- Real.sqrt 2 / 2 +/-- +What is the largest possible radius of a circle contained in a $4$-dimensional hypercube of side length $1$? +-/ theorem putnam_2008_b3 (H : Set (EuclideanSpace ℝ (Fin 4))) (H_def : H = {P : Fin 4 → ℝ | ∀ i : Fin 4, |P i| ≤ 1 / 2}) diff --git a/lean4/src/putnam_2008_b4.lean b/lean4/src/putnam_2008_b4.lean index cc1a6789..d772a3e1 100644 --- a/lean4/src/putnam_2008_b4.lean +++ b/lean4/src/putnam_2008_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Set Nat +/-- +Let $p$ be a prime number. Let $h(x)$ be a polynomial with integer coefficients such that $h(0), h(1), \dots, h(p^2-1)$ are distinct modulo $p^2$. Show that $h(0), h(1), \dots, h(p^3-1)$ are distinct modulo $p^3$. +-/ theorem putnam_2008_b4 (p : ℕ) (hp : Nat.Prime p) diff --git a/lean4/src/putnam_2008_b5.lean b/lean4/src/putnam_2008_b5.lean index 4b97404b..73683741 100644 --- a/lean4/src/putnam_2008_b5.lean +++ b/lean4/src/putnam_2008_b5.lean @@ -5,6 +5,9 @@ open Filter Topology Set Nat abbrev putnam_2008_b5_solution : Set (ℝ → ℝ) := sorry -- {fun (x : ℝ) => x + n | n : ℤ} ∪ {fun (x : ℝ) => -x + n | n : ℤ} +/-- +Find all continuously differentiable functions f : \mathbb{R} \to \mathbb{R} such that for every rational number $q$, the number $f(q)$ is rational and has the same denominator as $q$. +-/ theorem putnam_2008_b5 (fqsat : (ℝ → ℝ) → ℚ → Prop) (hfqsat : fqsat = fun (f : ℝ → ℝ) (q : ℚ) => ContDiff ℝ 1 f ∧ (∃ p : ℚ, p = f q ∧ p.den = q.den)) diff --git a/lean4/src/putnam_2008_b6.lean b/lean4/src/putnam_2008_b6.lean index f1168db5..9c241a86 100644 --- a/lean4/src/putnam_2008_b6.lean +++ b/lean4/src/putnam_2008_b6.lean @@ -4,6 +4,9 @@ open BigOperators open Filter Topology Set Nat def klimited (k n : ℕ) (s : Equiv.Perm (Fin n)) := ∀ i, |((s i) : ℤ) - i| ≤ k +/-- +Let $n$ and $k$ be positive integers. Say that a permutation $\sigma$ of $\{1,2,\dots,n\} is $k-limited$ if \|\sigma(i) - i\| \leq k$ for all $i$. Prove that the number of $k-limited$ permutations $\{1,2,\dots,n\}$ is odd if and only if $n \equiv 0$ or $1 (mod 2k+1)$. +-/ theorem putnam_2008_b6 (n k : ℕ) (hnk : n > 0 ∧ k > 0) diff --git a/lean4/src/putnam_2009_a1.lean b/lean4/src/putnam_2009_a1.lean index c1e5a981..76c3d107 100644 --- a/lean4/src/putnam_2009_a1.lean +++ b/lean4/src/putnam_2009_a1.lean @@ -5,6 +5,9 @@ open Topology MvPolynomial Filter abbrev putnam_2009_a1_solution : Prop := sorry -- True +/-- +Let $f$ be a real-valued function on the plane such that for every square $ABCD$ in the plane, $f(A)+f(B)+f(C)+f(D)=0$. Does it follow that $f(P)=0$ for all points $P$ in the plane? +-/ theorem putnam_2009_a1 : ((∀ f : (ℝ × ℝ) → ℝ, (∀ O v : ℝ × ℝ, v ≠ (0, 0) → f (O.1, O.2) + f (O.1 + v.1, O.2 + v.2) + f (O.1 + v.1 - v.2, O.2 + v.2 + v.1) + f (O.1 - v.2, O.2 + v.1) = 0) → ∀ P : ℝ × ℝ, f P = 0) ↔ putnam_2009_a1_solution) := sorry diff --git a/lean4/src/putnam_2009_a2.lean b/lean4/src/putnam_2009_a2.lean index cef5787a..3e5bfb74 100644 --- a/lean4/src/putnam_2009_a2.lean +++ b/lean4/src/putnam_2009_a2.lean @@ -5,6 +5,16 @@ open Topology MvPolynomial Filter Set noncomputable abbrev putnam_2009_a2_solution : ℝ → ℝ := sorry -- fun x ↦ 2 ^ (-(1 : ℝ) / 12) * (Real.sin (6 * x + Real.pi / 4) / (Real.cos (6 * x + Real.pi / 4)) ^ 2) ^ ((1 : ℝ) / 6) +/-- +Functions $f,g,h$ are differentiable on some open interval around $0$ +and satisfy the equations and initial conditions +\begin{gather*} +f' = 2f^2gh+\frac{1}{gh},\quad f(0)=1, \\ +g'=fg^2h+\frac{4}{fh}, \quad g(0)=1, \\ +h'=3fgh^2+\frac{1}{fg}, \quad h(0)=1. +\end{gather*} +Find an explicit formula for $f(x)$, valid in some open interval around $0$. +-/ theorem putnam_2009_a2 (f g h : ℝ → ℝ) (a b : ℝ) diff --git a/lean4/src/putnam_2009_a3.lean b/lean4/src/putnam_2009_a3.lean index 77799cd3..dfb80b89 100644 --- a/lean4/src/putnam_2009_a3.lean +++ b/lean4/src/putnam_2009_a3.lean @@ -5,6 +5,9 @@ open Topology MvPolynomial Filter Set abbrev putnam_2009_a3_solution : ℝ := sorry -- 0 +/-- +Let $d_n$ be the determinant of the $n \times n$ matrix whose entries, from left to right and then from top to bottom, are $\cos 1, \cos 2, \dots, \cos n^2$. (For example,\[ d_3 = \left|\begin{matrix} \cos 1 & \cos 2 & \cos 3 \\ \cos 4 & \cos 5 & \cos 6 \\ \cos 7 & \cos 8 & \cos 9 \end{matrix} \right|. \]The argument of $\cos$ is always in radians, not degrees.) Evaluate $\lim_{n\to\infty} d_n$. +-/ theorem putnam_2009_a3 (cos_matrix : (n : ℕ) → Matrix (Fin n) (Fin n) ℝ) (hM : ∀ n : ℕ, ∀ i j : Fin n, (cos_matrix n) i j = Real.cos (1 + n * i + j)) diff --git a/lean4/src/putnam_2009_a4.lean b/lean4/src/putnam_2009_a4.lean index ec6c8523..36581d02 100644 --- a/lean4/src/putnam_2009_a4.lean +++ b/lean4/src/putnam_2009_a4.lean @@ -5,6 +5,15 @@ open Topology MvPolynomial Filter Set abbrev putnam_2009_a4_solution : Prop := sorry -- False +/-- +Let $S$ be a set of rational numbers such that +\begin{enumerate} +\item[(a)] $0 \in S$; +\item[(b)] If $x \in S$ then $x+1\in S$ and $x-1\in S$; and +\item[(c)] If $x\in S$ and $x\not\in\{0,1\}$, then $\frac{1}{x(x-1)}\in S$. +\end{enumerate} +Must $S$ contain all rational numbers? +-/ theorem putnam_2009_a4 : ((∀ S : Set ℚ, 0 ∈ S → (∀ x ∈ S, x + 1 ∈ S ∧ x - 1 ∈ S) → (∀ x ∈ S, x ∉ ({0, 1} : Set ℚ) → 1 / (x * (x - 1)) ∈ S) → ∀ r : ℚ, r ∈ S) ↔ putnam_2009_a4_solution) := sorry diff --git a/lean4/src/putnam_2009_a5.lean b/lean4/src/putnam_2009_a5.lean index 53da0d4a..b6fb9fee 100644 --- a/lean4/src/putnam_2009_a5.lean +++ b/lean4/src/putnam_2009_a5.lean @@ -5,6 +5,9 @@ open Topology MvPolynomial Filter Set abbrev putnam_2009_a5_solution : Prop := sorry -- False +/-- +Is there a finite abelian group $G$ such that the product of the orders of all its elements is 2^{2009}? +-/ theorem putnam_2009_a5 : (∃ (G : Type*) (_ : CommGroup G) (_ : Fintype G), ∏ g : G, orderOf g = 2^2009) ↔ putnam_2009_a5_solution := sorry diff --git a/lean4/src/putnam_2009_b1.lean b/lean4/src/putnam_2009_b1.lean index 4e062a81..dd2380de 100644 --- a/lean4/src/putnam_2009_b1.lean +++ b/lean4/src/putnam_2009_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Topology MvPolynomial Filter Set +/-- +Show that every positive rational number can be written as a quotient of products of factorails of (not necessarily distinct) primes. For example, 10/9 = (2! * 5!)/(3! * 3! * 3!). +-/ theorem putnam_2009_b1 (isquotprodprimefact : ℚ → Prop) (hisquotprodprimefact : isquotprodprimefact = diff --git a/lean4/src/putnam_2009_b2.lean b/lean4/src/putnam_2009_b2.lean index 36ff76d2..3d58e24b 100644 --- a/lean4/src/putnam_2009_b2.lean +++ b/lean4/src/putnam_2009_b2.lean @@ -5,6 +5,9 @@ open Topology MvPolynomial Filter Set abbrev putnam_2009_b2_solution : Set ℝ := sorry -- Ioc (1 / 3) 1 +/-- +A game involves jumping to the right on the real number line. If $a$ and $b$ are real numbers and $b > a$, the cost of jumping from $a$ to $b$ is $b^3-ab^2$. For what real numbers $c$ can one travel from $0$ to $1$ in a finite number of jumps with total cost exactly $c$? +-/ theorem putnam_2009_b2 : ({c : ℝ | ∃ s : ℕ → ℝ, s 0 = 0 ∧ StrictMono s ∧ (∃ n : ℕ, s n = 1 ∧ ((∑ i in Finset.range n, ((s (i + 1)) ^ 3 - (s i) * (s (i + 1)) ^ 2)) = c))} = putnam_2009_b2_solution) := sorry diff --git a/lean4/src/putnam_2009_b3.lean b/lean4/src/putnam_2009_b3.lean index 0a61344b..4e2b2499 100644 --- a/lean4/src/putnam_2009_b3.lean +++ b/lean4/src/putnam_2009_b3.lean @@ -5,6 +5,9 @@ open Topology MvPolynomial Filter Set abbrev putnam_2009_b3_solution : Set ℤ := sorry -- {n : ℤ | ∃ k ≥ 1, n = 2 ^ k - 1} +/-- +Call a subset $S$ of $\{1, 2, \dots, n\}$ \emph{mediocre} if it has the following property: Whenever $a$ and $b$ are elements of $S$ whose average is an integer, that average is also an element of $S$. Let $A(n)$ be the number of mediocre subsets of $\{1,2,\dots,n\}$. [For instance, every subset of $\{1,2,3\}$ except $\{1,3\}$ is mediocre, so $A(3) = 7$.] Find all positive integers $n$ such that $A(n+2) - 2A(n+1) + A(n) = 1$. +-/ theorem putnam_2009_b3 (mediocre : ℤ → Set ℤ → Prop) (hmediocre : mediocre = fun n S ↦ (S ⊆ Icc 1 n) ∧ ∀ a ∈ S, ∀ b ∈ S, 2 ∣ a + b → (a + b) / 2 ∈ S) diff --git a/lean4/src/putnam_2009_b4.lean b/lean4/src/putnam_2009_b4.lean index c799774f..6cd3149b 100644 --- a/lean4/src/putnam_2009_b4.lean +++ b/lean4/src/putnam_2009_b4.lean @@ -5,6 +5,9 @@ open Topology MvPolynomial Filter Set Metric abbrev putnam_2009_b4_solution : ℕ := sorry -- 2020050 +/-- +Say that a polynomial with real coefficients in two variables, $x,y$, is \emph{balanced} if the average value of the polynomial on each circle centered at the origin is $0$. The balanced polynomials of degree at most $2009$ form a vector space $V$ over $\mathbb{R}$. Find the dimension of $V$. +-/ theorem putnam_2009_b4 (balanced : MvPolynomial (Fin 2) ℝ → Prop) (hbalanced : balanced = fun P ↦ ∀ r > 0, (∫ x in Metric.sphere (0 : EuclideanSpace ℝ (Fin 2)) r, MvPolynomial.eval x P) / (2 * Real.pi * r) = 0) diff --git a/lean4/src/putnam_2009_b5.lean b/lean4/src/putnam_2009_b5.lean index 811d0b25..7abef72e 100644 --- a/lean4/src/putnam_2009_b5.lean +++ b/lean4/src/putnam_2009_b5.lean @@ -3,6 +3,14 @@ open BigOperators open Topology MvPolynomial Filter Set Metric +/-- +Let $f: (1, \infty) \to \mathbb{R}$ be a differentiable function such that +\[ + f'(x) = \frac{x^2 - f(x)^2}{x^2 (f(x)^2 + 1)} +\qquad \mbox{for all $x>1$.} +\] +Prove that $\lim_{x \to \infty} f(x) = \infty$. +-/ theorem putnam_2009_b5 (f : ℝ → ℝ) (hfdiff : DifferentiableOn ℝ f (Ioi 1)) diff --git a/lean4/src/putnam_2009_b6.lean b/lean4/src/putnam_2009_b6.lean index a3fa027d..c54c3940 100644 --- a/lean4/src/putnam_2009_b6.lean +++ b/lean4/src/putnam_2009_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology MvPolynomial Filter Set Metric +/-- +Prove that for every positive integer $n$, there is a sequence of integers $a_0, a_1, \dots, a_{2009}$ with $a_0 = 0$ and $a_{2009} = n$ such that each term after $a_0$ is either an earlier term plus $2^k$ for some nonnegative integer $k$, or of the form $b\,\mathrm{mod}\,c$ for some earlier positive terms $b$ and $c$. [Here $b\,\mathrm{mod}\,c$ denotes the remainder when $b$ is divided by $c$, so $0 \leq (b\,\mathrm{mod}\,c) < c$.] +-/ theorem putnam_2009_b6 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2010_a1.lean b/lean4/src/putnam_2010_a1.lean index 1794f8ac..35136472 100644 --- a/lean4/src/putnam_2010_a1.lean +++ b/lean4/src/putnam_2010_a1.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_2010_a1_solution : ℕ → ℕ := sorry -- (fun n : ℕ => Nat.ceil ((n : ℝ) / 2)) +/-- +Given a positive integer $n$, what is the largest $k$ such that the numbers $1,2,\dots,n$ can be put into $k$ boxes so that the sum of the numbers in each box is the same? [When $n=8$, the example $\{1,2,3,6\},\{4,8\},\{5,7\}$ shows that the largest $k$ is \emph{at least} $3$.] +-/ theorem putnam_2010_a1 (n : ℕ) (kboxes : ℕ → Prop) diff --git a/lean4/src/putnam_2010_a2.lean b/lean4/src/putnam_2010_a2.lean index ee5f4c4d..d2b692e1 100644 --- a/lean4/src/putnam_2010_a2.lean +++ b/lean4/src/putnam_2010_a2.lean @@ -3,6 +3,13 @@ open BigOperators abbrev putnam_2010_a2_solution : Set (ℝ → ℝ) := sorry -- {f : ℝ → ℝ | ∃ c d : ℝ, ∀ x : ℝ, f x = c*x + d} +/-- +Find all differentiable functions $f:\mathbb{R} \to \mathbb{R}$ such that +\[ +f'(x) = \frac{f(x+n)-f(x)}{n} +\] +for all real numbers $x$ and all positive integers $n$. +-/ theorem putnam_2010_a2 : {f : ℝ → ℝ | Differentiable ℝ f ∧ ∀ x : ℝ, ∀ n : ℤ, n > 0 → deriv f x = (f (x + n) - f x)/n} = putnam_2010_a2_solution := diff --git a/lean4/src/putnam_2010_a4.lean b/lean4/src/putnam_2010_a4.lean index 453cbc48..c5d54c6d 100644 --- a/lean4/src/putnam_2010_a4.lean +++ b/lean4/src/putnam_2010_a4.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Prove that for each positive integer $n$, the number $10^{10^{10^n}} + 10^{10^n} + 10^n - 1$ is not prime. +-/ theorem putnam_2010_a4 : ∀ n : ℕ, n > 0 → ¬Nat.Prime (10^10^10^n + 10^10^n + 10^n - 1) := sorry diff --git a/lean4/src/putnam_2010_a5.lean b/lean4/src/putnam_2010_a5.lean index ed7ff30c..402aa82b 100644 --- a/lean4/src/putnam_2010_a5.lean +++ b/lean4/src/putnam_2010_a5.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $G$ be a group, with operation $*$. Suppose that \begin{enumerate} \item[(i)] $G$ is a subset of $\mathbb{R}^3$ (but $*$ need not be related to addition of vectors); \item[(ii)] For each $\mathbf{a},\mathbf{b} \in G$, either $\mathbf{a}\times \mathbf{b} = \mathbf{a}*\mathbf{b}$ or $\mathbf{a}\times \mathbf{b} = 0$ (or both), where $\times$ is the usual cross product in $\mathbb{R}^3$. \end{enumerate} Prove that $\mathbf{a} \times \mathbf{b} = 0$ for all $\mathbf{a}, \mathbf{b} \in G$. +-/ theorem putnam_2010_a5 (G : Set (Fin 3 → ℝ)) (hGgrp : Group G) diff --git a/lean4/src/putnam_2010_a6.lean b/lean4/src/putnam_2010_a6.lean index 6b4466f7..fbbcb95e 100644 --- a/lean4/src/putnam_2010_a6.lean +++ b/lean4/src/putnam_2010_a6.lean @@ -4,6 +4,11 @@ open BigOperators open Filter Topology Set -- Note: uses (ℝ → ℝ) instead of (Ici 0 → ℝ) +/-- +Let $f:[0,\infty)\to \mathbb{R}$ be a strictly decreasing continuous function +such that $\lim_{x\to\infty} f(x) = 0$. Prove that +$\int_0^\infty \frac{f(x)-f(x+1)}{f(x)}\,dx$ diverges. +-/ theorem putnam_2010_a6 (f : ℝ → ℝ) (hf : (StrictAntiOn f (Ici 0) ∧ ContinuousOn f (Ici 0) ∧ Tendsto f atTop (𝓝 0))) diff --git a/lean4/src/putnam_2010_b1.lean b/lean4/src/putnam_2010_b1.lean index 2eaf2ee5..7c374f0e 100644 --- a/lean4/src/putnam_2010_b1.lean +++ b/lean4/src/putnam_2010_b1.lean @@ -5,6 +5,9 @@ open Filter Topology Set abbrev putnam_2010_b1_solution : Prop := sorry -- False +/-- +Is there an infinite sequence of real numbers $a_1, a_2, a_3, \dots$ such that \[ a_1^m + a_2^m + a_3^m + \cdots = m \] for every positive integer $m$? +-/ theorem putnam_2010_b1 : (∃ a : ℕ → ℝ, ∀ m : ℕ, m > 0 → ∑' i : ℕ, (a i)^m = m) ↔ putnam_2010_b1_solution := sorry diff --git a/lean4/src/putnam_2010_b2.lean b/lean4/src/putnam_2010_b2.lean index 9114c4ca..cd598cee 100644 --- a/lean4/src/putnam_2010_b2.lean +++ b/lean4/src/putnam_2010_b2.lean @@ -4,6 +4,9 @@ open BigOperators open Filter Topology Set abbrev putnam_2010_b2_solution : ℕ := sorry -- 3 +/-- +Given that $A$, $B$, and $C$ are noncollinear points in the plane with integer coordinates such that the distances $AB$, $AC$, and $BC$ are integers, what is the smallest possible value of $AB$? +-/ theorem putnam_2010_b2 (ABCintcoords : EuclideanSpace ℝ (Fin 2) → EuclideanSpace ℝ (Fin 2) → EuclideanSpace ℝ (Fin 2) → Prop) (ABCintdists : EuclideanSpace ℝ (Fin 2) → EuclideanSpace ℝ (Fin 2) → EuclideanSpace ℝ (Fin 2) → Prop) diff --git a/lean4/src/putnam_2010_b3.lean b/lean4/src/putnam_2010_b3.lean index 75bb5754..870a4918 100644 --- a/lean4/src/putnam_2010_b3.lean +++ b/lean4/src/putnam_2010_b3.lean @@ -5,6 +5,9 @@ open Filter Topology Set abbrev putnam_2010_b3_solution : Set ℕ := sorry -- Ici 1005 +/-- +There are $2010$ boxes labeled $B_1, B_2, \dots, B_{2010}$, and $2010n$ balls have been distributed among them, for some positive integer $n$. You may redistribute the balls by a sequence of moves, each of which consists of choosing an $i$ and moving \emph{exactly} $i$ balls from box $B_i$ into any one other box. For which values of $n$ is it possible to reach the distribution with exactly $n$ balls in each box, regardless of the initial distribution of balls? +-/ theorem putnam_2010_b3 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2010_b4.lean b/lean4/src/putnam_2010_b4.lean index 9c1521d9..50511cf2 100644 --- a/lean4/src/putnam_2010_b4.lean +++ b/lean4/src/putnam_2010_b4.lean @@ -5,6 +5,9 @@ open Filter Topology Set abbrev putnam_2010_b4_solution : Set (Polynomial ℝ × Polynomial ℝ) := sorry -- {(p, q) : Polynomial ℝ × Polynomial ℝ | p.degree ≤ 1 ∧ q.degree ≤ 1 ∧ p.coeff 0 * q.coeff 1 - p.coeff 1 * q.coeff 0 = 1} +/-- +Find all pairs of polynomials $p(x)$ and $q(x)$ with real coefficients for which $p(x)q(x+1)-p(x+1)q(x)=1$. +-/ theorem putnam_2010_b4 (p q : Polynomial ℝ) : (∀ x : ℝ, p.eval x * q.eval (x + 1) - p.eval (x + 1) * q.eval x = 1) ↔ (p, q) ∈ putnam_2010_b4_solution := diff --git a/lean4/src/putnam_2010_b5.lean b/lean4/src/putnam_2010_b5.lean index bf6dd305..15cd70b5 100644 --- a/lean4/src/putnam_2010_b5.lean +++ b/lean4/src/putnam_2010_b5.lean @@ -5,6 +5,9 @@ open Filter Topology Set abbrev putnam_2010_b5_solution : Prop := sorry -- False +/-- +Is there a strictly increasing function $f: \mathbb{R} \to \mathbb{R}$ such that $f'(x) = f(f(x))$ for all $x$? +-/ theorem putnam_2010_b5 : (∃ f : ℝ → ℝ, StrictMono f ∧ Differentiable ℝ f ∧ (∀ x : ℝ, deriv f x = f (f x))) ↔ putnam_2010_b5_solution := sorry diff --git a/lean4/src/putnam_2010_b6.lean b/lean4/src/putnam_2010_b6.lean index 62a5ca41..fd0395cb 100644 --- a/lean4/src/putnam_2010_b6.lean +++ b/lean4/src/putnam_2010_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Set +/-- +Let $A$ be an $n \times n$ matrix of real numbers for some $n \geq 1$. For each positive integer $k$, let $A^{[k]}$ be the matrix obtained by raising each entry to the $k$th power. Show that if $A^k=A^{[k]}$ for $k=1,2,\dots,n+1$, then $A^k=A^{[k]}$ for all $k \geq 1$. +-/ theorem putnam_2010_b6 (n : ℕ) (npos : n ≥ 1) diff --git a/lean4/src/putnam_2011_a1.lean b/lean4/src/putnam_2011_a1.lean index 1038aef5..1e08c572 100644 --- a/lean4/src/putnam_2011_a1.lean +++ b/lean4/src/putnam_2011_a1.lean @@ -3,6 +3,14 @@ open BigOperators abbrev putnam_2011_a1_solution : ℕ := sorry -- 10053 +/-- +Define a \emph{growing spiral} in the plane to be a sequence of points with integer coordinates $P_0=(0,0),P_1,\dots,P_n$ such that $n \geq 2$ and: +\begin{itemize} +\item the directed line segments $P_0P_1,P_1P_2,\dots,P_{n-1}P_n$ are in the successive coordinate directions east (for $P_0P_1$), north, west, south, east, etc.; +\item the lengths of these line segments are positive and strictly increasing. +\end{itemize} +How many of the points $(x,y)$ with integer coordinates $0 \leq x \leq 2011,0 \leq y \leq 2011$ \emph{cannot} be the last point, $P_n$ of any growing spiral? +-/ theorem putnam_2011_a1 (isspiral : List (Fin 2 → ℤ) → Prop) (hisspiral : isspiral = (fun P : List (Fin 2 → ℤ) => P.length ≥ 3 ∧ P[0]! = 0 ∧ diff --git a/lean4/src/putnam_2011_a2.lean b/lean4/src/putnam_2011_a2.lean index 62366e12..57c0056d 100644 --- a/lean4/src/putnam_2011_a2.lean +++ b/lean4/src/putnam_2011_a2.lean @@ -5,6 +5,9 @@ open Topology Filter noncomputable abbrev putnam_2011_a2_solution : ℝ := sorry -- 3/2 +/-- +Let $a_1,a_2,\dots$ and $b_1,b_2,\dots$ be sequences of positive real numbers such that $a_1 = b_1 = 1$ and $b_n = b_{n-1} a_n - 2$ for$n=2,3,\dots$. Assume that the sequence $(b_j)$ is bounded. Prove tha \[ S = \sum_{n=1}^\infty \frac{1}{a_1...a_n} \] converges, and evaluate $S$. +-/ theorem putnam_2011_a2 (a b : ℕ → ℝ) (habn : ∀ n : ℕ, a n > 0 ∧ b n > 0) diff --git a/lean4/src/putnam_2011_a3.lean b/lean4/src/putnam_2011_a3.lean index 161992aa..afa255e7 100644 --- a/lean4/src/putnam_2011_a3.lean +++ b/lean4/src/putnam_2011_a3.lean @@ -6,6 +6,9 @@ open Topology Filter -- Note: There may be multiple possible correct answers. noncomputable abbrev putnam_2011_a3_solution : ℝ × ℝ := sorry -- (-1, 2 / Real.pi) +/-- +Find a real number $c$ and a positive number $L$ for which $\lim_{r \to \infty} \frac{r^c \int_0^{\pi/2} x^r\sin x\,dx}{\int_0^{\pi/2} x^r\cos x\,dx}=L$. +-/ theorem putnam_2011_a3 : putnam_2011_a3_solution.2 > 0 ∧ Tendsto (fun r : ℝ => (r ^ putnam_2011_a3_solution.1 * ∫ x in Set.Ioo 0 (Real.pi / 2), x ^ r * Real.sin x) / (∫ x in Set.Ioo 0 (Real.pi / 2), x ^ r * Real.cos x)) atTop (𝓝 putnam_2011_a3_solution.2) := sorry diff --git a/lean4/src/putnam_2011_a4.lean b/lean4/src/putnam_2011_a4.lean index 7234e5bc..55efdb59 100644 --- a/lean4/src/putnam_2011_a4.lean +++ b/lean4/src/putnam_2011_a4.lean @@ -5,6 +5,9 @@ open Topology Filter Matrix abbrev putnam_2011_a4_solution : Set ℕ := sorry -- {n : ℕ | Odd n} +/-- +For which positive integers $n$ is there an $n \times n$ matrix with integer entries such that every dot product of a row with itself is even, while every dot product of two different rows is odd? +-/ theorem putnam_2011_a4 (nmat : ℕ → Prop) (hnmat : ∀ n, nmat n ↔ diff --git a/lean4/src/putnam_2011_a5.lean b/lean4/src/putnam_2011_a5.lean index 8ee1c0f9..d8f3718c 100644 --- a/lean4/src/putnam_2011_a5.lean +++ b/lean4/src/putnam_2011_a5.lean @@ -3,6 +3,15 @@ open BigOperators open Topology Filter Matrix +/-- +Let $F:\mathbb{R}^2 \to \mathbb{R}$ and $g:\mathbb{R} \to \mathbb{R}$ be twice continuously differentiable functions with the following properties: +\begin{itemize} +\item $F(u,u)=0$ for every $u \in \mathbb{R}$; +\item for every $x \in \mathbb{R}$, $g(x)>0$ and $x^2g(x) \leq 1$; +\item for every $(u,v) \in \mathbb{R}^2$, the vector $\nabla F(u,v)$ is either $\mathbf{0}$ or parallel to the vector $\langle g(u),-g(v) \rangle$. +\end{itemize} +Prove that there exists a constant $C$ such that for every $n \geq 2$ and any $x_1,\dots,x_{n+1} \in \mathbb{R}$, we have $\min_{i \neq j} |F(x_i,x_j)| \leq \frac{C}{n}$. +-/ theorem putnam_2011_a5 (F : (Fin 2 → ℝ) → ℝ) (g : ℝ → ℝ) diff --git a/lean4/src/putnam_2011_a6.lean b/lean4/src/putnam_2011_a6.lean index aea65c7b..c4081d07 100644 --- a/lean4/src/putnam_2011_a6.lean +++ b/lean4/src/putnam_2011_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Matrix +/-- +Let $G$ be an abelian group with $n$ elements, and let $\{g_1=e,g_2,\dots,g_k\} \subsetneq G$ be a (not necessarily minimal) set of distinct generators of $G$. A special die, which randomly selects one of the elements $g_1,g_2,\dots,g_k$ with equal probability, is rolled $m$ times and the selected elements are multiplied to produce an element $g \in G$. Prove that there exists a real number $b \in (0,1)$ such that $\lim_{m \to \infty} \frac{1}{b^{2m}} \sum_{x \in G} (\text{Prob}(g=x)-\frac{1}{n})^2$ is positive and finite. +-/ theorem putnam_2011_a6 (G : Type*) [CommGroup G] [Fintype G] (n : ℕ) diff --git a/lean4/src/putnam_2011_b1.lean b/lean4/src/putnam_2011_b1.lean index a44ca635..5b797cdd 100644 --- a/lean4/src/putnam_2011_b1.lean +++ b/lean4/src/putnam_2011_b1.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Matrix +/-- +Let $h$ and $k$ be positive integers. Prove that for every $\epsilon>0$, there are positive integers $m$ and $n$ such that $\epsilon<|h\sqrt{m}-k\sqrt{n}|<2\epsilon$. +-/ theorem putnam_2011_b1 (h k : ℤ) (hkpos : h > 0 ∧ k > 0) diff --git a/lean4/src/putnam_2011_b2.lean b/lean4/src/putnam_2011_b2.lean index 0b052c68..50ae281e 100644 --- a/lean4/src/putnam_2011_b2.lean +++ b/lean4/src/putnam_2011_b2.lean @@ -5,6 +5,9 @@ open Topology Filter Matrix abbrev putnam_2011_b2_solution : Set ℕ := sorry -- {2, 5} +/-- +Let $S$ be the set of all ordered triples $(p,q,r)$ of prime numbers for which at least one rational number $x$ satisfies $px^2+qx+r=0$. Which primes appear in seven or more elements of $S$? +-/ theorem putnam_2011_b2 (S : Set (Fin 3 → ℕ)) (t : ℕ) diff --git a/lean4/src/putnam_2011_b3.lean b/lean4/src/putnam_2011_b3.lean index ef833931..2e0be997 100644 --- a/lean4/src/putnam_2011_b3.lean +++ b/lean4/src/putnam_2011_b3.lean @@ -5,6 +5,9 @@ open Topology Filter Matrix abbrev putnam_2011_b3_solution : Prop := sorry -- True +/-- +Let $f$ and $g$ be (real-valued) functions defined on an open interval containing $0$, with $g$ nonzero and continuous at $0$. If $fg$ and $f/g$ are differentiable at $0$, must $f$ be differentiable at $0$? +-/ theorem putnam_2011_b3 : ((∀ f g : ℝ → ℝ, g 0 ≠ 0 → ContinuousAt g 0 → DifferentiableAt ℝ (fun x ↦ f x * g x) 0 → DifferentiableAt ℝ (fun x ↦ f x / g x) 0 → (DifferentiableAt ℝ f 0)) ↔ putnam_2011_b3_solution) := sorry diff --git a/lean4/src/putnam_2011_b4.lean b/lean4/src/putnam_2011_b4.lean index 5e70fb7a..de848de9 100644 --- a/lean4/src/putnam_2011_b4.lean +++ b/lean4/src/putnam_2011_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Matrix +/-- +In a tournament, $2011$ players meet $2011$ times to play a multiplayer game. Every game is played by all $2011$ players together and ends with each of the players either winning or losing. The standings are kept in two $2011 \times 2011$ matrices, $T=(T_{hk})$ and $W=(W_{hk})$. Initially, $T=W=0$. After every game, for every $(h,k)$ (including for $h=k$), if players $h$ and $k$ tied (that is, both won or both lost), the entry $T_{hk}$ is increased by $1$, while if player $h$ won and player $k$ lost, the entry $W_{hk}$ is increased by $1$ and $W_{kh}$ is decreased by $1$. Prove that at the end of the tournament, $\det(T+iW)$ is a non-negative integer divisible by $2^{2010}$. +-/ theorem putnam_2011_b4 (games : Fin 2011 → Fin 2011 → Bool) (T : Matrix (Fin 2011) (Fin 2011) ℂ) diff --git a/lean4/src/putnam_2011_b5.lean b/lean4/src/putnam_2011_b5.lean index b3fea0b3..25db93e5 100644 --- a/lean4/src/putnam_2011_b5.lean +++ b/lean4/src/putnam_2011_b5.lean @@ -3,6 +3,16 @@ open BigOperators open Topology Filter Matrix +/-- +Let $a_1, a_2, \dots$ be real numbers. Suppose that there is a constant $A$ such that for all $n$, +\[ +\int_{-\infty}^\infty \left( \sum_{i=1}^n \frac{1}{1 + (x-a_i)^2} \right)^2\,dx \leq An. +\] +Prove there is a constant $B>0$ such that for all $n$, +\[ +\sum_{i,j=1}^n (1 + (a_i - a_j)^2) \geq Bn^3. +\] +-/ theorem putnam_2011_b5 (a : ℕ → ℝ) (h : ∃ A : ℝ, ∀ n : ℕ, ∫ x : ℝ, ((∑ i : Finset.range n, 1 / (1 + (x - a i) ^ 2)) ^ 2) ≤ A * n) diff --git a/lean4/src/putnam_2011_b6.lean b/lean4/src/putnam_2011_b6.lean index fcc7e584..039cee6e 100644 --- a/lean4/src/putnam_2011_b6.lean +++ b/lean4/src/putnam_2011_b6.lean @@ -3,6 +3,12 @@ open BigOperators open Topology Filter Matrix Set +/-- +Let $p$ be an odd prime. Show that for at least $(p+1)/2$ values of $n$ in $\{0,1,2,\dots,p-1\}$, +\[ +\sum_{k=0}^{p-1} k! n^k \qquad \mbox{is not divisible by $p$.} +\] +-/ theorem putnam_2011_b6 (p : ℕ) (hp : Odd p ∧ Nat.Prime p) diff --git a/lean4/src/putnam_2012_a1.lean b/lean4/src/putnam_2012_a1.lean index e6c222d4..e665f276 100644 --- a/lean4/src/putnam_2012_a1.lean +++ b/lean4/src/putnam_2012_a1.lean @@ -4,6 +4,9 @@ open BigOperators open Matrix -- Note: This proof statement strays a bit from the problem statement since it manually checks a condition for acuteness based on side lengths. +/-- +Let $d_1,d_2,\dots,d_{12}$ be real numbers in the open interval $(1,12)$. Show that there exist distinct indices $i,j,k$ such that $d_i,d_j,d_k$ are the side lengths of an acute triangle. +-/ theorem putnam_2012_a1 (d : Fin 12 → ℝ) (hd : ∀ i : Fin 12, d i ∈ Set.Ioo 1 12) diff --git a/lean4/src/putnam_2012_a2.lean b/lean4/src/putnam_2012_a2.lean index 61280278..e8f68935 100644 --- a/lean4/src/putnam_2012_a2.lean +++ b/lean4/src/putnam_2012_a2.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix +/-- +Let $*$ be a commutative and associative binary operation on a set $S$. Assume that for every $x$ and $y$ in $S$, there exists $z$ in $S$ such that $x*z=y$. (This $z$ may depend on $x$ and $y$.) Show that if $a,b,c$ are in $S$ and $a*c=b*c$, then $a=b$. +-/ theorem putnam_2012_a2 (S : Type*) [CommSemigroup S] (a b c : S) diff --git a/lean4/src/putnam_2012_a3.lean b/lean4/src/putnam_2012_a3.lean index 6977177e..964271fb 100644 --- a/lean4/src/putnam_2012_a3.lean +++ b/lean4/src/putnam_2012_a3.lean @@ -6,6 +6,18 @@ open Matrix Function -- Note: uses (ℝ → ℝ) instead of (Set.Icc (-1 : ℝ) 1 → ℝ) noncomputable abbrev putnam_2012_a3_solution : ℝ → ℝ := sorry -- fun x : ℝ => Real.sqrt (1 - x^2) +/-- +Let $f: [-1, 1] \to \mathbb{R}$ be a continuous function such that +\begin{itemize} +\item[(i)] +$f(x) = \frac{2-x^2}{2} f \left( \frac{x^2}{2-x^2} \right)$ for every $x$ in $[-1, 1]$, +\item[(ii)] +$f(0) = 1$, and +\item[(iii)] +$\lim_{x \to 1^-} \frac{f(x)}{\sqrt{1-x}}$ exists and is finite. +\end{itemize} +Prove that $f$ is unique, and express $f(x)$ in closed form. +-/ theorem putnam_2012_a3 (S : Set ℝ) (hS : S = Set.Icc (-1 : ℝ) 1) diff --git a/lean4/src/putnam_2012_a4.lean b/lean4/src/putnam_2012_a4.lean index d022cfe7..ba80abcc 100644 --- a/lean4/src/putnam_2012_a4.lean +++ b/lean4/src/putnam_2012_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Function +/-- +Let $q$ and $r$ be integers with $q>0$, and let $A$ and $B$ be intervals on the real line. Let $T$ be the set of all $b+mq$ where $b$ and $m$ are integers with $b$ in $B$, and let $S$ be the set of all integers $a$ in $A$ such that $ra$ is in $T$. Show that if the product of the lengths of $A$ and $B$ is less than $q$, then $S$ is the intersection of $A$ with some arithmetic progression. +-/ theorem putnam_2012_a4 (q r : ℤ) (A B : Fin 2 → ℝ) diff --git a/lean4/src/putnam_2012_a5.lean b/lean4/src/putnam_2012_a5.lean index ef8ff947..75c1f5d2 100644 --- a/lean4/src/putnam_2012_a5.lean +++ b/lean4/src/putnam_2012_a5.lean @@ -5,6 +5,9 @@ open Matrix Function abbrev putnam_2012_a5_solution : Set (ℕ × ℕ) := sorry -- {q | let ⟨n, _⟩ := q; n = 1} ∪ {(2,2)} +/-- +Let $\FF_p$ denote the field of integers modulo a prime $p$, and let $n$ be a positive integer. Let $v$ be a fixed vector in $\FF_p^n$, let $M$ be an $n \times n$ matrix with entries of $\FF_p$, and define $G: \FF_p^n \to \FF_p^n$ by $G(x) = v + Mx$. Let $G^{(k)}$ denote the $k$-fold composition of $G$ with itself, that is, $G^{(1)}(x) = G(x)$ and $G^{(k+1)}(x) = G(G^{(k)}(x))$. Determine all pairs $p, n$ for which there exist $v$ and $M$ such that the $p^n$ vectors $G^{(k)}(0)$, $k=1,2,\dots,p^n$ are distinct. +-/ theorem putnam_2012_a5 (n p : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_2012_a6.lean b/lean4/src/putnam_2012_a6.lean index e800cafa..3493a95b 100644 --- a/lean4/src/putnam_2012_a6.lean +++ b/lean4/src/putnam_2012_a6.lean @@ -6,6 +6,10 @@ open Matrix Function -- Note: this formalization differs from the original problem wording in only allowing axis-aligned rectangles. The problem is solvable given this weaker hypothesis. abbrev putnam_2012_a6_solution : Prop := sorry -- True +/-- +Let $f(x,y)$ be a continuous, real-valued function on $\mathbb{R}^2$. Suppose that, for every rectangular region $R$ of area $1$, the double integral of $f(x,y)$ over $R$ equals $0$. +Must $f(x,y)$ be identically $0$? +-/ theorem putnam_2012_a6 (p : ((ℝ × ℝ) → ℝ) → Prop) (hp : p = fun f ↦ Continuous f ∧ ∀ x1 x2 y1 y2 : ℝ, x2 > x1 → y2 > y1 → (x2 - x1) * (y2 - y1) = 1 → ∫ x in x1..x2, ∫ y in y1..y2, f (x, y) = 0) diff --git a/lean4/src/putnam_2012_b1.lean b/lean4/src/putnam_2012_b1.lean index a03842cd..e683a36e 100644 --- a/lean4/src/putnam_2012_b1.lean +++ b/lean4/src/putnam_2012_b1.lean @@ -3,6 +3,19 @@ open BigOperators open Matrix Function Real +/-- +Let $S$ be a class of functions from $[0, \infty)$ to $[0, \infty)$ that satisfies: +\begin{itemize} +\item[(i)] +The functions $f_1(x) = e^x - 1$ and $f_2(x) = \ln(x+1)$ are in $S$; +\item[(ii)] +If $f(x)$ and $g(x)$ are in $S$, the functions $f(x) + g(x)$ and $f(g(x))$ are in $S$; +\item[(iii)] +If $f(x)$ and $g(x)$ are in $S$ and $f(x) \geq g(x)$ for all $x \geq 0$, then the function +$f(x) - g(x)$ is in $S$. +\end{itemize} +Prove that if $f(x)$ and $g(x)$ are in $S$, then the function $f(x) g(x)$ is also in $S$. +-/ theorem putnam_2012_b1 (S : Set (Set.Ici (0 : ℝ) → ℝ)) (rngS : ∀ f ∈ S, ∀ x : Set.Ici (0 : ℝ), f x ∈ Set.Ici (0 : ℝ)) diff --git a/lean4/src/putnam_2012_b3.lean b/lean4/src/putnam_2012_b3.lean index 60e25578..04236afd 100644 --- a/lean4/src/putnam_2012_b3.lean +++ b/lean4/src/putnam_2012_b3.lean @@ -5,6 +5,9 @@ open Matrix Function Real abbrev putnam_2012_b3_solution : Prop := sorry -- True +/-- +A round-robin tournament of $2n$ teams lasted for $2n-1$ days, as follows. On each day, every team played one game against another team, with one team winning and one team losing in each of the $n$ games. Over the course of the tournament, each team played every other team exactly once. Can one necessarily choose one winning team from each day without choosing any team more than once? +-/ theorem putnam_2012_b3 (nmatchupsgames nmatchupsall : (n : ℕ) → (Fin (2 * n - 1) → (Fin (2 * n) → Fin (2 * n))) → Prop) (hnmatchupsall : nmatchupsall = (fun (n : ℕ) (matchups : Fin (2 * n - 1) → (Fin (2 * n) → Fin (2 * n))) => ∀ t1 t2 : Fin (2 * n), t1 ≠ t2 → (∃ d : Fin (2 * n - 1), matchups d t1 = t2))) diff --git a/lean4/src/putnam_2012_b4.lean b/lean4/src/putnam_2012_b4.lean index faf9b38d..a9772c8c 100644 --- a/lean4/src/putnam_2012_b4.lean +++ b/lean4/src/putnam_2012_b4.lean @@ -5,6 +5,10 @@ open Matrix Function Real Topology Filter noncomputable abbrev putnam_2012_b4_solution : Prop := sorry -- True +/-- +Suppose that $a_0 = 1$ and that $a_{n+1} = a_n + e^{-a_n}$ for $n=0,1,2,\dots$. Does $a_n - \log n$ +have a finite limit as $n \to \infty$? (Here $\log n = \log_e n = \ln n$.) +-/ theorem putnam_2012_b4 (a : ℕ → ℝ) (ha0 : a 0 = 1) diff --git a/lean4/src/putnam_2012_b5.lean b/lean4/src/putnam_2012_b5.lean index a5d47969..f33a312b 100644 --- a/lean4/src/putnam_2012_b5.lean +++ b/lean4/src/putnam_2012_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Function Real Topology Filter +/-- +Prove that, for any two bounded functions $g_1, g_2: \RR \to [1, \infty)$, there exist functions $h_1, h_2: \RR o \RR$ such that, for every $x \in \RR$, \[ \sup_{s \in \RR} (g_1(s)^x g_2(s)) = \max_{t \in \RR} (x h_1(t) + h_2(t)).\] +-/ theorem putnam_2012_b5 (g1 g2 : ℝ → ℝ) (hgim : ∀ x : ℝ, g1 x ≥ 1 ∧ g2 x ≥ 1) diff --git a/lean4/src/putnam_2012_b6.lean b/lean4/src/putnam_2012_b6.lean index a9d34f7b..4f6e66cf 100644 --- a/lean4/src/putnam_2012_b6.lean +++ b/lean4/src/putnam_2012_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Matrix Function Real Topology Filter +/-- +Let $p$ be an odd prime number such that $p \equiv 2 \pmod{3}$. Define a permutation $\pi$ of the residue classes modulo $p$ by $\pi(x) \equiv x^3 \pmod{p}$. Show that $\pi$ is an even permutation if and only if $p \equiv 3 \pmod{4}$. +-/ theorem putnam_2012_b6 (p : ℕ) (hpodd : Odd p) diff --git a/lean4/src/putnam_2013_a2.lean b/lean4/src/putnam_2013_a2.lean index 8e7f6779..5271955a 100644 --- a/lean4/src/putnam_2013_a2.lean +++ b/lean4/src/putnam_2013_a2.lean @@ -3,6 +3,15 @@ open BigOperators open Function Set +/-- +Let $S$ be the set of all positive integers that are \emph{not} perfect squares. For $n$ in $S$, consider choices of integers +$a_1, a_2, \dots, a_r$ such that $n < a_1< a_2 < \cdots < a_r$ +and $n \cdot a_1 \cdot a_2 \cdots a_r$ is a perfect square, and +let $f(n)$ be the minumum of $a_r$ over all such choices. For example, +$2 \cdot 3 \cdot 6$ is a perfect square, while $2 \cdot 3$, $2 \cdot 4$, +$2 \cdot 5$, $2 \cdot 3 \cdot 4$, $2 \cdot 3 \cdot 5$, $2 \cdot 4 \cdot 5$, and $2 \cdot 3 \cdot 4 \cdot 5$ are not, and so $f(2) = 6$. +Show that the function $f$ from $S$ to the integers is one-to-one. +-/ theorem putnam_2013_a2 (S : Set ℤ) (hS : S = {n : ℤ | n > 0 ∧ ¬∃ m : ℤ, m ^ 2 = n}) diff --git a/lean4/src/putnam_2013_a3.lean b/lean4/src/putnam_2013_a3.lean index 6531869a..17f5c4a0 100644 --- a/lean4/src/putnam_2013_a3.lean +++ b/lean4/src/putnam_2013_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Function Set +/-- +Suppose that the real numbers \( a_0, a_1, \ldots, a_n \) and \( x \), with \( 0 < x < 1 \), satisfy $ \frac{a_0}{1-x} + \frac{a_1}{(1-x)^2} + \cdots + \frac{a_n}{(1-x)^{n+1}} = 0. $ Prove that there exists a real number \( y \) with \( 0 < y < 1 \) such that $ a_0 + a_1y + \cdots + a_ny^n = 0. $. +-/ theorem putnam_2013_a3 (n : ℕ) (a : Set.Icc 0 n → ℝ) diff --git a/lean4/src/putnam_2013_a4.lean b/lean4/src/putnam_2013_a4.lean index 97122086..2efe99f7 100644 --- a/lean4/src/putnam_2013_a4.lean +++ b/lean4/src/putnam_2013_a4.lean @@ -3,6 +3,9 @@ open BigOperators open Function Set +/-- +A finite collection of digits $0$ and $1$ is written around a circle. An \emph{arc} of length $L \geq 0$ consists of $L$ consecutive digits around the circle. For each arc $w$, let $Z(w)$ and $N(w)$ denote the number of $0$'s in $w$ and the number of $1$'s in $w$, respectively. Assume that $|Z(w)-Z(w')| \leq 1$ for any two arcs $w,w'$ of the same length. Suppose that some arcs $w_1,\dots,w_k$ have the property that $Z=\frac{1}{k}\sum_{j=1}^k Z(w_j)$ and $N=\frac{1}{k}\sum_{j=1}^k N(w_j)$ are both integers. Prove that there exists an arc $w$ with $Z(w)=Z$ and $N(w)=N$. +-/ theorem putnam_2013_a4 (n : ℕ) (circle : Fin n → Fin 2) diff --git a/lean4/src/putnam_2013_a5.lean b/lean4/src/putnam_2013_a5.lean index e4f83fdb..dea90c93 100644 --- a/lean4/src/putnam_2013_a5.lean +++ b/lean4/src/putnam_2013_a5.lean @@ -4,6 +4,9 @@ open BigOperators open Function Set MeasureTheory -- Note: uses (Fin m → Fin m → Fin m → ℝ) instead of ensuring inputs are strictly increasing +/-- +For $m \geq 3$, a list of $\binom{m}{3}$ real numbers $a_{ijk}$ ($1 \leq i0$. (For example, if $S=\{(0,1),(0,2),(2,0),(3,1)\}$, then the terms in $A(S)$ are $12,12,12,12,4,4,0,0,0,0,-1,-1,-2,-2,-4,-4$.) +-/ theorem putnam_2013_a6 (w : ℤ → ℤ → ℤ) (A : Finset (ℤ × ℤ) → ℤ) diff --git a/lean4/src/putnam_2013_b1.lean b/lean4/src/putnam_2013_b1.lean index b26fb453..2a5baf51 100644 --- a/lean4/src/putnam_2013_b1.lean +++ b/lean4/src/putnam_2013_b1.lean @@ -5,6 +5,9 @@ open Function Set abbrev putnam_2013_b1_solution : ℤ := sorry -- -1 +/-- +For positive integers $n$, let the numbers $c(n)$ be determined by the rules $c(1)=1$, $c(2n)=c(n)$, and $c(2n+1)=(-1)^nc(n)$. Find the value of $\sum_{n=1}^{2013} c(n)c(n+2)$. +-/ theorem putnam_2013_b1 (c : ℕ → ℤ) (hc1 : c 1 = 1) diff --git a/lean4/src/putnam_2013_b2.lean b/lean4/src/putnam_2013_b2.lean index 81390e72..fd8b9146 100644 --- a/lean4/src/putnam_2013_b2.lean +++ b/lean4/src/putnam_2013_b2.lean @@ -5,6 +5,21 @@ open Function Set abbrev putnam_2013_b2_solution : ℝ := sorry -- 3 +/-- +Let $C = \bigcup_{N=1}^\infty C_N$, where $C_N$ denotes the set of those `cosine polynomials' of the form +\[ +f(x) = 1 + \sum_{n=1}^N a_n \cos(2 \pi n x) +\] +for which: +\begin{enumerate} +\item[(i)] +$f(x) \geq 0$ for all real $x$, and +\item[(ii)] +$a_n = 0$ whenever $n$ is a multiple of $3$. +\end{enumerate} +Determine the maximum value of $f(0)$ as $f$ ranges through $C$, and +prove that this maximum is attained. +-/ theorem putnam_2013_b2 (CN : ℕ → Set (ℝ → ℝ)) (C : Set (ℝ → ℝ)) diff --git a/lean4/src/putnam_2013_b3.lean b/lean4/src/putnam_2013_b3.lean index 4ec12f78..e9825eaa 100644 --- a/lean4/src/putnam_2013_b3.lean +++ b/lean4/src/putnam_2013_b3.lean @@ -5,6 +5,9 @@ open Function Set abbrev putnam_2013_b3_solution : Prop := sorry -- True +/-- +Let $\mathcal{P}$ be a nonempty collection of subsets of $\{1,\dots, n\}$ such that: \begin{enumerate} \item[(i)] if $S, S' \in \mathcal{P}$, then $S \cup S' \in \mathcal{P}$ and $S \cap S' \in \mathcal{P}$, and \item[(ii)] if $S \in \mathcal{P}$ and $S \neq \emptyset$, then there is a subset $T \subset S$ such that $T \in \mathcal{P}$ and $T$ contains exactly one fewer element than $S$. \end{enumerate} Suppose that $f: \mathcal{P} \to \mathbb{R}$ is a function such that $f(\emptyset) = 0$ and \[f(S \cup S') = f(S) + f(S') - f(S \cap S') \mbox{ for all $S,S' \in \mathcal{P}$.} \] Must there exist real numbers $f_1,\dots,f_n$ such that\[f(S) = \sum_{i \in S} f_i\] \n for every $S \in \mathcal{P}$? +-/ theorem putnam_2013_b3 : (∀ (n : ℕ) (P : Finset (Finset (Fin n))) (f : Finset (Fin n) → ℝ), P ≠ ⊥ → (∀ S ∈ P, ∀ S' ∈ P, S ∪ S' ∈ P ∧ S ∩ S' ∈ P) → diff --git a/lean4/src/putnam_2013_b4.lean b/lean4/src/putnam_2013_b4.lean index ca80f6ab..962be9d2 100644 --- a/lean4/src/putnam_2013_b4.lean +++ b/lean4/src/putnam_2013_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Function Set +/-- +For any continuous real-valued function $f$ defined on the interval $[0,1]$, let $\mu(f)=\int_0^1 f(x)\,dx,\text{Var}(f)=\int_0^1 (f(x)-\mu(f))^2\,dx,M(f)=\max_{0 \leq x \leq 1} |f(x)|$. Show that if $f$ and $g$ are continuous real-valued functions defined on the interval $[0,1]$, then $\text{Var}(fg) \leq 2\text{Var}(f)M(g)^2+2\text{Var}(g)M(f)^2$. +-/ theorem putnam_2013_b4 (μ Var M : C(Icc (0 : ℝ) 1, ℝ) → ℝ) (hμ : ∀ f, μ f = ∫ x, f x) diff --git a/lean4/src/putnam_2013_b5.lean b/lean4/src/putnam_2013_b5.lean index 55e024b4..3739b787 100644 --- a/lean4/src/putnam_2013_b5.lean +++ b/lean4/src/putnam_2013_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Function Set +/-- +Let $X=\{1,2,\dots,n\}$, and let $k \in X$. Show that there are exactly $k \cdot n^{n-1}$ functions $f:X \to X$ such that for every $x \in X$ there is a $j \geq 0$ such that $f^{(j)}(x) \leq k$. [Here $f^{(j)}$ denotes the $j$\textsuperscript{th} iterate of $f$, so that $f^{(0)}(x)=x$ and $f^{(j+1)}(x)=f(f^{(j)}(x))$.] +-/ theorem putnam_2013_b5 (n : ℕ) (k : Set.Icc 1 n) diff --git a/lean4/src/putnam_2014_a1.lean b/lean4/src/putnam_2014_a1.lean index 4c7ff19d..b0701ad8 100644 --- a/lean4/src/putnam_2014_a1.lean +++ b/lean4/src/putnam_2014_a1.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Prove that every nonzero coefficient of the Taylor series of \[(1 - x + x^2)e^x\] about $x=0$ is a rational number whose numerator (in lowest terms) is either $1$ or a prime number. +-/ theorem putnam_2014_a1 (f : ℝ → ℝ) (hf : ∀ x : ℝ, f x = (1 - x + x ^ 2) * Real.exp x) diff --git a/lean4/src/putnam_2014_a2.lean b/lean4/src/putnam_2014_a2.lean index c99e2f44..3342f703 100644 --- a/lean4/src/putnam_2014_a2.lean +++ b/lean4/src/putnam_2014_a2.lean @@ -5,6 +5,9 @@ open Topology Filter Nat abbrev putnam_2014_a2_solution : ℕ → ℝ := sorry -- (fun n : ℕ => (-1) ^ (n - 1) / ((n - 1)! * (n)!)) +/-- +Let $A$ be the $n \times n$ matrix whose entry in the $i$-th row and $j$-th column is $\frac{1}{\min(i,j)}$ for $1 \leq i,j \leq n$. Compute $\det(A)$. +-/ theorem putnam_2014_a2 (n : ℕ) (A : Matrix (Fin n) (Fin n) ℝ) diff --git a/lean4/src/putnam_2014_a3.lean b/lean4/src/putnam_2014_a3.lean index 11514877..b3a9d793 100644 --- a/lean4/src/putnam_2014_a3.lean +++ b/lean4/src/putnam_2014_a3.lean @@ -5,6 +5,9 @@ open Topology Filter Nat noncomputable abbrev putnam_2014_a3_solution : ℝ := sorry -- 3 / 7 +/-- +Let \( a_0 = \frac{5}{2} \) and \( a_k = a_{k-1}^2 - 2 \) for \( k \geq 1 \). Compute \( \prod_{k=0}^{\infty} \left(1 - \frac{1}{a_k}\right) \) in closed form. +-/ theorem putnam_2014_a3 (a : ℕ → ℝ) (a0 : a 0 = 5 / 2) diff --git a/lean4/src/putnam_2014_a4.lean b/lean4/src/putnam_2014_a4.lean index 714e5217..368ced5e 100644 --- a/lean4/src/putnam_2014_a4.lean +++ b/lean4/src/putnam_2014_a4.lean @@ -5,6 +5,9 @@ open Topology Filter Nat noncomputable abbrev putnam_2014_a4_solution : ℝ := sorry -- 1 / 3 +/-- +Suppose $X$ is a random variable that takes on only nonnegative integer values, with $E\left[X\right]=1$, $E\left[X^2\right]=2$, and $E\left[X^3\right]=5$. (Here $E\left[Y\right]$ denotes the expectation of the random variable $Y$.) Determine the smallest possible value of the probability of the event $X=0$. +-/ theorem putnam_2014_a4 (Xrandvar : (ℕ → ℝ) → Prop) (hXrandvar : Xrandvar = (fun X : ℕ → ℝ => (∀ n : ℕ, X n ∈ Set.Icc 0 1) ∧ ∑' n : ℕ, X n = 1)) diff --git a/lean4/src/putnam_2014_a5.lean b/lean4/src/putnam_2014_a5.lean index c49da084..817a013e 100644 --- a/lean4/src/putnam_2014_a5.lean +++ b/lean4/src/putnam_2014_a5.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Nat +/-- +Let \[ P_n(x) = 1 + 2 x + 3 x^2 + \cdots + n x^{n-1}.\] Prove that the polynomials $P_j(x)$ and $P_k(x)$ are relatively prime for all positive integers $j$ and $k$ with $j \neq k$. +-/ theorem putnam_2014_a5 (P : ℕ → Polynomial ℂ) (hP : ∀ n, P n = ∑ i in Finset.Icc 1 n, i * Polynomial.X ^ (i - 1)) diff --git a/lean4/src/putnam_2014_a6.lean b/lean4/src/putnam_2014_a6.lean index 94139623..c93d7857 100644 --- a/lean4/src/putnam_2014_a6.lean +++ b/lean4/src/putnam_2014_a6.lean @@ -5,6 +5,9 @@ open Topology Filter Nat abbrev putnam_2014_a6_solution : ℕ → ℕ := sorry -- (fun n : ℕ => n ^ n) +/-- +Let \( n \) be a positive integer. What is the largest \( k \) for which there exist \( n \times n \) matrices \( M_1, \ldots, M_k \) and \( N_1, \ldots, N_k \) with real entries such that for all \( i \) and \( j \), the matrix product \( M_i N_j \) has a zero entry somewhere on its diagonal if and only if \( i \neq j \)? +-/ theorem putnam_2014_a6 (n : ℕ) (kex : ℕ → Prop) diff --git a/lean4/src/putnam_2014_b1.lean b/lean4/src/putnam_2014_b1.lean index 485fb3d8..b702dbab 100644 --- a/lean4/src/putnam_2014_b1.lean +++ b/lean4/src/putnam_2014_b1.lean @@ -5,6 +5,13 @@ open Topology Filter Nat abbrev putnam_2014_b1_solution : Set ℕ := sorry -- {n : ℕ | n > 0 ∧ ¬∃ a ∈ digits 10 n, a = 0} +/-- +A \emph{base $10$ over-expansion} of a positive integer $N$ is an expression of the form +\[ +N = d_k 10^k + d_{k-1} 10^{k-1} + \cdots + d_0 10^0 +\] +with $d_k \neq 0$ and $d_i \in \{0,1,2,\dots,10\}$ for all $i$. For instance, the integer $N = 10$ has two base $10$ over-expansions: $10 = 10 \cdot 10^0$ and the usual base $10$ expansion $10 = 1 \cdot 10^1 + 0 \cdot 10^0$. Which positive integers have a unique base $10$ over-expansion? +-/ theorem putnam_2014_b1 (overexpansion : ℕ → List ℕ → Prop) (hoverexpansion : overexpansion = fun N d ↦ N = ∑ i : Fin d.length, (d.get i) * 10 ^ i.1 ∧ d.getLastI ≠ 0 ∧ ∀ a ∈ d, a ∈ Finset.range 11) diff --git a/lean4/src/putnam_2014_b2.lean b/lean4/src/putnam_2014_b2.lean index f107aa2c..41171b06 100644 --- a/lean4/src/putnam_2014_b2.lean +++ b/lean4/src/putnam_2014_b2.lean @@ -6,6 +6,9 @@ open Topology Filter Nat -- Note: uses (ℝ → ℝ) instead of (Set.Icc (1 : ℝ) 3 → ℝ) noncomputable abbrev putnam_2014_b2_solution : ℝ := sorry -- Real.log (4 / 3) +/-- +Suppose that \( f \) is a function on the interval \([1,3]\) such that \(-1 \leq f(x) \leq 1\) for all \( x \) and \( \int_{1}^{3} f(x) \, dx = 0 \). How large can \(\int_{1}^{3} \frac{f(x)}{x} \, dx \) be? +-/ theorem putnam_2014_b2 (fbound finteq0 : (ℝ → ℝ) → Prop) (fint : (ℝ → ℝ) → ℝ) diff --git a/lean4/src/putnam_2014_b3.lean b/lean4/src/putnam_2014_b3.lean index 73134506..11bb2d98 100644 --- a/lean4/src/putnam_2014_b3.lean +++ b/lean4/src/putnam_2014_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Nat +/-- +Let $A$ be an $m \times n$ matrix with rational entries. Suppose that there are at least $m+n$ distinct prime numbers among the absolute values of the entries of $A$. Show that the rank of $A$ is at least 2. +-/ theorem putnam_2014_b3 (m n : ℕ) (A : Matrix (Fin m) (Fin n) ℚ) diff --git a/lean4/src/putnam_2014_b4.lean b/lean4/src/putnam_2014_b4.lean index 245ab318..e8bbd509 100644 --- a/lean4/src/putnam_2014_b4.lean +++ b/lean4/src/putnam_2014_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Nat +/-- +Show that for each positive integer \( n \), all the roots of the polynomial $ \sum_{k=0}^{n} 2^k(n-k)x^k $ are real numbers. +-/ theorem putnam_2014_b4 (n : ℕ) (P: Polynomial ℂ) diff --git a/lean4/src/putnam_2014_b6.lean b/lean4/src/putnam_2014_b6.lean index 2e201d7d..8790f808 100644 --- a/lean4/src/putnam_2014_b6.lean +++ b/lean4/src/putnam_2014_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Nat Set Interval +/-- +Let $f: [0,1] \to \mathbb{R}$ be a function for which there exists a constant $K>0$ such that $\left| f(x) - f(y) \right| \leq K \left| x - y \right|$ for all $x,y \in [0,1]$. Suppose also that for each rational number $r \in [0,1]$, there exist integers $a$ and $b$ such that $f(r) = a + br$. Prove that there exist finitely many intervals $I_1, \dots, I_n$ such that $f$ is a linear function on each $I_i$ and $[0,1] = \bigcup_{i=1}^n I_i$. +-/ theorem putnam_2014_b6 (f : ℝ → ℝ) (hlip : ∃ K > 0, ∀ x ∈ Icc 0 1, ∀ y ∈ Icc 0 1, |f x - f y| ≤ K * |x - y|) diff --git a/lean4/src/putnam_2015_a1.lean b/lean4/src/putnam_2015_a1.lean index cb1ea3df..4ee69f59 100644 --- a/lean4/src/putnam_2015_a1.lean +++ b/lean4/src/putnam_2015_a1.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $A$ and $B$ be points on the same branch of the hyperbola $xy=1$. Suppose that $P$ is a point lying between $A$ and $B$ on this hyperbola, such that the area of the triangle $APB$ is as large as possible. Show that the region bounded by the hyperbola and the chord $AP$ has the same area as the region bounded by the hyperbola and the chord $PB$. +-/ theorem putnam_2015_a1 (hyperbola : Set (Fin 2 → ℝ)) (hhyperbola : hyperbola = {p : Fin 2 → ℝ | p 1 = 1 / p 0 ∧ p 0 > 0}) diff --git a/lean4/src/putnam_2015_a2.lean b/lean4/src/putnam_2015_a2.lean index 9a7bec45..189b3d8c 100644 --- a/lean4/src/putnam_2015_a2.lean +++ b/lean4/src/putnam_2015_a2.lean @@ -4,6 +4,9 @@ open BigOperators -- Note: this problem admits several possible correct solutions; this is the one shown on the solutions document abbrev putnam_2015_a2_solution : ℕ := sorry -- 181 +/-- +Let $a_0=1$, $a_1=2$, and $a_n=4a_{n-1}-a_{n-2}$ for $n \geq 2$. Find an odd prime factor of $a_{2015}$. +-/ theorem putnam_2015_a2 (a : ℕ → ℤ) (abase : a 0 = 1 ∧ a 1 = 2) diff --git a/lean4/src/putnam_2015_a3.lean b/lean4/src/putnam_2015_a3.lean index 127e5f1c..cb8406cc 100644 --- a/lean4/src/putnam_2015_a3.lean +++ b/lean4/src/putnam_2015_a3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_2015_a3_solution : ℂ := sorry -- 13725 +/-- +Compute $\log_2 \left( \prod_{a=1}^{2015}\prod_{b=1}^{2015}(1+e^{2\pi iab/2015}) \right)$. Here $i$ is the imaginary unit (that is, $i^2=-1$). +-/ theorem putnam_2015_a3 : Complex.log (∏ a : Fin 2015, ∏ b : Fin 2015, (1 + Complex.exp (2 * Real.pi * Complex.I * (a.1 + 1) * (b.1 + 1) / 2015))) / Complex.log 2 = putnam_2015_a3_solution := sorry diff --git a/lean4/src/putnam_2015_a4.lean b/lean4/src/putnam_2015_a4.lean index 28297614..f81dcfbb 100644 --- a/lean4/src/putnam_2015_a4.lean +++ b/lean4/src/putnam_2015_a4.lean @@ -3,6 +3,13 @@ open BigOperators noncomputable abbrev putnam_2015_a4_solution : ℝ := sorry -- 4 / 7 +/-- +For each real number $x$, let +\[ +f(x) = \sum_{n\in S_x} \frac{1}{2^n}, +\] +where $S_x$ is the set of positive integers $n$ for which $\lfloor nx \rfloor$ is even. What is the largest real number $L$ such that $f(x) \geq L$ for all $x \in [0,1)$? (As usual, $\lfloor z \rfloor$ denotes the greatest integer less than or equal to $z$.) +-/ theorem putnam_2015_a4 (S : ℝ → Set ℤ) (f : ℝ → ℝ) diff --git a/lean4/src/putnam_2015_a5.lean b/lean4/src/putnam_2015_a5.lean index 8b245431..95187b96 100644 --- a/lean4/src/putnam_2015_a5.lean +++ b/lean4/src/putnam_2015_a5.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $q$ be an odd positive integer, and let $N_q$ denote the number of integers $a$ such that $01$ such that $M^k$ is also in $S$. +-/ theorem putnam_2015_b3 (S : Set (Matrix (Fin 2) (Fin 2) ℝ)) (M : Matrix (Fin 2) (Fin 2) ℝ) diff --git a/lean4/src/putnam_2015_b4.lean b/lean4/src/putnam_2015_b4.lean index 75cc33d2..bb073b8c 100644 --- a/lean4/src/putnam_2015_b4.lean +++ b/lean4/src/putnam_2015_b4.lean @@ -3,6 +3,13 @@ open BigOperators abbrev putnam_2015_b4_solution : ℤ × ℕ := sorry -- (17, 21) +/-- +Let $T$ be the set of all triples $(a,b,c)$ of positive integers for which there exist triangles with side lengths $a,b,c$. Express +\[ +\sum_{(a,b,c) \in T} \frac{2^a}{3^b 5^c} +\] +as a rational number in lowest terms. +-/ theorem putnam_2015_b4 (quotientof : ℚ → (ℤ × ℕ)) (hquotientof : ∀ q : ℚ, quotientof q = (q.num, q.den)) diff --git a/lean4/src/putnam_2015_b5.lean b/lean4/src/putnam_2015_b5.lean index 4ff832e6..12ef8a39 100644 --- a/lean4/src/putnam_2015_b5.lean +++ b/lean4/src/putnam_2015_b5.lean @@ -5,6 +5,17 @@ open Function abbrev putnam_2015_b5_solution : ℕ := sorry -- 4 +/-- +Let $P_n$ be the number of permutations $\pi$ of $\{1,2,\dots,n\}$ such that +\[ +|i-j| = 1 \mbox{ implies } |\pi(i) -\pi(j)| \leq 2 +\] +for all $i,j$ in $\{1,2,\dots,n\}$. Show that for $n \geq 2$, the quantity +\[ +P_{n+5} - P_{n+4} - P_{n+3} + P_n +\] +does not depend on $n$, and find its value. +-/ theorem putnam_2015_b5 (P : ℕ → ℕ) (hP : P = fun n ↦ {pi : Finset.Icc 1 n → Finset.Icc 1 n | Bijective pi ∧ ∀ i j : Finset.Icc 1 n, Nat.dist i j = 1 → Nat.dist (pi i) (pi j) ≤ 2}.ncard) diff --git a/lean4/src/putnam_2015_b6.lean b/lean4/src/putnam_2015_b6.lean index 31a7561e..d9e541dd 100644 --- a/lean4/src/putnam_2015_b6.lean +++ b/lean4/src/putnam_2015_b6.lean @@ -5,6 +5,9 @@ open Filter Topology noncomputable abbrev putnam_2015_b6_solution : ℝ := sorry -- Real.pi ^ 2 / 16 +/-- +For each positive integer $k$, let $A(k)$ be the number of odd divisors of $k$ in the interval $[1,\sqrt{2k})$. Evaluate $\sum_{k=1}^\infty (-1)^{k-1}\frac{A(k)}{k}$. +-/ theorem putnam_2015_b6 (A : ℕ → ℕ) (hA : ∀ k > 0, A k = {j : ℕ | Odd j ∧ j ∣ k ∧ j < Real.sqrt (2 * k)}.encard) : diff --git a/lean4/src/putnam_2016_a1.lean b/lean4/src/putnam_2016_a1.lean index 791f671b..aeac4fc7 100644 --- a/lean4/src/putnam_2016_a1.lean +++ b/lean4/src/putnam_2016_a1.lean @@ -5,6 +5,9 @@ open Polynomial Filter Topology Real Set Nat abbrev putnam_2016_a1_solution : ℕ := sorry -- 8 +/-- +Find the smallest positive integer $j$ such that for every polynomial $p(x)$ with integer coefficients and for every integer $k$, the integer \[ p^{(j)}(k) = \left. \frac{d^j}{dx^j} p(x) \right|_{x=k} \] (the $j$-th derivative of $p(x)$ at $k$) is divisible by 2016. +-/ theorem putnam_2016_a1 : (∀ j : ℕ+, (∀ P : ℤ[X], ∀ k : ℤ, 2016 ∣ (derivative^[j] P).eval k) → j ≥ putnam_2016_a1_solution) ∧ (∀ P : ℤ[X], ∀ k : ℤ, 2016 ∣ (derivative^[putnam_2016_a1_solution] P).eval k) := sorry diff --git a/lean4/src/putnam_2016_a2.lean b/lean4/src/putnam_2016_a2.lean index 070ae7d6..bd1002ba 100644 --- a/lean4/src/putnam_2016_a2.lean +++ b/lean4/src/putnam_2016_a2.lean @@ -5,6 +5,16 @@ open Polynomial Filter Topology Real Set Nat noncomputable abbrev putnam_2016_a2_solution : ℝ := sorry -- (3 + √ 5) / 2 +/-- +Given a positive integer $n$, let $M(n)$ be the largest integer $m$ such that +\[ +inom{m}{n-1} > \binom{m-1}{n}. +\] +Evaluate +\[ +\lim_{n o \infty} \frac{M(n)}{n}. +\] +-/ theorem putnam_2016_a2 (M : ℕ → ℕ) (hM : ∀ n > 0, IsGreatest {m | 0 < m ∧ (m - 1).choose n < m.choose (n - 1)} (M n)) : diff --git a/lean4/src/putnam_2016_a3.lean b/lean4/src/putnam_2016_a3.lean index b1d5ab85..50e81717 100644 --- a/lean4/src/putnam_2016_a3.lean +++ b/lean4/src/putnam_2016_a3.lean @@ -5,6 +5,16 @@ open Polynomial Filter Topology Real Set Nat noncomputable abbrev putnam_2016_a3_solution : ℝ := sorry -- 3 * Real.pi / 8 +/-- +Suppose that $f$ is a function from $\mathbb{R}$ to $\mathbb{R}$ such that +\[ +f(x) + f\left( 1 - \frac{1}{x} \right) = \arctan x +\] +for all real $x \neq 0$. (As usual, $y = \arctan x$ means $-\pi/2 < y < \pi/2$ and $\tan y = x$.) Find +\[ +\int_0^1 f(x)\,dx. +\] +-/ theorem putnam_2016_a3 (f : ℝ → ℝ) (hf : ∀ x : ℝ, x ≠ 0 → f x + f (1 - 1 / x) = arctan x) diff --git a/lean4/src/putnam_2016_a5.lean b/lean4/src/putnam_2016_a5.lean index 5d33e77c..c2ccf1a1 100644 --- a/lean4/src/putnam_2016_a5.lean +++ b/lean4/src/putnam_2016_a5.lean @@ -3,6 +3,14 @@ open BigOperators open Polynomial Filter Topology Real Set Nat List +/-- +Suppose that $G$ is a finite group generated by the two elements $g$ and $h$, where the order of $g$ is odd. Show that every element of $G$ can be written in the form +\[ +g^{m_1} h^{n_1} g^{m_2} h^{n_2} \cdots g^{m_r} h^{n_r} +\] +with $1 \leq r \leq |G|$ and $m_1, n_1, m_2, n_2, \ldots, m_r, n_r \in \{-1, 1\}$. +(Here $|G|$ is the number of elements of $G$.) +-/ theorem putnam_2016_a5 (G : Type*) [Group G] (Gfin : Fintype G) diff --git a/lean4/src/putnam_2016_a6.lean b/lean4/src/putnam_2016_a6.lean index 91e86d10..0b2d84bb 100644 --- a/lean4/src/putnam_2016_a6.lean +++ b/lean4/src/putnam_2016_a6.lean @@ -5,6 +5,12 @@ open Polynomial Filter Topology Real Set Nat List noncomputable abbrev putnam_2016_a6_solution : ℝ := sorry -- 5 / 6 +/-- +Find the smallest constant $C$ such that for every real polynomial $P(x)$ of degree $3$ that has a root in the interval $[0,1]$, +\[ +\int_0^1 \left| P(x) \right|\,dx \leq C \max_{x \in [0,1]} \left| P(x) \right|. +\] +-/ theorem putnam_2016_a6 (C : ℝ) (max : Polynomial ℝ → ℝ) diff --git a/lean4/src/putnam_2016_b1.lean b/lean4/src/putnam_2016_b1.lean index 9be16268..eb064572 100644 --- a/lean4/src/putnam_2016_b1.lean +++ b/lean4/src/putnam_2016_b1.lean @@ -5,6 +5,17 @@ open Polynomial Filter Topology Real Set Nat List noncomputable abbrev putnam_2016_b1_solution : ℝ := sorry -- exp 1 - 1 +/-- +Let $x_0,x_1,x_2,\dots$ be the sequence such that $x_0=1$ and for $n \geq 0$, +\[ +x_{n+1} = \ln(e^{x_n} - x_n) +\] +(as usual, the function $\ln$ is the natural logarithm). Show that the infinite series +\[ +x_0 + x_1 + x_2 + \cdots +\] +converges and find its sum. +-/ theorem putnam_2016_b1 (x : ℕ → ℝ) (hx0 : x 0 = 1) diff --git a/lean4/src/putnam_2016_b2.lean b/lean4/src/putnam_2016_b2.lean index 4d0b3317..eac214c7 100644 --- a/lean4/src/putnam_2016_b2.lean +++ b/lean4/src/putnam_2016_b2.lean @@ -5,6 +5,16 @@ open Polynomial Filter Topology Real Set Nat List noncomputable abbrev putnam_2016_b2_solution : ℝ × ℝ := sorry -- (3 / 4, 4 / 3) +/-- +Define a positive integer $n$ to be \emph{squarish} if either $n$ is itself a perfect square or the distance from $n$ to the nearest perfect square is a perfect square. For example, $2016$ is squarish, because the nearest perfect square to $2016$ is $45^2 = 2025$ and $2025 - 2016 = 9$ is a perfect square. (Of the positive integers between $1$ and $10$, only $6$ and $7$ are not squarish.) + +For a positive integer $N$, let $S(N)$ be the number of squarish integers between $1$ and $N$, +inclusive. Find positive constants $\alpha$ and $\beta$ such that +\[ +\lim_{N \to \infty} \frac{S(N)}{N^\alpha} = \beta, +\] +or show that no such constants exist. +-/ theorem putnam_2016_b2 (squarish : ℤ → Prop) (hsquarish : squarish = fun n ↦ IsSquare n ∨ ∃ w : ℤ, IsSquare |n - w ^ 2| ∧ ∀ v : ℕ, |n - w ^ 2| ≤ |n - v ^ 2|) diff --git a/lean4/src/putnam_2016_b3.lean b/lean4/src/putnam_2016_b3.lean index 5668c6fa..f23ea9fa 100644 --- a/lean4/src/putnam_2016_b3.lean +++ b/lean4/src/putnam_2016_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Polynomial Filter Topology Real Set Nat List +/-- +Suppose that $S$ is a finite set of points in the plane such that the area of triangle $\triangle ABC$ is at most $1$ whenever $A$, $B$, and $C$ are in $S$. Show that there exists a triangle of area $4$ that (together with its interior) covers the set $S$. +-/ theorem putnam_2016_b3 (S : Finset (Fin 2 → ℝ)) (hS : ∀ A ∈ S, ∀ B ∈ S, ∀ C ∈ S, MeasureTheory.volume (convexHull ℝ {A, B, C}) ≤ 1) diff --git a/lean4/src/putnam_2016_b4.lean b/lean4/src/putnam_2016_b4.lean index 224d767a..2720d976 100644 --- a/lean4/src/putnam_2016_b4.lean +++ b/lean4/src/putnam_2016_b4.lean @@ -5,6 +5,9 @@ open Real Set Nat noncomputable abbrev putnam_2016_b4_solution : ℕ → ℝ := sorry -- (fun n : ℕ => (2 * n)! / (4 ^ n * (n)!)) +/-- +Let $A$ be a $2n \times 2n$ matrix, with entries chosen independently at random. Every entry is chosen to be $0$ or $1$, each with probability $1/2$. Find the expected value of $\det(A-A^t)$ (as a function of $n$), where $A^t$ is the transpose of $A$. +-/ theorem putnam_2016_b4 (n : ℕ) (npos : n ≥ 1) diff --git a/lean4/src/putnam_2016_b5.lean b/lean4/src/putnam_2016_b5.lean index f6ecb1f2..b7b6f3bb 100644 --- a/lean4/src/putnam_2016_b5.lean +++ b/lean4/src/putnam_2016_b5.lean @@ -5,6 +5,9 @@ open Polynomial Filter Topology Real Set Nat List abbrev putnam_2016_b5_solution : Set (Set.Ioi (1 : ℝ) → Set.Ioi (1 : ℝ)) := sorry -- {f : Set.Ioi (1 : ℝ) → Set.Ioi (1 : ℝ) | ∃ c : ℝ, c > 0 ∧ ∀ x : Set.Ioi (1 : ℝ), (f x : ℝ) = x ^ c} +/-- +Find all functions $f$ from the interval $(1,\infty)$ to $(1,\infty)$ with the following property: if $x,y \in (1,\infty)$ and $x^2 \leq y \leq x^3$, then $(f(x))^2 \leq f(y) \leq (f(x))^3$. +-/ theorem putnam_2016_b5 (f : Set.Ioi (1 : ℝ) → Set.Ioi (1 : ℝ)) (fle : Prop) diff --git a/lean4/src/putnam_2016_b6.lean b/lean4/src/putnam_2016_b6.lean index 3870567e..5d986954 100644 --- a/lean4/src/putnam_2016_b6.lean +++ b/lean4/src/putnam_2016_b6.lean @@ -5,6 +5,9 @@ open Polynomial Filter Topology Real Set Nat List abbrev putnam_2016_b6_solution : ℝ := sorry -- 1 +/-- +Evaluate $\sum_{k=1}^\infty \frac{(-1)^{k-1}}{k} \sum_{n=0}^\infty \frac{1}{k2^n+1}$. +-/ theorem putnam_2016_b6 : ∑' k : ℕ, ((-1 : ℝ) ^ ((k + 1 : ℤ) - 1) / (k + 1 : ℝ)) * ∑' n : ℕ, (1 : ℝ) / ((k + 1) * (2 ^ n) + 1) = putnam_2016_b6_solution := sorry diff --git a/lean4/src/putnam_2017_a1.lean b/lean4/src/putnam_2017_a1.lean index c149c381..c28a7bad 100644 --- a/lean4/src/putnam_2017_a1.lean +++ b/lean4/src/putnam_2017_a1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_2017_a1_solution : Set ℤ := sorry -- {x : ℤ | x > 0 ∧ (x = 1 ∨ 5 ∣ x)} +/-- +Let $S$ be the smallest set of positive integers such that (a) $2$ is in $S$, (b) $n$ is in $S$ whenever $n^2$ is in $S$, and (c) $(n+5)^2$ is in $S$ whenever $n$ is in $S$. Which positive integers are not in $S$?. +-/ theorem putnam_2017_a1 (IsQualifying : Set ℤ → Prop) (IsQualifying_def : ∀ S, IsQualifying S ↔ diff --git a/lean4/src/putnam_2017_a2.lean b/lean4/src/putnam_2017_a2.lean index 3b91ece3..519eeef8 100644 --- a/lean4/src/putnam_2017_a2.lean +++ b/lean4/src/putnam_2017_a2.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $Q_0(x)=1$, $Q_1(x)=x$, and $Q_n(x)=\frac{(Q_{n-1}(x))^2-1}{Q_{n-2}(x)}$ for all $n \geq 2$. Show that, whenever $n$ is a positive integer, $Q_n(x)$ is equal to a polynomial with integer coefficients. +-/ theorem putnam_2017_a2 (Q : ℕ → ℝ → ℝ) (hQbase : ∀ x : ℝ, Q 0 x = 1 ∧ Q 1 x = x) diff --git a/lean4/src/putnam_2017_a3.lean b/lean4/src/putnam_2017_a3.lean index c7da270b..3f230771 100644 --- a/lean4/src/putnam_2017_a3.lean +++ b/lean4/src/putnam_2017_a3.lean @@ -4,6 +4,9 @@ open BigOperators open Topology Filter -- Note: uses (ℝ → ℝ) instead of (Set.Icc a b → Set.Ioi (0 : ℝ)) +/-- +Let $a$ and $b$ be real numbers with $a1$. Considering all positive integers $N$ with this property, what is the smallest positive integer $a$ that occurs in any of these expressions? +-/ theorem putnam_2017_b2 (S : ℤ → ℕ → ℤ) (p : ℤ → ℕ → Prop) diff --git a/lean4/src/putnam_2017_b3.lean b/lean4/src/putnam_2017_b3.lean index 40f96aa0..38ad6a48 100644 --- a/lean4/src/putnam_2017_b3.lean +++ b/lean4/src/putnam_2017_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Suppose that $f(x) = \sum_{i=0}^\infty c_i x^i$ is a power series for which each coefficient $c_i$ is $0$ or $1$. Show that if $f(2/3) = 3/2$, then $f(1/2)$ must be irrational. +-/ theorem putnam_2017_b3 (f : ℝ → ℝ) (c : ℕ → ℝ) diff --git a/lean4/src/putnam_2017_b4.lean b/lean4/src/putnam_2017_b4.lean index 657712a5..aa489413 100644 --- a/lean4/src/putnam_2017_b4.lean +++ b/lean4/src/putnam_2017_b4.lean @@ -5,6 +5,9 @@ open Topology Filter Real noncomputable abbrev putnam_2017_b4_solution : ℝ := sorry -- (log 2) ^ 2 +/-- +Evaluate the sum \begin{gather*} \sum_{k=0}^\infty \left( 3 \cdot \frac{\ln(4k+2)}{4k+2} - \frac{\ln(4k+3)}{4k+3} - \frac{\ln(4k+4)}{4k+4} - \frac{\ln(4k+5)}{4k+5} ight) \ = 3 \cdot \frac{\ln 2}{2} - \frac{\ln 3}{3} - \frac{\ln 4}{4} - \frac{\ln 5}{5} + 3 \cdot \frac{\ln 6}{6} - \frac{\ln 7}{7} \ - \frac{\ln 8}{8} - \frac{\ln 9}{9} + 3 \cdot \frac{\ln 10}{10} - \cdots . \end{gather*} (As usual, $\ln x$ denotes the natural logarithm of $x$.) +-/ theorem putnam_2017_b4 : (∑' k : ℕ, (3 * log (4 * k + 2) / (4 * k + 2) - log (4 * k + 3) / (4 * k + 3) - log (4 * k + 4) / (4 * k + 4) - log (4 * k + 5) / (4 * k + 5)) = putnam_2017_b4_solution) := sorry diff --git a/lean4/src/putnam_2017_b6.lean b/lean4/src/putnam_2017_b6.lean index f1f7be95..024368fe 100644 --- a/lean4/src/putnam_2017_b6.lean +++ b/lean4/src/putnam_2017_b6.lean @@ -5,6 +5,13 @@ open Topology Filter Real Function Nat abbrev putnam_2017_b6_solution : ℕ := sorry -- 2016! / 1953! - 63! * 2016 +/-- +Find the number of ordered $64$-tuples $(x_0,x_1,\dots,x_{63})$ such that $x_0,x_1,\dots,x_{63}$ are distinct elements of $\{1,2,\dots,2017\}$ and +\[ +x_0 + x_1 + 2x_2 + 3x_3 + \cdots + 63 x_{63} +\] +is divisible by 2017. +-/ theorem putnam_2017_b6 (S : Finset (Finset.range 64 → Finset.Icc 1 2017)) (hs : ∀ x : (Finset.range 64 → Finset.Icc 1 2017), x ∈ S ↔ (Injective x ∧ (2017 ∣ (∑ i : Finset.range 64, if i ≤ (⟨1, by norm_num⟩ : Finset.range 64) then (x i : ℤ) else i * (x i : ℤ))))) diff --git a/lean4/src/putnam_2018_a1.lean b/lean4/src/putnam_2018_a1.lean index a873b80a..b4e91dfb 100644 --- a/lean4/src/putnam_2018_a1.lean +++ b/lean4/src/putnam_2018_a1.lean @@ -3,5 +3,8 @@ open BigOperators abbrev putnam_2018_a1_solution : Set (ℤ × ℤ) := sorry -- {⟨673, 1358114⟩, ⟨674, 340033⟩, ⟨1009, 2018⟩, ⟨2018, 1009⟩, ⟨340033, 674⟩, ⟨1358114, 673⟩} +/-- +Find all ordered pairs $(a,b)$ of positive integers for which $\frac{1}{a} + \frac{1}{b} = \frac{3}{2018}$. +-/ theorem putnam_2018_a1 : ∀ a b : ℤ, (a > 0 ∧ b > 0 ∧ ((1: ℚ) / a + (1: ℚ) / b = (3: ℚ) / 2018)) ↔ (⟨a, b⟩ ∈ putnam_2018_a1_solution) := sorry diff --git a/lean4/src/putnam_2018_a2.lean b/lean4/src/putnam_2018_a2.lean index 1d973f4d..42694918 100644 --- a/lean4/src/putnam_2018_a2.lean +++ b/lean4/src/putnam_2018_a2.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_2018_a2_solution : ℕ → ℝ := sorry -- (fun n : ℕ => if n = 1 then 1 else -1) +/-- +Let \( S_1, S_2, \ldots, S_{2^n-1} \) be the nonempty subsets of \( \{1, 2, \ldots, n\} \) in some order, and let \( M \) be the \( (2^n - 1) \times (2^n - 1) \) matrix whose \((i, j)\) entry is $m_{ij} = \begin{cases} 0 & \text{if } S_i \cap S_j = \emptyset; \\ 1 & \text{otherwise}. \end{cases} $ Calculate the determinant of \( M \). +-/ theorem putnam_2018_a2 (n : ℕ) (S : Fin (2 ^ n - 1) → Set ℕ) diff --git a/lean4/src/putnam_2018_a3.lean b/lean4/src/putnam_2018_a3.lean index 42cae8a4..526b5df0 100644 --- a/lean4/src/putnam_2018_a3.lean +++ b/lean4/src/putnam_2018_a3.lean @@ -3,6 +3,9 @@ open BigOperators noncomputable abbrev putnam_2018_a3_solution : ℝ := sorry -- 480/49 +/-- +Determine the greatest possible value of $\sum_{i=1}^{10} \cos(3x_i)$ for real numbers $x_1, x_2, \ldots, x_{10}$ satisfying $\sum_{i=1}^{10} \cos(x_i) = 0$. +-/ theorem putnam_2018_a3 : IsGreatest {∑ i, Real.cos (3 * x i) | (x : Fin 10 → ℝ) (hx : ∑ i, Real.cos (x i) = 0)} diff --git a/lean4/src/putnam_2018_a4.lean b/lean4/src/putnam_2018_a4.lean index 075c44fa..c9ea07db 100644 --- a/lean4/src/putnam_2018_a4.lean +++ b/lean4/src/putnam_2018_a4.lean @@ -2,6 +2,9 @@ import Mathlib open BigOperators -- Note: uses (ℕ → ℕ) instead of (Set.Icc 1 n → ℕ) +/-- +Let $m$ and $n$ be positive integers with $\gcd(m,n)=1$, and let $a_k=\left\lfloor \frac{mk}{n} \right\rfloor - \left\lfloor \frac{m(k-1)}{n} \right\rfloor$ for $k=1,2,\dots,n$. Suppose that $g$ and $h$ are elements in a group $G$ and that $gh^{a_1}gh^{a_2} \cdots gh^{a_n}=e$, where $e$ is the identity element. Show that $gh=hg$. (As usual, $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$.) +-/ theorem putnam_2018_a4 (m n : ℕ) (a : ℕ → ℤ) diff --git a/lean4/src/putnam_2018_a5.lean b/lean4/src/putnam_2018_a5.lean index 3ba4f92c..88ed079c 100644 --- a/lean4/src/putnam_2018_a5.lean +++ b/lean4/src/putnam_2018_a5.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $f: \mathbb{R} \to \mathbb{R}$ be an infinitely differentiable function satisfying $f(0) = 0$, $f(1)= 1$, and $f(x) \geq 0$ for all $x \in \mathbb{R}$. Show that there exist a positive integer $n$ and a real number $x$ such that $f^{(n)}(x) < 0$. +-/ theorem putnam_2018_a5 (f : ℝ → ℝ) (h0 : f 0 = 0) diff --git a/lean4/src/putnam_2018_a6.lean b/lean4/src/putnam_2018_a6.lean index 54dc0fd5..20891545 100644 --- a/lean4/src/putnam_2018_a6.lean +++ b/lean4/src/putnam_2018_a6.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Suppose that $A$, $B$, $C$, and $D$ are distinct points, no three of which lie on a line, in the Euclidean plane. Show that if the squares of the lengths of the line segments $AB$, $AC$, $AD$, $BC$, $BD$, and $CD$ are rational numbers, then the quotient $\frac{\text{area}(\triangle ABC)}{\text{area}(\triangle ABD)}$ is a rational number. +-/ theorem putnam_2018_a6 (A B C D : EuclideanSpace ℝ (Fin 2)) (PPprops : (EuclideanSpace ℝ (Fin 2)) → (EuclideanSpace ℝ (Fin 2)) → Prop) diff --git a/lean4/src/putnam_2018_b1.lean b/lean4/src/putnam_2018_b1.lean index 97407b02..37998aa5 100644 --- a/lean4/src/putnam_2018_b1.lean +++ b/lean4/src/putnam_2018_b1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_2018_b1_solution : Set (Mathlib.Vector ℤ 2) := sorry -- {v : Mathlib.Vector ℤ 2 | ∃ b : ℤ, 0 ≤ b ∧ b ≤ 100 ∧ Even b ∧ v.toList = [1, b]} +/-- +Let $\mathcal{P}$ be the set of vectors defined by $\mathcal{P}=\left\{\left.\begin{pmatrix} a \\ b \end{pmatrix}\right| 0 \leq a \leq 2, 0 \leq b \leq 100,\text{ and }a,b \in \mathbb{Z}\right\}$. Find all $\mathbf{v} \in \mathcal{P}$ such that the set $\mathcal{P} \setminus \{\mathbf{v}\}$ obtained by omitting vector $\mathbf{v}$ from $\mathcal{P}$ can be partitioned into two sets of equal size and equal sum. +-/ theorem putnam_2018_b1 (P : Finset (Mathlib.Vector ℤ 2)) (v : Mathlib.Vector ℤ 2) diff --git a/lean4/src/putnam_2018_b2.lean b/lean4/src/putnam_2018_b2.lean index e428cf7e..cf10788f 100644 --- a/lean4/src/putnam_2018_b2.lean +++ b/lean4/src/putnam_2018_b2.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $n$ be a positive integer, and let $f_n(z) = n + (n-1)z + (n-2)z^2 + \cdots + z^{n-1}$. Prove that $f_n$ has no roots in the closed unit disk $\{z \in \mathbb{C}: |z| \leq 1\}$. +-/ theorem putnam_2018_b2 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_2018_b3.lean b/lean4/src/putnam_2018_b3.lean index b67cf9fa..1b198276 100644 --- a/lean4/src/putnam_2018_b3.lean +++ b/lean4/src/putnam_2018_b3.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_2018_b3_solution : Set ℕ := sorry -- {2^2, 2^4, 2^16, 2^256} +/-- +Find all positive integers $n < 10^{100}$ for which simultaneously $n$ divides $2^n$, $n-1$ divides $2^n-1$, and $n-2$ divides $2^n - 2$. +-/ theorem putnam_2018_b3 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_2018_b4.lean b/lean4/src/putnam_2018_b4.lean index c3d60f1c..ac973542 100644 --- a/lean4/src/putnam_2018_b4.lean +++ b/lean4/src/putnam_2018_b4.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Given a real number $a$, we define a sequence by $x_0 = 1$, $x_1 = x_2 = a$, and $x_{n+1} = 2x_n x_{n-1} - x_{n-2}$ for $n \geq 2$. Prove that if $x_n = 0$ for some $n$, then the sequence is periodic. +-/ theorem putnam_2018_b4 (a : ℝ) (x : ℕ → ℝ) diff --git a/lean4/src/putnam_2018_b5.lean b/lean4/src/putnam_2018_b5.lean index e3c219af..9fba4279 100644 --- a/lean4/src/putnam_2018_b5.lean +++ b/lean4/src/putnam_2018_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Function +/-- +Let $f=(f_1,f_2)$ be a function from $\mathbb{R}^2$ to $\mathbb{R}^2$ with continuous partial derivatives $\frac{\partial f_i}{\partial x_j}$ that are positive everywhere. Suppose that $\frac{\partial f_1}{\partial x_1} \frac{\partial f_2}{\partial x_2}-\frac{1}{4}\left(\frac{\partial f_1}{\partial x_2}+\frac{\partial f_2}{\partial x_1}\right)^2>0$ everywhere. Prove that $f$ is one-to-one. +-/ theorem putnam_2018_b5 (f : (Fin 2 → ℝ) → (Fin 2 → ℝ)) (h₁ : ContDiff ℝ 1 f) diff --git a/lean4/src/putnam_2018_b6.lean b/lean4/src/putnam_2018_b6.lean index db852b21..683c5b9d 100644 --- a/lean4/src/putnam_2018_b6.lean +++ b/lean4/src/putnam_2018_b6.lean @@ -1,6 +1,9 @@ import Mathlib open BigOperators +/-- +Let $S$ be the set of sequences of length $2018$ whose terms are in the set $\{1,2,3,4,5,6,10\}$ and sum to $3860$. Prove that the cardinality of $S$ is at most $2^{3860} \cdot \left(\frac{2018}{2048}\right)^{2018}$. +-/ theorem putnam_2018_b6 (S : Finset (Fin 2018 → ℤ)) (hS : S = {s : Fin 2018 → ℤ | (∀ i : Fin 2018, s i ∈ ({1, 2, 3, 4, 5, 6, 10} : Set ℤ)) ∧ (∑ i : Fin 2018, s i) = 3860}) diff --git a/lean4/src/putnam_2019_a1.lean b/lean4/src/putnam_2019_a1.lean index 06c0cd21..669beed7 100644 --- a/lean4/src/putnam_2019_a1.lean +++ b/lean4/src/putnam_2019_a1.lean @@ -5,6 +5,13 @@ open Topology Filter abbrev putnam_2019_a1_solution : Set ℤ := sorry -- {n : ℤ | n ≥ 0 ∧ ¬Int.ModEq 9 n 3 ∧ ¬Int.ModEq 9 n 6} +/-- +Determine all possible values of the expression +\[ +A^3+B^3+C^3-3ABC +\] +where $A, B$, and $C$ are nonnegative integers. +-/ theorem putnam_2019_a1 : {n : ℤ | ∃ A B C : ℤ, A ≥ 0 ∧ B ≥ 0 ∧ C ≥ 0 ∧ A^3 + B^3 + C^3 - 3*A*B*C = n} = putnam_2019_a1_solution := sorry diff --git a/lean4/src/putnam_2019_a3.lean b/lean4/src/putnam_2019_a3.lean index c8ad4bbb..7eda1576 100644 --- a/lean4/src/putnam_2019_a3.lean +++ b/lean4/src/putnam_2019_a3.lean @@ -5,6 +5,17 @@ open Topology Filter noncomputable abbrev putnam_2019_a3_solution : ℝ := sorry -- 2019^(-(1:ℝ)/2019) +/-- +Given real numbers $b_0, b_1, \dots, b_{2019}$ with $b_{2019} \neq 0$, let $z_1,z_2,\dots,z_{2019}$ be +the roots in the complex plane of the polynomial +\[ +P(z) = \sum_{k=0}^{2019} b_k z^k. +\] +Let $\mu = (|z_1| + \cdots + |z_{2019}|)/2019$ be the average of the distances from $z_1,z_2,\dots,z_{2019}$ to the origin. Determine the largest constant $M$ such that $\mu \geq M$ for all choices of $b_0,b_1,\dots, b_{2019}$ that satisfy +\[ +1 \leq b_0 < b_1 < b_2 < \cdots < b_{2019} \leq 2019. +\] +-/ theorem putnam_2019_a3 (v : Polynomial ℂ → Prop) (hv : v = fun b : Polynomial ℂ => b.degree = 2019 ∧ 1 ≤ (b.coeff 0).re ∧ (b.coeff 2019).re ≤ 2019 ∧ diff --git a/lean4/src/putnam_2019_a4.lean b/lean4/src/putnam_2019_a4.lean index 25ae83a9..29af4c3e 100644 --- a/lean4/src/putnam_2019_a4.lean +++ b/lean4/src/putnam_2019_a4.lean @@ -5,6 +5,9 @@ open MeasureTheory Metric Topology Filter abbrev putnam_2019_a4_solution : Prop := sorry -- False +/-- +Let $f$ be a continuous real-valued function on $\mathbb{R}^3$. Suppose that for every sphere $S$ of radius $1$, the integral of $f(x,y,z)$ over the surface of $S$ equals $0$. Must $f(x,y,z)$ be identically 0? +-/ theorem putnam_2019_a4 (P : (EuclideanSpace ℝ (Fin 3) → ℝ) → Prop) (P_def : ∀ f, P f ↔ ∀ C, ∫ x in sphere C 1, f x ∂μH[2] = 0) : diff --git a/lean4/src/putnam_2019_a5.lean b/lean4/src/putnam_2019_a5.lean index c05b257b..687f3267 100644 --- a/lean4/src/putnam_2019_a5.lean +++ b/lean4/src/putnam_2019_a5.lean @@ -5,6 +5,9 @@ open Topology Filter abbrev putnam_2019_a5_solution : ℕ → ℕ := sorry -- (fun p : ℕ => (p - 1) / 2) +/-- +Let $p$ be an odd prime number, and let $\mathbb{F}_p$ denote the field of integers modulo $p$. Let $\mathbb{F}_p[x]$ be the ring of polynomials over $\mathbb{F}_p$, and let $q(x) \in \mathbb{F}_p[x]$ be given by $q(x)=\sum_{k=1}^{p-1} a_kx^k$, where $a_k=k^{(p-1)/2}\mod{p}$. Find the greatest nonnegative integer $n$ such that $(x-1)^n$ divides $q(x)$ in $\mathbb{F}_p[x]$. +-/ theorem putnam_2019_a5 (p : ℕ) (q : Polynomial (ZMod p)) diff --git a/lean4/src/putnam_2019_a6.lean b/lean4/src/putnam_2019_a6.lean index 10263f11..27250bc8 100644 --- a/lean4/src/putnam_2019_a6.lean +++ b/lean4/src/putnam_2019_a6.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter +/-- +Let \( g \) be a real-valued function that is continuous on the closed interval \([0,1]\) and twice differentiable on the open interval \((0,1)\). Suppose that for some real number $\( r > 1 \),\lim_{{x \to 0^+}} \frac{g(x)}{x^r} = 0.$ Prove that either $\lim_{{x \to 0^+}} g'(x) = 0$ or $\limsup_{{x \to 0^+}} x^r |g''(x)| = \infty.$ +-/ theorem putnam_2019_a6 (g : ℝ → ℝ) (r : ℝ) diff --git a/lean4/src/putnam_2019_b1.lean b/lean4/src/putnam_2019_b1.lean index 916eb5c6..883139ae 100644 --- a/lean4/src/putnam_2019_b1.lean +++ b/lean4/src/putnam_2019_b1.lean @@ -5,6 +5,9 @@ open Topology Filter abbrev putnam_2019_b1_solution : ℕ → ℕ := sorry -- (fun n : ℕ => 5 * n + 1) +/-- +Denote by $\mathbb{Z}^2$ the set of all points $(x,y)$ in the plane with integer coordinates. For each integer $n \geq 0$, let $P_n$ be the subset of $\mathbb{Z}^2$ consisting of the point $(0,0)$ together with all points $(x,y)$ such that $x^2+y^2=2^k$ for some integer $k \leq n$. Determine, as a function of $n$, the number of four-point subsets of $P_n$ whose elements are the vertices of a square. +-/ theorem putnam_2019_b1 (n : ℕ) (Pn : Set (Fin 2 → ℤ)) diff --git a/lean4/src/putnam_2019_b2.lean b/lean4/src/putnam_2019_b2.lean index c23e32d5..4d63712c 100644 --- a/lean4/src/putnam_2019_b2.lean +++ b/lean4/src/putnam_2019_b2.lean @@ -5,6 +5,16 @@ open Topology Filter Set noncomputable abbrev putnam_2019_b2_solution : ℝ := sorry -- 8/Real.pi^3 +/-- +For all $n \geq 1$, let +\[ +a_n = \sum_{k=1}^{n-1} \frac{\sin \left( \frac{(2k-1)\pi}{2n} \right)}{\cos^2 \left( \frac{(k-1)\pi}{2n} \right) \cos^2 \left( \frac{k\pi}{2n} \right)}. +\] +Determine +\[ +\lim_{n \to \infty} \frac{a_n}{n^3}. +\] +-/ theorem putnam_2019_b2 (a : ℕ → ℝ) (ha : a = fun n : ℕ => ∑ k : Icc (1 : ℤ) (n - 1), diff --git a/lean4/src/putnam_2019_b3.lean b/lean4/src/putnam_2019_b3.lean index 29052df1..4192d6ae 100644 --- a/lean4/src/putnam_2019_b3.lean +++ b/lean4/src/putnam_2019_b3.lean @@ -3,6 +3,9 @@ open BigOperators open Topology Filter Set Matrix +/-- +Let $Q$ be an $n$-by-$n$ real orthogonal matrix, and let $u \in \mathbb{R}^n$ be a unit column vector (that is, $u^T u = 1$). Let $P = I - 2uu^T$, where $I$ is the $n$-by-$n$ identity matrix. Show that if $1$ is not an eigenvalue of $Q$, then $1$ is an eigenvalue of $PQ$. +-/ theorem putnam_2019_b3 (n : ℕ) (hn : n > 0) diff --git a/lean4/src/putnam_2019_b4.lean b/lean4/src/putnam_2019_b4.lean index 2107f82c..25243fe6 100644 --- a/lean4/src/putnam_2019_b4.lean +++ b/lean4/src/putnam_2019_b4.lean @@ -6,6 +6,14 @@ open Topology Filter Set Matrix -- Note: boosts the domain of f to the entire 2D plane noncomputable abbrev putnam_2019_b4_solution : ℝ := sorry -- 2 * Real.log 2 - 1 / 2 +/-- +Let $\mathcal{F}$ be the set of functions $f(x,y)$ that are twice continuously differentiable for $x \geq 1,y \geq 1$ and that satisfy the following two equations (where subscripts denote partial derivatives): +\begin{gather*} +xf_x+yf_y=xy\ln(xy), \\ +x^2f_{xx}+y^2f_{yy}=xy. +\end{gather*} +For each $f \in \mathcal{F}$, let $m(f)=\min_{s \geq 1} (f(s+1,s+1)-f(s+1,s)-f(s,s+1)+f(s,s))$. Determine $m(f)$, and show that it is independent of the choice of $f$. +-/ theorem putnam_2019_b4 (f : (Fin 2 → ℝ) → ℝ) (vec : ℝ → ℝ → (Fin 2 → ℝ)) diff --git a/lean4/src/putnam_2019_b5.lean b/lean4/src/putnam_2019_b5.lean index 5812e94e..0c26b903 100644 --- a/lean4/src/putnam_2019_b5.lean +++ b/lean4/src/putnam_2019_b5.lean @@ -5,6 +5,9 @@ open Topology Filter Set Matrix abbrev putnam_2019_b5_solution : ℕ × ℕ := sorry -- ⟨2019, 1010⟩ +/-- +Let $F_m$ be the $m$th Fibonacci number, defined by $F_1 = F_2 = 1$ and $F_m = F_{m-1} + F_{m-2}$ for all $m \geq 3$. Let $p(x)$ be the polynomial of degree $1008$ such that $p(2n + 1) = F_{2n+1}$ for $n = 0,1,2,\ldots,1008$. Find integers $j$ and $k$ such that $p(2019) = F_j - F_k$. +-/ theorem putnam_2019_b5 (F : ℕ → ℤ) (P : Polynomial ℝ) diff --git a/lean4/src/putnam_2019_b6.lean b/lean4/src/putnam_2019_b6.lean index 8604ad3f..b453899d 100644 --- a/lean4/src/putnam_2019_b6.lean +++ b/lean4/src/putnam_2019_b6.lean @@ -5,6 +5,9 @@ open Topology Filter Set Matrix abbrev putnam_2019_b6_solution : Set ℕ := sorry -- Set.Ici 1 +/-- +Let \( \mathbb{Z}^n \) be the integer lattice in \( \mathbb{R}^n \). Two points in \( \mathbb{Z}^n \) are called neighbors if they differ by exactly 1 in one coordinate and are equal in all other coordinates. For which integers \( n \geq 1 \) does there exist a set of points \( S \subset \mathbb{Z}^n \) satisfying the following two conditions? \begin{enumerate} \item If \( p \) is in \( S \), then none of the neighbors of \( p \) is in \( S \). \item If \( p \in \mathbb{Z}^n \) is not in \( S \), then exactly one of the neighbors of \( p \) is in \( S \). \end{enumerate} +-/ theorem putnam_2019_b6 (n : ℕ) (neighbors : (Fin n → ℤ) → (Fin n → ℤ) → Prop) diff --git a/lean4/src/putnam_2020_a1.lean b/lean4/src/putnam_2020_a1.lean index 8a9d316f..c99bdc8a 100644 --- a/lean4/src/putnam_2020_a1.lean +++ b/lean4/src/putnam_2020_a1.lean @@ -3,6 +3,9 @@ open BigOperators abbrev putnam_2020_a1_solution : ℕ := sorry -- 508536 +/-- +Find the number of positive integers $N$ satisfying: (i) $N$ is divisible by $2020$, (ii) $N$ has at most $2020$ decimal digits, (iii) The decimal digits of $N$ are a string of consecutive ones followed by a string of consecutive zeros. +-/ theorem putnam_2020_a1 : Set.ncard {x : ℕ | (2020 ∣ x) ∧ (Nat.log 10 x) + 1 ≤ 2020 ∧ (∃ k l, k ≥ l ∧ x = ∑ i in Finset.range (k-l+1), 10 ^ (i+l))} = putnam_2020_a1_solution := sorry diff --git a/lean4/src/putnam_2020_a2.lean b/lean4/src/putnam_2020_a2.lean index 9dfdc004..13f0cf0a 100644 --- a/lean4/src/putnam_2020_a2.lean +++ b/lean4/src/putnam_2020_a2.lean @@ -3,6 +3,12 @@ open BigOperators abbrev putnam_2020_a2_solution : ℕ → ℕ := sorry -- fun k ↦ 4 ^ k +/-- +Let $k$ be a nonnegative integer. Evaluate +\[ +\sum_{j=0}^k 2^{k-j} \binom{k+j}{j}. +\] +-/ theorem putnam_2020_a2 (k : ℕ) : (∑ j in Finset.Icc 0 k, 2 ^ (k - j) * Nat.choose (k + j) j = putnam_2020_a2_solution k) := diff --git a/lean4/src/putnam_2020_a3.lean b/lean4/src/putnam_2020_a3.lean index b2f4adb4..c14b2399 100644 --- a/lean4/src/putnam_2020_a3.lean +++ b/lean4/src/putnam_2020_a3.lean @@ -5,6 +5,13 @@ open Filter Topology Set abbrev putnam_2020_a3_solution : Prop := sorry -- False +/-- +Let $a_0 = \pi/2$, and let $a_n = \sin(a_{n-1})$ for $n \geq 1$. Determine whether +\[ +\sum_{n=1}^\infty a_n^2 +\] +converges. +-/ theorem putnam_2020_a3 (a : ℕ → ℝ) (ha0 : a 0 = Real.pi / 2) diff --git a/lean4/src/putnam_2020_a5.lean b/lean4/src/putnam_2020_a5.lean index bbeb95b8..18c05bfa 100644 --- a/lean4/src/putnam_2020_a5.lean +++ b/lean4/src/putnam_2020_a5.lean @@ -5,6 +5,13 @@ open Filter Topology Set abbrev putnam_2020_a5_solution : ℤ := sorry -- (Nat.fib 4040) - 1 +/-- +Let $a_n$ be the number of sets $S$ of positive integers for which +\[ +\sum_{k \in S} F_k = n, +\] +where the Fibonacci sequence $(F_k)_{k \geq 1}$ satisfies $F_{k+2} = F_{k+1} + F_k$ and begins $F_1 = 1, F_2 = 1, F_3 = 2, F_4 = 3$. Find the largest integer $n$ such that $a_n = 2020$. +-/ theorem putnam_2020_a5 (a : ℤ → ℕ) (ha : a = fun n : ℤ => {S : Finset ℕ | (∀ k ∈ S, k > 0) ∧ ∑ k : S, Nat.fib k = n}.ncard) diff --git a/lean4/src/putnam_2020_a6.lean b/lean4/src/putnam_2020_a6.lean index ea94bd77..6200b1c3 100644 --- a/lean4/src/putnam_2020_a6.lean +++ b/lean4/src/putnam_2020_a6.lean @@ -5,6 +5,13 @@ open Filter Topology Set noncomputable abbrev putnam_2020_a6_solution : ℝ := sorry -- Real.pi / 4 +/-- +For a positive integer $N$, let $f_N$ be the function defined by +\[ +f_N(x) = \sum_{n=0}^N \frac{N+1/2-n}{(N+1)(2n+1)} \sin((2n+1)x). +\] +Determine the smallest constant $M$ such that $f_N(x) \leq M$ for all $N$ and all real $x$. +-/ theorem putnam_2020_a6 (f : ℤ → (ℝ → ℝ)) (hf : f = fun N : ℤ => fun x : ℝ => diff --git a/lean4/src/putnam_2020_b1.lean b/lean4/src/putnam_2020_b1.lean index 7329b53d..98ed0164 100644 --- a/lean4/src/putnam_2020_b1.lean +++ b/lean4/src/putnam_2020_b1.lean @@ -5,6 +5,13 @@ open Filter Topology Set abbrev putnam_2020_b1_solution : ℕ := sorry -- 1990 +/-- +For a positive integer $n$, define $d(n)$ to be the sum of the digits of $n$ when written in binary (for example, $d(13) = 1+1+0+1=3)$. Let +\[ +S = \sum_{k=1}^{2020} (-1)^{d(k)} k^3. +\] +Determine $S$ modulo 2020. +-/ theorem putnam_2020_b1 (d : ℕ → ℕ) (S : ℤ) diff --git a/lean4/src/putnam_2020_b4.lean b/lean4/src/putnam_2020_b4.lean index d6381570..54bf70ad 100644 --- a/lean4/src/putnam_2020_b4.lean +++ b/lean4/src/putnam_2020_b4.lean @@ -5,6 +5,9 @@ open Filter Topology Set noncomputable abbrev putnam_2020_b4_solution : ℝ := sorry -- 1 / 4040 +/-- +Let $n$ be a positive integer, and let $V_n$ be the set of integer $(2n+1)$-tuples $\mathbf{v} = (s_0, s_1, \cdots, s_{2n-1}, s_{2n})$ for which $s_0 = s_{2n} = 0$ and $|s_j - s_{j-1}| = 1$ for $j=1,2,\cdots,2n$. Define \[ q(\mathbf{v}) = 1 + \sum_{j=1}^{2n-1} 3^{s_j}, \] and let $M(n)$ be the average of $\frac{1}{q(\mathbf{v})}$ over all $\mathbf{v} \in V_n$. Evaluate $M(2020)$. +-/ theorem putnam_2020_b4 (V : ℕ → Set (ℕ → ℤ)) (q : ℕ → (ℕ → ℤ) → ℝ) diff --git a/lean4/src/putnam_2020_b5.lean b/lean4/src/putnam_2020_b5.lean index 3d4a0c9a..3c8123b4 100644 --- a/lean4/src/putnam_2020_b5.lean +++ b/lean4/src/putnam_2020_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Set +/-- +For $j \in \{1, 2, 3, 4\}$, let $z_j$ be a complex number with $|z_j| = 1$ and $z_j \neq 1$. Prove that \[ 3 - z_1 - z_2 - z_3 - z_4 + z_1 z_2 z_3 z_4 \neq 0. \] +-/ theorem putnam_2020_b5 (z : Fin 4 → ℂ) (hzle1 : ∀ n, ‖z n‖ < 1) diff --git a/lean4/src/putnam_2020_b6.lean b/lean4/src/putnam_2020_b6.lean index 8f4637d8..8f079169 100644 --- a/lean4/src/putnam_2020_b6.lean +++ b/lean4/src/putnam_2020_b6.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology Set +/-- +Let $n$ be a positive integer. Prove that $\sum_{k=1}^n(-1)^{\lfloor k(\sqrt{2}-1) \rfloor} \geq 0$. +-/ theorem putnam_2020_b6 (n : ℕ) (npos : n > 0) diff --git a/lean4/src/putnam_2021_a1.lean b/lean4/src/putnam_2021_a1.lean index 56baab6a..9f90d042 100644 --- a/lean4/src/putnam_2021_a1.lean +++ b/lean4/src/putnam_2021_a1.lean @@ -5,6 +5,11 @@ open Filter Topology abbrev putnam_2021_a1_solution : ℕ := sorry -- 578 +/-- +A grasshopper starts at the origin in the coordinate plane and makes a sequence of hops. +Each hop has length $5$, and after each hop the grasshopper is at a point whose coordinates are both integers; thus, there are $12$ possible locations for the grasshopper after the first hop. +What is the smallest number of hops needed for the grasshopper to reach the point $(2021, 2021)$? +-/ theorem putnam_2021_a1 (P : List (ℤ × ℤ) → Prop) (hP : P = fun l : List (ℤ × ℤ) => l.length ≥ 1 ∧ l[0]! = (0, 0) ∧ l[l.length-1]! = (2021, 2021) ∧ diff --git a/lean4/src/putnam_2021_a2.lean b/lean4/src/putnam_2021_a2.lean index f223dc6f..87bf3faa 100644 --- a/lean4/src/putnam_2021_a2.lean +++ b/lean4/src/putnam_2021_a2.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_2021_a2_solution : ℝ := sorry -- Real.exp 1 +/-- +For every positive real number $x$, let $g(x)=\lim_{r \to 0}((x+1)^{r+1}-x^{r+1})^\frac{1}{r}$. Find $\lim_{x \to \infty}\frac{g(x)}{x}$. +-/ theorem putnam_2021_a2 (g : ℝ → ℝ) (hg : ∀ x > 0, Tendsto (fun r : ℝ => ((x + 1) ^ (r + 1) - x ^ (r + 1)) ^ (1 / r)) (𝓝[>] 0) (𝓝 (g x))) diff --git a/lean4/src/putnam_2021_a3.lean b/lean4/src/putnam_2021_a3.lean index 86187297..66cbed28 100644 --- a/lean4/src/putnam_2021_a3.lean +++ b/lean4/src/putnam_2021_a3.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_2021_a3_solution : Set ℕ := sorry -- {3 * m ^ 2 | m > 0} +/-- +Determine all positive integers $N$ for which the sphere $x^2+y^2+z^2=N$ has an inscribed regular tetrahedron whose vertices have integer coordinates. +-/ theorem putnam_2021_a3 (N : ℕ) (Nsphere : Set (EuclideanSpace ℝ (Fin 3))) diff --git a/lean4/src/putnam_2021_a4.lean b/lean4/src/putnam_2021_a4.lean index 6a74c6b1..322f4832 100644 --- a/lean4/src/putnam_2021_a4.lean +++ b/lean4/src/putnam_2021_a4.lean @@ -5,6 +5,17 @@ open Filter Topology Metric noncomputable abbrev putnam_2021_a4_solution : ℝ := sorry -- ((Real.sqrt 2) / 2) * Real.pi * Real.log 2 +/-- +Let +\[ +I(R) = \iint_{x^2+y^2 \leq R^2} \left( \frac{1+2x^2}{1+x^4+6x^2y^2+y^4} - \frac{1+y^2}{2+x^4+y^4} \right)\,dx\,dy. +\] +Find +\[ +\lim_{R \to \infty} I(R), +\] +or show that this limit does not exist. +-/ theorem putnam_2021_a4 (S : ℝ → Set (EuclideanSpace ℝ (Fin 2))) (hS : S = fun R : ℝ => ball (0 : EuclideanSpace ℝ (Fin 2)) R) diff --git a/lean4/src/putnam_2021_a5.lean b/lean4/src/putnam_2021_a5.lean index 00144a84..1cf6fe80 100644 --- a/lean4/src/putnam_2021_a5.lean +++ b/lean4/src/putnam_2021_a5.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_2021_a5_solution : Set ℕ := sorry -- {j : ℕ | ¬(42 ∣ j) ∧ ¬(46 ∣ j)} +/-- +Let $A$ be the set of all integers $n$ such that $1 \leq n \leq 2021$ and $\gcd(n,2021)=1$. For every nonnegative integer $j$, let $S(j)=\sum_{n \in A}n^j$. Determine all values of $j$ such that $S(j)$ is a multiple of $2021$. +-/ theorem putnam_2021_a5 (j : ℕ) (A : Finset ℕ) diff --git a/lean4/src/putnam_2021_a6.lean b/lean4/src/putnam_2021_a6.lean index 5cdc69d1..1ab02f9a 100644 --- a/lean4/src/putnam_2021_a6.lean +++ b/lean4/src/putnam_2021_a6.lean @@ -5,6 +5,9 @@ open Filter Topology abbrev putnam_2021_a6_solution : Prop := sorry -- True +/-- +Let $P(x)$ be a polynomial whose coefficients are all either $0$ or $1$. Suppose that $P(x)$ can be written as a product of two nonconstant polynomials with integer coefficients. Does it follow that $P(2)$ is a composite integer? +-/ theorem putnam_2021_a6 (Pcoeff : Polynomial ℤ → Prop) (Pprod : Polynomial ℤ → Prop) diff --git a/lean4/src/putnam_2021_b2.lean b/lean4/src/putnam_2021_b2.lean index 558fd790..520a067b 100644 --- a/lean4/src/putnam_2021_b2.lean +++ b/lean4/src/putnam_2021_b2.lean @@ -5,6 +5,9 @@ open Filter Topology noncomputable abbrev putnam_2021_b2_solution : ℝ := sorry -- 2 / 3 +/-- +Determine the maximum value of the sum $S = \sum_{n=1}^\infty \frac{n}{2^n}(a_1a_2 \dots a_n)^{1/n}$ over all sequences $a_1,a_2,a_3,\dots$ of nonnegative real numbers satisfying $\sum_{k=1}^\infty a_k=1$. +-/ theorem putnam_2021_b2 : IsGreatest {S | ∃ a : ℕ+ → ℝ, (∑' k, a k = 1) ∧ (∀ k, 0 ≤ a k) ∧ diff --git a/lean4/src/putnam_2021_b3.lean b/lean4/src/putnam_2021_b3.lean index 42abc957..345e2e51 100644 --- a/lean4/src/putnam_2021_b3.lean +++ b/lean4/src/putnam_2021_b3.lean @@ -5,6 +5,9 @@ open Filter Topology Metric abbrev putnam_2021_b3_solution : Prop := sorry -- True +/-- +Let $h(x,y)$ be a real-valued function that is twice continuously differentiable throughout $\mathbb{R}^2$, and define $\rho(x,y)=yh_x-xh_y$. Prove or disprove: For any positive constants $d$ and $r$ with $d>r$, there is a circle $\mathcal{S}$ of radius $r$ whose center is a distance $d$ away from the origin such that the integral of $\rho$ over the interior of $\mathcal{S}$ is zero. +-/ theorem putnam_2021_b3 (rho : ((EuclideanSpace ℝ (Fin 2)) → ℝ) → (EuclideanSpace ℝ (Fin 2)) → ℝ) (circint : (EuclideanSpace ℝ (Fin 2)) → ℝ → Set (EuclideanSpace ℝ (Fin 2))) diff --git a/lean4/src/putnam_2021_b4.lean b/lean4/src/putnam_2021_b4.lean index dae21c40..7d2730f0 100644 --- a/lean4/src/putnam_2021_b4.lean +++ b/lean4/src/putnam_2021_b4.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology +/-- +Let $F_0, F_1, \ldots$ be the sequence of Fibonacci numbers, with $F_0 = 0$, $F_1 = 1$, and $F_n = F_{n-1} + F_{n-2}$ for $n \geq 2$. For $m > 2$, let $R_m$ be the remainder when the product $\prod_{k=1}^{F_{m-1}} k^k$ is divided by $F_m$. Prove that $R_m$ is also a Fibonacci number. +-/ theorem putnam_2021_b4 (F : ℕ → ℕ) (hF : ∀ x, x ≥ 2 → F x = F (x - 1) + F (x - 2)) diff --git a/lean4/src/putnam_2021_b5.lean b/lean4/src/putnam_2021_b5.lean index 2ff38c21..818e0508 100644 --- a/lean4/src/putnam_2021_b5.lean +++ b/lean4/src/putnam_2021_b5.lean @@ -3,6 +3,9 @@ open BigOperators open Filter Topology +/-- +Say that an $n$-by-$n$ matrix $A=(a_{ij})_{1 \leq i,j \leq n}$ with integer entries is \emph{very odd} if, for every nonempty subset $S$ of $\{1,2,\dots,n\}$, the $|S|$-by-$|S|$ submatrix $(a_{ij})_{i,j \in S}$ has odd determinant. Prove that if $A$ is very odd, then $A^k$ is very odd for every $k \geq 1$. +-/ theorem putnam_2021_b5 (n : ℕ) (npos : n ≥ 1) diff --git a/lean4/src/putnam_2022_a1.lean b/lean4/src/putnam_2022_a1.lean index df5e889d..cbfc5c97 100644 --- a/lean4/src/putnam_2022_a1.lean +++ b/lean4/src/putnam_2022_a1.lean @@ -5,6 +5,9 @@ open Polynomial abbrev putnam_2022_a1_solution : Set (ℝ × ℝ) := sorry -- {(a, b) | (a = 0 ∧ b = 0) ∨ (|a| ≥ 1) ∨ (0 < |a| ∧ |a| < 1 ∧ (b < (Real.log (1 - (1 - Real.sqrt (1 - a^2))/a))^2 - |a| * (1 - Real.sqrt (1 - a^2))/a ∨ b > (Real.log (1 - (1 + Real.sqrt (1 - a^2))/a))^2 - |a| * (1 + Real.sqrt (1 - a^2))/a))} +/-- +Determine all ordered pairs of real numbers $(a,b)$ such that the line $y = ax+b$ intersects the curve $y = \ln(1+x^2)$ in exactly one point. +-/ theorem putnam_2022_a1 : {(a, b) | ∃! x : ℝ, a * x + b = Real.log (1 + x^2)} = putnam_2022_a1_solution := sorry diff --git a/lean4/src/putnam_2022_a2.lean b/lean4/src/putnam_2022_a2.lean index 8760405d..40ee6613 100644 --- a/lean4/src/putnam_2022_a2.lean +++ b/lean4/src/putnam_2022_a2.lean @@ -5,6 +5,9 @@ open Polynomial abbrev putnam_2022_a2_solution : ℕ → ℕ := sorry -- fun n => 2*n - 2 +/-- +Let $n$ be an integer with $n \geq 2$. Over all real polynomials $p(x)$ of degree $n$, what is the largest possible number of negative coefficients of $p(x)^2$? +-/ theorem putnam_2022_a2 (n : ℕ) (hn : n ≥ 2) diff --git a/lean4/src/putnam_2022_a3.lean b/lean4/src/putnam_2022_a3.lean index c4c334a6..c8f42112 100644 --- a/lean4/src/putnam_2022_a3.lean +++ b/lean4/src/putnam_2022_a3.lean @@ -3,6 +3,9 @@ open BigOperators open Polynomial +/-- +Let $p$ be a prime number greater than 5. Let $f(p)$ denote the number of infinite sequences $a_1, a_2, a_3, \dots$ such that $a_n \in \{1, 2, \dots, p-1\}$ and $a_n a_{n+2} \equiv 1 + a_{n+1} \pmod{p}$ for all $n \geq 1$. Prove that $f(p)$ is congruent to 0 or 2 $\pmod{5}$. +-/ theorem putnam_2022_a3 (p f : ℕ) (hp : Nat.Prime p ∧ p > 5) diff --git a/lean4/src/putnam_2022_a6.lean b/lean4/src/putnam_2022_a6.lean index 17fa8092..7304b010 100644 --- a/lean4/src/putnam_2022_a6.lean +++ b/lean4/src/putnam_2022_a6.lean @@ -6,6 +6,9 @@ open Polynomial -- Note: uses (ℕ → ℝ) instead of (Fin (2 * n) → ℝ) abbrev putnam_2022_a6_solution : ℕ → ℕ := sorry -- (fun n : ℕ => n) +/-- +Let $n$ be a positive integer. Determine, in terms of $n$, the largest integer $m$ with the following property: There exist real numbers $x_1,\dots,x_{2n}$ with $-10$ such that there are two points of the same color at distance $d$ apart. Recolor the positive reals so that the numbers in $D$ are red and the numbers not in $D$ are blue. If we iterate this recoloring process, will we always end up with all the numbers red after a finite number of steps? +-/ theorem putnam_2022_b3 (recolor : (ℝ → Prop) → (ℝ → Prop)) (hrecolor : ∀ isred : ℝ → Prop, recolor isred = (fun d : ℝ => ∃ p q : ℝ, p > 0 ∧ q > 0 ∧ p < q ∧ isred p = isred q ∧ q - p = d)) diff --git a/lean4/src/putnam_2022_b4.lean b/lean4/src/putnam_2022_b4.lean index 44e82710..64461650 100644 --- a/lean4/src/putnam_2022_b4.lean +++ b/lean4/src/putnam_2022_b4.lean @@ -6,6 +6,9 @@ open Polynomial -- Note: uses (ℕ → ℝ) instead of (Fin n → ℝ) abbrev putnam_2022_b4_solution : Set ℕ := sorry -- {n : ℕ | 3 ∣ n ∧ n ≥ 9} +/-- +Find all integers $n$ with $n \geq 4$ for which there exists a sequence of distinct real numbers $x_1,\dots,x_n$ such that each of the sets $\{x_1,x_2,x_3\},\{x_2,x_3,x_4\},\dots,\{x_{n-2},x_{n-1},x_n\},\{x_{n-1},x_n,x_1\}$, and $\{x_n,x_1,x_2\}$ forms a $3$-term arithmetic progression when arranged in increasing order. +-/ theorem putnam_2022_b4 (n : ℕ) (ap3 : ℝ → ℝ → ℝ → Prop) diff --git a/lean4/src/putnam_2022_b5.lean b/lean4/src/putnam_2022_b5.lean index b5b880ab..392f2b52 100644 --- a/lean4/src/putnam_2022_b5.lean +++ b/lean4/src/putnam_2022_b5.lean @@ -5,6 +5,15 @@ open Polynomial abbrev putnam_2022_b5_solution : Set ℝ := sorry -- Set.Icc 0 (1 / 4) +/-- +For $0 \leq p \leq 1/2$, let $X_1,X_2,\dots$ be independent random variables such that +$X_i=\begin{cases} +1 & \text{with probability $p$,} \\ +-1 & \text{with probability $p$,} \\ +0 & \text{with probability $1-2p$,} +\end{cases}$ +for all $i \geq 1$. Given a positive integer $n$ and integers $b,a_1,\dots,a_n$, let $P(b,a_1,\dots,a_n)$ denote the probability that $a_1X_1+\dots+a_nX_n=b$. For which values of $p$ is it the case that $P(0,a_1,\dots,a_n) \geq P(b,a_1,\dots,a_n)$ for all positive integers $n$ and all integers $b,a_1,\dots,a_n$? +-/ theorem putnam_2022_b5 (p : ℝ) (Xset : (n : ℕ) → Set (Fin n → ℤ)) diff --git a/lean4/src/putnam_2022_b6.lean b/lean4/src/putnam_2022_b6.lean index 1d9a5633..a7848d4a 100644 --- a/lean4/src/putnam_2022_b6.lean +++ b/lean4/src/putnam_2022_b6.lean @@ -6,6 +6,9 @@ open Polynomial -- Note: uses (ℝ → ℝ) instead of (Rpos → Rpos) to check the equality property abbrev putnam_2022_b6_solution : Set (Set.Ioi (0 : ℝ) → Set.Ioi (0 : ℝ)) := sorry -- {f : Set.Ioi (0 : ℝ) → Set.Ioi (0 : ℝ) | ∃ c : ℝ, c ≥ 0 ∧ ∀ x : Set.Ioi (0 : ℝ), f x = 1 / (1 + c * x)} +/-- +Find all continuous functions $f:\mathbb{R}^+ \to \mathbb{R}^+$ such that $f(xf(y))+f(yf(x))=1+f(x+y)$ for all $x,y>0$. +-/ theorem putnam_2022_b6 (f : Set.Ioi (0 : ℝ) → Set.Ioi (0 : ℝ)) (eq : Prop) diff --git a/lean4/src/putnam_2023_a1.lean b/lean4/src/putnam_2023_a1.lean index 98c81545..06777ee8 100644 --- a/lean4/src/putnam_2023_a1.lean +++ b/lean4/src/putnam_2023_a1.lean @@ -5,6 +5,9 @@ open Nat abbrev putnam_2023_a1_solution : ℕ := sorry -- 18 +/-- +For a positive integer $n$, let $f_n(x) = \cos(x) \cos(2x) \cos(3x) \cdots \cos(nx)$. Find the smallest $n$ such that $|f_n''(0)| > 2023$. +-/ theorem putnam_2023_a1 (f : ℕ → ℝ → ℝ) (hf : ∀ n > 0, f n = fun x : ℝ => ∏ i in Finset.Icc 1 n, Real.cos (i * x)) diff --git a/lean4/src/putnam_2023_a2.lean b/lean4/src/putnam_2023_a2.lean index ea3586aa..eb0272d6 100644 --- a/lean4/src/putnam_2023_a2.lean +++ b/lean4/src/putnam_2023_a2.lean @@ -5,6 +5,9 @@ open Nat abbrev putnam_2023_a2_solution : ℕ → Set ℝ := sorry -- fun n => {(1 : ℝ)/(factorial n), -(1 : ℝ)/(factorial n)} +/-- +Let $n$ be an even positive integer. Let $p$ be a monic, real polynomial of degree $2n$; that is to say, $p(x) = x^{2n} + a_{2n-1} x^{2n-1} + \cdots + a_1 x + a_0$ for some real coefficients $a_0, \dots, a_{2n-1}$. Suppose that $p(1/k) = k^2$ for all integers $k$ such that $1 \leq |k| \leq n$. Find all other real numbers $x$ for which $p(1/x) = x^2$. +-/ theorem putnam_2023_a2 (n : ℕ) (hn : n > 0 ∧ Even n) diff --git a/lean4/src/putnam_2023_a3.lean b/lean4/src/putnam_2023_a3.lean index 70a45b41..8b52da28 100644 --- a/lean4/src/putnam_2023_a3.lean +++ b/lean4/src/putnam_2023_a3.lean @@ -5,6 +5,15 @@ open Nat noncomputable abbrev putnam_2023_a3_solution : ℝ := sorry -- Real.pi / 2 +/-- +Determine the smallest positive real number $r$ such that there exist differentiable functions $f\colon \mathbb{R} \to \mathbb{R}$ and $g\colon \mathbb{R} \to \mathbb{R}$ satisfying +\begin{enumerate} + \item[(a)] $f(0) > 0$, + \item[(b)] $g(0) = 0$, + \item[(c)] $|f'(x)| \leq |g(x)|$ for all $x$, + \item[(d)] $|g'(x)| \leq |f(x)|$ for all $x$, and + \item[(e)] $f(r) = 0$. \end{enumerate} +-/ theorem putnam_2023_a3 : sInf {r > 0 | ∃ f g : ℝ → ℝ, Differentiable ℝ f ∧ Differentiable ℝ g ∧ f 0 > 0 ∧ g 0 = 0 ∧ (∀ x : ℝ, |deriv f x| ≤ |g x| ∧ |deriv g x| ≤ |f x|) ∧ f r = 0} = putnam_2023_a3_solution := diff --git a/lean4/src/putnam_2023_a5.lean b/lean4/src/putnam_2023_a5.lean index a708b9b6..d1fa298e 100644 --- a/lean4/src/putnam_2023_a5.lean +++ b/lean4/src/putnam_2023_a5.lean @@ -8,6 +8,9 @@ def num_ones : List ℕ → ℕ | (h :: t) => if h = 1 then num_ones t + 1 else num_ones t abbrev putnam_2023_a5_solution : Set ℂ := sorry -- {-(3^1010 - 1)/2, -(3^1010 - 1)/2 + Real.sqrt (9^1010 - 1) * Complex.I/4, -(3^1010 - 1)/2 - Real.sqrt (9^1010 - 1) * Complex.I/4} +/-- +For a nonnegative integer $k$, let $f(k)$ be the number of ones in the base 3 representation of $k$. Find all complex numbers $z$ such that \[ \sum_{k=0}^{3^{1010}-1} (-2)^{f(k)} (z+k)^{2023} = 0. \] +-/ theorem putnam_2023_a5 : {z : ℂ | ∑ k in Finset.Icc 0 (3^1010 - 1), (-2)^(num_ones (digits 3 k)) * (z + k)^2023 = 0} = putnam_2023_a5_solution := sorry diff --git a/lean4/src/putnam_2023_b1.lean b/lean4/src/putnam_2023_b1.lean index 129b3619..949d4e47 100644 --- a/lean4/src/putnam_2023_b1.lean +++ b/lean4/src/putnam_2023_b1.lean @@ -6,6 +6,9 @@ open Nat -- Note: uses (ℕ → ℕ → Bool) instead of (Fin m → Fin n → Bool) abbrev putnam_2023_b1_solution : ℕ → ℕ → ℕ := sorry -- (fun m n : ℕ => Nat.choose (m + n - 2) (m - 1)) +/-- +Consider an $m$-by-$n$ grid of unit squares, indexed by $(i,j)$ with $1 \leq i \leq m$ and $1 \leq j \leq n$. There are $(m-1)(n-1)$ coins, which are initially placed in the squares $(i,j)$ with $1 \leq i \leq m-1$ and $1 \leq j \leq n-1$. If a coin occupies the square $(i,j)$ with $i \leq m-1$ and $j \leq n-1$ and the squares $(i+1,j)$, $(i,j+1)$, and $(i+1,j+1)$ are unoccupied, then a legal move is to slide the coin from $(i,j)$ to $(i+1,j+1)$. How many distinct configurations of coins can be reached starting from the initial configuration by a (possibly empty) sequence of legal moves? +-/ theorem putnam_2023_b1 (m n : ℕ) (initcoins : ℕ → ℕ → Bool) diff --git a/lean4/src/putnam_2023_b2.lean b/lean4/src/putnam_2023_b2.lean index 8f623ddf..f3cbff51 100644 --- a/lean4/src/putnam_2023_b2.lean +++ b/lean4/src/putnam_2023_b2.lean @@ -5,6 +5,9 @@ open Nat abbrev putnam_2023_b2_solution : ℕ := sorry -- 3 +/-- +For each positive integer $n$, let $k(n)$ be the number of ones in the binary representation of $2023 * n$. What is the minimum value of $k(n)$? +-/ theorem putnam_2023_b2 : sInf {(digits 2 (2023*n)).sum | n > 0} = putnam_2023_b2_solution := sorry diff --git a/lean4/src/putnam_2023_b4.lean b/lean4/src/putnam_2023_b4.lean index a6bae969..15a5d3b4 100644 --- a/lean4/src/putnam_2023_b4.lean +++ b/lean4/src/putnam_2023_b4.lean @@ -6,6 +6,16 @@ open Nat Topology Filter -- Note: uses (ℕ → ℝ) instead of (Fin (n + 1) → ℝ) and (ℝ → ℝ) instead of (tall ts → ℝ) abbrev putnam_2023_b4_solution : ℝ := sorry -- 29 +/-- +For a nonnegative integer $n$ and a strictly increasing sequence of real numbers $t_0,t_1,\dots,t_n$, let $f(t)$ be the corresponding real-valued function defined for $t \geq t_0$ by the following properties: +\begin{enumerate} +\item[(a)] $f(t)$ is continuous for $t \geq t_0$, and is twice differentiable for all $t>t_0$ other than $t_1,\dots,t_n$; +\item[(b)] $f(t_0)=1/2$; +\item[(c)] $\lim_{t \to t_k^+} f'(t)=0$ for $0 \leq k \leq n$; +\item[(d)] For $0 \leq k \leq n-1$, we have $f''(t)=k+1$ when $t_kt_n$. +\end{enumerate} +Considering all choices of $n$ and $t_0,t_1,\dots,t_n$ such that $t_k \geq t_{k-1}+1$ for $1 \leq k \leq n$, what is the least possible value of $T$ for which $f(t_0+T)=2023$? +-/ theorem putnam_2023_b4 (tne : ℕ → (ℕ → ℝ) → Set ℝ) (fdiff flim fderiv1 fderiv2 fall : ℕ → (ℕ → ℝ) → (ℝ → ℝ) → Prop) diff --git a/lean4/src/putnam_2023_b5.lean b/lean4/src/putnam_2023_b5.lean index 6879ad65..b485ea42 100644 --- a/lean4/src/putnam_2023_b5.lean +++ b/lean4/src/putnam_2023_b5.lean @@ -5,6 +5,9 @@ open Nat Topology Filter abbrev putnam_2023_b5_solution : Set ℕ := sorry -- {n : ℕ | n = 1 ∨ n ≡ 2 [MOD 4]} +/-- +Determine which positive integers $n$ have the following property: For all integers $m$ that are relatively prime to $n$, there exists a permutation $\pi:\{1,2,\dots,n\} \to \{1,2,\dots,n\}$ such that $\pi(\pi(k)) \equiv mk \pmod{n}$ for all $k \in \{1,2,\dots,n\}$. +-/ theorem putnam_2023_b5 (n : ℕ) (perm : Prop) diff --git a/lean4/src/putnam_2023_b6.lean b/lean4/src/putnam_2023_b6.lean index 8a259f52..951078ac 100644 --- a/lean4/src/putnam_2023_b6.lean +++ b/lean4/src/putnam_2023_b6.lean @@ -5,6 +5,15 @@ open Nat Topology Filter abbrev putnam_2023_b6_solution : ℕ → ℤ := sorry -- (fun n : ℕ => (-1) ^ (⌈(n / 2 : ℚ)⌉₊ + 1) * 2 * ⌈(n / 2 : ℚ)⌉₊) +/-- +Let $n$ be a positive integer. For $i$ and $j$ in $\{1,2,\dots,n\}$, let $s(i,j)$ be the number of pairs $(a,b)$ of nonnegative integers satisfying $ai+bj=n$. Let $S$ be the $n$-by-$n$ matrix whose $(i,j)$ entry is $s(i,j)$. For example, when $n=5$, we have $S = \begin{bmatrix} +6 & 3 & 2 & 2 & 2 \\ +3 & 0 & 1 & 0 & 1 \\ +2 & 1 & 0 & 0 & 1 \\ +2 & 0 & 0 & 0 & 1 \\ +2 & 1 & 1 & 1 & 2 +\end{bmatrix}$. Compute the determinant of $S$. +-/ theorem putnam_2023_b6 (n : ℕ) (S : Matrix (Fin n) (Fin n) ℤ)