Documentation

LeanPool.HighContrastHomogenization.Entry.Multiscale.Global.RunStop

High-contrast homogenization: Entry.Multiscale.Global.RunStop #

Imported from the Apache-2.0 HighContrastHomogenization development at commit 7a13dbcd8d6609264a713373f5c69ceeac870472.

The stop of the run and the stopping argument #

run_stop_output is the Alternative-2 stop (π”ͺβ‚Š = π”ͺ⋆, the determinant test succeeds) and extracts SelectedOutput; run_exists_stop runs the gauge down and produces a stopping state. Both serve the global selection result p.global.selection. run_exists_stop takes the per-step alternative hstep and the containment hcont as binders; they are discharged by run_step_any in HCPoly.Entry.Multiscale.Global.RunAssembly.

def HCPolySupport.HighContrast.Multiscale.RunStopData {d : β„•} (P : MeasureTheory.Measure (CoeffSpace d)) (Ξ³ : ℝ) (S : SelectionData) (Ξ΅ Οƒ B : ℝ) (E : BlockMat d) (H jStar : β„•) (nβ‚€ : β„€) (Cout : ℝ) (st : RunState P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€) :

The stop configuration of the run at a state: the Alternative-2 stop data, i.e. exactly the per-state package run_stop_output consumes (beyond the state's own fields and the scalar binders). Named because it occurs five times β€” in run_step_any's conclusion, in run_exists_stop's step hypothesis and conclusion, and in the residue.

Besides the four clauses of the stop predicate (k < n, the smallness 𝒫 + D ≀ Ξ·, the fixed point π”ͺβ‚Š = π”ͺ⋆ and the determinant test), it carries the bridge sandwich at the retained block and the Alternative-2 output bound at (𝒬(π”ͺβ‚Š), n + L). Those four are produced in the Alternative-2 branch of run_step_any and are not recoverable from the other four (Alternative 2 and Alternative-3-long are separated by a guard on which the first four clauses say nothing), which is why they are part of the stop data.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem HCPolySupport.HighContrast.Multiscale.run_stop_output {d : β„•} (hd : 2 ≀ d) (Ξ³ : ℝ) (hΞ³ : Ξ³ ∈ Set.Ico 0 1) (P : MeasureTheory.Measure (CoeffSpace d)) (E : BlockMat d) (Ξ¨ : ℝ β†’ ℝ) (K : ℝ) (Src : CoeffSpace d β†’ ℝ) (hP : MeasureTheory.IsProbabilityMeasure P) (hst : IsStationaryLaw P) (hur : IsUnitRangeLaw P) (hce : CoarseEllipticityDagger P Ξ³ E Ξ¨ K Src) (S : SelectionData) (Ξ΅ Οƒ B : ℝ) (hΞ΅ : Ξ΅ ∈ Set.Ioc 0 S.eps0) (hΟƒ : Οƒ ∈ Set.Ioc 0 Ξ΅) (H jStar : β„•) (hH : max 4 S.h ≀ H) (hjStar : 2 * d ≀ 3 ^ jStar) (nβ‚€ : β„€) (hnβ‚€ : ↑jStar + ⌈B * Real.logb 3 (2 + aspectRatio E)βŒ‰ ≀ nβ‚€) (Cinit : ℝ) (hnβ‚€' : nβ‚€ ≀ ↑jStar + ⌈B * Real.logb 3 (2 + aspectRatio E)βŒ‰ + ⌈Cinit * Real.logb 3 (2 + aspectRatio E)βŒ‰) (Csrc : ℝ) (hsrc : ⌈Csrc * Real.logb 3 (2 * K)βŒ‰ ≀ ↑jStar) (Cout Cprof C : ℝ) (hCout : 0 < Cout) (hCprof : 0 < Cprof) (hC : 0 < C) (hL1 : 1 ≀ S.L Ξ΅ Οƒ) (J : β„•) (st : RunState P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€) (hiJ : st.i ≀ J) (hscales : ⌈B * Real.logb 3 (2 + aspectRatio E)βŒ‰ + ⌈Cinit * Real.logb 3 (2 + aspectRatio E)βŒ‰ + (2 * ↑(S.L Ξ΅ Οƒ) + ↑H + ↑S.h) * (↑J + 2) + ↑(S.L Ξ΅ Οƒ) + ↑H ≀ ⌈(B + C) * Real.logb 3 (2 + aspectRatio E)βŒ‰) (hcont : adaptedCell (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) (st.n + ↑(S.L Ξ΅ Οƒ) + ↑H) βŠ† centeredCube d (2 * ↑jStar)) (hecc' : (β€–explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))β€– * β€–(explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ))))⁻¹‖) ^ (1 / 2) ≀ (2 + aspectRatio E) ^ C) (heq : geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))) = explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))) (hbr₁ : BlockMatLoewnerLE (blockScale (1 - √Ρ * Οƒ) (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))) (adaptedMean P (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) (st.n + ↑(S.L Ξ΅ Οƒ)))) (hbrβ‚‚ : BlockMatLoewnerLE (adaptedMean P (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) (st.n + ↑(S.L Ξ΅ Οƒ))) (blockScale (1 + √Ρ * Οƒ) (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ))))) (houtP : profile P Ξ³ (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) jStar (st.n + ↑(S.L Ξ΅ Οƒ)) (st.n + ↑(S.L Ξ΅ Οƒ)) + determinantDrift P Ξ³ (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) jStar (st.n + ↑(S.L Ξ΅ Οƒ)) ≀ Cout * Οƒ ^ ((1 - Ξ³) / 8)) (honeP : profile P Ξ³ (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) jStar (st.n + ↑(S.L Ξ΅ Οƒ)) (st.n + ↑(S.L Ξ΅ Οƒ)) + determinantDrift P Ξ³ (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) jStar (st.n + ↑(S.L Ξ΅ Οƒ)) ≀ 1) (hprof : βˆ€ (m : Mat d), Matrix.PosDef m β†’ βˆ€ (s : β„€), ↑jStar ≀ s β†’ profile P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar s s + determinantDrift P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar s ≀ Cout * Οƒ ^ ((1 - Ξ³) / 8) β†’ profile P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar s s + determinantDrift P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar s ≀ 1 β†’ (↑d)⁻¹ * detIncrement P (Geometry.explicitRoundedGrid jStar m) s (s + ↑H) < Οƒ β†’ max (max (profile P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar s s) (profile P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar s (s + ↑H))) (profile P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar (s + ↑H) (s + ↑H)) + determinantDrift P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar s + determinantDrift P Ξ³ (Geometry.explicitRoundedGrid jStar m) jStar (s + ↑H) ≀ Cprof * Οƒ ^ ((1 - Ξ³) / 8)) (htest : (↑d)⁻¹ * detIncrement P (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) (st.n + ↑(S.L Ξ΅ Οƒ)) (st.n + ↑(S.L Ξ΅ Οƒ) + ↑H) < Οƒ) :
    SelectedOutput P Ξ³ Ξ΅ Οƒ Cprof C E H jStar B

    Alternative 2, π”ͺβ‚Š = π”ͺ⋆, the test succeeds β€” the stop (p.global.selection). Retain F = 𝐀_{n+2L, q}, s = n+L, t = s+H. The output fields: symmetry/positivity of F from Recurrence.isSymmetricBlockMat_adaptedMean and run_adaptedMean_blockPosDef; s < t and t = s + H from 1 ≀ H; the two scale bounds from st.hgen, hnβ‚€ and scales_arith; the containment of adaptedCell QF t from run_entry_containment; the two Loewner bounds are the bridge sandwich hbr₁/hbrβ‚‚ transported along heq (explicitCanonicalMetric F = π”ͺ⋆ = π”ͺβ‚Š, so QF = qβ‚Š); the determinant test is htest; the profile bound is run_output_profile / output_profile_bound fed by the Alternative-2 transport output houtP and exp_sub_one_le_rpow; the eccentricity output (β€–π”ͺβ€–β€–π”ͺ⁻¹‖)^{1/2} ≀ (2+Ξ )^C is eccentricity_arith applied to st.hpr + hpr'.

    Generic finite-run scaffolding #

    An abstract state space with an index, a gauge and a stop predicate. The run is built by Nat.rec with classical choice on the successor supplied by the step disjunction, and the stopping index is extracted with exists_stop_of_potential (FiniteRun.lean) at charge = 0, Bud = 0.

    noncomputable def HCPolySupport.HighContrast.Multiscale.runSucc {Ξ± : Type u_1} (idx : Ξ± β†’ β„•) (G : Ξ± β†’ ℝ) (c : ℝ) (x : Ξ±) :
    Ξ±

    Choose a successor whose index increases by one and whose gauge drops by at least c; retain x if no such successor exists.

    Equations
    Instances For
      noncomputable def HCPolySupport.HighContrast.Multiscale.runIter {Ξ± : Type u_1} (idx : Ξ± β†’ β„•) (G : Ξ± β†’ ℝ) (c : ℝ) (xβ‚€ : Ξ±) :
      β„• β†’ Ξ±

      Iterate the chosen successor map from xβ‚€, with the initial state at iteration zero.

      Equations
      Instances For

        The run and its stopping step #

        theorem HCPolySupport.HighContrast.Multiscale.run_exists_stop {d : β„•} (hd : 2 ≀ d) (Ξ³ : ℝ) (hΞ³ : Ξ³ ∈ Set.Ico 0 1) (P : MeasureTheory.Measure (CoeffSpace d)) (E : BlockMat d) (Ξ¨ : ℝ β†’ ℝ) (K : ℝ) (Src : CoeffSpace d β†’ ℝ) (hP : MeasureTheory.IsProbabilityMeasure P) (hst : IsStationaryLaw P) (hur : IsUnitRangeLaw P) (hce : CoarseEllipticityDagger P Ξ³ E Ξ¨ K Src) (S : SelectionData) (hS : S.Selects d Ξ³) (Ξ΅ Οƒ B : ℝ) (hΞ΅ : Ξ΅ ∈ Set.Ioc 0 S.eps0) (hΟƒ : Οƒ ∈ Set.Ioc 0 Ξ΅) (hB : S.B0 Ξ΅ Οƒ ≀ B) (H jStar : β„•) (hH : max 4 S.h ≀ H) (hjStar : 2 * d ≀ 3 ^ jStar) (hh : 2 * bigQ d Ξ³ ≀ S.h) (hL1 : 1 ≀ S.L Ξ΅ Οƒ) (nβ‚€ : β„€) (hnβ‚€ : ↑jStar + ⌈B * Real.logb 3 (2 + aspectRatio E)βŒ‰ ≀ nβ‚€) (a c C Cout w : ℝ) (hC : 1 ≀ C) (hc : c = 1 / 2 * S.eta Ξ΅ Οƒ * Real.log (16 / 9)) (hcpos : 0 < c) (hw : w = a * C / ↑d) (ha : ↑d ≀ a) (ha1 : 1 ≀ a) (J : β„•) (stβ‚€ : RunState P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€) (hstβ‚€ : stβ‚€.i = 0) (hbound : runGauge P Ξ³ jStar (S.eta Ξ΅ Οƒ) a w S.h stβ‚€.m stβ‚€.k stβ‚€.n ≀ c * ↑J) (hcont : βˆ€ (st : RunState P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€), st.i ≀ J β†’ adaptedCell (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)) βˆͺ adaptedCell (Geometry.explicitRoundedGrid jStar (geometryUpdate Ξ΅ st.m (explicitCanonicalMetric (adaptedMean P (Geometry.explicitRoundedGrid jStar st.m) (st.n + 2 * ↑(S.L Ξ΅ Οƒ)))))) (st.n + ↑(S.L Ξ΅ Οƒ)) βŠ† centeredCube d (2 * ↑jStar)) (hstep : βˆ€ (st : RunState P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€), st.i ≀ J β†’ (βˆƒ (st' : RunState P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€), st'.i = st.i + 1 ∧ runGauge P Ξ³ jStar (S.eta Ξ΅ Οƒ) a w S.h st'.m st'.k st'.n - runGauge P Ξ³ jStar (S.eta Ξ΅ Οƒ) a w S.h st.m st.k st.n ≀ -c) ∨ RunStopData P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€ Cout st) :
        βˆƒ (st : RunState P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€), st.i ≀ J ∧ RunStopData P Ξ³ S Ξ΅ Οƒ B E H jStar nβ‚€ Cout st

        The run and its stopping step (p.global.selection). Build run : β„• β†’ RunState … by Nat.rec (classical choice) from run_initial: at each step, apply hS at (run i).m, (run i).k, (run i).n β€” its premises are the source threshold ⌈Csrc * Real.logb 3 (2 * K)βŒ‰ ≀ (jStar : β„€), (run i).hecc, (run i).hone, (run i).hgap, and run_entry_containment fed by (run i).hpr, (run i).hgen, hcont β€” and case-split on the five disjuncts, using run_step_service, run_step_change, run_step_failed_test, run_step_sync, run_step_long, with stop i the Alternative-2 case π”ͺβ‚Š = π”ͺ⋆ whose test succeeds. Then exists_stop_of_potential (FiniteRun.lean) with Ξ¦ i := runGauge … (run i).m (run i).k (run i).n, charge ≑ 0, Bud := 0, hΞ¦ from run_potential_nonneg + run_reserve_rounded_nonneg, hstep from the five step cases; the index bound ⌈(Ξ¦ 0 + 0)/cβŒ‰β‚Š ≀ J comes from run_initial + run_initial_reserve and the choice of J := ⌈C₁ Β· log₃(2+Ξ )βŒ‰β‚Š.