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
The following PR to MathComp-Analysis (math-comp/analysis#1256, this is actually wip)
seems to illustrate a potential improvement to HB. Concretely, we tried to generalize the structure of measurable
functions (from a realType codomain to any measurableType) and then equipping the constant function with both
the type of measurable functions and the type of simple functions (i.e., with codomain realType) caused HB to
complain that constant functions aren't all simple functions; we avoided the problem so far by restricting ourselves
to real-valued functions. We found a kludge that we are in the process of experimenting.
From HB RequireImport structures.
HB.mixin Record M T := { m : bool }.
HB.structure Definition S := {T of M T}.
HB.mixin Record A1 X T := { a1 : bool }.
HB.structure Definition B1 X := {T of A1 X T}.
HB.instance Definition _ (X : Type) := A1.Build X unit true.
HB.mixin Record A2 (X : Type) T := { a2 : bool }.
HB.structure Definition B2 (X : Type) := {T of A2 X T}.
(* This should work but fails. *)Module should_work_but_fails.
HB.structure Definition B (X : S.type) := {T of A1 X T & A2 X T}.
Fail HB.instance Definition _ (X : Type) := A2.Build X unit true.
FailCheck unit : B.type _.
End should_work_but_fails.
Module workaround.
HB.instance Definition _ (X : Type) := A2.Build X unit true.
HB.structure Definition B (X : S.type) := {T of A1 X T & A2 X T}.
HB.saturate unit.
Check unit : B.type _.
End workaround.
The following PR to MathComp-Analysis (math-comp/analysis#1256, this is actually wip)
seems to illustrate a potential improvement to HB. Concretely, we tried to generalize the structure of measurable
functions (from a realType codomain to any measurableType) and then equipping the constant function with both
the type of measurable functions and the type of simple functions (i.e., with codomain realType) caused HB to
complain that constant functions aren't all simple functions; we avoided the problem so far by restricting ourselves
to real-valued functions. We found a kludge that we are in the process of experimenting.
@t6s @hoheinzollern
The text was updated successfully, but these errors were encountered: