Documentation

Complexitylib.Metacomplexity.StatisticalTest.Oracle

Finite statistical tests as Boolean oracles #

The canonical oracle accepts exactly the fixed-length strings in a finite statistical test and rejects every malformed-length query.

@[simp]
theorem Complexity.decodeFixedWidthBoolean?_ofFn {length : } (bits : Fin lengthBool) :

Fixed-width decoding round-trips a canonical function encoding.

@[simp]
theorem Complexity.finiteTestOracle_ofFn {outputLength : } (test : Finset (Fin outputLengthBool)) (output : Fin outputLengthBool) :
finiteTestOracle test (List.ofFn output) = decide (output test)

The finite-test oracle answers canonical fixed-length queries by test membership.

theorem Complexity.finiteTestOracle_ofFn_eq_true_iff {outputLength : } (test : Finset (Fin outputLengthBool)) (output : Fin outputLengthBool) :
finiteTestOracle test (List.ofFn output) = true output test

The finite-test oracle returns true exactly on members of the test.

theorem Complexity.finiteTestOracle_eq_false_of_length_ne {outputLength : } (test : Finset (Fin outputLengthBool)) {query : List Bool} (hlength : query.length outputLength) :

Every query of the wrong length is rejected.