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

Method try_unfold_proj_app

crates/kernel/src/def_eq.rs:1535–1545  ·  view source on GitHub ↗

If the head of `e` is a projection, try reducing it via whnf_no_delta. Returns the reduced form if it changed, None otherwise (lean4lean tryUnfoldProjApp).

(
    &mut self,
    e: &KExpr<M>,
  )

Source from the content-addressed store, hash-verified

1533 *a = self.whnf_core(&a2)?;
1534 } else {
1535 return Ok(LazyDeltaStep::Unknown);
1536 }
1537 } else if !a_delta && b_delta {
1538 if let Some(a2) = self.try_unfold_proj_app(a)? {
1539 *a = a2;
1540 } else if let Some(b2) = self.delta_unfold_one(b)? {
1541 *b = self.whnf_core(&b2)?;
1542 } else {
1543 return Ok(LazyDeltaStep::Unknown);
1544 }
1545 } else {
1546 let a_id = a_head.as_ref().expect("a_delta implies head");
1547 let b_id = b_head.as_ref().expect("b_delta implies head");
1548 let cmp = self.def_rank_id(a_id)?.cmp(&self.def_rank_id(b_id)?);

Callers 2

is_def_eq_innerMethod · 0.80

Calls 3

collect_app_spineFunction · 0.85
whnf_no_deltaMethod · 0.80
ptr_eqMethod · 0.45

Tested by

no test coverage detected