3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-03 04:33:28 +00:00

handle lambda equalities

This commit is contained in:
Nikolaj Bjorner 2026-07-05 12:51:33 -07:00
parent eccdffa781
commit 165f79a051
3 changed files with 36 additions and 1 deletions

View file

@ -23,6 +23,7 @@ Revision History:
#include "smt/smt_model_generator.h"
#include "model/func_interp.h"
#include "ast/ast_smt2_pp.h"
#include "ast/pattern/pattern_inference.h"
namespace smt {
@ -413,6 +414,16 @@ namespace smt {
expr * eq = m.mk_eq(sel1, sel2);
expr_ref q(m.mk_forall(dimension, sorts.data(), names.data(), eq), m);
ctx.get_rewriter()(q);
// The select terms are beta-reduced away by the rewriter, so the
// resulting quantifier carries no patterns. Infer patterns so that the
// e-matching engine can instantiate it (dynamically generated
// quantifiers bypass the pre-processing pattern inference pass).
if (is_forall(q) && to_quantifier(q)->get_num_patterns() == 0) {
pattern_inference_rw infer(m, ctx.get_fparams());
expr_ref q2(m);
infer(q, q2);
q = q2;
}
if (!ctx.b_internalized(q)) {
ctx.internalize(q, true);
}