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

Method validate_const_well_scoped

crates/kernel/src/check.rs:428–433  ·  view source on GitHub ↗

Validate declaration expressions before inference. This is the Ix equivalent of Lean's declaration-admission closure and universe-param checks: declarations must be closed at the top level, and every `Param(idx)` in their type/value/rules must refer to one of the declaration's own universe parameters.

(
    &mut self,
    c: &KConst<M>,
  )

Source from the content-addressed store, hash-verified

426 // `check_recursor` runs the full kernel-driven verification:
427 // coherence (major inductive passes A1–A4, K-target flag matches),
428 // plus generated-canonical-vs-stored rule comparison via
429 // `is_def_eq`. The rule generator is shared between the kernel and
430 // the compile-time aux_gen, with the nested-aux ordering selected
431 // by `KEnv::recursor_aux_order`, so the syntactic compare is sound
432 // against the canonical aux-restored env produced by `ixon_ingress`.
433 self.check_recursor_member(id)?;
434 Ok(())
435 },
436

Callers 4

check_const_memberMethod · 0.80
check_block_bodyMethod · 0.80
check_inductive_blockMethod · 0.80
check_recursor_blockMethod · 0.80

Tested by

no test coverage detected