Skip to content

Commit 1b90beb

Browse files
set all depth to 1
1 parent a2a45df commit 1b90beb

File tree

7 files changed

+94
-63
lines changed

7 files changed

+94
-63
lines changed

doc/sphinx/proofs/writing-proofs/reasoning-inductives.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,8 @@ with :n:`@reference`, the `All` predicate and its theorem will be looked up with
13821382

13831383
.. rocqtop:: in reset
13841384

1385+
Set All Depth 0.
1386+
13851387
Inductive prod (A B : Type) : Type :=
13861388
| pair : A -> B -> prod A B.
13871389

test-suite/output-coqtop/LevelTolerance.out

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Parsing_rect is defined
1414
Parsing_ind is defined
1515
Parsing_rec is defined
1616
Parsing_sind is defined
17+
Parsing_all is defined
18+
Parsing_all_rect is defined
19+
Parsing_all_ind is defined
20+
Parsing_all_rec is defined
21+
Parsing_all_sind is defined
22+
Parsing_all_forall is defined
1723

1824
Rocq < Rocq <
1925
Rocq < Rocq < Identifier 'op22' now a keyword

test-suite/output/Search.out

Lines changed: 80 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -35,93 +35,94 @@ Decimal.uint_beq: Decimal.uint -> Decimal.uint -> bool
3535
Nat.leb: nat -> nat -> bool
3636
Decimal.decimal_beq: Decimal.decimal -> Decimal.decimal -> bool
3737
Number.uint_beq: Number.uint -> Number.uint -> bool
38-
Number.signed_int_beq: Number.signed_int -> Number.signed_int -> bool
38+
Nat.ltb: nat -> nat -> bool
3939
Decimal.signed_int_beq: Decimal.signed_int -> Decimal.signed_int -> bool
4040
Nat.eqb: nat -> nat -> bool
4141
Hexadecimal.uint_beq: Hexadecimal.uint -> Hexadecimal.uint -> bool
42-
Nat.ltb: nat -> nat -> bool
42+
Number.signed_int_beq: Number.signed_int -> Number.signed_int -> bool
4343
Number.number_beq: Number.number -> Number.number -> bool
4444
Hexadecimal.signed_int_beq:
4545
Hexadecimal.signed_int -> Hexadecimal.signed_int -> bool
4646
Hexadecimal.hexadecimal_beq:
4747
Hexadecimal.hexadecimal -> Hexadecimal.hexadecimal -> bool
4848
Nat.testbit: nat -> nat -> bool
4949
Nat.bitwise: (bool -> bool -> bool) -> nat -> nat -> nat -> nat
50+
eq_true_rect_r:
51+
forall (P : bool -> Type) [b : bool], P b -> eq_true b -> P true
52+
bool_ind: forall P : bool -> Prop, P true -> P false -> forall b : bool, P b
5053
eq_true_rew_r:
5154
forall [b : bool] (P : bool -> Type), P b -> eq_true b -> P true
52-
eq_true_rew:
55+
bool_sind:
56+
forall P : bool -> SProp, P true -> P false -> forall b : bool, P b
57+
bool_rect: forall P : bool -> Type, P true -> P false -> forall b : bool, P b
58+
eq_true_rect:
5359
forall P : bool -> Type, P true -> forall [b : bool], eq_true b -> P b
5460
bool_rec: forall P : bool -> Set, P true -> P false -> forall b : bool, P b
5561
eq_true_rec_r:
5662
forall (P : bool -> Set) [b : bool], P b -> eq_true b -> P true
57-
eq_true_ind:
58-
forall P : bool -> Prop, P true -> forall [b : bool], eq_true b -> P b
59-
eq_true_rect:
60-
forall P : bool -> Type, P true -> forall [b : bool], eq_true b -> P b
61-
eq_true_rect_r:
62-
forall (P : bool -> Type) [b : bool], P b -> eq_true b -> P true
63-
eq_true_rec:
64-
forall P : bool -> Set, P true -> forall [b : bool], eq_true b -> P b
6563
eq_true_ind_r:
6664
forall (P : bool -> Prop) [b : bool], P b -> eq_true b -> P true
67-
bool_ind: forall P : bool -> Prop, P true -> P false -> forall b : bool, P b
65+
eq_true_rew:
66+
forall P : bool -> Type, P true -> forall [b : bool], eq_true b -> P b
6867
eq_true_sind:
6968
forall P : bool -> SProp, P true -> forall [b : bool], eq_true b -> P b
70-
bool_sind:
71-
forall P : bool -> SProp, P true -> P false -> forall b : bool, P b
72-
bool_rect: forall P : bool -> Type, P true -> P false -> forall b : bool, P b
69+
eq_true_rec:
70+
forall P : bool -> Set, P true -> forall [b : bool], eq_true b -> P b
71+
eq_true_ind:
72+
forall P : bool -> Prop, P true -> forall [b : bool], eq_true b -> P b
73+
BoolSpec_all:
74+
forall [P : Prop],
75+
(P -> Type@{β0 ; _}) ->
76+
forall [Q : Prop],
77+
(Q -> Type@{β1 ; _}) -> forall [b : bool], BoolSpec P Q b -> Prop
7378
bool_of_sumbool:
7479
forall [A B : Prop], {A} + {B} -> {b : bool | if b then A else B}
7580
sumbool_of_bool: forall b : bool, {b = true} + {b = false}
76-
Decimal.internal_signed_int_dec_lb:
77-
forall x y : Decimal.signed_int, x = y -> Decimal.signed_int_beq x y = true
78-
Number.internal_signed_int_dec_lb1:
79-
forall x y : Number.signed_int, x = y -> Number.signed_int_beq x y = true
80-
Number.internal_signed_int_dec_bl1:
81-
forall x y : Number.signed_int, Number.signed_int_beq x y = true -> x = y
82-
Decimal.internal_signed_int_dec_bl:
83-
forall x y : Decimal.signed_int, Decimal.signed_int_beq x y = true -> x = y
81+
Number.internal_uint_dec_bl1:
82+
forall x y : Number.uint, Number.uint_beq x y = true -> x = y
8483
Hexadecimal.internal_hexadecimal_dec_lb:
8584
forall x y : Hexadecimal.hexadecimal,
8685
x = y -> Hexadecimal.hexadecimal_beq x y = true
86+
Byte.to_bits:
87+
Byte.byte ->
88+
bool * (bool * (bool * (bool * (bool * (bool * (bool * bool))))))
89+
Number.internal_uint_dec_lb1:
90+
forall x y : Number.uint, x = y -> Number.uint_beq x y = true
91+
Byte.of_bits:
92+
bool * (bool * (bool * (bool * (bool * (bool * (bool * bool)))))) ->
93+
Byte.byte
8794
Hexadecimal.internal_signed_int_dec_lb0:
8895
forall x y : Hexadecimal.signed_int,
8996
x = y -> Hexadecimal.signed_int_beq x y = true
97+
Decimal.internal_signed_int_dec_bl:
98+
forall x y : Decimal.signed_int, Decimal.signed_int_beq x y = true -> x = y
99+
Decimal.internal_decimal_dec_bl:
100+
forall x y : Decimal.decimal, Decimal.decimal_beq x y = true -> x = y
101+
Number.internal_signed_int_dec_lb1:
102+
forall x y : Number.signed_int, x = y -> Number.signed_int_beq x y = true
90103
Number.internal_number_dec_lb:
91104
forall x y : Number.number, x = y -> Number.number_beq x y = true
105+
Hexadecimal.internal_hexadecimal_dec_bl:
106+
forall x y : Hexadecimal.hexadecimal,
107+
Hexadecimal.hexadecimal_beq x y = true -> x = y
108+
Number.internal_signed_int_dec_bl1:
109+
forall x y : Number.signed_int, Number.signed_int_beq x y = true -> x = y
92110
Hexadecimal.internal_signed_int_dec_bl0:
93111
forall x y : Hexadecimal.signed_int,
94112
Hexadecimal.signed_int_beq x y = true -> x = y
95-
Number.internal_uint_dec_lb1:
96-
forall x y : Number.uint, x = y -> Number.uint_beq x y = true
97-
Number.internal_uint_dec_bl1:
98-
forall x y : Number.uint, Number.uint_beq x y = true -> x = y
99-
Decimal.internal_decimal_dec_bl:
100-
forall x y : Decimal.decimal, Decimal.decimal_beq x y = true -> x = y
101-
Number.internal_number_dec_bl:
102-
forall x y : Number.number, Number.number_beq x y = true -> x = y
103-
Byte.of_bits:
104-
bool * (bool * (bool * (bool * (bool * (bool * (bool * bool)))))) ->
105-
Byte.byte
106-
Byte.to_bits:
107-
Byte.byte ->
108-
bool * (bool * (bool * (bool * (bool * (bool * (bool * bool))))))
113+
Decimal.internal_signed_int_dec_lb:
114+
forall x y : Decimal.signed_int, x = y -> Decimal.signed_int_beq x y = true
109115
Decimal.internal_decimal_dec_lb:
110116
forall x y : Decimal.decimal, x = y -> Decimal.decimal_beq x y = true
111-
Hexadecimal.internal_hexadecimal_dec_bl:
112-
forall x y : Hexadecimal.hexadecimal,
113-
Hexadecimal.hexadecimal_beq x y = true -> x = y
117+
Number.internal_number_dec_bl:
118+
forall x y : Number.number, Number.number_beq x y = true -> x = y
119+
eq_true_rew_dep:
120+
forall P : forall b : bool, eq_true b -> Type,
121+
P true is_eq_true -> forall [b : bool] (e : eq_true b), P b e
114122
eq_true_rew_fwd_dep:
115123
forall [b : bool] (H : eq_true b)
116124
(P : forall b0 : bool, eq_true b0 -> Type),
117125
P b H -> P true is_eq_true
118-
eq_true_rew_dep:
119-
forall P : forall b : bool, eq_true b -> Type,
120-
P true is_eq_true -> forall [b : bool] (e : eq_true b), P b e
121-
Decimal.internal_uint_dec_bl:
122-
forall x : Decimal.uint,
123-
(fun x0 : Decimal.uint =>
124-
forall y : Decimal.uint, Decimal.uint_beq x0 y = true -> x0 = y) x
125126
Decimal.internal_uint_dec_lb:
126127
forall x : Decimal.uint,
127128
(fun x0 : Decimal.uint =>
@@ -134,6 +135,10 @@ Hexadecimal.internal_uint_dec_bl0:
134135
forall x : Hexadecimal.uint,
135136
(fun x0 : Hexadecimal.uint =>
136137
forall y : Hexadecimal.uint, Hexadecimal.uint_beq x0 y = true -> x0 = y) x
138+
Decimal.internal_uint_dec_bl:
139+
forall x : Decimal.uint,
140+
(fun x0 : Decimal.uint =>
141+
forall y : Decimal.uint, Decimal.uint_beq x0 y = true -> x0 = y) x
137142
andb_prop: forall a b : bool, (a && b)%bool = true -> a = true /\ b = true
138143
andb_true_intro:
139144
forall [b1 b2 : bool], b1 = true /\ b2 = true -> (b1 && b2)%bool = true
@@ -143,21 +148,27 @@ bool_eq_rec:
143148
bool_eq_ind:
144149
forall (b : bool) (P : bool -> Prop),
145150
(b = true -> P true) -> (b = false -> P false) -> P b
146-
BoolSpec_sind:
147-
forall [P Q : Prop] (P0 : bool -> SProp),
148-
(P -> P0 true) ->
149-
(Q -> P0 false) -> forall [b : bool], BoolSpec P Q b -> P0 b
150151
BoolSpec_ind:
151152
forall [P Q : Prop] (P0 : bool -> Prop),
152153
(P -> P0 true) ->
153154
(Q -> P0 false) -> forall [b : bool], BoolSpec P Q b -> P0 b
154-
reflect_ind:
155-
forall [P : Prop] (P0 : forall b : bool, reflect P b -> Prop),
155+
BoolSpec_sind:
156+
forall [P Q : Prop] (P0 : bool -> SProp),
157+
(P -> P0 true) ->
158+
(Q -> P0 false) -> forall [b : bool], BoolSpec P Q b -> P0 b
159+
BoolSpec_all_forall:
160+
forall [P : Prop] (PP : P -> Type@{β0 ; _}),
161+
(forall p : P, PP p) ->
162+
forall [Q : Prop] (PQ : Q -> Type@{β1 ; _}),
163+
(forall q : Q, PQ q) ->
164+
forall [b : bool] (b0 : BoolSpec P Q b), BoolSpec_all PP PQ b0
165+
reflect_rec:
166+
forall [P : Prop] (P0 : forall b : bool, reflect P b -> Set),
156167
(forall p : P, P0 true (ReflectT P p)) ->
157168
(forall n : ~ P, P0 false (ReflectF P n)) ->
158169
forall [b : bool] (r : reflect P b), P0 b r
159-
reflect_sind:
160-
forall [P : Prop] (P0 : forall b : bool, reflect P b -> SProp),
170+
reflect_ind:
171+
forall [P : Prop] (P0 : forall b : bool, reflect P b -> Prop),
161172
(forall p : P, P0 true (ReflectT P p)) ->
162173
(forall n : ~ P, P0 false (ReflectF P n)) ->
163174
forall [b : bool] (r : reflect P b), P0 b r
@@ -166,8 +177,8 @@ reflect_rect:
166177
(forall p : P, P0 true (ReflectT P p)) ->
167178
(forall n : ~ P, P0 false (ReflectF P n)) ->
168179
forall [b : bool] (r : reflect P b), P0 b r
169-
reflect_rec:
170-
forall [P : Prop] (P0 : forall b : bool, reflect P b -> Set),
180+
reflect_sind:
181+
forall [P : Prop] (P0 : forall b : bool, reflect P b -> SProp),
171182
(forall p : P, P0 true (ReflectT P p)) ->
172183
(forall n : ~ P, P0 false (ReflectF P n)) ->
173184
forall [b : bool] (r : reflect P b), P0 b r
@@ -179,6 +190,18 @@ bool_choice:
179190
forall [S : Set] [R1 R2 : S -> Prop],
180191
(forall x : S, {R1 x} + {R2 x}) ->
181192
{f : S -> bool | forall x : S, f x = true /\ R1 x \/ f x = false /\ R2 x}
193+
BoolSpec_all_sind:
194+
forall [P : Prop] [PP : P -> Type@{β0 ; _}] [Q : Prop]
195+
[PQ : Q -> Type@{β1 ; _}] (P0 : forall b : bool, BoolSpec P Q b -> SProp),
196+
(forall p : P, PP p -> P0 true (BoolSpecT Q p)) ->
197+
(forall q : Q, PQ q -> P0 false (BoolSpecF P q)) ->
198+
forall [b : bool] [b0 : BoolSpec P Q b], BoolSpec_all PP PQ b0 -> P0 b b0
199+
BoolSpec_all_ind:
200+
forall [P : Prop] [PP : P -> Type@{β0 ; _}] [Q : Prop]
201+
[PQ : Q -> Type@{β1 ; _}] (P0 : forall b : bool, BoolSpec P Q b -> Prop),
202+
(forall p : P, PP p -> P0 true (BoolSpecT Q p)) ->
203+
(forall q : Q, PQ q -> P0 false (BoolSpecF P q)) ->
204+
forall [b : bool] [b0 : BoolSpec P Q b], BoolSpec_all PP PQ b0 -> P0 b b0
182205
mult_n_O: forall n : nat, 0 = n * 0
183206
plus_O_n: forall n : nat, 0 + n = n
184207
plus_n_O: forall n : nat, n = n + 0

test-suite/output/UnivBinders.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ block).
203203
foo@{i} = Type@{M.i} -> Type@{i}
204204
: Type@{max(M.i+1,i+1)}
205205
(* i |= *)
206-
Type@{u0} -> Type@{UnivBinders.83}
207-
: Type@{max(u0+1,UnivBinders.83+1)}
208-
(* {UnivBinders.83} |= *)
206+
Type@{u0} -> Type@{UnivBinders.89}
207+
: Type@{max(u0+1,UnivBinders.89+1)}
208+
(* {UnivBinders.89} |= *)
209209
bind_univs.mono = Type@{bind_univs.mono.u}
210210
: Type@{bind_univs.mono.u+1}
211211
bind_univs.poly@{u} = Type@{u}

