Theorem: match_concat_EpsilonNFA_toAbstract (FOL/Parsing/RegExpToEpsilonNFA.lean)

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ (match_concat_EpsilonNFA α σ_0 σ_1 M_0 M_1).toAbstract =
    match_concat_AbstractEpsilonNFA α σ_0 σ_1 M_0.toAbstract M_1.toAbstract
Tactic:
simp only [match_concat_EpsilonNFA]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ {
        symbol_arrow_list :=
          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).symbol_arrow_list ++
            (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list,
        epsilon_arrow_list :=
          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).epsilon_arrow_list ++
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).accepting_state_list,
        starting_state_list := (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).starting_state_list,
        accepting_state_list :=
          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list }.toAbstract =
    match_concat_AbstractEpsilonNFA α σ_0 σ_1 M_0.toAbstract M_1.toAbstract

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ {
        symbol_arrow_list :=
          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).symbol_arrow_list ++
            (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list,
        epsilon_arrow_list :=
          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).epsilon_arrow_list ++
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).accepting_state_list,
        starting_state_list := (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).starting_state_list,
        accepting_state_list :=
          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list }.toAbstract =
    match_concat_AbstractEpsilonNFA α σ_0 σ_1 M_0.toAbstract M_1.toAbstract
Tactic:
simp only [EpsilonNFA.toAbstract]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ {
      symbol := fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).symbol_arrow_list ++
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list,
      epsilon := fun start_state stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).epsilon_arrow_list ++
                  (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
                List.map
                  (fun accepting_state =>
                    { start_state := accepting_state,
                      stop_state_list := (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
                  (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).accepting_state_list ∧
            stop_state ∈ stop_state_list,
      start := fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).starting_state_list,
      accepting := fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list } =
    match_concat_AbstractEpsilonNFA α σ_0 σ_1
      {
        symbol := fun start_state symbol stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
                M_0.symbol_arrow_list ∧
              stop_state ∈ stop_state_list,
        epsilon := fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧
              stop_state ∈ stop_state_list,
        start := fun state => state ∈ M_0.starting_state_list,
        accepting := fun state => state ∈ M_0.accepting_state_list }
      {
        symbol := fun start_state symbol stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
                M_1.symbol_arrow_list ∧
              stop_state ∈ stop_state_list,
        epsilon := fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧
              stop_state ∈ stop_state_list,
        start := fun state => state ∈ M_1.starting_state_list,
        accepting := fun state => state ∈ M_1.accepting_state_list }

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ {
      symbol := fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).symbol_arrow_list ++
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list,
      epsilon := fun start_state stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).epsilon_arrow_list ++
                  (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
                List.map
                  (fun accepting_state =>
                    { start_state := accepting_state,
                      stop_state_list := (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
                  (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).accepting_state_list ∧
            stop_state ∈ stop_state_list,
      start := fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).starting_state_list,
      accepting := fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list } =
    match_concat_AbstractEpsilonNFA α σ_0 σ_1
      {
        symbol := fun start_state symbol stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
                M_0.symbol_arrow_list ∧
              stop_state ∈ stop_state_list,
        epsilon := fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧
              stop_state ∈ stop_state_list,
        start := fun state => state ∈ M_0.starting_state_list,
        accepting := fun state => state ∈ M_0.accepting_state_list }
      {
        symbol := fun start_state symbol stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
                M_1.symbol_arrow_list ∧
              stop_state ∈ stop_state_list,
        epsilon := fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧
              stop_state ∈ stop_state_list,
        start := fun state => state ∈ M_1.starting_state_list,
        accepting := fun state => state ∈ M_1.accepting_state_list }
Tactic:
simp only [match_concat_AbstractEpsilonNFA]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ {
      symbol := fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).symbol_arrow_list ++
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list,
      epsilon := fun start_state stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).epsilon_arrow_list ++
                  (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
                List.map
                  (fun accepting_state =>
                    { start_state := accepting_state,
                      stop_state_list := (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
                  (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).accepting_state_list ∧
            stop_state ∈ stop_state_list,
      start := fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).starting_state_list,
      accepting := fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list } =
    {
      symbol := fun p c q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
              q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
              q' ∈ stop_state_list
        | x => False,
      epsilon := fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False,
      start := fun p =>
        match p with
        | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
        | x => False,
      accepting := fun p =>
        match p with
        | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
        | x => False }

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ {
      symbol := fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).symbol_arrow_list ++
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list,
      epsilon := fun start_state stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).epsilon_arrow_list ++
                  (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
                List.map
                  (fun accepting_state =>
                    { start_state := accepting_state,
                      stop_state_list := (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
                  (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).accepting_state_list ∧
            stop_state ∈ stop_state_list,
      start := fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).starting_state_list,
      accepting := fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list } =
    {
      symbol := fun p c q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
              q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
              q' ∈ stop_state_list
        | x => False,
      epsilon := fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False,
      start := fun p =>
        match p with
        | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
        | x => False,
      accepting := fun p =>
        match p with
        | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
        | x => False }
Tactic:
simp only [AbstractEpsilonNFA.mk.injEq]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).symbol_arrow_list ++
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list) =
      fun p c q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | x => False) ∧
    ((fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).epsilon_arrow_list ++
                    (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
                  List.map
                    (fun accepting_state =>
                      { start_state := accepting_state,
                        stop_state_list :=
                          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
                    (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).accepting_state_list ∧
              stop_state ∈ stop_state_list) =
        fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False) ∧
      ((fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).starting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
          | x => False) ∧
        (fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
          | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).symbol_arrow_list ++
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list) =
      fun p c q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | x => False) ∧
    ((fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).epsilon_arrow_list ++
                    (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
                  List.map
                    (fun accepting_state =>
                      { start_state := accepting_state,
                        stop_state_list :=
                          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
                    (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).accepting_state_list ∧
              stop_state ∈ stop_state_list) =
        fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False) ∧
      ((fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapLeft σ_1 M_0)).starting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
          | x => False) ∧
        (fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
          | x => False
Tactic:
simp only [EpsilonNFA.wrapLeft]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.map Sum.inl M_0)).symbol_arrow_list ++
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list) =
      fun p c q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | x => False) ∧
    ((fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.map Sum.inl M_0)).epsilon_arrow_list ++
                    (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
                  List.map
                    (fun accepting_state =>
                      { start_state := accepting_state,
                        stop_state_list :=
                          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
                    (EpsilonNFA.wrapRight ℕ (EpsilonNFA.map Sum.inl M_0)).accepting_state_list ∧
              stop_state ∈ stop_state_list) =
        fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False) ∧
      ((fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.map Sum.inl M_0)).starting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
          | x => False) ∧
        (fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
          | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.wrapRight ℕ (EpsilonNFA.map Sum.inl M_0)).symbol_arrow_list ++
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list) =
      fun p c q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | x => False) ∧
    ((fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈
                (EpsilonNFA.wrapRight ℕ (EpsilonNFA.map Sum.inl M_0)).epsilon_arrow_list ++
                    (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).epsilon_arrow_list ++
                  List.map
                    (fun accepting_state =>
                      { start_state := accepting_state,
                        stop_state_list :=
                          (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).starting_state_list })
                    (EpsilonNFA.wrapRight ℕ (EpsilonNFA.map Sum.inl M_0)).accepting_state_list ∧
              stop_state ∈ stop_state_list) =
        fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False) ∧
      ((fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.map Sum.inl M_0)).starting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
          | x => False) ∧
        (fun state => state ∈ (EpsilonNFA.wrapRight ℕ (EpsilonNFA.wrapRight σ_0 M_1)).accepting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
          | x => False
Tactic:
simp only [EpsilonNFA.wrapRight]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inl M_0)).symbol_arrow_list ++
                (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inr M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list) =
      fun p c q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | x => False) ∧
    ((fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈
                (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inl M_0)).epsilon_arrow_list ++
                    (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inr M_1)).epsilon_arrow_list ++
                  List.map
                    (fun accepting_state =>
                      { start_state := accepting_state,
                        stop_state_list := (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inr M_1)).starting_state_list })
                    (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inl M_0)).accepting_state_list ∧
              stop_state ∈ stop_state_list) =
        fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False) ∧
      ((fun state => state ∈ (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inl M_0)).starting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
          | x => False) ∧
        (fun state => state ∈ (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inr M_1)).accepting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
          | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inl M_0)).symbol_arrow_list ++
                (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inr M_1)).symbol_arrow_list ∧
            stop_state ∈ stop_state_list) =
      fun p c q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | x => False) ∧
    ((fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈
                (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inl M_0)).epsilon_arrow_list ++
                    (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inr M_1)).epsilon_arrow_list ++
                  List.map
                    (fun accepting_state =>
                      { start_state := accepting_state,
                        stop_state_list := (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inr M_1)).starting_state_list })
                    (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inl M_0)).accepting_state_list ∧
              stop_state ∈ stop_state_list) =
        fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False) ∧
      ((fun state => state ∈ (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inl M_0)).starting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
          | x => False) ∧
        (fun state => state ∈ (EpsilonNFA.map Sum.inr (EpsilonNFA.map Sum.inr M_1)).accepting_state_list) = fun p =>
          match p with
          | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
          | x => False
