Skip to content

Commit 4227114

Browse files
committed
Soundness proof.
1 parent f4ba079 commit 4227114

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/Types.lidr

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -513,18 +513,18 @@ well-typed term can never reach a stuck state.
513513
> multistep : Tm -> Tm -> Type
514514
> multistep = Multi Step
515515

516-
517516
> soundness : {t, t': Tm} -> {T: Ty} ->
518517
> Has_type t T ->
519518
> t ->>* t' ->
520519
> Not (stuck t')
521-
> soundness {t} {t'} {T=ty} ht p = ?hole
522-
523-
Proof.
524-
intros t t' T HT P. induction P; intros `R S`.
525-
destruct (progress x T HT); auto.
526-
apply IHP. apply (preservation x y T HT H).
527-
unfold stuck. split; auto. Qed.
520+
> soundness ht Multi_refl (sl,sr) =
521+
> case progress ht of
522+
> Left hl => sr hl
523+
> Right hr => sl hr
524+
> soundness ht (Multi_step single multi) stuck =
525+
> let ht' = preservation ht single
526+
> indHyp = soundness ht' multi
527+
> in indHyp stuck
528528

529529
<!--
530530

@@ -639,6 +639,8 @@ Tactic Notation "normalize" :=
639639
` (eauto 10; fail) | (instantiate; simpl)`);
640640
apply multi_refl.
641641

642+
-->
643+
642644
(* ================================================================= *)
643645
(** ** Additional Exercises *)
644646

0 commit comments

Comments
 (0)