Theorem: RegularExpression.rmatch_iff_matches'
File: Mathlib/Computability/RegularExpressions.lean

tactic: intro x
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P : RegularExpression α
⊢ ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P

tactic: induction P generalizing x
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P : RegularExpression α
x : List α
⊢ rmatch P x = true ↔ x ∈ matches' P

tactic: all_goals
  try rw [zero_def]
  try rw [one_def]
  try rw [plus_def]
  try rw [comp_def]
state_before: case zero
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch zero x = true ↔ x ∈ matches' zero

case epsilon
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch epsilon x = true ↔ x ∈ matches' epsilon

case char
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)

case plus
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (plus a✝¹ a✝) x = true ↔ x ∈ matches' (plus a✝¹ a✝)

case comp
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (comp a✝¹ a✝) x = true ↔ x ∈ matches' (comp a✝¹ a✝)

case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: case zero =>
  rw [zero_rmatch]
  tauto
state_before: case zero
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = true ↔ x ∈ matches' 0

case epsilon
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1

case char
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)

case plus
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ + a✝) x = true ↔ x ∈ matches' (a✝¹ + a✝)

case comp
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ * a✝) x = true ↔ x ∈ matches' (a✝¹ * a✝)

case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: case epsilon =>
  rw [one_rmatch_iff]
  rfl
state_before: case epsilon
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1

case char
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)

case plus
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ + a✝) x = true ↔ x ∈ matches' (a✝¹ + a✝)

case comp
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ * a✝) x = true ↔ x ∈ matches' (a✝¹ * a✝)

case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: case char =>
  rw [char_rmatch_iff]
  rfl
state_before: case char
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)

case plus
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ + a✝) x = true ↔ x ∈ matches' (a✝¹ + a✝)

case comp
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ * a✝) x = true ↔ x ∈ matches' (a✝¹ * a✝)

case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: case plus _ _ ih₁ ih₂ =>
  rw [add_rmatch_iff, ih₁, ih₂]
  rfl
state_before: case plus
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ + a✝) x = true ↔ x ∈ matches' (a✝¹ + a✝)

case comp
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
a_ih✝¹ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ * a✝) x = true ↔ x ∈ matches' (a✝¹ * a✝)

case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: try rw [zero_def]
state_before: case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: try rw [one_def]
state_before: case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: try rw [plus_def]
state_before: case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: try rw [comp_def]
state_before: case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: rw [zero_def]
state_before: case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: rw [one_def]
state_before: case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: rw [plus_def]
state_before: case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: rw [comp_def]
state_before: case star
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
a_ih✝ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: rw [zero_rmatch]
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = true ↔ x ∈ matches' 0

tactic: tauto
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ false = true ↔ x ∈ matches' 0

tactic: rw [one_rmatch_iff]
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1

tactic: rfl
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
x : List α
⊢ x = [] ↔ x ∈ matches' 1

tactic: rw [char_rmatch_iff]
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)

tactic: rfl
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ x = [a✝] ↔ x ∈ matches' (char a✝)

tactic: rw [add_rmatch_iff, ih₁, ih₂]
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
ih₁ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
ih₂ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (a✝¹ + a✝) x = true ↔ x ∈ matches' (a✝¹ + a✝)

tactic: rfl
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
ih₁ : ∀ (x : List α), rmatch a✝¹ x = true ↔ x ∈ matches' a✝¹
ih₂ : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ x ∈ matches' a✝¹ ∨ x ∈ matches' a✝ ↔ x ∈ matches' (a✝¹ + a✝)

tactic: simp only [mul_rmatch_iff, comp_def, Language.mul_def, exists_and_left, Set.mem_image2,
  Set.image_prod]
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x : List α
⊢ rmatch (P * Q) x = true ↔ x ∈ matches' (P * Q)

tactic: constructor
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x : List α
⊢ (∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true) ↔ x ∈ matches' (P * Q)

tactic: rintro ⟨x, y, hsum, hmatch₁, hmatch₂⟩
state_before: case mp
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x : List α
⊢ (∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true) → x ∈ matches' (P * Q)

tactic: rw [ih₁] at hmatch₁
state_before: case mp.intro.intro.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x✝ x y : List α
hsum : x✝ = x ++ y
hmatch₁ : rmatch P x = true
hmatch₂ : rmatch Q y = true
⊢ x✝ ∈ matches' (P * Q)

tactic: rw [ih₂] at hmatch₂
state_before: case mp.intro.intro.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x✝ x y : List α
hsum : x✝ = x ++ y
hmatch₁ : x ∈ matches' P
hmatch₂ : rmatch Q y = true
⊢ x✝ ∈ matches' (P * Q)

tactic: exact ⟨x, y, hmatch₁, hmatch₂, hsum.symm⟩
state_before: case mp.intro.intro.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x✝ x y : List α
hsum : x✝ = x ++ y
hmatch₁ : x ∈ matches' P
hmatch₂ : y ∈ matches' Q
⊢ x✝ ∈ matches' (P * Q)

