Set Printing All. Check test3 nat. Check test3 S_nat.
Structure T := {
tsort :> Type;
}.
Canonical T_nat (x : unit) := {| tsort := nat |}.
Check test2 (T_nat tt).
Structure A := { }.
Structure A' := { }.
Structure B := { ba :> A; #[canonical=no] ba' :> A' }.
Structure C := { ca :> A; #[canonical=no] ca' :> A' }. Axiom f : A -> A'.
Coercion f : A >-> A'.
Canonical b : B := {| ba := Build_A; ba' := Build_A' |}.
Canonical c : C := {| ca := Build_A; ca' := Build_A' |}.
Definition test4 (x : B) := 1. Check test4 c.
(* ~~> test S_nat : S_nat.sort Type ==?== S : f : nat ---> S_nat
sort : S >-> Type
f := nat ----> ?x sort ?x ==?== nat
*)
End Test0.
(* Test the reverse attribute *) Module Test1.
Structure S := {
ssort : Type;
sstuff : ssort;
}.
#[reversible=no] Coercion ssort : S >-> Sortclass.
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.