Simplifies a telescope of non-dependent arrows p₁ → p₂ → ... → pₙ → q by:
- Converting to
Arrow p₁ (Arrow p₂ (... (Arrow pₙ q)))(seetoArrow) - Simplifying each
pᵢandq(seesimpArrows) - Converting back to
→form (seetoForall)
Using Arrow (a definitional wrapper around →) avoids the quadratic proof growth that
occurs with Expr.forallE. With forallE, each nesting level bumps de Bruijn indices in
subterms, destroying sharing. For example, if each pᵢ contains a free variable x, the
de Bruijn representation of x differs at each depth, preventing hash-consing from
recognizing them as identical.
With Arrow, both arguments are explicit (not under binders), so subterms remain identical
across nesting levels and can be shared, yielding linear-sized proofs.
Tradeoff: This function simplifies each pᵢ and q individually, but misses
simplifications that depend on the arrow structure itself. For example, q → p → p
won't be simplified to True (when p : Prop) because the simplifier does not have
a chance to apply post methods to the intermediate arrow p → p.
Thus, this is a simproc that is meant to be used as a pre-method and marks the
result as fully simplified to prevent simpArrow from being applied.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.