Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Roqc/test-suite/success/   (Beweissystem des Inria Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 828 B image not shown  

SSL guard.v   Sprache: Coq

 
(* Specific tests about guard condition *)

(* f must unfold to x, not F (de Bruijn mix-up!) *)
Check let x (f:nat->nat) k := f k in
      fun (y z:nat->nat) =>
      let f:=x in (* f := Rel 3 *)
      fix F (n:nat) : nat :=
        match n with
        | 0 => 0
        | S k => f F k (* here Rel 3 = F ! *)
        end.

(** Commutation of guard condition allows recursive calls on functional arguments,
    despite rewriting in their domain types.  *)

Inductive foo : Type -> Type :=
End A : foo A
| Next A : (A -> foo A) -> foo A.

Definition nat : Type := nat.

Fixpoint bar (A : Type) (e : nat = A) (f : foo A) {struct f} : nat :=
match f with
End _ => fun _ => O
| Next A g => fun e =>
    match e in (_ = B) return (B -> foo A) -> nat with
    | eq_refl => fun (g' : nat -> foo A) => bar A e (g' O)
    end g
end e.

97%


¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.