Theorem: addColumn_spec4 (Table/Proofs.lean)

State before:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ {τ : Type u} [inst : DecidableEq τ] (t : Table sch) (c : η) (vs : List (Option τ)),
    List.length vs = nrows t → nrows (addColumn t c vs) = nrows t
Tactic:
intros τ inst t c vs h
State after:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst : DecidableEq τ
t : Table sch
c : η
vs : List (Option τ)
h : List.length vs = nrows t
⊢ nrows (addColumn t c vs) = nrows t

State before:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst : DecidableEq τ
t : Table sch
c : η
vs : List (Option τ)
h : List.length vs = nrows t
⊢ nrows (addColumn t c vs) = nrows t
Tactic:
simp only [nrows, addColumn, Schema.length_eq_List_length] at *
State after:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst : DecidableEq τ
t : Table sch
c : η
vs : List (Option τ)
h : List.length vs = List.length t.rows
⊢ List.length (List.map (fun x => Row.addColumn x.fst c x.snd) (List.zip t.rows vs)) = List.length t.rows

State before:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst : DecidableEq τ
t : Table sch
c : η
vs : List (Option τ)
h : List.length vs = List.length t.rows
⊢ List.length (List.map (fun x => Row.addColumn x.fst c x.snd) (List.zip t.rows vs)) = List.length t.rows
Tactic:
simp only [List.length_map]
State after:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst : DecidableEq τ
t : Table sch
c : η
vs : List (Option τ)
h : List.length vs = List.length t.rows
⊢ List.length (List.zip t.rows vs) = List.length t.rows

State before:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst : DecidableEq τ
t : Table sch
c : η
vs : List (Option τ)
h : List.length vs = List.length t.rows
⊢ List.length (List.zip t.rows vs) = List.length t.rows
Tactic:
rw [List.zip_length_eq_of_length_eq]
State after:
case h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst : DecidableEq τ
t : Table sch
c : η
vs : List (Option τ)
h : List.length vs = List.length t.rows
⊢ List.length t.rows = List.length vs

State before:
case h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst : DecidableEq τ
t : Table sch
c : η
vs : List (Option τ)
h : List.length vs = List.length t.rows
⊢ List.length t.rows = List.length vs
Tactic:
exact Eq.symm h
State after:
no goals