l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try 

Proof state:
case plus
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [plus_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    

Proof state:
case plus
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [comp_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try 

Proof state:
case plus
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [comp_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [zero_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try 

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [zero_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [one_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try 

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [one_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [plus_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try 

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [plus_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [comp_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try 

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [comp_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    

Proof state:
case star
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [zero_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try 

Proof state:
case star
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [zero_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    

Proof state:
case star
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [one_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try 

Proof state:
case star
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [one_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    

Proof state:
case star
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [plus_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try 

Proof state:
case star
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [plus_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    

Proof state:
case star
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
try rw [comp_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try 

Proof state:
case star
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [comp_def]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  

Proof state:
case zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = true ↔ x ∈ matches' 0
case epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1
case char
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)
case plus
α : Type u_1
β : Type u_2
γ : Type u_3
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_2
γ : Type u_3
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_2
γ : Type u_3
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✝)

Next tactic:
case zero =>
    rw [zero_rmatch]
    tauto
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = true ↔ x ∈ matches' 0

Next tactic:
case zero =>
    rw [zero_rmatch]
    tauto
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = true ↔ x ∈ matches' 0

Next tactic:
rw [zero_rmatch]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ false = true ↔ x ∈ matches' 0

Next tactic:
tauto
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  

Proof state:
case epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1
case char
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)
case plus
α : Type u_1
β : Type u_2
γ : Type u_3
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_2
γ : Type u_3
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_2
γ : Type u_3
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✝)

Next tactic:
case epsilon =>
    rw [one_rmatch_iff]
    rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1

Next tactic:
case epsilon =>
    rw [one_rmatch_iff]
    rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1

Next tactic:
rw [one_rmatch_iff]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ x = [] ↔ x ∈ matches' 1

Next tactic:
rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  

Proof state:
case char
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)
case plus
α : Type u_1
β : Type u_2
γ : Type u_3
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_2
γ : Type u_3
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_2
γ : Type u_3
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✝)

Next tactic:
case char =>
    rw [char_rmatch_iff]
    rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)

Next tactic:
case char =>
    rw [char_rmatch_iff]
    rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  case char =>
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ rmatch (char a✝) x = true ↔ x ∈ matches' (char a✝)

Next tactic:
rw [char_rmatch_iff]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  case char =>
    rw [char_rmatch_iff]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b a✝ : α
x : List α
⊢ x = [a✝] ↔ x ∈ matches' (char a✝)

Next tactic:
rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  case char =>
    rw [char_rmatch_iff]
    rfl
  

Proof state:
case plus
α : Type u_1
β : Type u_2
γ : Type u_3
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_2
γ : Type u_3
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_2
γ : Type u_3
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✝)

Next tactic:
case plus _ _ ih₁ ih₂ =>
    rw [add_rmatch_iff, ih₁, ih₂]
    rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  case char =>
    rw [char_rmatch_iff]
    rfl
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
case plus _ _ ih₁ ih₂ =>
    rw [add_rmatch_iff, ih₁, ih₂]
    rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  case char =>
    rw [char_rmatch_iff]
    rfl
  case plus _ _ ih₁ ih₂ =>
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rw [add_rmatch_iff, ih₁, ih₂]
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  case char =>
    rw [char_rmatch_iff]
    rfl
  case plus _ _ ih₁ ih₂ =>
    rw [add_rmatch_iff, ih₁, ih₂]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
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✝)

Next tactic:
rfl
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  intro x
  induction P generalizing x
  all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    try rw [comp_def]
  case zero =>
    rw [zero_rmatch]
    tauto
  case epsilon =>
    rw [one_rmatch_iff]
    rfl
  case char =>
    rw [char_rmatch_iff]
    rfl
  case plus _ _ ih₁ ih₂ =>
    rw [add_rmatch_iff, ih₁, ih₂]
    rfl
  

Proof state:
case comp
α : Type u_1
β : Type u_2
γ : Type u_3
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_2
γ : Type u_3
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✝)

Next tactic:
case comp P Q ih₁ ih₂ =>
    simp only [mul_rmatch_iff, comp_def, Language.mul_def, exists_and_left, Set.mem_image2,
      Set.image_prod]
    constructor
    · rintro ⟨x, y, hsum, hmatch₁, hmatch₂⟩
      rw [ih₁] at hmatch₁
      rw [ih₂] at hmatch₂
      exact ⟨x, y, hmatch₁, hmatch₂, hsum.symm⟩
    · rintro ⟨x, y, hmatch₁, hmatch₂, hsum⟩
      rw [← ih₁] at hmatch₁
      rw [← ih₂] at hmatch₂
      exact ⟨x, y, hsum.symm, hmatch₁, hmatch₂⟩