Expand description
Strict positivity checking for inductive types.
An inductive type must appear only in “strictly positive” positions in its constructors. Without this check, we could define paradoxical types like:
Inductive Bad := Cons : (Bad -> False) -> BadThis would allow encoding Russell’s paradox and proving False.
Strict Positivity Rules (from CIC):
I is strictly positive in T iff:
- I does not occur in T, OR
- T = Π(x:A). B where:
- If A = I exactly, it’s a “recursive argument” (allowed)
- Otherwise, I must NOT occur in A at all
- AND I must be strictly positive in B
Examples:
I -> Iis valid: first I is a recursive argument, second is result(I -> X) -> Iis INVALID: I occurs inside the param type of another arrowX -> I -> Iis valid: X has no I, second param is recursive arg
Functions§
- check_
positivity - Check strict positivity of an inductive type in a constructor type.