omnibias.core.verified.clamped_biharmonic
Coefficient recurrences, activation contracts, jet algebra, and verified arithmetic shared by the numerical backends.
import omnibias.core.verified.clamped_biharmonicModule contract & mathematical conventions
Exact Green bounds and a conditional gate for a clamped cubic beam.
On [0,L], the inverse K of the fourth derivative with u=u'=0
at both endpoints has exact C -> C norm L**4/384. On [0,1]
its symmetric kernel, for x <= t, is
G(x,t) = x**2 * (1-t)**2 * (3*t - (1+2*t)*x) / 6.
Each branch is cubic in x, its first two derivatives are continuous at x=t,
and its third derivative has jump one. The kernel and its first derivative
vanish at both endpoints. Thus K h is the unique clamped C4 solution of
v''''=h for every continuous h. The kernel is nonnegative because its
last factor is at least 2*t*(1-t) when x<=t. Since
K 1=x**2*(1-x)**2/24, positivity gives the exact sup norm 1/384;
equality is attained for h=1 at x=1/2. Scaling gives the stated L**4 law.
Symmetry and the same row integral give ||K||_L2 <= L**4/384 by the
Schur estimate. The clamped self-adjoint fourth derivative therefore has
quadratic-form lower bound 384/L**4. Adding 3*lambda*v**2 for
real bounded v and lambda>=0 preserves this lower bound.
For u''''+lambda*u**3=f and a clamped C4 candidate q, suppose the
CALLER PROVES ||q|| <= U and ||q''''+lambda*q**3-f|| <= R uniformly
over the whole interval and 0<=lambda<=lambda_max. On the complete
C-space ball B_r(q), the full operator T(v)=K(f-lambda*v**3) has
defect at most Y=norm(K)*R and Lipschitz constant at most
Z=3*lambda_max*norm(K)*(U+r)**2. The finite gate Z<1, Y+Z*r<=r implies
a self-map contraction PROVIDED those candidate/residual/boundary hypotheses
are established. A fixed point is C4 and solves the original BVP by the
Green identity. Global classical uniqueness follows by integrating
(u-v)*(u''''-v'''') + lambda*(u-v)*(u**3-v**3)=0 twice by parts.
This module computes the exact scalar gate; it DOES NOT verify the supplied whole-domain bounds or boundary conditions. Its result never independently asserts PDE existence, a quantum continuum theorem, or a Lean tier. There are no finite-mode tails in K. No differentiation backend is imported.
Shared formulas do not imply universal floating-point identity. Verify dtype, shape, derivative-order support, and the stated numerical assumptions for the path you use.
ClampedCubicContraction
omnibias.core.verified.ClampedCubicContractionSource ↗class ClampedCubicContractionDataclass constructor fields; inherited fields, if any, are declared by the base class. A field(...) expression describes a default factory or field options, not a literal argument default.
Exact scalar conditions, with candidate proof obligations still external.
Parameters
| Name | Type & default | Contract |
|---|---|---|
candidate_sup_upperdataclass field | FractionRequired | See the operation contract and implementation below. |
residual_sup_upperdataclass field | FractionRequired | See the operation contract and implementation below. |
coupling_upperdataclass field | FractionRequired | See the operation contract and implementation below. |
radiusdataclass field | FractionRequired | See the operation contract and implementation below. |
lengthdataclass field | FractionRequired | See the operation contract and implementation below. |
inverse_normdataclass field | FractionRequired | See the operation contract and implementation below. |
defectdataclass field | FractionRequired | See the operation contract and implementation below. |
contractiondataclass field | FractionRequired | See the operation contract and implementation below. |
self_map_margindataclass field | FractionRequired | See the operation contract and implementation below. |
Executed regression · failed contraction or self map refuses
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_failed_contraction_or_self_map_refuses():
assert not clamped_cubic_contraction(1, 32, 32, Q(1, 1000000)).passed
assert not clamped_cubic_contraction(1, 0, 1000, Q(1, 8)).passedpython -m pytest "packages/omnibias-core/tests/verified/test_clamped_biharmonic.py::test_failed_contraction_or_self_map_refuses" -qFields & methods
candidate_sup_upperfield
candidate_sup_upper: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗residual_sup_upperfield
residual_sup_upper: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗coupling_upperfield
coupling_upper: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗radiusfield
radius: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗lengthfield
length: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗inverse_normfield
inverse_norm: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗defectfield
defect: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗contractionfield
contraction: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗self_map_marginfield
self_map_margin: FractionDeclared Fraction field on ClampedCubicContraction. A value must be provided when constructing the configuration, unless an inherited constructor supplies it.
View source ↗passedproperty
passed(self) -> boolWhether the finite contraction inequalities pass, not a PDE claim.
Returns: bool
Executed regression · failed contraction or self map refuses
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_failed_contraction_or_self_map_refuses():
assert not clamped_cubic_contraction(1, 32, 32, Q(1, 1000000)).passed
assert not clamped_cubic_contraction(1, 0, 1000, Q(1, 8)).passedpython -m pytest "packages/omnibias-core/tests/verified/test_clamped_biharmonic.py::test_failed_contraction_or_self_map_refuses" -qMethod implementation
def passed(self) -> bool:
"""Whether the finite contraction inequalities pass, not a PDE claim."""
return self.contraction < 1 and self.self_map_margin >= 0to_payloadmethod
to_payload(self) -> dict[str, Any]Record the remaining analytic input obligations explicitly.
Returns: dict[str, Any]
Executed regression · false residual bound is only a conditional gate
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_false_residual_bound_is_only_a_conditional_gate():
gate = clamped_cubic_contraction(0, 0, 0, Q(1, 1000000))
assert gate.passed
assert not gate.to_payload()["pde_existence_claim"]python -m pytest "packages/omnibias-core/tests/verified/test_clamped_biharmonic.py::test_false_residual_bound_is_only_a_conditional_gate" -qMethod implementation
def to_payload(self) -> dict[str, Any]:
"""Record the remaining analytic input obligations explicitly."""
return {
"status": "PASS" if self.passed else "INCONCLUSIVE",
"candidate_sup_upper": str(self.candidate_sup_upper),
"residual_sup_upper": str(self.residual_sup_upper),
"coupling_upper": str(self.coupling_upper),
"radius": str(self.radius),
"length": str(self.length),
"green_operator_norm": str(self.inverse_norm),
"defect_Y": str(self.defect),
"contraction_Z": str(self.contraction),
"self_map_margin": str(self.self_map_margin),
"verification_kind": "EXACT_RATIONAL_FINITE_GATE",
"external_premises": {
"forcing_is_real_continuous": "UNVERIFIED",
"actual_coupling_in_closed_interval_0_to_coupling_upper": "UNVERIFIED",
"candidate_is_real_C4_and_clamped": "UNVERIFIED",
"candidate_bound_on_whole_interval": "UNVERIFIED",
"residual_bound_on_whole_interval_and_parameter_family": "UNVERIFIED",
},
"pde_existence_claim": False,
"continuum_claim": False,
"theorem_prover_verified": False,
"mathlib_verified": False,
}Read the implementation
class ClampedCubicContraction:
"""Exact scalar conditions, with candidate proof obligations still external."""
candidate_sup_upper: Fraction
residual_sup_upper: Fraction
coupling_upper: Fraction
radius: Fraction
length: Fraction
inverse_norm: Fraction
defect: Fraction
contraction: Fraction
self_map_margin: Fraction
@property
def passed(self) -> bool:
"""Whether the finite contraction inequalities pass, not a PDE claim."""
return self.contraction < 1 and self.self_map_margin >= 0
def to_payload(self) -> dict[str, Any]:
"""Record the remaining analytic input obligations explicitly."""
return {
"status": "PASS" if self.passed else "INCONCLUSIVE",
"candidate_sup_upper": str(self.candidate_sup_upper),
"residual_sup_upper": str(self.residual_sup_upper),
"coupling_upper": str(self.coupling_upper),
"radius": str(self.radius),
"length": str(self.length),
"green_operator_norm": str(self.inverse_norm),
"defect_Y": str(self.defect),
"contraction_Z": str(self.contraction),
"self_map_margin": str(self.self_map_margin),
"verification_kind": "EXACT_RATIONAL_FINITE_GATE",
"external_premises": {
"forcing_is_real_continuous": "UNVERIFIED",
"actual_coupling_in_closed_interval_0_to_coupling_upper": "UNVERIFIED",
"candidate_is_real_C4_and_clamped": "UNVERIFIED",
"candidate_bound_on_whole_interval": "UNVERIFIED",
"residual_bound_on_whole_interval_and_parameter_family": "UNVERIFIED",
},
"pde_existence_claim": False,
"continuum_claim": False,
"theorem_prover_verified": False,
"mathlib_verified": False,
}Other public import paths
omnibias.core.verified.ClampedCubicContractionomnibias.core.verified.clamped_biharmonic.ClampedCubicContraction
clamped_biharmonic_green_kernel
omnibias.core.verified.clamped_biharmonic_green_kernelSource ↗clamped_biharmonic_green_kernel(x: int | Fraction, t: int | Fraction, *, length: int | Fraction=1) -> FractionEvaluate the exact nonnegative symmetric Green kernel at rational points.
Parameters
| Name | Type & default | Contract |
|---|---|---|
xpositional-or-keyword | int | FractionRequired | See the operation contract and implementation below. |
tpositional-or-keyword | int | FractionRequired | See the operation contract and implementation below. |
lengthkeyword-only | int | FractionDefault: 1 | See the operation contract and implementation below. |
FractionExplicit validation & failure cases
- When
length <= 0 or not 0 <= x <= length or (not 0 <= t <= length), raisesValueError('require positive length and x,t in [0,length]').
These are explicit source guards. Backend operations may also raise for invalid shapes, dtypes, or unsupported devices.
Executed regression · domain refusals
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_domain_refusals():
with pytest.raises(ValueError):
clamped_biharmonic_inverse_norm(0)
with pytest.raises(ValueError):
clamped_biharmonic_green_kernel(-1, 0)
with pytest.raises(ValueError):
clamped_biharmonic_green_kernel(1, 0, length=Q(1, 2))python -m pytest "packages/omnibias-core/tests/verified/test_clamped_biharmonic.py::test_domain_refusals" -qRegression example · exact full inverse norm and length scaling
This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_exact_full_inverse_norm_and_length_scaling():
assert clamped_biharmonic_inverse_norm() == Q(1, 384)
assert clamped_biharmonic_inverse_norm(2) == Q(1, 24)
assert clamped_biharmonic_inverse_norm(Q(1, 2)) == Q(1, 6144)
for x in (Q(0), Q(1, 4), Q(1, 2), Q(1)):
for t in (Q(0), Q(1, 3), Q(1)):
assert clamped_biharmonic_green_kernel(2 * x, 2 * t, length=2) == (
8 * clamped_biharmonic_green_kernel(x, t)
)python -m pytest packages/omnibias-core/tests/verified/test_clamped_biharmonic.py -k test_exact_full_inverse_norm_and_length_scaling -qRead the implementation
def clamped_biharmonic_green_kernel(
x: int | Fraction,
t: int | Fraction,
*,
length: int | Fraction = 1,
) -> Fraction:
"""Evaluate the exact nonnegative symmetric Green kernel at rational points."""
x, t, length = (_rational(v) for v in (x, t, length))
if length <= 0 or not 0 <= x <= length or not 0 <= t <= length:
raise ValueError("require positive length and x,t in [0,length]")
x, t = x / length, t / length
if x > t:
x, t = t, x
return length**3 * x**2 * (1 - t) ** 2 * (3 * t - (1 + 2 * t) * x) / 6Other public import paths
omnibias.core.verified.clamped_biharmonic_green_kernelomnibias.core.verified.clamped_biharmonic.clamped_biharmonic_green_kernel
clamped_biharmonic_inverse_norm
omnibias.core.verified.clamped_biharmonic_inverse_normSource ↗clamped_biharmonic_inverse_norm(length: int | Fraction=1) -> FractionExact sup-norm inverse constant L**4/384 on the clamped interval.
Parameters
| Name | Type & default | Contract |
|---|---|---|
lengthpositional-or-keyword | int | FractionDefault: 1 | See the operation contract and implementation below. |
FractionExplicit validation & failure cases
- When
length <= 0, raisesValueError('interval length must be positive').
These are explicit source guards. Backend operations may also raise for invalid shapes, dtypes, or unsupported devices.
Executed regression · failed contraction or self map refuses
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_failed_contraction_or_self_map_refuses():
assert not clamped_cubic_contraction(1, 32, 32, Q(1, 1000000)).passed
assert not clamped_cubic_contraction(1, 0, 1000, Q(1, 8)).passedpython -m pytest "packages/omnibias-core/tests/verified/test_clamped_biharmonic.py::test_failed_contraction_or_self_map_refuses" -qRegression example · domain refusals
This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_domain_refusals():
with pytest.raises(ValueError):
clamped_biharmonic_inverse_norm(0)
with pytest.raises(ValueError):
clamped_biharmonic_green_kernel(-1, 0)
with pytest.raises(ValueError):
clamped_biharmonic_green_kernel(1, 0, length=Q(1, 2))python -m pytest packages/omnibias-core/tests/verified/test_clamped_biharmonic.py -k test_domain_refusals -qRead the implementation
def clamped_biharmonic_inverse_norm(length: int | Fraction = 1) -> Fraction:
"""Exact sup-norm inverse constant L**4/384 on the clamped interval."""
length = _rational(length)
if length <= 0:
raise ValueError("interval length must be positive")
return length**4 / 384Other public import paths
omnibias.core.verified.clamped_biharmonic_inverse_normomnibias.core.verified.clamped_biharmonic.clamped_biharmonic_inverse_norm
clamped_cubic_contraction
omnibias.core.verified.clamped_cubic_contractionSource ↗clamped_cubic_contraction(candidate_sup_upper: int | Fraction, residual_sup_upper: int | Fraction, coupling_upper: int | Fraction, radius: int | Fraction, *, length: int | Fraction=1) -> ClampedCubicContractionCheck a full-Green contraction gate from supplied, unverified U and R.
Parameters
| Name | Type & default | Contract |
|---|---|---|
candidate_sup_upperpositional-or-keyword | int | FractionRequired | See the operation contract and implementation below. |
residual_sup_upperpositional-or-keyword | int | FractionRequired | See the operation contract and implementation below. |
coupling_upperpositional-or-keyword | int | FractionRequired | See the operation contract and implementation below. |
radiuspositional-or-keyword | int | FractionRequired | See the operation contract and implementation below. |
lengthkeyword-only | int | FractionDefault: 1 | See the operation contract and implementation below. |
ClampedCubicContractionExplicit validation & failure cases
- When
min(u, residual, coupling) < 0 or radius <= 0, raisesValueError('require nonnegative U, R, coupling and positive radius').
These are explicit source guards. Backend operations may also raise for invalid shapes, dtypes, or unsupported devices.
Executed regression · nonrational inputs refused
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_nonrational_inputs_refused(args):
with pytest.raises(TypeError):
clamped_cubic_contraction(*args)python -m pytest "packages/omnibias-core/tests/verified/test_clamped_biharmonic.py::test_nonrational_inputs_refused[args0]" -qRegression example · wrong sign inputs refused
This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_wrong_sign_inputs_refused(args):
with pytest.raises(ValueError):
clamped_cubic_contraction(*args)python -m pytest packages/omnibias-core/tests/verified/test_clamped_biharmonic.py -k test_wrong_sign_inputs_refused -qRead the implementation
def clamped_cubic_contraction(
candidate_sup_upper: int | Fraction,
residual_sup_upper: int | Fraction,
coupling_upper: int | Fraction,
radius: int | Fraction,
*,
length: int | Fraction = 1,
) -> ClampedCubicContraction:
"""Check a full-Green contraction gate from supplied, unverified U and R."""
u, residual, coupling, radius, length = (
_rational(value)
for value in (candidate_sup_upper, residual_sup_upper, coupling_upper, radius, length)
)
if min(u, residual, coupling) < 0 or radius <= 0:
raise ValueError("require nonnegative U, R, coupling and positive radius")
norm = clamped_biharmonic_inverse_norm(length)
defect = norm * residual
contraction = 3 * coupling * norm * (u + radius) ** 2
margin = radius - defect - contraction * radius
return ClampedCubicContraction(
u, residual, coupling, radius, length, norm, defect, contraction, margin
)Other public import paths
omnibias.core.verified.clamped_cubic_contractionomnibias.core.verified.clamped_biharmonic.clamped_cubic_contraction