Discover all inductives in a mutual block.
(
&mut self,
block_id: &KId<M>,
)
| 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)?; |
no test coverage detected