-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: GuessLex: delaborate unused parameters as _
fixes #4230
- Loading branch information
Showing
2 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
def copy (curr : Nat) (input : Array Nat) (output : Array Nat) : Array Nat := | ||
if hcurr:curr < input.size then | ||
copy (curr + 1) input (output.push (input[curr]'hcurr)) | ||
else | ||
output | ||
termination_by input.size - curr | ||
|
||
/-- info: Try this: termination_by input.size - curr -/ | ||
#guard_msgs(drop warning, info) in | ||
theorem foo (curr : Nat) (input : Array Nat) (output : Array Nat) | ||
: ∀ (idx : Nat) (hidx1 : idx < curr), | ||
(copy curr input output)[idx]'sorry | ||
= | ||
output[idx]'sorry := by | ||
intro idx hidx | ||
unfold copy | ||
split | ||
. rw [foo] | ||
. rw [Array.get_push_lt] | ||
. omega | ||
. rfl | ||
termination_by? |