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

Quelle  HoTT_coq_063.v   Sprache: Coq

 
Set Universe Polymorphism.
Module A.
  Inductive paths A (x : A) : A -> Type := idpath : paths A x x.

  Notation "x = y" := (paths _ x y).

  Inductive IsTrunc : nat -> Type -> Type :=
  | BuildContr : forall A (center : A) (contr : forall y, center = y), IsTrunc 0 A
  | trunc_S : forall A n, (forall x y : A, IsTrunc n (x = y)) -> IsTrunc (S n) A.

  Existing Class IsTrunc.


  #[exportInstance is_trunc_unit : IsTrunc 0 unit.
  Proofapply BuildContr with (center:=tt). now intros []. Defined.

  Check (_ : IsTrunc 0 unit).
End A.

Module B.
  Fixpoint IsTrunc (n : nat) (A : Type) : Type :=
    match n with
      | O => True
      | S _ => False
    end.

  Existing Class IsTrunc.

  #[exportInstance is_trunc_unit : IsTrunc 0 unit.
  Proofexact I. Defined.

  Check (_ : IsTrunc 0 unit).
  Fail Definition foo := (_ : IsTrunc 1 unit).
End B.

99%


¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© 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.