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

tactic: induction P generalizing x with
| zero =>
  rw [zero_def, zero_rmatch]
  tauto
| epsilon =>
  rw [one_def, one_rmatch_iff, matches'_epsilon, Language.mem_one]
| char =>
  rw [char_rmatch_iff]
  rfl
| plus _ _ ih₁ ih₂ =>
  rw [plus_def, add_rmatch_iff, ih₁, ih₂]
  rfl
| comp P Q ih₁ ih₂ =>
  simp only [comp_def, mul_rmatch_iff, matches'_mul, Language.mem_mul, *]
  tauto
| star _ ih =>
  simp only [star_rmatch_iff, matches'_star, ih, Language.mem_kstar_iff_exists_nonempty, and_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
P : RegularExpression α
x : List α
⊢ P.rmatch x = true ↔ x ∈ P.matches'
state_after: no goals

tactic: rw [zero_def, zero_rmatch]
state_before: case zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ zero.rmatch x = true ↔ x ∈ zero.matches'
state_after: case zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ false = true ↔ x ∈ matches' 0

tactic: tauto
state_before: case zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ false = true ↔ x ∈ matches' 0
state_after: no goals

tactic: rw [one_def, one_rmatch_iff, matches'_epsilon, Language.mem_one]
state_before: case epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ epsilon.rmatch x = true ↔ x ∈ epsilon.matches'
state_after: no goals

tactic: rw [char_rmatch_iff]
state_before: case char
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ (char a✝).rmatch x = true ↔ x ∈ (char a✝).matches'
state_after: case char
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ x = [a✝] ↔ x ∈ (char a✝).matches'

tactic: rfl
state_before: case char
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ x = [a✝] ↔ x ∈ (char a✝).matches'
state_after: no goals

tactic: rw [plus_def, add_rmatch_iff, ih₁, ih₂]
state_before: case plus
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
ih₁ : ∀ (x : List α), a✝¹.rmatch x = true ↔ x ∈ a✝¹.matches'
ih₂ : ∀ (x : List α), a✝.rmatch x = true ↔ x ∈ a✝.matches'
x : List α
⊢ (a✝¹.plus a✝).rmatch x = true ↔ x ∈ (a✝¹.plus a✝).matches'
state_after: case plus
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
ih₁ : ∀ (x : List α), a✝¹.rmatch x = true ↔ x ∈ a✝¹.matches'
ih₂ : ∀ (x : List α), a✝.rmatch x = true ↔ x ∈ a✝.matches'
x : List α
⊢ x ∈ a✝¹.matches' ∨ x ∈ a✝.matches' ↔ x ∈ (a✝¹ + a✝).matches'

tactic: rfl
state_before: case plus
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
a✝¹ a✝ : RegularExpression α
ih₁ : ∀ (x : List α), a✝¹.rmatch x = true ↔ x ∈ a✝¹.matches'
ih₂ : ∀ (x : List α), a✝.rmatch x = true ↔ x ∈ a✝.matches'
x : List α
⊢ x ∈ a✝¹.matches' ∨ x ∈ a✝.matches' ↔ x ∈ (a✝¹ + a✝).matches'
state_after: no goals

tactic: simp only [comp_def, mul_rmatch_iff, matches'_mul, Language.mem_mul, *]
state_before: case comp
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), P.rmatch x = true ↔ x ∈ P.matches'
ih₂ : ∀ (x : List α), Q.rmatch x = true ↔ x ∈ Q.matches'
x : List α
⊢ (P.comp Q).rmatch x = true ↔ x ∈ (P.comp Q).matches'
state_after: case comp
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), P.rmatch x = true ↔ x ∈ P.matches'
ih₂ : ∀ (x : List α), Q.rmatch x = true ↔ x ∈ Q.matches'
x : List α
⊢ (∃ t u, x = t ++ u ∧ t ∈ P.matches' ∧ u ∈ Q.matches') ↔ ∃ a ∈ P.matches', ∃ b ∈ Q.matches', a ++ b = x

tactic: tauto
state_before: case comp
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
P Q : RegularExpression α
ih₁ : ∀ (x : List α), P.rmatch x = true ↔ x ∈ P.matches'
ih₂ : ∀ (x : List α), Q.rmatch x = true ↔ x ∈ Q.matches'
x : List α
⊢ (∃ t u, x = t ++ u ∧ t ∈ P.matches' ∧ u ∈ Q.matches') ↔ ∃ a ∈ P.matches', ∃ b ∈ Q.matches', a ++ b = x
state_after: no goals

tactic: simp only [star_rmatch_iff, matches'_star, ih, Language.mem_kstar_iff_exists_nonempty, and_comm]
state_before: case star
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
a✝ : RegularExpression α
ih : ∀ (x : List α), a✝.rmatch x = true ↔ x ∈ a✝.matches'
x : List α
⊢ a✝.star.rmatch x = true ↔ x ∈ a✝.star.matches'
state_after: no goals