Theorem: buildColumn_spec5 (Table/Proofs.lean)

State before:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ {τ : Type u} (t : Table sch) (c : η) (f : Row sch → Option τ), nrows (buildColumn t c f) = nrows t
Tactic:
intros τ t c f
State after:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
t : Table sch
c : η
f : Row sch → Option τ
⊢ nrows (buildColumn t c f) = nrows t

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

State before:
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
t : Table sch
c : η
f : Row sch → Option τ
⊢ List.length (List.map (fun x => Row.addColumn x.fst c x.snd) (List.zip t.rows (List.map f t.rows))) =
    List.length t.rows
Tactic:
rw [List.length_map, List.zip_length_eq_of_length_eq]
State after:
case h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
t : Table sch
c : η
f : Row sch → Option τ
⊢ List.length t.rows = List.length (List.map f t.rows)

State before:
case h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
t : Table sch
c : η
f : Row sch → Option τ
⊢ List.length t.rows = List.length (List.map f t.rows)
Tactic:
apply Eq.symm
State after:
case h.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
t : Table sch
c : η
f : Row sch → Option τ
⊢ List.length (List.map f t.rows) = List.length t.rows

State before:
case h.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
t : Table sch
c : η
f : Row sch → Option τ
⊢ List.length (List.map f t.rows) = List.length t.rows
Tactic:
apply List.length_map
State after:
no goals