Add generation of enhanced induction schemes#206
Conversation
Also generate first hints #159
|
At the moment the following restrictions are made when generating properties and induction schemes:
The generation of those properties, induction schemes and data Foo a = F [a]
data Bar a = B (Foo (Bar a))This is especially a problem because at the point in the proof, where the unpacking of |
Issue
closes #159
Description of the Change
To state the additional induction hypotheses, for any type with at least one type variable
T a1 ... anan inductive typeForTof the following type is declared.Also for any
1<=i<=nan inductive typeInT_iof the following type is declared.The meaning of those types is the same as for
ForFreeandInFree:ForT Shape Pos a1 ... an P1 ... Pn xstates thatPi yholds for anyy : ai,1<=i<=n, that is somehow included in xInT_i Shape Pos a1 ... an y xstates that y is somehow included in xTo formalize the connection between those types, the following lemma is also generated for the type
T.As an example consider the following definition of a list.
With those definitions induction schemes are generated and proven.
Alternate Designs
The first design for the
ForT-properties was to have such an property for every type variable ofT.With this design there were multiple simple
ForT_i_foralllemmas instead of one complex lemma. As thoseForT_iproperties may depend on each other, they have to be defined in a single induction sentence. This is however not accepted by Coq because the arguments(P : ai -> Prop)have different types for differenti. Moving these args on the right side of the colon leads to violations of the strict positivity restriction for Coq types in the further usage.Possible Drawbacks
Verification Process
Additional Notes