Zulip Chat Archive
Stream: batteries
Topic: Batteries#925
Shreyas Srinivas (Aug 17 2024 at 23:38):
In the context of PR batteries#925 I was going through the definitions in Init.Data.Array.Basic in core. There are two successive definitions modify
and modifyOp
. I am not sure why they are different since modifyOp
just calls modify
.
Shreyas Srinivas (Aug 17 2024 at 23:39):
I am inclined to drop modifyOp
for Vectors. Is this fine?
Shreyas Srinivas (Aug 18 2024 at 00:05):
Some help needed: In the process of proving that modify
does not change a Vector's size, I came across Array.size_modifyM
which is using this strange Satisfies
predicate. I am not quite sure how to put this lemma to use.
Shreyas Srinivas (Aug 18 2024 at 00:08):
Reference: https://github.com/leanprover-community/batteries/pull/925/files#r1720862336
Shreyas Srinivas (Aug 18 2024 at 00:14):
There are two other sorries (3 in total)
- https://github.com/leanprover-community/batteries/pull/925/files#r1720862908
- https://github.com/leanprover-community/batteries/pull/925/files#r1720862960
Mario Carneiro (Aug 18 2024 at 00:15):
I think modifyOp
is vestigial, it was originally intended for the a[i] := e
syntax but I'm not sure it was ever implemented
Mario Carneiro (Aug 18 2024 at 00:15):
it is similar to getOp
which was the a[i]
syntax, now powered by the GetElem
typeclass
Shreyas Srinivas (Aug 18 2024 at 00:17):
Apart from the sorry
s only docstrings remain.
Shreyas Srinivas (Aug 18 2024 at 00:18):
I still have to hunt for monadic defs elsewhere. EDIT : Found all the defs suitable for this PR as far as I can see.
Last updated: May 02 2025 at 03:31 UTC