@@ -469,6 +469,7 @@ theorem list_take_take (n: Nat) (xs: List α):
469
469
intro m xs
470
470
cases m with
471
471
| zero =>
472
+ -- TODO: redo this proof without such intrusive unfolds
472
473
unfold min
473
474
unfold instMin_mathlib
474
475
unfold inferInstance
@@ -477,6 +478,7 @@ theorem list_take_take (n: Nat) (xs: List α):
477
478
rw [take]
478
479
simp only [take]
479
480
| succ m =>
481
+ -- TODO: redo this proof without such intrusive unfolds
480
482
unfold min
481
483
unfold instMin_mathlib
482
484
unfold inferInstance
@@ -493,6 +495,7 @@ theorem list_take_take (n: Nat) (xs: List α):
493
495
repeat rw [take]
494
496
apply (congrArg (cons x))
495
497
have hmin : min n m = n := by
498
+ -- TODO: redo this proof without such intrusive unfolds
496
499
unfold min
497
500
unfold instMin_mathlib
498
501
unfold inferInstance
@@ -514,6 +517,7 @@ theorem list_take_take (n: Nat) (xs: List α):
514
517
repeat rw [take]
515
518
apply (congrArg (cons x))
516
519
have hmin : min n m = m := by
520
+ -- TODO: redo this proof without such intrusive unfolds
517
521
unfold min
518
522
unfold instMin_mathlib
519
523
unfold inferInstance
@@ -682,6 +686,7 @@ theorem list_take_large_length {n: Nat} {xs: List α}:
682
686
683
687
theorem list_take_length (n: Nat) (xs: List α):
684
688
length (take n xs) = min n (length xs) := by
689
+ -- TODO: redo this proof without such intrusive unfolds
685
690
unfold min
686
691
unfold instMin_mathlib
687
692
unfold inferInstance
@@ -691,11 +696,13 @@ theorem list_take_length (n: Nat) (xs: List α):
691
696
split
692
697
next =>
693
698
rename_i c
699
+ -- TODO: redo this proof without such intrusive unfolds
694
700
unfold min; unfold instMinNat; unfold minOfLe; simp only [ite_eq_left_iff, not_le]
695
701
intro c'
696
702
linarith
697
703
next =>
698
704
rename_i c
705
+ -- TODO: redo this proof without such intrusive unfolds
699
706
unfold min; unfold instMinNat; unfold minOfLe; simp only [ite_eq_right_iff]
700
707
intro c''
701
708
linarith
0 commit comments