Skip to content
Merged
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
4 changes: 1 addition & 3 deletions TensorLib/ByteArray.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
-/

import Batteries.Data.ByteArray
import Plausible
import TensorLib.Bytes
import TensorLib.Common
Expand Down Expand Up @@ -169,9 +170,6 @@ def _root_.ByteArray.replicate (n : Nat) (v : UInt8) : ByteArray := Id.run do

#guard ByteArray.replicate 5 7 == ⟨ #[7, 7, 7, 7, 7] ⟩

@[simp] theorem _root_.ByteArray.size_push (a : ByteArray) (b : UInt8) : (a.push b).size = a.size + 1 :=
Array.size_push ..

private theorem _root_.ByteArray.replicateSizeAux (arr : ByteArray) (xs : List a) (v : UInt8) : (List.foldl (fun b _ => b.push v) arr xs).size = arr.size + xs.length := by
revert arr
induction xs <;> simp
Expand Down
2 changes: 1 addition & 1 deletion TensorLib/Iterator.lean
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ instance instPairCarry [inst1 : Iterator i1 v1] [inst2 : Iterator i2 v2] : Itera
| .some l => some (l, r)
| .none =>
let l := inst1.reset l
match inst2.next r with
match inst2.next r with
| .none => .none
| .some r => .some (l, r)

Expand Down