tactic: rintro ⟨x, y, hmatch₁, hmatch₂, hsum⟩
state_before: case mpr
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x : List α
⊢ x ∈ matches' (P * Q) → ∃ t u, x = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: rw [← ih₁] at hmatch₁
state_before: case mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x✝ x y : List α
hmatch₁ : x ∈ matches' P
hmatch₂ : y ∈ matches' Q
hsum : (fun x x_1 => x ++ x_1) x y = x✝
⊢ ∃ t u, x✝ = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: rw [← ih₂] at hmatch₂
state_before: case mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x✝ x y : List α
hmatch₁ : rmatch P x = true
hmatch₂ : y ∈ matches' Q
hsum : (fun x x_1 => x ++ x_1) x y = x✝
⊢ ∃ t u, x✝ = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: exact ⟨x, y, hsum.symm, hmatch₁, hmatch₂⟩
state_before: case mpr.intro.intro.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), rmatch P x = true ↔ x ∈ matches' P
ih₂ : ∀ (x : List α), rmatch Q x = true ↔ x ∈ matches' Q
x✝ x y : List α
hmatch₁ : rmatch P x = true
hmatch₂ : rmatch Q y = true
hsum : (fun x x_1 => x ++ x_1) x y = x✝
⊢ ∃ t u, x✝ = t ++ u ∧ rmatch P t = true ∧ rmatch Q u = true

tactic: rw [star_rmatch_iff]
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ rmatch (star a✝) x = true ↔ x ∈ matches' (star a✝)

tactic: simp only [ne_eq, matches', Language.kstar_def_nonempty, mem_setOf_eq]
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ (∃ S, x = join S ∧ ∀ (t : List α), t ∈ S → t ≠ [] ∧ rmatch a✝ t = true) ↔ x ∈ matches' (star a✝)

tactic: constructor
state_before: α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ (∃ S, x = join S ∧ ∀ (t : List α), t ∈ S → ¬t = [] ∧ rmatch a✝ t = true) ↔
    x ∈ {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ matches' a✝ ∧ ¬y = []}

tactic: all_goals
  rintro ⟨S, hx, hS⟩
  refine' ⟨S, hx, _⟩
  intro y
  specialize hS y
state_before: case mp
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ (∃ S, x = join S ∧ ∀ (t : List α), t ∈ S → ¬t = [] ∧ rmatch a✝ t = true) →
    x ∈ {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ matches' a✝ ∧ ¬y = []}

case mpr
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ x ∈ {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ matches' a✝ ∧ ¬y = []} →
    ∃ S, x = join S ∧ ∀ (t : List α), t ∈ S → ¬t = [] ∧ rmatch a✝ t = true

tactic: rintro ⟨S, hx, hS⟩
state_before: case mpr
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
⊢ x ∈ {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ matches' a✝ ∧ ¬y = []} →
    ∃ S, x = join S ∧ ∀ (t : List α), t ∈ S → ¬t = [] ∧ rmatch a✝ t = true

tactic: refine' ⟨S, hx, _⟩
state_before: case mpr.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
S : List (List α)
hx : x = join S
hS : ∀ (y : List α), y ∈ S → y ∈ matches' a✝ ∧ ¬y = []
⊢ ∃ S, x = join S ∧ ∀ (t : List α), t ∈ S → ¬t = [] ∧ rmatch a✝ t = true

tactic: intro y
state_before: case mpr.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
S : List (List α)
hx : x = join S
hS : ∀ (y : List α), y ∈ S → y ∈ matches' a✝ ∧ ¬y = []
⊢ ∀ (t : List α), t ∈ S → ¬t = [] ∧ rmatch a✝ t = true

tactic: specialize hS y
state_before: case mpr.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
S : List (List α)
hx : x = join S
hS : ∀ (y : List α), y ∈ S → y ∈ matches' a✝ ∧ ¬y = []
y : List α
⊢ y ∈ S → ¬y = [] ∧ rmatch a✝ y = true

tactic: rw [← ih y]
state_before: case mp.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
S : List (List α)
hx : x = join S
y : List α
hS : y ∈ S → ¬y = [] ∧ rmatch a✝ y = true
⊢ y ∈ S → y ∈ matches' a✝ ∧ ¬y = []

tactic: tauto
state_before: case mp.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
S : List (List α)
hx : x = join S
y : List α
hS : y ∈ S → ¬y = [] ∧ rmatch a✝ y = true
⊢ y ∈ S → rmatch a✝ y = true ∧ ¬y = []

tactic: rw [ih y]
state_before: case mpr.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
S : List (List α)
hx : x = join S
y : List α
hS : y ∈ S → y ∈ matches' a✝ ∧ ¬y = []
⊢ y ∈ S → ¬y = [] ∧ rmatch a✝ y = true

tactic: tauto
state_before: case mpr.intro.intro
α : Type u_1
β : Type ?u.80627
γ : Type ?u.80630
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), rmatch a✝ x = true ↔ x ∈ matches' a✝
x : List α
S : List (List α)
hx : x = join S
y : List α
hS : y ∈ S → y ∈ matches' a✝ ∧ ¬y = []
⊢ y ∈ S → ¬y = [] ∧ y ∈ matches' a✝