Identifier
F:creal-close-within-of-within-indexed
Proof route
kernel-lean
External status
proved
Axiom footprint
Empty

Recorded description

If the m-th rational sample of x and the n-th rational sample of y are within k of each other (the raw, Rat-level Within predicate, at potentially DIFFERENT indices m and n for the two sides), then x and y are close as CReal values: |x - y| <= ofRat(k + 1/(m+1) + 1/(n+1)). This generalizes the already-registered F:creal-close-within-of-within (which shares one index n for both x and y) to two INDEPENDENT sample indices, absorbing one self-approximation gap for whichever index each side actually used. This is the bridge CReal.riemannSum_sharedAccuracyClose_at's own kind of argument needs, where the two sides of a comparison are not sampled at the same accuracy-driven index.

Formal statement
theorem CReal.close_within_of_within_indexed : ((x0 : CReal) -> ((x1 : CReal) -> ((x2 : AxNat) -> ((x3 : AxNat) -> ((x4 : Rat) -> ((x5 : CReal.Within (Rat.sub (CReal.seq x0 x2) (CReal.seq x1 x3)) x4) -> CReal.le (CReal.abs (CReal.add x0 (CReal.neg x1))) (CReal.ofRat (Rat.add x4 (Rat.add (Rat.natDivSucc (AxNat.succ AxNat.zero) x2) (Rat.natDivSucc (AxNat.succ AxNat.zero) x3))))))))))

Dependencies

The graph shows direct ledger edges. Follow a node to open its artifact page.

Direct dependencies appear to the left. The current fact is in the center. Facts that depend directly on it appear to the right. [generated] kernel theorem CRea Addition preserves order on the CReal.Equiv is reflexive CReal.Equiv is symmetric The order on the constructed re The order on the constructed re The order on the constructed re The rational-to-constructed-rea Current fact
20 direct dependencies 0 direct dependents Graph shows the first 8 on each side.

Evidence

kernel-CReal.close_within_of_within_indexed

Kind
kernel-term
Status
checked

Supports: CReal.close_within_of_within_indexed is admitted by the trusted kernel gate with the type recorded in formal.statement.

Checker command
cargo run -q --release -p axeyum-lean-kernel --example theorem_dependency_inventory -- close_within_of_within_indexed 2>/dev/null | grep -cE '^CReal\.close_within_of_within_indexed[[:space:]]'
Evidence notes

build_creal_prelude admits CReal.close_within_of_within_indexed through the trusted Kernel::add_declaration gate. theorem_dependency_inventory exits non-zero for a named filter matching nothing; grep -c asserts the exact tab-anchored line. Verified with /usr/bin/grep directly (not the ugrep-backed interactive `grep` function) against a freshly built --release binary on this tree, returning count 1. --release is MANDATORY: this tool also builds creal/complex/cpoint, which overflow the default debug thread stack.

footprint-CReal.close_within_of_within_indexed

Kind
exhaustive-enumeration
Status
checked

Supports: axiom_footprint: [] -- the creal prelude's trusted surface is empty, which bounds CReal.close_within_of_within_indexed

Checker command
cargo run -q --release -p axeyum-lean-kernel --example nat_axiom_inventory -- --include-constructed --require-axiom-free creal
Evidence notes

Re-measured on this tree: creal: axiom=0 opaque=0 quotient=0 total_trusted=0, exits 0 printing 'ok: creal trusted surface = 0'. That bounds every declaration in the creal environment, including CReal.close_within_of_within_indexed, since a declaration cannot depend on a trusted declaration the environment does not contain. --require-axiom-free <name> errors for a prelude never built by this run rather than silently passing on zero rows. --release is MANDATORY here.

Provenance

{
  "date": "2026-08-27",
  "established_by": "axeyum-lean-kernel build_creal_prelude (crates/axeyum-lean-kernel/src/creal/integral.rs, declare_close_within_of_within_indexed)",
  "source": "canonical type read via kernel_declaration_projection's own UNFILTERED emit mode (cargo run -q --release -p axeyum-lean-kernel --example kernel_declaration_projection, no --require-declaration flag), which prints, per constructed prelude, one TSV row per declaration whose last field is kernel.render_lean(declaration.ty()). That output was piped to a scratchpad file and the exact row for this declaration's creal prelude row was extracted and injected here programmatically (a Python script reading the TSV, never hand-transcribed); direct theorem dependencies were cross-read from the same run's direct_theorems column (second-to-last field) and matched against the ledger's own registered facts (by parsing each candidate fact's formal.statement for its declared theorem/def name) to populate depends_on. No new probe binary was written for this batch; crates/ source was not touched to produce this batch."
}