cfahlgren1's picture
download
raw
2.13 kB
import OAI.Combinatorics.EditApproximation.Geometry.RankedMemoAddressWork
import OAI.Combinatorics.EditApproximation.Definitions
namespace OAI
namespace EditApproximation
/-- Count local arithmetic only on a cache miss, following exactly the
recursive evaluator's returned values, requests and intermediate memories. -/
theorem rankedMemoKernelWork_le {κ : Type*} (rank : κ → ℕ)
(program : (key : κ) → FiniteQuery {child : κ // rank child < rank key})
(bits : ℕ) (encode cost : κ → ℕ) (C : ℕ) (hcost : ∀ key, cost key ≤ C)
(key : κ) (memory : BinaryMemo ℚ) :
rankedMemoKernelWork rank program bits encode cost key memory ≤
C * (rankedMemoEvaluate rank program bits encode key memory).requests := by
have hall : ∀ level key, rank key = level → ∀ memory,
rankedMemoKernelWork rank program bits encode cost key memory ≤
C * (rankedMemoEvaluate rank program bits encode key memory).requests := by
intro level
induction level using Nat.strong_induction_on with
| h level ih =>
intro key hlevel memory
rw [rankedMemoKernelWork, rankedMemoEvaluate]
split
· rename_i result hfound
simp only
exact Nat.zero_le _
· rename_i hfound
simp only
have hchildren : ∀ (child : {child : κ // rank child < rank key}) previous,
rankedMemoKernelWork rank program bits encode cost child.val previous ≤
C * (rankedMemoEvaluate rank program bits encode child.val previous).requests := by
intro child previous
exact ih (rank child.val) (by simpa only [← hlevel] using child.property) child.val rfl previous
have hr := FiniteQuery.requestWork_le
(fun child previous => rankedMemoEvaluate rank program bits encode child.val previous)
(fun child previous => rankedMemoKernelWork rank program bits encode cost child.val previous)
C hchildren (program key) memory
have hk := hcost key
rw [Nat.mul_add, Nat.mul_one]
omega
exact hall (rank key) key rfl memory
end EditApproximation
end OAI

Xet Storage Details

Size:
2.13 kB
·
Xet hash:
ab309b3d357cfbeef9fd7cecf06e2f4c8667669b1611bdc281caec4de8b159b0

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