()
| 1327 | &[ |
| 1328 | cnst("Bool", &[]), |
| 1329 | cnst("Bool", &[]), |
| 1330 | cnst("Bool.true", &[]), |
| 1331 | cnst("Bool.false", &[]), |
| 1332 | ], |
| 1333 | ); |
| 1334 | let rec_app = apps( |
| 1335 | cnst("Prod.rec", &[uzero(), uzero(), u1.clone()]), |
| 1336 | &[cnst("Bool", &[]), cnst("Bool", &[]), motive, f_case, pair], |
| 1337 | ); |
| 1338 | let ty = |
| 1339 | eq_expr(u1.clone(), cnst("Bool", &[]), rec_app, cnst("Bool.true", &[])); |
| 1340 | let val = eq_refl_expr(u1, cnst("Bool", &[]), cnst("Bool.true", &[])); |
| 1341 | |
| 1342 | let (id, c) = mk_thm("prodRecEqns", 0, vec![], ty, val); |
| 1343 | env.insert(id.clone(), c); |
| 1344 | check_accepts(&mut env, &id); |
| 1345 | } |
| 1346 | |
| 1347 | // ========================================================================== |
| 1348 | // Quotient tests (Tutorial.lean 1185–1224) |
| 1349 | // ========================================================================== |
| 1350 | |
| 1351 | /// Add Eq as a full inductive (not just axioms) — needed for Quot.lift validation. |
| 1352 | fn add_eq_inductive(env: &mut KEnv<Meta>) { |
| 1353 | let eq_id = mk_id("Eq"); |
| 1354 | let refl_id = mk_id("Eq.refl"); |
| 1355 | let eq_rec_id = mk_id("Eq.rec"); |
| 1356 | |
| 1357 | let eq_ty = |
| 1358 | ipi("α", sort(param(0)), npi("a", var(0), npi("b", var(1), sort0()))); |
| 1359 | env.insert( |
| 1360 | eq_id.clone(), |
| 1361 | KConst::Indc { |
| 1362 | name: mk_name("Eq"), |
| 1363 | level_params: vec![mk_name("u")], |
nothing calls this directly
no test coverage detected