l3lab/ntp-mathlib huggingface dataset:
theorem star_rmatch_iff (P : RegularExpression α) :
    ∀ x : List α, (star P).rmatch x ↔ ∃ S : List (List α), x
          = S.join ∧ ∀ t ∈ S, t ≠ [] ∧ P.rmatch t :=
  fun x => by
    have A : ∀ m n : ℕ, n < m + n + 1 := by
      intro m n
      convert add_lt_add_of_le_of_lt (add_le_add (zero_le m) (le_refl n)) zero_lt_one
      simp
    have IH := fun t (_h : List.length t < List.length x) => star_rmatch_iff P t
    clear star_rmatch_iff
    constructor
    · cases' x with a x
      · intro _h
        use []; dsimp; tauto
      · rw [rmatch, deriv, mul_rmatch_iff]
        rintro ⟨t, u, hs, ht, hu⟩
        have hwf : u.length < (List.cons a x).length := by
          rw [hs, List.length_cons, List.length_append]
          apply A
        rw [IH _ hwf] at hu
        rcases hu with ⟨S', hsum, helem⟩
        use (a :: t) :: S'
        constructor
        · simp [hs, hsum]
        · intro t' ht'
          cases ht'
          case head ht' =>
            simp only [ne_eq, not_false_iff, true_and, rmatch]
            exact ht
          case tail ht' => exact helem t' ht'
    · rintro ⟨S, hsum, helem⟩
      cases' x with a x
      · rfl
      · rw [rmatch, deriv, mul_rmatch_iff]
        cases' S with t' U
        · exact ⟨[], [], by tauto⟩
        · cases' t' with b t
          · simp only [forall_eq_or_imp, List.mem_cons] at helem
            simp only [eq_self_iff_true, not_true, Ne.def, false_and_iff] at helem
          simp only [List.join, List.cons_append, List.cons_eq_cons] at hsum
          refine' ⟨t, U.join, hsum.2, _, _⟩
          · specialize helem (b :: t) (by simp)
            rw [rmatch] at helem
            convert helem.2
            exact hsum.1
          · have hwf : U.join.length < (List.cons a x).length := by
              rw [hsum.1, hsum.2]
              simp only [List.length_append, List.length_join, List.length]
              apply A
            

Proof state:
case mpr.intro.intro.cons.cons.cons.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a✝ b✝ : α
P : RegularExpression α
A : ∀ (m n : ℕ), n < m + n + 1
a : α
x : List α
IH :
  ∀ (t : List α),
    length t < length (a :: x) → (rmatch (star P) t = true ↔ ∃ S, t = join S ∧ ∀ t ∈ S, t ≠ [] ∧ rmatch P t = true)
U : List (List α)
b : α
t : List α
helem : ∀ t_1 ∈ (b :: t) :: U, t_1 ≠ [] ∧ rmatch P t_1 = true
hsum : a = b ∧ x = t ++ join U
hwf : length (join U) < length (a :: x)
⊢ rmatch (star P) (join U) = true

Next tactic:
rw [IH _ hwf]
theorem star_rmatch_iff (P : RegularExpression α) :
    ∀ x : List α, (star P).rmatch x ↔ ∃ S : List (List α), x
          = S.join ∧ ∀ t ∈ S, t ≠ [] ∧ P.rmatch t :=
  fun x => by
    have A : ∀ m n : ℕ, n < m + n + 1 := by
      intro m n
      convert add_lt_add_of_le_of_lt (add_le_add (zero_le m) (le_refl n)) zero_lt_one
      simp
    have IH := fun t (_h : List.length t < List.length x) => star_rmatch_iff P t
    clear star_rmatch_iff
    constructor
    · cases' x with a x
      · intro _h
        use []; dsimp; tauto
      · rw [rmatch, deriv, mul_rmatch_iff]
        rintro ⟨t, u, hs, ht, hu⟩
        have hwf : u.length < (List.cons a x).length := by
          rw [hs, List.length_cons, List.length_append]
          apply A
        rw [IH _ hwf] at hu
        rcases hu with ⟨S', hsum, helem⟩
        use (a :: t) :: S'
        constructor
        · simp [hs, hsum]
        · intro t' ht'
          cases ht'
          case head ht' =>
            simp only [ne_eq, not_false_iff, true_and, rmatch]
            exact ht
          case tail ht' => exact helem t' ht'
    · rintro ⟨S, hsum, helem⟩
      cases' x with a x
      · rfl
      · rw [rmatch, deriv, mul_rmatch_iff]
        cases' S with t' U
        · exact ⟨[], [], by tauto⟩
        · cases' t' with b t
          · simp only [forall_eq_or_imp, List.mem_cons] at helem
            simp only [eq_self_iff_true, not_true, Ne.def, false_and_iff] at helem
          simp only [List.join, List.cons_append, List.cons_eq_cons] at hsum
          refine' ⟨t, U.join, hsum.2, _, _⟩
          · specialize helem (b :: t) (by simp)
            rw [rmatch] at helem
            convert helem.2
            exact hsum.1
          · have hwf : U.join.length < (List.cons a x).length := by
              rw [hsum.1, hsum.2]
              simp only [List.length_append, List.length_join, List.length]
              apply A
            rw [IH _ hwf]
            

