Compfiles/Usa2016P6.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
67 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2016, Problem 6
Integers n and k are given, with n ≥ k ≥ 2. You play the following game against an evil wizard. The wizard has 2n cards; for each i = 1, ..., n, there are two cards labeled i. Initially, the wizard places all cards face down in a row, in unknown order. You may repeatedly make moves of the following form: you point to any k of the cards. The wizard then turns those cards face up. If any two of the cards match, the game is over and you win. Otherwise, you must look away, while the wizard arbitrarily permutes the k chosen cards and then turns them back face-down. Then, it is your turn again.
We say this game is winnable if there exist some positive integer m and some strategy that is guaranteed to win in at most m moves, no matter how the wizard responds. For which values of n and k is the game winnable?
Imports (5)
Imported by 1 file
- abbrev
Usa2016P6.ArrangementAn arrangement of the2ncards: the label shown at each position line 43 sourceSource documentation
An arrangement of the
2ncards: the label shown at each position.no axioms what this means
Statement uses:
NatProof uses:
Fin,HMul.hMul,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
abbrev Arrangement (n : ℕ) := Fin (2 * n) → Fin n
- def
Usa2016P6.Arrangement.ValidAn arrangement is valid when each of thenlabels appears exactly twice line 46 sourceSource documentation
An arrangement is valid when each of the
nlabels appears exactly twice.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.ArrangementProof uses:
Fin,Eq,Finset.card,HMul.hMul,OfNat.ofNat,Finset.filter,Finset.univ5 instances, coercions and auxiliary constants left out.
def Arrangement.Valid {n : ℕ} (a : Arrangement n) : Prop := …Mentions: Usa2016P6.Arrangement
- abbrev
Usa2016P6.ObservationAn observation made by the player: the set of queried positions, together with the labels that were revealed (noneoutside the queried set) line 51 sourceSource documentation
An observation made by the player: the set of queried positions, together with the labels that were revealed (
noneoutside the queried set).standard axioms: Quot.sound, propext what this means
Statement uses:
NatProof uses:
Prod,Finset,Fin,HMul.hMul,OfNat.ofNat,Option3 instances, coercions and auxiliary constants left out.
abbrev Observation (n : ℕ) := Finset (Fin (2 * n)) × (Fin (2 * n) → Option (Fin n))
- abbrev
Usa2016P6.StrategyA player strategy: from the list of past observations, choose the next set of positions to query line 55 sourceSource documentation
A player strategy: from the list of past observations, choose the next set of positions to query.
standard axioms: Quot.sound, propext what this means
Statement uses:
NatProof uses:
List, Usa2016P6.Observation,Finset,Fin,HMul.hMul,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
abbrev Strategy (n : ℕ) := List (Observation n) → Finset (Fin (2 * n))
Mentions: Usa2016P6.Observation
- def
Usa2016P6.Strategy.ValidA strategy is valid for the parameterkif it always queries exactlykcards line 59 sourceSource documentation
A strategy is valid for the parameter
kif it always queries exactlykcards.standard axioms: Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.StrategyProof uses:
List, Usa2016P6.Observation,Eq,Finset.card,Fin,HMul.hMul,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
def Strategy.Valid {n : ℕ} (σ : Strategy n) (k : ℕ) : Prop := …Mentions: Usa2016P6.Strategy
- def
Usa2016P6.revealThe revealed labels, hidden (none) outside the queried set line 63 sourceSource documentation
The revealed labels, hidden (
none) outside the queried set.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Arrangement,Finset,Fin,HMul.hMul,OfNat.ofNat,OptionProof uses:
ite,Membership.mem,Option.some,Option.none10 instances, coercions and auxiliary constants left out.
def reveal {n : ℕ} (a : Arrangement n) (Q : Finset (Fin (2 * n))) : Fin (2 * n) → Option (Fin n) := …Mentions: Usa2016P6.Arrangement
- structure
Usa2016P6.WizardA wizard: an initial arrangement of the cards, and a way to permute the queried cards after each unsuccessful query line 69 sourceSource documentation
A wizard: an initial arrangement of the cards, and a way to permute the queried cards after each unsuccessful query.
standard axioms: Quot.sound, propext what this means
Statement uses:
Natstructure Wizard (n : ℕ) where …
- def
Usa2016P6.Wizard.ValidA wizard plays legitimately if the initial arrangement has two cards of each label and each permutation only moves the currently queried cards line 75 sourceSource documentation
A wizard plays legitimately if the initial arrangement has two cards of each label and each permutation only moves the currently queried cards.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.WizardProof uses:
And, Usa2016P6.Arrangement.Valid,Usa2016P6.Wizard.init,List, Usa2016P6.Observation,Finset,Fin,HMul.hMul,OfNat.ofNat,Not,Membership.mem,Eq,Equiv.Perm,Usa2016P6.Wizard.perm8 instances, coercions and auxiliary constants left out.
def Wizard.Valid {n : ℕ} (W : Wizard n) : Prop := …Mentions: Usa2016P6.Wizard
- structure
Usa2016P6.PlayStateThe state of play: the current arrangement, the past observations, and whether the player has already won line 80 sourceSource documentation
The state of play: the current arrangement, the past observations, and whether the player has already won.
standard axioms: Quot.sound, propext what this means
Statement uses:
Natstructure PlayState (n : ℕ) where …
- def
Usa2016P6.stepOne round of the game line 86 sourceSource documentation
One round of the game.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Wizard, Usa2016P6.PlayStateProof uses:
ite,Eq,Bool,Usa2016P6.PlayState.won,Bool.true,Finset,Fin,HMul.hMul,OfNat.ofNat,Usa2016P6.PlayState.hist,Finset.card,Finset.image,Usa2016P6.PlayState.arr,Usa2016P6.PlayState.mk,Function.comp,Equiv.Perm,Usa2016P6.Wizard.perm,HAppend.hAppend,List, Usa2016P6.Observation and 7 more11 instances, coercions and auxiliary constants left out.
def step {n : ℕ} (σ : Strategy n) (W : Wizard n) (s : PlayState n) : PlayState n := …Mentions: Usa2016P6.Strategy, Usa2016P6.Wizard, Usa2016P6.PlayState
- def
Usa2016P6.playThe state aftermrounds of play line 97 sourceSource documentation
The state after
mrounds of play.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Wizard, Usa2016P6.PlayState2 instances, coercions and auxiliary constants left out.
def play {n : ℕ} (σ : Strategy n) (W : Wizard n) : ℕ → PlayState n | 0 => { arr := W.init, hist := [], won := false } …Mentions: Usa2016P6.Strategy, Usa2016P6.Wizard, Usa2016P6.PlayState
- def
Usa2016P6.WinnableThe game is winnable if some valid strategy guarantees a win withinmmoves against every legitimate wizard line 103 sourceSource documentation
The game is winnable if some valid strategy guarantees a win within
mmoves against every legitimate wizard.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Exists,And,GE.ge,OfNat.ofNat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid, Usa2016P6.Wizard, Usa2016P6.Wizard.Valid,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play,Bool.true2 instances, coercions and auxiliary constants left out.
def Winnable (n k : ℕ) : Prop := …
- lemma
Usa2016P6.play_succline 108 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Wizard,Eq, Usa2016P6.PlayState, Usa2016P6.play,HAdd.hAdd,OfNat.ofNat, Usa2016P6.stepProof uses:
rfl6 instances, coercions and auxiliary constants left out.
- lemma
Usa2016P6.step_of_wonline 111 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Wizard, Usa2016P6.PlayState,Eq,Bool,Usa2016P6.PlayState.won,Bool.true, Usa2016P6.stepProof uses:
id,Eq.mpr,ite,Finset,Fin,HMul.hMul,OfNat.ofNat,Usa2016P6.PlayState.hist,Finset.card,Finset.image,Usa2016P6.PlayState.arr,Usa2016P6.PlayState.mk,Function.comp,Equiv.Perm,Usa2016P6.Wizard.perm,HAppend.hAppend,List, Usa2016P6.Observation,Prod,Optionand 8 more11 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.won_monoline 116 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Wizard,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play,Bool.true,LE.leProof uses:
Nat.le.rec,Nat.le,Eq.mpr,Nat.succ, Usa2016P6.step,id,congrArg, Usa2016P6.PlayState,HAdd.hAdd,OfNat.ofNat, Usa2016P6.play_succ, Usa2016P6.step_of_won,Eq.refl5 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.image_eq_of_perm_fixline 122 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Equiv.Perm,Finset,Not,Membership.mem,Eq,Finset.imageProof uses:
Finset.ext,Eq.mpr,Iff,Exists,And,id,congrFun',congrArg,Iff.intro,Decidable.byContradiction,Equiv.injective,Eq.mp,Exists.intro,Equiv,Equiv.symm,And.intro,Eq.symm,Equiv.apply_symm_apply15 instances, coercions and auxiliary constants left out.
Tactic trace: 18 steps
Open to load the checked before-and-after goal states.
- def
Usa2016P6.obsValuesThe labels revealed in an observation on a given set of positions line 142 sourceSource documentation
The labels revealed in an observation on a given set of positions.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Observation,Finset,Fin,HMul.hMul,OfNat.ofNatProof uses:
Finset.biUnion,Option.toFinset,Prod.snd,Option7 instances, coercions and auxiliary constants left out.
def obsValues {n : ℕ} (o : Observation n) (s : Finset (Fin (2 * n))) : Finset (Fin n) := …Mentions: Usa2016P6.Observation
- lemma
Usa2016P6.obsValues_eq_imageline 145 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Arrangement,Finset,Fin,HMul.hMul,OfNat.ofNat,LE.le,Eq, Usa2016P6.obsValues,Prod.mk,Option, Usa2016P6.reveal,Finset.imageProof uses:
Finset.ext,Eq.mpr,Iff,Membership.mem,Exists,And,Option.some,id,congr,congrArg,Eq.trans,Finset.biUnion,Option.toFinset,funext,Iff.intro,Exists.intro,And.intro,Option.some.inj,Eq.mp,iteand 4 more25 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
- def
Usa2016P6.windowThe window ofkconsecutive positions starting atj(the empty set if it does not fit) line 160 sourceSource documentation
The window of
kconsecutive positions starting atj(the empty set if it does not fit).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,HMul.hMul,OfNat.ofNatProof uses:
dite,LE.le,HAdd.hAdd,Finset.image,Subtype,Membership.mem,Finset.range,Usa2016P6.window.match_1,Fin.mk,Finset.attach,Not,EmptyCollection.emptyCollection15 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
def window (n k j : ℕ) : Finset (Fin (2 * n)) := …
- lemma
Usa2016P6.card_windowline 165 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Eq,Finset.card,Fin, Usa2016P6.windowProof uses:
Eq.mpr,dite,Finset,Finset.image,Subtype,Membership.mem,Finset.range,Usa2016P6.window.match_1,Fin.mk,Finset.attach,Not,EmptyCollection.emptyCollection,id,congrArg,Usa2016P6.window.eq_1,dite_eq_left,Finset.card_image_of_injOn,Set,Subtype.mk,Eq.mpand 4 more23 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.mem_windowline 173 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Fin,Iff,Membership.mem,Finset, Usa2016P6.window,And,LT.ltProof uses:
Eq.mpr,dite,Finset.image,Subtype,Finset.range,Usa2016P6.window.match_1,Fin.mk,Finset.attach,Not,EmptyCollection.emptyCollection,id,Eq,congrArg,Usa2016P6.window.eq_1,dite_eq_left,Exists,Subtype.mk,Iff.mpr,Iff.of_eq,Eq.refland 14 more36 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
- def
Usa2016P6.midWindowThek - 1positions strictly betweeniandi + k(the empty set if they do not fit) line 188 sourceSource documentation
The
k - 1positions strictly betweeniandi + k(the empty set if they do not fit).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,Fin,HMul.hMul,OfNat.ofNatProof uses:
dite,LE.le,HAdd.hAdd,Finset.image,Subtype,Membership.mem,Finset.range,HSub.hSub,Usa2016P6.midWindow.match_1,Fin.mk,Finset.attach,Not,EmptyCollection.emptyCollection17 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
def midWindow (n k i : ℕ) : Finset (Fin (2 * n)) := …
- lemma
Usa2016P6.card_midWindowline 194 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Eq,Finset.card,Fin, Usa2016P6.midWindow,HSub.hSubProof uses:
Eq.mpr,dite,Finset,Finset.image,Subtype,Membership.mem,Finset.range,Usa2016P6.midWindow.match_1,Fin.mk,Finset.attach,Not,EmptyCollection.emptyCollection,id,congrArg,Usa2016P6.midWindow.eq_1,dite_eq_left,Finset.card_image_of_injOn,Set,Subtype.mk,Eq.mpand 4 more27 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.mem_midWindowline 202 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Fin,Iff,Membership.mem,Finset, Usa2016P6.midWindow,And,LT.ltProof uses:
Eq.mpr,dite,Finset.image,Subtype,Finset.range,HSub.hSub,Usa2016P6.midWindow.match_1,Fin.mk,Finset.attach,Not,EmptyCollection.emptyCollection,id,Eq,congrArg,Usa2016P6.midWindow.eq_1,dite_eq_left,Exists,Subtype.mk,Iff.mpr,Iff.of_eqand 14 more36 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.midWindow_subset_windowline 215 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Finset,Fin, Usa2016P6.midWindow, Usa2016P6.windowProof uses:
Membership.mem,Eq.mpr,And,LT.lt,id,Eq,congrArg,propext, Usa2016P6.mem_window,Eq.mp, Usa2016P6.mem_midWindow20 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.midWindow_subset_window_succline 222 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Finset,Fin, Usa2016P6.midWindow, Usa2016P6.windowProof uses:
Membership.mem,Eq.mpr,And,LT.lt,id,Eq,congrArg,propext, Usa2016P6.mem_window,Eq.mp, Usa2016P6.mem_midWindow20 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- def
Usa2016P6.labelAtThe label the player can deduce at positioni, computed from observationsiandi + 1(junk value0when those observations are not available) line 231 sourceSource documentation
The label the player can deduce at position
i, computed from observationsiandi + 1(junk value0when those observations are not available).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,List, Usa2016P6.Observation,FinProof uses:
dite,And,LT.lt,HAdd.hAdd,OfNat.ofNat,List.length,LE.le,HMul.hMul,Finset, Usa2016P6.obsValues,List.get,Fin.mk, Usa2016P6.window, Usa2016P6.midWindow,Finset.Nonempty,SDiff.sdiff,Exists.choose,Membership.mem,Not22 instances, coercions and auxiliary constants left out.
noncomputable def labelAt (n k : ℕ) [NeZero n] (hist : List (Observation n)) (i : ℕ) : Fin n := …Mentions: Usa2016P6.Observation
- def
Usa2016P6.posOfThe position in the row corresponding to a deduced-label index line 240 sourceSource documentation
The position in the row corresponding to a deduced-label index.
no axioms what this means
Statement uses:
Nat,Fin,HSub.hSub,HMul.hMul,OfNat.ofNatProof uses:
Fin.mk12 instances, coercions and auxiliary constants left out.
def posOf (n k : ℕ) (p : Fin (2 * n - k)) : Fin (2 * n) := …
- lemma
Usa2016P6.posOf_valline 243 sourceno axioms what this means
Statement uses:
Nat,Fin,HSub.hSub,HMul.hMul,OfNat.ofNat,Eq, Usa2016P6.posOfProof uses:
rfl12 instances, coercions and auxiliary constants left out.
- lemma
Usa2016P6.posOf_neline 245 sourceno axioms what this means
Statement uses:
Nat,Fin,HSub.hSub,HMul.hMul,OfNat.ofNat,Ne, Usa2016P6.posOfProof uses:
Eq,Fin.ext,congrArg,Eq.mp, Usa2016P6.posOf_val11 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.pairSet_existsline 253 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,HSub.hSub,HMul.hMul,Ne,Exists,Finset,And,Eq,Finset.card,Membership.mem, Usa2016P6.posOfProof uses:
SDiff.sdiff,Finset.univ,Insert.insert,Singleton.singleton,Finset.exists_subset_card_eq,Eq.mpr,Inter.inter,id,congrArg,Finset.card_sdiff,Fintype.card,Finset.card_univ,Fintype.card_fin,Finset.inter_univ,HAdd.hAdd,Finset.card_insert_of_notMem,Not, Usa2016P6.posOf_ne,Finset.card_singleton,Disjointand 13 more34 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
- def
Usa2016P6.pairSetA set ofkpositions containing the two given (distinct) positions line 274 sourceSource documentation
A set of
kpositions containing the two given (distinct) positions.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,HSub.hSub,HMul.hMul,Ne,FinsetProof uses:
Exists.choose,And,Eq,Finset.card,Membership.mem, Usa2016P6.posOf, Usa2016P6.pairSet_exists14 instances, coercions and auxiliary constants left out.
noncomputable def pairSet (n k : ℕ) (hk : 2 ≤ k) (hkn : k ≤ n) (p q : Fin (2 * n - k)) (hpq : p ≠ q) : Finset (Fin (2 * n)) := … - lemma
Usa2016P6.pairSet_cardline 278 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,HSub.hSub,HMul.hMul,Ne,Eq,Finset.card, Usa2016P6.pairSetProof uses:
And.left,Exists.choose,Finset,And,Membership.mem, Usa2016P6.posOf, Usa2016P6.pairSet_exists,Exists.choose_spec14 instances, coercions and auxiliary constants left out.
- lemma
Usa2016P6.posOf_mem_pairSetline 282 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,HSub.hSub,HMul.hMul,Ne,Membership.mem,Finset, Usa2016P6.pairSet, Usa2016P6.posOfProof uses:
And.left,Exists.choose,And,Eq,Finset.card, Usa2016P6.pairSet_exists,And.right,Exists.choose_spec16 instances, coercions and auxiliary constants left out.
- lemma
Usa2016P6.posOf_mem_pairSet'line 286 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Fin,HSub.hSub,HMul.hMul,Ne,Membership.mem,Finset, Usa2016P6.pairSet, Usa2016P6.posOfProof uses:
And.right,Exists.choose,And,Eq,Finset.card, Usa2016P6.pairSet_exists,Exists.choose_spec16 instances, coercions and auxiliary constants left out.
- def
Usa2016P6.winStratThe winning strategy: slide a window ofkpositions across the row, then query two positions that are known to carry the same label line 292 sourceSource documentation
The winning strategy: slide a window of
kpositions across the row, then query two positions that are known to carry the same label.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat, Usa2016P6.StrategyProof uses:
List, Usa2016P6.Observation,ite,Finset,Fin,HMul.hMul,HAdd.hAdd,List.length, Usa2016P6.window,dite,Exists,HSub.hSub,And,Ne,Eq, Usa2016P6.labelAt, Usa2016P6.pairSet,Exists.choose,Not22 instances, coercions and auxiliary constants left out.
noncomputable def winStrat (n k : ℕ) [NeZero n] (hk : 2 ≤ k) (hkn : k ≤ n) : Strategy n := …Mentions: Usa2016P6.Strategy
- lemma
Usa2016P6.winStrat_validline 302 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat, Usa2016P6.Strategy.Valid, Usa2016P6.winStratProof uses:
List, Usa2016P6.Observation,id,Eq,Finset.card,Fin,HMul.hMul,HAdd.hAdd,List.length,Decidable,ite,Finset, Usa2016P6.window,dite,Exists,HSub.hSub,And,Ne, Usa2016P6.labelAt, Usa2016P6.pairSet and 11 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
- abbrev
Usa2016P6.slideStratThe winning strategy specialized tok < nline 313 sourceSource documentation
The winning strategy specialized to
k < n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat,LT.lt, Usa2016P6.StrategyProof uses: Usa2016P6.winStrat,
le_of_lt11 instances, coercions and auxiliary constants left out.
noncomputable abbrev slideStrat (n k : ℕ) [NeZero n] (hk : 2 ≤ k) (hkn : k < n) : Strategy n := …
Mentions: Usa2016P6.Strategy
- lemma
Usa2016P6.step_apply_of_not_wonline 316 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Wizard, Usa2016P6.PlayState,Not,Eq,Bool,Usa2016P6.PlayState.won,Bool.true, Usa2016P6.step,ite,Finset.card,Fin,Finset.image,HMul.hMul,OfNat.ofNat,Usa2016P6.PlayState.arr,Usa2016P6.PlayState.hist,Usa2016P6.PlayState.mk,Function.compand 13 moreProof uses:
id,Eq.mpr,congrArg,ite_eq_right,Eq.refl21 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.slideStrat_of_ltline 326 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat,LT.lt,List, Usa2016P6.Observation,HAdd.hAdd,List.length,HMul.hMul,Eq,Finset,Fin, Usa2016P6.slideStrat, Usa2016P6.windowProof uses:
id,Eq.mpr,ite,dite,Exists,HSub.hSub,And,Ne, Usa2016P6.labelAt, Usa2016P6.pairSet,le_of_lt,Exists.choose,Not,congrArg,ite_eq_left,Eq.refl29 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.slideStrat_of_geline 332 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat,LT.lt,List, Usa2016P6.Observation,HMul.hMul,HAdd.hAdd,List.length,Exists,Fin,HSub.hSub,And,Ne,Eq, Usa2016P6.labelAt,Finset, Usa2016P6.slideStrat, Usa2016P6.pairSet and 4 moreProof uses:
id,Eq.mpr,ite, Usa2016P6.window,dite,Not,congrArg,ite_eq_right,dite_eq_left,Eq.refl34 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.slide_play_factsFacts about the play of the sliding strategy, while no win has occurred line 343 sourceSource documentation
Facts about the play of the sliding strategy, while no win has occurred.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat,LT.lt, Usa2016P6.Wizard, Usa2016P6.Wizard.Valid,Not,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play, Usa2016P6.slideStrat,HAdd.hAdd,HSub.hSub,HMul.hMul,Bool.true,And,Bool.false,List.lengthand 15 moreProof uses:
Nat.recAux,And.intro,rfl,Iff.mp,Ne,Bool.eq_false_iff, Usa2016P6.slideStrat_of_lt,Eq.mpr,id,congrArg,Eq.mp,Decidable.byContradiction, Usa2016P6.card_window, Usa2016P6.step, Usa2016P6.PlayState, Usa2016P6.play_succ,ite,Usa2016P6.PlayState.mk,Function.comp,Equiv.Permand 25 more49 instances, coercions and auxiliary constants left out.
Tactic trace: 54 steps
Open to load the checked before-and-after goal states.
lemma slide_play_facts {n k : ℕ} [NeZero n] (hk : 2 ≤ k) (hkn : k < n) (W : Wizard n) (_hW : W.Valid) (hM : ¬ (play (slideStrat n k hk hkn) W (2 * n - k + 1)).won) (j : ℕ) (hj : j ≤ 2 * n - k + 1) : (play (slideStrat n k hk hkn) W j).won = false ∧ ((play (slideStrat n k hk hkn) W j).hist).length = j ∧ (∀ i (_hi : i < j), ((play (slideStrat n k hk hkn) W j).hist)[i]? = some (window n k i, reveal ((play (slideStrat n k hk hkn) W i).arr) (window n k i))) ∧ (∀ j' (_hj' : j' < j), ((window n k j').image (play (slideStrat n k hk hkn) W j').arr).card = k) := by …Mentions: Usa2016P6.Wizard, Usa2016P6.play, Usa2016P6.slideStrat, Usa2016P6.window, Usa2016P6.reveal
- lemma
Usa2016P6.slide_arr_stepThe arrangement one step later, while no win has occurred line 399 sourceSource documentation
The arrangement one step later, while no win has occurred.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat,LT.lt, Usa2016P6.Wizard, Usa2016P6.Wizard.Valid,Not,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play, Usa2016P6.slideStrat,HAdd.hAdd,HSub.hSub,HMul.hMul,Bool.true, Usa2016P6.Arrangement,Usa2016P6.PlayState.arr,Function.compand 5 moreProof uses:
Bool.false,And.left,And,List.length, Usa2016P6.Observation,Option,GetElem?.getElem?,List,Option.some,Prod,Finset,Prod.mk, Usa2016P6.reveal,Finset.card,Finset.image, Usa2016P6.slide_play_facts,And.right,Nat.lt_succ_self, Usa2016P6.slideStrat_of_lt,Eq.mprand 18 more37 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma slide_arr_step {n k : ℕ} [NeZero n] (hk : 2 ≤ k) (hkn : k < n) (W : Wizard n) (hW : W.Valid) (hM : ¬ (play (slideStrat n k hk hkn) W (2 * n - k + 1)).won) (j : ℕ) (hj : j < 2 * n - k + 1) : (play (slideStrat n k hk hkn) W (j + 1)).arr = (play (slideStrat n k hk hkn) W j).arr ∘ W.perm (play (slideStrat n k hk hkn) W j).hist (window n k j) := by …Mentions: Usa2016P6.Wizard, Usa2016P6.play, Usa2016P6.slideStrat, Usa2016P6.window
- lemma
Usa2016P6.slide_arr_frozenOnce determined, the label at positionxnever changes again line 421 sourceSource documentation
Once determined, the label at position
xnever changes again.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat,LT.lt, Usa2016P6.Wizard, Usa2016P6.Wizard.Valid,Not,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play, Usa2016P6.slideStrat,HAdd.hAdd,HSub.hSub,HMul.hMul,Bool.true,Fin,Usa2016P6.PlayState.arrProof uses:
Nat.le.rec,Eq.refl,Nat.le,Nat.succ,Eq.mpr,id,congrArg,Nat.succ_eq_add_one, Usa2016P6.Arrangement,Function.comp,Equiv.Perm,Usa2016P6.Wizard.perm,Usa2016P6.PlayState.hist, Usa2016P6.window, Usa2016P6.slide_arr_step,Eq.mp,And.right, Usa2016P6.Arrangement.Valid,Usa2016P6.Wizard.init,Listand 7 more33 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma slide_arr_frozen {n k : ℕ} [NeZero n] (hk : 2 ≤ k) (hkn : k < n) (W : Wizard n) (hW : W.Valid) (hM : ¬ (play (slideStrat n k hk hkn) W (2 * n - k + 1)).won) (x : Fin (2 * n)) (hx : x.val < 2 * n - k) (j : ℕ) (hj1 : x.val + 1 ≤ j) (hj2 : j ≤ 2 * n - k + 1) : (play (slideStrat n k hk hkn) W j).arr x = (play (slideStrat n k hk hkn) W (x.val + 1)).arr x := by …Mentions: Usa2016P6.Wizard, Usa2016P6.play, Usa2016P6.slideStrat
- lemma
Usa2016P6.slide_labelAt_eqThe label computed from the observations is the actual label line 446 sourceSource documentation
The label computed from the observations is the actual label.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat,LT.lt, Usa2016P6.Wizard, Usa2016P6.Wizard.Valid,Not,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play, Usa2016P6.slideStrat,HAdd.hAdd,HSub.hSub,HMul.hMul,Bool.true,Fin, Usa2016P6.labelAt,Usa2016P6.PlayState.histand 1 moreProof uses:
Bool.false,And,List.length, Usa2016P6.Observation,Option,GetElem?.getElem?,List,Option.some,Prod,Finset,Prod.mk, Usa2016P6.window, Usa2016P6.reveal,Finset.card,Finset.image, Usa2016P6.slide_play_facts,le_refl,Eq.mpr,id,congrArgand 58 more58 instances, coercions and auxiliary constants left out.
Tactic trace: 74 steps
Open to load the checked before-and-after goal states.
lemma slide_labelAt_eq {n k : ℕ} [NeZero n] (hk : 2 ≤ k) (hkn : k < n) (W : Wizard n) (hW : W.Valid) (hM : ¬ (play (slideStrat n k hk hkn) W (2 * n - k + 1)).won) (x : Fin (2 * n)) (hx : x.val < 2 * n - k) : labelAt n k ((play (slideStrat n k hk hkn) W (2 * n - k + 1)).hist) x.val = (play (slideStrat n k hk hkn) W (x.val + 1)).arr x := by …Mentions: Usa2016P6.Wizard, Usa2016P6.play, Usa2016P6.slideStrat, Usa2016P6.labelAt
- lemma
Usa2016P6.slideStrat_winsThe sliding strategy wins within2n - k + 2moves line 543 sourceSource documentation
The sliding strategy wins within
2n - k + 2moves.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,LE.le,OfNat.ofNat,LT.lt, Usa2016P6.Wizard, Usa2016P6.Wizard.Valid,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play, Usa2016P6.slideStrat,HAdd.hAdd,HSub.hSub,HMul.hMul,Bool.trueProof uses:
dite, Usa2016P6.won_mono,Not,List.length, Usa2016P6.Observation,Usa2016P6.PlayState.hist,And.left,And,Option,GetElem?.getElem?,List,Option.some,Prod,Finset,Fin,Prod.mk, Usa2016P6.window, Usa2016P6.reveal,Usa2016P6.PlayState.arr,Finset.cardand 50 more43 instances, coercions and auxiliary constants left out.
Tactic trace: 51 steps
Open to load the checked before-and-after goal states.
lemma slideStrat_wins {n k : ℕ} [NeZero n] (hk : 2 ≤ k) (hkn : k < n) (W : Wizard n) (hW : W.Valid) : (play (slideStrat n k hk hkn) W (2 * n - k + 2)).won := by …Mentions: Usa2016P6.Wizard, Usa2016P6.play, Usa2016P6.slideStrat
- lemma
Usa2016P6.exists_perm_injOnline 608 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,HMul.hMul,OfNat.ofNat,Eq,Finset.card,Finset.filter,Finset.univ,Finset,Set.InjOn,Exists,Equiv.Perm,And,Not,Membership.mem,Function.compProof uses:
Fintype.card,Fintype.card_fin,Eq.mpr,id,congrArg,Finset.card_univ,Eq.refl,Finset.image,Finset.eq_univ_of_card,Eq.trans,Iff.mpr,Finset.card_image_iff,Eq.symm,Compl.compl,propext,Finset.eq_univ_iff_forall,Finset.mem_univ,Iff.mp,Finset.mem_image,LT.ltand 54 more46 instances, coercions and auxiliary constants left out.
Tactic trace: 206 steps (first 200 of 206)
Open to load the checked before-and-after goal states.
- def
Usa2016P6.initEquiv₁The equivalence between the first query and the labels line 804 sourceSource documentation
The equivalence between the first query and the labels.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,Equiv,Subtype,Fin,HMul.hMul,OfNat.ofNat,Membership.mem,Finset,List.nil, Usa2016P6.ObservationProof uses:
Fintype.equivOfCardEq13 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
noncomputable def initEquiv₁ {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) : ↥(σ []) ≃ Fin n := …Mentions: Usa2016P6.Strategy
- def
Usa2016P6.initEquiv₂The equivalence between the complement of the first query and the labels line 808 sourceSource documentation
The equivalence between the complement of the first query and the labels.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,Equiv,Subtype,Fin,HMul.hMul,OfNat.ofNat,Membership.mem,Finset,Compl.compl,List.nil, Usa2016P6.ObservationProof uses:
Fintype.equivOfCardEq20 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
noncomputable def initEquiv₂ {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) : ↥(σ [])ᶜ ≃ Fin n := …Mentions: Usa2016P6.Strategy
- def
Usa2016P6.initArrThe wizard's initial arrangement: a bijection of each ofσ []and its complement onto the labels line 814 sourceSource documentation
The wizard's initial arrangement: a bijection of each of
σ []and its complement onto the labels.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid, Usa2016P6.ArrangementProof uses:
Fin,HMul.hMul,OfNat.ofNat,dite,Membership.mem,Finset,List.nil, Usa2016P6.Observation,Equiv,Subtype, Usa2016P6.initEquiv₁,Subtype.mk,Not,Compl.compl, Usa2016P6.initEquiv₂14 instances, coercions and auxiliary constants left out.
noncomputable def initArr {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) : Arrangement n := …Mentions: Usa2016P6.Strategy, Usa2016P6.Arrangement
- lemma
Usa2016P6.initArr_apply_of_memline 817 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,Fin,HMul.hMul,OfNat.ofNat,Membership.mem,Finset,List.nil, Usa2016P6.Observation,Eq, Usa2016P6.initArr,Equiv,Subtype, Usa2016P6.initEquiv₁,Subtype.mkProof uses:
dite_eq_left,Not,Compl.compl, Usa2016P6.initEquiv₂22 instances, coercions and auxiliary constants left out.
- lemma
Usa2016P6.initArr_apply_of_notMemline 820 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,Fin,HMul.hMul,OfNat.ofNat,Not,Membership.mem,Finset,List.nil, Usa2016P6.Observation,Eq, Usa2016P6.initArr,Equiv,Subtype,Compl.compl, Usa2016P6.initEquiv₂,Subtype.mk,Iff.mpr,Finset.mem_complProof uses:
dite_eq_right, Usa2016P6.initEquiv₁26 instances, coercions and auxiliary constants left out.
- lemma
Usa2016P6.initArr_validline 823 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid, Usa2016P6.Arrangement.Valid, Usa2016P6.initArrProof uses:
Fin,Eq,Finset,HMul.hMul,OfNat.ofNat,Finset.filter,Finset.univ,Insert.insert,Membership.mem,List.nil, Usa2016P6.Observation,Equiv,Subtype,Equiv.symm, Usa2016P6.initEquiv₁,Singleton.singleton,Compl.compl, Usa2016P6.initEquiv₂,Finset.ext,Eq.mprand 35 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 46 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2016P6.initArr_injOnline 864 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,And,Set.InjOn,Fin,HMul.hMul,OfNat.ofNat, Usa2016P6.initArr,Finset,List.nil, Usa2016P6.Observation,Compl.complProof uses:
And.intro,Membership.mem,Set,Eq,congrArg,Subtype,Subtype.mk,Iff.mp,Finset.mem_coe,Equiv.injective, Usa2016P6.initEquiv₁,Eq.mp,Equiv, Usa2016P6.initArr_apply_of_mem,Iff.mpr,Not,Finset.mem_compl, Usa2016P6.initEquiv₂, Usa2016P6.initArr_apply_of_notMem24 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
- def
Usa2016P6.permOfThe permutation the wizard uses in response to the queryσ l: it keeps the next query free of matches line 877 sourceSource documentation
The permutation the wizard uses in response to the query
σ l: it keeps the next query free of matches.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,List, Usa2016P6.Observation, Usa2016P6.Arrangement,Equiv.Perm,Fin,HMul.hMul,OfNat.ofNatProof uses:
dite,Exists,And,Not,Membership.mem,Finset,Eq,Set.InjOn,Function.comp,HAppend.hAppend,Prod,Option,List.cons,Prod.mk, Usa2016P6.reveal,List.nil,Exists.choose26 instances, coercions and auxiliary constants left out.
noncomputable def permOf {n : ℕ} (σ : Strategy n) (_hσ : σ.Valid n) (l : List (Observation n)) (a : Arrangement n) : Equiv.Perm (Fin (2 * n)) := …Mentions: Usa2016P6.Strategy, Usa2016P6.Observation, Usa2016P6.Arrangement
- def
Usa2016P6.wizArrAuxAuxiliary forwizArr, recursing on the reversed history line 885 sourceSource documentation
Auxiliary for
wizArr, recursing on the reversed history.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,List, Usa2016P6.Observation, Usa2016P6.Arrangement2 instances, coercions and auxiliary constants left out.
noncomputable def wizArrAux {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) : List (Observation n) → Arrangement n | [] => initArr σ hσ | _ :: r => wizArrAux σ hσ r ∘ permOf σ hσ r.reverse (wizArrAux σ hσ r) /-- The arrangement after the given history, when the wizard plays `permOf`. -/Mentions: Usa2016P6.Strategy, Usa2016P6.Observation, Usa2016P6.Arrangement, Usa2016P6.initArr, Usa2016P6.permOf
- def
Usa2016P6.wizArrThe arrangement after the given history, when the wizard playspermOfline 891 sourceSource documentation
The arrangement after the given history, when the wizard plays
permOf.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,List, Usa2016P6.Observation, Usa2016P6.ArrangementProof uses: Usa2016P6.wizArrAux,
List.reversenoncomputable def wizArr {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) (l : List (Observation n)) : Arrangement n := …Mentions: Usa2016P6.Strategy, Usa2016P6.Observation, Usa2016P6.Arrangement
- lemma
Usa2016P6.wizArr_nilline 895 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,Eq, Usa2016P6.Arrangement, Usa2016P6.wizArr,List.nil, Usa2016P6.Observation, Usa2016P6.initArrProof uses:
rfl - lemma
Usa2016P6.wizArr_appendline 898 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,List, Usa2016P6.Observation,Eq, Usa2016P6.Arrangement, Usa2016P6.wizArr,HAppend.hAppend,List.cons,List.nil,Function.comp,Fin,HMul.hMul,OfNat.ofNat,Equiv.Perm, Usa2016P6.permOfProof uses:
of_eq_true, Usa2016P6.wizArrAux,List.reverse,Eq.trans,True,congrFun',congrArg,List.reverse_append,List.reverse_singleton,Usa2016P6.wizArrAux.eq_2,Usa2016P6.permOf.congr_simp,Eq.refl,List.reverse_reverse,eq_self16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- def
Usa2016P6.evasiveWizardThe wizard that evades the player forever whenk = nline 905 sourceSource documentation
The wizard that evades the player forever when
k = n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid, Usa2016P6.WizardProof uses:
Usa2016P6.Wizard.mk, Usa2016P6.initArr,List, Usa2016P6.Observation,Finset,Fin,HMul.hMul,OfNat.ofNat,ite,Equiv.Perm,Eq, Usa2016P6.permOf, Usa2016P6.wizArr7 instances, coercions and auxiliary constants left out.
noncomputable def evasiveWizard {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) : Wizard n where …Mentions: Usa2016P6.Strategy, Usa2016P6.Wizard
- lemma
Usa2016P6.evasiveWizard_validline 909 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid, Usa2016P6.Wizard.Valid, Usa2016P6.evasiveWizardProof uses:
And.intro, Usa2016P6.Arrangement.Valid,Usa2016P6.Wizard.init,List, Usa2016P6.Observation,Finset,Fin,HMul.hMul,OfNat.ofNat,Not,Membership.mem,Eq,Equiv.Perm,Usa2016P6.Wizard.perm, Usa2016P6.initArr_valid,id,Decidable,ite, Usa2016P6.permOf, Usa2016P6.wizArr and 24 more26 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- def
Usa2016P6.evasiveHistThe history afterjrounds against the evasive wizard line 926 sourceSource documentation
The history after
jrounds against the evasive wizard.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,List, Usa2016P6.Observation2 instances, coercions and auxiliary constants left out.
noncomputable def evasiveHist {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) : ℕ → List (Observation n) | 0 => [] | j + 1 => evasiveHist σ hσ j ++ [(σ (evasiveHist σ hσ j), reveal (wizArr σ hσ (evasiveHist σ hσ j)) (σ (evasiveHist σ hσ j)))] /-- The invariant maintained by the evasive wizard: the current arrangement is valid, and injective both on the last query and on the next query. -/Mentions: Usa2016P6.Strategy, Usa2016P6.Observation, Usa2016P6.reveal, Usa2016P6.wizArr
- lemma
Usa2016P6.evasive_invThe invariant maintained by the evasive wizard: the current arrangement is valid, and injective both on the last query and on the next query line 935 sourceSource documentation
The invariant maintained by the evasive wizard: the current arrangement is valid, and injective both on the last query and on the next query.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,And, Usa2016P6.Arrangement.Valid, Usa2016P6.wizArr, Usa2016P6.evasiveHist,Set.InjOn,Fin,HMul.hMul,OfNat.ofNat,Finset,List.dropLast, Usa2016P6.ObservationProof uses:
Nat.recAux,And.intro, Usa2016P6.initArr_valid,And.left, Usa2016P6.initArr,List.nil,Compl.compl, Usa2016P6.initArr_injOn,HAdd.hAdd,List,Eq,rfl, Usa2016P6.Arrangement,HAppend.hAppend,Prod,Option,List.cons,Prod.mk, Usa2016P6.reveal,Function.compand 51 more38 instances, coercions and auxiliary constants left out.
Tactic trace: 38 steps
Open to load the checked before-and-after goal states.
lemma evasive_inv {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) (j : ℕ) : (wizArr σ hσ (evasiveHist σ hσ j)).Valid ∧ Set.InjOn (wizArr σ hσ (evasiveHist σ hσ j)) ↑(σ ((evasiveHist σ hσ j).dropLast)) ∧ Set.InjOn (wizArr σ hσ (evasiveHist σ hσ j)) ↑(σ (evasiveHist σ hσ j)) := by …Mentions: Usa2016P6.Strategy, Usa2016P6.wizArr, Usa2016P6.evasiveHist
- lemma
Usa2016P6.evasive_playPlaying against the evasive wizard, the player never wins line 979 sourceSource documentation
Playing against the evasive wizard, the player never wins.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,Eq, Usa2016P6.PlayState, Usa2016P6.play, Usa2016P6.evasiveWizard,Usa2016P6.PlayState.mk, Usa2016P6.wizArr, Usa2016P6.evasiveHist,Bool.falseProof uses:
Nat.recAux,Eq.refl,OfNat.ofNat,Set.InjOn,Fin,HMul.hMul,Finset,And.right,List.dropLast, Usa2016P6.Observation, Usa2016P6.Arrangement.Valid,And, Usa2016P6.evasive_inv,Eq.mpr,HAdd.hAdd, Usa2016P6.step,id,congrArg, Usa2016P6.play_succ,iteand 33 more17 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma evasive_play {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) (m : ℕ) : play σ (evasiveWizard σ hσ) m = { arr := wizArr σ hσ (evasiveHist σ hσ m) …Mentions: Usa2016P6.Strategy, Usa2016P6.play, Usa2016P6.evasiveWizard, Usa2016P6.wizArr, Usa2016P6.evasiveHist
- lemma
Usa2016P6.not_winnable_of_eqWhenk = n, no strategy can guarantee a win: the game is not winnable line 1000 sourceSource documentation
When
k = n, no strategy can guarantee a win: the game is not winnable.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid,Exists, Usa2016P6.Wizard,And, Usa2016P6.Wizard.Valid,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play,Bool.falseProof uses:
Exists.intro, Usa2016P6.evasiveWizard,And.intro, Usa2016P6.evasiveWizard_valid,Eq.mpr,Usa2016P6.PlayState.mk, Usa2016P6.wizArr, Usa2016P6.evasiveHist,id,congrArg, Usa2016P6.PlayState, Usa2016P6.evasive_play,Eq.reflTactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma not_winnable_of_eq {n : ℕ} (σ : Strategy n) (hσ : σ.Valid n) : ∃ W : Wizard n, W.Valid ∧ ∀ m, (play σ W m).won = false := …Mentions: Usa2016P6.Strategy, Usa2016P6.Wizard, Usa2016P6.play
- determine
Usa2016P6.answerline 1006 sourceno axioms what this means
Statement uses:
NatProof uses:
LT.lt1 instances, coercions and auxiliary constants left out.
- problem
Usa2016P6.usa2016_p6line 1008 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Iff, Usa2016P6.Winnable, Usa2016P6.answerProof uses:
id,Iff.intro,LT.lt,And,GE.ge,Exists, Usa2016P6.Strategy, Usa2016P6.Strategy.Valid, Usa2016P6.Wizard, Usa2016P6.Wizard.Valid,Eq,Bool,Usa2016P6.PlayState.won, Usa2016P6.play,Bool.true,Decidable.byContradiction,Not,False,Bool.false, Usa2016P6.not_winnable_of_eq and 13 more22 instances, coercions and auxiliary constants left out.
Tactic trace: 18 steps
Open to load the checked before-and-after goal states.