Skip to content

Commit d16a395

Browse files
committed
fix after rebase
1 parent 50da32d commit d16a395

File tree

1 file changed

+7
-7
lines changed
  • src/Init/Data/Iterators/Lemmas/Consumers/Monadic

1 file changed

+7
-7
lines changed

src/Init/Data/Iterators/Lemmas/Consumers/Monadic/Loop.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ theorem IterM.findSomeM?_eq_match_step {α β γ : Type w} {m : Type w → Type
518518
[Iterator α m β] [IteratorLoop α m m] [LawfulMonad m] [Finite α m] [LawfulIteratorLoop α m m]
519519
{it : IterM (α := α) m β} {f : β → m (Option γ)} :
520520
it.findSomeM? f = (do
521-
match (← it.step).val with
521+
match (← it.step).inflate.val with
522522
| .yield it' out =>
523523
match ← f out with
524524
| none => it'.findSomeM? f
@@ -527,7 +527,7 @@ theorem IterM.findSomeM?_eq_match_step {α β γ : Type w} {m : Type w → Type
527527
| .done => return none) := by
528528
rw [findSomeM?, forIn_eq_match_step]
529529
apply bind_congr; intro step
530-
cases step using PlausibleIterStep.casesOn
530+
cases step.inflate using PlausibleIterStep.casesOn
531531
· simp only [bind_assoc]
532532
apply bind_congr; intro fx
533533
split <;> simp [findSomeM?]
@@ -544,7 +544,7 @@ theorem IterM.findSome?_eq_match_step {α β γ : Type w} {m : Type w → Type w
544544
[Iterator α m β] [IteratorLoop α m m] [LawfulMonad m] [Finite α m] [LawfulIteratorLoop α m m]
545545
{it : IterM (α := α) m β} {f : β → Option γ} :
546546
it.findSome? f = (do
547-
match (← it.step).val with
547+
match (← it.step).inflate.val with
548548
| .yield it' out =>
549549
match f out with
550550
| none => it'.findSome? f
@@ -563,7 +563,7 @@ theorem IterM.findSomeM?_pure {α β γ : Type w} {m : Type w → Type w'} [Mona
563563
induction it using IterM.inductSteps with | step it ihy ihs
564564
rw [findSomeM?_eq_match_step, findSome?_eq_match_step]
565565
apply bind_congr; intro step
566-
cases step using PlausibleIterStep.casesOn
566+
cases step.inflate using PlausibleIterStep.casesOn
567567
· simp only [pure_bind]
568568
split <;> simp [ihy ‹_›]
569569
· simp [ihs ‹_›]
@@ -579,7 +579,7 @@ theorem IterM.findM?_eq_match_step {α β : Type w} {m : Type w → Type w'} [Mo
579579
[Iterator α m β] [IteratorLoop α m m] [LawfulMonad m] [Finite α m] [LawfulIteratorLoop α m m]
580580
{it : IterM (α := α) m β} {f : β → m (ULift Bool)} :
581581
it.findM? f = (do
582-
match (← it.step).val with
582+
match (← it.step).inflate.val with
583583
| .yield it' out =>
584584
if (← f out).down then return (some out) else it'.findM? f
585585
| .skip it' => it'.findM? f
@@ -607,7 +607,7 @@ theorem IterM.find?_eq_match_step {α β : Type w} {m : Type w → Type w'} [Mon
607607
[Iterator α m β] [IteratorLoop α m m] [LawfulMonad m] [Finite α m] [LawfulIteratorLoop α m m]
608608
{it : IterM (α := α) m β} {f : β → Bool} :
609609
it.find? f = (do
610-
match (← it.step).val with
610+
match (← it.step).inflate.val with
611611
| .yield it' out =>
612612
if f out then return (some out) else it'.find? f
613613
| .skip it' => it'.find? f
@@ -628,7 +628,7 @@ theorem IterM.findM?_pure {α β : Type w} {m : Type w → Type w'} [Monad m]
628628
induction it using IterM.inductSteps with | step it ihy ihs
629629
rw [findM?_eq_match_step, find?_eq_match_step]
630630
apply bind_congr; intro step
631-
cases step using PlausibleIterStep.casesOn
631+
cases step.inflate using PlausibleIterStep.casesOn
632632
· simp only [pure_bind]
633633
split
634634
· simp

0 commit comments

Comments
 (0)