Tactic:
simp only [EpsilonNFA.map]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  (List.map
                    (fun arrow =>
                      { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                        stop_state_list := List.map Sum.inl arrow.stop_state_list })
                    M_0.symbol_arrow_list) ++
                List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  (List.map
                    (fun arrow =>
                      { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                        stop_state_list := List.map Sum.inr arrow.stop_state_list })
                    M_1.symbol_arrow_list) ∧
            stop_state ∈ stop_state_list) =
      fun p c q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | x => False) ∧
    ((fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈
                List.map
                      (fun arrow =>
                        { start_state := Sum.inr arrow.start_state,
                          stop_state_list := List.map Sum.inr arrow.stop_state_list })
                      (List.map
                        (fun arrow =>
                          { start_state := Sum.inl arrow.start_state,
                            stop_state_list := List.map Sum.inl arrow.stop_state_list })
                        M_0.epsilon_arrow_list) ++
                    List.map
                      (fun arrow =>
                        { start_state := Sum.inr arrow.start_state,
                          stop_state_list := List.map Sum.inr arrow.stop_state_list })
                      (List.map
                        (fun arrow =>
                          { start_state := Sum.inr arrow.start_state,
                            stop_state_list := List.map Sum.inr arrow.stop_state_list })
                        M_1.epsilon_arrow_list) ++
                  List.map
                    (fun accepting_state =>
                      { start_state := accepting_state,
                        stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
                    (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
              stop_state ∈ stop_state_list) =
        fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False) ∧
      ((fun state => state ∈ List.map Sum.inr (List.map Sum.inl M_0.starting_state_list)) = fun p =>
          match p with
          | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
          | x => False) ∧
        (fun state => state ∈ List.map Sum.inr (List.map Sum.inr M_1.accepting_state_list)) = fun p =>
          match p with
          | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
          | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state symbol stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
              List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  (List.map
                    (fun arrow =>
                      { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                        stop_state_list := List.map Sum.inl arrow.stop_state_list })
                    M_0.symbol_arrow_list) ++
                List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  (List.map
                    (fun arrow =>
                      { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                        stop_state_list := List.map Sum.inr arrow.stop_state_list })
                    M_1.symbol_arrow_list) ∧
            stop_state ∈ stop_state_list) =
      fun p c q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
            q' ∈ stop_state_list
      | x => False) ∧
    ((fun start_state stop_state =>
          ∃ stop_state_list,
            { start_state := start_state, stop_state_list := stop_state_list } ∈
                List.map
                      (fun arrow =>
                        { start_state := Sum.inr arrow.start_state,
                          stop_state_list := List.map Sum.inr arrow.stop_state_list })
                      (List.map
                        (fun arrow =>
                          { start_state := Sum.inl arrow.start_state,
                            stop_state_list := List.map Sum.inl arrow.stop_state_list })
                        M_0.epsilon_arrow_list) ++
                    List.map
                      (fun arrow =>
                        { start_state := Sum.inr arrow.start_state,
                          stop_state_list := List.map Sum.inr arrow.stop_state_list })
                      (List.map
                        (fun arrow =>
                          { start_state := Sum.inr arrow.start_state,
                            stop_state_list := List.map Sum.inr arrow.stop_state_list })
                        M_1.epsilon_arrow_list) ++
                  List.map
                    (fun accepting_state =>
                      { start_state := accepting_state,
                        stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
                    (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
              stop_state ∈ stop_state_list) =
        fun p q =>
        match (p, q) with
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
          ∃ stop_state_list,
            { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
        | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
        | x => False) ∧
      ((fun state => state ∈ List.map Sum.inr (List.map Sum.inl M_0.starting_state_list)) = fun p =>
          match p with
          | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
          | x => False) ∧
        (fun state => state ∈ List.map Sum.inr (List.map Sum.inr M_1.accepting_state_list)) = fun p =>
          match p with
          | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
          | x => False
Tactic:
constructor
State after:
case left
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ (fun start_state symbol stop_state =>
      ∃ stop_state_list,
        { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
            List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.symbol_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.symbol_arrow_list) ∧
          stop_state ∈ stop_state_list) =
    fun p c q =>
    match (p, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

case right
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, stop_state_list := stop_state_list } ∈
              List.map
                    (fun arrow =>
                      { start_state := Sum.inr arrow.start_state,
                        stop_state_list := List.map Sum.inr arrow.stop_state_list })
                    (List.map
                      (fun arrow =>
                        { start_state := Sum.inl arrow.start_state,
                          stop_state_list := List.map Sum.inl arrow.stop_state_list })
                      M_0.epsilon_arrow_list) ++
                  List.map
                    (fun arrow =>
                      { start_state := Sum.inr arrow.start_state,
                        stop_state_list := List.map Sum.inr arrow.stop_state_list })
                    (List.map
                      (fun arrow =>
                        { start_state := Sum.inr arrow.start_state,
                          stop_state_list := List.map Sum.inr arrow.stop_state_list })
                      M_1.epsilon_arrow_list) ++
                List.map
                  (fun accepting_state =>
                    { start_state := accepting_state,
                      stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
                  (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
            stop_state ∈ stop_state_list) =
      fun p q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
      | x => False) ∧
    ((fun state => state ∈ List.map Sum.inr (List.map Sum.inl M_0.starting_state_list)) = fun p =>
        match p with
        | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
        | x => False) ∧
      (fun state => state ∈ List.map Sum.inr (List.map Sum.inr M_1.accepting_state_list)) = fun p =>
        match p with
        | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
        | x => False

State before:
case left
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ (fun start_state symbol stop_state =>
      ∃ stop_state_list,
        { start_state := start_state, symbol := symbol, stop_state_list := stop_state_list } ∈
            List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.symbol_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.symbol_arrow_list) ∧
          stop_state ∈ stop_state_list) =
    fun p c q =>
    match (p, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
funext p c q
State after:
case left.h.h.h
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p : ℕ ⊕ σ_0 ⊕ σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := p, symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (p, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

State before:
case left.h.h.h
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p : ℕ ⊕ σ_0 ⊕ σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := p, symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (p, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
cases p
State after:
case left.h.h.h.inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
val✝ : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inl val✝, symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inl val✝, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

case left.h.h.h.inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
val✝ : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr val✝, symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr val✝, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inl p_0, symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inl p_0, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ p_0 =>
  simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr p_0, symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr p_0, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ p_0 =>
  cases p_0
  case _ p_0 =>
    cases q
    case _ q_0 =>
      simp
      intro xs x a1 a2 a3 a4
      simp only [← a4]
      simp
    case _ q_0 =>
      cases q_0
      case _ q_0 =>
        simp
        sorry
      case _ q_0 =>
        simp
        intro xs x a1 a2 a3 a4
        simp only [← a4]
        simp
  case _ p_0 =>
    cases q
    case _ q_0 =>
      simp
      intro xs x a1 a2 a3 a4
      simp only [← a4]
      simp
    case _ q_0 =>
      cases q_0
      case _ q_0 =>
        simp
        intro xs x a1 a2 a3 a4
        simp only [← a4]
        simp
      case _ q_0 =>
        simp
        sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inl p_0, symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inl p_0, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr p_0, symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr p_0, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
cases p_0
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
val✝ : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl val✝), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inl val✝), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
val✝ : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr val✝), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inr val✝), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ p_0 =>
  cases q
  case _ q_0 =>
    simp
    intro xs x a1 a2 a3 a4
    simp only [← a4]
    simp
  case _ q_0 =>
    cases q_0
    case _ q_0 =>
      simp
      sorry
    case _ q_0 =>
      simp
      intro xs x a1 a2 a3 a4
      simp only [← a4]
      simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ p_0 =>
  cases q
  case _ q_0 =>
    simp
    intro xs x a1 a2 a3 a4
    simp only [← a4]
    simp
  case _ q_0 =>
    cases q_0
    case _ q_0 =>
      simp
      intro xs x a1 a2 a3 a4
      simp only [← a4]
      simp
    case _ q_0 =>
      simp
      sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
cases q
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
val✝ : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inl val✝ ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inl val✝) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
val✝ : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr val✝ ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr val✝) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inl q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inl q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  intro xs x a1 a2 a3 a4
  simp only [← a4]
  simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ q_0 =>
  cases q_0
  case _ q_0 =>
    simp
    sorry
  case _ q_0 =>
    simp
    intro xs x a1 a2 a3 a4
    simp only [← a4]
    simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inl q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inl q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : ℕ
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ∀ x_1 ∈ M_0.symbol_arrow_list,
      x_1.start_state = p_0 → x_1.symbol = c → List.map (Sum.inr ∘ Sum.inl) x_1.stop_state_list = x → Sum.inl q_0 ∉ x

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : ℕ
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ∀ x_1 ∈ M_0.symbol_arrow_list,
      x_1.start_state = p_0 → x_1.symbol = c → List.map (Sum.inr ∘ Sum.inl) x_1.stop_state_list = x → Sum.inl q_0 ∉ x
Tactic:
intro xs x a1 a2 a3 a4
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_0
a1 : x ∈ M_0.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_0
a1 : x ∈ M_0.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
simp only [← a4]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_0
a1 : x ∈ M_0.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_0
a1 : x ∈ M_0.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list
Tactic:
simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
cases q_0
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 val✝ : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inl val✝) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inl val✝)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
val✝ : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inr val✝) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inr val✝)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 q_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inl q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inr q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  intro xs x a1 a2 a3 a4
  simp only [← a4]
  simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 q_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inl q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 q_0 : σ_0
