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

Method check_inductive

crates/kernel/src/inductive.rs:71–95  ·  view source on GitHub ↗

Validate an inductive block. Pure inductive blocks are coordinated through `KEnv`; legacy mixed source blocks fall back to the member check to avoid caching a partial result under a mixed block id.

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

Source from the content-addressed store, hash-verified

69/// A member of the "flat" mutual block used for recursor generation.
70/// For non-nested inductives, this is just the original inductive.
71/// For nested occurrences (e.g., `Array Syntax` in Syntax's ctor fields),
72/// an auxiliary entry is created mirroring the external inductive's structure.
73#[derive(Clone)]
74pub struct FlatBlockMember<M: KernelMode> {
75 /// For original: the inductive's KId. For auxiliary: the external inductive's KId.
76 pub id: KId<M>,
77 /// True if this is an auxiliary member created for a nested occurrence.
78 pub is_aux: bool,
79 /// Specialized param values for this member.
80 /// For original: Var refs to the recursor's shared params.
81 /// For auxiliary: the concrete specialized exprs (e.g., `[Syntax]` for `Array Syntax`).
82 /// These are in terms of the recursor's param binders (depth = n_rec_params).
83 pub spec_params: Vec<KExpr<M>>,
84 /// Number of params this member's inductive has (may differ from shared for nested).
85 pub own_params: u64,
86 /// Number of indices.
87 pub n_indices: u64,
88 /// Constructor ids (from env).
89 pub ctors: Vec<KId<M>>,
90 /// Universe param count.
91 pub lvls: u64,
92 /// Universe args for internal processing (abstract shifted params).
93 /// Used for ctor type instantiation and nesting detection.
94 pub ind_us: Box<[KUniv<M>]>,
95 /// Universe args from the actual nested occurrence (concrete).
96 /// For original members: same as ind_us.
97 /// For auxiliaries: the concrete args from the ctor field (e.g., [Succ(Zero)]).
98 /// Used for the final output type (motives, major, ctor apps).

Callers 2

check_recursor_memberMethod · 0.80

Calls 7

try_get_blockMethod · 0.80
check_inductive_blockMethod · 0.80
get_constMethod · 0.45
cloneMethod · 0.45
getMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected