TorchLean API

NN.MLTheory.CROWN.Proofs.GraphAlphaCrownTransferSoundness.Alpha.Basic

α-CROWN Transfer: Shared Extraction Lemmas #

Helper lemmas shared by the per-operator cases of alphaCrown_transfer_sound. They turn the safe lookups getAff?, getVal?, and getAlpha? into plain array lookups, package the parent hypothesis of CrownTransferSound, and transport enclosures across output-dimension casts and constant boxes.

Every parent p of node id whose certificate entry and semantic value are both present is enclosed at the input point x. This is the parent hypothesis of CrownTransferSound with its match unfolded.

Instances For
    theorem NN.MLTheory.CROWN.Graph.AlphaCrownTransferSoundness.Alpha.parentsEnclosed_of_match {g : Graph} {cert : Array (Option (FlatAffineBounds ))} {vals : Array (Option CertSoundness.Val)} {ctx : AffineCtx} {x : TorchLean.Tensor [ctx.inputDim]} {id : } (hparents : pg.nodes[id]!.parents, match cert[p]!, vals[p]! with | some bp, some vp => CrownCertSoundness.EnclosesAtInput ctx x bp vp | x, x_1 => True) :
    ParentsEnclosed g cert vals ctx x id

    The match-shaped parent hypothesis of CrownTransferSound implies ParentsEnclosed.

    A successful safe certificate lookup is a plain array lookup.

    getElem!_of_getVal?_eq_some is CertSoundness's lemma, opened at the top of this file. Two files in this directory carried their own copy of it, proved with by_cases where the original uses unfold and split; the statements were the same, so the copies are gone.

    A successful safe α lookup is in bounds and is a plain array lookup.

    The unique parent of a unary node is enclosed whenever its certificate entry and semantic value are both found by the safe lookups.

    Under SemLocalOK, a present semantic value at id is the evaluator's output.

    Transport an enclosure along an equality of boxes and a heterogeneous equality of values.

    A point box encloses its own point.

    A constant affine enclosure built from a box B0 is sound at every input point whenever B0 encloses the value.

    Casting the output dimension of enclosing affine bounds yields a box, evaluated at the input point, that encloses the correspondingly cast value. This is the componentwise form of enclosesAtInput_castOut used by the linear and ReLU cases.