cfahlgren1's picture
download
raw
1.61 kB
import Mathlib
import OAI.Analysis.MatrixSigning.Machines.MachineCombinators
namespace OAI
section
namespace CurrentKS.RoutineLength
open KS.W01.FixedStack KS.W29.FixedSequential KS.W03.MachineCombinators
lemma action_length (a : KS.W29.StackAction) (w : List Bool) :
(a.apply w).length≤w.length+1 := by
cases a <;> simp [KS.W29.StackAction.apply]; omega
lemma step_length (M : KS.W01.FixedStack.Machine) (s : KS.W01.FixedStack.Config M.stackCount M.states) (b : Bool)
(j : Fin M.stackCount) : ((M.step s b).«stacks» j).length ≤ (s.«stacks» j).length+1 := by
rcases s with ⟨control,tapes⟩
cases control with
| none => simp [KS.W01.FixedStack.Machine.step]
| some c => exact action_length _ _
lemma run_length (M : KS.W01.FixedStack.Machine) (s : KS.W01.FixedStack.Config M.stackCount M.states) (bits : List Bool)
(j : Fin M.stackCount) : ((M.run s bits).«stacks» j).length ≤ (s.«stacks» j).length+bits.length := by
induction bits generalizing s with
| nil => simp [KS.W01.FixedStack.Machine.run]
| cons b bs ih =>
have h := ih (M.step s b)
have hs := step_length M s b j
simp only [KS.W01.FixedStack.Machine.run,List.length_cons]
omega
lemma output_length {k : ℕ} {P : Program k} {before after : Fin k → List Bool} {ticks : ℕ}
(h : RunSpec P before after ticks) (j : Fin k) :
(after j).length≤(before j).length+ticks := by
have hr := run_length P.toMachine ⟨some P.initial,before⟩ (List.replicate ticks false) j
rw [h _ (List.length_replicate ..)] at hr
simpa using hr
end CurrentKS.RoutineLength
end
end OAI

Xet Storage Details

Size:
1.61 kB
·
Xet hash:
497d3406e7054fae1fd6dab57d5eb7dc77e43c42ba232f0b1ba5474ce1951c50

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.