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

Method discover_block_inductives

crates/kernel/src/inductive.rs:427–441  ·  view source on GitHub ↗

Discover all inductives in a mutual block.

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

Source from the content-addressed store, hash-verified

425
426 // Validate each constructor
427 for (expected_cidx, ctor_id) in ctors.iter().enumerate() {
428 let ind_params = u64_to_usize(params)?;
429 let (ctor_ty, ctor_fields) = self.check_ctor_metadata_against_parent(
430 ctor_id,
431 id,
432 expected_cidx,
433 ind_params,
434 lvls,
435 is_unsafe,
436 )?;
437
438 // A1: Parameter domain agreement
439 self.check_param_agreement(&ty, &ctor_ty, ind_params)?;
440
441 // A3: Strict positivity. Lean skips positivity for unsafe inductives;
442 // those declarations are admitted only as unsafe constants.
443 if !is_unsafe {
444 self.check_positivity(&ctor_ty, ind_params, &block_addrs)?;

Calls 2

try_get_blockMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected