Compfiles/Usa2013P3.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
87 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2013, Problem 3
Let n be a positive integer. There are n(n+1)/2 tokens, each with a black side and a white side, arranged into an equilateral triangle, with the biggest row containing n tokens. Initially, each token has the white side up. An operation is to choose a line parallel to the sides of the triangle, and flip all the tokens on that line. A configuration is called admissible if it can be obtained from the initial configuration by performing a finite number of operations. For each admissible configuration C, let f(C) denote the smallest number of operations required to obtain C from the initial configuration. Find the maximum value of f(C), where C varies over all admissible configurations.
Imports (7)
Imported by 1 file
- def
Usa2013P3.TokenThe tokens are indexed by pairs(a, b)of natural numbers witha + b < nline 43 sourceSource documentation
The tokens are indexed by pairs
(a, b)of natural numbers witha + b < n. One should think of barycentric coordinates(a, b, c)witha + b + c = n - 1, so thatc = n - 1 - a - bis determined.no axioms what this means
Statement uses:
NatProof uses:
Subtype,Prod,LT.lt,HAdd.hAdd,Prod.fst,Prod.snd3 instances, coercions and auxiliary constants left out.
def Token (n : ℕ) := { p : ℕ × ℕ // p.1 + p.2 < n } - lemma
Usa2013P3.lt_leftline 45 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd7 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.lt_rightline 46 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd7 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.lt_thirdline 47 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,HSub.hSub,OfNat.ofNat10 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- structure
Usa2013P3.MovesA choice of lines to flip: for each of the three directions and eachi < n, whether thei-th line in that direction is flipped line 54 sourceSource documentation
A choice of lines to flip: for each of the three directions and each
i < n, whether thei-th line in that direction is flipped. The three lines through the token(a, b, c)are thea-th,b-th andc-th lines of the three directions respectively.no axioms what this means
Statement uses:
Natstructure Moves (n : ℕ) where …
- def
Usa2013P3.applyMovesDocumented declaration: applyMoves line 62 sourceSource documentation
The configuration reached from the initial (all-white) configuration by performing the moves
v: token(a, b)ends up black iff an odd number of the three lines through it were flipped.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves, Usa2013P3.Token,BoolProof uses:
Bool.xor,Usa2013P3.Moves.x,Fin.mk,Prod.fst,Prod,LT.lt,HAdd.hAdd,Prod.snd,Usa2013P3.Moves.y,Usa2013P3.Moves.z,HSub.hSub,OfNat.ofNat10 instances, coercions and auxiliary constants left out.
def applyMoves {n : ℕ} (v : Moves n) (t : Token n) : Bool := …Mentions: Usa2013P3.Moves, Usa2013P3.Token
- def
Usa2013P3.AdmissibleA configuration is admissible if it can be obtained from the initial configuration by a finite number of operations line 70 sourceSource documentation
A configuration is admissible if it can be obtained from the initial configuration by a finite number of operations. Since the operations commute and are involutions, every sequence of operations is described by a
Moves.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Token,BoolProof uses:
Exists, Usa2013P3.Moves,Eq, Usa2013P3.applyMovesdef Admissible {n : ℕ} (C : Token n → Bool) : Prop := ∃ v : Moves n, applyMoves v = CMentions: Usa2013P3.Token, Usa2013P3.Moves, Usa2013P3.applyMoves
- def
Usa2013P3.weightThe number of operations in aMoves: the total number of flipped lines line 73 sourceSource documentation
The number of operations in a
Moves: the total number of flipped lines.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.MovesProof uses:
HAdd.hAdd,Finset.card,Fin,Finset.filter,Eq,Bool,Usa2013P3.Moves.x,Bool.true,Finset.univ,Usa2013P3.Moves.y,Usa2013P3.Moves.z4 instances, coercions and auxiliary constants left out.
def weight {n : ℕ} (v : Moves n) : ℕ := …Mentions: Usa2013P3.Moves
- def
Usa2013P3.ff Cis the smallest number of operations required to obtainCline 79 sourceSource documentation
f Cis the smallest number of operations required to obtainC.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Token,BoolProof uses:
InfSet.sInf,Set.ofPred,Exists, Usa2013P3.Moves,And,Eq, Usa2013P3.applyMoves, Usa2013P3.weight1 instances, coercions and auxiliary constants left out.
noncomputable def f {n : ℕ} (C : Token n → Bool) : ℕ := …Mentions: Usa2013P3.Token
- determine
Usa2013P3.answerline 82 sourceno axioms what this means
Statement uses:
NatProof uses:
HAdd.hAdd,HMul.hMul,OfNat.ofNat,HDiv.hDiv,HMod.hMod9 instances, coercions and auxiliary constants left out.
- def
Usa2013P3.Moves.vxorPointwise xor of twoMovesline 87 sourceSource documentation
Pointwise xor of two
Moves.no axioms what this means
Statement uses:
Nat, Usa2013P3.MovesProof uses:
Usa2013P3.Moves.mk,Fin,Bool.xor,Usa2013P3.Moves.x,Usa2013P3.Moves.y,Usa2013P3.Moves.zdef Moves.vxor {n : ℕ} (v w : Moves n) : Moves n := …Mentions: Usa2013P3.Moves
- def
Usa2013P3.eThe "even-length line" indicator: thei-th line of any direction containsn - itokens, which is even iffi ≡ n (mod 2)line 92 sourceSource documentation
The "even-length line" indicator: the
i-th line of any direction containsn - itokens, which is even iffi ≡ n (mod 2).no axioms what this means
Statement uses:
Nat,Fin,BoolProof uses:
Decidable.decide,Eq,HMod.hMod,OfNat.ofNat5 instances, coercions and auxiliary constants left out.
def e (n : ℕ) : Fin n → Bool := fun i => decide (i.val % 2 = n % 2)
- def
Usa2013P3.spThe element of the move-span indexed by three bits line 97 sourceSource documentation
The element of the move-span indexed by three bits. With
g₁ = (1,1,0),g₂ = (0,1,1)andθ = (e,e,e), this isε₁ • g₁ ^^ ε₂ • g₂ ^^ ε₃ • θ.no axioms what this means
Statement uses:
Nat,Prod,Bool, Usa2013P3.MovesProof uses:
Usa2013P3.Moves.mk,Fin,Bool.xor,Prod.fst,Bool.and,Prod.snd, Usa2013P3.edef sp (n : ℕ) (ε : Bool × Bool × Bool) : Moves n := …
Mentions: Usa2013P3.Moves
- lemma
Usa2013P3.xor_eq_false_iffline 102 sourcestandard axioms: propext what this means
Statement uses:
Bool,Iff,Eq,Bool.xor,Bool.falseProof uses:
of_eq_true,Eq.trans,True,congr,congrArg,congrFun',bne_self_eq_false,eq_self,iff_self,Eq.symm,Bool.true,False,bne,Bool.not,Bool.bne_true,Bool.not_false,Bool.true_eq_false,Bool.false_eq_true,Eq.refl,Bool.bne_false5 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.applyMoves_vxorline 105 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves, Usa2013P3.Token,Eq,Bool, Usa2013P3.applyMoves, Usa2013P3.Moves.vxor,Bool.xorProof uses:
Prod,LT.lt,HAdd.hAdd,Prod.fst,Prod.snd,Subtype.mk,Prod.mk,id,of_decide_eq_true,Decidable.decide,Bool.true,Eq.refl,Usa2013P3.Moves.x,Fin.mk,Usa2013P3.Moves.y,Usa2013P3.Moves.z,HSub.hSub,OfNat.ofNat13 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.theta_auxThe key property ofθ = (e,e,e): every token lies on an even number of even-length lines line 119 sourceSource documentation
The key property of
θ = (e,e,e): every token lies on an even number of even-length lines. Indeed, withc = n - 1 - a - bwe havea + b + c = n - 1, so amonga % 2,b % 2,c % 2the number of values equal ton % 2is even.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,Eq,Bool,Bool.xor,Decidable.decide,HMod.hMod,OfNat.ofNat,HSub.hSub,Bool.falseProof uses:
dite,LE.le,False.elim,False,Eq.mp,eq_false,Mathlib.Meta.NormNum.isNat_eq_false,Mathlib.Meta.NormNum.isNat_natMod,Mathlib.Meta.NormNum.isNat_add,Eq.refl,Mathlib.Meta.NormNum.isNat_ofNat,Eq.symm,le_antisymm,Nat.ge_of_not_lt,Mathlib.Tactic.IntervalCases.of_lt_right,Nat.rawCast,Mathlib.Meta.NormNum.IsNat.to_raw_eq,Not,of_decide_eq_true,idand 2 more33 instances, coercions and auxiliary constants left out.
Tactic trace: 19 steps
Open to load the checked before-and-after goal states.
lemma theta_aux (n a b : ℕ) (h : a + b < n) : (decide (a % 2 = n % 2) ^^ decide (b % 2 = n % 2) ^^ decide ((n - 1 - a - b) % 2 = n % 2)) = false := by …Mentions: h
- lemma
Usa2013P3.applyMoves_spEvery element of the span acts trivially on configurations line 135 sourceSource documentation
Every element of the span acts trivially on configurations.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Bool, Usa2013P3.Token,Eq, Usa2013P3.applyMoves, Usa2013P3.sp,Bool.falseProof uses:
Prod.mk,LT.lt,HAdd.hAdd,Prod.fst,Prod.snd,Subtype.mk,Bool.xor,Decidable.decide,HMod.hMod,OfNat.ofNat,HSub.hSub, Usa2013P3.theta_aux,id,Bool.and,of_eq_true,Eq.trans,True,congrFun',congrArg,congrand 17 more16 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
lemma applyMoves_sp {n : ℕ} (ε : Bool × Bool × Bool) (t : Token n) : applyMoves (sp n ε) t = false := by …Mentions: Usa2013P3.Token, Usa2013P3.applyMoves, Usa2013P3.sp
- lemma
Usa2013P3.sp_vxorThe span elements are closed under xor, componentwise on the bits line 149 sourceSource documentation
The span elements are closed under xor, componentwise on the bits.
standard axioms: Quot.sound what this means
Statement uses:
Nat,Prod,Bool,Eq, Usa2013P3.Moves, Usa2013P3.Moves.vxor, Usa2013P3.sp,Prod.mk,Bool.xor,Prod.fst,Prod.sndProof uses:
Usa2013P3.Moves.ext,funext,Fin,Usa2013P3.Moves.x,id,Bool.and,of_decide_eq_true,Decidable.decide,Bool.true,Eq.refl, Usa2013P3.e,Usa2013P3.Moves.y,Usa2013P3.Moves.z3 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.
lemma sp_vxor {n : ℕ} (ε ε' : Bool × Bool × Bool) : Moves.vxor (sp n ε) (sp n ε') = sp n (ε.1 ^^ ε'.1, ε.2.1 ^^ ε'.2.1, ε.2.2 ^^ ε'.2.2) := by …Mentions: Usa2013P3.Moves.vxor, Usa2013P3.sp
- def
Usa2013P3.zeroMoveThe zero move line 176 sourceSource documentation
The zero move.
no axioms what this means
Statement uses:
Nat, Usa2013P3.MovesProof uses:
Usa2013P3.Moves.mk,Fin,Bool.falsedef zeroMove (n : ℕ) : Moves n := ⟨fun _ => false, fun _ => false, fun _ => false⟩
Mentions: Usa2013P3.Moves
- lemma
Usa2013P3.vxor_selfline 178 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Eq, Usa2013P3.Moves.vxor, Usa2013P3.zeroMoveProof uses:
Usa2013P3.Moves.ext,funext,Fin,Bool,Usa2013P3.Moves.x,of_eq_true,Bool.false,Eq.trans,True,congrFun',congrArg,Usa2013P3.Moves.mk,congr,Bool.xor,Usa2013P3.Moves.y,Usa2013P3.Moves.z,bne,bne_self_eq_false,eq_self3 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.vxor_zeroline 181 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Eq, Usa2013P3.Moves.vxor, Usa2013P3.zeroMoveProof uses:
Usa2013P3.Moves.ext,funext,Fin,Bool,Usa2013P3.Moves.x,of_eq_true,Eq.trans,True,congrFun',congrArg,Usa2013P3.Moves.mk,Usa2013P3.Moves.y,Usa2013P3.Moves.z,congr,Bool.xor,bne,Bool.false,Bool.bne_false,eq_self2 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.vxor_commline 184 sourcestandard axioms: Quot.sound what this means
Statement uses:
Nat, Usa2013P3.Moves,Eq, Usa2013P3.Moves.vxorProof uses:
Usa2013P3.Moves.ext,funext,Fin,Bool,Usa2013P3.Moves.x,id,Bool.xor_comm,Usa2013P3.Moves.y,Usa2013P3.Moves.zTactic trace: 13 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.vxor_assocline 190 sourcestandard axioms: Quot.sound what this means
Statement uses:
Nat, Usa2013P3.Moves,Eq, Usa2013P3.Moves.vxorProof uses:
Usa2013P3.Moves.ext,funext,Fin,Bool,Usa2013P3.Moves.x,id,Bool.xor_assoc,Usa2013P3.Moves.y,Usa2013P3.Moves.zTactic trace: 13 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.vxor_eq_zeroline 197 sourcestandard axioms: Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Eq, Usa2013P3.Moves.vxor, Usa2013P3.zeroMoveProof uses:
Usa2013P3.Moves.ext,funext,Fin,Bool,Usa2013P3.Moves.x,Bool.xor,Bool.false,congrFun,congrArg,Iff.mp, Usa2013P3.xor_eq_false_iff,Usa2013P3.Moves.y,Usa2013P3.Moves.zTactic trace: 13 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.Count.period_shiftline 214 source - lemma
Usa2013P3.Count.card_filter_range_four_mulline 221 source - lemma
Usa2013P3.Count.card_filter_range_periodicCount of a periodic (period 4) predicate overFinset.range (4 * k + r)line 248 sourceSource documentation
Count of a periodic (period 4) predicate over
Finset.range (4 * k + r).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Eq,HAdd.hAdd,OfNat.ofNat,Finset.card,Finset.filter,Bool.true,Finset.range,HMul.hMulProof uses:
Disjoint,Finset,Finset.map,addLeftEmbedding,Eq.mpr,Membership.mem,Not,id,congrArg,propext,Finset.disjoint_left,LT.lt,Iff.mp,Finset.mem_range,And.left,And,Finset.mem_filter,Function.Embedding,Exists,Falseand 20 more37 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
lemma card_filter_range_periodic (q : ℕ → Bool) (hq : ∀ i, q (i + 4) = q i) (k r : ℕ) : ((Finset.range (4 * k + r)).filter fun i => q i = true).card = k * ((Finset.range 4).filter fun i => q i = true).card + ((Finset.range r).filter fun i => q i = true).card := by … - lemma
Usa2013P3.Count.card_fin_filterBridge: counting aℕ-predicate onFin nvs onFinset.range nline 272 sourceSource documentation
Bridge: counting a
ℕ-predicate onFin nvs onFinset.range n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Eq,Finset.card,Fin,Finset.filter,Bool.true,Finset.univ,Finset.rangeProof uses:
Eq.mpr,Finset.sum,ite,OfNat.ofNat,id,congrArg,Finset.card_filter,Fin.sum_univ_eq_sum_range8 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma card_fin_filter (q : ℕ → Bool) (n : ℕ) : (Finset.univ.filter fun i : Fin n => q i.val = true).card = ((Finset.range n).filter fun i => q i = true).card := by … - lemma
Usa2013P3.Count.count_evalCombined: count of a 4-periodic predicate overFin (4 * k + r)line 279 sourceSource documentation
Combined: count of a 4-periodic predicate over
Fin (4 * k + r).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Bool,Eq,HAdd.hAdd,OfNat.ofNat,HMul.hMul,Finset.card,Fin,Finset.filter,Bool.true,Finset.univ,Finset.rangeProof uses:
Eq.mpr,id,congrArg, Usa2013P3.Count.card_fin_filter, Usa2013P3.Count.card_filter_range_periodic16 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma count_eval (P : ℕ → Bool) (hP : ∀ i, P (i + 4) = P i) {n k r : ℕ} (hn : n = 4 * k + r) : (Finset.univ.filter fun i : Fin n => P i.val = true).card = k * ((Finset.range 4).filter fun i => P i = true).card + ((Finset.range r).filter fun i => P i = true).card := by …Mentions: P
- lemma
Usa2013P3.Count.card_range_modeqNumber ofi < nwithi % 2 = n % 2line 287 sourceSource documentation
Number of
i < nwithi % 2 = n % 2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Finset.card,Finset.filter,HMod.hMod,OfNat.ofNat,Finset.range,HDiv.hDivProof uses:
Nat.twoStepInduction,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,HAdd.hAdd,Not,Membership.mem,Finset,Finset.notMem_range_self,And.left,Iff.mp,And,Finset.mem_filter,Eq.mpr,congrArg,Nat.add_mod_right,Insert.insertand 10 more18 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma card_range_modeq (n : ℕ) : ((Finset.range n).filter fun i => i % 2 = n % 2).card = n / 2 := by … - def
Usa2013P3.bvDocumented declaration: bv line 304 sourceSource documentation
The contribution of one direction to the weight of
v ^^ sp ε: the number of flipped lines of that direction, as a function of the "full flip" bitδand the "theta flip" bitτ.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,BoolProof uses:
Finset.card,Finset.filter,Eq,Bool.xor,Bool.and, Usa2013P3.e,Bool.true,Finset.univ2 instances, coercions and auxiliary constants left out.
def bv {n : ℕ} (α : Fin n → Bool) (δ τ : Bool) : ℕ := … - def
Usa2013P3.ponNumber of ones ofαon odd-length lines line 308 sourceSource documentation
Number of ones of
αon odd-length lines.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,BoolProof uses:
Finset.card,Finset.filter,And,Eq,Bool.true, Usa2013P3.e,Bool.false,Finset.univ3 instances, coercions and auxiliary constants left out.
def pon {n : ℕ} (α : Fin n → Bool) : ℕ := … - def
Usa2013P3.qonNumber of ones ofαon even-length lines line 312 sourceSource documentation
Number of ones of
αon even-length lines.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,BoolProof uses:
Finset.card,Finset.filter,And,Eq,Bool.true, Usa2013P3.e,Finset.univ3 instances, coercions and auxiliary constants left out.
def qon {n : ℕ} (α : Fin n → Bool) : ℕ := … - def
Usa2013P3.OcardNumber of odd-length lines in one direction line 316 sourceSource documentation
Number of odd-length lines in one direction.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Finset.card,Fin,Finset.filter,Eq,Bool, Usa2013P3.e,Bool.false,Finset.univ2 instances, coercions and auxiliary constants left out.
def Ocard (n : ℕ) : ℕ := (Finset.univ.filter fun i => e n i = false).card
Mentions: Usa2013P3.e
- def
Usa2013P3.EcardNumber of even-length lines in one direction line 319 sourceSource documentation
Number of even-length lines in one direction.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Finset.card,Fin,Finset.filter,Eq,Bool, Usa2013P3.e,Bool.true,Finset.univ2 instances, coercions and auxiliary constants left out.
def Ecard (n : ℕ) : ℕ := (Finset.univ.filter fun i => e n i = true).card
Mentions: Usa2013P3.e
- lemma
Usa2013P3.Ecard_eqline 321 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq, Usa2013P3.Ecard,HDiv.hDiv,OfNat.ofNatProof uses:
Finset.card,Fin,Finset.filter,Bool,Decidable.decide,HMod.hMod,Bool.true,Finset.univ,Finset.range, Usa2013P3.Count.card_fin_filter, Usa2013P3.e,congrArg,Finset,Finset.filter_congr,Membership.mem,of_eq_true,Iff,Eq.trans,True,congrand 7 more14 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.OE_sumline 334 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HAdd.hAdd, Usa2013P3.Ocard, Usa2013P3.EcardProof uses:
Eq.mpr,Finset.card,Fin,Finset.filter,Bool, Usa2013P3.e,Bool.false,Finset.univ,id,congrArg,Usa2013P3.Ocard.eq_1,Bool.true,Usa2013P3.Ecard.eq_1,Not,Finset,Finset.filter_congr,Membership.mem,Iff,of_eq_true,Eq.transand 16 more11 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.pon_leline 341 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,LE.le, Usa2013P3.pon, Usa2013P3.OcardProof uses:
Finset.card_le_card,Finset.filter,And,Eq,Bool.true, Usa2013P3.e,Bool.false,Finset.univ,Membership.mem,Finset,Eq.mpr,id,And.intro,Finset.mem_univ,And.right,Eq.mp7 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.qon_leline 347 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,LE.le, Usa2013P3.qon, Usa2013P3.EcardProof uses:
Finset.card_le_card,Finset.filter,And,Eq,Bool.true, Usa2013P3.e,Finset.univ,Membership.mem,Finset,Eq.mpr,id,And.intro,Finset.mem_univ,And.right,Eq.mp7 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.card_e_trueCounting ones ofα ^^ con the even-length lines line 354 sourceSource documentation
Counting ones of
α ^^ con the even-length lines.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,Finset.card,Finset.filter,Bool.xor,Bool.true, Usa2013P3.e,Finset.univ,cond,HSub.hSub, Usa2013P3.Ecard, Usa2013P3.qonProof uses:
Bool.false,id,Eq.mpr,congrArg,Finset,Finset.filter_congr,Membership.mem,of_eq_true,Iff,Eq.trans,True,congrFun',Bool.bne_false,iff_self,And,Finset.filter_filter,and_comm,Eq.refl,Eq.symm,congrand 18 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 23 steps
Open to load the checked before-and-after goal states.
lemma card_e_true {n : ℕ} (α : Fin n → Bool) (c : Bool) : ((Finset.univ.filter fun i => e n i = true).filter fun i => (α i ^^ c) = true).card = cond c (Ecard n - qon α) (qon α) := by …Mentions: Usa2013P3.e, Usa2013P3.Ecard, Usa2013P3.qon
- lemma
Usa2013P3.card_e_falseCounting ones ofα ^^ con the odd-length lines line 386 sourceSource documentation
Counting ones of
α ^^ con the odd-length lines.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,Finset.card,Finset.filter,Bool.xor,Bool.true, Usa2013P3.e,Bool.false,Finset.univ,cond,HSub.hSub, Usa2013P3.Ocard, Usa2013P3.ponProof uses:
id,Eq.mpr,congrArg,Finset,Finset.filter_congr,Membership.mem,of_eq_true,Iff,Eq.trans,True,congrFun',Bool.bne_false,iff_self,And,Finset.filter_filter,and_comm,Eq.refl,Eq.symm,congr,bneand 17 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 23 steps
Open to load the checked before-and-after goal states.
lemma card_e_false {n : ℕ} (α : Fin n → Bool) (c : Bool) : ((Finset.univ.filter fun i => e n i = false).filter fun i => (α i ^^ c) = true).card = cond c (Ocard n - pon α) (pon α) := by …Mentions: Usa2013P3.e, Usa2013P3.Ocard, Usa2013P3.pon
- lemma
Usa2013P3.bv_eqMaster formula for the block values line 418 sourceSource documentation
Master formula for the block values.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa2013P3.bv,HAdd.hAdd,cond,Bool.xor,HSub.hSub, Usa2013P3.Ecard, Usa2013P3.qon, Usa2013P3.Ocard, Usa2013P3.ponProof uses:
Finset,Finset.filter,Bool.and, Usa2013P3.e,Bool.true,Finset.univ,Union.union,And,Bool.false,Finset.ext,Eq.mpr,Iff,Membership.mem,Or,id,congr,congrArg,Eq.trans,True,congrFun'and 35 more28 instances, coercions and auxiliary constants left out.
Tactic trace: 40 steps
Open to load the checked before-and-after goal states.
lemma bv_eq {n : ℕ} (α : Fin n → Bool) (δ τ : Bool) : bv α δ τ = cond (δ ^^ τ) (Ecard n - qon α) (qon α) + cond δ (Ocard n - pon α) (pon α) := by …Mentions: Usa2013P3.bv, Usa2013P3.Ecard, Usa2013P3.qon, Usa2013P3.Ocard, Usa2013P3.pon
- lemma
Usa2013P3.bv_ffThe four block values line 462 sourceSource documentation
The four block values.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa2013P3.bv,Bool.false,HAdd.hAdd, Usa2013P3.pon, Usa2013P3.qonProof uses:
Eq.mpr,cond,Bool.xor,HSub.hSub, Usa2013P3.Ecard, Usa2013P3.Ocard,id,congrArg, Usa2013P3.bv_eq,congrFun',congr,Eq.trans,ite,Bool.true,bne_self_eq_false,Bool.cond_eq_ite,ite_eq_right_of_eq_false,Bool.false_eq_true10 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma bv_ff {n : ℕ} (α : Fin n → Bool) : bv α false false = pon α + qon α := by …Mentions: Usa2013P3.bv, Usa2013P3.pon, Usa2013P3.qon
- lemma
Usa2013P3.bv_tfline 467 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa2013P3.bv,Bool.true,Bool.false,HAdd.hAdd,HSub.hSub, Usa2013P3.Ocard, Usa2013P3.pon, Usa2013P3.Ecard, Usa2013P3.qonProof uses:
Eq.mpr,cond,Bool.xor,id,congrArg, Usa2013P3.bv_eq,congrFun',congr,Eq.trans,ite,Bool.bne_false,Bool.cond_eq_ite,ite_eq_left_of_eq_true,eq_self10 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.bv_ftline 473 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa2013P3.bv,Bool.false,Bool.true,HAdd.hAdd, Usa2013P3.pon,HSub.hSub, Usa2013P3.Ecard, Usa2013P3.qonProof uses:
Eq.mpr,cond,Bool.xor, Usa2013P3.Ocard,id,congrArg, Usa2013P3.bv_eq,congrFun',congr,Eq.trans,ite,bne,Bool.not,Bool.bne_true,Bool.not_false,Bool.cond_eq_ite,ite_eq_left_of_eq_true,eq_self,ite_eq_right_of_eq_false,Bool.false_eq_true11 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.bv_ttline 479 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa2013P3.bv,Bool.true,HAdd.hAdd,HSub.hSub, Usa2013P3.Ocard, Usa2013P3.pon, Usa2013P3.qonProof uses:
Eq.mpr,cond,Bool.xor, Usa2013P3.Ecard,id,congrArg, Usa2013P3.bv_eq,congrFun',congr,Eq.trans,ite,Bool.false,bne_self_eq_false,Bool.cond_eq_ite,ite_eq_right_of_eq_false,Bool.false_eq_true,ite_eq_left_of_eq_true,eq_self12 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.pair_idPair identity: the two values obtained by flipping a whole direction sum tonline 487 sourceSource documentation
Pair identity: the two values obtained by flipping a whole direction sum to
n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,HAdd.hAdd, Usa2013P3.bv,Bool.false,Bool.trueProof uses:
Eq.mpr,cond,Bool.xor,HSub.hSub, Usa2013P3.Ecard, Usa2013P3.qon, Usa2013P3.Ocard, Usa2013P3.pon,id,congrArg, Usa2013P3.bv_eq,LE.le, Usa2013P3.pon_le, Usa2013P3.qon_le, Usa2013P3.OE_sum,congrFun',congr,Eq.trans,ite,bne_self_eq_falseand 12 more14 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
lemma pair_id {n : ℕ} (α : Fin n → Bool) (τ : Bool) : bv α false τ + bv α true τ = n := by …Mentions: Usa2013P3.bv
- lemma
Usa2013P3.weight_vxor_spThe weight of a coset element splits into the three block values line 495 sourceSource documentation
The weight of a coset element splits into the three block values.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Bool,Eq, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp,Prod.mk,Prod,HAdd.hAdd, Usa2013P3.bv,Usa2013P3.Moves.x,Usa2013P3.Moves.y,Bool.xor,Usa2013P3.Moves.zProof uses:
of_eq_true,Eq.trans,Finset.card,Fin,Finset.filter,Bool.and, Usa2013P3.e,Bool.true,Finset.univ,True,congr,congrArg,Finset,Finset.filter_congr,Membership.mem,Iff.of_eq,congrFun',Usa2013P3.Moves.mk,funext,Prod.fstand 3 more8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma weight_vxor_sp {n : ℕ} (v : Moves n) (ε1 ε2 ε3 : Bool) : weight (Moves.vxor v (sp n (ε1, ε2, ε3))) = bv v.x ε1 ε3 + bv v.y (ε1 ^^ ε2) ε3 + bv v.z ε2 ε3 := by …Mentions: Usa2013P3.Moves, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp, Usa2013P3.bv
- lemma
Usa2013P3.sum_weightsThe weights of the eight coset elements sum to12nline 501 sourceSource documentation
The weights of the eight coset elements sum to
12n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Eq,HAdd.hAdd, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp,Prod.mk,Bool,Prod,Bool.false,Bool.true,HMul.hMul,OfNat.ofNatProof uses:
Eq.mpr, Usa2013P3.bv,Usa2013P3.Moves.x,Usa2013P3.Moves.y,Bool.xor,Usa2013P3.Moves.z,id,congrFun',congrArg,congr, Usa2013P3.weight_vxor_sp, Usa2013P3.pair_id,Bool.xor_false,Eq.trans,Bool.not,Bool.xor_true,Bool.not_false,Bool.not_true11 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma sum_weights {n : ℕ} (v : Moves n) : weight (Moves.vxor v (sp n (false, false, false))) + weight (Moves.vxor v (sp n (false, false, true))) + weight (Moves.vxor v (sp n (false, true, false))) + weight (Moves.vxor v (sp n (false, true, true))) + weight (Moves.vxor v (sp n (true, false, false))) + weight (Moves.vxor v (sp n (true, false, true))) + weight (Moves.vxor v (sp n (true, true, false))) + weight (Moves.vxor v (sp n (true, true, true))) = 12 * n := by …Mentions: Usa2013P3.Moves, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp
- lemma
Usa2013P3.pair_weightline 519 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Bool,Eq,HAdd.hAdd, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp,Prod.mk,Prod,Bool.false,Bool.true,HMul.hMul,OfNat.ofNat, Usa2013P3.bv,Usa2013P3.Moves.xProof uses:
Usa2013P3.Moves.y, Usa2013P3.pair_id,Usa2013P3.Moves.z,Eq.mpr,Bool.xor,id,congrArg, Usa2013P3.weight_vxor_sp,congrFun',congr,Bool.false_xor,Eq.symm,Bool.xor_false,Eq.trans,Bool.not,Bool.xor_true,Bool.not_true,Eq.refl14 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.pair_weight_yPairing to isolate they-block line 532 sourceSource documentation
Pairing to isolate the
y-block.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Bool,Eq,HAdd.hAdd, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp,Prod.mk,Prod,Bool.false,Bool.true,Bool.not,HMul.hMul,OfNat.ofNat, Usa2013P3.bv,Usa2013P3.Moves.yProof uses:
Usa2013P3.Moves.x, Usa2013P3.pair_id,Usa2013P3.Moves.z,Eq.mpr,Bool.xor,id,congrArg, Usa2013P3.weight_vxor_sp,congrFun',congr,bne_self_eq_false,Eq.trans,Bool.not_false,Eq.symm,bne,Bool.bne_true,Bool.not_true,Bool.bne_false,Eq.refl17 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma pair_weight_y {n : ℕ} (v : Moves n) (ε2 τ : Bool) : weight (Moves.vxor v (sp n (false, ε2, τ))) + weight (Moves.vxor v (sp n (true, !ε2, τ))) = 2 * bv v.y ε2 τ + 2 * n := by …Mentions: Usa2013P3.Moves, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp, Usa2013P3.bv
- lemma
Usa2013P3.pair_weight_zPairing to isolate thez-block line 541 sourceSource documentation
Pairing to isolate the
z-block.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Bool,Eq,HAdd.hAdd, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp,Prod.mk,Prod,Bool.false,Bool.true,HMul.hMul,OfNat.ofNat, Usa2013P3.bv,Usa2013P3.Moves.zProof uses:
Usa2013P3.Moves.x, Usa2013P3.pair_id,Usa2013P3.Moves.y,Eq.mpr,Bool.xor,id,congrArg, Usa2013P3.weight_vxor_sp,congrFun',congr,bne_self_eq_false,Bool.bne_false,Eq.symm,Eq.trans,bne,Bool.not,Bool.bne_true,Bool.not_false,Eq.refl17 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma pair_weight_z {n : ℕ} (v : Moves n) (ε2 τ : Bool) : weight (Moves.vxor v (sp n (false, ε2, τ))) + weight (Moves.vxor v (sp n (true, ε2, τ))) = 2 * bv v.z ε2 τ + 2 * n := by …Mentions: Usa2013P3.Moves, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp, Usa2013P3.bv
- lemma
Usa2013P3.graph_ofDocumented declaration: graph_of line 552 sourceSource documentation
In the case
n = 4k + 3, if all eight coset weights are at least6k+4, then for each block the two values where the block contributes2k+1form the graph ofδ ↦ τ ⊕ cfor some bitc.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa2013P3.Ocard,HAdd.hAdd,HMul.hMul,OfNat.ofNat, Usa2013P3.Ecard,And,LE.le, Usa2013P3.bv,Exists,Iff,Bool.xorProof uses:
Bool.false,Bool.true, Usa2013P3.qon,Eq.mpr, Usa2013P3.pon,id,congrArg, Usa2013P3.bv_ff,HSub.hSub, Usa2013P3.bv_tt, Usa2013P3.pon_le, Usa2013P3.bv_ft, Usa2013P3.qon_le, Usa2013P3.pair_id,dite,Exists.intro,of_eq_true,Eq.trans,True,congrand 19 more44 instances, coercions and auxiliary constants left out.
Tactic trace: 45 steps
Open to load the checked before-and-after goal states.
lemma graph_of {n : ℕ} (α : Fin n → Bool) (k : ℕ) (hO : Ocard n = 2 * k + 2) (hE : Ecard n = 2 * k + 1) (hb : ∀ δ τ : Bool, 2 * k + 1 ≤ bv α δ τ ∧ bv α δ τ ≤ 2 * k + 2) : ∃ c : Bool, ∀ δ τ : Bool, (bv α δ τ = 2 * k + 1) ↔ ((δ ^^ τ) = c) := by …Mentions: Usa2013P3.Ocard, Usa2013P3.Ecard, Usa2013P3.bv
- lemma
Usa2013P3.upper_boundThe upper bound: every coset contains an element of weight at most6 * (n / 4) + n % 4line 592 sourceSource documentation
The upper bound: every coset contains an element of weight at most
6 * (n / 4) + n % 4. The proof averages the eight coset weights (their sum is always12n), with a parity refinement whenn % 4 ∈ {2, 3}.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Moves,Exists,Prod,Bool,LE.le, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp, Usa2013P3.answerProof uses:
Decidable.byContradiction,Not,Eq,HAdd.hAdd,Prod.mk,Bool.false,Bool.true,HMul.hMul,OfNat.ofNat, Usa2013P3.sum_weights,And,LT.lt,False,Exists.intro,HDiv.hDiv,HMod.hMod,And.intro,Eq.mp,Eq.trans,binderNameHintand 56 more68 instances, coercions and auxiliary constants left out.
Tactic trace: 135 steps
Open to load the checked before-and-after goal states.
lemma upper_bound {n : ℕ} (v : Moves n) : ∃ ε : Bool × Bool × Bool, weight (Moves.vxor v (sp n ε)) ≤ answer n := by …Mentions: Usa2013P3.Moves, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp, Usa2013P3.answer
- lemma
Usa2013P3.lt_n2Proof-producing helpers for token indices (kept as term-mode applications so that indices are syntactically reproducible) line 696 sourceSource documentation
Proof-producing helpers for token indices (kept as term-mode applications so that indices are syntactically reproducible).
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,LT.lt,HSub.hSub8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma lt_n2 {n : ℕ} (hn : 2 ≤ n) : n - 2 < n := by lia - lemma
Usa2013P3.lt_n1line 697 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,LT.lt,HSub.hSub8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.lt_n1jline 698 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HSub.hSub,OfNat.ofNat6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.lt_n2mline 699 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,OfNat.ofNat,HSub.hSub11 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.tp_yline 700 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,HSub.hSub,OfNat.ofNat8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.tp_zline 701 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,HSub.hSub,OfNat.ofNat8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.tp_y1line 702 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,LT.lt,HAdd.hAdd,HSub.hSub10 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.tp_lastline 703 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,HAdd.hAdd,HSub.hSub9 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.convFinConverting betweenFin nindices with equal values line 706 sourceSource documentation
Converting between
Fin nindices with equal values.no axioms what this means
Statement uses:
Nat,Fin,Bool,LT.lt,Eq,Fin.mkProof uses:
Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma convFin {n : ℕ} (f : Fin n → Bool) (a b : ℕ) (ha : a < n) (hb : b < n) (hab : a = b) : f ⟨a, ha⟩ = f ⟨b, hb⟩ := by …Mentions: Usa2013P3.f
- lemma
Usa2013P3.kernel_of_reductionDocumented declaration: kernel_of_reduction line 715 sourceSource documentation
The main reduction: if
vacts trivially on all tokens andSis a span element that agrees withvon the three "boundary" lines (the length-ny-line, the length-nz-line and the length-2x-line), thenv = S. This is the propagation step of the kernel classification.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le, Usa2013P3.Moves,Eq, Usa2013P3.Token,Bool, Usa2013P3.applyMoves,Bool.false,Usa2013P3.Moves.y,Fin.mk,Usa2013P3.Moves.z,Usa2013P3.Moves.x,HSub.hSub, Usa2013P3.lt_n2Proof uses: Usa2013P3.Moves.vxor,
rfl,funext,Eq.mpr,Bool.xor,id,congrArg, Usa2013P3.applyMoves_vxor,of_eq_true,Eq.trans,True,congrFun',congr,congrFun,bne_self_eq_false,eq_self,HAdd.hAdd, Usa2013P3.lt_left, Usa2013P3.lt_right, Usa2013P3.lt_third and 29 more23 instances, coercions and auxiliary constants left out.
Tactic trace: 106 steps
Open to load the checked before-and-after goal states.
lemma kernel_of_reduction {n : ℕ} (hn : 0 < n) (hn2 : 2 ≤ n) (v S : Moves n) (hv : applyMoves v = fun _ => false) (hS : applyMoves S = fun _ => false) (hy : S.y ⟨0, hn⟩ = v.y ⟨0, hn⟩) (hz : S.z ⟨0, hn⟩ = v.z ⟨0, hn⟩) (hx : S.x ⟨n - 2, lt_n2 hn2⟩ = v.x ⟨n - 2, lt_n2 hn2⟩) : v = S := by …Mentions: S, Usa2013P3.Moves, Usa2013P3.applyMoves, Usa2013P3.lt_n2
- lemma
Usa2013P3.kernel_eq_spanThe kernel classification: a move that flips every token an even number of times is one of the eight span elements line 827 sourceSource documentation
The kernel classification: a move that flips every token an even number of times is one of the eight span elements.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat, Usa2013P3.Moves,Eq, Usa2013P3.Token,Bool, Usa2013P3.applyMoves,Bool.false,Exists,Prod, Usa2013P3.spProof uses:
LE.le,Or,Fin,Fin.mk,rfl,Bool.xor,Usa2013P3.Moves.x,Usa2013P3.Moves.y,Usa2013P3.Moves.z,HAdd.hAdd,congrFun,Subtype.mk,Prod.fst,Prod.snd,Prod.mk,funext,congrArg,Subsingleton.elim,Exists.intro,Usa2013P3.Moves.extand 44 more30 instances, coercions and auxiliary constants left out.
Tactic trace: 120 steps
Open to load the checked before-and-after goal states.
lemma kernel_eq_span {n : ℕ} (hn : 0 < n) {v : Moves n} (hv : applyMoves v = fun _ => false) : ∃ ε : Bool × Bool × Bool, v = sp n ε := by …Mentions: Usa2013P3.Moves, Usa2013P3.applyMoves, Usa2013P3.sp
- def
Usa2013P3.P12The four line-flipping patterns used for the extremal configuration: flip the lines whose index is1or2modulo4line 908 sourceSource documentation
The four line-flipping patterns used for the extremal configuration: flip the lines whose index is
1or2modulo4.no axioms what this means
Statement uses:
Nat,BoolProof uses:
Decidable.decide,Or,Eq,HMod.hMod,OfNat.ofNat5 instances, coercions and auxiliary constants left out.
def P12 : ℕ → Bool := fun i => decide (i % 4 = 1 ∨ i % 4 = 2)
- def
Usa2013P3.P03Indices0or3modulo4line 910 sourceSource documentation
Indices
0or3modulo4.no axioms what this means
Statement uses:
Nat,BoolProof uses:
Decidable.decide,Or,Eq,HMod.hMod,OfNat.ofNat5 instances, coercions and auxiliary constants left out.
def P03 : ℕ → Bool := fun i => decide (i % 4 = 0 ∨ i % 4 = 3)
- def
Usa2013P3.P23Indices2or3modulo4line 912 sourceSource documentation
Indices
2or3modulo4.no axioms what this means
Statement uses:
Nat,BoolProof uses:
Decidable.decide,Or,Eq,HMod.hMod,OfNat.ofNat5 instances, coercions and auxiliary constants left out.
def P23 : ℕ → Bool := fun i => decide (i % 4 = 2 ∨ i % 4 = 3)
- def
Usa2013P3.P01Indices0or1modulo4line 914 sourceSource documentation
Indices
0or1modulo4.no axioms what this means
Statement uses:
Nat,BoolProof uses:
Decidable.decide,Or,Eq,HMod.hMod,OfNat.ofNat5 instances, coercions and auxiliary constants left out.
def P01 : ℕ → Bool := fun i => decide (i % 4 = 0 ∨ i % 4 = 1)
- lemma
Usa2013P3.P12_perline 916 sourcestandard axioms: propext what this means
Statement uses:
Nat,Eq,Bool, Usa2013P3.P12,HAdd.hAdd,OfNat.ofNatProof uses:
of_eq_true,Eq.trans,Bool.or,Decidable.decide,HMod.hMod,True,congr,congrArg,Or,Decidable.decide.congr_simp,congrFun',Nat.add_mod_right,Bool.decide_or,eq_self10 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.P03_perline 917 sourcestandard axioms: propext what this means
Statement uses:
Nat,Eq,Bool, Usa2013P3.P03,HAdd.hAdd,OfNat.ofNatProof uses:
of_eq_true,Eq.trans,Bool.or,Decidable.decide,HMod.hMod,True,congr,congrArg,Or,Decidable.decide.congr_simp,congrFun',Nat.add_mod_right,Bool.decide_or,eq_self10 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.P23_perline 918 sourcestandard axioms: propext what this means
Statement uses:
Nat,Eq,Bool, Usa2013P3.P23,HAdd.hAdd,OfNat.ofNatProof uses:
of_eq_true,Eq.trans,Bool.or,Decidable.decide,HMod.hMod,True,congr,congrArg,Or,Decidable.decide.congr_simp,congrFun',Nat.add_mod_right,Bool.decide_or,eq_self10 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.P01_perline 919 sourcestandard axioms: propext what this means
Statement uses:
Nat,Eq,Bool, Usa2013P3.P01,HAdd.hAdd,OfNat.ofNatProof uses:
of_eq_true,Eq.trans,Bool.or,Decidable.decide,HMod.hMod,True,congr,congrArg,Or,Decidable.decide.congr_simp,congrFun',Nat.add_mod_right,Bool.decide_or,eq_self10 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- def
Usa2013P3.v0ofMoves built from three periodic patterns line 922 sourceSource documentation
Moves built from three periodic patterns.
no axioms what this means
Statement uses:
Nat,Bool, Usa2013P3.MovesProof uses:
Usa2013P3.Moves.mk,Fin1 instances, coercions and auxiliary constants left out.
def v0of (n : ℕ) (Px Py Pz : ℕ → Bool) : Moves n := …
Mentions: Usa2013P3.Moves
- lemma
Usa2013P3.card_range4line 925 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,DecidablePred,Eq,Finset.card,Finset.filter,Finset.range,OfNat.ofNat,HAdd.hAdd,iteProof uses:
Eq.mpr,Finset.sum,id,congrArg,Finset.card_filter,Finset.sum_range_succ,of_eq_true,Eq.trans,True,congrFun',EmptyCollection.emptyCollection,Finset,Finset.sum_boole,Finset.filter_empty,CharP.cast_eq_zero,zero_add,eq_self27 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.card_range0line 933 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,DecidablePred,Eq,Finset.card,Finset.filter,Finset.range,OfNat.ofNatProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,Finset,EmptyCollection.emptyCollection,Finset.filter_empty,eq_self3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.card_range1line 936 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,DecidablePred,Eq,Finset.card,Finset.filter,Finset.range,OfNat.ofNat,iteProof uses:
Eq.mpr,Finset.sum,id,congrArg,Finset.card_filter,HAdd.hAdd,Finset.sum_range_succ,of_eq_true,Eq.trans,True,congrFun',EmptyCollection.emptyCollection,Finset,Finset.sum_boole,Finset.filter_empty,CharP.cast_eq_zero,zero_add,eq_self24 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.card_range2line 942 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,DecidablePred,Eq,Finset.card,Finset.filter,Finset.range,OfNat.ofNat,HAdd.hAdd,iteProof uses:
Eq.mpr,Finset.sum,id,congrArg,Finset.card_filter,Finset.sum_range_succ,of_eq_true,Eq.trans,True,congrFun',EmptyCollection.emptyCollection,Finset,Finset.sum_boole,Finset.filter_empty,CharP.cast_eq_zero,zero_add,eq_self27 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.card_range3line 948 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,DecidablePred,Eq,Finset.card,Finset.filter,Finset.range,OfNat.ofNat,HAdd.hAdd,iteProof uses:
Eq.mpr,Finset.sum,id,congrArg,Finset.card_filter,Finset.sum_range_succ,of_eq_true,Eq.trans,True,congrFun',EmptyCollection.emptyCollection,Finset,Finset.sum_boole,Finset.filter_empty,CharP.cast_eq_zero,zero_add,eq_self27 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2013P3.pon_evalEvaluatingponof a pattern move line 956 sourceSource documentation
Evaluating
ponof a pattern move.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,HAdd.hAdd,OfNat.ofNat,HMul.hMul,HMod.hMod, Usa2013P3.pon,Finset.card,Finset.filter,Bool.and,Bool.not,Decidable.decide,Bool.true,Finset.rangeProof uses: Usa2013P3.e,
Finset.univ,congrArg,Finset,And,Bool.false,Finset.filter_congr,Membership.mem,Iff,of_eq_true,Eq.trans,False,True,congr,Bool.false_eq_true,eq_self,and_true,congrFun',Bool.not_false,Bool.and_trueand 20 more34 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma pon_eval {n : ℕ} (F : Fin n → Bool) (P : ℕ → Bool) (hF : ∀ i, F i = P i.val) (hP : ∀ i, P (i + 4) = P i) {k r s : ℕ} (hk : n = 4 * k + r) (hn2 : n % 2 = s) : pon F = k * (((Finset.range 4).filter fun i => ((P i && !decide (i % 2 = s))) = true).card) + (((Finset.range r).filter fun i => ((P i && !decide (i % 2 = s))) = true).card) := by …Mentions: P, Usa2013P3.pon
- lemma
Usa2013P3.qon_evalEvaluatingqonof a pattern move line 975 sourceSource documentation
Evaluating
qonof a pattern move.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,HAdd.hAdd,OfNat.ofNat,HMul.hMul,HMod.hMod, Usa2013P3.qon,Finset.card,Finset.filter,Bool.and,Decidable.decide,Bool.true,Finset.rangeProof uses: Usa2013P3.e,
Finset.univ,congrArg,Finset,And,Finset.filter_congr,Membership.mem,Iff.symm,Bool.and_eq_true_iff,Eq.mpr,id,Iff,of_eq_true,Eq.trans,True,congr,Bool.and_eq_true,decide_eq_true_eq,iff_self, Usa2013P3.Count.card_fin_filter and 9 more30 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma qon_eval {n : ℕ} (F : Fin n → Bool) (P : ℕ → Bool) (hF : ∀ i, F i = P i.val) (hP : ∀ i, P (i + 4) = P i) {k r s : ℕ} (hk : n = 4 * k + r) (hn2 : n % 2 = s) : qon F = k * (((Finset.range 4).filter fun i => ((P i && decide (i % 2 = s))) = true).card) + (((Finset.range r).filter fun i => ((P i && decide (i % 2 = s))) = true).card) := by …Mentions: P, Usa2013P3.qon
- lemma
Usa2013P3.lower_boundThe lower bound: an explicit move all of whose coset elements have weight at least6 * (n / 4) + n % 4line 993 sourceSource documentation
The lower bound: an explicit move all of whose coset elements have weight at least
6 * (n / 4) + n % 4.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Exists, Usa2013P3.Moves,Prod,Bool,LE.le, Usa2013P3.answer, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.spProof uses:
And,Eq,HAdd.hAdd,HMul.hMul,OfNat.ofNat,LT.lt,Exists.intro,HDiv.hDiv,HMod.hMod,And.intro,dite, Usa2013P3.v0of, Usa2013P3.P01,id, Usa2013P3.Ecard, Usa2013P3.Ecard_eq, Usa2013P3.Ocard, Usa2013P3.OE_sum, Usa2013P3.pon,Usa2013P3.Moves.xand 81 more97 instances, coercions and auxiliary constants left out.
Tactic trace: 140 steps
Open to load the checked before-and-after goal states.
lemma lower_bound {n : ℕ} : ∃ v : Moves n, ∀ ε : Bool × Bool × Bool, answer n ≤ weight (Moves.vxor v (sp n ε)) := by …Mentions: Usa2013P3.Moves, Usa2013P3.answer, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp
- lemma
Usa2013P3.f_lef Cis at most the weight of any move producingCline 1080 sourceSource documentation
f Cis at most the weight of any move producingC.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Token,Bool, Usa2013P3.Moves,Eq, Usa2013P3.applyMoves,LE.le, Usa2013P3.f, Usa2013P3.weightProof uses:
Nat.sInf_le,Set.ofPred,Exists,And,Exists.intro,And.intro,rfl1 instances, coercions and auxiliary constants left out.
lemma f_le {n : ℕ} {C : Token n → Bool} {v : Moves n} (h : applyMoves v = C) : f C ≤ weight v := …Mentions: Usa2013P3.Token, Usa2013P3.Moves, h, Usa2013P3.applyMoves, Usa2013P3.f, Usa2013P3.weight
- lemma
Usa2013P3.f_specThe minimum is attained: some move producesCwith weightf Cline 1085 sourceSource documentation
The minimum is attained: some move produces
Cwith weightf C.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Token,Bool, Usa2013P3.Admissible,Exists, Usa2013P3.Moves,And,Eq, Usa2013P3.applyMoves, Usa2013P3.weight, Usa2013P3.fProof uses:
Membership.mem,Set,Set.ofPred,InfSet.sInf,Nat.sInf_mem,Exists.intro,And.intro,rfl4 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma f_spec {n : ℕ} {C : Token n → Bool} (hC : Admissible C) : ∃ w : Moves n, applyMoves w = C ∧ weight w = f C := by …Mentions: Usa2013P3.Token, Usa2013P3.Admissible, Usa2013P3.Moves, Usa2013P3.applyMoves, Usa2013P3.weight, Usa2013P3.f
- lemma
Usa2013P3.f_le_answerThe upper bound forfline 1095 sourceSource documentation
The upper bound for
f.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2013P3.Token,Bool, Usa2013P3.Admissible,LE.le, Usa2013P3.f, Usa2013P3.answerProof uses: Usa2013P3.Moves,
Eq, Usa2013P3.applyMoves,Prod, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp,Exists, Usa2013P3.upper_bound,le_trans, Usa2013P3.f_le,Eq.mpr,id,congrArg,Eq.symm,funext,Bool.xor, Usa2013P3.applyMoves_vxor,Bool.false, Usa2013P3.applyMoves_sp and 6 more4 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
lemma f_le_answer {n : ℕ} (C : Token n → Bool) (hC : Admissible C) : f C ≤ answer n := by …Mentions: Usa2013P3.Token, Usa2013P3.Admissible, Usa2013P3.f, Usa2013P3.answer
- lemma
Usa2013P3.answer_le_fThe lower bound forf: some admissible configuration needs at leastanswer noperations line 1107 sourceSource documentation
The lower bound for
f: some admissible configuration needs at leastanswer noperations.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Exists, Usa2013P3.Token,Bool,And, Usa2013P3.Admissible,LE.le, Usa2013P3.answer, Usa2013P3.fProof uses: Usa2013P3.Moves,
Prod, Usa2013P3.weight, Usa2013P3.Moves.vxor, Usa2013P3.sp, Usa2013P3.lower_bound,Exists.intro, Usa2013P3.applyMoves,And.intro,Eq,rfl, Usa2013P3.kernel_eq_span,funext,Bool.false,Eq.mpr,Bool.xor,id,congrArg, Usa2013P3.applyMoves_vxor,of_eq_trueand 13 more11 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma answer_le_f {n : ℕ} (hn : 0 < n) : ∃ C : Token n → Bool, Admissible C ∧ answer n ≤ f C := by …Mentions: Usa2013P3.Token, Usa2013P3.Admissible, Usa2013P3.answer, Usa2013P3.f
- problem
Usa2013P3.usa2013_p3line 1129 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,IsGreatest,Set.ofPred,Exists, Usa2013P3.Token,Bool,And, Usa2013P3.Admissible,Eq, Usa2013P3.f, Usa2013P3.answerProof uses:
LE.le, Usa2013P3.answer_le_f, Usa2013P3.f_le_answer,le_antisymm,And.intro,Membership.mem,Set,upperBounds,Exists.intro11 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.