⊢ (∃ stop_state_list,
      (∃ a ∈ M_0.symbol_arrow_list,
          a.start_state = p_0 ∧ a.symbol = c ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = stop_state_list) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) ↔
    ∃ stop_state_list,
      { start_state := p_0, symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
        q_0 ∈ stop_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 q_0 : σ_0
⊢ (∃ stop_state_list,
      (∃ a ∈ M_0.symbol_arrow_list,
          a.start_state = p_0 ∧ a.symbol = c ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = stop_state_list) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) ↔
    ∃ stop_state_list,
      { start_state := p_0, symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
        q_0 ∈ stop_state_list
Tactic:
sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inr q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_1
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ∀ x_1 ∈ M_0.symbol_arrow_list,
      x_1.start_state = p_0 →
        x_1.symbol = c → List.map (Sum.inr ∘ Sum.inl) x_1.stop_state_list = x → Sum.inr (Sum.inr q_0) ∉ x

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_1
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ∀ x_1 ∈ M_0.symbol_arrow_list,
      x_1.start_state = p_0 →
        x_1.symbol = c → List.map (Sum.inr ∘ Sum.inl) x_1.stop_state_list = x → Sum.inr (Sum.inr q_0) ∉ x
Tactic:
intro xs x a1 a2 a3 a4
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_1
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_0
a1 : x ∈ M_0.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inr (Sum.inr q_0) ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_1
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_0
a1 : x ∈ M_0.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inr (Sum.inr q_0) ∉ xs
Tactic:
simp only [← a4]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_1
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_0
a1 : x ∈ M_0.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inr (Sum.inr q_0) ∉ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_0
q_0 : σ_1
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_0
a1 : x ∈ M_0.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inr (Sum.inr q_0) ∉ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list
Tactic:
simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
cases q
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
val✝ : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inl val✝ ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inl val✝) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
val✝ : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr val✝ ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr val✝) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inl q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inl q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  intro xs x a1 a2 a3 a4
  simp only [← a4]
  simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ q_0 =>
  cases q_0
  case _ q_0 =>
    simp
    intro xs x a1 a2 a3 a4
    simp only [← a4]
    simp
  case _ q_0 =>
    simp
    sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inl q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inl q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : ℕ
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ∀ x_1 ∈ M_1.symbol_arrow_list,
      x_1.start_state = p_0 → x_1.symbol = c → List.map (Sum.inr ∘ Sum.inr) x_1.stop_state_list = x → Sum.inl q_0 ∉ x

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : ℕ
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ∀ x_1 ∈ M_1.symbol_arrow_list,
      x_1.start_state = p_0 → x_1.symbol = c → List.map (Sum.inr ∘ Sum.inr) x_1.stop_state_list = x → Sum.inl q_0 ∉ x