test-suite/output/bug_20242.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ File "./output/bug_20242.v", line 5, characters 49-60:
22
The command has indeed failed with message:
33
Signature components for field B do not match: expected type
44
"foo@{Type ; A.A.u0} bug_20242.B.A" but found type
5-
"foo@{SProp ; bug_20242.26} bug_20242.B.A".
5+
"foo@{SProp ; bug_20242.32} bug_20242.B.A".
66
Error: The module B needs to be closed.
77

88

test-suite/output/sort_poly_elim_error.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
File "./output/sort_poly_elim_error.v", line 8, characters 0-108:
22
The command has indeed failed with message:
33
Incorrect elimination of "p" in the inductive type
4-
"sum@{Prop ; sort_poly_elim_error.23 sort_poly_elim_error.24}":
4+
"sum@{Prop ; sort_poly_elim_error.35 sort_poly_elim_error.36}":
55
the return type has sort "Type" while it should be SProp or Prop.
66
Elimination of an inductive object of sort Prop
77
is not allowed on a predicate in sort "Type"

vernac/indschemes.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ type declare_mind_function = ?all_depth:int ->
606606

607607
(** Depth Generation of all predicate at definition of a new inductive type *)
608608
let { Goptions.get = default_all_depth } =
609-
Goptions.declare_int_option_and_ref ~key:["All";"Depth"] ~value:0 ()
609+
Goptions.declare_int_option_and_ref ~key:["All";"Depth"] ~value:1 ()
610610

611611
let default_all_depth kn mib =
612612
let mib = Global.lookup_mind kn in

0 commit comments

Comments
 (0)