Theorem: Hindman.FS.add_two
File: Mathlib/Combinatorics/Hindman.lean

Proof steps:
state_before: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ a.get i * a.get j ∈ FP a
state_after: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ a.get i * a.get j ∈ FP (Stream'.drop i a)
tactic: refine FP_drop_subset_FP _ i ?_
state_before: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ a.get i * a.get j ∈ FP (Stream'.drop i a)
state_after: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ (Stream'.drop i a).head * a.get j ∈ FP (Stream'.drop i a)
tactic: rw [← Stream'.head_drop]
state_before: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ (Stream'.drop i a).head * a.get j ∈ FP (Stream'.drop i a)
state_after: case h
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ FP (Stream'.drop i a).tail (a.get j)
tactic: apply FP.cons
state_before: case h
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ FP (Stream'.drop i a).tail (a.get j)
state_after: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
⊢ FP (Stream'.drop i a).tail (a.get j)
tactic: rcases le_iff_exists_add.mp (Nat.succ_le_of_lt ij) with ⟨d, hd⟩
state_before: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
⊢ FP (Stream'.drop i a).tail (a.get j)
state_after: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
⊢ a.get j ∈ FP (Stream'.drop i a).tail
tactic: change _ ∈ FP _
state_before: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
⊢ a.get j ∈ FP (Stream'.drop i a).tail
state_after: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
this : (Stream'.drop i a).tail.get d ∈ FP (Stream'.drop i a).tail
⊢ a.get j ∈ FP (Stream'.drop i a).tail
tactic: have := FP.singleton (a.drop i).tail d
state_before: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
this : (Stream'.drop i a).tail.get d ∈ FP (Stream'.drop i a).tail
⊢ a.get j ∈ FP (Stream'.drop i a).tail
state_after: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
this : a.get (d + 1 + i) ∈ FP (Stream'.drop 1 (Stream'.drop i a))
⊢ a.get j ∈ FP (Stream'.drop i a).tail
tactic: rw [Stream'.tail_eq_drop, Stream'.get_drop, Stream'.get_drop] at this
state_before: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
this : a.get (d + 1 + i) ∈ FP (Stream'.drop 1 (Stream'.drop i a))
⊢ a.get j ∈ FP (Stream'.drop i a).tail
state_after: case h.e'_4.h.e'_3
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
this : a.get (d + 1 + i) ∈ FP (Stream'.drop 1 (Stream'.drop i a))
⊢ j = d + 1 + i
tactic: convert this
state_before: case h.e'_4.h.e'_3
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = i.succ + d
this : a.get (d + 1 + i) ∈ FP (Stream'.drop 1 (Stream'.drop i a))
⊢ j = d + 1 + i
state_after: no goals
tactic: rw [hd, add_comm, Nat.succ_add, Nat.add_succ]