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

Function good_and_left

crates/kernel/src/tutorial/defeq.rs:1515–1546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1513 "motive",
1514 pi(nat(), sort(param(0))),
1515 npi("t", nat(), app(var(1), var(0))),
1516 );
1517 env.insert(
1518 rec_id.clone(),
1519 KConst::Recr {
1520 name: mk_name("N.rec"),
1521 level_params: vec![mk_name("u")],
1522 k: false,
1523 is_unsafe: false,
1524 lvls: 1,
1525 params: 0,
1526 indices: 0,
1527 motives: 1,
1528 minors: 0,
1529 block: block_id.clone(),
1530 member_idx: 0,
1531 ty: rec_ty,
1532 rules: vec![],
1533 lean_all: vec![block_id.clone()],
1534 },
1535 );
1536 env.blocks.insert(block_id, vec![mk_id(n), zero_id, succ_id, rec_id]);
1537
1538 // type: N → N, value: fun x => .proj N 0 x
1539 let ty = pi(nat(), nat());
1540 let val = nlam("x", nat(), ME::prj(mk_id("N"), 0, var(0)));
1541 let (id, c) = mk_defn(
1542 "projNotStruct",
1543 0,
1544 vec![],
1545 ty,
1546 val,
1547 ix_common::env::ReducibilityHints::Opaque,
1548 );
1549 env.insert(id.clone(), c);

Callers

nothing calls this directly

Calls 15

and_envFunction · 0.85
ipiFunction · 0.85
nlamFunction · 0.85
mk_defnFunction · 0.85
check_acceptsFunction · 0.85
appFunction · 0.50
cnstFunction · 0.50
varFunction · 0.50
sort0Function · 0.50
piFunction · 0.50
lamFunction · 0.50
mk_nameFunction · 0.50

Tested by

no test coverage detected