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

Quelle  coercions_tc.v   Sprache: Coq

 
Set Warnings "-uniform-inheritance".
Set Printing All.

Module TC.

Class foo (A : Type) := { a : A }.
#[localHint Mode foo + : typeclass_instances.

#[localInstance bool_foo : foo bool := {| a := true |}.
#[localInstance nat_foo : foo nat := {| a := 1 |}.
#[localInstance pair_foo A B : foo A -> foo B -> foo (A * B) := fun x y => {| a := (a,a) |}.

Axiom T1 : Type -> Type.
Axiom T2 : Type -> Type.
Axiom x : T1 nat.

Module T1.
Axiom f : forall A, foo (A * bool) -> T1 A -> T2 nat.
Coercion f : T1 >-> T2.
Check (x : T2 _).
End T1.

Module T2.
Axiom f : forall A, foo A -> T1 nat -> T2 A.
Coercion f : T1 >-> T2.
Check (x : T2 _).
Check (x : T2 bool).
End T2.

End TC.

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.