Theorem: DFA.pumping_lemma
File: Mathlib/Computability/DFA.lean

tactic: obtain ⟨_, a, b, c, hx, hlen, hnil, rfl, hb, hc⟩ := M.evalFrom_split hlen rfl
state_before: α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx : x ∈ accepts M
hlen : Fintype.card σ ≤ List.length x
⊢ ∃ a b c, x = a ++ b ++ c ∧ List.length a + List.length b ≤ Fintype.card σ ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ accepts M

tactic: use a, b, c, hx, hlen, hnil
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
a b c : List α
hx : x = a ++ b ++ c
hlen : List.length a + List.length b ≤ Fintype.card σ
hnil : b ≠ []
hb : evalFrom M (evalFrom M ?m.8226 a) b = evalFrom M ?m.8226 a
hc : evalFrom M (evalFrom M ?m.8226 a) c = evalFrom M ?m.8226 x
⊢ ∃ a b c, x = a ++ b ++ c ∧ List.length a + List.length b ≤ Fintype.card σ ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ accepts M

tactic: intro y hy
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
a b c : List α
hx : x = a ++ b ++ c
hlen : List.length a + List.length b ≤ Fintype.card σ
hnil : b ≠ []
hb : evalFrom M (evalFrom M ?m.8226 a) b = evalFrom M ?m.8226 a
hc : evalFrom M (evalFrom M ?m.8226 a) c = evalFrom M ?m.8226 x
⊢ {a} * {b}∗ * {c} ≤ accepts M

tactic: rw [Language.mem_mul] at hy
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
a b c : List α
hx : x = a ++ b ++ c
hlen : List.length a + List.length b ≤ Fintype.card σ
hnil : b ≠ []
hb : evalFrom M (evalFrom M ?m.8226 a) b = evalFrom M ?m.8226 a
hc : evalFrom M (evalFrom M ?m.8226 a) c = evalFrom M ?m.8226 x
y : List α
hy : y ∈ {a} * {b}∗ * {c}
⊢ y ∈ accepts M

tactic: rcases hy with ⟨ab, c', hab, hc', rfl⟩
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
a b c : List α
hx : x = a ++ b ++ c
hlen : List.length a + List.length b ≤ Fintype.card σ
hnil : b ≠ []
hb : evalFrom M (evalFrom M ?m.8226 a) b = evalFrom M ?m.8226 a
hc : evalFrom M (evalFrom M ?m.8226 a) c = evalFrom M ?m.8226 x
y : List α
hy : ∃ a_1 b_1, a_1 ∈ {a} * {b}∗ ∧ b_1 ∈ {c} ∧ a_1 ++ b_1 = y
⊢ y ∈ accepts M

tactic: rw [Language.mem_mul] at hab
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
a b c : List α
hx : x = a ++ b ++ c
hlen : List.length a + List.length b ≤ Fintype.card σ
hnil : b ≠ []
hb : evalFrom M (evalFrom M ?m.8226 a) b = evalFrom M ?m.8226 a
hc : evalFrom M (evalFrom M ?m.8226 a) c = evalFrom M ?m.8226 x
ab c' : List α
hab : ab ∈ {a} * {b}∗
hc' : c' ∈ {c}
⊢ ab ++ c' ∈ accepts M

tactic: rcases hab with ⟨a', b', ha', hb', rfl⟩
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
a b c : List α
hx : x = a ++ b ++ c
hlen : List.length a + List.length b ≤ Fintype.card σ
hnil : b ≠ []
hb : evalFrom M (evalFrom M ?m.8226 a) b = evalFrom M ?m.8226 a
hc : evalFrom M (evalFrom M ?m.8226 a) c = evalFrom M ?m.8226 x
ab c' : List α
hab : ∃ a_1 b_1, a_1 ∈ {a} ∧ b_1 ∈ {b}∗ ∧ a_1 ++ b_1 = ab
hc' : c' ∈ {c}
⊢ ab ++ c' ∈ accepts M

tactic: rw [Set.mem_singleton_iff] at ha' hc'
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
a b c : List α
hx : x = a ++ b ++ c
hlen : List.length a + List.length b ≤ Fintype.card σ
hnil : b ≠ []
hb : evalFrom M (evalFrom M ?m.8226 a) b = evalFrom M ?m.8226 a
hc : evalFrom M (evalFrom M ?m.8226 a) c = evalFrom M ?m.8226 x
c' : List α
hc' : c' ∈ {c}
a' b' : List α
ha' : a' ∈ {a}
hb' : b' ∈ {b}∗
⊢ a' ++ b' ++ c' ∈ accepts M

tactic: substs ha' hc'
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
a b c : List α
hx : x = a ++ b ++ c
hlen : List.length a + List.length b ≤ Fintype.card σ
hnil : b ≠ []
hb : evalFrom M (evalFrom M ?m.8226 a) b = evalFrom M ?m.8226 a
hc : evalFrom M (evalFrom M ?m.8226 a) c = evalFrom M ?m.8226 x
c' : List α
hc' : c' = c
a' b' : List α
ha' : a' = a
hb' : b' ∈ {b}∗
⊢ a' ++ b' ++ c' ∈ accepts M

tactic: have h := M.evalFrom_of_pow hb hb'
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
b : List α
hnil : b ≠ []
c' a' b' : List α
hb' : b' ∈ {b}∗
hlen : List.length a' + List.length b ≤ Fintype.card σ
hb : evalFrom M (evalFrom M ?m.8226 a') b = evalFrom M ?m.8226 a'
hx : x = a' ++ b ++ c'
hc : evalFrom M (evalFrom M ?m.8226 a') c' = evalFrom M ?m.8226 x
⊢ a' ++ b' ++ c' ∈ accepts M

tactic: rwa [mem_accepts, evalFrom_of_append, evalFrom_of_append, h, hc]
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
σ : Type v
M : DFA α σ
inst✝ : Fintype σ
x : List α
hx✝ : x ∈ accepts M
hlen✝ : Fintype.card σ ≤ List.length x
b : List α
hnil : b ≠ []
c' a' b' : List α
hb' : b' ∈ {b}∗
hlen : List.length a' + List.length b ≤ Fintype.card σ
hb : evalFrom M (evalFrom M ?m.8226 a') b = evalFrom M ?m.8226 a'
hx : x = a' ++ b ++ c'
hc : evalFrom M (evalFrom M ?m.8226 a') c' = evalFrom M ?m.8226 x
h : evalFrom M (evalFrom M ?m.8226 a') b' = evalFrom M ?m.8226 a'
⊢ a' ++ b' ++ c' ∈ accepts M