Documentation

HexPrimality.Elab

ABI version of the downstream factor-search registration boundary.

Equations
Instances For

    One downstream partial-factor producer available to elaboration-time certificate search. The version is checked before the function is used.

    • version : Nat

      Version of the extension ABI implemented by this registration.

    • factorName : Lean.Name

      Fully qualified name of the registered partial-factor producer.

    Instances For

      Well-known search-extension constants, checked in deterministic order. Adding or reordering an entry requires a HexPrimality release.

      Equations
      Instances For

        Registered factor-search extensions present in the environment. Each declaration's type and ABI version are checked before deterministic dispatch.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          ABI version of providers selected before bounded certificate construction.

          Equations
          Instances For

            A downstream default construction provider, separate from ordinary search.

            Instances For

              Fixed discovery order. The first present registration supplies the factor provider for the entire construction. Changes require a HexPrimality release.

              Equations
              Instances For

                Validate a present registration before evaluating its factor provider. Absence is allowed; malformed registrations are errors, not silent skips.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Select the first registered construction provider before searching, or the core provider when none is imported. Table primes, composites, invalid sizes and zero allowances return without inspecting registrations. A single run shares its allocation across factoring, children and witnesses.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Eq.refl true as a raw proof slot: the kernel verifies the reified Bool equation by reduction alone.

                    Equations
                    Instances For

                      Reify a certificate as constructor applications over Nat literals. Pure data with no proof slots, so the reifier is total and the kernel obligations all live in the one Eq.refl true slot of the wrapper.

                      Equations
                      Instances For

                        Reify a factor list.

                        Equations
                        Instances For

                          Reject open terms: the search and the kernel replay both need a closed numeral.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Supported bit-length ceiling for every elaboration-time certificate route. The 512-bit boundary is the largest measured fresh-module rung; changing it requires new end-to-end search, reification, and kernel-replay evidence.

                            Equations
                            Instances For

                              Maximum recursive fuel passed to elaboration-time certificate search. The settled default is one unit per input bit, so this is deliberately the same quantity as the supported input ceiling. Keeping the definitions linked prevents one policy boundary from changing without the other.

                              Equations
                              Instances For

                                Maximum Brent restarts at one partial-factor worklist entry on every elaboration-time certificate route.

                                Equations
                                Instances For

                                  Maximum Brent cycle steps per restart on every elaboration-time certificate route.

                                  Equations
                                  Instances For

                                    The fuel selected by every elaboration-time certificate route.

                                    Equations
                                    Instances For

                                      Whether an input is admitted by the common elaboration policy.

                                      Equations
                                      Instances For

                                        Enforce the common input-size policy before any certificate search.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          def Hex.PrimalityTactic.throwPrimalityExhausted {α : Type} (tactic : String) (n attempts fuel : Nat) :

                                          Report bounded-search exhaustion without inviting an unbounded fallback.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

                                            Run the certificate search and emit the checked proof term with head applied to the subject, the reified certificate, and the Eq.refl true slot: prime_of_checkPrimeAt here, the companion's Nat.Prime-flavoured wrapper there. The search result is self-checked with the same compiled checkPrime the kernel will replay before anything is emitted.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For

                                              provePrimeWith at the Mathlib-free wrapper: the proof term for Hex.Nat.Prime n.

                                              Equations
                                              Instances For

                                                Elaborate a primality argument to its numeral and proof.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For

                                                  primality n elaborates to a proof of Hex.Nat.Prime n for a literal n.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For

                                                    Elaborator for the Mathlib-free primality n term syntax.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For

                                                      Try to close a goal of the form Hex.Nat.Prime e; return false when the goal has a different shape.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For

                                                        Tactic forms of primality: bare primality closes a Hex.Nat.Prime e goal; primality n adds the proof as this; primality h : n names it h.

                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For

                                                          Evaluator for the Mathlib-free primality tactic forms.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For

                                                            Render a literal using the same expression reifier as ordinary proof emission. Full names and fixed pretty-printing options make the suggestion independent of namespace openings and display settings.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For

                                                              The complete finite construction resource description used in diagnostics.

                                                              Instances For

                                                                Evaluate an explicitly supplied, closed producer as untrusted code. Only its literal result reaches the proof; neither the producer nor its imports are needed to replay the suggestion.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For

                                                                  Explicitly select an untrusted factor provider for bounded construction.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For

                                                                    Construct a reusable certificate with an optional total attempt limit.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For

                                                                      Check and render an explicitly selected closed certificate producer.

                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For

                                                                        Shared goal handler for core and companion primality? registrations.

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For

                                                                          Core certificate-literal suggestion handler.

                                                                          Equations
                                                                          Instances For