import OAI.Computability.SpaceSimulation.Epoch.Nodes namespace OAI namespace Fifths.Tour variable (D : Tour) attribute [local irreducible] Fifths.Circuit.price theorem coins_array {e i} (l : e simp [baseOf,D.ae l b,D.ac l b,b.le] at p | succ e => have h : e cases e with | zero => simp [baseOf,D.he l b,D.hc l b] at p | succ e => have f : D.col (D.hV (e+1) 0) = D.N := D.hc l b have h : e have f : D.col (D.hV e (j+1)) > D.N := by rw [D.hc l b]; omega have q : j ≤ D.k := by omega simp only [header,guesses,childrenOf,D.he l b,D.hr l b,not_le.mpr f,Nat.not_lt.mpr f.le, Ne.symm f.ne,↓reduceIte,Nat.add_sub_cancel,coins_history D l b,coins_history D l q, show D.circuit.price D.guessLength = D.coinsHard from rfl] constructor · nlinarith · intro i u; rw [D.coins_array l u]; omega theorem covers : D.circuit.Meter D.coins where cheap := fun v h => (D.supplied v h).1 expensive := fun v h => (D.supplied v h).2 theorem coins_total (v : D.Vertex) : D.coins v ≤ D.E * D.per := by obtain (⟨e,l,j,b,rfl⟩|⟨e,l,j,b,rfl⟩) := D.either v · rw [D.coins_array l b] exact Nat.mul_le_mul_right _ (Nat.le_of_lt l) · rw [D.coins_history l b] calc _ ≤ (e+1)*D.per := by unfold per; nlinarith _ ≤ _ := Nat.mul_le_mul_right _ l end Fifths.Tour end OAI