You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For variables that were not specifically given a type by the user, the rocq system finds a type whose name is an unreadable long name generated by hierarchy builder. This kind be avoided by asking for simplification. However, rocq also uses these long unreadable types in error messages, and in these cases, the user has no way to force the simplified type to be used instead.
Here is an example.
From HB RequireImport structures.
From mathcomp RequireImport all_ssreflect all_algebra.
RequireExportField.
SetImplicitArguments.
Unset Strict Implicit.
UnsetPrintingImplicit Defensive.
RequireImport NArithRing.
Import Order.TTheory GRing.Theory Num.Theory Num.ExtraDef Num.
OpenScope ring_scope.
Section working_environment.
Variable R : realFieldType.
Record pt := { p_x : R; p_y : R }.
Definition pt_eqb (a b : pt) : bool :=
let: Build_pt a_x a_y := a inlet: Build_pt b_x b_y := b in
(a_x == b_x) && (a_y == b_y).
Lemma pt_eqP : Equality.axiom pt_eqb.
Proof.
rewrite /Equality.axiom.
move=> [a_x a_y] [b_x b_y]; rewrite /pt_eqb/=.
have [/eqP <-|/eqP anb] := boolP (a_x == b_x).
have [/eqP <- | /eqP anb] := boolP (a_y == b_y).
by apply: ReflectT.
by apply : ReflectF => [][].
by apply: ReflectF=> [][].
Qed.
HB.instance Definition _ := hasDecEq.Build _ pt_eqP.
Definition dummy_pt := Build_pt 0 0.
Axiom sorted_last : forall (T : eqType) (r : rel T) (x0 x : T) (s : seq T),
transitive r -> sorted r s -> x \in s -> sorted r s ->
x \in s -> (x == last x0 s) || r x (last x0 s).
Checkfun s : seq _ =>
sorted_last dummy_pt (rev_trans lt_trans).
The error message looks like this, exposing various type names that were created by Hierarchy Builder, but are awkward to read.
In environment
R : realFieldType
s : seq ?A
The term "rev_trans lt_trans" has type
"@transitive (@Order.POrder.sort ?disp ?T)
(fun x y : @Order.POrder.sort ?disp ?T => @Order.lt ?disp ?T y x)"
while it is expected to have type
"@transitive (Equality.sort order_problem_pt__canonical__eqtype_Equality) ?r".
The text was updated successfully, but these errors were encountered:
For variables that were not specifically given a type by the user, the rocq system finds a type whose name is an unreadable long name generated by hierarchy builder. This kind be avoided by asking for simplification. However, rocq also uses these long unreadable types in error messages, and in these cases, the user has no way to force the simplified type to be used instead.
Here is an example.
The error message looks like this, exposing various type names that were created by Hierarchy Builder, but are awkward to read.
The text was updated successfully, but these errors were encountered: