Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
8236e1d
Freeze actual cubic curvature research contracts
Oct 26, 2026
6229356
Prove scalar product curvature numerator estimate and retain new-only…
Oct 26, 2026
27c9d92
Retain whole-field scoped review and actual quartic comparison resear…
Oct 26, 2026
fa7c043
Prove actual pin curvature bounds and freeze fifth-order comparison s…
Oct 26, 2026
77b3373
Prove actual source-only cubic curvature bound and freeze four-module…
Oct 26, 2026
8d4b882
Register22 qualified source modules with reused baseline and exact cu…
Oct 26, 2026
b3cd106
Clarify exact catalog scopes and validate new library inventory metadata
Oct 26, 2026
9d999aa
Freeze actual norm-Borel derivative-jet and conditioning successor co…
Oct 26, 2026
396bdf3
Prove actual pin-preserving quartic C1 comparison and cutoff tolerance
Oct 26, 2026
fa46511
Prove actual norm-Borel smooth derivative jets and conditional laws
Oct 26, 2026
4240b83
Register quartic comparison and norm-Borel source modules with reused…
Oct 26, 2026
abc3e5f
Freeze canonical raw-pin source adapter and retain concrete geometric…
Oct 26, 2026
ebf49a4
Freeze actual capture gates, Morse incidence and Banach parameter suc…
Oct 26, 2026
1b1badc
Prove canonical raw conditioning, actual capture gates, Morse inciden…
Oct 26, 2026
9cbc87f
Freeze actual canonical capture application of the reviewed robustnes…
Oct 26, 2026
da57e40
Publish source-bound evidence for raw pins, capture gates, actual Mor…
Oct 26, 2026
597c850
Freeze height-integrated actual Rice defect application
Oct 26, 2026
117534e
Derive actual canonical weighted capture probability and its Borel event
Oct 26, 2026
a4edec2
Bind the canonical capture application to exact sources and scoped ev…
Oct 26, 2026
8d64490
Derive height-integrated all-frame Rice defect and freeze remaining c…
Oct 26, 2026
76f688f
Bind uniform height and angular Rice estimates to reused source evidence
Oct 26, 2026
c039243
Prove actual Lifetime pair populations are almost surely finite
Oct 26, 2026
38c759a
Freeze actual adaptive elder and planar quantitative parent application
Oct 26, 2026
636fcfa
Derive jointly measurable compact-mark capture and actual noncapture …
Oct 26, 2026
f536117
Register qualified Lifetime pair finiteness and bind compact-mark cap…
Oct 26, 2026
cd145a0
Derive actual planar elder selection and compact lifetime density bounds
Oct 26, 2026
ecee76c
Bind actual planar parent application and same-family quality review …
Oct 26, 2026
458058b
Freeze all-target actual source moment continuation
Oct 26, 2026
e2c819c
Prove all-target moments and freeze adaptive scalar barrier formaliza…
Oct 26, 2026
e88bb14
Clarify the scalar barrier scope wording
Oct 26, 2026
9907099
Merge refreshed whole-field base preserving the qualified source packet
Oct 26, 2026
bb5a32e
Prove normalized adaptive fold scalar barriers
Oct 26, 2026
19d2608
Register qualified all-target moments and scalar barriers with source…
Oct 26, 2026
66037c5
Freeze construction of the actual transverse-ridge interface
Oct 26, 2026
d2e29ed
Construct the C2 transverse ridge and derive its actual jets
Oct 26, 2026
a7b644d
Register the qualified transverse ridge and landed whole-field evidence
Oct 26, 2026
e72bc0e
Freeze the constructed ridge scalar and rectangle path join
Oct 26, 2026
0d802f1
Freeze the actual varying-gap normalized chart source adapter
Oct 26, 2026
f3a2b19
Derive ridge scalar barriers and an attained rectangle boundary path
Oct 26, 2026
5efb50a
Register the qualified ridge boundary and attained path evidence
Oct 26, 2026
0473748
Derive actual varying-gap normalized source pins and axial identity
Oct 26, 2026
6e4f0fa
Register actual normalized source chart qualification and evidence
Oct 26, 2026
48b2ffb
Freeze the actual source wide rectangle and budget application
Oct 26, 2026
a024433
Freeze actual real-cover elder death and clearance application
Oct 26, 2026
1a7c51b
Derive actual source wide rectangle and attained older path
Oct 26, 2026
0bc813b
Correct the actual field namespace in the frozen death interface
Oct 26, 2026
7b6f6c0
Register actual wide-source rectangle and path qualification
Oct 26, 2026
e14ef98
Register unchanged clearance inputs with narrow import composition
Oct 26, 2026
a3eea22
Derive actual real-cover elder death and strict clearance
Oct 26, 2026
8f75db3
Register qualified actual death and corrected negative-control evidence
Oct 26, 2026
5f49444
Freeze same-period actual torus trap and clearance application
Oct 26, 2026
ce4b43c
Clarify H0-free torus interface and register reused frontier input
Oct 26, 2026
33a305a
Derive same-period actual torus trap and strict clearance
Oct 26, 2026
af17e8d
Register qualified torus clearance and preserved recovery evidence
Oct 26, 2026
143f845
Freeze actual torus singular H0 application contract
Oct 26, 2026
fd4a39e
Register unchanged H0 support bodies with narrow import composition
Oct 26, 2026
0fb66d7
Derive actual torus ordinary singular H0 interval summand
Oct 26, 2026
19f7baf
Register qualified actual singular H0 application and exact evidence
Oct 26, 2026
c47964f
Freeze weighted fold probability and all-target curvature leaf contracts
Oct 26, 2026
5141e92
Freeze all-target curvature residual moment contract
Oct 26, 2026
21fda12
Formalize weighted fold probability and varying-target analytic joins
Oct 26, 2026
6638c5f
Register three qualified fold probability and all-target leaves
Oct 26, 2026
40f22f5
Freeze varying-gap numerator and compact normalizer contracts
Oct 26, 2026
b680dee
Derive compact varying-gap numerator and positive normalizer
Oct 26, 2026
6efd145
Register qualified varying-gap numerator and compact positive normalizer
Oct 26, 2026
b8114e2
Freeze compact weighted fold probability and clarify canonical target…
Oct 26, 2026
d7c3634
Freeze actual Lifetime candidate and attained death bridge contract
Oct 26, 2026
58eb33e
Derive compact weighted fold probability and actual H0 success
Oct 26, 2026
3a56763
Register qualified compact normalized fold probability and H0
Oct 26, 2026
6ebaffc
Derive actual Lifetime candidate types distance gap and attained death
Oct 26, 2026
8d86a06
Register qualified actual Lifetime candidate and attained death evidence
Oct 26, 2026
72baa5f
Freeze finite pin-kernel algebra and posterior shift contract
Oct 26, 2026
2718428
Prove finite pin-kernel Gram positivity and every-target posterior sh…
Oct 26, 2026
3e15af2
Register qualified finite pin-kernel algebra and posterior shifts
Oct 26, 2026
f20c0b0
Freeze finite shifted-cosine source representation contract
Oct 26, 2026
32732ff
Represent finite shifted-cosine products in original source coefficients
Oct 26, 2026
c0398e2
Register qualified finite trigonometric source representation
Oct 26, 2026
b43c1c0
Freeze actual finite remote jet witness and residual Gram contract
Oct 26, 2026
689b8ee
Construct actual finite remote jet witnesses and residual Gram positi…
Oct 26, 2026
9a1f52b
Register locally qualified remote jet witness evidence pending GitHub…
Oct 26, 2026
fa7bce3
Freeze actual remote jet Gaussian law and uniform conditional composi…
Oct 26, 2026
9ce7b95
Identify actual posterior remote jet Gaussian law and uniform conditi…
Oct 26, 2026
374c1a8
Register qualified actual remote jet Gaussian composition evidence
Oct 26, 2026
8815c6b
Freeze marginal endpoint Hessian witness and rectangular residual pos…
Oct 26, 2026
03de6b6
Freeze intrinsic ordinary H0 older merger clearance composition contract
Oct 26, 2026
61d26da
Correct H0 precode rounded timing label to actual native pickup record
Oct 26, 2026
009ff87
Construct original finite marginal endpoint Hessian witnesses and res…
Oct 26, 2026
d19d089
Register qualified original endpoint Hessian witness evidence
Oct 26, 2026
30bc49c
Identify actual ordinary H0 older merger with the established clearan…
Oct 26, 2026
d6af030
Register qualified actual ordinary H0 older clearance evidence
Oct 26, 2026
81e3a89
Freeze actual endpoint Hessian Gaussian law and determinant nullity c…
Oct 26, 2026
08e8ecd
Prove actual endpoint Hessian Gaussian marginals and determinant nullity
Oct 26, 2026
677f8ae
Register qualified endpoint Hessian Gaussian and determinant-nullity …
Oct 26, 2026
c9eab66
Freeze two-remote first-jet finite witness and Gram contract
Oct 26, 2026
4668dfc
Freeze intrinsic H0 threshold interface and local finite-bar contract
Oct 26, 2026
7e8ac1c
Prove actual two-remote first-jet finite witnesses and residual Gram …
Oct 26, 2026
074bb21
Register qualified two-remote first-jet witness and Gram evidence
Oct 26, 2026
8957eed
Construct intrinsic H0 threshold interface and actual local finite-ba…
Oct 26, 2026
72eb5de
Register qualified intrinsic H0 interface and local finite-bar evidence
Oct 26, 2026
98ec56b
Freeze joint first-jet Gaussian and intrinsic weighted-probability co…
Oct 26, 2026
8a21124
Prove actual joint two-remote first-jet Gaussian law
Oct 26, 2026
a7a244f
Register joint two-remote first-jet Gaussian qualification
Oct 26, 2026
5fb32e1
Prove intrinsic H0 finite-bar weighted probability
Oct 26, 2026
0d1d460
Register intrinsic H0 finite-bar weighted probability qualification
Oct 26, 2026
f01e0c7
Specify raw-pin free coordinates and framed confluent covariance stages
Oct 26, 2026
f8085da
Prove raw-pin free-coordinate Gaussian product and reconstruction
Oct 26, 2026
7649724
Register raw-pin free-coordinate Gaussian product qualification
Oct 26, 2026
6c69a0f
Prove actual framed confluent covariance and uniform Schur floor
Oct 26, 2026
f89543e
Register framed confluent covariance and derived uniform floor
Oct 26, 2026
a88e4c6
Specify global conditional Morse distinctness before implementation
Oct 26, 2026
4e41aae
Specify actual-source C1 Morse coordinates and finite controls
Oct 26, 2026
3515bc2
Prove global Morse distinctness for the actual positive-gap law
Oct 28, 2026
29e76f9
Register conditional global Morse distinctness and complete retained …
Oct 28, 2026
c43a952
Construct actual-source C1 Morse coordinates and connected critical n…
Oct 28, 2026
526d696
Register actual C1 Morse local model and specify torus level neighbor…
Oct 28, 2026
917271a
Prove actual torus closed-superlevel local path connectivity
Oct 28, 2026
c18ad0b
Register qualified actual torus local basis and regular-slab precode
Oct 28, 2026
f99b2e1
Prove actual regular-slab component inclusion bijective
Oct 28, 2026
139aa24
Qualify actual torus regular-slab component inclusion and publish fin…
Oct 28, 2026
93a82fa
Prove finiteness of every actual torus closed-superlevel component set
Oct 28, 2026
f4825c3
Qualify all-level actual torus component finiteness and publish saddl…
Oct 28, 2026
57f7369
Formalize actual quotient saddle collar and local branches
Oct 28, 2026
ee5b141
Register qualified actual quotient saddle collar evidence
Oct 28, 2026
b2d4c91
Add actual same-chart closed saddle uppercuts
d6g8k5htny-coder Oct 28, 2026
263b9d4
Register stage 65 saddle uppercuts and qualified evidence
d6g8k5htny-coder Oct 28, 2026
42da221
Formalize actual regular-point quotient collars
d6g8k5htny-coder Oct 28, 2026
a9846b9
Qualify actual regular-point collars and publish lower-separation con…
d6g8k5htny-coder Oct 29, 2026
86c00d4
Close stage67 conditional theorem and quarantine unproved ordinary co…
d6g8k5htny-coder Oct 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
import Mathlib.Analysis.Convex.Deriv
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith

