Documentation

CslibFrontier.Algorithms.PlantedClique.Representation

Representing semantic planted-clique inputs and answers #

RecoveryInput.ofGraph presents a finite simple graph by its full row-major adjacency word, together with its vertex count and the public target size. Decoding this presentation returns the original graph. This describes which input words represent a mathematical graph; it is not a sampling primitive or a computation performed by the recovery program.

The program returns a list of natural vertex identifiers. vertexSet interprets those identifiers in the graph's finite vertex type. When the list's finite set is exactly the image of a vertex set under Fin.val, this interpretation recovers that set. The recovery program's correctness theorem establishes that image equality for the actual list it computes and writes.

Present a graph by all n² adjacency bits in row-major order and its public target size.

@[simp]

The canonical dense presentation decodes to the original graph.

The canonical input uses n² raw adjacency bits and two framed unary parameters.

Interpret a list of natural identifiers as the set of vertices it names in Fin n.

theorem Cslib.Algorithms.PlantedClique.image_vertexSet (n : ℕ) (vertices : List ℕ) :
Finset.image Fin.val (vertexSet n vertices) = {x ∈ vertices.toFinset | x < n}

Interpreting a vertex list and forgetting the bounded-index proofs keeps exactly the identifiers below the declared dimension, with duplicates removed.

theorem Cslib.Algorithms.PlantedClique.card_vertexSet_of_nodup {n : ℕ} (vertices : List ℕ) (hnodup : vertices.Nodup) (hbound : ∀ i ∈ vertices, i < n) :
(vertexSet n vertices).card = vertices.length

A bounded duplicate-free vertex list and its interpreted set have the same size.

A list representing exactly the natural identifiers of S is interpreted as S.