Compfiles/Usa2021P3.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned compfiles documentation, Pinned compfiles corpus index
27 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2021, Problem 3
Let n ≥ 2 be an integer. An n × n board is initially empty. Each minute, you may perform one of three moves:
• If there is an L-shaped tromino region of three cells without stones on the board (see figure; rotations not allowed), you may place a stone in each of those cells. • If all cells in a column have a stone, you may remove all stones from that column. • If all cells in a row have a stone, you may remove all stones from that row.
For which n is it possible that, after some non-zero number of moves, the board has no stones?
Imports (4)
Imported by 1 file
- determine
Usa2021P3.answerline 37 sourceno axioms what this means
Statement uses:
NatProof uses:
Dvd.dvd,OfNat.ofNat2 instances, coercions and auxiliary constants left out.
- abbrev
Usa2021P3.BoardA board state: the set of cells that currently hold a stone line 59 sourceSource documentation
A board state: the set of cells that currently hold a stone.
standard axioms: Quot.sound, propext what this means
Proof uses:
Finset,Prod,Natabbrev Board := Finset (ℕ × ℕ)
- def
Usa2021P3.trominoCellsThe three cells of the L-tromino with anchor(i, j), as in the figure of the problem statement:(i, j),(i + 1, j)and(i + 1, j + 1)line 63 sourceSource documentation
The three cells of the L-tromino with anchor
(i, j), as in the figure of the problem statement:(i, j),(i + 1, j)and(i + 1, j + 1).standard axioms: Quot.sound, propext what this means
Statement uses:
Nat,Finset,ProdProof uses:
Insert.insert,Prod.mk,HAdd.hAdd,OfNat.ofNat,Singleton.singleton7 instances, coercions and auxiliary constants left out.
def trominoCells (i j : ℕ) : Finset (ℕ × ℕ) := {(i, j), (i + 1, j), (i + 1, j + 1)} - inductive
Usa2021P3.StepOne legal move of the game: either place a stone on each cell of an empty L-tromino, or clear a full row, or clear a full column line 67 sourceSource documentation
One legal move of the game: either place a stone on each cell of an empty L-tromino, or clear a full row, or clear a full column.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2021P3.Boardinductive Step (n : ℕ) : Board → Board → Prop | tromino {b : Board} {i j : ℕ} (hi : i + 1 < n) (hj : j + 1 < n) (h₁ : (i, j) ∉ b) (h₂ : (i + 1, j) ∉ b) (h₃ : (i + 1, j + 1) ∉ b) : Step n b (b ∪ trominoCells i j) | clearRow {b : Board} (r : ℕ) (hfull : Finset.range n ×ˢ {r} ⊆ b) : Step n b (b \ Finset.range n ×ˢ {r}) | clearCol {b : Board} (c : ℕ) (hfull : {c} ×ˢ Finset.range n ⊆ b) : Step n b (b \ {c} ×ˢ Finset.range n) /-- A sequence of legal moves. -/Mentions: Usa2021P3.Board, Usa2021P3.trominoCells
- inductive
Usa2021P3.ReachA sequence of legal moves line 77 sourceSource documentation
A sequence of legal moves.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2021P3.Boardinductive Reach (n : ℕ) : Board → Board → Prop | refl (b : Board) : Reach n b b | tail {b b' b'' : Board} : Reach n b b' → Step n b' b'' → Reach n b b'' /-- The goal of the game: the board can be emptied after a non-zero number of moves. -/Mentions: Usa2021P3.Board, Usa2021P3.Step
- def
Usa2021P3.SolvableThe goal of the game: the board can be emptied after a non-zero number of moves line 83 sourceSource documentation
The goal of the game: the board can be emptied after a non-zero number of moves.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Exists, Usa2021P3.Board,And, Usa2021P3.Step,EmptyCollection.emptyCollection,Prod, Usa2021P3.Reach1 instances, coercions and auxiliary constants left out.
def Solvable (n : ℕ) : Prop := ∃ b, Step n ∅ b ∧ Reach n b ∅
Mentions: Usa2021P3.Step, Usa2021P3.Reach
- lemma
Usa2021P3.Reach.transline 85 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2021P3.Board, Usa2021P3.ReachProof uses:
Usa2021P3.Reach.rec, Usa2021P3.Step,Usa2021P3.Reach.tailTactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2021P3.Reach.singleline 91 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2021P3.Board, Usa2021P3.Step, Usa2021P3.ReachProof uses:
Usa2021P3.Reach.tail,Usa2021P3.Reach.refl - def
Usa2021P3.gainsgains a n r ccounts how many times cell(r, c)receives a stone, given that a tromino was placed with anchor(i, j)exactlya i jtimes line 110 sourceSource documentation
gains a n r ccounts how many times cell(r, c)receives a stone, given that a tromino was placed with anchor(i, j)exactlya i jtimes. The cell(r, c)is covered by the trominoes anchored at(r, c),(r - 1, c)and(r - 1, c - 1).no axioms what this means
Statement uses:
NatProof uses:
HAdd.hAdd,ite,And,LT.lt,OfNat.ofNat,LE.le,HSub.hSub10 instances, coercions and auxiliary constants left out.
def gains (a : ℕ → ℕ → ℕ) (n r c : ℕ) : ℕ := …
- def
Usa2021P3.SupportTrominoes may only be placed at anchors(i, j)withi + 1 < nandj + 1 < n; counts at other anchors vanish line 117 sourceSource documentation
Trominoes may only be placed at anchors
(i, j)withi + 1 < nandj + 1 < n; counts at other anchors vanish.no axioms what this means
Statement uses:
NatProof uses:
Or,LE.le,HAdd.hAdd,OfNat.ofNat,Eq4 instances, coercions and auxiliary constants left out.
def Support (a : ℕ → ℕ → ℕ) (n : ℕ) : Prop := …
- lemma
Usa2021P3.gains_zeroline 121 sourcestandard axioms: propext what this means
Statement uses:
Nat,Eq, Usa2021P3.gains,OfNat.ofNatProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,HAdd.hAdd,ite,And,LT.lt,LE.le,HSub.hSub,congr,ite_congr,Eq.refl,Not,ite_self,add_zero,eq_self13 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2021P3.gains_addline 124 sourcestandard axioms: propext what this means
Statement uses:
Nat,Eq, Usa2021P3.gains,HAdd.hAddProof uses:
id,dite,ite,And,LT.lt,OfNat.ofNat,LE.le,HSub.hSub,Eq.mpr,congr,congrArg,congrFun',ite_eq_left,Mathlib.Tactic.Ring.of_eq,HMul.hMul,HPow.hPow,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfland 10 more29 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2021P3.Support.addline 129 sourcestandard axioms: propext what this means
Statement uses:
Nat, Usa2021P3.Support,HAdd.hAddProof uses:
Or,LE.le,OfNat.ofNat,of_eq_true,Eq,Eq.trans,True,congrFun',congrArg,congr,add_zero,eq_self8 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2021P3.gains_singleThe gains coming from a single tromino placed at the legal anchor(i, j)are exactly the indicator function of its three cells line 136 sourceSource documentation
The gains coming from a single tromino placed at the legal anchor
(i, j)are exactly the indicator function of its three cells.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,OfNat.ofNat,Eq, Usa2021P3.gains,ite,And,Membership.mem,Prod,Finset, Usa2021P3.trominoCells,Prod.mkProof uses:
dite,of_eq_true,Eq.trans,True,congr,congrArg,ite_eq_left_of_eq_true,eq_true,and_self,eq_self,Not,ite_congr,Eq.refl,ite_eq_right_of_eq_false,eq_false,ite_self,LE.le,HSub.hSub,Function.swap,congrFun'and 17 more83 instances, coercions and auxiliary constants left out.
Tactic trace: 43 steps
Open to load the checked before-and-after goal states.
lemma gains_single {n i j : ℕ} (hi : i + 1 < n) (hj : j + 1 < n) (r c : ℕ) : gains (fun x y ↦ if x = i ∧ y = j then 1 else 0) n r c = if (r, c) ∈ trominoCells i j then 1 else 0 := by …Mentions: Usa2021P3.gains, Usa2021P3.trominoCells
- lemma
Usa2021P3.extract_stepA single move, seen through the counting functions: the gains and losses of every cell can be expressed with suitable counts line 171 sourceSource documentation
A single move, seen through the counting functions: the gains and losses of every cell can be expressed with suitable counts.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2021P3.Board, Usa2021P3.Step,Exists,And, Usa2021P3.Support,LT.lt,Eq,HAdd.hAdd, Usa2021P3.gains,ite,Membership.mem,Prod,Prod.mk,OfNat.ofNatProof uses:
HEq,Not,Union.union, Usa2021P3.trominoCells,Usa2021P3.Step.tromino,Exists.intro,And.intro,Or,LE.le,id,dite,Eq.mpr,False,Eq.trans,congrFun',congrArg,ite_eq_left,eq_false',False.elim,noConfusion_of_Natand 46 more42 instances, coercions and auxiliary constants left out.
Tactic trace: 86 steps
Open to load the checked before-and-after goal states.
lemma extract_step {n : ℕ} {b b' : Board} (h : Step n b b') : ∃ (a : ℕ → ℕ → ℕ) (ρ γ : ℕ → ℕ), Support a n ∧ ∀ r c, r < n → c < n → gains a n r c + (if (r, c) ∈ b then 1 else 0) = ρ r + γ c + (if (r, c) ∈ b' then 1 else 0) := by …Mentions: Usa2021P3.Board, h, Usa2021P3.Step, Usa2021P3.Support, Usa2021P3.gains
- lemma
Usa2021P3.extractA whole sequence of moves, seen through the counting functions line 246 sourceSource documentation
A whole sequence of moves, seen through the counting functions.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2021P3.Board, Usa2021P3.Reach,Exists,And, Usa2021P3.Support,LT.lt,Eq,HAdd.hAdd, Usa2021P3.gains,ite,Membership.mem,Prod,Prod.mk,OfNat.ofNatProof uses:
Usa2021P3.Reach.rec,Exists.intro,And.intro,of_eq_true,Or,LE.le,Eq.trans,True,forall_congr,implies_congr,Eq.refl,eq_self,implies_true,congr,congrArg,congrFun', Usa2021P3.gains_zero,zero_add,add_zero, Usa2021P3.Step and 5 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma extract {n : ℕ} {b b' : Board} (h : Reach n b b') : ∃ (a : ℕ → ℕ → ℕ) (ρ γ : ℕ → ℕ), Support a n ∧ ∀ r c, r < n → c < n → gains a n r c + (if (r, c) ∈ b then 1 else 0) = ρ r + γ c + (if (r, c) ∈ b' then 1 else 0) := by …Mentions: Usa2021P3.Board, h, Usa2021P3.Reach, Usa2021P3.Support, Usa2021P3.gains
- lemma
Usa2021P3.extract_solvableIn particular, a successful game yields the cell equations together with at least one tromino that was actually placed line 267 sourceSource documentation
In particular, a successful game yields the cell equations together with at least one tromino that was actually placed.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat, Usa2021P3.Solvable,Exists,And, Usa2021P3.Support,LT.lt,Eq, Usa2021P3.gains,HAdd.hAddProof uses: Usa2021P3.Board, Usa2021P3.Step,
EmptyCollection.emptyCollection,Prod, Usa2021P3.Reach,ite,Membership.mem,Prod.mk, Usa2021P3.extract,HEq,Not,Union.union, Usa2021P3.trominoCells,Usa2021P3.Step.tromino,Exists.intro,And.intro, Usa2021P3.Support.add,Or,id,diteand 43 more63 instances, coercions and auxiliary constants left out.
Tactic trace: 36 steps
Open to load the checked before-and-after goal states.
lemma extract_solvable {n : ℕ} (hn : 1 ≤ n) (h : Solvable n) : ∃ (a : ℕ → ℕ → ℕ) (ρ γ : ℕ → ℕ), Support a n ∧ (∀ r c, r < n → c < n → gains a n r c = ρ r + γ c) ∧ ∃ i j : ℕ, 1 ≤ a i j := by …Mentions: h, Usa2021P3.Solvable, Usa2021P3.Support, Usa2021P3.gains
- lemma
Usa2021P3.sum_range_shiftShifting a sum by one, provided the boundary terms vanish line 315 sourceSource documentation
Shifting a sum by one, provided the boundary terms vanish.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Complex,Eq,OfNat.ofNat,Finset.sum,Finset.range,HAdd.hAddProof uses:
Finset.sum_range_succ',Finset.sum_range_succ,Eq.mpr,id,congrArg,Eq.symm,Eq.mp,add_zero,Eq.refl20 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma sum_range_shift (f : ℕ → ℂ) (n : ℕ) (hf0 : f 0 = 0) (hfn : f n = 0) : ∑ i ∈ Finset.range n, f (i + 1) = ∑ r ∈ Finset.range n, f r := by …Mentions: f
- lemma
Usa2021P3.key_identityThe key identity: evaluated atn-th roots of unityζ, η ≠ 1, the cell equations imply that(1 + ζ + ζ * η)times the tromino generating function vanishes line 326 sourceSource documentation
The key identity: evaluated at
n-th roots of unityζ, η ≠ 1, the cell equations imply that(1 + ζ + ζ * η)times the tromino generating function vanishes.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat, Usa2021P3.Support,LT.lt,Eq, Usa2021P3.gains,HAdd.hAdd,Complex,HPow.hPow,Ne,HMul.hMul,Finset.sum,Finset.rangeProof uses:
Eq.mpr,HDiv.hDiv,HSub.hSub,id,congrArg,geom_sum_eq,sub_self,zero_div,Eq.refl,Finset.mul_sum,Finset.sum_congr,rfl,Finset,Membership.mem,pow_succ,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.atom_pf,Eq.symmand 64 more146 instances, coercions and auxiliary constants left out.
Tactic trace: 184 steps
Open to load the checked before-and-after goal states.
lemma key_identity {n : ℕ} (hn : 2 ≤ n) {a : ℕ → ℕ → ℕ} {ρ γ : ℕ → ℕ} (hsupp : Support a n) (hcell : ∀ r c, r < n → c < n → gains a n r c = ρ r + γ c) {ζ η : ℂ} (hζ : ζ ^ n = 1) (hζ1 : ζ ≠ 1) (hη : η ^ n = 1) (hη1 : η ≠ 1) : (1 + ζ + ζ * η) * ∑ i ∈ Finset.range n, ∑ j ∈ Finset.range n, (a i j : ℂ) * ζ ^ i * η ^ j = 0 := by …Mentions: Usa2021P3.Support, Usa2021P3.gains
- lemma
Usa2021P3.one_add_ne_zeroIf3 ∤ nandζ, ηaren-th roots of unity withζ ≠ 1, then1 + ζ + ζ * η ≠ 0line 547 sourceSource documentation
If
3 ∤ nandζ, ηaren-th roots of unity withζ ≠ 1, then1 + ζ + ζ * η ≠ 0.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Not,Dvd.dvd,Complex,Eq,HPow.hPow,Ne,HAdd.hAdd,HMul.hMulProof uses:
False.elim,False,Eq.mp,Eq.trans,congrFun',congrArg,zero_pow,of_eq_true,True,eq_false,not_false_eq_true,Real,MonoidWithZeroHom,Complex.normSq,Eq.mpr,id,Eq.symm,map_pow,Complex.normSq_one,Iff.mpand 132 more161 instances, coercions and auxiliary constants left out.
Tactic trace: 65 steps
Open to load the checked before-and-after goal states.
lemma one_add_ne_zero {n : ℕ} (hn : 2 ≤ n) (h3 : ¬ 3 ∣ n) {ζ η : ℂ} (hζ : ζ ^ n = 1) (hζ1 : ζ ≠ 1) (hη : η ^ n = 1) : 1 + ζ + ζ * η ≠ 0 := by … - lemma
Usa2021P3.count_eq_zeroA polynomial of degree< mwith coefficients coming from the tromino counts vanishes on thempoints of the grid, hence is zero line 613 sourceSource documentation
A polynomial of degree
< mwith coefficients coming from the tromino counts vanishes on thempoints of the grid, hence is zero. Applied twice, this shows that all tromino counts vanish.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat, Usa2021P3.Support,Complex,Eq,HPow.hPow,Ne,Finset.sum,Finset.range,HMul.hMulProof uses:
HAdd.hAdd,Exists,Exists.intro,HSub.hSub,Complex.exp,HDiv.hDiv,Real.pi,Complex.I,rfl,IsPrimitiveRoot,Eq.mpr,id,congrArg,Complex.isPrimitiveRoot_exp,Nat.succ_ne_zero,IsPrimitiveRoot.pow_eq_one,Finset,Finset.image,Set.InjOn,Membership.memand 85 more119 instances, coercions and auxiliary constants left out.
Tactic trace: 117 steps
Open to load the checked before-and-after goal states.
lemma count_eq_zero {n : ℕ} (hn : 2 ≤ n) {a : ℕ → ℕ → ℕ} (hsupp : Support a n) (hP : ∀ ζ η : ℂ, ζ ^ n = 1 → ζ ≠ 1 → η ^ n = 1 → η ≠ 1 → ∑ i ∈ Finset.range n, ∑ j ∈ Finset.range n, (a i j : ℂ) * ζ ^ i * η ^ j = 0) : ∀ i j, a i j = 0 := by …Mentions: Usa2021P3.Support
- lemma
Usa2021P3.not_solvable_of_not_three_dvdThe obstruction: the board cannot be emptied when3 ∤ nline 725 sourceSource documentation
The obstruction: the board cannot be emptied when
3 ∤ n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Not,Dvd.dvd, Usa2021P3.Solvable,FalseProof uses:
Exists,And, Usa2021P3.Support,LT.lt,Eq, Usa2021P3.gains,HAdd.hAdd, Usa2021P3.extract_solvable,Complex,HPow.hPow,Ne,Finset.sum,Finset.range,HMul.hMul, Usa2021P3.key_identity,Or,Iff.mp,mul_eq_zero,absurd, Usa2021P3.one_add_ne_zero and 1 more39 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma not_solvable_of_not_three_dvd {n : ℕ} (hn : 2 ≤ n) (h3 : ¬ 3 ∣ n) (h : Solvable n) : False := by …Mentions: h, Usa2021P3.Solvable
- lemma
Usa2021P3.reach_placeDocumented declaration: reach_place line 761 sourceSource documentation
Placing trominoes at a finset of anchors, one at a time: if every anchor is legal, the trominoes are pairwise disjoint, and all their cells are currently empty, then all of them can be placed in succession.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,DecidableEq,Finset,Prod, Usa2021P3.Board,Membership.mem,And,LT.lt,HAdd.hAdd,Prod.fst,OfNat.ofNat,Prod.snd,Ne,Disjoint, Usa2021P3.trominoCells,Not, Usa2021P3.Reach,Union.union,Finset.biUnionProof uses:
Finset.induction,EmptyCollection.emptyCollection,Eq.mpr,id,Eq,congrArg,Finset.biUnion_empty,Finset.union_empty,Usa2021P3.Reach.refl,Insert.insert,Finset.biUnion_insert, Usa2021P3.Step,Finset.mem_insert_self,Usa2021P3.Step.tromino,Prod.mk,of_eq_true,Eq.trans,Or,Singleton.singleton,Trueand 20 more36 instances, coercions and auxiliary constants left out.
Tactic trace: 24 steps
Open to load the checked before-and-after goal states.
lemma reach_place {n : ℕ} {ι : Type*} [DecidableEq ι] (s : Finset ι) (f : ι → ℕ × ℕ) : ∀ b : Board, (∀ i ∈ s, (f i).1 + 1 < n ∧ (f i).2 + 1 < n) → (∀ i ∈ s, ∀ j ∈ s, i ≠ j → Disjoint (trominoCells (f i).1 (f i).2) (trominoCells (f j).1 (f j).2)) → (∀ i ∈ s, ∀ c ∈ trominoCells (f i).1 (f i).2, c ∉ b) → Reach n b (b ∪ s.biUnion (fun i ↦ trominoCells (f i).1 (f i).2)) := by …Mentions: f, Usa2021P3.Board, Usa2021P3.trominoCells, Usa2021P3.Reach
- lemma
Usa2021P3.reach_clearRowsClearing full rows, one at a time line 796 sourceSource documentation
Clearing full rows, one at a time.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset, Usa2021P3.Board,Membership.mem,LE.le,Prod,SProd.sprod,Finset.range,Singleton.singleton, Usa2021P3.Reach,SDiff.sdiffProof uses:
Finset.induction,EmptyCollection.emptyCollection,Eq.mpr,id,Eq,congrArg,Finset.product_empty,Finset.sdiff_empty,Usa2021P3.Reach.refl,Not,Insert.insert, Usa2021P3.Step,Usa2021P3.Step.clearRow,Finset.mem_insert_self, Usa2021P3.Reach.trans, Usa2021P3.Reach.single,Union.union,Finset.ext,Iff,Prod.mkand 24 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 24 steps
Open to load the checked before-and-after goal states.
lemma reach_clearRows {n : ℕ} (s : Finset ℕ) : ∀ b : Board, (∀ r ∈ s, Finset.range n ×ˢ {r} ⊆ b) → Reach n b (b \ (Finset.range n ×ˢ s)) := by …Mentions: Usa2021P3.Board, Usa2021P3.Reach
- lemma
Usa2021P3.reach_clearColsClearing full columns, one at a time line 830 sourceSource documentation
Clearing full columns, one at a time.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset, Usa2021P3.Board,Membership.mem,LE.le,Prod,SProd.sprod,Singleton.singleton,Finset.range, Usa2021P3.Reach,SDiff.sdiffProof uses:
Finset.induction,EmptyCollection.emptyCollection,Eq.mpr,id,Eq,congrArg,Finset.empty_product,Finset.sdiff_empty,Usa2021P3.Reach.refl,Not,Insert.insert, Usa2021P3.Step,Usa2021P3.Step.clearCol,Finset.mem_insert_self, Usa2021P3.Reach.trans, Usa2021P3.Reach.single,Union.union,Finset.ext,Iff,Prod.mkand 24 more32 instances, coercions and auxiliary constants left out.
Tactic trace: 24 steps
Open to load the checked before-and-after goal states.
lemma reach_clearCols {n : ℕ} (s : Finset ℕ) : ∀ b : Board, (∀ c ∈ s, {c} ×ˢ Finset.range n ⊆ b) → Reach n b (b \ (s ×ˢ Finset.range n)) := by …Mentions: Usa2021P3.Board, Usa2021P3.Reach
- lemma
Usa2021P3.solvable_of_three_dvdThe construction: the board can be emptied whenever3 ∣ nline 864 sourceSource documentation
The construction: the board can be emptied whenever
3 ∣ n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Dvd.dvd, Usa2021P3.SolvableProof uses:
Eq,HMul.hMul,Finset,Prod,SProd.sprod,Finset.range,rfl,Iff,Membership.mem,And,LT.lt,Prod.fst,Prod.snd,Eq.mpr,id,congrArg,propext,Finset.mem_product,Finset.mem_range,Iff.rfland 74 more118 instances, coercions and auxiliary constants left out.
Tactic trace: 438 steps (first 200 of 438)
Open to load the checked before-and-after goal states.
lemma solvable_of_three_dvd {n : ℕ} (hn : 2 ≤ n) (h3 : 3 ∣ n) : Solvable n := by …Mentions: Usa2021P3.Solvable
- problem
Usa2021P3.usa2021_p3USAMO 2021 Problem 3: the board can be emptied after a non-zero number of moves if and only if3 ∣ nline 1215 sourceSource documentation
USAMO 2021 Problem 3: the board can be emptied after a non-zero number of moves if and only if
3 ∣ n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Iff, Usa2021P3.Solvable, Usa2021P3.answerProof uses:
Iff.intro,Decidable.byContradiction,Not, Usa2021P3.not_solvable_of_not_three_dvd, Usa2021P3.solvable_of_three_dvd5 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
problem usa2021_p3 (n : ℕ) (hn : 2 ≤ n) : Solvable n ↔ answer n := by …
Mentions: Usa2021P3.Solvable, Usa2021P3.answer