Proof state:
case mpr.intro.intro.cons.cons.cons.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a✝ b✝ : α
P : RegularExpression α
A : ∀ (m n : ℕ), n < m + n + 1
a : α
x : List α
IH :
  ∀ (t : List α),
    length t < length (a :: x) → (rmatch (star P) t = true ↔ ∃ S, t = join S ∧ ∀ t ∈ S, t ≠ [] ∧ rmatch P t = true)
U : List (List α)
b : α
t : List α
helem : ∀ t_1 ∈ (b :: t) :: U, t_1 ≠ [] ∧ rmatch P t_1 = true
hsum : a = b ∧ x = t ++ join U
hwf : length (join U) < length (a :: x)
⊢ ∃ S, join U = join S ∧ ∀ t ∈ S, t ≠ [] ∧ rmatch P t = true

Next tactic:
refine' ⟨U, rfl, fun t h => helem t _⟩
theorem star_rmatch_iff (P : RegularExpression α) :
    ∀ x : List α, (star P).rmatch x ↔ ∃ S : List (List α), x
          = S.join ∧ ∀ t ∈ S, t ≠ [] ∧ P.rmatch t :=
  fun x => by
    have A : ∀ m n : ℕ, n < m + n + 1 := by
      intro m n
      convert add_lt_add_of_le_of_lt (add_le_add (zero_le m) (le_refl n)) zero_lt_one
      simp
    have IH := fun t (_h : List.length t < List.length x) => star_rmatch_iff P t
    clear star_rmatch_iff
    constructor
    · cases' x with a x
      · intro _h
        use []; dsimp; tauto
      · rw [rmatch, deriv, mul_rmatch_iff]
        rintro ⟨t, u, hs, ht, hu⟩
        have hwf : u.length < (List.cons a x).length := by
          rw [hs, List.length_cons, List.length_append]
          apply A
        rw [IH _ hwf] at hu
        rcases hu with ⟨S', hsum, helem⟩
        use (a :: t) :: S'
        constructor
        · simp [hs, hsum]
        · intro t' ht'
          cases ht'
          case head ht' =>
            simp only [ne_eq, not_false_iff, true_and, rmatch]
            exact ht
          case tail ht' => exact helem t' ht'
    · rintro ⟨S, hsum, helem⟩
      cases' x with a x
      · rfl
      · rw [rmatch, deriv, mul_rmatch_iff]
        cases' S with t' U
        · exact ⟨[], [], by tauto⟩
        · cases' t' with b t
          · simp only [forall_eq_or_imp, List.mem_cons] at helem
            simp only [eq_self_iff_true, not_true, Ne.def, false_and_iff] at helem
          simp only [List.join, List.cons_append, List.cons_eq_cons] at hsum
          refine' ⟨t, U.join, hsum.2, _, _⟩
          · specialize helem (b :: t) (by simp)
            rw [rmatch] at helem
            convert helem.2
            exact hsum.1
          · have hwf : U.join.length < (List.cons a x).length := by
              rw [hsum.1, hsum.2]
              simp only [List.length_append, List.length_join, List.length]
              apply A
            rw [IH _ hwf]
            refine' ⟨U, rfl, fun t h => helem t _⟩
            

Proof state:
case mpr.intro.intro.cons.cons.cons.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a✝ b✝ : α
P : RegularExpression α
A : ∀ (m n : ℕ), n < m + n + 1
a : α
x : List α
IH :
  ∀ (t : List α),
    length t < length (a :: x) → (rmatch (star P) t = true ↔ ∃ S, t = join S ∧ ∀ t ∈ S, t ≠ [] ∧ rmatch P t = true)
U : List (List α)
b : α
t✝ : List α
helem : ∀ t ∈ (b :: t✝) :: U, t ≠ [] ∧ rmatch P t = true
hsum : a = b ∧ x = t✝ ++ join U
hwf : length (join U) < length (a :: x)
t : List α
h : t ∈ U
⊢ t ∈ (b :: t✝) :: U

