declaration stringlengths 27 11.3k | file stringlengths 52 114 | context dict | tactic_states listlengths 1 1.24k |
|---|---|---|---|
theorem Nat.Prime.sq_add_sq' {p : β} [h : Fact p.Prime] (hp : p % 4 = 1) :
β a b : β, a ^ 2 + b ^ 2 = p := by
rw [β div_add_mod p 4] at h β’
rw [hp] at h β’
let k := p / 4
apply sq_add_sq_of_nonempty_fixedPoints
have key := (Equiv.Perm.card_fixedPoints_modEq (p := 2) (n := 1) (obvInvo_sq k)).symm.trans
... | /root/DuelModelResearch/mathlib4/Archive/ZagierTwoSquares.lean | {
"open": [
"Set",
"Function",
"Zagier"
],
"variables": [
"(k : β) [hk : Fact (4 * k + 1).Prime]",
"(k : β)",
"[hk : Fact (4 * k + 1).Prime]"
]
} | [
{
"line": "rw [β div_add_mod p 4] at h β’",
"before_state": "p : β\nh : Fact (Prime p)\nhp : p % 4 = 1\nβ’ β a b, a ^ 2 + b ^ 2 = p",
"after_state": "p : β\nh : Fact (Prime (4 * (p / 4) + p % 4))\nhp : p % 4 = 1\nβ’ β a b, a ^ 2 + b ^ 2 = 4 * (p / 4) + p % 4"
},
{
"line": "rewrite [β div_add_mod p ... |
example : Β¬ LucasLehmerTest 2 := by norm_num
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ Β¬LucasLehmerTest 2",
"after_state": "No Goals!"
}
] |
example : (mersenne 2).Prime := by decide
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "decide",
"before_state": "β’ Nat.Prime (mersenne 2)",
"after_state": "No Goals!"
}
] |
example : (mersenne 3).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 3",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 3",
"after_state": "No Goals!"
}
] |
example : (mersenne 5).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 5",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 5",
"after_state": "No Goals!"
}
] |
example : (mersenne 7).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 7",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 7",
"after_state": "No Goals!"
}
] |
example : (mersenne 13).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 13",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 13",
"after_state": "No Goals!"
}
] |
example : (mersenne 17).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 17",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 17",
"after_state": "No Goals!"
}
] |
example : (mersenne 19).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 19",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 19",
"after_state": "No Goals!"
}
] |
example : (mersenne 31).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 31",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 31",
"after_state": "No Goals!"
}
] |
example : (mersenne 61).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 61",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 61",
"after_state": "No Goals!"
}
] |
example : (mersenne 89).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 89",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 89",
"after_state": "No Goals!"
}
] |
example : (mersenne 107).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 107",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 107",
"after_state": "No Goals!"
}
] |
example : (mersenne 127).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 127",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 127",
"after_state": "No Goals!"
}
] |
example : (mersenne 521).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 521",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 521",
"after_state": "No Goals!"
}
] |
example : (mersenne 607).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 607",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 607",
"after_state": "No Goals!"
}
] |
example : (mersenne 1279).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 1279",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 1279",
"after_state": "No Goals!"
}
] |
example : (mersenne 2203).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 2203",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 2203",
"after_state": "No Goals!"
}
] |
example : (mersenne 2281).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 2281",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 2281",
"after_state": "No Goals!"
}
] |
example : (mersenne 3217).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 3217",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 3217",
"after_state": "No Goals!"
}
] |
example : (mersenne 4253).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 4253",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 4253",
"after_state": "No Goals!"
}
] |
example : (mersenne 4423).Prime :=
lucas_lehmer_sufficiency _ (by norm_num) (by norm_num)
| /root/DuelModelResearch/mathlib4/Archive/Examples/MersennePrimes.lean | {
"open": [],
"variables": []
} | [
{
"line": "norm_num",
"before_state": "β’ 1 < 4423",
"after_state": "No Goals!"
},
{
"line": "norm_num",
"before_state": "β’ LucasLehmerTest 4423",
"after_state": "No Goals!"
}
] |
theorem calculation (n k : β) (h1 : k β£ 21 * n + 4) (h2 : k β£ 14 * n + 3) : k β£ 1 :=
have h3 : k β£ 2 * (21 * n + 4) := h1.mul_left 2
have h4 : k β£ 3 * (14 * n + 3) := h2.mul_left 3
have h5 : 3 * (14 * n + 3) = 2 * (21 * n + 4) + 1 := by ring
(Nat.dvd_add_right h3).mp (h5 βΈ h4)
| /root/DuelModelResearch/mathlib4/Archive/Imo/Imo1959Q1.lean | {
"open": [
"Nat"
],
"variables": []
} | [
{
"line": "ring",
"before_state": "n k : β\nh1 : k β£ 21 * n + 4\nh2 : k β£ 14 * n + 3\nh3 : k β£ 2 * (21 * n + 4)\nh4 : k β£ 3 * (14 * n + 3)\nβ’ 3 * (14 * n + 3) = 2 * (21 * n + 4) + 1",
"after_state": "No Goals!"
},
{
"line": "first\n| ring1\n|\n try_this ring_nf\"\\n\\nThe `ring` tactic failed t... |
theorem Imo1961Q3 {n : β} {x : β} (hβ : n β 0) :
(cos x) ^ n - (sin x) ^ n = 1 β
(β k : β€, k * Ο = x) β§ Even n β¨ (β k : β€, k * (2 * Ο) = x) β§ Odd n β¨
(β k : β€, -(Ο / 2) + k * (2 * Ο) = x) β§ Odd n := by
constructor
Β· intro h
rcases eq_or_ne (sin x) 0 with hsinx | hsinx
Β· rw [hsinx, zero_pow... | /root/DuelModelResearch/mathlib4/Archive/Imo/Imo1961Q3.lean | {
"open": [
"Real"
],
"variables": []
} | [
{
"line": "constructor",
"before_state": "n : β\nx : β\nhβ : n β 0\nβ’ cos x ^ n - sin x ^ n = 1 β\n (β k, βk * Ο = x) β§ Even n β¨ (β k, βk * (2 * Ο) = x) β§ Odd n β¨ (β k, -(Ο / 2) + βk * (2 * Ο) = x) β§ Odd n",
"after_state": "case mp\nn : β\nx : β\nhβ : n β 0\nβ’ cos x ^ n - sin x ^ n = 1 β\n (β k, β... |
theorem solve_cos2_half {x : β} : cos x ^ 2 = 1 / 2 β β k : β€, x = (2 * βk + 1) * Ο / 4 := by
rw [cos_sq]
simp only [add_eq_left]
simp only [div_eq_zero_iff]
norm_num
rw [cos_eq_zero_iff]
constructor <;>
Β· rintro β¨k, hβ©
use k
linarith
| /root/DuelModelResearch/mathlib4/Archive/Imo/Imo1962Q4.lean | {
"open": [
"Real",
"scoped Real"
],
"variables": []
} | [
{
"line": "rw [cos_sq]",
"before_state": "x : β\nβ’ cos x ^ 2 = 1 / 2 β β k, x = (2 * βk + 1) * Ο / 4",
"after_state": "x : β\nβ’ 1 / 2 + cos (2 * x) / 2 = 1 / 2 β β k, x = (2 * βk + 1) * Ο / 4"
},
{
"line": "rewrite [cos_sq]",
"before_state": "x : β\nβ’ cos x ^ 2 = 1 / 2 β β k, x = (2 * βk + 1... |
theorem solve_cos3x_0 {x : β} : cos (3 * x) = 0 β β k : β€, x = (2 * βk + 1) * Ο / 6 := by
rw [cos_eq_zero_iff]
refine exists_congr fun k => ?_
constructor <;> intro <;> linarith
| /root/DuelModelResearch/mathlib4/Archive/Imo/Imo1962Q4.lean | {
"open": [
"Real",
"scoped Real"
],
"variables": []
} | [
{
"line": "rw [cos_eq_zero_iff]",
"before_state": "x : β\nβ’ cos (3 * x) = 0 β β k, x = (2 * βk + 1) * Ο / 6",
"after_state": "x : β\nβ’ (β k, 3 * x = (2 * βk + 1) * Ο / 2) β β k, x = (2 * βk + 1) * Ο / 6"
},
{
"line": "rewrite [cos_eq_zero_iff]",
"before_state": "x : β\nβ’ cos (3 * x) = 0 β β ... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 15