Skip to content

Commit 5b496f9

Browse files
authored
1 parent 06a316c commit 5b496f9

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

theories/Torch/Slicing.v

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From Coq Require Import Sint63 Uint63.
1+
From Coq Require Import Sint63 Uint63 PrimArray.
22
From NeuralNetInterp.Torch Require Import Tensor.
33
From NeuralNetInterp.Util Require Import Slice Arith.Classes Arith.Instances PolymorphicOption Nat Notations.
44
Import Instances.Uint63.
@@ -219,44 +219,44 @@ Module SliceIndex.
219219
Export SliceIndexNotations0.
220220
Notation "t .[ x , .. , y ]"
221221
:= (SliceIndex.slice (snoc .. (snoc nil x) .. y) t%raw_tensor)
222-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]")
222+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]")
223223
: raw_tensor_scope.
224224
Notation "t .[ x , .. , y ]"
225225
:= (SliceIndex.slice (snoc .. (snoc nil x) .. y) t%tensor)
226-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]")
226+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]")
227227
: tensor_scope.
228228
Notation "t .[ … , x , .. , y ]"
229229
:= (SliceIndex.slice (snoc .. (snoc elipsis x) .. y) t%raw_tensor)
230-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]")
230+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]")
231231
: raw_tensor_scope.
232232
Notation "t .[ … , x , .. , y ]"
233233
:= (SliceIndex.slice (snoc .. (snoc elipsis x) .. y) t%tensor)
234-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]")
234+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]")
235235
: tensor_scope.
236236
Notation "t .[< i >]"
237237
:= (SliceIndex.slice (snoc nil i) t%tensor)
238-
(at level 2, i custom fancy_slice at level 60, left associativity, format "t .[< i >]")
238+
(i custom fancy_slice at level 60, left associativity, format "t .[< i >]")
239239
: tensor_scope.
240240

241241
Notation "t .[ x , .. , y ] <- v"
242242
:= (SliceIndex.set_slice (snoc .. (snoc nil x) .. y) t%raw_tensor v%raw_tensor)
243-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ x , .. , y ] <- v")
243+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ x , .. , y ] <- v")
244244
: raw_tensor_scope.
245245
Notation "t .[ x , .. , y ] <- v"
246246
:= (SliceIndex.set_slice (snoc .. (snoc nil x) .. y) t%tensor v%tensor)
247-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ x , .. , y ] <- v")
247+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ x , .. , y ] <- v")
248248
: tensor_scope.
249249
Notation "t .[ … , x , .. , y ] <- v"
250250
:= (SliceIndex.set_slice (snoc .. (snoc elipsis x) .. y) t%raw_tensor v%raw_tensor)
251-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ … , x , .. , y ] <- v")
251+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ … , x , .. , y ] <- v")
252252
: raw_tensor_scope.
253253
Notation "t .[ … , x , .. , y ] <- v"
254254
:= (SliceIndex.set_slice (snoc .. (snoc elipsis x) .. y) t%tensor v%tensor)
255-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ … , x , .. , y ] <- v")
255+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ … , x , .. , y ] <- v")
256256
: tensor_scope.
257257
Notation "t .[< i >] <- v"
258258
:= (SliceIndex.set_slice (snoc nil i) t%tensor v%tensor)
259-
(at level 2, i custom fancy_slice at level 60, no associativity, format "t .[< i >] <- v")
259+
(i custom fancy_slice at level 60, no associativity, format "t .[< i >] <- v")
260260
: tensor_scope.
261261
End SliceIndexNotations.
262262
End SliceIndex.
@@ -362,23 +362,23 @@ Module FancyIndex.
362362
Delimit Scope fancy_raw_tensor_scope with fancy_raw_tensor.
363363
Notation "t .[ x , .. , y ]"
364364
:= (FancyIndex.slice (snoc .. (snoc nil x) .. y) t%fancy_raw_tensor)
365-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]")
365+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]")
366366
: fancy_raw_tensor_scope.
367367
Notation "t .[ x , .. , y ]"
368368
:= (FancyIndex.slice (snoc .. (snoc nil x) .. y) t%fancy_tensor)
369-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]")
369+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]")
370370
: fancy_tensor_scope.
371371
Notation "t .[ … , x , .. , y ]"
372372
:= (FancyIndex.slice (snoc .. (snoc elipsis x) .. y) t%fancy_raw_tensor)
373-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]")
373+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]")
374374
: fancy_raw_tensor_scope.
375375
Notation "t .[ … , x , .. , y ]"
376376
:= (FancyIndex.slice (snoc .. (snoc elipsis x) .. y) t%fancy_tensor)
377-
(at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]")
377+
(x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]")
378378
: fancy_tensor_scope.
379379
Notation "t .[< i >]"
380380
:= (FancyIndex.slice (snoc nil i) t%fancy_tensor)
381-
(at level 2, i custom fancy_slice at level 60, left associativity, format "t .[< i >]")
381+
(i custom fancy_slice at level 60, left associativity, format "t .[< i >]")
382382
: fancy_tensor_scope.
383383
End FancyIndexNotations.
384384
End FancyIndex.

theories/Util/PArray.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Definition slice {A} (xs : array A) (s : Slice int) : array A
161161
}}.
162162

163163
Export SliceNotations.
164-
Notation "x .[ < s > ]" := (slice x s) (at level 2, s custom slice at level 60, format "x .[ < s > ]") : core_scope.
164+
Notation "x .[ < s > ]" := (slice x s) (s custom slice at level 60, format "x .[ < s > ]") : core_scope.
165165

166166
Definition repeat {A} (xs : A) (count : int) : array A
167167
:= PArray.make count xs.

0 commit comments

Comments
 (0)