pub fn mk_local_indices1<'l, 'e : 'l>(
    ind_type_cursor : ExprPtr<'l>,
    rem_params : ExprsPtr<'l>,
    live : &mut Live<'l, 'e>
) -> (ExprsPtr<'l>, u16) {
    match (ind_type_cursor.read(live), rem_params.read(live)) {
        (Pi { body, .. }, Cons(hd, tl)) => {
            let body = body.inst1(hd, live).whnf(&mut live.as_tc(None, None));
            mk_local_indices1(body, tl, live)
        },
        (Pi { b_name, b_type, b_style, body, .. }, Nil) => {
            let local = <ExprPtr>::new_local(b_name, b_type, b_style, live); 
            let body = body.inst1(local, live).whnf(&mut live.as_tc(None, None));
            let (sink, num) = mk_local_indices1(body, rem_params, live);
            (Cons(local, sink).alloc(live), num + 1)
        },
        _ => (Nil::<Expr>.alloc(live), 0)
    }
}
// Collect a list [top -> bottom] of Locals created from each 
// inductive type's indices AFTER instantiating with the block param locals
Collect a list [top -> bottom] of Locals created from each
inductive type's indices AFTER instantiating with the block param locals
Collect a list [ top - > bottom ] of Locals created from each inductive type ' s indices AFTER instantiating with the block param locals
pub fn mk_local_indices1<'l, 'e : 'l>(
    ind_type_cursor : ExprPtr<'l>,
    rem_params : ExprsPtr<'l>,
    live : &mut Live<'l, 'e>
) -> (ExprsPtr<'l>, u16) {
    match (ind_type_cursor.read(live), rem_params.read(live)) {
        (Pi { body, .. }, Cons(hd, tl)) => {
            let body = body.inst1(hd, live).whnf(&mut live.as_tc(None, None));
            mk_local_indices1(body, tl, live)
        },
        (Pi { b_name, b_type, b_style, body, .. }, Nil) => {
            let local = <ExprPtr>::new_local(b_name, b_type, b_style, live); 
            let body = body.inst1(local, live).whnf(&mut live.as_tc(None, None));
            let (sink, num) = mk_local_indices1(body, rem_params, live);
            (Cons(local, sink).alloc(live), num + 1)
        },
        _ => (Nil::<Expr>.alloc(live), 0)
    }
}
pub fn mk_local_indices1 < ' l , ' e : ' l > ( ind_type_cursor : ExprPtr < ' l > , rem_params : ExprsPtr < ' l > , live : & mut Live < ' l , ' e > ) -> ( ExprsPtr < ' l > , u16 ) { match ( ind_type_cursor . read ( live ) , rem_params . read ( live ) ) { ( Pi { body , .. } , Cons ( hd , tl ) ) => { let body = body . inst1 ( hd , live ) . whnf ( & mut live . as_tc ( None , None ) ) ; mk_local_indices1 ( body , tl , live ) } , ( Pi { b_name , b_type , b_style , body , .. } , Nil ) => { let local = < ExprPtr > :: new_local ( b_name , b_type , b_style , live ) ; let body = body . inst1 ( local , live ) . whnf ( & mut live . as_tc ( None , None ) ) ; let ( sink , num ) = mk_local_indices1 ( body , rem_params , live ) ; ( Cons ( local , sink ) . alloc ( live ) , num + 1 ) } , _ => ( Nil :: < Expr > . alloc ( live ) , 0 ) } }
Collect a list [top -> bottom] of Locals created from each
inductive type's indices AFTER instantiating with the block param locals
Collect a list [ top - > bottom ] of Locals created from each inductive type ' s indices AFTER instantiating with the block param locals
ind_type_cursor
ExprPtr<'l>
rem_params
ExprsPtr<'l>
live
&mut Live<'l, 'e>
ind_type_cursor
ExprPtr<'l>
rem_params
ExprsPtr<'l>
live
&mut Live<'l, 'e>