/-!
# Normalized adaptive fold scalar barrier

A deterministic scalar companion to the conventional adaptive elder proof, §4.
Explicit derivative jets and normalized pins give scalar comparisons and arm
separation. This file does not construct an actual transverse ridge, an ambient
rectangle, a physical chart or path, an elder relation, or a probability bound.
The existing generic interpolation and topological libraries are not repeated.
-/

noncomputable section
open Set MeasureTheory

namespace AdaptiveFoldScalar

/-- The normalized scalar domain. -/
def J : Set ℝ := Icc (-(3 / 2 : ℝ)) (3 / 2)

/-- The quadratic lower-curvature comparison, zero at both pins. -/
def q (x : ℝ) : ℝ := (x ^ 2 - (1 / 4 : ℝ)) / 2

/-- Scalar consequences only; no ambient ridge or elder data are bundled. -/
structure ScalarBarrier (a a₁ φ : ℝ → ℝ) : Prop where
middle_comparison : ∀ x ∈ Icc (-(1 / 2 : ℝ)) (1 / 2), a x ≤ q x
left_comparison : ∀ x ∈ Icc (-(3 / 2 : ℝ)) (-(1 / 2 : ℝ)), q x ≤ a x
right_comparison : ∀ x ∈ Icc (1 / 2 : ℝ) (3 / 2), q x ≤ a x
middle_neg : ∀ x ∈ Ioo (-(1 / 2 : ℝ)) (1 / 2), a x < 0
left_pos : ∀ x ∈ Ico (-(3 / 2 : ℝ)) (-(1 / 2 : ℝ)), 0 < a x
right_pos : ∀ x ∈ Ioc (1 / 2 : ℝ) (3 / 2), 0 < a x
left_deriv : a₁ (-(1 / 2 : ℝ)) ≤ -(1 / 2 : ℝ)
right_deriv : (1 / 2 : ℝ) ≤ a₁ (1 / 2 : ℝ)
left_gain : φ (-(3 / 2 : ℝ)) ≤ φ (-(1 / 2 : ℝ)) - 5 / 12
right_gain : φ (1 / 2 : ℝ) + 5 / 12 ≤ φ (3 / 2 : ℝ)
left_barrier : φ (-(3 / 2 : ℝ)) ≤ φ (1 / 2 : ℝ) - 1 / 4
right_older : φ (-(1 / 2 : ℝ)) + 1 / 4 ≤ φ (3 / 2 : ℝ)
ceiling : ∀ x ∈ Icc (-(3 / 2 : ℝ)) (1 / 2), φ x ≤ φ (-(1 / 2 : ℝ))
floor : ∀ x ∈ Icc (-(1 / 2 : ℝ)) (3 / 2), φ (1 / 2 : ℝ) ≤ φ x