Tactic:
intro xs x a1 a2 a3 a4
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_1
a1 : x ∈ M_1.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inr) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_1
a1 : x ∈ M_1.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inr) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
simp only [← a4]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_1
a1 : x ∈ M_1.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inr) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ List.map (Sum.inr ∘ Sum.inr) x.stop_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_1
a1 : x ∈ M_1.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inr) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ List.map (Sum.inr ∘ Sum.inr) x.stop_state_list
Tactic:
simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
cases q_0
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
val✝ : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inl val✝) ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr (Sum.inl val✝)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 val✝ : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inr val✝) ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr (Sum.inr val✝)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr (Sum.inl q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  intro xs x a1 a2 a3 a4
  simp only [← a4]
  simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 q_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr (Sum.inr q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr (Sum.inl q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ∀ x_1 ∈ M_1.symbol_arrow_list,
      x_1.start_state = p_0 →
        x_1.symbol = c → List.map (Sum.inr ∘ Sum.inr) x_1.stop_state_list = x → Sum.inr (Sum.inl q_0) ∉ x

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ∀ x_1 ∈ M_1.symbol_arrow_list,
      x_1.start_state = p_0 →
        x_1.symbol = c → List.map (Sum.inr ∘ Sum.inr) x_1.stop_state_list = x → Sum.inr (Sum.inl q_0) ∉ x
Tactic:
intro xs x a1 a2 a3 a4
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_1
a1 : x ∈ M_1.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inr) x.stop_state_list = xs
⊢ Sum.inr (Sum.inl q_0) ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_1
a1 : x ∈ M_1.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inr) x.stop_state_list = xs
⊢ Sum.inr (Sum.inl q_0) ∉ xs
Tactic:
simp only [← a4]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_1
a1 : x ∈ M_1.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inr) x.stop_state_list = xs
⊢ Sum.inr (Sum.inl q_0) ∉ List.map (Sum.inr ∘ Sum.inr) x.stop_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 : σ_1
q_0 : σ_0
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : SymbolArrow α σ_1
a1 : x ∈ M_1.symbol_arrow_list
a2 : x.start_state = p_0
a3 : x.symbol = c
a4 : List.map (Sum.inr ∘ Sum.inr) x.stop_state_list = xs
⊢ Sum.inr (Sum.inl q_0) ∉ List.map (Sum.inr ∘ Sum.inr) x.stop_state_list
Tactic:
simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 q_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), symbol := c, stop_state_list := stop_state_list } ∈
          List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inl arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inl arrow.stop_state_list })
                M_0.symbol_arrow_list) ++
            List.map
              (fun arrow =>
                { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                  stop_state_list := List.map Sum.inr arrow.stop_state_list })
              (List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state, symbol := arrow.symbol,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                M_1.symbol_arrow_list) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), Sum.inr (Sum.inr q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_0.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
          q' ∈ stop_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 q_0 : σ_1
⊢ (∃ stop_state_list,
      (∃ a ∈ M_1.symbol_arrow_list,
          a.start_state = p_0 ∧ a.symbol = c ∧ List.map (Sum.inr ∘ Sum.inr) a.stop_state_list = stop_state_list) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) ↔
    ∃ stop_state_list,
      { start_state := p_0, symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
        q_0 ∈ stop_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
c : α
p_0 q_0 : σ_1
⊢ (∃ stop_state_list,
      (∃ a ∈ M_1.symbol_arrow_list,
          a.start_state = p_0 ∧ a.symbol = c ∧ List.map (Sum.inr ∘ Sum.inr) a.stop_state_list = stop_state_list) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) ↔
    ∃ stop_state_list,
      { start_state := p_0, symbol := c, stop_state_list := stop_state_list } ∈ M_1.symbol_arrow_list ∧
        q_0 ∈ stop_state_list
Tactic:
sorry
State after:
no goals

State before:
case right
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun start_state stop_state =>
        ∃ stop_state_list,
          { start_state := start_state, stop_state_list := stop_state_list } ∈
              List.map
                    (fun arrow =>
                      { start_state := Sum.inr arrow.start_state,
                        stop_state_list := List.map Sum.inr arrow.stop_state_list })
                    (List.map
                      (fun arrow =>
                        { start_state := Sum.inl arrow.start_state,
                          stop_state_list := List.map Sum.inl arrow.stop_state_list })
                      M_0.epsilon_arrow_list) ++
                  List.map
                    (fun arrow =>
                      { start_state := Sum.inr arrow.start_state,
                        stop_state_list := List.map Sum.inr arrow.stop_state_list })
                    (List.map
                      (fun arrow =>
                        { start_state := Sum.inr arrow.start_state,
                          stop_state_list := List.map Sum.inr arrow.stop_state_list })
                      M_1.epsilon_arrow_list) ++
                List.map
                  (fun accepting_state =>
                    { start_state := accepting_state,
                      stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
                  (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
            stop_state ∈ stop_state_list) =
      fun p q =>
      match (p, q) with
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
        ∃ stop_state_list,
          { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
      | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
        ∃ stop_state_list,
          { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
      | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
      | x => False) ∧
    ((fun state => state ∈ List.map Sum.inr (List.map Sum.inl M_0.starting_state_list)) = fun p =>
        match p with
        | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
        | x => False) ∧
      (fun state => state ∈ List.map Sum.inr (List.map Sum.inr M_1.accepting_state_list)) = fun p =>
        match p with
        | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
        | x => False
Tactic:
constructor
State after:
case right.left
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ (fun start_state stop_state =>
      ∃ stop_state_list,
        { start_state := start_state, stop_state_list := stop_state_list } ∈
            List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  (List.map
                    (fun arrow =>
                      { start_state := Sum.inl arrow.start_state,
                        stop_state_list := List.map Sum.inl arrow.stop_state_list })
                    M_0.epsilon_arrow_list) ++
                List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  (List.map
                    (fun arrow =>
                      { start_state := Sum.inr arrow.start_state,
                        stop_state_list := List.map Sum.inr arrow.stop_state_list })
                    M_1.epsilon_arrow_list) ++
              List.map
                (fun accepting_state =>
                  { start_state := accepting_state,
                    stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
                (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
          stop_state ∈ stop_state_list) =
    fun p q =>
    match (p, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

case right.right
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ ((fun state => state ∈ List.map Sum.inr (List.map Sum.inl M_0.starting_state_list)) = fun p =>
      match p with
      | Sum.inr (Sum.inl p') => p' ∈ M_0.starting_state_list
      | x => False) ∧
    (fun state => state ∈ List.map Sum.inr (List.map Sum.inr M_1.accepting_state_list)) = fun p =>
      match p with
      | Sum.inr (Sum.inr p') => p' ∈ M_1.accepting_state_list
      | x => False

State before:
case right.left
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
⊢ (fun start_state stop_state =>
      ∃ stop_state_list,
        { start_state := start_state, stop_state_list := stop_state_list } ∈
            List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  (List.map
                    (fun arrow =>
                      { start_state := Sum.inl arrow.start_state,
                        stop_state_list := List.map Sum.inl arrow.stop_state_list })
                    M_0.epsilon_arrow_list) ++
                List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  (List.map
                    (fun arrow =>
                      { start_state := Sum.inr arrow.start_state,
                        stop_state_list := List.map Sum.inr arrow.stop_state_list })
                    M_1.epsilon_arrow_list) ++
              List.map
                (fun accepting_state =>
                  { start_state := accepting_state,
                    stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
                (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
          stop_state ∈ stop_state_list) =
    fun p q =>
    match (p, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
funext p q
State after:
case right.left.h.h
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p q : ℕ ⊕ σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := p, stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (p, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

State before:
case right.left.h.h
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p q : ℕ ⊕ σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := p, stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (p, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
cases p
State after:
case right.left.h.h.inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
val✝ : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inl val✝, stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inl val✝, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

case right.left.h.h.inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
val✝ : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr val✝, stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inr val✝, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inl p_0, stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inl p_0, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
case _ p_0 =>
  simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr p_0, stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inr p_0, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
case _ p_0 =>
  cases p_0
  case _ p_0 =>
    cases q
    case _ q_0 =>
      simp
      intro xs a1
      cases a1
      case _ left =>
        cases left
        case _ x a2 =>
          cases a2
          case _ a2_left a2_right =>
            cases a2_right
            case _ a2_right_left a2_right_right =>
              simp only [← a2_right_right]
              simp
      case _ right =>
        cases right
        case _ x a2 =>
          cases a2
          case _ a2_left a2_right =>
            cases a2_right
            case _ a2_right_left a2_right_right =>
              simp only [← a2_right_right]
              simp
    case _ q_0 =>
      cases q_0
      case _ q_0 =>
        simp
        sorry
      case _ q_0 =>
        simp
        sorry
  case _ p_0 =>
    cases q
    case _ q_0 =>
      simp
      intro xs x a1 a2 a3
      simp only [← a3]
      simp
    case _ q_0 =>
      cases q_0
      case _ q_0 =>
        simp
        intro xs x a1 a2 a3
        simp only [← a3]
        simp
      case _ q_0 =>
        simp
        sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inl p_0, stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inl p_0, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr p_0, stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inr p_0, q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
cases p_0
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
val✝ : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl val✝), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inl val✝), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
val✝ : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr val✝), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inr val✝), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
case _ p_0 =>
  cases q
  case _ q_0 =>
    simp
    intro xs a1
    cases a1
    case _ left =>
      cases left
      case _ x a2 =>
        cases a2
        case _ a2_left a2_right =>
          cases a2_right
          case _ a2_right_left a2_right_right =>
            simp only [← a2_right_right]
            simp
    case _ right =>
      cases right
      case _ x a2 =>
        cases a2
        case _ a2_left a2_right =>
          cases a2_right
          case _ a2_right_left a2_right_right =>
            simp only [← a2_right_right]
            simp
  case _ q_0 =>
    cases q_0
    case _ q_0 =>
      simp
      sorry
    case _ q_0 =>
      simp
      sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inr p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inr p_0), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
case _ p_0 =>
  cases q
  case _ q_0 =>
    simp
    intro xs x a1 a2 a3
    simp only [← a3]
    simp
  case _ q_0 =>
    cases q_0
    case _ q_0 =>
      simp
      intro xs x a1 a2 a3
      simp only [← a3]
      simp
    case _ q_0 =>
      simp
      sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
q : ℕ ⊕ σ_0 ⊕ σ_1
p_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        q ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), q) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
cases q
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
val✝ : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inl val✝ ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inl val✝) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
val✝ : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr val✝ ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr val✝) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inl q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inl q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  intro xs a1
  cases a1
  case _ left =>
    cases left
    case _ x a2 =>
      cases a2
      case _ a2_left a2_right =>
        cases a2_right
        case _ a2_right_left a2_right_right =>
          simp only [← a2_right_right]
          simp
  case _ right =>
    cases right
    case _ x a2 =>
      cases a2
      case _ a2_left a2_right =>
        cases a2_right
        case _ a2_right_left a2_right_right =>
          simp only [← a2_right_right]
          simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
case _ q_0 =>
  cases q_0
  case _ q_0 =>
    simp
    sorry
  case _ q_0 =>
    simp
    sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inl q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inl q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ((∃ a ∈ M_0.epsilon_arrow_list, a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = x) ∨
        ∃ a ∈ M_0.accepting_state_list, a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = x) →
      Sum.inl q_0 ∉ x

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
⊢ ∀ (x : List (ℕ ⊕ σ_0 ⊕ σ_1)),
    ((∃ a ∈ M_0.epsilon_arrow_list, a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = x) ∨
        ∃ a ∈ M_0.accepting_state_list, a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = x) →
      Sum.inl q_0 ∉ x
Tactic:
intro xs a1
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
a1 :
  (∃ a ∈ M_0.epsilon_arrow_list, a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = xs) ∨
    ∃ a ∈ M_0.accepting_state_list, a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
a1 :
  (∃ a ∈ M_0.epsilon_arrow_list, a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = xs) ∨
    ∃ a ∈ M_0.accepting_state_list, a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
cases a1
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
h✝ : ∃ a ∈ M_0.epsilon_arrow_list, a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
h✝ : ∃ a ∈ M_0.accepting_state_list, a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
left : ∃ a ∈ M_0.epsilon_arrow_list, a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
case _ left =>
  cases left
  case _ x a2 =>
    cases a2
    case _ a2_left a2_right =>
      cases a2_right
      case _ a2_right_left a2_right_right =>
        simp only [← a2_right_right]
        simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
right : ∃ a ∈ M_0.accepting_state_list, a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
case _ right =>
  cases right
  case _ x a2 =>
    cases a2
    case _ a2_left a2_right =>
      cases a2_right
      case _ a2_right_left a2_right_right =>
        simp only [← a2_right_right]
        simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
left : ∃ a ∈ M_0.epsilon_arrow_list, a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
cases left
State after:
case intro
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
w✝ : EpsilonArrow σ_0
h✝ : w✝ ∈ M_0.epsilon_arrow_list ∧ w✝.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) w✝.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2 : x ∈ M_0.epsilon_arrow_list ∧ x.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
case _ x a2 =>
  cases a2
  case _ a2_left a2_right =>
    cases a2_right
    case _ a2_right_left a2_right_right =>
      simp only [← a2_right_right]
      simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2 : x ∈ M_0.epsilon_arrow_list ∧ x.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
cases a2
State after:
case intro
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
left✝ : x ∈ M_0.epsilon_arrow_list
right✝ : x.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2_left : x ∈ M_0.epsilon_arrow_list
a2_right : x.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
case _ a2_left a2_right =>
  cases a2_right
  case _ a2_right_left a2_right_right =>
    simp only [← a2_right_right]
    simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2_left : x ∈ M_0.epsilon_arrow_list
a2_right : x.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
cases a2_right
State after:
case intro
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2_left : x ∈ M_0.epsilon_arrow_list
left✝ : x.start_state = p_0
right✝ : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2_left : x ∈ M_0.epsilon_arrow_list
a2_right_left : x.start_state = p_0
a2_right_right : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
case _ a2_right_left a2_right_right =>
  simp only [← a2_right_right]
  simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2_left : x ∈ M_0.epsilon_arrow_list
a2_right_left : x.start_state = p_0
a2_right_right : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
simp only [← a2_right_right]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2_left : x ∈ M_0.epsilon_arrow_list
a2_right_left : x.start_state = p_0
a2_right_right : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : EpsilonArrow σ_0
a2_left : x ∈ M_0.epsilon_arrow_list
a2_right_left : x.start_state = p_0
a2_right_right : List.map (Sum.inr ∘ Sum.inl) x.stop_state_list = xs
⊢ Sum.inl q_0 ∉ List.map (Sum.inr ∘ Sum.inl) x.stop_state_list
Tactic:
simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
right : ∃ a ∈ M_0.accepting_state_list, a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
cases right
State after:
case intro
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
w✝ : σ_0
h✝ : w✝ ∈ M_0.accepting_state_list ∧ w✝ = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2 : x ∈ M_0.accepting_state_list ∧ x = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
case _ x a2 =>
  cases a2
  case _ a2_left a2_right =>
    cases a2_right
    case _ a2_right_left a2_right_right =>
      simp only [← a2_right_right]
      simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2 : x ∈ M_0.accepting_state_list ∧ x = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
cases a2
State after:
case intro
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
left✝ : x ∈ M_0.accepting_state_list
right✝ : x = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2_left : x ∈ M_0.accepting_state_list
a2_right : x = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
case _ a2_left a2_right =>
  cases a2_right
  case _ a2_right_left a2_right_right =>
    simp only [← a2_right_right]
    simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2_left : x ∈ M_0.accepting_state_list
a2_right : x = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
cases a2_right
State after:
case intro
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2_left : x ∈ M_0.accepting_state_list
left✝ : x = p_0
right✝ : List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2_left : x ∈ M_0.accepting_state_list
a2_right_left : x = p_0
a2_right_right : List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
case _ a2_right_left a2_right_right =>
  simp only [← a2_right_right]
  simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2_left : x ∈ M_0.accepting_state_list
a2_right_left : x = p_0
a2_right_right : List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ xs
Tactic:
simp only [← a2_right_right]
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2_left : x ∈ M_0.accepting_state_list
a2_right_left : x = p_0
a2_right_right : List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : ℕ
xs : List (ℕ ⊕ σ_0 ⊕ σ_1)
x : σ_0
a2_left : x ∈ M_0.accepting_state_list
a2_right_left : x = p_0
a2_right_right : List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = xs
⊢ Sum.inl q_0 ∉ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list
Tactic:
simp
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : σ_0 ⊕ σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr q_0 ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr q_0) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
cases q_0
State after:
case inl
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 val✝ : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr (Sum.inl val✝) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inl val✝)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

case inr
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
val✝ : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr (Sum.inr val✝) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inr val✝)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 q_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inl q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inr q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
case _ q_0 =>
  simp
  sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 q_0 : σ_0
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inl q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 q_0 : σ_0
⊢ (∃ stop_state_list,
      ((∃ a ∈ M_0.epsilon_arrow_list,
            a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = stop_state_list) ∨
          ∃ a ∈ M_0.accepting_state_list,
            a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = stop_state_list) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) ↔
    ∃ stop_state_list,
      { start_state := p_0, stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q_0 ∈ stop_state_list

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 q_0 : σ_0
⊢ (∃ stop_state_list,
      ((∃ a ∈ M_0.epsilon_arrow_list,
            a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = stop_state_list) ∨
          ∃ a ∈ M_0.accepting_state_list,
            a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = stop_state_list) ∧
        Sum.inr (Sum.inl q_0) ∈ stop_state_list) ↔
    ∃ stop_state_list,
      { start_state := p_0, stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q_0 ∈ stop_state_list
Tactic:
sorry
State after:
no goals

State before:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : σ_1
⊢ (∃ stop_state_list,
      { start_state := Sum.inr (Sum.inl p_0), stop_state_list := stop_state_list } ∈
          List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inl arrow.start_state,
                      stop_state_list := List.map Sum.inl arrow.stop_state_list })
                  M_0.epsilon_arrow_list) ++
              List.map
                (fun arrow =>
                  { start_state := Sum.inr arrow.start_state,
                    stop_state_list := List.map Sum.inr arrow.stop_state_list })
                (List.map
                  (fun arrow =>
                    { start_state := Sum.inr arrow.start_state,
                      stop_state_list := List.map Sum.inr arrow.stop_state_list })
                  M_1.epsilon_arrow_list) ++
            List.map
              (fun accepting_state =>
                { start_state := accepting_state,
                  stop_state_list := List.map Sum.inr (List.map Sum.inr M_1.starting_state_list) })
              (List.map Sum.inr (List.map Sum.inl M_0.accepting_state_list)) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) =
    match (Sum.inr (Sum.inl p_0), Sum.inr (Sum.inr q_0)) with
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inl q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_0.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inr p'), Sum.inr (Sum.inr q')) =>
      ∃ stop_state_list,
        { start_state := p', stop_state_list := stop_state_list } ∈ M_1.epsilon_arrow_list ∧ q' ∈ stop_state_list
    | (Sum.inr (Sum.inl p'), Sum.inr (Sum.inr q')) => p' ∈ M_0.accepting_state_list ∧ q' ∈ M_1.starting_state_list
    | x => False
Tactic:
simp
State after:
α : Type
inst✝ : DecidableEq α
σ_0 σ_1 : Type
M_0 : EpsilonNFA α σ_0
M_1 : EpsilonNFA α σ_1
p_0 : σ_0
q_0 : σ_1
⊢ (∃ stop_state_list,
      ((∃ a ∈ M_0.epsilon_arrow_list,
            a.start_state = p_0 ∧ List.map (Sum.inr ∘ Sum.inl) a.stop_state_list = stop_state_list) ∨
          ∃ a ∈ M_0.accepting_state_list,
            a = p_0 ∧ List.map (Sum.inr ∘ Sum.inr) M_1.starting_state_list = stop_state_list) ∧
        Sum.inr (Sum.inr q_0) ∈ stop_state_list) ↔
    p_0 ∈ M_0.accepting_state_list ∧ q_0 ∈ M_1.starting_state_list