This PR reviews the implicitness of arguments across List/Array/Vector, generally trying to make arguments implicit where possible, although sometimes correcting propositional arguments which were incorrectly implicit to explicit.
12 lines
366 B
Text
12 lines
366 B
Text
def myfunUnsafe (x : Array α) (i : Fin x.size) : Array α :=
|
||
sorry
|
||
|
||
@[implemented_by myfunUnsafe]
|
||
def myfun (x : Array α) (i : Fin x.size) : Array α :=
|
||
let next := 2*i.1 + 1
|
||
if h : next < x.size then
|
||
have : x.size - next < x.size - i.1 := sorry
|
||
myfun (x.swap i next) ⟨next, (x.size_swap).symm ▸ h⟩
|
||
else
|
||
x
|
||
termination_by x.size - i.1
|