math / data /lean /OAI /Combinatorics /EditApproximation /Geometry /ChargedRandomMemo.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.41 kB
import OAI.Combinatorics.EditApproximation.Geometry.ChargedRandomGlobalQuery
import OAI.Combinatorics.EditApproximation.Refinement.PhysicalRandomValue
import OAI.Combinatorics.EditApproximation.Geometry.SourceRankedProgram
import OAI.Combinatorics.EditApproximation.Definitions
namespace OAI
/-! The charged evaluator actually caches random source coordinates and
physical entries in one rank-decreasing memo computation. -/
namespace EditApproximation
section Memo
variable {Οƒ Ξ± : Type*} [DecidableEq Ξ±] {M J R : β„•} [NeZero M] [NeZero R]
(source target : List Ξ±) (N P F exponent H Q T S passes copies : β„•)
(factor : β„• β†’ β„š) (multiplier : β„• β†’ β„•) (tau eta kappa delta : β„š)
(readGroup : β„• β†’ β„• β†’ PhysicalInternalNode M J β†’ Fin R β†’ GroupScalarKey M F Q β†’ FiniteQuery Οƒ)
(readInteger : β„• β†’ β„• β†’ PhysicalInternalNode M J β†’ Fin R β†’
(β„• Γ— TargetInterval target.length) β†’ β„• β†’ FiniteQuery Οƒ)
(initial : PhysicalEntry M J target.length β†’ β„•)
(sourceAnswer : Οƒ β†’ β„š)
theorem chargedRandomMemoEvaluate_value
(group : β„• β†’ β„• β†’ PhysicalInternalNode M J β†’ Fin R β†’ CellGroupDraws M F Q)
(integer : β„• β†’ β„• β†’ PhysicalInternalNode M J β†’ Fin R β†’ β„• β†’ TargetInterval target.length β†’ β„•)
(hgroup : βˆ€ pass copy node time key, (readGroup pass copy node time key).value sourceAnswer =
groupScalarValue (group pass copy node time) key)
(honline : βˆ€ pass copy (node : PhysicalInternalNode M J) time key,
(readInteger pass copy node time key
(keyedOnlineSourceRange source target (physicalSourceInterval source.length node.val)
P exponent H tau (fun i r => (βˆ‘ j : Fin T, localRequestValue source target N P F exponent H Q T S
copies factor multiplier tau eta kappa delta group integer initial (PhysicalTableRequest.warmup
pass copy (physicalChild node.val node.property i) j.val r)) / T) key)).value sourceAnswer =
(integer pass copy node time key.1 key.2 : β„š))
(bits : β„•) (encode : Sum Οƒ (ChargedPhysicalRequest M J target.length passes copies T S) β†’ β„•)
(hinjective : Function.Injective encode) (hbounded : βˆ€ key, encode key < 2 ^ bits)
(request : ChargedPhysicalRequest M J target.length passes copies T S) :
(chargedRandomMemoEvaluate source target N P F exponent H Q T S passes copies factor multiplier
tau eta kappa delta readGroup readInteger initial sourceAnswer bits encode request).value =
chargedRequestValue source target N P F exponent H Q T S passes copies factor multiplier
tau eta kappa delta group integer initial request := by
unfold chargedRandomMemoEvaluate
exact SourceRanked.memo_value ChargedPhysicalRequest.rank _ sourceAnswer
(chargedRequestValue source target N P F exponent H Q T S passes copies factor multiplier
tau eta kappa delta group integer initial)
(chargedRandomGlobalQuery_value source target N P F exponent H Q T S passes copies factor multiplier
tau eta kappa delta readGroup readInteger initial group integer sourceAnswer
(physicalRandomBoundedQuery_localValue source target N P F exponent H Q T S passes copies factor
multiplier tau eta kappa delta group integer initial readGroup readInteger sourceAnswer hgroup honline))
bits encode hinjective hbounded (.inr request)
end Memo
end EditApproximation
end OAI