Skip to content

Commit 347b2ef

Browse files
committed
fix Archive
1 parent 5ec53bf commit 347b2ef

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Archive/Wiedijk100Theorems/BallotProblem.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,14 @@ theorem counted_succ_succ (p q : ℕ) :
115115
obtain ⟨hl₀, hl₁, hl₂⟩ := hl
116116
obtain hlast | hlast := hl₂ (l.head hlnil) (List.head_mem hlnil)
117117
· refine Or.inl ⟨l.tail, ⟨?_, ?_, ?_⟩, ?_⟩
118-
· rw [List.count_tail hlnil, hl₀, hlast, beq_self_eq_true, if_pos rfl, Nat.add_sub_cancel]
119-
· rw [List.count_tail hlnil, hl₁, hlast, if_neg (by decide), Nat.sub_zero]
118+
· rw [List.count_tail, hl₀, List.head?_eq_head, hlast, beq_self_eq_true, if_pos rfl,
119+
Nat.add_sub_cancel]
120+
· rw [List.count_tail, hl₁, List.head?_eq_head, hlast, if_neg (by decide), Nat.sub_zero]
120121
· exact fun x hx => hl₂ x (List.mem_of_mem_tail hx)
121122
· rw [← hlast, List.head_cons_tail]
122123
· refine Or.inr ⟨l.tail, ⟨?_, ?_, ?_⟩, ?_⟩
123-
· rw [List.count_tail hlnil, hl₀, hlast, if_neg (by decide), Nat.sub_zero]
124-
· rw [List.count_tail hlnil, hl₁, hlast, beq_self_eq_true, if_pos rfl,
124+
· rw [List.count_tail, hl₀, List.head?_eq_head, hlast, if_neg (by decide), Nat.sub_zero]
125+
· rw [List.count_tail, hl₁, List.head?_eq_head, hlast, beq_self_eq_true, if_pos rfl,
125126
Nat.add_sub_cancel]
126127
· exact fun x hx => hl₂ x (List.mem_of_mem_tail hx)
127128
· rw [← hlast, List.head_cons_tail]

0 commit comments

Comments
 (0)