url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Schema.lean
Schema.lookupType_eq_snd_lookup
[371, 1]
[381, 13]
cases cn with | mk nm pf => induction pf with | hd => simp only [lookupType] rw [lookup_eq_1] | tl h ih => simp only [lookupType] rw [lookup_eq_2] apply ih
η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema cn : CertifiedName s ⊢ lookupType s cn = (lookup s cn).snd
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Schema.lean
Schema.lookupType_eq_snd_lookup
[371, 1]
[381, 13]
induction pf with | hd => simp only [lookupType] rw [lookup_eq_1] | tl h ih => simp only [lookupType] rw [lookup_eq_2] apply ih
case mk η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm : η pf : HasName nm s ⊢ lookupType s { fst := nm, snd := pf } = (lookup s { fst := nm, snd := pf }).snd
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Schema.lean
Schema.lookupType_eq_snd_lookup
[371, 1]
[381, 13]
simp only [lookupType]
case mk.hd η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm c✝ : η rs✝ : Schema τ✝ : Type u_1 ⊢ lookupType ((c✝, τ✝) :: rs✝) { fst := c✝, snd := HasName.hd } = (lookup ((c✝, τ✝) :: rs✝) { fst := c✝, snd := HasName.hd }).snd
case mk.hd η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm c✝ : η rs✝ : Schema τ✝ : Type u_1 ⊢ τ✝ = (lookup ((c✝, τ✝) :: rs✝) { fst := c✝, snd := HasName.hd }).snd
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Schema.lean
Schema.lookupType_eq_snd_lookup
[371, 1]
[381, 13]
rw [lookup_eq_1]
case mk.hd η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm c✝ : η rs✝ : Schema τ✝ : Type u_1 ⊢ τ✝ = (lookup ((c✝, τ✝) :: rs✝) { fst := c✝, snd := HasName.hd }).snd
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Schema.lean
Schema.lookupType_eq_snd_lookup
[371, 1]
[381, 13]
simp only [lookupType]
case mk.tl η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm : η r✝ : Header c✝ : η rs✝ : Schema h : HasName c✝ rs✝ ih : lookupType rs✝ { fst := c✝, snd := h } = (lookup rs✝ { fst := c✝, snd := h }).snd ⊢ lookupType (r✝ :: rs✝) { fst := c✝, snd := HasName.tl h } = (lookup (r✝ :: rs✝) { fst := c✝, snd := HasName.tl h }).snd
case mk.tl η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm : η r✝ : Header c✝ : η rs✝ : Schema h : HasName c✝ rs✝ ih : lookupType rs✝ { fst := c✝, snd := h } = (lookup rs✝ { fst := c✝, snd := h }).snd ⊢ lookupType rs✝ { fst := c✝, snd := h } = (lookup (r✝ :: rs✝) { fst := c✝, snd := HasName.tl h }).snd
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Schema.lean
Schema.lookupType_eq_snd_lookup
[371, 1]
[381, 13]
rw [lookup_eq_2]
case mk.tl η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm : η r✝ : Header c✝ : η rs✝ : Schema h : HasName c✝ rs✝ ih : lookupType rs✝ { fst := c✝, snd := h } = (lookup rs✝ { fst := c✝, snd := h }).snd ⊢ lookupType rs✝ { fst := c✝, snd := h } = (lookup (r✝ :: rs✝) { fst := c✝, snd := HasName.tl h }).snd
case mk.tl η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm : η r✝ : Header c✝ : η rs✝ : Schema h : HasName c✝ rs✝ ih : lookupType rs✝ { fst := c✝, snd := h } = (lookup rs✝ { fst := c✝, snd := h }).snd ⊢ lookupType rs✝ { fst := c✝, snd := h } = (lookup rs✝ { fst := c✝, snd := h }).snd
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Schema.lean
Schema.lookupType_eq_snd_lookup
[371, 1]
[381, 13]
apply ih
case mk.tl η : Type u_η dec_η : DecidableEq η schema : Schema s : Schema nm : η r✝ : Header c✝ : η rs✝ : Schema h : HasName c✝ rs✝ ih : lookupType rs✝ { fst := c✝, snd := h } = (lookup rs✝ { fst := c✝, snd := h }).snd ⊢ lookupType rs✝ { fst := c✝, snd := h } = (lookup rs✝ { fst := c✝, snd := h }).snd
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addRows_spec2
[20, 1]
[25, 37]
intro t rs
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (rs : List (Row sch)), nrows (addRows t rs) = nrows t + List.length rs
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch rs : List (Row sch) ⊢ nrows (addRows t rs) = nrows t + List.length rs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addRows_spec2
[20, 1]
[25, 37]
simp only [nrows, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch rs : List (Row sch) ⊢ nrows (addRows t rs) = nrows t + List.length rs
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch rs : List (Row sch) ⊢ List.length (addRows t rs).rows = List.length t.rows + List.length rs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addRows_spec2
[20, 1]
[25, 37]
exact List.length_append t.rows rs
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch rs : List (Row sch) ⊢ List.length (addRows t rs).rows = List.length t.rows + List.length rs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec1
[32, 1]
[47, 25]
intros τ inst t c vs
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ {τ : Type u} [inst : DecidableEq τ] (t : Table sch) (c : η) (vs : List (Option τ)), header (addColumn t c vs) = List.append (header t) [c]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ t : Table sch c : η vs : List (Option τ) ⊢ header (addColumn t c vs) = List.append (header t) [c]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec1
[32, 1]
[47, 25]
simp [header, addColumn, Schema.names]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ t : Table sch c : η vs : List (Option τ) ⊢ header (addColumn t c vs) = List.append (header t) [c]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ t : Table sch c : η vs : List (Option τ) ⊢ List.map Prod.fst (Schema.append sch [(c, τ)]) = List.map Prod.fst sch ++ [c]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec1
[32, 1]
[47, 25]
induction sch with | nil => simp [List.map, List.append] | cons s ss ih => simp only [List.map] rw [ih] simp [List.append] exact dropColumn t _
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ t : Table sch c : η vs : List (Option τ) ⊢ List.map Prod.fst (Schema.append sch [(c, τ)]) = List.map Prod.fst sch ++ [c]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec1
[32, 1]
[47, 25]
simp [List.map, List.append]
case nil η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) t : Table [] ⊢ List.map Prod.fst (Schema.append [] [(c, τ)]) = List.map Prod.fst [] ++ [c]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec1
[32, 1]
[47, 25]
simp only [List.map]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ List.map Prod.fst (Schema.append (s :: ss) [(c, τ)]) = List.map Prod.fst (s :: ss) ++ [c]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ s.fst :: List.map Prod.fst (Schema.append ss [(c, τ)]) = s.fst :: List.map Prod.fst ss ++ [c]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec1
[32, 1]
[47, 25]
rw [ih]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ s.fst :: List.map Prod.fst (Schema.append ss [(c, τ)]) = s.fst :: List.map Prod.fst ss ++ [c]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ s.fst :: (List.map Prod.fst ss ++ [c]) = s.fst :: List.map Prod.fst ss ++ [c] case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ Table ss
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec1
[32, 1]
[47, 25]
simp [List.append]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ s.fst :: (List.map Prod.fst ss ++ [c]) = s.fst :: List.map Prod.fst ss ++ [c] case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ Table ss
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ Table ss
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec1
[32, 1]
[47, 25]
exact dropColumn t _
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : Table ss → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) ⊢ Table ss
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec3
[63, 1]
[75, 30]
intros t c vs
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ ⊢ ∀ (t : Table sch) (c : η) (vs : List (Option τ)), Schema.lookupType (schema (addColumn t c vs)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead sch c τ []) } = τ
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ t : Table sch c : η vs : List (Option τ) ⊢ Schema.lookupType (schema (addColumn t c vs)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead sch c τ []) } = τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec3
[63, 1]
[75, 30]
induction sch with | nil => simp only [Schema.lookupType] | cons s ss ih => simp only [Schema.lookupType] apply ih (dropColumn t _)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ t : Table sch c : η vs : List (Option τ) ⊢ Schema.lookupType (schema (addColumn t c vs)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead sch c τ []) } = τ
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec3
[63, 1]
[75, 30]
simp only [Schema.lookupType]
case nil η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η vs : List (Option τ) t : Table [] ⊢ Schema.lookupType (schema (addColumn t c vs)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead [] c τ []) } = τ
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec3
[63, 1]
[75, 30]
simp only [Schema.lookupType]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : ∀ (t : Table ss), Schema.lookupType (schema (addColumn t c vs)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) ⊢ Schema.lookupType (schema (addColumn t c vs)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead (s :: ss) c τ []) } = τ
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : ∀ (t : Table ss), Schema.lookupType (schema (addColumn t c vs)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) ⊢ Schema.lookupType (Schema.append ss [(c, τ)]) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec3
[63, 1]
[75, 30]
apply ih (dropColumn t _)
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η vs : List (Option τ) s : Header ss : List Header ih : ∀ (t : Table ss), Schema.lookupType (schema (addColumn t c vs)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) ⊢ Schema.lookupType (Schema.append ss [(c, τ)]) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec4
[77, 1]
[85, 18]
intros τ inst t c vs h
η : 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
η : 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
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec4
[77, 1]
[85, 18]
simp only [nrows, addColumn, Schema.length_eq_List_length] at *
η : 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
η : 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
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec4
[77, 1]
[85, 18]
simp only [List.length_map]
η : 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
η : 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
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec4
[77, 1]
[85, 18]
rw [List.zip_length_eq_of_length_eq]
η : 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
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
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
addColumn_spec4
[77, 1]
[85, 18]
exact Eq.symm h
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
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
intros τ t c f
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ {τ : Type u} (t : Table sch) (c : η) (f : Row sch → Option τ), header (buildColumn t c f) = List.append (header t) [c]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η f : Row sch → Option τ ⊢ header (buildColumn t c f) = List.append (header t) [c]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
simp [header, Schema.names]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η f : Row sch → Option τ ⊢ header (buildColumn t c f) = List.append (header t) [c]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η f : Row sch → Option τ ⊢ List.map Prod.fst (Schema.append sch [(c, τ)]) = List.map Prod.fst sch ++ [c]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
induction sch with | nil => simp [List.map, List.append] | cons s ss ih => simp only [List.map] rw [ih] simp [List.append] exact Table.mk [] exact (λ x => f (Row.cons Cell.emp x))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η f : Row sch → Option τ ⊢ List.map Prod.fst (Schema.append sch [(c, τ)]) = List.map Prod.fst sch ++ [c]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
simp [List.map, List.append]
case nil η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η t : Table [] f : Row [] → Option τ ⊢ List.map Prod.fst (Schema.append [] [(c, τ)]) = List.map Prod.fst [] ++ [c]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
simp only [List.map]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ List.map Prod.fst (Schema.append (s :: ss) [(c, τ)]) = List.map Prod.fst (s :: ss) ++ [c]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ s.fst :: List.map Prod.fst (Schema.append ss [(c, τ)]) = s.fst :: List.map Prod.fst ss ++ [c]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
rw [ih]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ s.fst :: List.map Prod.fst (Schema.append ss [(c, τ)]) = s.fst :: List.map Prod.fst ss ++ [c]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ s.fst :: (List.map Prod.fst ss ++ [c]) = s.fst :: List.map Prod.fst ss ++ [c] case cons.t η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Table ss case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
simp [List.append]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ s.fst :: (List.map Prod.fst ss ++ [c]) = s.fst :: List.map Prod.fst ss ++ [c] case cons.t η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Table ss case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
case cons.t η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Table ss case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
exact Table.mk []
case cons.t η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Table ss case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec2
[90, 1]
[102, 43]
exact (λ x => f (Row.cons Cell.emp x))
case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u c : η s : Header ss : List Header ih : Table ss → (Row ss → Option τ) → List.map Prod.fst (Schema.append ss [(c, τ)]) = List.map Prod.fst ss ++ [c] t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
intros t c f
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ ⊢ ∀ (t : Table sch) (c : η) (f : Row sch → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead sch c τ []) } = τ
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ t : Table sch c : η f : Row sch → Option τ ⊢ Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead sch c τ []) } = τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
induction sch with | nil => simp only [Schema.lookupType] | cons s ss ih => simp only [Schema.lookupType] apply ih . exact (dropColumn t _) . exact f ∘ (Row.cons Cell.emp)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ t : Table sch c : η f : Row sch → Option τ ⊢ Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead sch c τ []) } = τ
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
simp only [Schema.lookupType]
case nil η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η t : Table [] f : Row [] → Option τ ⊢ Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead [] c τ []) } = τ
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
simp only [Schema.lookupType]
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead (s :: ss) c τ []) } = τ
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Schema.lookupType (Schema.append ss [(c, τ)]) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
apply ih
case cons η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Schema.lookupType (Schema.append ss [(c, τ)]) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ
case cons.t η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Table ss case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
. exact (dropColumn t _)
case cons.t η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Table ss case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
. exact f ∘ (Row.cons Cell.emp)
case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
exact (dropColumn t _)
case cons.t η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Table ss
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec4
[115, 1]
[127, 36]
exact f ∘ (Row.cons Cell.emp)
case cons.f η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u inst✝ : DecidableEq τ c : η s : Header ss : List Header ih : ∀ (t : Table ss) (f : Row ss → Option τ), Schema.lookupType (schema (buildColumn t c f)) { fst := c, snd := Schema.colImpliesName (Schema.hasAppendedHead ss c τ []) } = τ t : Table (s :: ss) f : Row (s :: ss) → Option τ ⊢ Row ss → Option τ
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec5
[129, 1]
[136, 25]
intros τ t c f
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ {τ : Type u} (t : Table sch) (c : η) (f : Row sch → Option τ), nrows (buildColumn t c f) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η f : Row sch → Option τ ⊢ nrows (buildColumn t c f) = nrows t
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec5
[129, 1]
[136, 25]
simp only [nrows, buildColumn, addColumn, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η f : Row sch → Option τ ⊢ nrows (buildColumn t c f) = nrows t
η : 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
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec5
[129, 1]
[136, 25]
rw [List.length_map, List.zip_length_eq_of_length_eq]
η : 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
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)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec5
[129, 1]
[136, 25]
apply Eq.symm
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)
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
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
buildColumn_spec5
[129, 1]
[136, 25]
apply List.length_map
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
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
vcat_spec2
[145, 1]
[150, 43]
intro t1 t2
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t1 t2 : Table sch), nrows (vcat t1 t2) = nrows t1 + nrows t2
η : Type u_η dec_η : DecidableEq η sch : Schema t1 t2 : Table sch ⊢ nrows (vcat t1 t2) = nrows t1 + nrows t2
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
vcat_spec2
[145, 1]
[150, 43]
simp only [nrows, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t1 t2 : Table sch ⊢ nrows (vcat t1 t2) = nrows t1 + nrows t2
η : Type u_η dec_η : DecidableEq η sch : Schema t1 t2 : Table sch ⊢ List.length (vcat t1 t2).rows = List.length t1.rows + List.length t2.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
vcat_spec2
[145, 1]
[150, 43]
exact List.length_append t1.rows t2.rows
η : Type u_η dec_η : DecidableEq η sch : Schema t1 t2 : Table sch ⊢ List.length (vcat t1 t2).rows = List.length t1.rows + List.length t2.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
hcat_spec2
[160, 1]
[166, 47]
intros sch₁ sch₂ t₁ t₂ h
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ {sch₁ sch₂ : Schema} (t₁ : Table sch₁) (t₂ : Table sch₂), nrows t₁ = nrows t₂ → nrows (hcat t₁ t₂) = nrows t₁
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ h : nrows t₁ = nrows t₂ ⊢ nrows (hcat t₁ t₂) = nrows t₁
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
hcat_spec2
[160, 1]
[166, 47]
simp only [nrows, hcat, Schema.length_eq_List_length] at *
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ h : nrows t₁ = nrows t₂ ⊢ nrows (hcat t₁ t₂) = nrows t₁
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ h : List.length t₁.rows = List.length t₂.rows ⊢ List.length (List.map (fun x => Row.append x.fst x.snd) (List.zip t₁.rows t₂.rows)) = List.length t₁.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
hcat_spec2
[160, 1]
[166, 47]
rw [List.length_map]
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ h : List.length t₁.rows = List.length t₂.rows ⊢ List.length (List.map (fun x => Row.append x.fst x.snd) (List.zip t₁.rows t₂.rows)) = List.length t₁.rows
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ h : List.length t₁.rows = List.length t₂.rows ⊢ List.length (List.zip t₁.rows t₂.rows) = List.length t₁.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
hcat_spec2
[160, 1]
[166, 47]
apply List.zip_length_eq_of_length_eq _ _ h
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ h : List.length t₁.rows = List.length t₂.rows ⊢ List.length (List.zip t₁.rows t₂.rows) = List.length t₁.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
crossJoin_spec2
[186, 1]
[191, 26]
intros sch₁ sch₂ t₁ t₂
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ {sch₁ sch₂ : Schema} (t₁ : Table sch₁) (t₂ : Table sch₂), nrows (crossJoin t₁ t₂) = nrows t₁ * nrows t₂
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ ⊢ nrows (crossJoin t₁ t₂) = nrows t₁ * nrows t₂
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
crossJoin_spec2
[186, 1]
[191, 26]
simp only [nrows, crossJoin, List.length_map, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ ⊢ nrows (crossJoin t₁ t₂) = nrows t₁ * nrows t₂
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ ⊢ List.length (List.prod t₁.rows t₂.rows) = List.length t₁.rows * List.length t₂.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
crossJoin_spec2
[186, 1]
[191, 26]
apply List.length_prod
η : Type u_η dec_η : DecidableEq η sch : Schema sch₁ sch₂ : Schema t₁ : Table sch₁ t₂ : Table sch₂ ⊢ List.length (List.prod t₁.rows t₂.rows) = List.length t₁.rows * List.length t₂.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
getColumn1_spec1
[254, 1]
[259, 24]
intro t n h
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (n : Nat) (h : n < ncols t), List.length (getColumn1 t n) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch n : Nat h : n < ncols t ⊢ List.length (getColumn1 t n) = nrows t
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
getColumn1_spec1
[254, 1]
[259, 24]
simp only [getColumn1, nrows, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch n : Nat h : n < ncols t ⊢ List.length (getColumn1 t n) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch n : Nat h : n < ncols t ⊢ List.length (List.map (fun r => Cell.toOption (Row.nth r n h)) t.rows) = List.length t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
getColumn1_spec1
[254, 1]
[259, 24]
apply List.length_map
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch n : Nat h : n < ncols t ⊢ List.length (List.map (fun r => Cell.toOption (Row.nth r n h)) t.rows) = List.length t.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
getColumn2_spec2
[267, 1]
[272, 24]
intro τ t c h
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ {τ : Type u} (t : Table sch) (c : η) (h : Schema.HasCol (c, τ) sch), List.length (getColumn2 t c) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η h : Schema.HasCol (c, τ) sch ⊢ List.length (getColumn2 t c) = nrows t
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
getColumn2_spec2
[267, 1]
[272, 24]
simp only [getColumn2, nrows, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η h : Schema.HasCol (c, τ) sch ⊢ List.length (getColumn2 t c) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η h : Schema.HasCol (c, τ) sch ⊢ List.length (List.map (fun r => getValue r c) t.rows) = List.length t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
getColumn2_spec2
[267, 1]
[272, 24]
apply List.length_map
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η h : Schema.HasCol (c, τ) sch ⊢ List.length (List.map (fun r => getValue r c) t.rows) = List.length t.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectRows1_spec2
[282, 1]
[287, 24]
intro t ns
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (ns : List (Fin (nrows t))), nrows (selectRows1 t ns) = List.length ns
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (nrows t)) ⊢ nrows (selectRows1 t ns) = List.length ns
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectRows1_spec2
[282, 1]
[287, 24]
rw [selectRows1, nrows, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (nrows t)) ⊢ nrows (selectRows1 t ns) = List.length ns
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (nrows t)) ⊢ List.length { rows := List.map (fun n => getRow t n.val) ns }.rows = List.length ns
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectRows1_spec2
[282, 1]
[287, 24]
apply List.length_map
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (nrows t)) ⊢ List.length { rows := List.map (fun n => getRow t n.val) ns }.rows = List.length ns
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectRows2_spec2
[296, 1]
[304, 10]
intro t bs h
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (bs : List Bool), List.length bs = nrows t → nrows (selectRows2 t bs) = List.length (List.removeAllEq bs [false])
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool h : List.length bs = nrows t ⊢ nrows (selectRows2 t bs) = List.length (List.removeAllEq bs [false])
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectRows2_spec2
[296, 1]
[304, 10]
simp only [nrows, selectRows2, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool h : List.length bs = nrows t ⊢ nrows (selectRows2 t bs) = List.length (List.removeAllEq bs [false])
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool h : List.length bs = nrows t ⊢ List.length (List.sieve bs t.rows) = List.length (List.removeAllEq bs [false])
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectRows2_spec2
[296, 1]
[304, 10]
apply List.sieve_removeAllEq
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool h : List.length bs = nrows t ⊢ List.length (List.sieve bs t.rows) = List.length (List.removeAllEq bs [false])
case a η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool h : List.length bs = nrows t ⊢ List.length bs = List.length t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectRows2_spec2
[296, 1]
[304, 10]
rw [nrows, Schema.length_eq_List_length] at h
case a η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool h : List.length bs = nrows t ⊢ List.length bs = List.length t.rows
case a η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool h : List.length bs = List.length t.rows ⊢ List.length bs = List.length t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectRows2_spec2
[296, 1]
[304, 10]
exact h
case a η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool h : List.length bs = List.length t.rows ⊢ List.length bs = List.length t.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec1
[308, 1]
[313, 77]
intro t bs
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (bs : List Bool), header (selectColumns1 t bs) <+ header t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ header (selectColumns1 t bs) <+ header t
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec1
[308, 1]
[313, 77]
simp only [header, Schema.names, Schema.sieve_eq_List_sieve]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ header (selectColumns1 t bs) <+ header t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ List.map Prod.fst (List.sieve bs sch) <+ List.map Prod.fst sch
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec1
[308, 1]
[313, 77]
exact List.sublist_of_map_sublist _ _ Prod.fst $ List.sieve_sublist bs sch
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ List.map Prod.fst (List.sieve bs sch) <+ List.map Prod.fst sch
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
ncols_eq_header_length
[316, 1]
[321, 24]
intro t
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch), ncols t = List.length (header t)
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ⊢ ncols t = List.length (header t)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
ncols_eq_header_length
[316, 1]
[321, 24]
simp only [ncols, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ⊢ ncols t = List.length (header t)
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ⊢ List.length sch = List.length (header t)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
ncols_eq_header_length
[316, 1]
[321, 24]
apply Eq.symm
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ⊢ List.length sch = List.length (header t)
case h η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ⊢ List.length (header t) = List.length sch
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
ncols_eq_header_length
[316, 1]
[321, 24]
apply List.length_map
case h η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ⊢ List.length (header t) = List.length sch
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec2
[323, 1]
[332, 37]
simp only [header, Schema.sieve_eq_List_sieve]
η : Type u_η dec_η : DecidableEq η sch : Schema hu : Schema.Unique sch t : Table sch bs : List Bool h : List.length bs = ncols t i : Nat hlt : i < ncols t ⊢ List.get (header t) { val := i, isLt := (_ : i < List.length (header t)) } ∈ header (selectColumns1 t bs) ↔ List.get bs { val := i, isLt := (_ : i < List.length bs) } = true
η : Type u_η dec_η : DecidableEq η sch : Schema hu : Schema.Unique sch t : Table sch bs : List Bool h : List.length bs = ncols t i : Nat hlt : i < ncols t ⊢ List.get (Schema.names sch) { val := i, isLt := (_ : i < List.length (header t)) } ∈ Schema.names (List.sieve bs sch) ↔ List.get bs { val := i, isLt := (_ : i < List.length bs) } = true
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec2
[323, 1]
[332, 37]
exact List.sieve_map_mem_iff_true_unique (Schema.length_eq_List_length ▸ hlt) (h.symm ▸ hlt) Prod.fst hu
η : Type u_η dec_η : DecidableEq η sch : Schema hu : Schema.Unique sch t : Table sch bs : List Bool h : List.length bs = ncols t i : Nat hlt : i < ncols t ⊢ List.get (Schema.names sch) { val := i, isLt := (_ : i < List.length (header t)) } ∈ Schema.names (List.sieve bs sch) ↔ List.get bs { val := i, isLt := (_ : i < List.length bs) } = true
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec3
[334, 1]
[339, 27]
simp only [schema, Schema.sieve_eq_List_sieve]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ schema (selectColumns1 t bs) <+ schema t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ List.sieve bs sch <+ sch
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec3
[334, 1]
[339, 27]
apply List.sieve_sublist
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ List.sieve bs sch <+ sch
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec4
[341, 1]
[346, 24]
intro t bs
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (bs : List Bool), nrows (selectColumns1 t bs) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ nrows (selectColumns1 t bs) = nrows t
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec4
[341, 1]
[346, 24]
simp only [nrows, selectColumns1, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ nrows (selectColumns1 t bs) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ List.length (List.map (fun r => Row.sieve bs r) t.rows) = List.length t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns1_spec4
[341, 1]
[346, 24]
apply List.length_map
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch bs : List Bool ⊢ List.length (List.map (fun r => Row.sieve bs r) t.rows) = List.length t.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec1
[350, 1]
[356, 24]
intro t ns
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (ns : List (Fin (ncols t))), ncols (selectColumns2 t ns) = List.length ns
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) ⊢ ncols (selectColumns2 t ns) = List.length ns
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec1
[350, 1]
[356, 24]
simp only [ncols, Schema.length_eq_List_length, Schema.nths, Schema.map_eq_List_map]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) ⊢ ncols (selectColumns2 t ns) = List.length ns
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) ⊢ List.length (List.map (fun n => Schema.nth sch n.val (_ : n.val < Schema.length sch)) ns) = List.length ns
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec1
[350, 1]
[356, 24]
apply List.length_map
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) ⊢ List.length (List.map (fun n => Schema.nth sch n.val (_ : n.val < Schema.length sch)) ns) = List.length ns
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec2
[363, 1]
[373, 39]
intro t ns i hi
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (ns : List (Fin (ncols t))) (i : Nat) (hi : i < List.length ns), List.get (header (selectColumns2 t ns)) { val := i, isLt := (_ : i < List.length (header (selectColumns2 t ns))) } = List.get (header t) (finHeaderLengthOfFinNcols t (List.get ns { val := i, isLt := hi }))
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) i : Nat hi : i < List.length ns ⊢ List.get (header (selectColumns2 t ns)) { val := i, isLt := (_ : i < List.length (header (selectColumns2 t ns))) } = List.get (header t) (finHeaderLengthOfFinNcols t (List.get ns { val := i, isLt := hi }))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec2
[363, 1]
[373, 39]
simp only [header]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) i : Nat hi : i < List.length ns ⊢ List.get (header (selectColumns2 t ns)) { val := i, isLt := (_ : i < List.length (header (selectColumns2 t ns))) } = List.get (header t) (finHeaderLengthOfFinNcols t (List.get ns { val := i, isLt := hi }))
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) i : Nat hi : i < List.length ns ⊢ List.get (Schema.names (Schema.nths sch ns)) { val := i, isLt := (_ : i < List.length (header (selectColumns2 t ns))) } = List.get (Schema.names sch) (finHeaderLengthOfFinNcols t (List.get ns { val := i, isLt := hi }))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec2
[363, 1]
[373, 39]
simp only [finHeaderLengthOfFinNcols]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) i : Nat hi : i < List.length ns ⊢ List.get (Schema.names (Schema.nths sch ns)) { val := i, isLt := (_ : i < List.length (header (selectColumns2 t ns))) } = List.get (Schema.names sch) (finHeaderLengthOfFinNcols t (List.get ns { val := i, isLt := hi }))
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) i : Nat hi : i < List.length ns ⊢ List.get (Schema.names (Schema.nths sch ns)) { val := i, isLt := (_ : i < List.length (header (selectColumns2 t ns))) } = List.get (Schema.names sch) { val := (List.get ns { val := i, isLt := hi }).val, isLt := (_ : (List.get ns { val := i, isLt := hi }).val < List.length (header t)) }
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec2
[363, 1]
[373, 39]
apply Schema.get_map_nths_eq_get_get
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) i : Nat hi : i < List.length ns ⊢ List.get (Schema.names (Schema.nths sch ns)) { val := i, isLt := (_ : i < List.length (header (selectColumns2 t ns))) } = List.get (Schema.names sch) { val := (List.get ns { val := i, isLt := hi }).val, isLt := (_ : (List.get ns { val := i, isLt := hi }).val < List.length (header t)) }
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec3
[375, 1]
[383, 45]
intro sch t ns c
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ {sch : Schema} (t : Table sch) (ns : List (Fin (ncols t))) (c : CertifiedName (schema (selectColumns2 t ns))), Schema.lookupType (schema (selectColumns2 t ns)) c = Schema.lookupType (schema t) { fst := c.fst, snd := Schema.hasNameOfNthsHasName c.snd }
η : Type u_η dec_η : DecidableEq η sch✝ : Schema sch : Schema t : Table sch ns : List (Fin (ncols t)) c : CertifiedName (schema (selectColumns2 t ns)) ⊢ Schema.lookupType (schema (selectColumns2 t ns)) c = Schema.lookupType (schema t) { fst := c.fst, snd := Schema.hasNameOfNthsHasName c.snd }
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec3
[375, 1]
[383, 45]
unfold schema at *
η : Type u_η dec_η : DecidableEq η sch✝ : Schema sch : Schema t : Table sch ns : List (Fin (ncols t)) c : CertifiedName (schema (selectColumns2 t ns)) ⊢ Schema.lookupType (schema (selectColumns2 t ns)) c = Schema.lookupType (schema t) { fst := c.fst, snd := Schema.hasNameOfNthsHasName c.snd }
η : Type u_η dec_η : DecidableEq η sch✝ : Schema sch : Schema t : Table sch ns : List (Fin (ncols t)) c : CertifiedName (Schema.nths sch ns) ⊢ Schema.lookupType (Schema.nths sch ns) c = Schema.lookupType sch { fst := c.fst, snd := Schema.hasNameOfNthsHasName c.snd }
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec3
[375, 1]
[383, 45]
apply Schema.lookupType_nths_eq_lookupType
η : Type u_η dec_η : DecidableEq η sch✝ : Schema sch : Schema t : Table sch ns : List (Fin (ncols t)) c : CertifiedName (Schema.nths sch ns) ⊢ Schema.lookupType (Schema.nths sch ns) c = Schema.lookupType sch { fst := c.fst, snd := Schema.hasNameOfNthsHasName c.snd }
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
selectColumns2_spec4
[385, 1]
[390, 24]
intro t ns
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (ns : List (Fin (ncols t))), nrows (selectColumns2 t ns) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch ns : List (Fin (ncols t)) ⊢ nrows (selectColumns2 t ns) = nrows t