-----Description-----
This task requires writing a Lean 4 method that finds the indices of two numbers in an array that add up to a target value. Given an array of integers and a target integer, the function should return the indices of the two numbers such that they add up to the target.

You may assume that each input has exactly one solution, and you may not use the same element twice.

-----Input-----
The input consists of:
nums: An array of integers.
target: An integer representing the target sum.

-----Output-----
The output is an array of two integers:
Returns the indices of the two numbers in the array that add up to the target. The indices should be sorted.

