TorchLean API

NN.Verification.Cert.CROWNQuery.Json

JSON acceptance implies output-query safety #

crown_query_v1 describes an exact rational dense/ReLU network, an input box, proposed ReLU α values, and affine output inequalities. The checker recomputes affine bounds using existing CROWN transfers. Parameters use integer or fraction strings; numeric JSON literals are rejected.

The theorem concerns the real TorchLean model and query decoded from these bytes. It does not identify this model with an ONNX file or a floating-point deployment. This is a separate format from the binary32 node-replay transcript; β dual variables, cuts, and branch trees are unsupported.

Decode one linear or relu layer whose input dimension is n.

Instances For

    Decode a nonempty layer list into a composed network, threading the dimensions.

    Instances For

      Decode the model, input domain, and output property from the same document.

      Instances For

        Decode and check a query document; malformed documents are rejected.

        Instances For

          Every accepted document denotes a model whose outputs satisfy its query throughout its box.

          Parse and check a query document given as text. This is the CLI verdict.

          Instances For
            theorem NN.Verification.Cert.CROWNQuery.acceptsText_sound (source : String) (h : acceptsText source = true) :
            ∃ (j : Lean.Json) (n : ℕ) (m : ℕ) (q : Query n m), Lean.Json.parse source = Except.ok j ∧ decode j = Except.ok ⟨n, ⟨m, q⟩⟩ ∧ q.Safe

            Text acceptance implies the universal real output property, without a producer axiom.

            Why acceptsText rejected a document, for error messages. The verdict is acceptsText.

            Instances For

              CLI entry point: lake exe verify -- crown-query <query.json>.

              Instances For