Closed jozefg closed 8 years ago
Huh! I didn't realize we could do that, but I guess it makes sense. I wonder if it is possible to similarly simplify the analogous rules (natrec-eq
or neigh-ind-eq
, etc.).
@jonsterling It seems possible.. Or we could error on the side of more convenient for the user and make DecideEq
complicated in the same way that those are. Either seems reasonable to me.
Here's a quick demonstration of handling dependence with this rule
Theorem not-uhoh : [
(x : unit + void) member(decide(x; a.a; b.b); decide(x; a.unit; b.void))
] {
auto; eq-cd [unit, void]; auto;
hyp-subst → <eq> [h.=(_; _; decide(h; _._; _._))];
aux { elim #4; reduce; auto };
reduce; auto
}.
I think it looks fine, in theory. Let's use sums as a way to test how this works out in practice, and if it doesn't result in much extra user-level complication, we can change the other rules to be like this.
@jonsterling Sounds good to me!
I'll merge this once Travis succeeds—for some reason, our builds seem to be waiting a long time in their queue.
This is one fix for #233. Instead of taking this
C
parameter we don't do that and instead just force the user to prove that each branch is equal atT
.This should be fine though because we give them this assumption of equality so in theory they can use that to vary
T
depending on what branch they're proving things in.