Identifier
F:int-firstsupplementarylawresidue
Proof route
kernel-lean
External status
Not recorded
Axiom footprint
Empty

Recorded description

The residue half of the first supplementary law of quadratic reciprocity. For a modulus p = 2m+1 satisfying this kernel's PrimeCond, with m EVEN -- equivalently p congruent to 1 modulo 4 -- the integer -1 IS a quadratic residue modulo p, where `Int.IsQuadraticResidue p a` is this prelude's own definition, the existence of an x with x*x congruent to a modulo p. The witness is `Int.factorial m`. Nothing here is imported or axiomatised: the modulus is this kernel's constructed natural, the congruence is `Int.ModEq` over the constructed integers, and `Kernel::axiom_footprint` for this declaration is EMPTY. WHAT THIS DOES AND DOES NOT CLAIM. Together with F:int-firstsupplementarylawnotresidue (the p congruent to 3 modulo 4 half, ADR-1230) this pair decides -1's quadratic-residue-hood for every odd prime, which is the full first supplementary law. Neither fact alone does, and this one alone decides nothing about p congruent to 3 modulo 4. The two are stated as separate implications, not as one biconditional; no single declaration in this prelude carries the biconditional. Primality is load-bearing and is not discharged -- it is what Wilson's theorem needs. `Nat.Even m` is load-bearing too and the theorem is FALSE without it: at odd m the conclusion is the exact opposite one, which F:int-firstsupplementarylawnotresidue proves. The CONVERSE of Euler's criterion is NOT used and is still not available in this kernel; see notes for the route that avoids it.

Formal statement
theorem Int.firstSupplementaryLawResidue : ((x0 : AxNat) -> ((x1 : And (AxNat.le (AxNat.succ (AxNat.succ AxNat.zero)) (AxNat.succ (AxNat.mul (AxNat.succ (AxNat.succ AxNat.zero)) x0))) (((x1 : AxNat) -> ((x2 : AxNat.dvd x1 (AxNat.succ (AxNat.mul (AxNat.succ (AxNat.succ AxNat.zero)) x0))) -> Or (Eq.{1} AxNat x1 (AxNat.succ AxNat.zero)) (Eq.{1} AxNat x1 (AxNat.succ (AxNat.mul (AxNat.succ (AxNat.succ AxNat.zero)) x0))))))) -> ((x2 : AxNat.Even x0) -> Int.is_quadratic_residue (Int.ofNat (AxNat.succ (AxNat.mul (AxNat.succ (AxNat.succ AxNat.zero)) x0))) (Int.neg Int.one))))

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. Multiplying an integer by one o [generated] kernel theorem Int. Wilson's theorem split at the h Current fact
3 direct dependencies 0 direct dependents

Evidence

kernel-Int.firstSupplementaryLawResidue

Kind
kernel-term
Status
checked

Supports: Int.firstSupplementaryLawResidue 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 -- Int.firstSupplementaryLawResidue 2>/dev/null | grep -cE '^Int\.firstSupplementaryLawResidue[[:space:]]'
Evidence notes

Two independent failure modes, so the exit status depends on the finding rather than on the run completing: theorem_dependency_inventory exits non-zero when a NAMED filter matches nothing, and grep -c exits 1 printing 0 when the anchored line is absent. Anchored with [[:space:]], never \t -- in a scripted (GNU) grep \t is a literal t. grep -c rather than grep -q, which would SIGPIPE the producer under pipefail. --release is MANDATORY: this tool builds creal/complex/cpoint, which overflow the default debug thread stack.

footprint-Int.firstSupplementaryLawResidue

Kind
exhaustive-enumeration
Status
checked

Supports: axiom_footprint: [] -- the integer prelude's trusted surface is empty, which bounds Int.firstSupplementaryLawResidue.

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

--require-axiom-free exits non-zero when the named prelude's trusted surface (Axiom + Opaque + Quotient) is not empty, and errors rather than silently passing for a prelude the run never built. A declaration cannot depend on a trusted declaration the environment does not contain, so an empty integer surface bounds every declaration in it, including Int.firstSupplementaryLawResidue. This is a whole-prelude bound, not a per-declaration measurement; the per-declaration figure is the footprint column of kernel_declaration_projection, measured 0 for this row.

Provenance

{
  "date": "2026-08-31",
  "curation": "generated-unreviewed",
  "generated_by": "scripts/gen-kernel-facts.py",
  "established_by": "axeyum-lean-kernel build_int_prelude (crates/axeyum-lean-kernel/src/int_prelude/)",
  "source": "Derived mechanically from the unfiltered emit of `cargo run -q --release -p axeyum-lean-kernel --example kernel_declaration_projection`, which prints one TSV row per declaration whose fields are (prelude, kind, display name, axiom-footprint size, direct type declarations, direct declarations, direct theorems, Kernel::render_lean(declaration.ty())). formal.statement is that last field verbatim; depends_on is the direct-theorem column intersected with this ledger's registered facts; axiom_footprint is the footprint-size column, cross-checked by the whole-prelude nat_axiom_inventory run recorded in the second evidence row. No field was hand-transcribed and no prose was authored. `title`, `statement` and `notes` were then REPLACED by hand (lane first-supplementary-residue, ADR-1235); every other field is the generator's output unmodified."
}