agda / agda

Agda is a dependently typed programming language / interactive theorem prover.
https://wiki.portal.chalmers.se/agda/pmwiki.php
Other
2.41k stars 339 forks source link

`--double-check` fails in `TypeTopology` in the file `Naturals.Order` with version 2.6.4.3 #7217

Closed martinescardo closed 2 months ago

martinescardo commented 2 months ago

I can try to reduce the error later to something self-contained, but for the moment I report this:

/Volumes/CaseSensitive/feathers/tudo/alive/TypeTopology/source/Naturals/Order.lagda:86,37-38
Variable generalization failed.
  - Probable cause
      There were unsolved constraints that obscured the dependencies
      between the generalized variables.
  - Suggestion
      The most reliable solution is to provide enough information to make
      the dependencies clear, but simply mentioning the variables in the
      right order should also work.
  - Further information
    - Dependency analysis suggested this (likely incorrect) order: 𝓤
    - The dependency I error is
      /Volumes/CaseSensitive/feathers/tudo/alive/TypeTopology/source/Naturals/Order.lagda:86,37-38
      (Set _𝓦_205) != (Set (_𝓦_228 (m = m) (n = n)))
when checking that m n are valid arguments to a function of type
{𝓤 𝓥 𝓦 : Universe} {X : 𝓤 ̇} {Y : 𝓥 ̇} ⦃ r : Order X Y ⦄ →
X → Y → 𝓦 ̇

This file compiles fine without --double-check.

martinescardo commented 2 months ago

And it also type checked fine in previous versions of Agda with --double-check.

martinescardo commented 2 months ago

So rather than minimizing the example, it may be more profitable to bisect the Agda code base until we find when the problem is introduced.

andreasabel commented 2 months ago

This seems to be a reprise of

There is a comment with a workaround that states that the problem already existed with Agda 2.6.3: https://github.com/martinescardo/TypeTopology/blob/02add316f8a78bc79e5687e4249d9f0174dae1d2/source/Naturals/Order.lagda#L76-L91

andreasabel commented 2 months ago

Closed as duplicate.