Next tactic:
right
theorem star_rmatch_iff (P : RegularExpression α) :
    ∀ x : List α, (star P).rmatch x ↔ ∃ S : List (List α), x
          = S.join ∧ ∀ t ∈ S, t ≠ [] ∧ P.rmatch t :=
  fun x => by
    have A : ∀ m n : ℕ, n < m + n + 1 := by
      intro m n
      convert add_lt_add_of_le_of_lt (add_le_add (zero_le m) (le_refl n)) zero_lt_one
      simp
    have IH := fun t (_h : List.length t < List.length x) => star_rmatch_iff P t
    clear star_rmatch_iff
    constructor
    · cases' x with a x
      · intro _h
        use []; dsimp; tauto
      · rw [rmatch, deriv, mul_rmatch_iff]
        rintro ⟨t, u, hs, ht, hu⟩
        have hwf : u.length < (List.cons a x).length := by
          rw [hs, List.length_cons, List.length_append]
          apply A
        rw [IH _ hwf] at hu
        rcases hu with ⟨S', hsum, helem⟩
        use (a :: t) :: S'
        constructor
        · simp [hs, hsum]
        · intro t' ht'
          cases ht'
          case head ht' =>
            simp only [ne_eq, not_false_iff, true_and, rmatch]
            exact ht
          case tail ht' => exact helem t' ht'
    · rintro ⟨S, hsum, helem⟩
      cases' x with a x
      · rfl
      · rw [rmatch, deriv, mul_rmatch_iff]
        cases' S with t' U
        · exact ⟨[], [], by tauto⟩
        · cases' t' with b t
          · simp only [forall_eq_or_imp, List.mem_cons] at helem
            simp only [eq_self_iff_true, not_true, Ne.def, false_and_iff] at helem
          simp only [List.join, List.cons_append, List.cons_eq_cons] at hsum
          refine' ⟨t, U.join, hsum.2, _, _⟩
          · specialize helem (b :: t) (by simp)
            rw [rmatch] at helem
            convert helem.2
            exact hsum.1
          · have hwf : U.join.length < (List.cons a x).length := by
              rw [hsum.1, hsum.2]
              simp only [List.length_append, List.length_join, List.length]
              apply A
            rw [IH _ hwf]
            refine' ⟨U, rfl, fun t h => helem t _⟩
            right
            

Proof state:
case mpr.intro.intro.cons.cons.cons.refine'_2.a
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a✝ b✝ : α
P : RegularExpression α
A : ∀ (m n : ℕ), n < m + n + 1
a : α
x : List α
IH :
  ∀ (t : List α),
    length t < length (a :: x) → (rmatch (star P) t = true ↔ ∃ S, t = join S ∧ ∀ t ∈ S, t ≠ [] ∧ rmatch P t = true)
U : List (List α)
b : α
t✝ : List α
helem : ∀ t ∈ (b :: t✝) :: U, t ≠ [] ∧ rmatch P t = true
hsum : a = b ∧ x = t✝ ++ join U
hwf : length (join U) < length (a :: x)
t : List α
h : t ∈ U
⊢ Mem t U

Next tactic:
assumption
@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) :
    ∀ x : List α, P.rmatch x ↔ x ∈ P.matches' := by
  

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

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

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

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

Proof state:
case zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch zero x = true ↔ x ∈ matches' zero
case epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch epsilon x = true ↔ x ∈ matches' epsilon
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 (plus a✝¹ a✝) x = true ↔ x ∈ matches' (plus 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 (comp a✝¹ a✝) x = true ↔ x ∈ matches' (comp 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:
all_goals
    try rw [zero_def]
    try rw [one_def]
    try rw [plus_def]
    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
    

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

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 zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch zero x = true ↔ x ∈ matches' zero

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 zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = true ↔ x ∈ matches' 0

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 zero
α : 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 [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 zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = true ↔ x ∈ matches' 0

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 zero
α : 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 [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 zero
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = true ↔ x ∈ matches' 0

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 zero
α : 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 [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 epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch epsilon x = true ↔ x ∈ matches' epsilon

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 epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch epsilon x = true ↔ x ∈ matches' epsilon

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 epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch epsilon x = true ↔ x ∈ matches' epsilon

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 epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch epsilon x = true ↔ x ∈ matches' epsilon

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 epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1

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 epsilon
α : 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 [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 epsilon
α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 1 x = true ↔ x ∈ matches' 1

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 epsilon
α : 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 [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 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✝)

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 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✝)

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 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✝)

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 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✝)

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 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✝)

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 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✝)

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 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✝)

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 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✝)

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 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:
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 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 [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 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:
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 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 [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 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:
try rw [plus_def]