/-- The derivative of the comparison quadratic. -/
theorem q_hasDerivAt (x : ℝ) : HasDerivAt q x x := by
convert ((hasDerivAt_pow 2 x).sub_const (1 / 4 : ℝ)).div_const 2 using 1 <;> first | rfl | ring

/-- The primitive used for both exact arm integrals. -/
theorem primitive_hasDerivAt (x : ℝ) :
HasDerivAt (fun t : ℝ => t ^ 3 / 6 - t / 8) (q x) x := by
convert ((hasDerivAt_pow 3 x).div_const 6).sub
((hasDerivAt_id x).div_const 8) using 1 <;> first | rfl | (unfold q; ring)

/-- The left comparison arm has exactly the gain 5/12. -/
theorem integral_q_left :
(∫ x in (-(3 / 2 : ℝ))..(-(1 / 2 : ℝ)), q x) = 5 / 12 := by
have hc : Continuous q := continuous_iff_continuousAt.mpr (fun x => (q_hasDerivAt x).continuousAt)
have h := intervalIntegral.integral_eq_sub_of_hasDerivAt
(a := -(3 / 2 : ℝ)) (b := -(1 / 2 : ℝ))
(fun x _ => primitive_hasDerivAt x) (hc.intervalIntegrable _ _)
norm_num at h ⊢
exact h

