The following paragraph appears early in the chapter on quantifiers and equality in "Theorem Proving in Lean 4":
The Calculus of Constructions therefore identifies dependent arrow types with forall-expressions in this way. If p is any expression, ∀ x : α, p is nothing more than alternative notation for (x : α) → p, with the idea that the former is more natural than the latter in cases where p is a proposition. Typically, the expression p will depend on x : α. Recall that, in the case of ordinary function spaces, we could interpret α → β as the special case of (x : α) → β in which β does not depend on x. Similarly, we can think of an implication p → q between propositions as the special case of ∀ x : p, q in which the expression q does not depend on x.
The last sentence mentions the expression ∀ x : p, q, where q can depend on x, and compares it to p → q where p and q are propositions.
My question is this: Are there any real examples of ∀ x : p, q being used when the following hold?
pis a proposition (soxis a proof ofp)qdepends onx
In normal mathematics the expression ∀ x : p, q would be used when p is a set rather than a proposition, so this use confuses me.
I tried to come up with examples of ∀ x : p, q where p and q are propositions and q depends on the proof of p. I couldn't find any situations where I've seen this in normal mathematics.
This might not count as a "real [mathematical] example", but
List.head?_eq_headseems like an good exampleYour
pis myl ≠ []and yourxis myh.Here
List.headproduces the first element of a list; but this operation is impossible if the list is empty, so it has to take a proof that it is non-empty.