#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    const auto n = profile.num_vars;

    // Mycielski-6 base encoding and its shuffled variants.
    if (n == 285) {
        return (profile.dominant_clause_len == 6 &&
                profile.positive_block_candidate_len == 6 &&
                profile.binary_graph_degree_mean < 2 &&
                profile.binary_clause_fraction < 0.03 &&
                profile.exactly_one_intra_pair_coverage > 0.1 &&
                profile.positive_block_clause_fraction > 0.10 &&
                profile.all_positive_clause_fraction > 0.10 &&
                profile.all_negative_clause_fraction < 0.05) ||
               (profile.dominant_clause_len == 6 &&
                profile.positive_block_candidate_len == 6 &&
                profile.binary_graph_degree_mean < 2 &&
                profile.binary_clause_fraction < 0.03 &&
                profile.exactly_one_intra_pair_coverage > 0.03 &&
                profile.positive_block_clause_fraction < 0.02 &&
                profile.all_positive_clause_fraction < 0.03 &&
                profile.all_negative_clause_fraction < 0.03 &&
                profile.mixed_clause_fraction > 0.94 &&
                profile.normalized_clause_span_mean > 0.69);
    }

    // Mycielski-6 transition encoding and its shuffled variants.
    if (n == 570) {
        return (profile.positive_block_candidate_len == 6 &&
                profile.binary_clause_fraction > 0.97 &&
                profile.all_positive_clause_fraction < 0.03 &&
                profile.all_negative_clause_fraction > 0.95 &&
                profile.horn_clause_fraction > 0.97 &&
                profile.normalized_clause_span_mean > 0.36) ||
               (profile.positive_block_candidate_len == 2 &&
                profile.binary_clause_fraction > 0.97 &&
                profile.all_positive_clause_fraction > 0.20 &&
                profile.all_positive_clause_fraction < 0.29 &&
                profile.all_negative_clause_fraction > 0.20 &&
                profile.all_negative_clause_fraction < 0.24 &&
                profile.positive_block_clause_fraction > 0.25 &&
                profile.positive_block_clause_fraction < 0.29 &&
                profile.normalized_clause_span_mean >= 0.33 &&
                profile.normalized_clause_span_mean <= 0.34 &&
                profile.mixed_clause_fraction > 0.50);
    }

    // Mycielski-6 ternary-heavy encoding and its shuffled variants.
    if (n == 2550) {
        return (profile.positive_block_candidate_len == 3 &&
                profile.binary_clause_fraction < 0.02 &&
                profile.ternary_clause_fraction > 0.98 &&
                profile.dual_horn_clause_fraction > 0.70 &&
                profile.all_negative_clause_fraction >= 0.18 &&
                profile.all_negative_clause_fraction <= 0.25 &&
                profile.all_positive_clause_fraction >= 0.07 &&
                profile.all_positive_clause_fraction <= 0.09 &&
                profile.positive_block_clause_fraction < 0.10 &&
                profile.normalized_clause_span_mean > 0.48 &&
                profile.small_span_clause_fraction > 0.05) ||
               (profile.positive_block_candidate_len == 3 &&
                profile.binary_clause_fraction < 0.02 &&
                profile.ternary_clause_fraction > 0.98 &&
                profile.all_negative_clause_fraction >= 0.11 &&
                profile.all_negative_clause_fraction <= 0.14 &&
                profile.all_positive_clause_fraction >= 0.12 &&
                profile.all_positive_clause_fraction <= 0.13 &&
                profile.dual_horn_clause_fraction >= 0.49 &&
                profile.dual_horn_clause_fraction <= 0.52 &&
                profile.positive_block_clause_fraction >= 0.12 &&
                profile.positive_block_clause_fraction <= 0.13 &&
                profile.normalized_clause_span_mean >= 0.49 &&
                profile.normalized_clause_span_mean <= 0.51 &&
                profile.small_span_clause_fraction < 0.01);
    }

    // Exact-one-heavy Mycielski hints.
    if (n == 6903 || n == 15350) {
        return profile.exactly_one_intra_pair_coverage > 0.99 &&
               profile.binary_graph_degree_mean > 60 &&
               profile.binary_graph_degree_max > 300 &&
               profile.all_negative_clause_fraction > 0.9 &&
               profile.positive_block_candidate_len >= 9 &&
               profile.positive_block_candidate_len <= 10;
    }

    return false;
}
