Skip to content

Commit

Permalink
got rid of final assume in sel case of subst lemma
Browse files Browse the repository at this point in the history
  • Loading branch information
namin committed Mar 10, 2013
1 parent d321c24 commit 9b5c278
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/dafny/Dot.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -1730,9 +1730,13 @@ ghost method lemma_case_sel_substitution_preserves_typing(ctx: context, st: stor
assert field_membership(maxn+2, ctx, st, tm_subst(x, s, t).t, tm_subst(x, s, t).l, tp_subst(x, s, T));
assert typing(maxn+3, ctx, st, tm_subst(x, s, t), tp_subst(x, s, T));
n' := maxn+3;
assume exists n'':nat :: typing(n'', ctx, st, tm_subst(x, s, t), tp_subst(x, s, T)); // TODO: why do we still need this :-(
var n'':nat :| typing(n'', ctx, st, tm_subst(x, s, t), tp_subst(x, s, T));
n' := n'';
helper_assert_exists_typing(maxn, n', ctx, st, x, s, S, t, T);
}
ghost method helper_assert_exists_typing(maxn: nat, n': nat, ctx: context, st: store, x: nat, s: tm, S: tp, t: tm, T: tp)
requires typing(maxn+3, ctx, st, tm_subst(x, s, t), tp_subst(x, s, T));
requires maxn+3==n';
ensures typing(n', ctx, st, tm_subst(x, s, t), tp_subst(x, s, T));
{
}

ghost method lemma_substitution_preserves_typing(ctx: context, st: store, x: nat, s: tm, S: tp, ns: nat, t: tm, T: tp, n: nat) returns (n': nat)
Expand Down

0 comments on commit 9b5c278

Please sign in to comment.