Theorem: Language.mem_pow
File: Mathlib/Computability/Language.lean

tactic: induction' n with n ihn generalizing x
state_before: α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝ : List α
l : Language α
x : List α
n : ℕ
⊢ x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l

tactic: simp only [mem_one, pow_zero, length_eq_zero]
state_before: case zero
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x✝ x : List α
⊢ x ∈ l ^ Nat.zero ↔ ∃ S, x = join S ∧ length S = Nat.zero ∧ ∀ (y : List α), y ∈ S → y ∈ l

tactic: constructor
state_before: case zero
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x✝ x : List α
⊢ x ∈ l ^ Nat.zero ↔ ∃ S, x = join S ∧ length S = Nat.zero ∧ ∀ (y : List α), y ∈ S → y ∈ l

tactic: rintro rfl
state_before: case zero.mp
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x✝ x : List α
⊢ x ∈ l ^ Nat.zero → ∃ S, x = join S ∧ length S = Nat.zero ∧ ∀ (y : List α), y ∈ S → y ∈ l

tactic: exact ⟨[], rfl, rfl, fun _ h ↦ by contradiction⟩
state_before: case zero.mp
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝ : List α
l : Language α
x : List α
⊢ ∃ S, [] = join S ∧ length S = Nat.zero ∧ ∀ (y : List α), y ∈ S → y ∈ l

tactic: contradiction
state_before: α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x x✝ : List α
h : x✝ ∈ []
⊢ x✝ ∈ l

tactic: rintro ⟨_, rfl, h₀, _⟩
state_before: case zero.mpr
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x✝ x : List α
⊢ (∃ S, x = join S ∧ length S = Nat.zero ∧ ∀ (y : List α), y ∈ S → y ∈ l) → x ∈ l ^ Nat.zero

tactic: simp
state_before: case zero.mpr.intro.intro.intro
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝ : List α
l : Language α
x : List α
w✝ : List (List α)
h₀ : length w✝ = Nat.zero
right✝ : ∀ (y : List α), y ∈ w✝ → y ∈ l
⊢ join w✝ ∈ l ^ Nat.zero

tactic: intros _ h₁
state_before: case zero.mpr.intro.intro.intro
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝ : List α
l : Language α
x : List α
w✝ : List (List α)
h₀ : length w✝ = Nat.zero
right✝ : ∀ (y : List α), y ∈ w✝ → y ∈ l
⊢ ∀ (l : List α), l ∈ w✝ → l = []

tactic: rw [length_eq_zero] at h₀
state_before: case zero.mpr.intro.intro.intro
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝¹ m : Language α
a b x✝ : List α
l : Language α
x : List α
w✝ : List (List α)
h₀ : length w✝ = Nat.zero
right✝ : ∀ (y : List α), y ∈ w✝ → y ∈ l
l✝ : List α
h₁ : l✝ ∈ w✝
⊢ l✝ = []

tactic: rw [h₀] at h₁
state_before: case zero.mpr.intro.intro.intro
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝¹ m : Language α
a b x✝ : List α
l : Language α
x : List α
w✝ : List (List α)
h₀ : w✝ = []
right✝ : ∀ (y : List α), y ∈ w✝ → y ∈ l
l✝ : List α
h₁ : l✝ ∈ w✝
⊢ l✝ = []

tactic: contradiction
state_before: case zero.mpr.intro.intro.intro
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝¹ m : Language α
a b x✝ : List α
l : Language α
x : List α
w✝ : List (List α)
h₀ : w✝ = []
right✝ : ∀ (y : List α), y ∈ w✝ → y ∈ l
l✝ : List α
h₁ : l✝ ∈ []
⊢ l✝ = []

tactic: simp only [pow_succ, mem_mul, ihn]
state_before: case succ
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x✝ : List α
n : ℕ
ihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l
x : List α
⊢ x ∈ l ^ Nat.succ n ↔ ∃ S, x = join S ∧ length S = Nat.succ n ∧ ∀ (y : List α), y ∈ S → y ∈ l

tactic: constructor
state_before: case succ
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x✝ : List α
n : ℕ
ihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l
x : List α
⊢ (∃ a b, a ∈ l ∧ (∃ S, b = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l) ∧ a ++ b = x) ↔
    ∃ S, x = join S ∧ length S = Nat.succ n ∧ ∀ (y : List α), y ∈ S → y ∈ l

tactic: rintro ⟨a, b, ha, ⟨S, rfl, rfl, hS⟩, rfl⟩
state_before: case succ.mp
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x✝ : List α
n : ℕ
ihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l
x : List α
⊢ (∃ a b, a ∈ l ∧ (∃ S, b = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l) ∧ a ++ b = x) →
    ∃ S, x = join S ∧ length S = Nat.succ n ∧ ∀ (y : List α), y ∈ S → y ∈ l

tactic: exact ⟨a :: S, rfl, rfl, forall_mem_cons.2 ⟨ha, hS⟩⟩
state_before: case succ.mp.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a✝ b x✝ : List α
l : Language α
x a : List α
ha : a ∈ l
S : List (List α)
hS : ∀ (y : List α), y ∈ S → y ∈ l
ihn : ∀ {x : List α}, x ∈ l ^ length S ↔ ∃ S_1, x = join S_1 ∧ length S_1 = length S ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l
⊢ ∃ S_1, a ++ join S = join S_1 ∧ length S_1 = Nat.succ (length S) ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l

tactic: rintro ⟨_ | ⟨a, S⟩, rfl, hn, hS⟩ <;> cases hn
state_before: case succ.mpr
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a b x✝¹ : List α
l : Language α
x✝ : List α
n : ℕ
ihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l
x : List α
⊢ (∃ S, x = join S ∧ length S = Nat.succ n ∧ ∀ (y : List α), y ∈ S → y ∈ l) →
    ∃ a b, a ∈ l ∧ (∃ S, b = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l) ∧ a ++ b = x

tactic: rw [forall_mem_cons] at hS
state_before: case succ.mpr.intro.cons.intro.intro.refl
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a✝ b x✝ : List α
l : Language α
x a : List α
S : List (List α)
hS : ∀ (y : List α), y ∈ a :: S → y ∈ l
ihn :
  ∀ {x : List α},
    x ∈ l ^ Nat.add (length S) 0 ↔
      ∃ S_1, x = join S_1 ∧ length S_1 = Nat.add (length S) 0 ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l
⊢ ∃ a_1 b,
    a_1 ∈ l ∧
      (∃ S_1, b = join S_1 ∧ length S_1 = Nat.add (length S) 0 ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l) ∧
        a_1 ++ b = join (a :: S)

tactic: exact ⟨a, _, hS.1, ⟨S, rfl, rfl, hS.2⟩, rfl⟩
state_before: case succ.mpr.intro.cons.intro.intro.refl
α : Type u_1
β : Type ?u.95661
γ : Type ?u.95664
l✝ m : Language α
a✝ b x✝ : List α
l : Language α
x a : List α
S : List (List α)
hS : a ∈ l ∧ ∀ (x : List α), x ∈ S → x ∈ l
ihn :
  ∀ {x : List α},
    x ∈ l ^ Nat.add (length S) 0 ↔
      ∃ S_1, x = join S_1 ∧ length S_1 = Nat.add (length S) 0 ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l
⊢ ∃ a_1 b,
    a_1 ∈ l ∧
      (∃ S_1, b = join S_1 ∧ length S_1 = Nat.add (length S) 0 ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l) ∧
        a_1 ++ b = join (a :: S)