MCPcopy Create free account
hub / github.com/argumentcomputer/ix / nested_tree_rec_binder_count

Function nested_tree_rec_binder_count

crates/kernel/src/inductive.rs:5328–5368  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5326 );
5327
5328 // Bool.rec rules — use actual domain types from recursor type
5329 let motive_dom = motive_ty;
5330 let h_true_dom = minor_true;
5331 let h_false_dom = minor_false;
5332 // Rule 0 (Bool.true, 0 fields): λ (motive) (h_true) (h_false), h_true
5333 let rule_true_rhs = lam(
5334 motive_dom.clone(),
5335 lam(h_true_dom.clone(), lam(h_false_dom.clone(), var(1))),
5336 );
5337 // Rule 1 (Bool.false, 0 fields): λ (motive) (h_true) (h_false), h_false
5338 let rule_false_rhs =
5339 lam(motive_dom, lam(h_true_dom, lam(h_false_dom, var(0))));
5340
5341 env.insert(
5342 mk_id("Bool.rec"),
5343 KConst::Recr {
5344 name: (),
5345 level_params: (),
5346 k: false,
5347 is_unsafe: false,
5348 lvls: 1,
5349 params: 0,
5350 indices: 0,
5351 motives: 1,
5352 minors: 2,
5353 block: rec_block.clone(),
5354 member_idx: 0,
5355 ty: rec_ty,
5356 rules: vec![
5357 super::super::constant::RecRule {
5358 ctor: (),
5359 fields: 0,
5360 rhs: rule_true_rhs,
5361 },
5362 super::super::constant::RecRule {
5363 ctor: (),
5364 fields: 0,
5365 rhs: rule_false_rhs,
5366 },
5367 ],
5368 lean_all: (),
5369 },
5370 );
5371

Callers

nothing calls this directly

Calls 6

nested_tree_envFunction · 0.85
check_constMethod · 0.80
mk_idFunction · 0.70
getMethod · 0.45
cloneMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected