Hencethedistinctionbetween[bool]and[Prop].Programsoftype[bool]arecomputationalbyconstruction;wecanalwaysrunthemtodeterminetheirresults.Many[Prop]sareundecidable,andsowecanwritemoreexpressiveformulaswith[Prop]sthanwith[bool]s,buttheinevitableconsequenceisthatwecannotsimply%``%#"#run a [Prop] to determine its truth.#"#%''%
(**The[forall]connectiveoffirst-orderlogic,whichwehaveseeninmanyexamplessofar,isbuiltintoCoq.Gettingaheadofourselvesabit,wecanseeitasthedependentfunctiontypeconstructor.Infact,implicationanduniversalquantificationarejustdifferentsyntacticshorthandsforthesameCoqmechanism.Aformula[P->Q]isequivalentto[forallx:P,Q],where[x]doesnotappearin[Q].Thatis,the%``%#"#real#"#%''%typeoftheimplicationsays%``%#"#for every proof of [P], there exists a proof of [Q].#"#%''%
(**The%\index{Gallinaterms!forall}%[forall]connectiveoffirst-orderlogic,whichwehaveseeninmanyexamplessofar,isbuiltintoCoq.Gettingaheadofourselvesabit,wecanseeitasthedependentfunctiontypeconstructor.Infact,implicationanduniversalquantificationarejustdifferentsyntacticshorthandsforthesameCoqmechanism.Aformula[P->Q]isequivalentto[forallx:P,Q],where[x]doesnotappearin[Q].Thatis,the%``%#"#real#"#%''%typeoftheimplicationsays%``%#"#for every proof of [P], there exists a proof of [Q].#"#%''%
WhydoesCoqusethisrestriction?Wewilldiscusstheissueindetailinafuturechapter,whenweseethedependently-typedprogrammingtechniquesthatwouldallowustowritethisprooftermmanually.Fornow,wejustsaythatthealgorithmicproblemof%``%#"#logically complete case analysis#"#%''%isundecidablewhenphrasedinCoq'slogic.Afewtacticsanddesignpatternsthatwewillpresentinthischaptersufficeinalmostallcases.Forthecurrentexample,whatwewantisatacticcalled[inversion],whichcorrespondstotheconceptofinversionthatisfrequentlyusedwithnaturaldeductionproofsystems.*)
WhydoesCoqusethisrestriction?Wewilldiscusstheissueindetailinafuturechapter,whenweseethedependentlytypedprogrammingtechniquesthatwouldallowustowritethisprooftermmanually.Fornow,wejustsaythatthealgorithmicproblemof%``%#"#logically complete case analysis#"#%''%isundecidablewhenphrasedinCoq'slogic.Afewtacticsanddesignpatternsthatwewillpresentinthischaptersufficeinalmostallcases.Forthecurrentexample,whatwewantisatacticcalled%\index{tactics!inversion}%[inversion],whichcorrespondstotheconceptofinversionthatisfrequentlyusedwithnaturaldeductionproofsystems.*)