Compfiles/Imo2012P3.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
75 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 2012, Problem 3
The liar's guessing game is a game played between two players A and B. The rules of the game depend on two fixed positive integers k and n which are known to both players.
At the start of the game A chooses integers x and N with 1 ≤ x ≤ N. Player A keeps x secret, and truthfully tells N to player B. Player B now tries to obtain information about x by asking player A questions as follows: each question consists of B specifying an arbitrary set S of positive integers (possibly one specified in some previous question), and asking A whether x belongs to S. Player B may ask as many questions as he wishes. After each question, player A must immediately answer it with yes or no, but is allowed to lie as many times as she wants; the only restriction is that, among any k + 1 consecutive answers, at least one answer must be truthful.
After B has asked as many questions as he wants, he must specify a set X of at most n positive integers. If x belongs to X, then B wins; otherwise, he loses. Prove that:
(a) If n ≥ 2^k, then B can guarantee a win.
(b) For all sufficiently large k, there exists an integer n ≥ (1.99)^k such that B cannot guarantee a win.
Imports (5)
Imported by 1 file
- inductive
Imo2012P3.MoveA move of player B: either stop and guess a setX, or ask whetherx ∈ Sline 61 sourceSource documentation
A move of player B: either stop and guess a set
X, or ask whetherx ∈ S.standard axioms: Quot.sound, propext what this means
Statement uses:
Natinductive Move (N : ℕ) where …
- structure
Imo2012P3.StrategyA strategy for player B: from the list of answers so far (in chronological order), decide the next move line 67 sourceSource documentation
A strategy for player B: from the list of answers so far (in chronological order), decide the next move.
standard axioms: Quot.sound, propext what this means
Statement uses:
Natstructure Strategy (N : ℕ) where …
- def
Imo2012P3.histThe answer history aftertquestions, when player A answers according toansline 72 sourceSource documentation
The answer history after
tquestions, when player A answers according toans.no axioms what this means
Statement uses:
Nat,Bool,List2 instances, coercions and auxiliary constants left out.
def hist (ans : ℕ → Bool) : ℕ → List Bool | 0 => [] | t + 1 => hist ans t ++ [ans t] /-- The `i`-th answer is truthful for the secret `x`: it matches the truth value of `x ∈ S`, where `S` is the question B asked at that point. (If B guessed instead of asking, the answer is vacuously truthful.) -/
- def
Imo2012P3.TruthfulAtThei-th answer is truthful for the secretx: it matches the truth value ofx ∈ S, whereSis the question B asked at that point line 79 sourceSource documentation
The
i-th answer is truthful for the secretx: it matches the truth value ofx ∈ S, whereSis the question B asked at that point. (If B guessed instead of asking, the answer is vacuously truthful.)standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Fin,BoolProof uses:
Finset,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.hist,Imo2012P3.Move.ask,Iff,Membership.mem,Bool.true2 instances, coercions and auxiliary constants left out.
def TruthfulAt {N : ℕ} (σ : Strategy N) (x : Fin N) (ans : ℕ → Bool) (i : ℕ) : Prop := …Mentions: Imo2012P3.Strategy
- def
Imo2012P3.ConsistentUpToThe play is consistent with the secretxup to timeT: among anyk + 1consecutive answers within the firstT, at least one is truthful line 84 sourceSource documentation
The play is consistent with the secret
xup to timeT: among anyk + 1consecutive answers within the firstT, at least one is truthful.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Fin,BoolProof uses:
LE.le,HAdd.hAdd,OfNat.ofNat,Exists,And, Imo2012P3.TruthfulAt4 instances, coercions and auxiliary constants left out.
def ConsistentUpTo (k : ℕ) {N : ℕ} (σ : Strategy N) (x : Fin N) (ans : ℕ → Bool) (T : ℕ) : Prop := …Mentions: Imo2012P3.Strategy
- def
Imo2012P3.GuaranteesWinPlayer B's strategyσguarantees a win if 1 line 93 sourceSource documentation
Player B's strategy
σguarantees a win if- against any answer sequence that stays consistent with
xforever, B eventually stops and guesses, and - whenever B guesses
Xat timeTand the answers given so far are consistent withx, thenx ∈ XandXhas at mostnelements.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.StrategyProof uses:
And,Fin,Bool, Imo2012P3.ConsistentUpTo,Exists,Finset,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.hist,Imo2012P3.Move.guess,Membership.mem,LE.le,Finset.card3 instances, coercions and auxiliary constants left out.
def GuaranteesWin (k n : ℕ) {N : ℕ} (σ : Strategy N) : Prop := …Mentions: Imo2012P3.Strategy
- against any answer sequence that stays consistent with
- def
Imo2012P3.BobWinsPlayer B can guarantee a win with parametersk, nwhen player A's bound isNline 102 sourceSource documentation
Player B can guarantee a win with parameters
k, nwhen player A's bound isN.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Exists, Imo2012P3.Strategy, Imo2012P3.GuaranteesWindef BobWins (k n N : ℕ) : Prop := …
- def
Imo2012P3.weightBaseThe base of the weights used by A's counter-strategy line 127 sourceSource documentation
The base of the weights used by A's counter-strategy.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
RealProof uses:
OfScientific.ofScientific,Bool.true2 instances, coercions and auxiliary constants left out.
def weightBase : ℝ := 1.998
- lemma
Imo2012P3.one_lt_weightBaseline 129 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
LT.lt,Real,OfNat.ofNat, Imo2012P3.weightBaseProof uses:
of_eq_true,Eq.trans,HDiv.hDiv,Mathlib.Meta.NormNum.instAtLeastTwo,True,congrArg,Mathlib.Meta.NormNum.IsNNRat.to_eq,OfScientific.ofScientific,Bool.true,Mathlib.Meta.NormNum.isNNRat_ofScientific_of_true,Mathlib.Meta.NormNum.isNNRat_nnratCast,NNRat.divNat,HPow.hPow,Nat,Mathlib.Meta.NormNum.isNNRat_divNat,Mathlib.Meta.NormNum.IsNat.raw_refl,Mathlib.Meta.NormNum.isNat_pow,Eq.refl,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.IsNatPowT.runand 14 more50 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- def
Imo2012P3.alicePlayA's counterplay againstσ: after each answer she records, for every candidate, the length of its current run of consecutive lies line 136 sourceSource documentation
A's counterplay against
σ: after each answer she records, for every candidate, the length of its current run of consecutive lies. Given a question, she chooses the side with smaller total weight as the "bad set" and answers thatxlies on the other side. The third component is the answer given at that step. (Once B guesses, the streaks are frozen and the answers are junk.)standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Prod,Fin,List,Bool2 instances, coercions and auxiliary constants left out.
def alicePlay (σ : Strategy N) : ℕ → (Fin N → ℕ) × List Bool × Bool | 0 => (fun _ => 0, [], true) | t + 1 => match σ.move (alicePlay σ t).2.1 with | Move.guess _ => ((alicePlay σ t).1, (alicePlay σ t).2.1 ++ [true], true) | Move.ask S => if ∑ x ∈ S, weightBase ^ ((alicePlay σ t).1 x) ≤ ∑ x ∈ Sᶜ, weightBase ^ ((alicePlay σ t).1 x) then (fun x => if x ∈ S then (alicePlay σ t).1 x + 1 else 0, (alicePlay σ t).2.1 ++ [false], false) else (fun x => if x ∉ S then (alicePlay σ t).1 x + 1 else 0, …Mentions: Imo2012P3.Strategy, S, Imo2012P3.weightBase
- def
Imo2012P3.aliceStreakThe streak (length of the current run of consecutive lies) of each candidate aftertanswers of A's counterplay line 152 sourceSource documentation
The streak (length of the current run of consecutive lies) of each candidate after
tanswers of A's counterplay.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,FinProof uses:
Prod.fst,Prod,List,Bool, Imo2012P3.alicePlaydef aliceStreak (σ : Strategy N) (t : ℕ) : Fin N → ℕ := (alicePlay σ t).1
Mentions: Imo2012P3.Strategy, Imo2012P3.alicePlay
- def
Imo2012P3.aliceHistThe answer history of A's counterplay aftertsteps line 155 sourceSource documentation
The answer history of A's counterplay after
tsteps.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,List,BoolProof uses:
Prod.fst,Prod.snd,Fin,Prod, Imo2012P3.alicePlaydef aliceHist (σ : Strategy N) (t : ℕ) : List Bool := (alicePlay σ t).2.1
Mentions: Imo2012P3.Strategy, Imo2012P3.alicePlay
- def
Imo2012P3.aliceAnsThet-th answer of A's counterplay line 158 sourceSource documentation
The
t-th answer of A's counterplay.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,BoolProof uses:
Prod.snd,List,Fin,Prod, Imo2012P3.alicePlay,HAdd.hAdd,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
def aliceAns (σ : Strategy N) (t : ℕ) : Bool := (alicePlay σ (t + 1)).2.2
Mentions: Imo2012P3.Strategy, Imo2012P3.alicePlay
- def
Imo2012P3.aliceWeightThe total weight aftertanswers line 161 sourceSource documentation
The total weight after
tanswers.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,RealProof uses:
Finset.sum,Fin,Finset.univ,HPow.hPow, Imo2012P3.weightBase, Imo2012P3.aliceStreak6 instances, coercions and auxiliary constants left out.
def aliceWeight (σ : Strategy N) (t : ℕ) : ℝ := ∑ x, weightBase ^ (aliceStreak σ t x)
Mentions: Imo2012P3.Strategy, Imo2012P3.weightBase, Imo2012P3.aliceStreak
- lemma
Imo2012P3.alicePlay_guessline 163 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Finset,Fin,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.aliceHist,Imo2012P3.Move.guess,Prod,List,Bool, Imo2012P3.alicePlay,HAdd.hAdd,OfNat.ofNat,Prod.mk, Imo2012P3.aliceStreak,HAppend.hAppend,List.cons,Bool.trueand 1 moreProof uses:
Prod.fst,Prod.snd,Eq.mpr,Imo2012P3.alicePlay.match_1,ite,LE.le,Real,Finset.sum,HPow.hPow, Imo2012P3.weightBase,Compl.compl,Membership.mem,Bool.false,Not,id,Eq.rec,Eq.refl,Eq.trans,Nat.succ,congrArgand 1 more25 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.aliceStreak_guessline 171 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Finset,Fin,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.aliceHist,Imo2012P3.Move.guess, Imo2012P3.aliceStreak,HAdd.hAdd,OfNat.ofNatProof uses:
Eq.mpr,Prod.fst,Prod,List,Bool, Imo2012P3.alicePlay,id,congrArg,rfl,Prod.mk,HAppend.hAppend,List.cons,Bool.true,List.nil, Imo2012P3.alicePlay_guess,Eq.refl8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.alicePlay_askline 176 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Finset,Fin,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.aliceHist,Imo2012P3.Move.ask,Prod,List,Bool, Imo2012P3.alicePlay,HAdd.hAdd,OfNat.ofNat,ite,LE.le,Real,Finset.sum,HPow.hPowand 11 moreProof uses:
Prod.fst,Prod.snd,Eq.mpr,Imo2012P3.alicePlay.match_1,id,Eq.rec,Eq.refl,Eq.trans,Nat.succ,congrArg,Imo2012P3.alicePlay.eq_240 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.aliceHist_succline 190 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Eq,List,Bool, Imo2012P3.aliceHist,HAdd.hAdd,OfNat.ofNat,HAppend.hAppend,List.cons, Imo2012P3.aliceAns,List.nilProof uses: Imo2012P3.Move,
Imo2012P3.Strategy.move,Finset,Fin,Imo2012P3.Move.guess,Eq.mpr,Prod.fst,Prod.snd,Prod, Imo2012P3.alicePlay,id,congrArg,rfl,Prod.mk, Imo2012P3.aliceStreak,Bool.true, Imo2012P3.alicePlay_guess,Eq.refl,Eq.symm,Imo2012P3.Move.askand 16 more28 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.aliceHist_eq_histline 201 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Eq,List,Bool, Imo2012P3.aliceHist, Imo2012P3.hist, Imo2012P3.aliceAnsProof uses:
Nat.recAux,Eq.refl,OfNat.ofNat,Eq.mpr,HAdd.hAdd,HAppend.hAppend,List.cons,List.nil,id,congrArg,Nat.succ,Imo2012P3.hist.eq_2,Eq.symm, Imo2012P3.aliceHist_succ5 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.aliceWeight_step_askAt an ask-step, the new total weight is at mostweightBase / 2times the old weight plusNline 209 sourceSource documentation
At an ask-step, the new total weight is at most
weightBase / 2times the old weight plusN.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Finset,Fin,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.aliceHist,Imo2012P3.Move.ask,LE.le,Real, Imo2012P3.aliceWeight,HAdd.hAdd,OfNat.ofNat,HMul.hMul,HDiv.hDiv, Imo2012P3.weightBaseProof uses:
le_of_lt,of_eq_true,LT.lt,Eq.trans,Mathlib.Meta.NormNum.instAtLeastTwo,True,congrArg,Mathlib.Meta.NormNum.IsNNRat.to_eq,OfScientific.ofScientific,Bool.true,Mathlib.Meta.NormNum.isNNRat_ofScientific_of_true,Mathlib.Meta.NormNum.isNNRat_nnratCast,NNRat.divNat,HPow.hPow,Mathlib.Meta.NormNum.isNNRat_divNat,Mathlib.Meta.NormNum.IsNat.raw_refl,Mathlib.Meta.NormNum.isNat_pow,Eq.refl,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.IsNatPowT.runand 124 more153 instances, coercions and auxiliary constants left out.
Tactic trace: 49 steps
Open to load the checked before-and-after goal states.
lemma aliceWeight_step_ask {σ : Strategy N} {t : ℕ} {S : Finset (Fin N)} (h : σ.move (aliceHist σ t) = Move.ask S) : aliceWeight σ (t + 1) ≤ weightBase / 2 * aliceWeight σ t + N := by …Mentions: Imo2012P3.Strategy, S, h, Imo2012P3.aliceHist, Imo2012P3.aliceWeight, Imo2012P3.weightBase
- lemma
Imo2012P3.aliceWeight_leThe total weight never exceeds1000 * Nline 267 sourceSource documentation
The total weight never exceeds
1000 * N.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,LE.le,Real, Imo2012P3.aliceWeight,HMul.hMul,OfNat.ofNatProof uses:
Nat.recAux,Eq,of_eq_true,Eq.trans,True,congrFun',congrArg,Finset.sum,Fin,Finset.univ,HPow.hPow, Imo2012P3.weightBase, Imo2012P3.aliceStreak,HSMul.hSMul,Finset.card,funext,pow_zero,Finset.sum_const,Fintype.card_fin,nsmul_eq_muland 127 more129 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma aliceWeight_le (σ : Strategy N) (t : ℕ) : aliceWeight σ t ≤ 1000 * N := by …
Mentions: Imo2012P3.Strategy, Imo2012P3.aliceWeight
- lemma
Imo2012P3.aliceStreak_leNo candidate's streak ever reachesk + 1, once1000 * N < (1.998) ^ (k+1)line 289 sourceSource documentation
No candidate's streak ever reaches
k + 1, once1000 * N < (1.998) ^ (k+1).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,LT.lt,Real,HMul.hMul,OfNat.ofNat,HPow.hPow, Imo2012P3.weightBase,HAdd.hAdd,Fin,LE.le, Imo2012P3.aliceStreakProof uses:
Decidable.byContradiction,Not, Imo2012P3.aliceWeight,Finset.single_le_sum,Finset.univ,Membership.mem,Finset,pow_nonneg,of_eq_true,Eq.trans,HDiv.hDiv,Mathlib.Meta.NormNum.instAtLeastTwo,True,congrArg,Mathlib.Meta.NormNum.IsNNRat.to_eq,OfScientific.ofScientific,Bool.true,Mathlib.Meta.NormNum.isNNRat_ofScientific_of_true,Mathlib.Meta.NormNum.isNNRat_nnratCast,NNRat.divNatand 86 more121 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
lemma aliceStreak_le (σ : Strategy N) {k : ℕ} (hWt : 1000 * (N : ℝ) < weightBase ^ (k + 1)) (x : Fin N) (t : ℕ) : aliceStreak σ t x ≤ k := by …Mentions: Imo2012P3.Strategy, Imo2012P3.weightBase, Imo2012P3.aliceStreak
- lemma
Imo2012P3.alice_lie_streakIf A'si-th answer is a lie forx, thenx's streak increases by one line 303 sourceSource documentation
If A's
i-th answer is a lie forx, thenx's streak increases by one.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,Fin,Not, Imo2012P3.TruthfulAt, Imo2012P3.aliceAns,Eq, Imo2012P3.aliceStreak,HAdd.hAdd,OfNat.ofNatProof uses:
Finset,And, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.aliceHist,Imo2012P3.Move.ask,Or,Membership.mem,Ne,Bool,Bool.true,Exists,Eq.mp,Iff,Eq.trans,Mathlib.Tactic.Push.not_forall_eq,congrArg,funext, Imo2012P3.hist,Listand 39 more30 instances, coercions and auxiliary constants left out.
Tactic trace: 31 steps
Open to load the checked before-and-after goal states.
lemma alice_lie_streak {σ : Strategy N} {x : Fin N} {i : ℕ} (h : ¬ TruthfulAt σ x (aliceAns σ) i) : aliceStreak σ (i + 1) x = aliceStreak σ i x + 1 := by …Mentions: Imo2012P3.Strategy, h, Imo2012P3.TruthfulAt, Imo2012P3.aliceAns, Imo2012P3.aliceStreak
- lemma
Imo2012P3.alice_consistentA's answer sequence is consistent with every candidate at all times: among anyk + 1consecutive answers, at least one is truthful forxline 339 sourceSource documentation
A's answer sequence is consistent with every candidate at all times: among any
k + 1consecutive answers, at least one is truthful forx.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.Strategy,LT.lt,Real,HMul.hMul,OfNat.ofNat,HPow.hPow, Imo2012P3.weightBase,HAdd.hAdd,Fin, Imo2012P3.ConsistentUpTo, Imo2012P3.aliceAnsProof uses:
LE.le,Classical.byContradiction,Exists,And, Imo2012P3.TruthfulAt,Not, Imo2012P3.aliceStreak,Nat.recAux,of_eq_true,Eq.trans,True,implies_congr,Function.swap,congr,congrArg,add_zero,congrFun',Eq.mp,binderNameHint,forall_congrand 8 more72 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
lemma alice_consistent (σ : Strategy N) {k : ℕ} (hWt : 1000 * (N : ℝ) < weightBase ^ (k + 1)) (x : Fin N) (T : ℕ) : ConsistentUpTo k σ x (aliceAns σ) T := by …Mentions: Imo2012P3.Strategy, Imo2012P3.weightBase, Imo2012P3.ConsistentUpTo, Imo2012P3.aliceAns
- lemma
Imo2012P3.aliceWeightBase_boundThe weight bound needed atN = n + 1wheren = ⌈(1.99) ^ k⌉line 363 sourceSource documentation
The weight bound needed at
N = n + 1wheren = ⌈(1.99) ^ k⌉.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Nat.ceil,Real,HPow.hPow,OfScientific.ofScientific,Bool.true,LT.lt,HMul.hMul,OfNat.ofNat,HAdd.hAdd, Imo2012P3.weightBaseProof uses:
LE.le,le_of_lt,pow_pos,Mathlib.Meta.Positivity.pos_of_isNNRat,Mathlib.Meta.NormNum.isNNRat_ofScientific_of_true,Mathlib.Meta.NormNum.isNNRat_nnratCast,NNRat.divNat,Mathlib.Meta.NormNum.isNNRat_divNat,Mathlib.Meta.NormNum.IsNat.raw_refl,Mathlib.Meta.NormNum.isNat_pow,Eq.refl,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.IsNatPowT.run,Mathlib.Meta.NormNum.IsNatPowT.bit0,Mathlib.Meta.NormNum.isNNRat_div,NNRat,Mathlib.Meta.NormNum.isNNRat_mul,Inv.inv,Mathlib.Meta.NormNum.IsNat.to_isNNRat,Mathlib.Meta.NormNum.isNat_natCastand 102 more130 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
lemma aliceWeightBase_bound {k n : ℕ} (hn : n = ⌈(1.99 : ℝ) ^ k⌉₊) (h1000 : 1000 * ((1.99 : ℝ) ^ k + 2) < weightBase ^ (k + 1)) : 1000 * ((n + 1 : ℕ) : ℝ) < weightBase ^ (k + 1) := by …Mentions: Imo2012P3.weightBase
- lemma
Imo2012P3.not_bobWinsUnder the weight bound, B has no winning strategy: A's counterplay is consistent with every candidate at all times, so B can never stop with a correct guess of size at mostnline 378 sourceSource documentation
Under the weight bound, B has no winning strategy: A's counterplay is consistent with every candidate at all times, so B can never stop with a correct guess of size at most
n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,Real,HMul.hMul,OfNat.ofNat,HAdd.hAdd,HPow.hPow, Imo2012P3.weightBase,LE.le,Not, Imo2012P3.BobWinsProof uses: Imo2012P3.Strategy, Imo2012P3.GuaranteesWin,
False,Fin,Bool, Imo2012P3.ConsistentUpTo,Exists,Finset,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.hist,Imo2012P3.Move.guess,And,Membership.mem,Finset.card, Imo2012P3.aliceAns, Imo2012P3.alice_consistent,Fin.mk,Finset.univand 8 more41 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
lemma not_bobWins {k n : ℕ} (hWt : 1000 * ((n + 1 : ℕ) : ℝ) < weightBase ^ (k + 1)) (hN : 1 ≤ n + 1) : ¬ BobWins k n (n + 1) := by …Mentions: Imo2012P3.weightBase, Imo2012P3.BobWins
- lemma
Imo2012P3.one_le_pow_199Helper:1 ≤ (1.99) ^ kline 394 sourceSource documentation
Helper:
1 ≤ (1.99) ^ k.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,Real,OfNat.ofNat,HPow.hPow,OfScientific.ofScientific,Bool.trueProof uses:
Nat.recAux,Mathlib.Meta.NormNum.isRat_le_true,Int.ofNat,Mathlib.Meta.NormNum.IsNNRat.to_isRat,Mathlib.Meta.NormNum.IsNat.to_isNNRat,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_one,Mathlib.Meta.NormNum.isNNRat_pow,Eq.refl,Mathlib.Meta.NormNum.isNNRat_ofScientific_of_true,Mathlib.Meta.NormNum.isNNRat_nnratCast,NNRat.divNat,Mathlib.Meta.NormNum.isNNRat_divNat,Mathlib.Meta.NormNum.IsNat.raw_refl,Mathlib.Meta.NormNum.isNat_pow,Mathlib.Meta.NormNum.IsNatPowT.run,Mathlib.Meta.NormNum.IsNatPowT.bit0,Mathlib.Meta.NormNum.isNNRat_div,NNRat,Mathlib.Meta.NormNum.isNNRat_muland 14 more69 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma one_le_pow_199 (k : ℕ) : (1 : ℝ) ≤ 1.99 ^ k := by …
- lemma
Imo2012P3.exists_eventually_largeFor all sufficiently largek,1000 * ((1.99) ^ k + 2) < (1.998) ^ (k + 1)line 402 sourceSource documentation
For all sufficiently large
k,1000 * ((1.99) ^ k + 2) < (1.998) ^ (k + 1).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Exists,Nat,GE.ge,LT.lt,Real,HMul.hMul,OfNat.ofNat,HAdd.hAdd,HPow.hPow,OfScientific.ofScientific,Bool.true, Imo2012P3.weightBaseProof uses:
HDiv.hDiv,Mathlib.Meta.NormNum.isNNRat_lt_true,Mathlib.Meta.NormNum.IsNat.to_isNNRat,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_one,Mathlib.Meta.NormNum.isNNRat_div,Mathlib.Meta.NormNum.isNNRat_mul,Inv.inv,Eq.refl,Mathlib.Meta.NormNum.isNNRat_ofScientific_of_true,Mathlib.Meta.NormNum.isNNRat_nnratCast,NNRat.divNat,Mathlib.Meta.NormNum.isNNRat_divNat,Mathlib.Meta.NormNum.IsNat.raw_refl,Mathlib.Meta.NormNum.isNat_pow,Mathlib.Meta.NormNum.IsNatPowT.run,Mathlib.Meta.NormNum.IsNatPowT.bit1,NNRat,Mathlib.Meta.NormNum.isNat_natCast,Mathlib.Meta.NormNum.isNNRat_inv_posand 144 more187 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
lemma exists_eventually_large : ∃ k₀ : ℕ, ∀ k ≥ k₀, 1000 * ((1.99 : ℝ) ^ k + 2) < weightBase ^ (k + 1) := by …Mentions: Imo2012P3.weightBase
- inductive
Imo2012P3.BobPhaseDocumented declaration: BobPhase line 452 sourceSource documentation
Bob's phase within the current elimination round: either probing with the singleton question (
jconsecutive "no" answers so far), or asking the bit questions after a "yes" (the probe phase tookjanswers, andbsare the bit answers so far).no axioms what this means
inductive BobPhase where …
- structure
Imo2012P3.BobStateBob's state: his current candidate pool together with the progress in the current elimination round line 458 sourceSource documentation
Bob's state: his current candidate pool together with the progress in the current elimination round.
standard axioms: Quot.sound, propext what this means
Statement uses:
Natstructure BobState (N : ℕ) where …
- lemma
Imo2012P3.bobState_ext_iffline 462 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.BobState,Finset,Fin, Imo2012P3.BobPhase,Iff,Eq,Imo2012P3.BobState.mk,And,Imo2012P3.BobState.pool,Imo2012P3.BobState.phaseProof uses:
Iff.intro,Eq.mpr,id,congrArg,And.intro,rfl,of_eq_true,Eq.trans,True,congrFun',congr,eq_self,Eq.symm,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
- def
Imo2012P3.BobPhase.answersThe number of answers given so far in the current round line 473 sourceSource documentation
The number of answers given so far in the current round.
no axioms what this means
Statement uses: Imo2012P3.BobPhase,
NatProof uses:
Imo2012P3.BobPhase.answers.match_1,List,Bool,HAdd.hAdd,List.length2 instances, coercions and auxiliary constants left out.
def BobPhase.answers : BobPhase → ℕ | probe j => j | bits j bs => j + bs.length /-- An embedding of the `2 ^ k` bit patterns into the pool. -/
Mentions: Imo2012P3.BobPhase
- def
Imo2012P3.bobEmbeddingAn embedding of the2 ^ kbit patterns into the pool line 478 sourceSource documentation
An embedding of the
2 ^ kbit patterns into the pool.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HPow.hPow,OfNat.ofNat,Finset.card,Function.Embedding,Bool,Subtype,Membership.memProof uses:
Eq,Fintype.card,Function.Embedding.trans,Equiv.toEmbedding,Equiv.trans,Fintype.equivFin,finCongr,Fin.castLEEmb,RelEmbedding.toEmbedding,OrderIso.toOrderEmbedding,Finset.orderIsoOfFin31 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
noncomputable def bobEmbedding (P : Finset (Fin N)) (h : 2 ^ k ≤ P.card) : (Fin k → Bool) ↪ P := … - lemma
Imo2012P3.bobEmbedding_memline 485 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HPow.hPow,OfNat.ofNat,Finset.card,Bool,Membership.mem,Function.Embedding,Subtype, Imo2012P3.bobEmbeddingProof uses:
Subtype.property21 instances, coercions and auxiliary constants left out.
- lemma
Imo2012P3.exists_specialThere is an element of the pool outside the image of the bit patterns line 490 sourceSource documentation
There is an element of the pool outside the image of the bit patterns.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,Exists,And,Membership.mem,Bool,Ne,Function.Embedding,Subtype, Imo2012P3.bobEmbeddingProof uses:
LT.lt,Finset.image,Finset.univ,Eq.mpr,id,Eq,congrArg,Finset.card_image_of_injective,Function.Embedding.injective,Subtype.coe_injective,Fintype.card,Finset.card_univ,Fintype.card_fun,Fintype.card_bool,Fintype.card_fin,Decidable.byContradiction,Not,Eq.mp,Eq.trans,binderNameHintand 12 more47 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
lemma exists_special (P : Finset (Fin N)) (h : 2 ^ k + 1 ≤ P.card) : ∃ s ∈ P, ∀ p : Fin k → Bool, (bobEmbedding P (by lia) p : Fin N) ≠ s := by …Mentions: P, h, Imo2012P3.bobEmbedding
- def
Imo2012P3.bobSpecialThe distinguished candidate asked about in the probe phase: an element of the pool outside the image of the bit patterns line 511 sourceSource documentation
The distinguished candidate asked about in the probe phase: an element of the pool outside the image of the bit patterns.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.cardProof uses:
Exists.choose,And,Membership.mem,Bool,Ne,Function.Embedding,Subtype, Imo2012P3.bobEmbedding, Imo2012P3.exists_special22 instances, coercions and auxiliary constants left out.
noncomputable def bobSpecial (P : Finset (Fin N)) (h : 2 ^ k + 1 ≤ P.card) : Fin N := …
- lemma
Imo2012P3.bobSpecial_memline 514 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,Membership.mem, Imo2012P3.bobSpecialProof uses:
And.left,Exists.choose,And,Bool,Ne,Function.Embedding,Subtype, Imo2012P3.bobEmbedding, Imo2012P3.exists_special,Exists.choose_spec24 instances, coercions and auxiliary constants left out.
- lemma
Imo2012P3.bobSpecial_ne_embeddingline 517 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,Bool,Ne,Membership.mem,Function.Embedding,Subtype, Imo2012P3.bobEmbedding, Imo2012P3.bobSpecialProof uses:
And.right,Exists.choose,And, Imo2012P3.exists_special,Exists.choose_spec28 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobSpecial_congrline 522 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,Eq,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card, Imo2012P3.bobSpecial,Eq.recProof uses:
Eq.refl16 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobEmbedding_congrline 527 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,Eq,LE.le,HPow.hPow,OfNat.ofNat,Finset.card,Bool,Membership.mem,Function.Embedding,Subtype, Imo2012P3.bobEmbedding,Eq.recProof uses:
Eq.refl22 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- def
Imo2012P3.bitQuestionThe set of candidates whosei-th bit is1line 534 sourceSource documentation
The set of candidates whose
i-th bit is1.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HPow.hPow,OfNat.ofNat,Finset.cardProof uses:
Finset.image,Bool,Membership.mem,Function.Embedding,Subtype, Imo2012P3.bobEmbedding,Finset.filter,Eq,Bool.true,Finset.univ22 instances, coercions and auxiliary constants left out.
noncomputable def bitQuestion (P : Finset (Fin N)) (h : 2 ^ k ≤ P.card) (i : Fin k) : Finset (Fin N) := … - lemma
Imo2012P3.mem_bitQuestionline 539 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HPow.hPow,OfNat.ofNat,Finset.card,Bool,Iff,Membership.mem, Imo2012P3.bitQuestion,Function.Embedding,Subtype, Imo2012P3.bobEmbedding,Eq,Bool.trueProof uses:
Iff.intro,And,Finset.filter,Finset.univ,Exists,Eq.mp,Finset.image,congrArg,propext,Finset.mem_image,Imo2012P3.bitQuestion.eq_1,Function.Embedding.injective,Subtype.coe_injective,And.right,Finset.mem_filter,Eq.mpr,id,Exists.intro,And.intro,Iff.mprand 2 more29 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
- def
Imo2012P3.bobQuestionBob's question in a given phase: the singleton{special}when probing, the|bs|-th bit question in the bit phase line 556 sourceSource documentation
Bob's question in a given phase: the singleton
{special}when probing, the|bs|-th bit question in the bit phase.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card, Imo2012P3.BobPhaseProof uses:
Imo2012P3.BobPhase.answers.match_1,Singleton.singleton, Imo2012P3.bobSpecial,List,Bool,dite,LT.lt,List.length, Imo2012P3.bitQuestion,Fin.mk,Not,EmptyCollection.emptyCollection21 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
noncomputable def bobQuestion (P : Finset (Fin N)) (h : 2 ^ k + 1 ≤ P.card) : BobPhase → Finset (Fin N) | BobPhase.probe _ => {bobSpecial P h} | BobPhase.bits _ bs => if hb : bs.length < k then bitQuestion P (by lia) ⟨bs.length, hb⟩ else ∅Mentions: P, h, Imo2012P3.BobPhase, Imo2012P3.bobSpecial, Imo2012P3.bitQuestion
- lemma
Imo2012P3.bobQuestion_probeline 562 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,Eq, Imo2012P3.bobQuestion,Imo2012P3.BobPhase.probe,Singleton.singleton, Imo2012P3.bobSpecialProof uses:
rfl17 instances, coercions and auxiliary constants left out.
- lemma
Imo2012P3.bobQuestion_bitsline 565 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,List,Bool,LT.lt,List.length,Eq, Imo2012P3.bobQuestion,Imo2012P3.BobPhase.bits, Imo2012P3.bitQuestion,Fin.mkProof uses:
id,dite_eq_left,Not,EmptyCollection.emptyCollection22 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- def
Imo2012P3.bobStepPhaseOne round-step of Bob's state machine, in the case2 ^ k < P.cardline 572 sourceSource documentation
One round-step of Bob's state machine, in the case
2 ^ k < P.card.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card, Imo2012P3.BobPhase,Bool, Imo2012P3.BobStateProof uses:
Imo2012P3.BobPhase.answers.match_1,Imo2012P3.bobStepPhase.match_1,Unit,Imo2012P3.BobState.mk,Imo2012P3.BobPhase.bits,List.nil,ite,Eq,Finset.erase, Imo2012P3.bobSpecial,Imo2012P3.BobPhase.probe,List,HAppend.hAppend,List.cons,dite,List.length,Membership.mem,Function.Embedding,Subtype, Imo2012P3.bobEmbedding and 4 more28 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
noncomputable def bobStepPhase (P : Finset (Fin N)) (h : 2 ^ k + 1 ≤ P.card) (ph : BobPhase) (a : Bool) : BobState N := …Mentions: P, h, Imo2012P3.BobPhase, Imo2012P3.BobState
- def
Imo2012P3.bobStepOne step of Bob's state machine line 590 sourceSource documentation
One step of Bob's state machine. If the pool is already small enough, the state is frozen.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.BobState,BoolProof uses:
dite,LE.le,Finset.card,Fin,Imo2012P3.BobState.pool,HPow.hPow,OfNat.ofNat,Not, Imo2012P3.bobStepPhase,Imo2012P3.BobState.phase8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
noncomputable def bobStep (k : ℕ) (s : BobState N) (a : Bool) : BobState N := …
Mentions: Imo2012P3.BobState
- def
Imo2012P3.bobStrategyBob's winning strategy for part (a) line 595 sourceSource documentation
Bob's winning strategy for part (a).
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.StrategyProof uses:
Imo2012P3.Strategy.mk,List,Bool, Imo2012P3.BobState,List.foldl, Imo2012P3.bobStep,Imo2012P3.BobState.mk,Finset.univ,Fin,Imo2012P3.BobPhase.probe,OfNat.ofNat,dite, Imo2012P3.Move,LE.le,Finset.card,Imo2012P3.BobState.pool,HPow.hPow,Imo2012P3.Move.guess,Not,Imo2012P3.Move.askand 2 more9 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
noncomputable def bobStrategy (k : ℕ) : Strategy N where …
Mentions: Imo2012P3.Strategy
- def
Imo2012P3.bobStateOfBob's state after processing the firsttanswers line 602 sourceSource documentation
Bob's state after processing the first
tanswers.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool, Imo2012P3.BobStateProof uses:
List.foldl, Imo2012P3.bobStep,Imo2012P3.BobState.mk,Finset.univ,Fin,Imo2012P3.BobPhase.probe,OfNat.ofNat, Imo2012P3.hist2 instances, coercions and auxiliary constants left out.
def bobStateOf (N k : ℕ) (ans : ℕ → Bool) (t : ℕ) : BobState N := …
Mentions: Imo2012P3.BobState
- lemma
Imo2012P3.bobStateOf_zeroline 605 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Eq, Imo2012P3.BobState, Imo2012P3.bobStateOf,OfNat.ofNat,Imo2012P3.BobState.mk,Finset.univ,Fin,Imo2012P3.BobPhase.probeProof uses:
rfl3 instances, coercions and auxiliary constants left out.
- lemma
Imo2012P3.bobStateOf_succline 608 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Eq, Imo2012P3.BobState, Imo2012P3.bobStateOf,HAdd.hAdd,OfNat.ofNat, Imo2012P3.bobStepProof uses:
id,Eq.mpr,List.foldl,Imo2012P3.BobState.mk,Finset.univ,Fin,Imo2012P3.BobPhase.probe,HAppend.hAppend,List, Imo2012P3.hist,List.cons,List.nil,congrArg,List.foldl_append,Eq.refl9 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStep_frozenline 614 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.BobState,LE.le,Finset.card,Fin,Imo2012P3.BobState.pool,HPow.hPow,OfNat.ofNat,Bool,Eq, Imo2012P3.bobStepProof uses:
id,dite_eq_left,Not, Imo2012P3.bobStepPhase,Imo2012P3.BobState.phase14 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStep_activeline 619 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2012P3.BobState,Not,LE.le,Finset.card,Fin,Imo2012P3.BobState.pool,HPow.hPow,OfNat.ofNat,Bool,Eq, Imo2012P3.bobStep, Imo2012P3.bobStepPhase,Imo2012P3.BobState.phaseProof uses:
id,dite_eq_right16 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStepPhase_probe_trueline 624 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,Eq, Imo2012P3.BobState, Imo2012P3.bobStepPhase,Imo2012P3.BobPhase.probe,Bool.true,Imo2012P3.BobState.mk,Imo2012P3.BobPhase.bits,List.nil,BoolProof uses:
rfl16 instances, coercions and auxiliary constants left out.
- lemma
Imo2012P3.bobStepPhase_probe_false_eqline 627 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,Eq, Imo2012P3.BobState, Imo2012P3.bobStepPhase,Imo2012P3.BobPhase.probe,Bool.false,Imo2012P3.BobState.mk,Finset.erase, Imo2012P3.bobSpecialProof uses:
id,Eq.mpr,ite,congrArg,ite_eq_left,Eq.refl19 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStepPhase_probe_false_ltline 635 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,Ne,Eq, Imo2012P3.BobState, Imo2012P3.bobStepPhase,Imo2012P3.BobPhase.probe,Bool.false,Imo2012P3.BobState.mkProof uses:
id,Eq.mpr,ite,Finset.erase, Imo2012P3.bobSpecial,congrArg,ite_eq_right,Eq.refl18 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStepPhase_bits_completeline 642 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,List,Bool,Eq,List.length,HAppend.hAppend,List.cons,List.nil, Imo2012P3.BobState, Imo2012P3.bobStepPhase,Imo2012P3.BobPhase.bits,Imo2012P3.BobState.mk,Finset.eraseand 10 moreProof uses:
id,Imo2012P3.BobPhase.answers.match_1, Imo2012P3.BobPhase,Imo2012P3.bobStepPhase.match_1,Unit,ite, Imo2012P3.bobSpecial,dite,Not,Eq.mpr,congrArg,dite_eq_left,Eq.refl42 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStepPhase_bits_contline 651 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,LE.le,HAdd.hAdd,HPow.hPow,OfNat.ofNat,Finset.card,List,Bool,Ne,List.length,HAppend.hAppend,List.cons,List.nil,Eq, Imo2012P3.BobState, Imo2012P3.bobStepPhase,Imo2012P3.BobPhase.bits,Imo2012P3.BobState.mkProof uses:
id,Imo2012P3.BobPhase.answers.match_1, Imo2012P3.BobPhase,Imo2012P3.bobStepPhase.match_1,Unit,ite,Finset.erase, Imo2012P3.bobSpecial,Imo2012P3.BobPhase.probe,dite,Membership.mem,Function.Embedding,Subtype, Imo2012P3.bobEmbedding,Bool.not,List.get,Fin.mk,Not,Eq.mpr,congrArgand 2 more30 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStrategy_move_guessline 658 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,LE.le,Finset.card,Fin,Imo2012P3.BobState.pool, Imo2012P3.bobStateOf,HPow.hPow,OfNat.ofNat,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.bobStrategy, Imo2012P3.hist,Imo2012P3.Move.guessProof uses:
List.foldl, Imo2012P3.BobState, Imo2012P3.bobStep,Imo2012P3.BobState.mk,Finset.univ,Imo2012P3.BobPhase.probe,id,dite,Not,Imo2012P3.Move.ask, Imo2012P3.bobQuestion,Imo2012P3.BobState.phase,dite_eq_left15 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStrategy_move_askline 669 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Not,LE.le,Finset.card,Fin,Imo2012P3.BobState.pool, Imo2012P3.bobStateOf,HPow.hPow,OfNat.ofNat,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.bobStrategy, Imo2012P3.hist,Imo2012P3.Move.ask, Imo2012P3.bobQuestion,Imo2012P3.BobState.phaseProof uses:
List.foldl, Imo2012P3.BobState, Imo2012P3.bobStep,Imo2012P3.BobState.mk,Finset.univ,Imo2012P3.BobPhase.probe,id,dite,Imo2012P3.Move.guess,dite_eq_right17 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStrategy_move_ask_probeline 682 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Eq, Imo2012P3.BobPhase,Imo2012P3.BobState.phase, Imo2012P3.bobStateOf,Imo2012P3.BobPhase.probe,Not,LE.le,Finset.card,Fin,Imo2012P3.BobState.pool,HPow.hPow,OfNat.ofNat,HAdd.hAdd, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.bobStrategy, Imo2012P3.hist,Imo2012P3.Move.askand 3 moreProof uses:
Eq.mpr, Imo2012P3.bobQuestion,id,congrArg, Imo2012P3.bobStrategy_move_ask, Imo2012P3.bobQuestion_probe,Eq.refl19 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bobStrategy_move_ask_bitsline 690 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,List,Eq, Imo2012P3.BobPhase,Imo2012P3.BobState.phase, Imo2012P3.bobStateOf,Imo2012P3.BobPhase.bits,Not,LE.le,Finset.card,Fin,Imo2012P3.BobState.pool,HPow.hPow,OfNat.ofNat,List.length,LT.lt, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.bobStrategy and 4 moreProof uses:
Eq.mpr,id,congrArg, Imo2012P3.bobQuestion, Imo2012P3.bobStrategy_move_ask,Finset, Imo2012P3.bobQuestion_bits,Fin.ext,Eq.refl16 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bob_answers_leline 702 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,LE.le, Imo2012P3.BobPhase.answers,Imo2012P3.BobState.phase, Imo2012P3.bobStateOfProof uses:
Nat.recAux,le_refl,OfNat.ofNat,Eq.mpr,HAdd.hAdd, Imo2012P3.bobStep,id,Eq,congrArg, Imo2012P3.BobState, Imo2012P3.bobStateOf_succ,dite,Finset.card,Fin,Imo2012P3.BobState.pool,HPow.hPow, Imo2012P3.bobStep_frozen,le_trans,Nat.le_succ,Notand 37 more32 instances, coercions and auxiliary constants left out.
Tactic trace: 36 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bob_phase_invline 740 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Bool,Imo2012P3.BobPhase.answers.match_1, Imo2012P3.BobPhase,Imo2012P3.BobState.phase, Imo2012P3.bobStateOf,List,And,HAdd.hAdd,LT.lt,List.lengthProof uses:
Nat.recAux,Nat.zero_le,Eq.mpr, Imo2012P3.bobStep,id,Eq,congrArg, Imo2012P3.BobState, Imo2012P3.bobStateOf_succ,dite,Finset.card,Fin,Imo2012P3.BobState.pool,HPow.hPow, Imo2012P3.bobStep_frozen,Not, Imo2012P3.bobStepPhase, Imo2012P3.bobStep_active,Imo2012P3.BobPhase.probe,Eq.mpand 29 more39 instances, coercions and auxiliary constants left out.
Tactic trace: 43 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2012P3.bob_backward_probeBackward step, probe phase withj ≥ 1line 783 sourceSource documentation
Backward step, probe phase with
j ≥ 1.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Finset,Fin,Eq, Imo2012P3.BobState, Imo2012P3.bobStateOf,HAdd.hAdd,OfNat.ofNat,Imo2012P3.BobState.mk,Imo2012P3.BobPhase.probe,Not,LE.le,Finset.card,HPow.hPow,And,HSub.hSub,Bool.falseProof uses: Imo2012P3.bobStep,
Eq.mpr,id,congrArg,Eq.symm, Imo2012P3.bobStateOf_succ,dite,Imo2012P3.BobState.pool,absurd,Eq.mp, Imo2012P3.bobStep_frozen, Imo2012P3.BobPhase,Imo2012P3.BobState.phase,Finset.erase, Imo2012P3.bobSpecial,HEq, Imo2012P3.bobStepPhase, Imo2012P3.bobStepPhase_probe_false_eq, Imo2012P3.bobStep_active,Eq.refland 29 more43 instances, coercions and auxiliary constants left out.
Tactic trace: 37 steps
Open to load the checked before-and-after goal states.
lemma bob_backward_probe {ans : ℕ → Bool} {t : ℕ} {P : Finset (Fin N)} {j : ℕ} (h : bobStateOf N k ans (t + 1) = ⟨P, BobPhase.probe j⟩) (hcard : ¬ P.card ≤ 2 ^ k) (hj : 1 ≤ j) : bobStateOf N k ans t = ⟨P, BobPhase.probe (j - 1)⟩ ∧ ans t = false := by …Mentions: P, h, Imo2012P3.bobStateOf
- lemma
Imo2012P3.bob_backward_bits_nilBackward step, bit phase with no bit answers yet line 824 sourceSource documentation
Backward step, bit phase with no bit answers yet.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Finset,Fin,Eq, Imo2012P3.BobState, Imo2012P3.bobStateOf,HAdd.hAdd,OfNat.ofNat,Imo2012P3.BobState.mk,Imo2012P3.BobPhase.bits,List.nil,Not,LE.le,Finset.card,HPow.hPow,And,Imo2012P3.BobPhase.probe,HSub.hSub,Bool.trueProof uses: Imo2012P3.bobStep,
Eq.mpr,id,congrArg,Eq.symm, Imo2012P3.bobStateOf_succ,dite,Imo2012P3.BobState.pool,absurd,Eq.mp, Imo2012P3.bobStep_frozen, Imo2012P3.BobPhase,Imo2012P3.BobState.phase,Bool.false,Finset.erase, Imo2012P3.bobSpecial,HEq, Imo2012P3.bobStepPhase, Imo2012P3.bobStepPhase_probe_false_eq, Imo2012P3.bobStep_active and 36 more51 instances, coercions and auxiliary constants left out.
Tactic trace: 38 steps
Open to load the checked before-and-after goal states.
lemma bob_backward_bits_nil {ans : ℕ → Bool} {t : ℕ} {P : Finset (Fin N)} {j : ℕ} (h : bobStateOf N k ans (t + 1) = ⟨P, BobPhase.bits j []⟩) (hcard : ¬ P.card ≤ 2 ^ k) : bobStateOf N k ans t = ⟨P, BobPhase.probe (j - 1)⟩ ∧ ans t = true := by …Mentions: P, h, Imo2012P3.bobStateOf
- lemma
Imo2012P3.bob_backward_bits_snocBackward step, bit phase with at least one bit answer line 866 sourceSource documentation
Backward step, bit phase with at least one bit answer.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Finset,Fin,List,Eq, Imo2012P3.BobState, Imo2012P3.bobStateOf,HAdd.hAdd,OfNat.ofNat,Imo2012P3.BobState.mk,Imo2012P3.BobPhase.bits,HAppend.hAppend,List.cons,List.nil,Not,LE.le,Finset.card,HPow.hPow,AndProof uses: Imo2012P3.bobStep,
Eq.mpr,id,congrArg,Eq.symm, Imo2012P3.bobStateOf_succ,dite,Imo2012P3.BobState.pool,absurd,Eq.mp, Imo2012P3.bobStep_frozen, Imo2012P3.BobPhase,Imo2012P3.BobState.phase,Imo2012P3.BobPhase.probe,Bool.false,Finset.erase, Imo2012P3.bobSpecial,HEq, Imo2012P3.bobStepPhase, Imo2012P3.bobStepPhase_probe_false_eq and 39 more51 instances, coercions and auxiliary constants left out.
Tactic trace: 47 steps
Open to load the checked before-and-after goal states.
lemma bob_backward_bits_snoc {ans : ℕ → Bool} {t : ℕ} {P : Finset (Fin N)} {j : ℕ} {bs : List Bool} {b : Bool} (h : bobStateOf N k ans (t + 1) = ⟨P, BobPhase.bits j (bs ++ [b])⟩) (hcard : ¬ P.card ≤ 2 ^ k) : bobStateOf N k ans t = ⟨P, BobPhase.bits j bs⟩ ∧ ans t = b := by …Mentions: P, h, Imo2012P3.bobStateOf
- lemma
Imo2012P3.bob_backward_probe_chainIterated backward step through a probe phase line 916 sourceSource documentation
Iterated backward step through a probe phase.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Finset,Fin,Eq, Imo2012P3.BobState, Imo2012P3.bobStateOf,Imo2012P3.BobState.mk,Imo2012P3.BobPhase.probe,Not,LE.le,Finset.card,HPow.hPow,OfNat.ofNat,And,HSub.hSub,Bool.falseProof uses:
Nat.recAux,And.intro,Eq.mpr,id,congr,congrArg,tsub_zero, Imo2012P3.BobPhase,absurd,HAdd.hAdd, Imo2012P3.bob_backward_probe,Eq.symm,And.left,And.right26 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
lemma bob_backward_probe_chain {ans : ℕ → Bool} {t : ℕ} {P : Finset (Fin N)} {j i : ℕ} (h : bobStateOf N k ans t = ⟨P, BobPhase.probe j⟩) (hcard : ¬ P.card ≤ 2 ^ k) (hi : i ≤ j) (ht : j ≤ t) : bobStateOf N k ans (t - i) = ⟨P, BobPhase.probe (j - i)⟩ ∧ (1 ≤ i → ans (t - i) = false) := by …Mentions: P, h, Imo2012P3.bobStateOf
- lemma
Imo2012P3.bob_backward_bits_chainIterated backward step through a bit phase line 932 sourceSource documentation
Iterated backward step through a bit phase.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Finset,Fin,List,Eq, Imo2012P3.BobState, Imo2012P3.bobStateOf,Imo2012P3.BobState.mk,Imo2012P3.BobPhase.bits,Not,LE.le,Finset.card,HPow.hPow,OfNat.ofNat,List.length,HAdd.hAdd,And,HSub.hSub,List.takeand 2 moreProof uses:
Nat.recAux,And.intro,Eq.mpr,id,congr,congrArg,tsub_zero, Imo2012P3.BobPhase,Eq.trans,congrFun',List.take_length,absurd,rfl,HAppend.hAppend,List.cons,List.nil,Option.toList,GetElem?.getElem?,List.take_add_one,Option.someand 7 more38 instances, coercions and auxiliary constants left out.
Tactic trace: 22 steps
Open to load the checked before-and-after goal states.
lemma bob_backward_bits_chain {ans : ℕ → Bool} {t : ℕ} {P : Finset (Fin N)} {j : ℕ} {bs : List Bool} {i : ℕ} (h : bobStateOf N k ans t = ⟨P, BobPhase.bits j bs⟩) (hcard : ¬ P.card ≤ 2 ^ k) (hi : i ≤ bs.length) (ht : bs.length + 1 ≤ t + 1) : bobStateOf N k ans (t - i) = ⟨P, BobPhase.bits j (bs.take (bs.length - i))⟩ ∧ ((hi1 : 1 ≤ i) → ans (t - i) = bs[bs.length - i]'(by lia)) := by …Mentions: P, h, Imo2012P3.bobStateOf
- lemma
Imo2012P3.bob_measureThe termination measure: while the pool has more than2 ^ kelements,tis bounded by(2k+1) * (eliminated so far) + (answers in current round)line 958 sourceSource documentation
The termination measure: while the pool has more than
2 ^ kelements,tis bounded by(2k+1) * (eliminated so far) + (answers in current round).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Bool,Not,Finset.card,Fin,Imo2012P3.BobState.pool, Imo2012P3.bobStateOf,HPow.hPow,HAdd.hAdd,HMul.hMul,HSub.hSub, Imo2012P3.BobPhase.answers,Imo2012P3.BobState.phaseProof uses:
Nat.recAux,of_eq_true,Eq.trans,Imo2012P3.BobPhase.probe,True,congrArg,congrFun',Fintype.card_fin,tsub_self,MulZeroClass.mul_zero,zero_add,Eq.mpr, Imo2012P3.bobStep,id,Eq, Imo2012P3.BobState, Imo2012P3.bobStateOf_succ,dite,absurd,Eq.mpand 46 more73 instances, coercions and auxiliary constants left out.
Tactic trace: 68 steps
Open to load the checked before-and-after goal states.
lemma bob_measure (hk : 1 ≤ k) (ans : ℕ → Bool) (t : ℕ) (hcard : ¬ (bobStateOf N k ans t).pool.card ≤ 2 ^ k) : t ≤ (2 * k + 1) * (N - (bobStateOf N k ans t).pool.card) + (bobStateOf N k ans t).phase.answers := by …Mentions: Imo2012P3.bobStateOf
- lemma
Imo2012P3.bob_terminatesB's strategy always stops: the pool shrinks by one every2k + 1answers line 1038 sourceSource documentation
B's strategy always stops: the pool shrinks by one every
2k + 1answers.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Bool,Exists,Finset,Fin,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.bobStrategy, Imo2012P3.hist,Imo2012P3.Move.guessProof uses:
Classical.byContradiction,Not,Finset.card,Imo2012P3.BobState.pool, Imo2012P3.bobStateOf,HPow.hPow,Eq.mp,Ne,Eq.trans,binderNameHint,forall_congr, Imo2012P3.bobStrategy_move_guess,HAdd.hAdd,HMul.hMul,HSub.hSub, Imo2012P3.BobPhase.answers,Imo2012P3.BobState.phase, Imo2012P3.bob_measure,card_finset_fin_le,Imo2012P3.BobPhase.answers.match_1and 14 more30 instances, coercions and auxiliary constants left out.
Tactic trace: 29 steps
Open to load the checked before-and-after goal states.
lemma bob_terminates (hk : 1 ≤ k) (ans : ℕ → Bool) : ∃ T X, (bobStrategy (N := N) k).move (hist ans T) = Move.guess X := by …Mentions: Imo2012P3.bobStrategy, Imo2012P3.hist
- lemma
Imo2012P3.bob_mem_poolThe pool invariant: if the answers are consistent withxup to timet, thenxis still in Bob's pool line 1074 sourceSource documentation
The pool invariant: if the answers are consistent with
xup to timet, thenxis still in Bob's pool.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,Bool, Imo2012P3.ConsistentUpTo, Imo2012P3.bobStrategy,Membership.mem,Finset,Imo2012P3.BobState.pool, Imo2012P3.bobStateOfProof uses:
Nat.recAux,Finset.mem_univ,HAdd.hAdd,Eq.mpr, Imo2012P3.bobStep,id,Eq,congrArg, Imo2012P3.BobState, Imo2012P3.bobStateOf_succ,dite,Finset.card,HPow.hPow, Imo2012P3.bobStep_frozen,Not, Imo2012P3.bobStepPhase,Imo2012P3.BobState.phase, Imo2012P3.bobStep_active, Imo2012P3.BobPhase,Imo2012P3.BobPhase.probeand 91 more71 instances, coercions and auxiliary constants left out.
Tactic trace: 188 steps
Open to load the checked before-and-after goal states.
lemma bob_mem_pool (hk : 1 ≤ k) {x : Fin N} {ans : ℕ → Bool} {t : ℕ} (hcons : ConsistentUpTo k (bobStrategy k) x ans t) : x ∈ (bobStateOf N k ans t).pool := by …Mentions: Imo2012P3.ConsistentUpTo, Imo2012P3.bobStrategy, Imo2012P3.bobStateOf, pool
- lemma
Imo2012P3.bob_guaranteesWinB's strategy guarantees a win whenn ≥ 2 ^ kline 1257 sourceSource documentation
B's strategy guarantees a win when
n ≥ 2 ^ k.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,HPow.hPow, Imo2012P3.GuaranteesWin, Imo2012P3.bobStrategyProof uses:
And.intro,Fin,Bool, Imo2012P3.ConsistentUpTo,Exists,Finset,Eq, Imo2012P3.Move,Imo2012P3.Strategy.move, Imo2012P3.hist,Imo2012P3.Move.guess,And,Membership.mem,Finset.card, Imo2012P3.bob_terminates,dite,Imo2012P3.BobState.pool, Imo2012P3.bobStateOf,Imo2012P3.Move.guess.inj,Eq.mpand 18 more18 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
lemma bob_guaranteesWin (n : ℕ) (hk : 1 ≤ k) (hn : 2 ^ k ≤ n) : GuaranteesWin k n (bobStrategy (N := N) k) := by …Mentions: Imo2012P3.GuaranteesWin, Imo2012P3.bobStrategy
- problem
Imo2012P3.imo2012_p3_part_aline 1274 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,HPow.hPow, Imo2012P3.BobWinsProof uses:
Exists.intro, Imo2012P3.Strategy, Imo2012P3.GuaranteesWin, Imo2012P3.bobStrategy, Imo2012P3.bob_guaranteesWin12 instances, coercions and auxiliary constants left out.
- problem
Imo2012P3.imo2012_p3_part_bline 1278 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Exists,Nat,GE.ge,And,LE.le,Real,HPow.hPow,OfScientific.ofScientific,Bool.true,Not, Imo2012P3.BobWins,HAdd.hAdd,OfNat.ofNatProof uses:
LT.lt,HMul.hMul, Imo2012P3.weightBase, Imo2012P3.exists_eventually_large,Exists.intro,Nat.ceil,And.intro,Nat.le_ceil, Imo2012P3.not_bobWins, Imo2012P3.aliceWeightBase_bound,rfl41 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.