Skip to content
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

Adapt to coq/coq#20150 (more aggressive universe minimization) #2209

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion theories/Homotopy/InjectiveTypes/InjectiveTypes.v
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Definition decidable_alg_flab_hprop@{w} `{Funext} (P : HProp@{w})
Proof.
pose (inl' := inl : P + ~P -> (P + ~P) + (Unit : Type@{w})).
assert (l : {d : (P + ~P) + (Unit : Type@{w}) & forall z, d = inl' z}).
{ refine (center_af _; contr_af inl'). rapply ishprop_decidable_hprop@{w w}. }
{ refine (center_af _; contr_af inl'). rapply ishprop_decidable_hprop. }
destruct l as [[s | u] l2].
- exact s.
- assert (np := fun p => inl_ne_inr _ _ (l2 (inl p))^).
Expand Down
11 changes: 5 additions & 6 deletions theories/Idempotents.v
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,8 @@
Section CoherentIdempotents.
Context {ua : Univalence}.

Class IsIdempotent {X : Type} (f : X -> X)
:= is_coherent_idem : split_idem (retract_idem (splitting_retractof_isqidem f)).
Class IsIdempotent@{u u0 u1} {X : Type@{u}} (f : X -> X)
:= is_coherent_idem : split_idem@{u u0} (retract_idem@{u u1} (splitting_retractof_isqidem f)).

Check failure on line 761 in theories/Idempotents.v

View workflow job for this annotation

GitHub Actions / opam-build (supported, ubuntu-latest)

Universe instance length is 2 but should be 3.

Check failure on line 761 in theories/Idempotents.v

View workflow job for this annotation

GitHub Actions / opam-build (latest, ubuntu-latest)

Universe instance length is 2 but should be 3.

Check failure on line 761 in theories/Idempotents.v

View workflow job for this annotation

GitHub Actions / opam-build (dev, ubuntu-latest)

Universe instance length for split_idem is 2 but should be 3.

Definition Build_IsIdempotent {X : Type} (f : X -> X)
: Splitting f -> IsIdempotent f
Expand All @@ -781,7 +781,7 @@
refine (split_idem_sect (retract_idem (splitting_retractof_isqidem f)) _).2.
Defined.

Definition Idempotent (X : Type) := { f : X -> X & IsIdempotent f }.
Definition Idempotent@{u u0 u1} (X : Type@{u}) := { f : X -> X & IsIdempotent@{u u0 u1} f }.

Definition idempotent_pr1 {X : Type} : Idempotent X -> (X -> X) := pr1.
Coercion idempotent_pr1 : Idempotent >-> Funclass.
Expand All @@ -790,9 +790,8 @@
:= f.2.

(** The above definitions depend on [Univalence]. Technically this is the case by their construction, since they are a splitting of a map that we only know to be idempotent in the presence of univalence. This map could be defined, and hence "split", without univalence; but also only with univalence do we know that they have the right homotopy type. Thus univalence is used in two places: concluding (meta-theoretically) from HTT 4.4.5.14 that [RetractOf X] has the right homotopy type, and showing (in the next lemma) that it is equivalent to [Idempotent X]. In the absence of univalence, we don't currently have *any* provably-correct definition of the type of coherent idempotents; it ought to involve an infinite tower of coherences as defined in HTT section 4.4.5. However, there may be some Yoneda-like meta-theoretic argument which would imply that the above-defined types do have the correct homotopy type without univalence (though almost certainly not without funext). *)

Definition equiv_idempotent_retractof (X : Type)
: Idempotent X <~> RetractOf X.
Definition equiv_idempotent_retractof@{u u0 u1 +} (X : Type@{u})
: Idempotent@{u u0 u1} X <~> RetractOf X.
Proof.
transitivity ({ f : X -> X & Splitting f }).
- unfold Idempotent.
Expand Down
2 changes: 1 addition & 1 deletion theories/Metatheory/Nat.v
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@
- apply equiv_precompose'.
apply equiv_N_segment_succ.
- apply equiv_functor_prod_l.
apply equiv_unit_rec@{x nr}.
apply equiv_unit_rec@{x}.

Check failure on line 823 in theories/Metatheory/Nat.v

View workflow job for this annotation

GitHub Actions / opam-build (supported, ubuntu-latest)

Universe instance length is 1 but should be 2.

Check failure on line 823 in theories/Metatheory/Nat.v

View workflow job for this annotation

GitHub Actions / build (supported)

Universe instance length is 1 but should be 2. Command exited with non-zero status 1

Check failure on line 823 in theories/Metatheory/Nat.v

View workflow job for this annotation

GitHub Actions / opam-build (latest, ubuntu-latest)

Universe instance length is 1 but should be 2.

Check failure on line 823 in theories/Metatheory/Nat.v

View workflow job for this annotation

GitHub Actions / build (latest)

Universe instance length is 1 but should be 2. Command exited with non-zero status 1

Check failure on line 823 in theories/Metatheory/Nat.v

View workflow job for this annotation

GitHub Actions / opam-build (dev, ubuntu-latest)

Universe instance length for equiv_unit_rec is 1 but should be 2.

Check failure on line 823 in theories/Metatheory/Nat.v

View workflow job for this annotation

GitHub Actions / build (dev, --warnings)

Universe instance length for equiv_unit_rec is 1 but should be 2. Command exited with non-zero status 1
Defined.

Local Definition equiv_seg_succ@{} (n m : N) (H : m < succ n)
Expand Down
Loading