Theorem: RegularExpression.mul_rmatch_iff
File: Mathlib/Computability/RegularExpressions.lean

tactic: induction' x with a x ih generalizing P Q
state_before: α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P Q : RegularExpression α
x : List α
⊢ rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: rw [rmatch]
state_before: case nil
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
⊢ rmatch (P * Q) [] = true ↔ ∃ t u, [] = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: simp only [matchEpsilon]
state_before: case nil
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
⊢ matchEpsilon (P * Q) = true ↔ ∃ t u, [] = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: constructor
state_before: case nil
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
⊢ (matchEpsilon P && matchEpsilon Q) = true ↔ ∃ t u, [] = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: intro h
state_before: case nil.mp
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
⊢ (matchEpsilon P && matchEpsilon Q) = true → ∃ t u, [] = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: refine' ⟨[], [], rfl, _⟩
state_before: case nil.mp
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
h : (matchEpsilon P && matchEpsilon Q) = true
⊢ ∃ t u, [] = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: rw [rmatch, rmatch]
state_before: case nil.mp
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
h : (matchEpsilon P && matchEpsilon Q) = true
⊢ rmatch P [] = true ∧ rmatch Q [] = true

tactic: rwa [Bool.and_coe_iff] at h
state_before: case nil.mp
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
h : (matchEpsilon P && matchEpsilon Q) = true
⊢ matchEpsilon P = true ∧ matchEpsilon Q = true

tactic: rintro ⟨t, u, h₁, h₂⟩
state_before: case nil.mpr
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
⊢ (∃ t u, [] = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true) → (matchEpsilon P && matchEpsilon Q) = true

tactic: cases' List.append_eq_nil.1 h₁.symm with ht hu
state_before: case nil.mpr.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
t u : List α
h₁ : [] = t ++ u
h₂ : rmatch P t = true ∧ rmatch Q u = true
⊢ (matchEpsilon P && matchEpsilon Q) = true

tactic: subst ht
state_before: case nil.mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
t u : List α
h₁ : [] = t ++ u
h₂ : rmatch P t = true ∧ rmatch Q u = true
ht : t = []
hu : u = []
⊢ (matchEpsilon P && matchEpsilon Q) = true

tactic: subst hu
state_before: case nil.mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
u : List α
hu : u = []
h₁ : [] = [] ++ u
h₂ : rmatch P [] = true ∧ rmatch Q u = true
⊢ (matchEpsilon P && matchEpsilon Q) = true

tactic: repeat' rw [rmatch] at h₂
state_before: case nil.mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
h₁ : [] = [] ++ []
h₂ : rmatch P [] = true ∧ rmatch Q [] = true
⊢ (matchEpsilon P && matchEpsilon Q) = true

tactic: simp [h₂]
state_before: case nil.mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
h₁ : [] = [] ++ []
h₂ : matchEpsilon P = true ∧ matchEpsilon Q = true
⊢ (matchEpsilon P && matchEpsilon Q) = true

tactic: rw [rmatch] at h₂
state_before: case nil.mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a b : α
P✝ Q✝ P Q : RegularExpression α
h₁ : [] = [] ++ []
h₂ : matchEpsilon P = true ∧ matchEpsilon Q = true
⊢ (matchEpsilon P && matchEpsilon Q) = true

tactic: rw [rmatch]
state_before: case cons
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
⊢ rmatch (P * Q) (a :: x) = true ↔ ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: simp [deriv]
state_before: case cons
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
⊢ rmatch (deriv (P * Q) a) x = true ↔ ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: split_ifs with hepsilon
state_before: case cons
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
⊢ rmatch (if matchEpsilon P = true then deriv P a * Q + deriv Q a else deriv P a * Q) x = true ↔
    ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: rw [add_rmatch_iff, ih]
state_before: case cons.inl
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
⊢ rmatch (deriv P a * Q + deriv Q a) x = true ↔ ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: constructor
state_before: case cons.inl
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
⊢ (∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true) ∨ rmatch (deriv Q a) x = true ↔
    ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: rintro (⟨t, u, _⟩ | h)
state_before: case cons.inl.mp
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
⊢ (∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true) ∨ rmatch (deriv Q a) x = true →
    ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: exact ⟨a :: t, u, by tauto⟩
state_before: case cons.inl.mp.inl.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
t u : List α
h✝ : x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true
⊢ ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: tauto
state_before: α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
t u : List α
h✝ : x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true
⊢ a :: x = a :: t ++ u ∧ rmatch P (a :: t) = true ∧ rmatch Q u = true

tactic: exact ⟨[], a :: x, rfl, hepsilon, h⟩
state_before: case cons.inl.mp.inr
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
h : rmatch (deriv Q a) x = true
⊢ ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: rintro ⟨t, u, h, hP, hQ⟩
state_before: case cons.inl.mpr
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
⊢ (∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true) →
    (∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true) ∨ rmatch (deriv Q a) x = true

tactic: cases' t with b t
state_before: case cons.inl.mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
t u : List α
h : a :: x = t ++ u
hP : rmatch P t = true
hQ : rmatch Q u = true
⊢ (∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true) ∨ rmatch (deriv Q a) x = true

