-
Notifications
You must be signed in to change notification settings - Fork 25
hierarchies of morphism #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
CI: |
|
One thing that is surely broken is the #[infer] attribute since we hardwire sortclass there, see #146 . I guess one may detect what the carrier is, but as a first approximation #[infer(P = "_ -> _")] may also work. |
pred operation-body-and-ty i:list prop, i:constant, i:structure, i:term, i:term,
i:list term, i:term, i:w-args A, o:pair term term.
operation-body-and-ty EXI Poperation Struct Psort Pclass Params _T (triple _ Params _) (pr Bo Ty) :- std.do! [
mk-app (global Struct) Params StructType,
mk-app Psort Params PsortP,
mk-app Pclass Params PclassP,
Bo = fun `s` StructType Body,
Ty = prod `s` StructType BodyTy,
(@pi-decl `s` StructType s\ sigma Carrier Class\ std.do! [
mk-app PsortP [s] Carrier,
mk-app PclassP [s] Class,
synthesis.under-mixin-src-from-factory.do! Carrier Class [
% just in case..
synthesis.infer-all-mixin-args Params Carrier (const Poperation) (Body s),
std.assert-ok! (coq.typecheck (Body s) (DirtyTy s)) "export-1-operation: Body illtyped",
clean-op-ty EXI s (DirtyTy s) (BodyTy s),
],
]),
].There is a problem/missing error message in this code. In this case the structure has 2 parameters, the first occurrence, but the operation (mixin) zero. |
|
I think I fixed the code. |
|
It seems 8.11 has some problem, it rings a bell... I just don't recall if it was a bug in coq-elpi (for that version of Coq) or Coq itself. |
|
Given the prints, it is coq-elpi that declares a silly notation. |
|
@CohenCyril this PR is now ok, for what I can tell. You had some comments on the code I wrote during the demo you may put here. |
|
Looks ok but without extensive testing on mathcomp I find it a bit scary... |
|
Then we should merge it and document it as experimental. Otherwise it is harder to test. |
|
ok, let's merge the big one first! |
|
rebased |
|
I may have to rebase again after #187 ... |
About axioms_.
(* axioms_ : forall T : Type, (T -> T -> T) -> Prop
axioms_ is not universe polymorphic
Arguments axioms_ _%type_scope _%function_scope
Expands to: Inductive funclass.Magma.axioms_ *)
Notation on X1 := (phant_on_ _ _ (ssreflect.Phantom (forall H, _) X1) : axioms_ _ X1).
(* Error: X1 is here used in the empty scope stack while it was elsewhere used in scope function_scope *)This looks like a real problem in Coq, but I'm not sure what it means. |
I am not sure what an automated scope inference could do to improve on this though... |
Notation on X1 := ((fun a => (phant_on_ _ _ (ssreflect.Phantom _ a) : axioms_ _ a)) X1).
(* OK *)Seriously? |
|
It is not so clear to me what to do here. The PR is ready, but logging is broken waiting for rocq-prover/rocq#13965 |
|
I mean, it will break also in mathcomp if we start using morphisms |
|
look for a work around on 8.13 or postpone |
526edb5 to
4787a3f
Compare
bc4ff5d to
b05a23a
Compare
No description provided.