Commit 91a7b2c
R-11: cong over built-in operators (the operator-congruence payoff)
Mirror of Lean #51. Real cvc5 LIA traces use [cong] to lift
argument equalities through built-in operators (not / + / <=),
not just UF symbols. This is the congruence shape that lets a real
alethe-2024 trace walk end-to-end instead of falling through to
lia -- the capability the whole arc was building toward, now
wired live via R-9.
No elaborator change was needed. The plan budgeted a Constr-level
refactor of elab_cong here, but it landed early in R-5: because
Coq has no mkCongr, elab_cong was open-coded at the Constr level
from the start (translate LHS/RHS via sexp_to_constr, peel the
app spine via decompose_app, per-argument f_equal + eq_trans
chain). Operator heads (Zadd / Zle / not) decompose exactly like
UF heads -- no UF-specific assumption anywhere in the elaborator.
Three tests confirm the operator cases:
- cong over not (unary, Prop -> Prop)
- cong over + (binary over Z)
- cong over <= (binary, predicate-valued: result type Prop, the
constant arg carried by a refl premise)
All axiom-free (cong is f_equal / eq_trans / eq_refl).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6541d49 commit 91a7b2c
2 files changed
Lines changed: 67 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1240 | 1240 | | |
1241 | 1241 | | |
1242 | 1242 | | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
539 | 545 | | |
540 | 546 | | |
0 commit comments