tactic: right
state_before: case cons.inl.mpr.intro.intro.intro.intro.nil
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
h : a :: x = [] ++ u
hP : rmatch P [] = true
⊢ (∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true) ∨ rmatch (deriv Q a) x = true

tactic: rw [List.nil_append] at h
state_before: case cons.inl.mpr.intro.intro.intro.intro.nil.h
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
h : a :: x = [] ++ u
hP : rmatch P [] = true
⊢ rmatch (deriv Q a) x = true

tactic: rw [← h] at hQ
state_before: case cons.inl.mpr.intro.intro.intro.intro.nil.h
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
h : a :: x = u
hP : rmatch P [] = true
⊢ rmatch (deriv Q a) x = true

tactic: exact hQ
state_before: case cons.inl.mpr.intro.intro.intro.intro.nil.h
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q (a :: x) = true
h : a :: x = u
hP : rmatch P [] = true
⊢ rmatch (deriv Q a) x = true

tactic: left
state_before: case cons.inl.mpr.intro.intro.intro.intro.cons
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a :: x = b :: t ++ u
hP : rmatch P (b :: t) = true
⊢ (∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true) ∨ rmatch (deriv Q a) x = true

tactic: rw [List.cons_append, List.cons_eq_cons] at h
state_before: case cons.inl.mpr.intro.intro.intro.intro.cons.h
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a :: x = b :: t ++ u
hP : rmatch P (b :: t) = true
⊢ ∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true

tactic: refine' ⟨t, u, h.2, _, hQ⟩
state_before: case cons.inl.mpr.intro.intro.intro.intro.cons.h
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a = b ∧ x = t ++ u
hP : rmatch P (b :: t) = true
⊢ ∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true

tactic: rw [rmatch] at hP
state_before: case cons.inl.mpr.intro.intro.intro.intro.cons.h
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a = b ∧ x = t ++ u
hP : rmatch P (b :: t) = true
⊢ rmatch (deriv P a) t = true

tactic: convert hP
state_before: case cons.inl.mpr.intro.intro.intro.intro.cons.h
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a = b ∧ x = t ++ u
hP : rmatch (deriv P b) t = true
⊢ rmatch (deriv P a) t = true

tactic: exact h.1
state_before: case h.e'_2.h.e'_3.h.e'_4
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a = b ∧ x = t ++ u
hP : rmatch (deriv P b) t = true
⊢ a = b

tactic: rw [ih]
state_before: case cons.inr
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
⊢ rmatch (deriv P a * Q) x = true ↔ ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: constructor <;> rintro ⟨t, u, h, hP, hQ⟩
state_before: case cons.inr
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
⊢ (∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true) ↔
    ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: exact ⟨a :: t, u, by tauto⟩
state_before: case cons.inr.mp.intro.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
t u : List α
h : x = t ++ u
hP : rmatch (deriv P a) t = true
hQ : rmatch Q u = true
⊢ ∃ t u, a :: x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: tauto
state_before: α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
t u : List α
h : x = t ++ u
hP : rmatch (deriv P a) t = true
hQ : rmatch Q u = true
⊢ a :: x = a :: t ++ u ∧ rmatch P (a :: t) = true ∧ rmatch Q u = true

tactic: cases' t with b t
state_before: case cons.inr.mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
t u : List α
h : a :: x = t ++ u
hP : rmatch P t = true
hQ : rmatch Q u = true
⊢ ∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true

tactic: contradiction
state_before: case cons.inr.mpr.intro.intro.intro.intro.nil
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
h : a :: x = [] ++ u
hP : rmatch P [] = true
⊢ ∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true

tactic: rw [List.cons_append, List.cons_eq_cons] at h
state_before: case cons.inr.mpr.intro.intro.intro.intro.cons
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a :: x = b :: t ++ u
hP : rmatch P (b :: t) = true
⊢ ∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true

tactic: refine' ⟨t, u, h.2, _, hQ⟩
state_before: case cons.inr.mpr.intro.intro.intro.intro.cons
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a = b ∧ x = t ++ u
hP : rmatch P (b :: t) = true
⊢ ∃ t u, x = t ++ u ∧ rmatch (deriv P a) t = true ∧ rmatch Q u = true

tactic: rw [rmatch] at hP
state_before: case cons.inr.mpr.intro.intro.intro.intro.cons
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a = b ∧ x = t ++ u
hP : rmatch P (b :: t) = true
⊢ rmatch (deriv P a) t = true

tactic: convert hP
state_before: case cons.inr.mpr.intro.intro.intro.intro.cons
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a = b ∧ x = t ++ u
hP : rmatch (deriv P b) t = true
⊢ rmatch (deriv P a) t = true

tactic: exact h.1
state_before: case h.e'_2.h.e'_3.h.e'_4
α : Type u_1
β : Type ?u.43048
γ : Type ?u.43051
dec : DecidableEq α
a✝ b✝ : α
P✝ Q✝ : RegularExpression α
a : α
x : List α
ih : ∀ (P Q : RegularExpression α), rmatch (P * Q) x = true ↔ ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true
P Q : RegularExpression α
hepsilon : ¬matchEpsilon P = true
u : List α
hQ : rmatch Q u = true
b : α
t : List α
h : a = b ∧ x = t ++ u
hP : rmatch (deriv P b) t = true
⊢ a = b