Skip to content

Commit cf42af7

Browse files
Merge pull request #2318 from jdchristensen/trunc-universes
Changes for Rocq PR#21164
2 parents 0025f6c + b2dfaef commit cf42af7

File tree

6 files changed

+11
-14
lines changed

6 files changed

+11
-14
lines changed

contrib/HoTTBookExercises.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ Defined.
11091109
Definition Book_3_10_LEM@{j} := forall A : HProp@{j}, A + ~ A.
11101110

11111111
Definition Book_3_10_Lift@{i j | i < j} (A : HProp@{i}) : HProp@{j}
1112-
:= Build_HProp A.
1112+
:= @Build_HProp A (trunctype_istrunc A).
11131113

11141114
Definition Book_3_10_impred@{i j k | i < j, j < k} `{Univalence}
11151115
(LEM : Book_3_10_LEM@{j})

theories/Algebra/Rings/Matrix.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ Class IsUpperTriangular@{i} {R : Ring@{i}} {n : nat} (M : Matrix@{i} R n n) : Ty
667667
Instance ishprop_isuppertriangular@{i} {R : Ring@{i}} {n : nat} (M : Matrix R n n)
668668
: IsHProp (IsUpperTriangular M).
669669
Proof.
670-
apply istrunc_truncation@{i i}.
670+
apply istrunc_truncation@{i}.
671671
Defined.
672672

673673
(** A matrix is lower triangular if all the entries above the diagonal are zero. We define it as the transpose being upper triangular. *)
@@ -678,7 +678,7 @@ Instance ishprop_islowertriangular@{i} {R : Ring@{i}} {n : nat}
678678
(M : Matrix R n n)
679679
: IsHProp (IsLowerTriangular M).
680680
Proof.
681-
apply istrunc_truncation@{i i}.
681+
apply istrunc_truncation@{i}.
682682
Defined.
683683

684684
(** The transpose of a matrix is lower triangular if and only if the matrix is upper triangular. *)

theories/Modalities/Meet.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Section LexMeet.
296296
apply mapinO_compose.
297297
2:rapply mapinO_isequiv.
298298
apply IHn.
299-
- rapply mapinO_diagonal.
299+
- apply mapinO_diagonal.
300300
pose (O_eq_Tr n.+1).
301301
rapply (mapinO_O_leq _ (Sep (Tr n.+1))).
302302
- apply plusconnmap_diagonal; assumption.

theories/Truncations/Core.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Module Export Trunc.
2828
tr : A -> Trunc n A.
2929
Arguments tr {n A} a.
3030

31-
(** Without explicit universe parameters, this instance is insufficiently polymorphic. *)
32-
#[export] Instance istrunc_truncation (n : trunc_index) (A : Type@{i})
33-
: IsTrunc@{j} n (Trunc@{i} n A).
31+
(** Because [IsTrunc] is cumulative, we can use only one universe variable here. *)
32+
#[export] Instance istrunc_truncation@{i} (n : trunc_index) (A : Type@{i})
33+
: IsTrunc@{i} n (Trunc@{i} n A).
3434
Admitted.
3535

3636
Definition Trunc_ind {n A}

theories/Universes/DProp.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Proof.
134134
- intros P; unfold dprop_to_bool.
135135
destruct (dec P); symmetry; apply path_dprop, path_universe_uncurried.
136136
+ apply if_hprop_then_equiv_Unit; [ exact _ | assumption ].
137-
+ apply if_not_hprop_then_equiv_Empty; [ exact _ | assumption ].
137+
+ apply if_not_hprop_then_equiv_Empty; assumption.
138138
Defined.
139139

140140
Definition equiv_dprop_to_bool `{Univalence}

theories/Universes/HProp.v

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,9 @@ Proof.
128128
- exact (fun _ => p).
129129
Defined.
130130

131-
(** If an hprop is not inhabited, then it is equivalent to [Empty]. *)
132-
Lemma if_not_hprop_then_equiv_Empty (hprop : Type) `{IsHProp hprop} : ~hprop -> hprop <~> Empty.
133-
Proof.
134-
intro np.
135-
exact (Build_Equiv _ _ np _).
136-
Defined.
131+
(** If an hprop is not inhabited, then it is equivalent to [Empty]. Note that we'd don't need the assumption that the type is an hprop here. *)
132+
Definition if_not_hprop_then_equiv_Empty (hprop : Type) : ~hprop -> hprop <~> Empty
133+
:= equiv_to_empty.
137134

138135
(** Thus, a decidable hprop is either equivalent to [Unit] or [Empty]. *)
139136
Definition equiv_decidable_hprop (hprop : Type)

0 commit comments

Comments
 (0)