File size: 3,628 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 62 63 64 65 66 67 68 69 | import OAI.Combinatorics.EditApproximation.Binary.BinaryCountedOptimizerSpace
import OAI.Combinatorics.EditApproximation.Queries.QueryCoordinateSpace
import OAI.Combinatorics.EditApproximation.Binary.BinaryEnvelopeSpace
import OAI.Combinatorics.EditApproximation.Definitions
namespace OAI
namespace EditApproximation.BinaryFraction
/-- All counted optimizer allocations, including coordinate construction. -/
theorem countedPreparedActionAllocation_le_work {M n : β} (mass : Vector BinaryFraction M)
(read : β β Fin M Γ TargetInterval n β BinaryFraction Γ β)
(footprint : β β Fin M Γ TargetInterval n β β)
(eta kappa : BinaryFraction) (band : List (Fin M β TargetInterval n)) (G j t : β)
(h : β s coordinate, footprint s coordinate β€ (read s coordinate).2) :
countedPreparedActionAllocation mass read footprint eta kappa band G j t β€
3 * (countedPreparedActionReadWithWork mass read eta kappa band G j t).2 := by
have hc := coordinateVectorAllocation_le_work band
have hk := countedPreparedActionKernelAllocation_le_work mass read footprint eta kappa band G j t h
have hlocal : (coordinateVectorWithWork band).2 β€
(countedPreparedActionReadWithWork mass read eta kappa band G j t).2 := by
unfold countedPreparedActionReadWithWork
dsimp only
omega
unfold countedPreparedActionAllocation
omega
theorem countedBandActionAllocation_le_work {M n : β} (b : β)
(initial : Fin M β TargetInterval n β BinaryFraction Γ β)
(initialAllocation : Fin M β TargetInterval n β β)
(read : β β Fin M Γ TargetInterval n β BinaryFraction Γ β)
(footprint : β β Fin M Γ TargetInterval n β β)
(eta kappa : BinaryFraction) (band : List (Fin M β TargetInterval n)) (G j t : β)
(hi : β i state, initialAllocation i state β€ (initial i state).2)
(hr : β s coordinate, footprint s coordinate β€ (read s coordinate).2) :
countedBandActionAllocation b initial initialAllocation read footprint eta kappa band G j t β€
3 * (countedBandActionReadWithWork b initial read eta kappa band G j t).2 := by
have he := envelopeVectorReadAllocation_le_work b band initial initialAllocation (fun i action _ => hi i (action i))
have hc := countedPreparedActionAllocation_le_work (envelopeVectorReadWithWork b band initial).1
read footprint eta kappa band G j t hr
unfold countedBandActionAllocation countedBandActionReadWithWork
dsimp only
omega
/-- The actual gathered-history specialization of the labeled action sampler. -/
def queryCountedActionAllocation {M n : β} (mass : Vector BinaryFraction M)
(keys : List (Fin M Γ β Γ TargetInterval n)) (values : List BinaryFraction)
(eta kappa : BinaryFraction) (band : List (Fin M β TargetInterval n)) (G j t : β) : β :=
countedPreparedActionAllocation mass (queryHistoryReadWithWork keys values)
(queryHistoryReadAllocation keys values) eta kappa band G j t
theorem queryCountedActionAllocation_le_work {M n : β} (mass : Vector BinaryFraction M)
(keys : List (Fin M Γ β Γ TargetInterval n)) (values : List BinaryFraction)
(eta kappa : BinaryFraction) (band : List (Fin M β TargetInterval n)) (G j t : β) :
queryCountedActionAllocation mass keys values eta kappa band G j t β€
3 * (countedPreparedActionReadWithWork mass (queryHistoryReadWithWork keys values)
eta kappa band G j t).2 :=
countedPreparedActionAllocation_le_work mass _ _ eta kappa band G j t
(fun _ _ => queryHistoryReadAllocation_le_work _ _ _ _)
end EditApproximation.BinaryFraction
end OAI
|