### coq

#### Coq: freeing universes

Is there a way to Reset (or more generally, free) universes in Coq? Universe M. Print Sorted Universes. (*M = Type.2*) Fail Print M. (*Error: M not a defined object.*) Reset M. Print Sorted Universes. (*M = Type.2*) Definition M := Type#{M}. Print M. (*M = Type: Type*) Print Sorted Universes. (*M = Type.2*) Reset M. Fail Print M. (*Error: M not a defined object.*) Print Sorted Universes. (*M = Type.2*) Whatever I do, M = Type.2. I'm in Coq 8.5

I've found 2 ways. Reset Initial destroys the entire environment (which is usually more than one would want). Another way is to mask universes w/ modules Universe M R. Constraint M < R. Definition M := Type#{M}. Definition R := Type#{R}. Check M:R. Fail Check R:M. (*the hierarchy holds*) (*1. w/ modules:*) Module i. Universe M R. Constraint R < M. Check M:R. Fail Check R:M. (*still holds*) Definition M := Type#{M}. Definition R := Type#{R}. (*but now..*) Fail Check M:R. Check R:M. (*not any more*) Print Sorted Universes. (*2 Rs and Ms, w/ the old hierarchy masked by the new one*) End i. (*outside the module the old hierarchy holds*) Check M:R. Fail Check R:M. (*2. w/ Reset Initial:*) Reset Initial. Fail Check M:R. Fail Check R:M. Print Sorted Universes. (*the def-d univ-s are gone*)

### Related Links

How would I prove that b = c if (andb b c = orb b c) in coq?

Incorrect elimination of X in the inductive type “or”:

Define an inductive dependent-type with constraints on the type-parameter

injectivity of inl and inr in standard library

convoy pattern and match involving inequality

Conversion of nat to Q in Coq

A Coq analogue of the Burali-Forti paradox?

Coq inductive reasoning about ACSL inductive predicates?

extracting evidence of equality from match

How do I the calculate the sqrt of a natural or rational number in coq?

Why unfold does not work on lt(less-than) in Coq?

How to instantiate a variable of forall in a hypothesis in Coq?

Why does use of Coq's setoid_replace “by” clause need an extra idtac?

Inductively defined dense vector lemmas

In coq, how to do “induction n eqn: Hn” in a way that doesn't mess up the inductive hypothesis?

Sum of exponents with same base