fraudTech commited on
Commit
e217d0f
·
1 Parent(s): c952627

remove elements from prolog debug

Browse files
Files changed (1) hide show
  1. src/App.js +0 -386
src/App.js CHANGED
@@ -1161,392 +1161,6 @@ function Message({ message }) {
1161
  </div>
1162
  </div>
1163
  )}
1164
- {message.debug.query_analysis && message.debug.query_analysis.summary_text && (
1165
- <div style={{
1166
- marginBottom: "15px",
1167
- padding: "14px",
1168
- background: "linear-gradient(135deg, #f3e5f5 0%, #e1f5fe 100%)",
1169
- border: "2px solid #7b1fa2",
1170
- borderRadius: "8px",
1171
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
1172
- }}>
1173
- <h4 style={{
1174
- marginTop: 0,
1175
- marginBottom: "12px",
1176
- color: "#4a148c",
1177
- fontSize: "1.15em",
1178
- borderBottom: "2px solid #7b1fa2",
1179
- paddingBottom: "6px",
1180
- fontWeight: "700"
1181
- }}>
1182
- 📊 Query Results by Category
1183
- </h4>
1184
- <div style={{
1185
- background: "#fff",
1186
- padding: "12px",
1187
- borderRadius: "6px",
1188
- fontSize: "0.95em",
1189
- lineHeight: "1.6",
1190
- whiteSpace: "pre-wrap",
1191
- color: "#1a1a1a"
1192
- }}>
1193
- <ReactMarkdown
1194
- remarkPlugins={[remarkMath, remarkGfm]}
1195
- rehypePlugins={[[rehypeKatex, { strict: "ignore", throwOnError: false, trust: true }]]}
1196
- >
1197
- {message.debug.query_analysis.summary_text}
1198
- </ReactMarkdown>
1199
- </div>
1200
- </div>
1201
- )}
1202
- {message.debug.lean_mathlib_analysis && message.debug.lean_mathlib_analysis.has_lean_queries && (
1203
- <div style={{
1204
- marginBottom: "15px",
1205
- padding: "12px",
1206
- background: "linear-gradient(135deg, #e0f7fa 0%, #e1bee7 100%)",
1207
- border: "2px solid #00897b",
1208
- borderRadius: "8px"
1209
- }}>
1210
- <h4 style={{
1211
- marginTop: 0,
1212
- marginBottom: "12px",
1213
- color: "#00695c",
1214
- fontSize: "1.1em",
1215
- borderBottom: "2px solid #00897b",
1216
- paddingBottom: "6px"
1217
- }}>
1218
- 🎓 Lean/Mathlib Verification Details
1219
- </h4>
1220
- {message.debug.lean_mathlib_analysis.theorems_verified &&
1221
- message.debug.lean_mathlib_analysis.theorems_verified.length > 0 && (
1222
- <div style={{ marginBottom: "12px" }}>
1223
- <strong style={{ color: "#00695c", fontSize: "1.05em" }}>
1224
- ✅ Successfully Verified Theorems:
1225
- </strong>
1226
- <ul style={{ marginTop: "6px", paddingLeft: "20px", color: "#1a1a1a" }}>
1227
- {message.debug.lean_mathlib_analysis.theorems_verified.map((vt, idx) => (
1228
- <li key={idx} style={{ marginBottom: "8px" }}>
1229
- <code style={{
1230
- background: "#fff",
1231
- padding: "3px 8px",
1232
- borderRadius: "4px",
1233
- fontSize: "0.95em",
1234
- color: "#d84315",
1235
- fontWeight: "600"
1236
- }}>
1237
- {vt.theorem}
1238
- </code>
1239
- <div style={{
1240
- marginLeft: "20px",
1241
- marginTop: "4px",
1242
- color: "#2e7d32",
1243
- fontWeight: "500"
1244
- }}>
1245
- {vt.status}
1246
- </div>
1247
- </li>
1248
- ))}
1249
- </ul>
1250
- </div>
1251
- )}
1252
- {message.debug.lean_mathlib_analysis.theorems_searched &&
1253
- message.debug.lean_mathlib_analysis.theorems_searched.length > 0 && (
1254
- <div style={{ marginBottom: "12px" }}>
1255
- <strong style={{ color: "#00695c", fontSize: "1.05em" }}>
1256
- 🔍 Mathlib Search Results:
1257
- </strong>
1258
- <ul style={{ marginTop: "6px", paddingLeft: "20px", color: "#1a1a1a" }}>
1259
- {message.debug.lean_mathlib_analysis.theorems_searched.map((sr, idx) => (
1260
- <li key={idx} style={{ marginBottom: "6px" }}>
1261
- <span style={{ fontStyle: "italic", color: "#6a1b9a" }}>
1262
- "{sr.search_term}"
1263
- </span>
1264
- {" → "}
1265
- <span style={{ color: "#2e7d32", fontWeight: "500" }}>
1266
- {sr.status}
1267
- </span>
1268
- <span style={{ marginLeft: "6px", color: "#555" }}>
1269
- ({sr.results_count} result{sr.results_count !== 1 ? 's' : ''})
1270
- </span>
1271
- </li>
1272
- ))}
1273
- </ul>
1274
- </div>
1275
- )}
1276
- {message.debug.lean_mathlib_analysis.proofs_attempted &&
1277
- message.debug.lean_mathlib_analysis.proofs_attempted.length > 0 && (
1278
- <div style={{ marginBottom: "12px" }}>
1279
- <strong style={{ color: "#00695c", fontSize: "1.05em" }}>
1280
- 📋 Proof Verification:
1281
- </strong>
1282
- <ul style={{ marginTop: "6px", paddingLeft: "20px", color: "#1a1a1a" }}>
1283
- {message.debug.lean_mathlib_analysis.proofs_attempted.map((pa, idx) => (
1284
- <li key={idx} style={{ marginBottom: "10px" }}>
1285
- <div style={{
1286
- background: "#fff",
1287
- border: "1px solid #9c27b0",
1288
- borderRadius: "4px",
1289
- padding: "8px"
1290
- }}>
1291
- <div style={{ marginBottom: "4px" }}>
1292
- <strong>Statement:</strong>{" "}
1293
- <code style={{
1294
- background: "#f3e5f5",
1295
- padding: "2px 6px",
1296
- borderRadius: "3px",
1297
- color: "#4a148c",
1298
- fontSize: "0.9em"
1299
- }}>
1300
- {pa.statement}
1301
- </code>
1302
- </div>
1303
- <div style={{ marginBottom: "4px" }}>
1304
- <strong>Using:</strong>{" "}
1305
- <code style={{
1306
- background: "#fff3e0",
1307
- padding: "2px 6px",
1308
- borderRadius: "3px",
1309
- color: "#e65100",
1310
- fontSize: "0.9em"
1311
- }}>
1312
- {pa.using_lemma}
1313
- </code>
1314
- </div>
1315
- <div style={{ color: "#2e7d32", fontWeight: "600" }}>
1316
- {pa.status}
1317
- </div>
1318
- </div>
1319
- </li>
1320
- ))}
1321
- </ul>
1322
- </div>
1323
- )}
1324
- {message.debug.lean_mathlib_analysis.mathematical_facts &&
1325
- message.debug.lean_mathlib_analysis.mathematical_facts.length > 0 && (
1326
- <div style={{
1327
- marginTop: "12px",
1328
- padding: "10px",
1329
- background: "#fff",
1330
- border: "2px solid #7b1fa2",
1331
- borderRadius: "6px"
1332
- }}>
1333
- <strong style={{ color: "#6a1b9a", fontSize: "1.05em" }}>
1334
- 🎯 Mathematical Facts Proven:
1335
- </strong>
1336
- <ul style={{ marginTop: "6px", paddingLeft: "20px", color: "#1a1a1a" }}>
1337
- {message.debug.lean_mathlib_analysis.mathematical_facts.map((fact, idx) => (
1338
- <li key={idx} style={{ marginBottom: "6px", fontWeight: "500" }}>
1339
- {fact}
1340
- </li>
1341
- ))}
1342
- </ul>
1343
- <div style={{
1344
- marginTop: "10px",
1345
- fontStyle: "italic",
1346
- color: "#555",
1347
- fontSize: "0.95em",
1348
- borderTop: "1px solid #e1bee7",
1349
- paddingTop: "8px"
1350
- }}>
1351
- These are classical results in number theory, related to Dirichlet's theorem on primes in arithmetic progressions.
1352
- </div>
1353
- </div>
1354
- )}
1355
- </div>
1356
- )}
1357
- {message.debug.query_analysis && message.debug.query_analysis.symbolic_computation &&
1358
- message.debug.query_analysis.symbolic_computation.has_queries && (
1359
- <div style={{
1360
- marginBottom: "15px",
1361
- padding: "12px",
1362
- background: "linear-gradient(135deg, #fff3e0 0%, #f1f8e9 100%)",
1363
- border: "2px solid #ef6c00",
1364
- borderRadius: "8px"
1365
- }}>
1366
- <h4 style={{
1367
- marginTop: 0,
1368
- marginBottom: "12px",
1369
- color: "#e65100",
1370
- fontSize: "1.1em",
1371
- borderBottom: "2px solid #ef6c00",
1372
- paddingBottom: "6px"
1373
- }}>
1374
- 🧮 Symbolic Computation Results
1375
- </h4>
1376
- {message.debug.query_analysis.symbolic_computation.computations &&
1377
- message.debug.query_analysis.symbolic_computation.computations.length > 0 && (
1378
- <div style={{ marginBottom: "10px" }}>
1379
- <strong style={{ color: "#e65100" }}>Computations Performed:</strong>
1380
- <ul style={{ marginTop: "6px", paddingLeft: "20px", color: "#1a1a1a" }}>
1381
- {message.debug.query_analysis.symbolic_computation.computations.map((comp, idx) => (
1382
- <li key={idx} style={{ marginBottom: "4px" }}>
1383
- {comp.type && <span style={{ fontWeight: "600", color: "#bf360c" }}>{comp.type}: </span>}
1384
- <code style={{ background: "#fff", padding: "2px 6px", borderRadius: "3px", fontSize: "0.9em" }}>
1385
- {comp.expr || comp.query}
1386
- </code>
1387
- <span style={{ marginLeft: "8px", color: "#555" }}>({comp.count} result{comp.count !== 1 ? 's' : ''})</span>
1388
- </li>
1389
- ))}
1390
- </ul>
1391
- </div>
1392
- )}
1393
- {message.debug.query_analysis.symbolic_computation.simplifications &&
1394
- message.debug.query_analysis.symbolic_computation.simplifications.length > 0 && (
1395
- <div>
1396
- <strong style={{ color: "#e65100" }}>Simplifications:</strong>
1397
- <ul style={{ marginTop: "6px", paddingLeft: "20px", color: "#1a1a1a" }}>
1398
- {message.debug.query_analysis.symbolic_computation.simplifications.map((simp, idx) => (
1399
- <li key={idx} style={{ marginBottom: "4px" }}>
1400
- <code style={{ background: "#fff", padding: "2px 6px", borderRadius: "3px", fontSize: "0.9em" }}>
1401
- {simp.expr}
1402
- </code>
1403
- </li>
1404
- ))}
1405
- </ul>
1406
- </div>
1407
- )}
1408
- </div>
1409
- )}
1410
- {message.debug.query_analysis && message.debug.query_analysis.session_data &&
1411
- message.debug.query_analysis.session_data.has_queries && (
1412
- <div style={{
1413
- marginBottom: "15px",
1414
- padding: "12px",
1415
- background: "linear-gradient(135deg, #e8f5e9 0%, #e0f2f1 100%)",
1416
- border: "2px solid #388e3c",
1417
- borderRadius: "8px"
1418
- }}>
1419
- <h4 style={{
1420
- marginTop: 0,
1421
- marginBottom: "12px",
1422
- color: "#2e7d32",
1423
- fontSize: "1.1em",
1424
- borderBottom: "2px solid #388e3c",
1425
- paddingBottom: "6px"
1426
- }}>
1427
- 💾 Session Data Queries
1428
- </h4>
1429
- {message.debug.query_analysis.session_data.lemmas &&
1430
- message.debug.query_analysis.session_data.lemmas.length > 0 && (
1431
- <div style={{ marginBottom: "8px" }}>
1432
- <strong style={{ color: "#2e7d32" }}>📝 Session Lemmas:</strong>
1433
- <span style={{ marginLeft: "8px", color: "#1a1a1a" }}>
1434
- Retrieved {message.debug.query_analysis.session_data.lemmas.reduce((sum, l) => sum + l.count, 0)} lemma(s)
1435
- </span>
1436
- </div>
1437
- )}
1438
- {message.debug.query_analysis.session_data.papers &&
1439
- message.debug.query_analysis.session_data.papers.length > 0 && (
1440
- <div style={{ marginBottom: "8px" }}>
1441
- <strong style={{ color: "#2e7d32" }}>📄 Papers:</strong>
1442
- <span style={{ marginLeft: "8px", color: "#1a1a1a" }}>
1443
- Queried {message.debug.query_analysis.session_data.papers.reduce((sum, p) => sum + p.count, 0)} paper fact(s)
1444
- </span>
1445
- </div>
1446
- )}
1447
- {message.debug.query_analysis.session_data.stories &&
1448
- message.debug.query_analysis.session_data.stories.length > 0 && (
1449
- <div>
1450
- <strong style={{ color: "#2e7d32" }}>📖 Stories:</strong>
1451
- <span style={{ marginLeft: "8px", color: "#1a1a1a" }}>
1452
- Queried {message.debug.query_analysis.session_data.stories.reduce((sum, s) => sum + s.count, 0)} story fact(s)
1453
- </span>
1454
- </div>
1455
- )}
1456
- </div>
1457
- )}
1458
- {message.debug.query_analysis && message.debug.query_analysis.proof_synthesis &&
1459
- message.debug.query_analysis.proof_synthesis.has_queries && (
1460
- <div style={{
1461
- marginBottom: "15px",
1462
- padding: "12px",
1463
- background: "linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%)",
1464
- border: "2px solid #c2185b",
1465
- borderRadius: "8px"
1466
- }}>
1467
- <h4 style={{
1468
- marginTop: 0,
1469
- marginBottom: "12px",
1470
- color: "#ad1457",
1471
- fontSize: "1.1em",
1472
- borderBottom: "2px solid #c2185b",
1473
- paddingBottom: "6px"
1474
- }}>
1475
- 🔬 Automated Proof Synthesis
1476
- </h4>
1477
- {message.debug.query_analysis.proof_synthesis.synthesized &&
1478
- message.debug.query_analysis.proof_synthesis.synthesized.length > 0 && (
1479
- <div>
1480
- <strong style={{ color: "#ad1457" }}>Proofs Generated:</strong>
1481
- <ul style={{ marginTop: "6px", paddingLeft: "20px", color: "#1a1a1a" }}>
1482
- {message.debug.query_analysis.proof_synthesis.synthesized.map((proof, idx) => (
1483
- <li key={idx} style={{ marginBottom: "6px" }}>
1484
- <code style={{
1485
- background: "#fff",
1486
- padding: "2px 6px",
1487
- borderRadius: "3px",
1488
- fontSize: "0.9em",
1489
- color: "#880e4f"
1490
- }}>
1491
- {proof.goal}
1492
- </code>
1493
- <span style={{ marginLeft: "8px", color: "#2e7d32", fontWeight: "600" }}>
1494
- ✓ {proof.count} solution{proof.count !== 1 ? 's' : ''}
1495
- </span>
1496
- </li>
1497
- ))}
1498
- </ul>
1499
- </div>
1500
- )}
1501
- </div>
1502
- )}
1503
- {message.debug.query_analysis && message.debug.query_analysis.general_kb &&
1504
- message.debug.query_analysis.general_kb.has_queries &&
1505
- Object.keys(message.debug.query_analysis.general_kb.facts_by_domain).length > 0 && (
1506
- <div style={{
1507
- marginBottom: "15px",
1508
- padding: "12px",
1509
- background: "linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%)",
1510
- border: "2px solid #1976d2",
1511
- borderRadius: "8px"
1512
- }}>
1513
- <h4 style={{
1514
- marginTop: 0,
1515
- marginBottom: "12px",
1516
- color: "#0d47a1",
1517
- fontSize: "1.1em",
1518
- borderBottom: "2px solid #1976d2",
1519
- paddingBottom: "6px"
1520
- }}>
1521
- 📚 Knowledge Base Facts Retrieved
1522
- </h4>
1523
- {Object.entries(message.debug.query_analysis.general_kb.facts_by_domain).map(([domain, facts]) => (
1524
- <div key={domain} style={{ marginBottom: "10px" }}>
1525
- <strong style={{ color: "#0d47a1", textTransform: "capitalize" }}>
1526
- {domain.replace(/_/g, ' ')}:
1527
- </strong>
1528
- <div style={{ marginLeft: "16px", marginTop: "4px" }}>
1529
- {facts.map((fact, idx) => (
1530
- <div key={idx} style={{ marginBottom: "3px", color: "#1a1a1a" }}>
1531
- <code style={{
1532
- background: "#fff",
1533
- padding: "2px 6px",
1534
- borderRadius: "3px",
1535
- fontSize: "0.85em",
1536
- color: "#1565c0"
1537
- }}>
1538
- {fact.predicate}
1539
- </code>
1540
- <span style={{ marginLeft: "6px", color: "#555", fontSize: "0.9em" }}>
1541
- ({fact.count} fact{fact.count !== 1 ? 's' : ''})
1542
- </span>
1543
- </div>
1544
- ))}
1545
- </div>
1546
- </div>
1547
- ))}
1548
- </div>
1549
- )}
1550
  <div>
1551
  <strong style={{ color: "#1a1a1a" }}>Total Results:</strong>{" "}
1552
  <span style={{ color: "#00aa00", fontWeight: "bold" }}>
 
1161
  </div>
1162
  </div>
1163
  )}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1164
  <div>
1165
  <strong style={{ color: "#1a1a1a" }}>Total Results:</strong>{" "}
1166
  <span style={{ color: "#00aa00", fontWeight: "bold" }}>