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

Method is_regular

crates/kernel/src/def_eq.rs:1305–1311  ·  view source on GitHub ↗

Check if a constant has Regular reducibility hints (not Abbrev or Opaque). Used to guard the same-head-spine optimization (lean4lean: dt.hints.isRegular).

(&mut self, id: &KId<M>)

Source from the content-addressed store, hash-verified

1303 // No Prop guard here — struct eta in def-eq is safe even for Prop types
1304 // because we're checking equality, not constructing terms. The Prop guard
1305 // is only needed in iota's toCtorWhenStruct (whnf.rs try_struct_eta_iota)
1306 // where eta-expanding creates projections that would be unsound for Prop.
1307 let s_ty = match self.with_infer_only(|tc| tc.infer(s)) {
1308 Ok(ty) => ty,
1309 Err(_) => {
1310 self.dump_eta_trace("infer-rhs-type", Some(&induct_id), 0, t, s);
1311 return Ok(false);
1312 },
1313 };
1314 let t_ty = match self.with_infer_only(|tc| tc.infer(&t_norm)) {

Callers 2

is_def_eq_innerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected