Compfiles/Imo2025P5.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
34 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 2025, Problem 5
Alice and Bazza are playing the inekoalaty game, a two-player game whose rules depend on a positive number λ known to both players. On the nth turn of the game (starting with n = 1) the following happens:
If n is odd, Alice chooses a nonnegative real number xₙ such that
x₁ + x₂ + ... + xₙ ≤ λn
If n is even, Bazza chooses a nonnegative real number xₙ such that
x₁² + x₂² + .. + xₙ² ≤ n.
If a player cannot choose a suitable n, the game ends and the other player wins. If the game goes forever, neither player wins. All chosen numbers are known to both players.
Determine all values of λ for which Alice has a winning strategy and all those for which Bazza has a winning strategy.
Imports (2)
Imported by 1 file
- def
Imo2025P5.ValidSeqWhether all the numbers chosen are valid line 45 sourceSource documentation
Whether all the numbers chosen are valid.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,FinProof uses:
And,LE.le,OfNat.ofNat,Even,Finset.sum,Finset.Iic,HMul.hMul,HAdd.hAdd,Odd,HPow.hPow23 instances, coercions and auxiliary constants left out.
def ValidSeq (c : ℝ) {n : ℕ} (x : Fin n → ℝ) : Prop := (∀ i : Fin n, 0 ≤ x i) ∧ … - def
Imo2025P5.WinsWhether a sequence of numbers chosen is a win for the given player (expressed as the 0-based numbers of that player's moves, mod 2): the other player makes the first invalid move line 51 sourceSource documentation
Whether a sequence of numbers chosen is a win for the given player (expressed as the 0-based numbers of that player's moves, mod 2): the other player makes the first invalid move.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,FinProof uses:
Exists,And,Ne,HMod.hMod,OfNat.ofNat,IsLeast,Set.ofPred,Not, Imo2025P5.ValidSeq,HAdd.hAdd,Fin.take8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
def Wins (c : ℝ) (p : ℕ) {n : ℕ} (x : Fin n → ℝ) : Prop := ∃ i : Fin n, (i : ℕ) % 2 ≠ p ∧ … - abbrev
Imo2025P5.StrategyDocumented declaration: Strategy line 58 sourceSource documentation
A strategy for a given player gives a choice of number in every position, with the convention that invalid moves lose and the strategy's choices are ignored in cases where it is not that player's turn, a previous move was invalid or the sequence of previous moves is not possible under the strategy.
standard axioms: Classical.choice, Quot.sound, propext what this means
Proof uses:
Nat,Fin,Realabbrev Strategy : Type := ⦃k : ℕ⦄ → (Fin k → ℝ) → ℝ
- def
Imo2025P5.Strategy.playPlaying a strategy, k turns, against a given sequence of opponent moves (possibly not valid) line 62 sourceSource documentation
Playing a strategy, k turns, against a given sequence of opponent moves (possibly not valid).
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy,
Nat,Real,Fin2 instances, coercions and auxiliary constants left out.
def Strategy.play (s : Strategy) (p : ℕ) (opponentMoves : ℕ → ℝ) : (k : ℕ) → Fin k → ℝ | 0 => Fin.elim0 | k + 1 => Fin.snoc (s.play p opponentMoves k) (if k % 2 = p then s (s.play p opponentMoves k) else opponentMoves k) /-- Whether a strategy wins for the given player, against all possible opponent moves. -/Mentions: Imo2025P5.Strategy
- def
Imo2025P5.Strategy.WinningWhether a strategy wins for the given player, against all possible opponent moves line 68 sourceSource documentation
Whether a strategy wins for the given player, against all possible opponent moves.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy,
Real,NatProof uses:
Exists, Imo2025P5.Wins, Imo2025P5.Strategy.playdef Strategy.Winning (s : Strategy) (c : ℝ) (p : ℕ) : Prop := …
Mentions: Imo2025P5.Strategy
- determine
Imo2025P5.answerThe answer to be determined line 72 sourceSource documentation
The answer to be determined.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Set,RealProof uses:
Prod.mk,Set.ofPred,LT.lt,HDiv.hDiv,Real.sqrt,OfNat.ofNat7 instances, coercions and auxiliary constants left out.
determine answer : Set ℝ × Set ℝ := …
- def
Imo2025P5.ValidAtValidity of the move at (0-based) indexjof the infinite sequencex, as a statement about natural-number-indexed sequences line 109 sourceSource documentation
Validity of the move at (0-based) index
jof the infinite sequencex, as a statement about natural-number-indexed sequences.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,NatProof uses:
And,LE.le,OfNat.ofNat,Even,Finset.sum,Finset.range,HAdd.hAdd,HMul.hMul,Odd,HPow.hPow19 instances, coercions and auxiliary constants left out.
def ValidAt (c : ℝ) (x : ℕ → ℝ) (j : ℕ) : Prop := …
- lemma
Imo2025P5.sum_Iic_coeline 114 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Real,Fin,Eq,Finset.sum,Finset.Iic,Finset.range,HAdd.hAdd,OfNat.ofNatProof uses:
Eq.mpr,id,congrArg,Finset,Nat.range_succ_eq_Iic,Finset.map,Fin.valEmbedding,Eq.symm,Fin.map_valEmbedding_Iic,Function.Embedding,Finset.sum_map,Eq.refl22 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2025P5.validSeq_iffValidSeqfor a length-nwindow of an infinite sequence, in terms ofValidAtline 120 sourceSource documentation
ValidSeqfor a length-nwindow of an infinite sequence, in terms ofValidAt.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,Iff, Imo2025P5.ValidSeq,Fin,LT.lt, Imo2025P5.ValidAtProof uses:
Iff.intro,LE.le,OfNat.ofNat,And,Even,Finset.sum,Finset.Iic,HMul.hMul,HAdd.hAdd,Odd,HPow.hPow,And.intro,Finset.range,Fin.mk,Eq.mp,congrArg, Imo2025P5.sum_Iic_coe,And.left,Fin.isLt,Eq.mprand 3 more27 instances, coercions and auxiliary constants left out.
Tactic trace: 19 steps
Open to load the checked before-and-after goal states.
lemma validSeq_iff (c : ℝ) (x : ℕ → ℝ) (n : ℕ) : ValidSeq c (fun i : Fin n => x i) ↔ ∀ j < n, ValidAt c x j := by …Mentions: Imo2025P5.ValidSeq, Imo2025P5.ValidAt
- lemma
Imo2025P5.take_coeline 136 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,Real,Eq,Fin,Fin.takeProof uses:
funext,of_eq_true,eq_self4 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2025P5.wins_iffWinsfor a length-nwindow of an infinite sequence, in terms ofValidAtline 142 sourceSource documentation
Winsfor a length-nwindow of an infinite sequence, in terms ofValidAt.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,Iff, Imo2025P5.Wins,Fin,Exists,And,LT.lt,Ne,HMod.hMod,OfNat.ofNat, Imo2025P5.ValidAt,NotProof uses:
id,Eq.mpr,IsLeast,Set.ofPred, Imo2025P5.ValidSeq,HAdd.hAdd,Fin.take,Eq,congrFun',congrArg,funext,Set,Eq.trans, Imo2025P5.take_coe,Iff.intro,Membership.mem,lowerBounds,Classical.byContradiction,Fin.mk,lt_transand 15 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 32 steps
Open to load the checked before-and-after goal states.
lemma wins_iff (c : ℝ) (p : ℕ) (x : ℕ → ℝ) (n : ℕ) : Wins c p (fun i : Fin n => x i) ↔ ∃ j < n, j % 2 ≠ p ∧ (∀ m < j, ValidAt c x m) ∧ ¬ ValidAt c x j := by …Mentions: Imo2025P5.Wins, Imo2025P5.ValidAt
- def
Imo2025P5.Strategy.playSeqThe infinite sequence of moves of a play line 175 sourceSource documentation
The infinite sequence of moves of a play.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy,
Nat,RealProof uses: Imo2025P5.Strategy.play,
HAdd.hAdd,OfNat.ofNat,Fin.mk,Nat.lt_succ_self3 instances, coercions and auxiliary constants left out.
def Strategy.playSeq (s : Strategy) (p : ℕ) (om : ℕ → ℝ) (j : ℕ) : ℝ := …
Mentions: Imo2025P5.Strategy
- lemma
Imo2025P5.play_castLEline 178 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy,
Nat,Real,LE.le,Fin,Eq, Imo2025P5.Strategy.play,Fin.castLEProof uses:
Nat.recAux,OfNat.ofNat,Fin.elim0,Eq.symm,HAdd.hAdd,LT.lt,Or,Iff.mp,Nat.succ,Nat.lt_succ_iff_lt_or_eq,Nat.lt_succ_of_le,Fin.castSucc,Fin.ext,of_eq_true,eq_self,Eq.mpr,id,congrArg,congrFun',Fin.snoc_castSuccand 3 more14 instances, coercions and auxiliary constants left out.
Tactic trace: 24 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2025P5.play_eq_playSeqline 200 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy,
Nat,Real,Eq,Fin, Imo2025P5.Strategy.play, Imo2025P5.Strategy.playSeqProof uses:
funext,LE.le,HAdd.hAdd,OfNat.ofNat,Fin.isLt,Fin.castLE,Fin.mk,Nat.lt_succ_self, Imo2025P5.play_castLE,Eq.mp,congrArg,Fin.ext,rfl6 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2025P5.playSeq_applyline 207 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy,
Nat,Real,Eq, Imo2025P5.Strategy.playSeq,ite,HMod.hMod,OfNat.ofNat,FinProof uses:
Fin.snoc,HAdd.hAdd, Imo2025P5.Strategy.play,Fin.last,rfl,Eq.mpr,id,congrArg,Fin.snoc_last, Imo2025P5.play_eq_playSeq,Eq.refl12 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- def
Imo2025P5.respSeqThe sequence of moves arising when the player with paritypplays the strategysand the opponent always responds according torline 216 sourceSource documentation
The sequence of moves arising when the player with parity
pplays the strategysand the opponent always responds according tor.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy,
Nat,RealProof uses:
WellFounded.Nat.fix,InvImage,LT.lt,dite,Eq,HMod.hMod,OfNat.ofNat,Fin,Not7 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
def respSeq (s : Strategy) (p : ℕ) (r : Strategy) : ℕ → ℝ | j => if j % 2 = p then s (fun i : Fin j => respSeq s p r (i : ℕ)) else r (fun i : Fin j => respSeq s p r (i : ℕ)) termination_by j => j decreasing_by all_goals exact i.isLtMentions: Imo2025P5.Strategy
- lemma
Imo2025P5.play_respSeqline 222 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy,
Nat,Eq,Fin,Real, Imo2025P5.Strategy.play, Imo2025P5.respSeqProof uses:
Nat.recAux,funext,OfNat.ofNat,Fin.elim0,HAdd.hAdd,Eq.mpr,Fin.snoc,ite,HMod.hMod,id,congrFun',congrArg,congr,ite_congr,Eq.refl,Not,Fin.lastCases,Fin.last,Fin.snoc_last,diteand 9 more8 instances, coercions and auxiliary constants left out.
Tactic trace: 19 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2025P5.exists_first_invalidA first invalid index exists as soon as any invalid index does line 243 sourceSource documentation
A first invalid index exists as soon as any invalid index does.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,Exists,Not, Imo2025P5.ValidAt,And,LT.ltProof uses:
Exists.intro,Nat.find,Classical.propDecidable,And.intro,Iff.mp,Classical.not_not,Nat.find_min,Nat.find_spec3 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma exists_first_invalid {c : ℝ} {x : ℕ → ℝ} (hex : ∃ j, ¬ ValidAt c x j) : ∃ j, (∀ m < j, ValidAt c x m) ∧ ¬ ValidAt c x j := by …Mentions: Imo2025P5.ValidAt
- lemma
Imo2025P5.le_of_sq_le_sq'If0 ≤ banda ^ 2 ≤ b ^ 2thena ≤ bline 249 sourceSource documentation
If
0 ≤ banda ^ 2 ≤ b ^ 2thena ≤ b.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LE.le,OfNat.ofNat,HPow.hPow,NatProof uses:
le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,HAdd.hAdd,HSub.hSub,HMul.hMul,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Nat.rawCast,Int.rawCast,inferInstance,Ring,Int.negOfNat,Mathlib.Meta.NormNum.instAddMonoidWithOne,Mathlib.Tactic.Ring.Common.sub_congr,Mathlib.Tactic.Ring.Common.pow_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfland 62 more93 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma le_of_sq_le_sq' {a b : ℝ} (hb : 0 ≤ b) (h : a ^ 2 ≤ b ^ 2) : a ≤ b := by …Mentions: h
- lemma
Imo2025P5.sum_range_two_mulline 252 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Real,Eq,Finset.sum,Finset.range,HMul.hMul,OfNat.ofNat,HAdd.hAddProof uses:
Nat.recAux,of_eq_true,Eq.trans,True,congrFun',congrArg,EmptyCollection.emptyCollection,Finset,MulZeroClass.mul_zero,eq_self,Eq.mpr,id,congr,Finset.sum_congr,mul_add,mul_one,Membership.mem,Eq.refl,Finset.sum_range_succ,Eq.symmand 8 more42 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2025P5.sum_le_sqrt_two_mulCauchy-Schwarz bound: if a sequence vanishes at even indices below2 * k, is nonnegative there, and its squares sum to at most2 * k, then its sum is at most√2 * kline 262 sourceSource documentation
Cauchy-Schwarz bound: if a sequence vanishes at even indices below
2 * k, is nonnegative there, and its squares sum to at most2 * k, then its sum is at most√2 * k.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Real,LT.lt,HMul.hMul,OfNat.ofNat,Even,Eq,LE.le,Finset.sum,Finset.range,HPow.hPow,Real.sqrtProof uses:
HAdd.hAdd,Eq.mpr,id,congrArg, Imo2025P5.sum_range_two_mul,Finset.sum_congr,rfl,Finset,Membership.mem,Eq.mp,propext,Finset.mem_range,even_two_mul,zero_add,Eq.refl,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.pow_congr,Mathlib.Tactic.Ring.cast_zeroand 47 more98 instances, coercions and auxiliary constants left out.
Tactic trace: 28 steps
Open to load the checked before-and-after goal states.
lemma sum_le_sqrt_two_mul (x : ℕ → ℝ) (k : ℕ) (h0 : ∀ i < 2 * k, Even i → x i = 0) (hQ : ∑ i ∈ range (2 * k), x i ^ 2 ≤ 2 * (k : ℝ)) : ∑ i ∈ range (2 * k), x i ≤ Real.sqrt 2 * k := by … - lemma
Imo2025P5.sqrt_two_le_addIfa, b ≥ 0anda² + b² = 2thena + b ≥ √2line 293 sourceSource documentation
If
a, b ≥ 0anda² + b² = 2thena + b ≥ √2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LE.le,OfNat.ofNat,Eq,HAdd.hAdd,HPow.hPow,Nat,Real.sqrtProof uses: Imo2025P5.le_of_sq_le_sq',
add_nonneg,Eq.mpr,id,congrArg,Real.sq_sqrt,Mathlib.Meta.NormNum.isNat_le_true,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_zero,Eq.refl,Mathlib.Meta.NormNum.instAtLeastTwo,Bool,Bool.true,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,Neg.neg,HSub.hSub,HMul.hMuland 71 more85 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma sqrt_two_le_add {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (h : a ^ 2 + b ^ 2 = 2) : Real.sqrt 2 ≤ a + b := by …Mentions: h
- lemma
Imo2025P5.bazza_stepDocumented declaration: bazza_step line 307 sourceSource documentation
One round of greedy play when
c ≤ √2/2, assuming the invariant after2kmoves and the validity of Alice's move at index2k: Alice's move is at most√2/2, so Bazza's greedy reply at index2k + 1exists, and the squares of the pair sum to2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,LE.le,HDiv.hDiv,Real.sqrt,OfNat.ofNat,Eq,HAdd.hAdd,HMul.hMul,HSub.hSub,Finset.sum,Finset.range,HPow.hPow, Imo2025P5.ValidAt,AndProof uses:
Even,Odd,even_two_mul,mul_le_mul_of_nonneg_right,le_of_lt,Right.add_pos_of_nonneg_of_pos,mul_nonneg,Mathlib.Meta.Positivity.pos_of_isNat,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Meta.NormNum.instAtLeastTwo,Bool,Nat.ble,Nat.cast_nonneg',Nat.cast_one,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,inferInstanceand 107 more150 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.
lemma bazza_step {c : ℝ} {x : ℕ → ℝ} (hc : c ≤ Real.sqrt 2 / 2) {k : ℕ} (hb : x (2 * k + 1) = Real.sqrt (((2 * k + 1 : ℕ) : ℝ) + 1 - ∑ i ∈ range (2 * k + 1), x i ^ 2)) (hQ : ∑ i ∈ range (2 * k), x i ^ 2 = 2 * (k : ℝ)) (hS : Real.sqrt 2 * k ≤ ∑ i ∈ range (2 * k), x i) (hv : ValidAt c x (2 * k)) : ∑ i ∈ range (2 * k + 1), x i ^ 2 = 2 * (k : ℝ) + x (2 * k) ^ 2 ∧ 0 ≤ x (2 * k + 1) ∧ x (2 * k + 1) ^ 2 = 2 - x (2 * k) ^ 2 := by …Mentions: Imo2025P5.ValidAt
- lemma
Imo2025P5.bazza_invariantDocumented declaration: bazza_invariant line 336 sourceSource documentation
Invariant of greedy play when
c ≤ √2/2: while all moves so far are valid, the sum of squares after Bazza's move at index2k - 1is exactly2k, and the plain sum is at least√2 * k.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,LE.le,HDiv.hDiv,Real.sqrt,OfNat.ofNat,Odd,Eq,HSub.hSub,HAdd.hAdd,Finset.sum,Finset.range,HPow.hPow,LT.lt,HMul.hMul, Imo2025P5.ValidAt,AndProof uses:
Nat.recAux,of_eq_true,Eq.trans,True,implies_congr,forall_congr,False,congrArg,MulZeroClass.mul_zero,Eq.refl,implies_true,congr,congrFun',EmptyCollection.emptyCollection,Finset,CharP.cast_eq_zero,eq_self,and_self, Imo2025P5.bazza_step,Iff.mprand 72 more124 instances, coercions and auxiliary constants left out.
Tactic trace: 24 steps
Open to load the checked before-and-after goal states.
lemma bazza_invariant {c : ℝ} {x : ℕ → ℝ} (hc : c ≤ Real.sqrt 2 / 2) (hgreedy : ∀ j, Odd j → x j = Real.sqrt ((j : ℝ) + 1 - ∑ i ∈ range j, x i ^ 2)) : ∀ k : ℕ, (∀ m < 2 * k, ValidAt c x m) → ∑ i ∈ range (2 * k), x i ^ 2 = 2 * (k : ℝ) ∧ Real.sqrt 2 * k ≤ ∑ i ∈ range (2 * k), x i := by …Mentions: Imo2025P5.ValidAt
- lemma
Imo2025P5.bazza_validAt_oddWhenc ≤ √2/2and Bazza plays greedily, no odd index is ever the first invalid one line 362 sourceSource documentation
When
c ≤ √2/2and Bazza plays greedily, no odd index is ever the first invalid one.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,LE.le,HDiv.hDiv,Real.sqrt,OfNat.ofNat,Odd,Eq,HSub.hSub,HAdd.hAdd,Finset.sum,Finset.range,HPow.hPow,LT.lt, Imo2025P5.ValidAtProof uses:
HMul.hMul,Exists,Exists.intro,Eq.mp,HMod.hMod,congrArg,propext,Nat.odd_iff,And, Imo2025P5.bazza_invariant, Imo2025P5.bazza_step,Iff.mpr,And.intro,Even,False.elim,Nat.even_iff,Eq.mpr,id,Finset.sum_range_succ,congrFun'and 63 more110 instances, coercions and auxiliary constants left out.
Tactic trace: 19 steps
Open to load the checked before-and-after goal states.
lemma bazza_validAt_odd {c : ℝ} {x : ℕ → ℝ} (hc : c ≤ Real.sqrt 2 / 2) (hgreedy : ∀ j, Odd j → x j = Real.sqrt ((j : ℝ) + 1 - ∑ i ∈ range j, x i ^ 2)) : ∀ j, Odd j → (∀ m < j, ValidAt c x m) → ValidAt c x j := by …Mentions: Imo2025P5.ValidAt
- def
Imo2025P5.bazzaStrategyBazza's greedy strategy: spend the entire quadratic budget line 382 sourceSource documentation
Bazza's greedy strategy: spend the entire quadratic budget.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy
Proof uses:
Nat,Fin,Real,Real.sqrt,HSub.hSub,HAdd.hAdd,OfNat.ofNat,Finset.sum,Finset.univ,HPow.hPow15 instances, coercions and auxiliary constants left out.
noncomputable def bazzaStrategy : Strategy := fun k h => Real.sqrt ((k : ℝ) + 1 - ∑ i, h i ^ 2)
Mentions: Imo2025P5.Strategy, h
- def
Imo2025P5.zeroStrategyThe all-zeros strategy line 385 sourceSource documentation
The all-zeros strategy.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2025P5.Strategy
Proof uses:
Nat,Fin,Real,OfNat.ofNat2 instances, coercions and auxiliary constants left out.
def zeroStrategy : Strategy := fun _ _ => 0
Mentions: Imo2025P5.Strategy
- lemma
Imo2025P5.alice_not_winsIfc ≤ √2/2then Alice has no winning strategy: Bazza survives greedy play forever line 388 sourceSource documentation
If
c ≤ √2/2then Alice has no winning strategy: Bazza survives greedy play forever.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LE.le,HDiv.hDiv,Real.sqrt,OfNat.ofNat,Nat,Not,Exists, Imo2025P5.Strategy, Imo2025P5.Strategy.WinningProof uses:
False, Imo2025P5.Wins, Imo2025P5.Strategy.play, Imo2025P5.respSeq, Imo2025P5.bazzaStrategy,And,LT.lt,Ne,HMod.hMod, Imo2025P5.ValidAt,Eq.mp,Fin,congrArg,propext, Imo2025P5.wins_iff, Imo2025P5.play_respSeq,Odd,Eq,HSub.hSub,HAdd.hAddand 14 more41 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma alice_not_wins {c : ℝ} (hc : c ≤ Real.sqrt 2 / 2) : ¬ ∃ s : Strategy, s.Winning c 0 := by …Mentions: Imo2025P5.Strategy
- lemma
Imo2025P5.bazza_winsIfc < √2/2then Bazza's greedy strategy wins line 403 sourceSource documentation
If
c < √2/2then Bazza's greedy strategy wins.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LT.lt,HDiv.hDiv,Real.sqrt,OfNat.ofNat,Nat,Exists, Imo2025P5.Strategy, Imo2025P5.Strategy.WinningProof uses:
Exists.intro, Imo2025P5.bazzaStrategy, Imo2025P5.Strategy.playSeq,Eq,rfl,Odd,HSub.hSub,HAdd.hAdd,Finset.sum,Finset.range,HPow.hPow,Eq.mpr,id,congrArg,ite,HMod.hMod,Fin, Imo2025P5.playSeq_apply,ite_eq_left,Iff.mpand 105 more122 instances, coercions and auxiliary constants left out.
Tactic trace: 35 steps
Open to load the checked before-and-after goal states.
lemma bazza_wins {c : ℝ} (hc : c < Real.sqrt 2 / 2) : ∃ s : Strategy, s.Winning c 1 := by …Mentions: Imo2025P5.Strategy
- lemma
Imo2025P5.zeros_sum_leThe partial-sum bound coming from Cauchy-Schwarz, for play in which Alice has played all zeros so far line 443 sourceSource documentation
The partial-sum bound coming from Cauchy-Schwarz, for play in which Alice has played all zeros so far.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,LT.lt,HMul.hMul,OfNat.ofNat,Even,Eq, Imo2025P5.ValidAt,LE.le,Finset.sum,Finset.range,Real.sqrtProof uses: Imo2025P5.sum_le_sqrt_two_mul,
Nat.casesAuxOn,HPow.hPow,of_eq_true,Eq.trans,True,congr,congrArg,congrFun',EmptyCollection.emptyCollection,Finset,MulZeroClass.mul_zero,CharP.cast_eq_zero,Eq.symm,HAdd.hAdd,And.right,Odd,And,Iff.mpr,HMod.hModand 62 more105 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma zeros_sum_le {c : ℝ} {x : ℕ → ℝ} (t : ℕ) (h0 : ∀ i < 2 * t, Even i → x i = 0) (hvalid : ∀ m < 2 * t, ValidAt c x m) : ∑ i ∈ range (2 * t), x i ≤ Real.sqrt 2 * t := by …Mentions: Imo2025P5.ValidAt
- lemma
Imo2025P5.zeros_validAt_evenIfc ≥ √2/2and all of Alice's moves up to an even index2 * tare0, then her move at2 * tis valid line 458 sourceSource documentation
If
c ≥ √2/2and all of Alice's moves up to an even index2 * tare0, then her move at2 * tis valid.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,LE.le,HDiv.hDiv,Real.sqrt,OfNat.ofNat,HMul.hMul,Even,Eq,LT.lt, Imo2025P5.ValidAtProof uses:
le_rfl,even_two_mul,Finset.sum,Finset.range, Imo2025P5.zeros_sum_le,And.intro,And,HAdd.hAdd,Odd,HPow.hPow,le_of_eq,Eq.symm,Eq.mpr,id,congrArg,Finset.sum_range_succ,add_zero,le_of_not_gt,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mpand 87 more124 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
lemma zeros_validAt_even {c : ℝ} {x : ℕ → ℝ} (hc : Real.sqrt 2 / 2 ≤ c) (t : ℕ) (h0 : ∀ i ≤ 2 * t, Even i → x i = 0) (hvalid : ∀ m < 2 * t, ValidAt c x m) : ValidAt c x (2 * t) := by …Mentions: Imo2025P5.ValidAt
- lemma
Imo2025P5.bazza_not_winsIfc ≥ √2/2then Bazza has no winning strategy: Alice survives forever by playing all zeros line 478 sourceSource documentation
If
c ≥ √2/2then Bazza has no winning strategy: Alice survives forever by playing all zeros.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LE.le,HDiv.hDiv,Real.sqrt,OfNat.ofNat,Nat,Not,Exists, Imo2025P5.Strategy, Imo2025P5.Strategy.WinningProof uses:
False, Imo2025P5.Wins, Imo2025P5.Strategy.play, Imo2025P5.respSeq, Imo2025P5.zeroStrategy,And,LT.lt,Ne,HMod.hMod, Imo2025P5.ValidAt,Eq.mp,Fin,congrArg,propext, Imo2025P5.wins_iff, Imo2025P5.play_respSeq,Even,Eq,Eq.mpr,iteand 9 more35 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma bazza_not_wins {c : ℝ} (hc : Real.sqrt 2 / 2 ≤ c) : ¬ ∃ s : Strategy, s.Winning c 1 := by …Mentions: Imo2025P5.Strategy
- lemma
Imo2025P5.alice_winsIfc > √2/2then Alice wins: she plays zeros until indexN, then spends her whole linear budget, which by then exceeds√(N + 2), so Bazza cannot answer line 493 sourceSource documentation
If
c > √2/2then Alice wins: she plays zeros until indexN, then spends her whole linear budget, which by then exceeds√(N + 2), so Bazza cannot answer.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LT.lt,HDiv.hDiv,Real.sqrt,OfNat.ofNat,Nat,Exists, Imo2025P5.Strategy, Imo2025P5.Strategy.WinningProof uses:
lt_trans,div_pos,Real.sqrt_pos_of_pos,Mathlib.Meta.Positivity.pos_of_isNat,inferInstance,PartialOrder,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Meta.NormNum.instAtLeastTwo,Bool,Nat.ble,HSub.hSub,lt_of_not_ge,LE.le,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,HAdd.hAdd,HMul.hMul,AddMonoidWithOne,congrArgand 180 more183 instances, coercions and auxiliary constants left out.
Tactic trace: 124 steps
Open to load the checked before-and-after goal states.
lemma alice_wins {c : ℝ} (hc : Real.sqrt 2 / 2 < c) : ∃ s : Strategy, s.Winning c 0 := by …Mentions: Imo2025P5.Strategy
- problem
Imo2025P5.imo2025_p5line 601 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Prod,Set,Real,Prod.mk,Set.ofPred,Exists, Imo2025P5.Strategy, Imo2025P5.Strategy.Winning,OfNat.ofNat,Nat, Imo2025P5.answerProof uses:
LT.lt,HDiv.hDiv,Real.sqrt,Set.ext,id,Iff,Membership.mem,Iff.intro,Decidable.byContradiction,Not, Imo2025P5.alice_not_wins,Iff.mp,LE.le,not_lt, Imo2025P5.alice_wins, Imo2025P5.bazza_not_wins, Imo2025P5.bazza_wins,Eq.mpr,congrArg,Eq.refl17 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.