/-- The right comparison arm has exactly the gain 5/12. -/
theorem integral_q_right :
(∫ x in (1 / 2 : ℝ)..(3 / 2 : ℝ), q x) = 5 / 12 := by
have hc : Continuous q := continuous_iff_continuousAt.mpr (fun x => (q_hasDerivAt x).continuousAt)
have h := intervalIntegral.integral_eq_sub_of_hasDerivAt
(a := (1 / 2 : ℝ)) (b := (3 / 2 : ℝ))
(fun x _ => primitive_hasDerivAt x) (hc.intervalIntegrable _ _)
norm_num at h ⊢
exact h

/-- Normalized convex core. Differentiability jets, zero pins and the gap are
explicit inputs; no barrier or elder conclusion occurs among the premises. -/
theorem scalarBarrier_of_convex (a a₁ φ : ℝ → ℝ)
(hconv : ConvexOn ℝ J (fun x => a x - q x))
(ha : ∀ x ∈ J, HasDerivAt a (a₁ x) x)
(hφ : ∀ x ∈ J, HasDerivAt φ (a x) x)
(hleft : a (-(1 / 2 : ℝ)) = 0)
(hright : a (1 / 2 : ℝ) = 0)
(hgap : φ (-(1 / 2 : ℝ)) - φ (1 / 2 : ℝ) = 1 / 6) :
ScalarBarrier a a₁ φ := by
have hlJ : -(1 / 2 : ℝ) ∈ J := by norm_num [J]
have hrJ : (1 / 2 : ℝ) ∈ J := by norm_num [J]
have hlq : a (-(1 / 2 : ℝ)) - q (-(1 / 2 : ℝ)) = 0 := by
norm_num [q, hleft]
have hrq : a (1 / 2 : ℝ) - q (1 / 2 : ℝ) = 0 := by
norm_num [q, hright]
have hmid : ∀ x ∈ Icc (-(1 / 2 : ℝ)) (1 / 2), a x ≤ q x := by
intro x hx
have h := hconv.le_on_segment hlJ hrJ
(show x ∈ segment ℝ (-(1 / 2 : ℝ)) (1 / 2) from by
rw [segment_eq_Icc (by norm_num : -(1 / 2 : ℝ) ≤ 1 / 2)]; exact hx)
simp only [hlq, hrq, max_self] at h
linarith
have hL : ∀ x ∈ Icc (-(3 / 2 : ℝ)) (-(1 / 2 : ℝ)), q x ≤ a x := by
intro x hx
by_cases heq : x = -(1 / 2 : ℝ)
· subst x; norm_num [q, hleft]
have hlt : x < -(1 / 2 : ℝ) := lt_of_le_of_ne hx.2 heq
have hxJ : x ∈ J := ⟨hx.1, by linarith [hx.2]⟩
have h := hconv.slope_mono_adjacent hxJ hrJ hlt
(by norm_num : -(1 / 2 : ℝ) < 1 / 2)
simp only [hlq, hrq, sub_self, zero_div, zero_sub] at h
have hden : 0 < -(1 / 2 : ℝ) - x := by linarith
have := (div_le_iff₀ hden).mp h
linarith
have hR : ∀ x ∈ Icc (1 / 2 : ℝ) (3 / 2), q x ≤ a x := by
intro x hx
by_cases heq : x = (1 / 2 : ℝ)
· subst x; norm_num [q, hright]
have hlt : (1 / 2 : ℝ) < x := lt_of_le_of_ne hx.1 (Ne.symm heq)
have hxJ : x ∈ J := ⟨by linarith [hx.1], hx.2⟩
have h := hconv.slope_mono_adjacent hlJ hxJ
(by norm_num : -(1 / 2 : ℝ) < 1 / 2) hlt
simp only [hlq, hrq, sub_self, zero_div, sub_zero] at h
have hden : 0 < x - (1 / 2 : ℝ) := by linarith
have := (le_div_iff₀ hden).mp h
linarith
have hmn : ∀ x ∈ Ioo (-(1 / 2 : ℝ)) (1 / 2), a x < 0 := by
intro x hx
have hb := hmid x ⟨hx.1.le, hx.2.le⟩
have hp := mul_pos (sub_pos.mpr hx.1) (sub_pos.mpr hx.2)
dsimp [q] at hb
nlinarith
have hLp : ∀ x ∈ Ico (-(3 / 2 : ℝ)) (-(1 / 2 : ℝ)), 0 < a x := by
intro x hx
have hb := hL x ⟨hx.1, hx.2.le⟩
have hp := mul_pos (show 0 < -x - 1 / 2 by linarith [hx.2])
(show 0 < -x + 1 / 2 by linarith [hx.2])
dsimp [q] at hb
nlinarith
have hRp : ∀ x ∈ Ioc (1 / 2 : ℝ) (3 / 2), 0 < a x := by
intro x hx
have hb := hR x ⟨hx.1.le, hx.2⟩
have hp := mul_pos (show 0 < x - 1 / 2 by linarith [hx.1])
(show 0 < x + 1 / 2 by linarith [hx.1])
dsimp [q] at hb
nlinarith
have hld : a₁ (-(1 / 2 : ℝ)) ≤ -(1 / 2 : ℝ) := by
have h := hconv.le_slope_of_hasDerivAt hlJ hrJ
(by norm_num : -(1 / 2 : ℝ) < 1 / 2)
((ha _ hlJ).sub (q_hasDerivAt _))
norm_num [slope_def_field, hlq, hrq] at h
linarith
have hrd : (1 / 2 : ℝ) ≤ a₁ (1 / 2 : ℝ) := by
have h := hconv.slope_le_of_hasDerivAt hlJ hrJ
(by norm_num : -(1 / 2 : ℝ) < 1 / 2)
((ha _ hrJ).sub (q_hasDerivAt _))
norm_num [slope_def_field, hlq, hrq] at h
linarith
have hcq : Continuous q := continuous_iff_continuousAt.mpr (fun x => (q_hasDerivAt x).continuousAt)
have hca : ContinuousOn a J := fun x hx => (ha x hx).continuousAt.continuousWithinAt
have hLa : IntervalIntegrable a volume (-(3 / 2 : ℝ)) (-(1 / 2 : ℝ)) :=
(hca.mono (show Icc (-(3 / 2 : ℝ)) (-(1 / 2 : ℝ)) ⊆ J from by
intro x hx; exact ⟨hx.1, by linarith [hx.2]⟩)).intervalIntegrable_of_Icc (by norm_num)
have hRa : IntervalIntegrable a volume (1 / 2 : ℝ) (3 / 2 : ℝ) :=
(hca.mono (show Icc (1 / 2 : ℝ) (3 / 2 : ℝ) ⊆ J from by
intro x hx; exact ⟨by linarith [hx.1], hx.2⟩)).intervalIntegrable_of_Icc (by norm_num)
have hlg : φ (-(3 / 2 : ℝ)) ≤ φ (-(1 / 2 : ℝ)) - 5 / 12 := by
have hbound := intervalIntegral.integral_mono_on (by norm_num)
(hcq.intervalIntegrable (-(3 / 2 : ℝ)) (-(1 / 2 : ℝ))) hLa hL
have hftc := intervalIntegral.integral_eq_sub_of_hasDerivAt
(a := -(3 / 2 : ℝ)) (b := -(1 / 2 : ℝ))
(fun x hx => hφ x (by
rw [uIcc_of_le (by norm_num)] at hx
exact ⟨hx.1, by linarith [hx.2]⟩)) hLa
rw [integral_q_left, hftc] at hbound
linarith
have hrg : φ (1 / 2 : ℝ) + 5 / 12 ≤ φ (3 / 2 : ℝ) := by
have hbound := intervalIntegral.integral_mono_on (by norm_num)
(hcq.intervalIntegrable (1 / 2 : ℝ) (3 / 2 : ℝ)) hRa hR
have hftc := intervalIntegral.integral_eq_sub_of_hasDerivAt
(a := (1 / 2 : ℝ)) (b := (3 / 2 : ℝ))
(fun x hx => hφ x (by
rw [uIcc_of_le (by norm_num)] at hx
exact ⟨by linarith [hx.1], hx.2⟩)) hRa
rw [integral_q_right, hftc] at hbound
linarith
have hLmono : MonotoneOn φ (Icc (-(3 / 2 : ℝ)) (-(1 / 2 : ℝ))) := by
apply monotoneOn_of_hasDerivWithinAt_nonneg (convex_Icc _ _)
· intro x hx; exact (hφ x ⟨hx.1, by linarith [hx.2]⟩).continuousAt.continuousWithinAt
· intro x hx; exact (hφ x ⟨(interior_subset hx).1,
by linarith [(interior_subset hx).2]⟩).hasDerivWithinAt
· intro x hx
have hx' := interior_subset hx
have hb := hL x hx'
dsimp [q] at hb
nlinarith [mul_nonneg_of_nonpos_of_nonpos
(show x + 1 / 2 ≤ 0 by linarith [hx'.2])
(show x - 1 / 2 ≤ 0 by linarith [hx'.2])]
have hManti : AntitoneOn φ (Icc (-(1 / 2 : ℝ)) (1 / 2)) := by
apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Icc _ _)
· intro x hx; exact (hφ x ⟨by linarith [hx.1], by linarith [hx.2]⟩).continuousAt.continuousWithinAt
· intro x hx; exact (hφ x ⟨by linarith [(interior_subset hx).1],
by linarith [(interior_subset hx).2]⟩).hasDerivWithinAt
· intro x hx
have hx' := interior_subset hx
have hb := hmid x hx'
dsimp [q] at hb
nlinarith [mul_nonpos_of_nonneg_of_nonpos
(show 0 ≤ x + 1 / 2 by linarith [hx'.1])
(show x - 1 / 2 ≤ 0 by linarith [hx'.2])]
have hRmono : MonotoneOn φ (Icc (1 / 2 : ℝ) (3 / 2)) := by
apply monotoneOn_of_hasDerivWithinAt_nonneg (convex_Icc _ _)
· intro x hx; exact (hφ x ⟨by linarith [hx.1], hx.2⟩).continuousAt.continuousWithinAt
· intro x hx; exact (hφ x ⟨by linarith [(interior_subset hx).1],
(interior_subset hx).2⟩).hasDerivWithinAt
· intro x hx
have hx' := interior_subset hx
have hb := hR x hx'
dsimp [q] at hb
nlinarith [mul_nonneg (show 0 ≤ x + 1 / 2 by linarith [hx'.1])
(show 0 ≤ x - 1 / 2 by linarith [hx'.1])]
refine ⟨hmid, hL, hR, hmn, hLp, hRp, hld, hrd, hlg, hrg,
by linarith, by linarith, ?_, ?_⟩
· intro x hx
by_cases hl : x ≤ -(1 / 2 : ℝ)
· exact hLmono ⟨hx.1, hl⟩ (by norm_num) hl
· exact hManti (by norm_num) ⟨(lt_of_not_ge hl).le, hx.2⟩ (lt_of_not_ge hl).le
· intro x hx
by_cases hr : x ≤ (1 / 2 : ℝ)
· exact hManti ⟨hx.1, hr⟩ (by norm_num) hr
· exact hRmono (by norm_num) ⟨(lt_of_not_ge hr).le, hx.2⟩ (lt_of_not_ge hr).le

/-- Explicit second-derivative adapter. The final assumptions are derivative
jets, curvature and normalized pins, rather than a desired barrier certificate. -/
theorem scalarBarrier_of_secondDerivative (a a₁ a₂ φ : ℝ → ℝ)
(ha : ∀ x ∈ J, HasDerivAt a (a₁ x) x)
(ha₁ : ∀ x ∈ J, HasDerivAt a₁ (a₂ x) x)
(hcurv : ∀ x ∈ J, 1 ≤ a₂ x)
(hφ : ∀ x ∈ J, HasDerivAt φ (a x) x)
(hleft : a (-(1 / 2 : ℝ)) = 0)
(hright : a (1 / 2 : ℝ) = 0)
(hgap : φ (-(1 / 2 : ℝ)) - φ (1 / 2 : ℝ) = 1 / 6) :
ScalarBarrier a a₁ φ := by
apply scalarBarrier_of_convex a a₁ φ ?_ ha hφ hleft hright hgap
apply convexOn_of_hasDerivWithinAt2_nonneg (convex_Icc _ _)
(f' := fun x => a₁ x - x) (f'' := fun x => a₂ x - 1)
· intro x hx
exact ((ha x hx).sub (q_hasDerivAt x)).continuousAt.continuousWithinAt
· intro x hx
exact ((ha x (interior_subset hx)).sub (q_hasDerivAt x)).hasDerivWithinAt
· intro x hx
exact ((ha₁ x (interior_subset hx)).sub (hasDerivAt_id x)).hasDerivWithinAt
· intro x hx
linarith [hcurv x (interior_subset hx)]

end AdaptiveFoldScalar
Loading
Loading