%\noindent%...whichcorrespondsto%``%#"#proof by case analysis#"#%''%inclassicalmath.Fornon-recursiveinductivetypes,thetwotacticswillalwayshaveidenticalbehavior.Oftencaseanalysisissufficient,eveninproofsaboutrecursivetypes,anditisnicetoavoidintroducingunneededinductionhypotheses.
%\noindent%...whichcorrespondsto"proof by case analysis"inclassicalmath.Fornon-recursiveinductivetypes,thetwotacticswillalwayshaveidenticalbehavior.Oftencaseanalysisissufficient,eveninproofsaboutrecursivetypes,anditisnicetoavoidintroducingunneededinductionhypotheses.
(** A first attempt at writing the induction principle itself follows the intuition that nested inductive type definitions are expanded into mutual inductive definitions.
(** A first attempt at writing the induction principle itself follows the intuition that nested inductive type definitions are expanded into mutual inductive definitions.
[[
[[
...
@@ -1037,7 +1046,7 @@ Section nat_tree_ind'.
...
@@ -1037,7 +1046,7 @@ Section nat_tree_ind'.
instead of rest.
instead of rest.
>>
>>
There is no deep theoretical reason why this program should be rejected; Coq applies incomplete termination-checking heuristics, and it is necessary to learn a few of the most important rules. The term %``%#"#nestedinductivetype#"#%''% hints at the solution to this particular problem. Just like true mutually inductive types require mutually recursive induction principles, nested types require nested recursion. *)
There is no deep theoretical reason why this program should be rejected; Coq applies incomplete termination-checking heuristics, and it is necessary to learn a few of the most important rules. The term "nestedinductivetype" hints at the solution to this particular problem. Just like true mutually inductive types require mutually recursive induction principles, nested types require nested recursion. *)
Fixpoint nat_tree_ind' (tr : nat_tree) : P tr :=
Fixpoint nat_tree_ind' (tr : nat_tree) : P tr :=
match tr with
match tr with
...
@@ -1153,7 +1162,7 @@ The advantage of using the hint is not very clear here, because the original pro
...
@@ -1153,7 +1162,7 @@ The advantage of using the hint is not very clear here, because the original pro
Theorem true_neq_false : true <> false.
Theorem true_neq_false : true <> false.
(* begin thide *)
(* begin thide *)
(** We begin with the tactic %\index{tactics!red}%[red], which is short for %``%#"#onestepofreduction,#"#%''% to unfold the definition of logical negation. *)
(** We begin with the tactic %\index{tactics!red}%[red], which is short for "onestepofreduction," to unfold the definition of logical negation. *)