Check if a goal is "independent" of a list of other goals. We say a goal is independent of other goals if assigning a value to it can not change the assignability of the other goals.
Examples:
?m_1 : Typeis not independent of?m_2 : ?m_1, because we could assigntrue : Boolto?m_2, but if we first assignNatto?m_1then that is no longer possible.?m_1 : Natis not independent of?m_2 : Fin ?m_1, because we could assign37 : Fin 42to?m_2, but if we first assign2to?m_1then that is no longer possible.?m_1 : ?m_2is not independent of?m_2 : Type, because we could assignBoolto ?m_2, but if we first assign0 : Natto?m_1` then that is no longer possible.- Given
P : Propandf : P → Type,?m_1 : Pis independent of?m_2 : f ?m_1by proof irrelevance. - Similarly given
f : Fin 0 → Type,?m_1 : Fin 0is independent of?m_2 : f ?m_1, becauseFin 0is a subsingleton. - Finally
?m_1 : Natis independent of?m_2 : α, as long as?m_1does not appear inMeta.getMVars α(note thatMeta.getMVarsfollows delayed assignments).
This function only calculates a conservative approximation of this condition.
That is, it may return false when it should return true.
(In particular it returns false whenever the type of g contains a metavariable,
regardless of whether this is related to the metavariables in L.)
Equations
- One or more equations did not get rendered due to their size.