Skip to content

Remove algebraic hierarchy from Qmetric#100

Merged
spitters merged 1 commit into
masterfrom
CutQmetric
Jun 3, 2020
Merged

Remove algebraic hierarchy from Qmetric#100
spitters merged 1 commit into
masterfrom
CutQmetric

Conversation

@VincentSe

Copy link
Copy Markdown
Collaborator

Remove those 2 imports from Qmetric.v, then make the rest of CoRN compile

Require Import CoRN.algebra.COrdAbs.
Require Import CoRN.model.ordfields.Qordfield.

This aims at defining constructive real numbers abstractly, instead of relying on an algebraic hierarchy. All the similar imports will be progressively removed from folders reals/fast and reals/faster.

@VincentSe

Copy link
Copy Markdown
Collaborator Author

@Zimmi48 Hello, do you understand this nix error ?
error: unknown hash algorithm '', at /nix/store/fhksmnm8dk9b1hs99sfzha4nwvpfs86n-nixpkgs-20.09pre227892.b27a19d5bf7/nixpkgs/pkgs/build-support/fetchurl/default.nix:119:3

It seems unrelated to the PR.

@Zimmi48

Zimmi48 commented Jun 1, 2020

Copy link
Copy Markdown
Member

I don't understand it (yet) but it is failing all over the place (on many projects). I will try to solve it ASAP, but if it's an issue for you, we can immediately switch to opam-based testing only.

@VincentSe

Copy link
Copy Markdown
Collaborator Author

@Zimmi48 I can wait a little. I'd like @spitters to validate this PR before we merge it.

@Zimmi48

Zimmi48 commented Jun 1, 2020

Copy link
Copy Markdown
Member

@VincentSe A priori this is fixed in #97 (to be confirmed when CI passes fully).

@spitters

spitters commented Jun 1, 2020

Copy link
Copy Markdown
Collaborator

I'd prefer to fix it by #99 or at least have a change that does not break the type classes in our work in ODEs.

@spitters

spitters commented Jun 1, 2020

Copy link
Copy Markdown
Collaborator

I've merged #97 I guess you should rebase on top of that.
Also, Travis does not seem to test 8.11, maybe we should add that.

@VincentSe

Copy link
Copy Markdown
Collaborator Author

@spitters @Zimmi48 Before Coq 8.10, the compiler doesn't resolve the Coercion
msp_is_setoid :> RSetoid and st_car :> Type. Do you know why?

This is even stranger because all previous versions compile before this pull request, so they do resolve the coercion. This confirms that Coq's implicit machinery of coercions, canonical variables and typeclasses is very fragile. What should I do ? Remove the coercion and explicitly write st_car everywhere needed ? I would actually consider it an improvement of the source code.

@spitters

spitters commented Jun 1, 2020

Copy link
Copy Markdown
Collaborator

Yes, I was surprised about that too! Maybe @mattam82 knows what changed in the type-class implementation between these versions.

Yes, I agree inserting the st_car is the most sensible way to solve this.

@VincentSe

Copy link
Copy Markdown
Collaborator Author

@spitters @mattam82 If I remove the coercion st_car :> Type in RSetoid, that affects most of the files in CoRN. Thousands of lines of code. Since this looks like a bugfix of coercions in version 8.10, I suggest we drop compatibility before that, and add compatibility with 8.11.

@spitters

spitters commented Jun 1, 2020

Copy link
Copy Markdown
Collaborator

Why would you remove the coercion? One could just insert it in the places where it cannot be found.
It looked like this failed only relatively late in the development.

I'm not opposed to dropping compatibilty with older versions, but if possible it would be nice to keep it.

@VincentSe

Copy link
Copy Markdown
Collaborator Author

@spitters @mattam82 If I add Coercion st_car : RSetoid >-> Sortclass. in file UniformContinuity.v, branch master fails with
Error: st_car is already a coercion.

So how do we put the coercion back in the previous versions so that all versions compile ?

@spitters

spitters commented Jun 2, 2020 via email

Copy link
Copy Markdown
Collaborator

@VincentSe VincentSe force-pushed the CutQmetric branch 16 times, most recently from 8066716 to b28838d Compare June 3, 2020 11:39
@VincentSe VincentSe force-pushed the CutQmetric branch 6 times, most recently from 8a7db18 to 1026895 Compare June 3, 2020 17:26
Build fast reals

Build abstract integral

Build Picard

Build Picard

cut Metric.v

Cut RSetoid

Cut Metric.v
@spitters spitters merged commit 7526586 into master Jun 3, 2020
@VincentSe VincentSe deleted the CutQmetric branch June 3, 2020 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants