Skip to content

Commit d31c472

Browse files
add TODOs to make cleaner proofs for Lists
1 parent 144b9b0 commit d31c472

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Katydid/Std/Lists.lean

+7
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ theorem list_take_take (n: Nat) (xs: List α):
469469
intro m xs
470470
cases m with
471471
| zero =>
472+
-- TODO: redo this proof without such intrusive unfolds
472473
unfold min
473474
unfold instMin_mathlib
474475
unfold inferInstance
@@ -477,6 +478,7 @@ theorem list_take_take (n: Nat) (xs: List α):
477478
rw [take]
478479
simp only [take]
479480
| succ m =>
481+
-- TODO: redo this proof without such intrusive unfolds
480482
unfold min
481483
unfold instMin_mathlib
482484
unfold inferInstance
@@ -493,6 +495,7 @@ theorem list_take_take (n: Nat) (xs: List α):
493495
repeat rw [take]
494496
apply (congrArg (cons x))
495497
have hmin : min n m = n := by
498+
-- TODO: redo this proof without such intrusive unfolds
496499
unfold min
497500
unfold instMin_mathlib
498501
unfold inferInstance
@@ -514,6 +517,7 @@ theorem list_take_take (n: Nat) (xs: List α):
514517
repeat rw [take]
515518
apply (congrArg (cons x))
516519
have hmin : min n m = m := by
520+
-- TODO: redo this proof without such intrusive unfolds
517521
unfold min
518522
unfold instMin_mathlib
519523
unfold inferInstance
@@ -682,6 +686,7 @@ theorem list_take_large_length {n: Nat} {xs: List α}:
682686

683687
theorem list_take_length (n: Nat) (xs: List α):
684688
length (take n xs) = min n (length xs) := by
689+
-- TODO: redo this proof without such intrusive unfolds
685690
unfold min
686691
unfold instMin_mathlib
687692
unfold inferInstance
@@ -691,11 +696,13 @@ theorem list_take_length (n: Nat) (xs: List α):
691696
split
692697
next =>
693698
rename_i c
699+
-- TODO: redo this proof without such intrusive unfolds
694700
unfold min; unfold instMinNat; unfold minOfLe; simp only [ite_eq_left_iff, not_le]
695701
intro c'
696702
linarith
697703
next =>
698704
rename_i c
705+
-- TODO: redo this proof without such intrusive unfolds
699706
unfold min; unfold instMinNat; unfold minOfLe; simp only [ite_eq_right_iff]
700707
intro c''
701708
linarith

0 commit comments

Comments
 (0)