File size: 3,411 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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