Quantcast
Channel: Recent Questions - Proof Assistants Stack Exchange
Viewing all articles
Browse latest Browse all 140

Lean4: How to construct an HEq between dependent functions?

$
0
0

I have an extremely simple goal to prove:

HEq  (fun px rd =>    match px, rd with    | Sum.inr _ppos, dir => dir)  fun x => id

The reason the match happens is because the type of px is (PEmpty ⊕ t) and dir is a variable whose type depends on the value of px. So this is a heterogeneous equality between a dependent function that matches on its first argument but doesn't use it - it does so only to teach the compiler, and a non-dependent function (basically const).

I'm in tactic mode but cannot use funext here, because it seems to only apply to nondependent functions. I basically want to do a substitution, but don't know how.


Viewing all articles
Browse latest Browse all 140

Latest Images

Trending Articles





Latest Images