One complete native region-growth iteration
OpenLax455465Proofs.RamRegionCore.iteration_specFix a rational network instance, its rational metric, the seed and threshold data, and the active-set/history state appearing in this interface. Assume its complete coefficient-height, dimension, positivity, word-size and allocated-storage guards. The fixed command implements one functional region-growth iteration, with the explicit instruction bound from the source:
This is a reusable source interface for composing the complete finite-program implementation.
Retired because the namespace-wrapped declaration compiled during publication but the proof-comparison parser rejects that header (expected token / unknown full theorem identifier). The mathematically identical, fully qualified declaration is Lax455465Proofs.RamRegionCore.iteration_spec_native.
import Definitions.Def_EdgeSublinearMWIS_Main_NativeDetailedInterfaces
namespace Lax455465Proofs.RamRegionCore
theorem iteration_spec : ∀ (B M H : Nat) {n : Nat} (I : Lax455465.RationalEncoding.RationalInstance n)
(length : Lax455465Proofs.MetricMatrix.Matrix n) (seed beta delta threshold : NNRat) (p : Nat)
(active : Finset (Fin n)) (history : List (Lax455465Proofs.RamRegionRecord.Entry n)),
Nat.le ((1:Nat)) M →
Nat.le (Lax455465Proofs.RegionBudget.steps p) M →
Nat.lt
(Nat.add
(Nat.mul ((2:Nat))
(@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid))) M
((2:Nat))))
((3:Nat)))
B →
Nat.lt
(Nat.add
(Nat.mul
((2:Nat))
(@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
(@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
((2:Nat)) H)
((2:Nat))))
((3:Nat)))
B →
Nat.lt
(Nat.add
(Nat.mul
((2:Nat))
(Nat.mul n n))
((2:Nat)))
B →
Nat.lt
(Nat.add
(Nat.mul
((2:Nat)) n)
((2:Nat)))
B →
Nat.lt
(Nat.add
(Nat.mul
((2:Nat))
(Nat.add
(Nat.add (Lax455465Proofs.RegionBudget.steps p)
((1:Nat)))
(Nat.mul
((2:Nat)) n)))
((2:Nat)))
B →
Nat.lt
(Nat.add
(Nat.mul
((4:Nat))
(@List.length (Lax455465Proofs.RamRegionRecord.Entry n) history))
((4:Nat)))
B →
Lax455465Proofs.LpInputSize.Height
(@HPow.hPow Nat Nat Nat (@instHPow Nat Nat (@NPow.toPow Nat (@Monoid.toNPow Nat Nat.instMonoid)))
((2:Nat)) H)
(@NNRat.cast Rat Rat.instNNRatCast threshold) →
(∀ (v : Fin n),
Nat.le (@Lax455465.RationalEncoding.RationalInstance.weight n I v).num M) →
(∀ (v : Fin n),
Nat.le (@Lax455465.RationalEncoding.RationalInstance.weight n I v).den M) →
(∀ (u v : Fin n),
Nat.le (@Lax455465.RationalEncoding.RationalInstance.capacity n I u v).num
M) →
(∀ (u v : Fin n),
Nat.le (@Lax455465.RationalEncoding.RationalInstance.capacity n I u v).den
M) →
(∀ (u v : Fin n),
Lax455465Proofs.LpInputSize.Height M (@NNRat.cast Rat Rat.instNNRatCast (length u v))) →
Lax455465Proofs.LpInputSize.Height M (@NNRat.cast Rat Rat.instNNRatCast delta) →
Lax455465Proofs.LpInputSize.Height M
(@NNRat.cast Rat Rat.instNNRatCast
(@HDiv.hDiv NNRat NNRat NNRat (@instHDiv NNRat NNRat.instDiv) delta
(@Nat.cast NNRat
(@AddMonoidWithOne.toNatCast NNRat
(@AddCommMonoidWithOne.toAddMonoidWithOne NNRat
(@NonAssocSemiring.toAddCommMonoidWithOne NNRat
(@Semiring.toNonAssocSemiring NNRat
(@DivisionSemiring.toSemiring NNRat
(@Semifield.toDivisionSemiring NNRat NNRat.instSemifield))))))
(Lax455465Proofs.RegionBudget.steps p)))) →
(∀ (root : Fin n) (i : Nat)
(hi :
Nat.lt i
(@List.length NNRat
(@Lax455465Proofs.RadiusData.candidates n (length root)
(fun (v : Fin n) => length v root) (Lax455465Proofs.RegionBudget.steps p)
delta))),
@Lax455465Proofs.RegionQueryHeight.Bounds n
(@Lax455465Proofs.RadiusSearchData.atRadius n
(@Lax455465Proofs.RegionExecutionData.query n I length active root seed beta)
(@GetElem.getElem (List NNRat) Nat NNRat
(fun (as : List NNRat) (i : Nat) =>
Nat.lt i (@List.length NNRat as))
(@List.instGetElemNatLtLength NNRat)
(@Lax455465Proofs.RadiusData.candidates n (length root)
(fun (v : Fin n) => length v root) (Lax455465Proofs.RegionBudget.steps p)
delta)
i hi))
H) →
@Eq Rat (@NNRat.cast Rat Rat.instNNRatCast beta)
(Lax455465Proofs.RegionSearch.slope (Lax455465Proofs.RegionBudget.steps p)
(@NNRat.cast Rat Rat.instNNRatCast delta)) →
@LT.lt Rat Rat.instLT (@OfNat.ofNat Rat (nat_lit 0) (@Rat.instOfNat (nat_lit 0)))
(@NNRat.cast Rat Rat.instNNRatCast seed) →
@LT.lt Rat Rat.instLT
(@OfNat.ofNat Rat (nat_lit 0) (@Rat.instOfNat (nat_lit 0)))
(@NNRat.cast Rat Rat.instNNRatCast delta) →
Nat.lt ((0:Nat))
p →
(∀ (u v w : Fin n),
@LE.le Rat Rat.instLE (@NNRat.cast Rat Rat.instNNRatCast (length u w))
(@HAdd.hAdd Rat Rat Rat (@instHAdd Rat Rat.instAdd)
(@NNRat.cast Rat Rat.instNNRatCast (length u v))
(@NNRat.cast Rat Rat.instNNRatCast (length v w)))) →
@LE.le Rat Rat.instLE
(@Lax455465Proofs.RegionRounding.metricCost n I
(@Lax455465Proofs.MetricMatrix.rational n length))
(@HMul.hMul Rat Rat Rat (@instHMul Rat Rat.instMul)
(@Nat.cast Rat Rat.instNatCast p)
(@NNRat.cast Rat Rat.instNNRatCast seed)) →
Nat.le
(@List.length (Lax455465Proofs.RamRegionRecord.Entry n) history) p →
Lax808846Proofs.Reasoning.Spec B
(fun (σ : Lax808846Proofs.Imp.Env) =>
And
(@Lax455465Proofs.RamRegionInvariant.Fixed n I length seed beta
delta threshold p σ)
(And
(@Lax455465Proofs.RamRegionInvariant.Dynamic n active history
σ)
(Lax455465Proofs.RamRegionInvariant.Room n p σ)))
Lax455465Proofs.RamRegionLoop.iteration
(fun (x τ : Lax808846Proofs.Imp.Env) =>
And
(@Lax455465Proofs.RamRegionInvariant.Fixed n I length seed beta
delta threshold p τ)
(And (Lax455465Proofs.RamRegionInvariant.Room n p τ)
(@Lax455465Proofs.RamRegionCore.Output n I length seed beta
delta threshold p active history τ)))
(Lax455465Proofs.RamRegionCore.cost n p M H) := by sorry
end Lax455465Proofs.RamRegionCore