Organizations: Key Laboratory of System Software (Chinese Academy of Sciences), Institute of Software, Chinese Academy of Sciences, Beijing, China · University of Chinese Academy of Sciences, Beijing, China · Birkbeck, University of London, United Kingdom · Nanjing Institute of Software Technology, Nanjing, China
Solving constraints involving inductive (aka recursive) definitions is challenging. State-of-the-art SMT/CHC solvers and first-order logic provers provide only limited support for solving such constraints, especially when they involve, e.g., abstract data types. In this work, we leverage structured prompts to elicit Large Language Models (LLMs) to generate auxiliary lemmas that are necessary for reasoning about these inductive definitions. We further propose a neuro-symbolic approach, which synergistically integrates LLMs with constraint solvers: the LLM iteratively generates conjectures, while the solver checks their validity and usefulness for proving the goal. We evaluate our approach on a diverse benchmark suite comprising constraints originating from algebrai data types and recurrence relations. The experimental results show that our approach can improve the state-of-the-art SMT and CHC solvers, solving considerably more (around 25%) proof tasks involving inductive definitions, demonstrating its efficacy.
Figures & tables
Benchmark
Total
LLM4Ind
cvc5
Vampire
Racer
<1200s
<360s
<1200s
<360s
<1200s
<360s
<1200s
<360s
StandardDT
241
212
200
150
150
160
160
N/A
N/A
StandardDTLIA
168
134
127
76
76
58
56
40
40
AutoProofBM
141
65
61
34
34
3
3
N/A
N/A
IndBen
156
114
104
34
34
122
118
N/A
N/A
Total
706
525
492
293
293
343
337
40
40
Table 1: Comparison with baseline SMT solvers
Benchmark
Qwen
DeepSeek
Gemini
GPT-5
LLM4Ind
Naive
LLM4Ind
Naive
LLM4Ind
Naive
LLM4Ind
Naive
StandardDT
212
160
206
153
206
155
212
180
StandardDTLIA
134
88
131
90
119
91
144
106
AutoProofBM
65
42
63
43
68
49
67
46
IndBen
114
89
121
79
126
76
129
118
Total
525
379
521
365
514
371
552
450
Table 2: Results of LLM4Ind using different LLMs and naive prompt strategy
Benchmark
W. filter
W.o. filter
Avg time (s)
R1
R2
R3
Avg
R1
R2
R3
Avg
W. filter
W.o. filter
StandardDT
212
211
207
210
204
203
209
205.3
83.91
67.26
StandardDTLIA
134
137
135
135.3
134
139
134
135.7
97.53
112.05
AutoProofBM
65
61
64
63.3
60
64
64
62.7
99.10
103.61
IndBen
114
111
111
112
113
106
111
110
168.92
178.64
Total
525
520
517
520.7
511
512
518
513.7
107.59
107.37
Table 3: Results of LLM4Ind with and without filter over three runs
Benchmark
T = 0.1
T = 0.5
T = 0.9
T = 1.3
R1
R2
R3
R1
R2
R3
R1
R2
R3
R1
R2
R3
StandardDT
211
206
210
207
209
207
212
211
207
208
209
210
StandardDTLIA
135
139
135
136
138
138
134
137
135
140
136
135
AutoProof
60
62
62
61
62
61
65
61
64
60
60
65
IndBen
114
108
114
110
107
113
114
111
111
119
113
112
Total
520
515
521
514
516
519
525
520
517
527
518
522
Table 4: Results of LLM4Ind with different sampling temperatures
Benchmark
Total
LLM4Ind -V
cvc5
Vampire
Racer
<1200s
<360s
<1200s
<360s
<1200s
<360s
<1200s
<360s
StandardDT
241
214
206
150
150
160
160
N/A
N/A
StandardDTLIA
168
80
73
76
76
58
56
40
40
AutoProofBM
141
19
16
34
34
3
3
N/A
N/A
IndBen
156
140
140
34
34
122
118
N/A
N/A
Total
706
453
435
293
293
343
337
40
40
Table 5: Comparison with baseline SMT solvers (Vampire backend)